Use this index to understand the harness before changing it. Read the architecture documents in order, then open the system guide for the area you are modifying.
| Document | Read this to understand |
|---|---|
| Overview | The major layers, request flow, and ownership boundaries |
| Runtime | CLI startup, session orchestration, the agent loop, providers, and tools |
| Sessions | SQLite persistence, entry trees, forks, model projection, and history |
| Interfaces | Interactive TUI, headless output, prompt queues, commands, and images |
| Document | Read this to understand |
|---|---|
| Tools and permissions | Tool registration, execution, approvals, file safety, and plan-mode restrictions |
| Context management | Request compression, retrieval artifacts, session compaction, and overflow recovery |
| Extensions and subagents | Skills, custom commands, delegated tasks, and child sessions |
| Repository index | Workspace onboarding, bounded repository maps, and background refresh |
| Plan and evolve | Read-only planning and verified self-modification |
| Document | Read this to understand |
|---|---|
| Change guide | Source ownership, invariants, test locations, and verification commands |
Every document follows the same shape:
- Overview — what the area owns.
- How it works — the shortest useful execution model.
- Key paths — source files that define the behavior.
- Invariants — behavior that changes must preserve.
- Changing this area — practical checks for contributors and agents.
Keep these documents about current behavior. Put release history in CHANGELOG.md; do not add implementation plans, speculative roadmaps, or copied source-level detail.