Appendix: Glossary and ADR Index
2026.08.10A. Glossary
| Chinese | English | Description |
|---|---|---|
| Agent | Agent | An LLM-driven software entity that can autonomously invoke tools to complete tasks |
| 身份声明 | Identity Statement | The file in AGENTS.md that defines the agent's role and principles, serving as the source of the system prompt |
| 文件系统即自我 | Filesystem as Self | CodeCoder's core principle: the agent's identity, knowledge, and capabilities are defined by files on disk, not hardcoded |
| 工具 | Tool | Native primitives compiled into the binary, cannot be added or removed at runtime (26 total) |
| 技能 | Skill | Procedural knowledge stored as .md files, changing the agent's reasoning path |
| 草稿 | Prompt/Draft | The draft state of a Skill, stored in prompts/, can be promoted to a formal Skill |
| 能力 | Capability | Executable artifacts written by the agent, with a manifest declaring environment and lifecycle |
| 环境 | Environment | The execution backend for a Capability: Shell / Wasm / Docker |
| 生命周期 | Lifecycle | The operating mode of a Capability: OneShot / OnDemand / Persistent |
| 权限键 | Permission Key | Fine-grained permission identifier, formatted like run_command:git |
| 会话白名单 | Session Allowlist | Runtime in-memory permission cache, cleared when the session ends |
| 项目白名单 | Project Allowlist | Permission configuration persisted in codecoder.json, effective across sessions |
| 天花板规则 | Ceiling Rule | @shell environments can only be granted up to AlwaysThisSession trust level |
| 静默降级 | Silent Degradation | Automatically falling back to a lower security level when an environment is unavailable — CodeCoder prohibits this |
| turn | Turn | The complete processing cycle from receiving a user message to autonomously deciding output completion |
| 命令通道 | Command Channel (cmd_tx) | The channel carrying the user's active intent |
| 事件通道 | Event Channel (event_rx) | The channel carrying streaming increments and structured state |
| 协作式取消 | Cooperative Cancellation | Gracefully terminating agent operations via a shared CancelToken, rather than forcibly killing threads |
| 子代理 | Sub-agent | A read-only child instance created via the agent tool, with nesting depth locked to 1 |
| 只读工具集 | Read-only Toolset | 9 read-only tools available to sub-agents |
| 工作图 | Work Graph | A milestone dependency graph (DAG) constructed in advance |
| 会话 | Session | The message tree recorded after the fact (JSON format), the carrier of facts |
| 里程碑 | Milestone | A single node in the Work Graph, with state and dependencies |
| 验收门 | Acceptance Gate | The levels of verification for milestone completion |
| 命令门 | Command Gate | Level-one acceptance: agent self-reports completion |
| 检查门 | Check Gate | Level-two acceptance: deterministic automated checks (compilation, templates, file count, etc.) |
| 审查门 | Review Gate | Level-three acceptance: structured architectural review by an independent read-only sub-agent |
| 自恢复循环 | Self-recovery Loop | Bounded automatic retry under needs_fix state |
| 无用户模式 | Headless Mode | Autonomous run mode with no user present |
| 预授权 | Pre-authorization | Permission configuration in codecoder.json |
| 熔断 | Circuit Breaking | Automatic termination after K consecutive failures |
| 上下文压缩 | Compaction | Two-tier compression strategy: tier-1 discards + placeholderization, tier-2 structured summarization |
| 持久化 | Persistence | Session file JSON format and migration chain |
| 结构化摘要 | Structured Summary | Five-field summary template for tier-2 compaction |
| 可观测性 | Observability | Event streams, NDJSON real-time logs, structured tracing |
| 常驻目录 | Registry | The file index table formed by scanning skills/, prompts/, and capabilities/ at startup |
| 持久化记忆 | Memory | Key-value memory actively written by the agent, shared across sessions |
| 离线单元测试 | L1 Test | Unit test with no LLM calls |
| 黑盒行为验证 | L2 Test | Behavioral test using ScriptedProvider |
| 真实 LLM 冒烟 | L3 Test | End-to-end test connecting to a real LLM |
B. ADR Index
CodeCoder's complete Architecture Decision Records are stored in docs/adr/, totaling 31 records (data collected: July 28, 2026).
| ADR | Title | Corresponding Chapter |
|---|---|---|
| 0015 | Unified Message Model | Part 1 Ch. 1, Part 2 Ch. 1 |
| 0016 | Channel Topology and Event Model | Part 1 Ch. 1, Part 2 Ch. 1 |
| 0017 | Provider Neutral Message Model | Part 1 Ch. 1, Part 2 Ch. 1 |
| 0018 | Tool Trait and Permission Keys | Part 2 Ch. 2 |
| 0019 | Sub-agent Capability Boundary | Part 2 Ch. 3 |
| 0020 | Skills and Capabilities Registry | Part 3 Ch. 1, 2 |
| 0021 | Capability Environments and Lifecycle | Part 3 Ch. 3 |
| 0022 | Self-authoring Safety Loop | Part 3 Ch. 4 |
| 0023 | Context Compaction | Part 4 Ch. 4 |
| 0025 | Prompt as Skill Draft Tier | Part 3 Ch. 1, 2 |
| 0026 | Background Agent Headless Runner | Part 4 Ch. 3 |
| 0030 | BG Objective Acceptance Gate | Part 4 Ch. 2 |
| 0032 | Client-Server Architecture | Part 5 Ch. 1 |
| 0033 | BG Ledger and Exit Codes | Part 4 Ch. 3 |
| 0034 | Persistent Supervisor Cross-restart | Part 3 Ch. 3, Part 4 Ch. 3 |
| 0036 | Compound Command Keying | Part 2 Ch. 2 |
| 0039 | BG Review Gate and Observability | Part 4 Ch. 2, Part 5 Ch. 2 |
C. Project Data Sheet
Data collected: July 28, 2026
| Metric | Value |
|---|---|
| Source files | 31 (24 under src/ + daemon/ + client/) |
| Test files | 13 |
| Test cases | 481 (including 1 #[ignore]) |
| Built-in tools | 26 |
| Skills | 6 |
| Capabilities | 1 |
| Architecture Decision Records (ADRs) | 31 |
| Programming language | Rust |
| LLM protocol | OpenAI-compatible (Provider-neutral) |
| Run modes | Interactive (TUI / Socket) and Headless (environment-variable-triggered) |
| Communication protocol | Unix socket, daemon-client architecture |
Note: Glossary terms appear in English in the main text, with Chinese annotations in parentheses on first occurrence.