# 术语表 > 30 个核心词。每条「短定义 + 出处页面 + 同义/近义」。Claude Code 在抽取 PRD 时建议先建索引表,再读其他章节。 ## 核心抽象 | 术语 | 定义 | 出处 | | --- | --- | --- | | **DevLoop** | 本系统全名 — 三层 Loop 驱动的自动开发流水线 | [background](prd-background.html) | | **L1 / Unit Loop** | 最内层。单 Unit 的「写代码 → 跑单测 → 失败重试」 | [loops-l1](loops-l1.html) | | **L2 / Integration Loop** | 中层。所有 Unit passed 后跑集成测试 + 失败回写 SDD | [loops-l2](loops-l2.html) | | **L3 / Human Feedback Loop** | 外层。人类新需求并入 PRD 触发增量重跑 | [loops-l3](loops-l3.html) | | **Unit** | 最小可独立开发 + 单测的代码单元(前端组件 / 后端服务 / 中间件 / DB 迁移) | [architect](agents-architect.html) | | **Project** | 一次完整的 DevLoop 实例,对应 `data/companies/{cid}/projects/{pid}/` | [data-layout](data-layout.html) | | **Rev** | PRD / SDD / units.json 的修订号,单调递增 | [documents](data-documents.html) | | **Run** | 一次 Agent 执行的产物目录 `runs/{runId}/` | [documents](data-documents.html) | | **Contract** | Unit 对外暴露的接口契约(OpenAPI / TS interface) | [api-contracts](api-contracts.html) | | **contract_hash** | contract 文本 sha256 截前 16 位,用于检测变更 | [components](arch-components.html) | ## 组件与服务 | 术语 | 定义 | 出处 | | --- | --- | --- | | **LoopController** | 三层 Loop 的唯一编排者,`server/src/core/loop-controller.js` | [components](arch-components.html) | | **DocStore** | PRD/SDD/units.json/spec.json 读写归档 | [components](arch-components.html) | | **UnitRegistry** | Unit 状态机的 source of truth | [components](arch-components.html) | | **SSEBroker** | Server-Sent Events 订阅与分发 | [api-sse](api-sse.html) | | **scheduler** | 复用 `server/src/core/scheduler.js` 做 DAG 拓扑分波 | [mapping](arch-mapping.html) | | **session-pool** | 复用 ACP 的会话池,按 `(agentName, cid, pid)` 复用 | [mapping](arch-mapping.html) | | **retryWithReflection** | 反思重试函数,P2 写在 loop-controller.js 内 | [loops-l1](loops-l1.html) | ## Agent 角色 | 术语 | 定义 | 出处 | | --- | --- | --- | | **PM Agent** | 需求 → prd.html。L3 入口 | [PM](agents-pm.html) | | **Architect Agent** | PRD → SDD + units.json + integration spec | [Architect](agents-architect.html) | | **Coder Agent** | 实现单 Unit 的代码 + contract.json | [Coder](agents-coder.html) | | **Tester Agent** | 写 + 跑 Unit Test,输出 hint 给 Coder | [Tester](agents-tester.html) | | **Integrator Agent** | 起多个真实进程跑端到端测试 | [Integrator](agents-integrator.html) | | **BugTriager Agent** | 归因集成失败,提议 SDD 补丁 | [Triager](agents-triager.html) | ## 状态与归类 | 术语 | 定义 | | --- | --- | | `pending` / `coding` / `testing` / `failed` / `passed` / `blocked` | Unit 六态机 | | `contract_mismatch` | BugTriager 类别 1 — SDD 双方契约不齐 | | `impl_bug` | BugTriager 类别 2 — 代码没遵守 SDD,**不改 SDD** | | `spec_ambiguous` | BugTriager 类别 3 — SDD 描述不清,升 L3 | | `infra_flake` | BugTriager 类别 4 — 端口冲突等环境问题,重跑即可 | | **L2 gate** | 「全部 Unit passed 且 contract_hash 与当前 SDD 一致」的门 | | **l2_rounds / l2_budget** | L2 修复轮次累计与上限(默认 3) | | **retry_budget** | 单 Unit 重试上限(默认 5) | ## 文档与协议 | 术语 | 定义 | | --- | --- | | **MVCP** | 本 SDD 采用的四象限划分:Model / View / Control / Process | | **data-* 锚点** | HTML 上的机器读结构化信息,cheerio 抽取 | | **build-manifest** | Architect Agent 从 SDD 抽出的 JSON 构建清单 | | **ACP** | Agent Communication Protocol,LemonBoss 既有协议层 | | **company-scoped 文件根** | 所有项目落在 `data/companies/{cid}/` 下 | ## 反义 / 易混淆 | 勿混 | 正解 | | --- | --- | | DevLoop ≠ Master Agent | DevLoop bypass Master,自己起 LoopController | | EvolutionLoop ≠ DevLoop | EvolutionLoop 是 Skill 进化,DevLoop 是工程化代码生成 | | units.json ≠ pipeline.json | units.json 是 DevLoop 自己的;pipeline-service 是 LemonBoss 既有 SOP | | contract.json ≠ contract_hash | 前者是契约文本本身,后者是其 sha256 摘要 | | L2 gate ≠ L2 闸门关闭 | 「gate 打开」= 允许进 L2,不是阻止 | | blocked ≠ failed | failed 是「测试红」可继续 retry;blocked 是「retry 耗尽」需要人 |