Skip to content

Commit 5fe926c

Browse files
committed
docs(readme): cut the README to a way in and let docs carry the depth
251 lines to 131. A reader had to get past three permission subsections, a stack table, an architecture diagram, and the director catalog before reaching anything that told them whether to keep going. Architecture, the stack list, extensibility, and the agent-workspace catalog are deleted rather than moved: docs/ARCHITECTURE.md, docs/IMPLEMENTATION.md, docs/PRODUCT.md and docs/PLUGINS.md already cover each one, verified before removing. Two copies of an explanation is one copy that goes stale, and it is never the docs copy. Permissions drop from ~50 lines of enumerated rules to a paragraph that says what auto mode does, what it stops for, and where the full policy is. The docs table moves from the footer to a signposted next step. CL-7884
1 parent edb517f commit 5fe926c

1 file changed

Lines changed: 44 additions & 164 deletions

File tree

‎README.md‎

Lines changed: 44 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The product is the **harness** — the loop that dispatches work, watches it,
99
decides what happens next, and reports to the operator. Agent personas and
1010
skills are content that run inside it.
1111

12-
## Quickstart
12+
## Install
1313

1414
### Homebrew (macOS / Linux)
1515

@@ -42,201 +42,81 @@ ln -s "$PWD/dist/corbits" ~/.local/bin/corbits
4242

4343
After pulling new changes, re-run `bun run build:bin` to refresh the binary.
4444

45-
## Usage
46-
47-
### TUI (default)
45+
## First run
4846

4947
```sh
5048
corbits "Add JWT auth to the API"
5149
```
5250

53-
Full-screen terminal UI (OpenTUI): event log, permission and operator prompts,
54-
diff and cost visibility, and a chat input for follow-ups. Press **Shift+Tab**
55-
to cycle reasoning effort for the current model; **Tab** toggles focus between
56-
the prompt and the transcript. See `docs/TUI.md`.
51+
That opens the full-screen terminal UI: event log, permission and operator
52+
prompts, diff and cost visibility, and a chat input for follow-ups. **Tab**
53+
toggles focus between the prompt and the transcript, **Shift+Tab** cycles
54+
reasoning effort, **Ctrl+C** interrupts a run, and `/help` lists the rest.
5755

58-
### Exec (non-TUI)
56+
For scripts and CI, `corbits exec` runs the same directors, tools, permissions,
57+
MCP, plugins, and hooks without the terminal UI, streaming assistant text to
58+
stdout:
5959

6060
```sh
6161
corbits exec "Add JWT auth to the API"
62-
# alias:
63-
corbits run "Add JWT auth to the API"
6462
```
6563

66-
Same directors, tools, permissions, MCP, plugins, and hooks as the TUI — without
67-
the OpenTUI shell. Streams assistant text to stdout for scripts and CI.
68-
69-
### Resume
70-
71-
```sh
72-
corbits resume
73-
# or:
74-
corbits resume <session-id>
75-
```
76-
77-
Plain `corbits` always starts a fresh conversation. `corbits resume` opens a
78-
picker of the 10 most recently persisted sessions for this checkout,
79-
including completed ones. Type to filter by name.
80-
81-
### Mid-run steering
82-
83-
While a run is in progress:
84-
85-
- **Enter** — soft-steer while the parent is busy (in-flight tool / `wait_agents`); starts a new primary turn when the parent is idle with a fleet still running
86-
- **Alt+Enter** — queue a follow-up delivered when the whole session is idle
87-
- **Ctrl+C** — interrupt the run
88-
89-
Shortcuts are listed in `/help`. Details live in `docs/PRODUCT.md`.
90-
91-
## Permissions and auto mode
92-
93-
Corbits Code defaults to **auto mode** (`auto = true`). Workspace file
94-
writes/edits/deletes and unconstrained shell commands run without per-action
95-
prompts. Pass `--no-auto` to start in ask-on-every-consequential-action mode
96-
(there is currently no in-session key to toggle auto).
97-
98-
### What auto allows
99-
100-
- File tools inside the workspace: `write_file`, `edit_file`, `delete_file` (and
101-
other non-shell built-ins such as `manage_tasks`, `spawn_agent`, `wait_agents`, …)
102-
- Unconstrained shell (builds, tests, git, one-off commands that match no
103-
deny/ask rule)
104-
- Read-only tools (`read_file`, `grep`, `search_files`, `list_dir`, `lsp`, …)
105-
always allow regardless of mode
106-
107-
### What still asks (even in auto)
108-
109-
- Dependency installs and remote runners (`npm install` / `i` / `ci` / `add`,
110-
`pip install`, `cargo add`, `brew install`, `npx` / `bunx`, …)
111-
- Recursive `rm` (`-r` / `-R` / `--recursive`)
112-
- Force or uncontained git worktree add/remove/prune (contained non-force
113-
add/remove/prune and read-only `git worktree list` auto-allow)
114-
- Shell that references sensitive paths (`.env`, private keys, certs, credential
115-
files, …)
116-
- Opaque shell wrappers the policy cannot statically inspect (variable expansion
117-
or command substitution in a wrapper payload)
118-
- Shell that references a path outside the workspace
119-
- Writes under the in-workspace session state root, mutating MCP
120-
tools, and unknown built-ins
121-
122-
### What auto hard-denies (use the file tools instead)
123-
124-
- File creation or edits via shell: redirects (`>` / `>>`), `tee`, `sed -i` /
125-
`perl -i` / similar, interpreter inline programs or heredocs (`python -c`,
126-
`node -e`, …)
127-
128-
Wrappers such as `bash -c '…'`, `sh`/`zsh -c`, `xargs`, and transparent prefixes
129-
(`env`, `nice`, `timeout`) are peeled so the same rules apply to the inner
130-
command. Unparseable wrappers fall through to ask rather than auto-allow.
131-
132-
Catastrophic patterns (`rm -rf /`, `sudo`, `curl | bash`, force-push, open-ended
133-
`find`/`rg`/`grep -r`, …) are always denied by authorization, independent of
134-
auto mode. `--dangerously-skip-permissions` still forces this process; `/yolo`
135-
persists as the user-global default. Both bypass the permission gate (not
136-
secret-guard path denies or authz hard blocks).
137-
138-
Details live in `docs/PRODUCT.md` (safety model) and `docs/ARCHITECTURE.md`
139-
(permission gate and auto-shell policy).
140-
141-
## Stack
142-
143-
- **Runtime:** Bun + TypeScript
144-
- **Agent loop:** `@intx/agent` with an event-driven reactor
145-
- **Inference:** `@intx/inference` (vendored) with OpenAI-compatible adapters
146-
- **Tools:** `@intx/tools-posix` and `@intx/tools-lsp`
147-
- **Authz:** `@intx/authz` for grant matching; Corbits owns the gate, store, and TUI ask
148-
- **Persistence:** `@intx/storage-isogit` for git-backed resume
149-
- **MCP:** Model Context Protocol SDK for external tool servers
150-
- **TUI:** OpenTUI (`@opentui/core`)
151-
152-
## Architecture
153-
154-
Corbits Code is a single-process CLI built on Interchange primitives. The primary
155-
session is always the **orchestrator** (Skywalker): it can act directly and
156-
delegates substantial work through a closed director fleet via `spawn_agent`
157-
then idle (mailbox mail inbound) and `search_agents`. `wait_agents` stays
158-
mounted only on headless `corbits exec` primary runs.
159-
160-
```
161-
CLI (src/index.ts)
162-
→ load config / settings
163-
→ runTUI (default) or runExec (corbits exec | run)
164-
→ create agent with ChatDirector, posix tools, permission gate
165-
→ mount plugins, MCP, hooks, skills
166-
→ primary orchestrator turn
167-
↳ spawn_agent then idle → mailbox mail inbound → closed directors (builder, explorer, …)
168-
→ event stream → OpenTUI host (TUI) or stdout (exec)
169-
```
64+
`corbits resume` reopens one of the 10 most recent sessions for this checkout;
65+
plain `corbits` always starts fresh.
17066

171-
The chat director adds context management on top of the reactor:
67+
Behavior, keybindings, and steering in depth: `docs/TUI.md` and
68+
`docs/PRODUCT.md`.
17269

173-
- **Threshold compaction:** As the context window fills, the conversation is
174-
compacted at the next safe point.
175-
- **Idle compaction:** A pending compaction also runs when a turn ends without
176-
more work, so a text-only conversation still compacts.
177-
- **Overflow recovery:** A context-overflow error triggers a bounded
178-
compact-and-retry instead of failing the turn.
179-
- **Workflow nudges:** When a workflow is active, the director keeps the run on
180-
the current step and surfaces a visible message if it stalls.
70+
## Permissions
18171

182-
Deep design: `docs/ARCHITECTURE.md`, `docs/IMPLEMENTATION.md`, `docs/PRODUCT.md`.
72+
Corbits Code defaults to **auto mode**, where workspace file edits and ordinary
73+
shell commands run without a prompt so a long task is not interrupted every few
74+
seconds. It still stops and asks before anything consequential — dependency
75+
installs, recursive deletes, touching paths outside the workspace or anything
76+
that looks like a credential — and it refuses outright to edit files through
77+
shell redirects or `sed -i` when the file tools exist for that. Catastrophic
78+
patterns are denied by authorization regardless of mode.
18379

184-
## Extensibility
80+
Start with `--no-auto` to be asked before every consequential action.
18581

186-
- **Plugins** — discovery and manifests: `docs/PLUGINS.md`
187-
- **MCP** — connect external tool servers: `docs/MCP.md`
188-
- **Hooks** — lifecycle hooks: `docs/HOOKS.md`
189-
- **Skills / slash commands** — first-party actions such as `/implement`,
190-
`/plan`, `/review`, `/create-issue` ship with the `corbits-skills` plugin (on
191-
by default; toggle in `/plugins`)
82+
The full policy — every rule, what is peeled from wrappers, and how the gate
83+
composes with authorization — is in `docs/ARCHITECTURE.md`, with the safety
84+
model behind it in `docs/PRODUCT.md`.
19285

193-
## Agent workspace
86+
## Where to go next
19487

195-
Corbits Code keeps repository guidance and the closed director fleet separate:
196-
197-
- `AGENTS.md` — shared startup instructions and project context
198-
- `src/agent/directors/` — closed spawn catalog (`directorProfiles()`). Skywalker
199-
is the primary orchestrator; spawnable directors include builder, explorer,
200-
counsel, intern, critic, greybeard, neckbeard, bruckheimer, gaasbot, draper,
201-
emil, rand, shakespeare, testsmith, tester, gauntlet, prober, migrator, and warden. Closed ids cannot be
202-
overridden by plugins or local files.
203-
- `.agents/agents/` — optional local profile additions; this directory is not
204-
required and may be absent
88+
| Doc | Covers |
89+
| ------------------------ | --------------------------------------- |
90+
| `docs/PRODUCT.md` | What we are building and why |
91+
| `docs/ARCHITECTURE.md` | Reactor, directors, permissions, exec |
92+
| `docs/IMPLEMENTATION.md` | Runtime, config, CLI flags, persistence |
93+
| `docs/TUI.md` | Terminal UI behavior |
94+
| `docs/PLUGINS.md` | Plugin manifests and discovery |
95+
| `docs/MCP.md` | MCP servers |
96+
| `docs/HOOKS.md` | Lifecycle hooks |
97+
| `docs/TELEMETRY.md` | Usage telemetry |
98+
| `docs/PERFTRACE.md` | Local PerfTrace / OTEL export |
99+
| `docs/VENDORING.md` | Vendored Interchange packages |
205100

206-
Named workers resolve through `spawn_agent(agent=...)`: closed directors first,
207-
then enabled agent plugins, then local `.agents/agents/*.json|*.yaml` profiles.
208-
Use `search_agents` to discover ids before dispatching.
101+
`AGENTS.md` carries the repository's own instructions to agents working in it —
102+
conventions, scope discipline, and how to validate a change.
209103

210104
## Contributing
211105

212106
Before your first commit: `git config core.hooksPath .githooks` and
213107
`./bin/check-env`.
214108

215109
Every change must pass `bun run check` (lint, typecheck, build, and test).
216-
Behavior changes come with tests. Coding conventions live in `AGENTS.md`
217-
(functional TypeScript, no classes, arktype at boundaries); commit, PR, and
218-
Linear/GitHub linking rules live in `CONTRIBUTING.md`.
110+
Behavior changes come with tests. Coding conventions live in `AGENTS.md`;
111+
commit, pull request, and Linear/GitHub linking rules live in
112+
`CONTRIBUTING.md`, and a pull request that does not follow them will be
113+
declined.
219114

220115
```bash
221116
bun install
222117
bun run check
223118
```
224119

225-
## Docs
226-
227-
| Doc | Covers |
228-
| ------------------------ | --------------------------------------- |
229-
| `docs/PRODUCT.md` | What we are building and why |
230-
| `docs/ARCHITECTURE.md` | Reactor, directors, permissions, exec |
231-
| `docs/IMPLEMENTATION.md` | Runtime, config, CLI flags, persistence |
232-
| `docs/TUI.md` | Terminal UI behavior |
233-
| `docs/PLUGINS.md` | Plugin manifests and discovery |
234-
| `docs/MCP.md` | MCP servers |
235-
| `docs/HOOKS.md` | Lifecycle hooks |
236-
| `docs/TELEMETRY.md` | Usage telemetry |
237-
| `docs/PERFTRACE.md` | Local PerfTrace / OTEL export |
238-
| `docs/VENDORING.md` | Vendored Interchange packages |
239-
240120
## License
241121

242122
Copyright (C) 2026 ABK Labs, Inc.

0 commit comments

Comments
 (0)