dev-playbooks 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +0 -1
  2. package/package.json +1 -1
  3. package/skills/Skills-Usage-Guide.md +0 -22
  4. package/skills/_shared/mcp-enhancement-template.md +0 -1
  5. package/skills/devbooks-brownfield-bootstrap/SKILL.md +184 -139
  6. package/skills/devbooks-brownfield-bootstrap/references/brownfield-bootstrap.md +3 -2
  7. package/skills/devbooks-code-review/SKILL.md +3 -3
  8. package/skills/devbooks-code-review/references/code-review-prompt.md +5 -0
  9. package/skills/devbooks-code-review/references/pr-template-and-guidelines.md +2 -0
  10. package/skills/devbooks-coder/SKILL.md +1 -1
  11. package/skills/devbooks-coder/references/code-implementation-prompt.md +1 -1
  12. package/skills/devbooks-delivery-workflow/SKILL.md +2 -2
  13. package/skills/devbooks-design-backport/SKILL.md +2 -2
  14. package/skills/devbooks-design-doc/SKILL.md +76 -1
  15. package/skills/devbooks-entropy-monitor/SKILL.md +1 -1
  16. package/skills/devbooks-impact-analysis/SKILL.md +1 -1
  17. package/skills/devbooks-implementation-plan/SKILL.md +1 -1
  18. package/skills/devbooks-implementation-plan/references/implementation-plan-prompt.md +5 -3
  19. package/skills/devbooks-proposal-debate-workflow/SKILL.md +2 -2
  20. package/skills/devbooks-proposal-judge/SKILL.md +1 -1
  21. package/skills/devbooks-router/SKILL.md +5 -5
  22. package/skills/devbooks-spec-contract/SKILL.md +1 -1
  23. package/skills/devbooks-spec-gardener/SKILL.md +57 -1
  24. package/skills/devbooks-test-owner/SKILL.md +1 -1
  25. package/skills/devbooks-test-owner/references/test-code-prompt.md +4 -0
  26. package/skills/devbooks-test-reviewer/SKILL.md +2 -2
  27. package/templates/dev-playbooks/README.md +0 -1
  28. package/templates/dev-playbooks/docs/devbooks-setup-guide.md +1 -2
  29. package/skills/devbooks-c4-map/SKILL.md +0 -151
  30. package/skills/devbooks-c4-map/references/c4-architecture-map-prompt.md +0 -33
  31. package/skills/devbooks-c4-map/references/layered-constraint-checklist.md +0 -185
package/README.md CHANGED
@@ -178,7 +178,6 @@ Run devbooks-spec-gardener skill for change add-oauth2
178
178
  | devbooks-proposal-debate-workflow | Triangle debate (Author/Challenger/Judge) |
179
179
  | devbooks-design-doc | Create a design doc |
180
180
  | devbooks-spec-contract | Define specs & contracts |
181
- | devbooks-c4-map | Generate a C4 map |
182
181
  | devbooks-implementation-plan | Create an implementation plan |
183
182
 
184
183
  ### Apply stage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-playbooks",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "AI-powered spec-driven development workflow",
5
5
  "keywords": [
6
6
  "devbooks",
@@ -171,28 +171,6 @@ If you are not using DevBooks, replace `dev-playbooks/specs` / `dev-playbooks/ch
171
171
 
172
172
  ---
173
173
 
174
- ## `devbooks-c4-map` (C4 Map Maintainer)
175
-
176
- - Purpose: maintain/update the authoritative C4 architecture map (truth) and produce a C4 Delta per change.
177
- - When to use:
178
- - Proposal stage: describe boundary/dependency direction changes in `design.md` (C4 Delta only; do not modify current truth)
179
- - Review/archive stage: change is implemented; update the authoritative map at `(<truth-root>/architecture/c4.md)`
180
- - Copy-paste prompts:
181
- - Proposal stage (C4 Delta only; do not edit current truth):
182
- ```text
183
- You are C4 Map Maintainer. Explicitly use `devbooks-c4-map`, but during proposal stage do NOT modify `dev-playbooks/specs/architecture/c4.md` (current truth).
184
- First read: `dev-playbooks/specs/architecture/c4.md` (if present) + `dev-playbooks/changes/<change-id>/proposal.md` + `dev-playbooks/changes/<change-id>/design.md`.
185
- Output: a **C4 Delta** section that I can paste into `dev-playbooks/changes/<change-id>/design.md` (C1/C2/C3 add/modify/remove + dependency direction changes + suggested architecture guardrails/fitness tests).
186
- ```
187
- - Review/archive stage (update current truth map):
188
- ```text
189
- You are C4 Map Maintainer. Explicitly use `devbooks-c4-map`.
190
- First read: `dev-playbooks/specs/architecture/c4.md` (if present) + `dev-playbooks/changes/<change-id>/design.md` + relevant code changes (to confirm the change is real).
191
- Update (or create a minimal skeleton with TODOs): `dev-playbooks/specs/architecture/c4.md`.
192
- ```
193
-
194
- ---
195
-
196
174
  ## `devbooks-implementation-plan` (Planner / tasks.md)
197
175
 
198
176
  - Purpose: derive an implementation plan `tasks.md` from `design.md` (critical path / side quests / checkpoints), tied to verification anchors (must not reference `tests/`).
@@ -91,7 +91,6 @@ The following Skills depend on MCP and require the full MCP Enhancement section:
91
91
  | devbooks-index-bootstrap | mcp__ckb__getStatus | Index status detection |
92
92
  | devbooks-federation | mcp__ckb__*, mcp__github__* | Cross-repo analysis |
93
93
  | devbooks-router | mcp__ckb__getStatus | Index availability detection |
94
- | devbooks-c4-map | mcp__ckb__getArchitecture | Module dependency graph |
95
94
  | devbooks-spec-contract | mcp__ckb__findReferences | Reference detection |
96
95
  | devbooks-entropy-monitor | mcp__ckb__getHotspots | Hotspot trend analysis |
97
96
  | devbooks-delivery-workflow | mcp__ckb__getStatus | Index detection |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: devbooks-brownfield-bootstrap
3
- description: devbooks-brownfield-bootstrap:存量项目初始化:在当前真理目录为空时生成项目画像、术语表、基线规格与最小验证锚点,避免"边补 specs 边改行为"。用户说"存量初始化/基线 specs/项目画像/建立 glossary/把老项目接入上下文协议"等时使用。
3
+ description: "devbooks-brownfield-bootstrap: Brownfield project initialization. When the truth directory is empty, generate project profile, glossary, baseline specs, and minimum verification anchors to avoid 'patching specs while changing behavior'. Use when user says 'brownfield init/baseline specs/project profile/establish glossary/onboard legacy project to context protocol' etc."
4
4
  tools:
5
5
  - Glob
6
6
  - Grep
@@ -15,217 +15,262 @@ tools:
15
15
  - mcp__ckb__getModuleOverview
16
16
  ---
17
17
 
18
- # DevBooks:存量项目初始化(Brownfield Bootstrap
18
+ # DevBooks: Brownfield Bootstrap
19
19
 
20
- ## 前置:配置发现(协议无关)
20
+ ## Prerequisites: Configuration Discovery (Protocol Agnostic)
21
21
 
22
- - `<truth-root>`:当前真理目录根
23
- - `<change-root>`:变更包目录根
24
- - `<devbooks-root>`:DevBooks 管理目录(通常是 `dev-playbooks/`)
22
+ - `<truth-root>`: Current truth directory root
23
+ - `<change-root>`: Change package directory root
24
+ - `<devbooks-root>`: DevBooks management directory (usually `dev-playbooks/`)
25
25
 
26
- 执行前**必须**按以下顺序查找配置(找到后停止):
27
- 1. `.devbooks/config.yaml`(如存在)→ 解析并使用其中的映射
28
- 2. `dev-playbooks/project.md`(如存在)→ DevBooks 2.0 协议,使用默认映射
29
- 4. `project.md`(如存在)→ template 协议,使用默认映射
30
- 5. 若仍无法确定**创建 DevBooks 目录结构并初始化基础配置**
26
+ Before execution, **must** search for configuration in the following order (stop when found):
27
+ 1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
28
+ 2. `dev-playbooks/project.md` (if exists) → DevBooks 2.0 protocol, use default mappings
29
+ 3. `project.md` (if exists) → Template protocol, use default mappings
30
+ 5. If still unable to determine **Create DevBooks directory structure and initialize basic configuration**
31
31
 
32
- **关键约束**:
33
- - 如果配置中指定了 `agents_doc`(规则文档),**必须先阅读该文档**再执行任何操作
34
- - 禁止猜测目录根
35
- - 禁止跳过规则文档阅读
32
+ **Key Constraints**:
33
+ - If configuration specifies `agents_doc` (rules document), **must read that document first** before executing any operations
34
+ - Do not guess directory roots
35
+ - Do not skip reading rules document
36
36
 
37
37
  ---
38
38
 
39
- ## 核心职责
39
+ ## Core Responsibilities
40
40
 
41
- 存量项目初始化包含以下职责:
41
+ Brownfield project initialization includes the following responsibilities:
42
42
 
43
- ### 1. 基础配置文件初始化(新增)
43
+ ### 1. Basic Configuration File Initialization
44
44
 
45
- `<devbooks-root>/`(通常是 `dev-playbooks/`)下检查并创建:
45
+ Check and create in `<devbooks-root>/` (usually `dev-playbooks/`):
46
46
 
47
- | 文件 | 用途 | 创建条件 |
48
- |------|------|----------|
49
- | `constitution.md` | 项目宪法(GIP 原则) | 文件不存在时 |
50
- | `project.md` | 项目上下文(技术栈/约定) | 文件不存在时 |
47
+ | File | Purpose | Creation Condition |
48
+ |------|---------|-------------------|
49
+ | `constitution.md` | Project constitution (GIP principles) | When file doesn't exist |
50
+ | `project.md` | Project context (tech stack/conventions) | When file doesn't exist |
51
51
 
52
- **创建方式**:
53
- - **不是简单复制模板**,而是根据代码分析结果定制内容
54
- - `constitution.md`:基于默认 GIP 原则,可根据项目特性调整
55
- - `project.md`:根据代码分析结果填充:
56
- - 技术栈(语言/框架/数据库)
57
- - 开发约定(代码风格/测试策略/Git 工作流)
58
- - 领域上下文(核心概念/角色定义)
59
- - 目录根映射
52
+ **Creation Method**:
53
+ - **Not simple template copying**, but customized content based on code analysis results
54
+ - `constitution.md`: Based on default GIP principles, can be adjusted according to project characteristics
55
+ - `project.md`: Filled based on code analysis results:
56
+ - Tech stack (language/framework/database)
57
+ - Development conventions (code style/testing strategy/Git workflow)
58
+ - Domain context (core concepts/role definitions)
59
+ - Directory root mappings
60
60
 
61
- ### 2. 项目画像与元数据
61
+ ### 2. Project Profile and Metadata
62
62
 
63
- `<truth-root>/_meta/` 下生成:
63
+ Generate in `<truth-root>/_meta/`:
64
64
 
65
- | 产物 | 路径 | 说明 |
66
- |------|------|------|
67
- | 项目画像 | `_meta/project-profile.md` | 三层架构的详细技术画像 |
68
- | 术语表 | `_meta/glossary.md` | 统一语言表(可选但推荐) |
69
- | 领域概念 | `_meta/key-concepts.md` | CKB 提取的概念(增强模式) |
65
+ | Artifact | Path | Description |
66
+ |----------|------|-------------|
67
+ | Project profile | `_meta/project-profile.md` | Detailed technical profile with three-layer architecture |
68
+ | Glossary | `_meta/glossary.md` | Unified language table (optional but recommended) |
69
+ | Domain concepts | `_meta/key-concepts.md` | Concepts extracted by CKB (enhanced mode) |
70
70
 
71
- ### 3. 架构分析产物
71
+ ### 3. Architecture Analysis Artifacts
72
72
 
73
- `<truth-root>/architecture/` 下生成:
73
+ Generate in `<truth-root>/architecture/`:
74
74
 
75
- | 产物 | 路径 | 数据来源 |
76
- |------|------|----------|
77
- | 模块依赖图 | `architecture/module-graph.md` | `mcp__ckb__getArchitecture` |
78
- | 技术债热点 | `architecture/hotspots.md` | `mcp__ckb__getHotspots` |
75
+ | Artifact | Path | Data Source |
76
+ |----------|------|-------------|
77
+ | **C4 Architecture Map** | `architecture/c4.md` | Comprehensive analysis + CKB (enhanced mode) |
78
+ | Module dependency graph | `architecture/module-graph.md` | `mcp__ckb__getArchitecture` |
79
+ | Technical debt hotspots | `architecture/hotspots.md` | `mcp__ckb__getHotspots` |
80
+ | Layering constraints | `architecture/layering-constraints.md` | Code analysis (optional) |
79
81
 
80
- ### 4. 基线变更包
82
+ > **Design Decision**: C4 architecture map is now generated by brownfield-bootstrap during initialization. Subsequent architecture changes are recorded in design.md's Architecture Impact section and merged by spec-gardener during archiving.
81
83
 
82
- `<change-root>/<baseline-id>/` 下生成:
84
+ ### 4. Baseline Change Package
83
85
 
84
- | 产物 | 说明 |
85
- |------|------|
86
- | `proposal.md` | 基线范围、In/Out、风险 |
87
- | `design.md` | 现状盘点(capability inventory) |
88
- | `specs/<cap>/spec.md` | 基线 spec deltas(ADDED 为主) |
89
- | `verification.md` | 最小验证锚点计划 |
86
+ Generate in `<change-root>/<baseline-id>/`:
87
+
88
+ | Artifact | Description |
89
+ |----------|-------------|
90
+ | `proposal.md` | Baseline scope, In/Out, risks |
91
+ | `design.md` | Current state inventory (capability inventory) |
92
+ | `specs/<cap>/spec.md` | Baseline spec deltas (mainly ADDED) |
93
+ | `verification.md` | Minimum verification anchor plan |
90
94
 
91
95
  ---
92
96
 
93
- ## COD 模型生成(Code Overview & Dependencies
97
+ ## COD Model Generation (Code Overview & Dependencies)
98
+
99
+ Automatically generate project's "code map" during initialization (requires CKB MCP Server available, otherwise skip):
100
+
101
+ ### Auto-generated Artifacts
102
+
103
+ | Artifact | Path | Data Source |
104
+ |----------|------|-------------|
105
+ | **C4 Architecture Map** | `<truth-root>/architecture/c4.md` | Comprehensive analysis |
106
+ | Module dependency graph | `<truth-root>/architecture/module-graph.md` | `mcp__ckb__getArchitecture` |
107
+ | Technical debt hotspots | `<truth-root>/architecture/hotspots.md` | `mcp__ckb__getHotspots` |
108
+ | Domain concepts | `<truth-root>/_meta/key-concepts.md` | `mcp__ckb__listKeyConcepts` |
109
+ | Project profile | `<truth-root>/_meta/project-profile.md` | Comprehensive analysis |
110
+
111
+ ### C4 Architecture Map Generation Rules
112
+
113
+ C4 map generated during initialization should include:
114
+
115
+ 1. **Context Level**: System's relationship with external actors (users, external systems)
116
+ 2. **Container Level**: Containers within the system (applications, databases, services)
117
+ 3. **Component Level**: Components within main containers (modules, classes)
118
+
119
+ **Output Format**:
120
+
121
+ ```markdown
122
+ # C4 Architecture Map
94
123
 
95
- 在初始化时自动生成项目的"代码地图"(需要 CKB MCP Server 可用,否则跳过):
124
+ ## System Context
96
125
 
97
- ### 自动生成产物
126
+ [Describe system boundaries and external interactions]
98
127
 
99
- | 产物 | 路径 | 数据来源 |
100
- |------|------|----------|
101
- | 模块依赖图 | `<truth-root>/architecture/module-graph.md` | `mcp__ckb__getArchitecture` |
102
- | 技术债热点 | `<truth-root>/architecture/hotspots.md` | `mcp__ckb__getHotspots` |
103
- | 领域概念 | `<truth-root>/_meta/key-concepts.md` | `mcp__ckb__listKeyConcepts` |
104
- | 项目画像 | `<truth-root>/_meta/project-profile.md` | 综合分析 |
128
+ ## Container Diagram
129
+
130
+ | Container | Tech Stack | Responsibility |
131
+ |-----------|------------|----------------|
132
+ | <name> | <tech> | <responsibility> |
133
+
134
+ ## Component Diagram
135
+
136
+ ### <Container Name>
137
+
138
+ | Component | Responsibility | Dependencies |
139
+ |-----------|----------------|--------------|
140
+ | <name> | <responsibility> | <dependencies> |
141
+
142
+ ## Architecture Guardrails
143
+
144
+ ### Layering Constraints
145
+
146
+ | Layer | Can Depend On | Cannot Depend On |
147
+ |-------|---------------|------------------|
148
+ | <layer> | <allowed> | <forbidden> |
149
+ ```
105
150
 
106
- ### 热点计算公式
151
+ ### Hotspot Calculation Formula
107
152
 
108
153
  ```
109
- 热点分数 = 变更频率 × 圈复杂度
154
+ Hotspot Score = Change Frequency × Cyclomatic Complexity
110
155
  ```
111
156
 
112
- - **高热点**(分数 > 阈值):频繁修改 + 高复杂度 = Bug 密集区
113
- - **休眠债务**(高复杂度 + 低频率):暂时安全但需关注
114
- - **活跃健康**(高频率 + 低复杂度):正常维护区域
157
+ - **High Hotspot** (score > threshold): Frequent changes + high complexity = Bug-dense area
158
+ - **Dormant Debt** (high complexity + low frequency): Temporarily safe but needs attention
159
+ - **Active Healthy** (high frequency + low complexity): Normal maintenance area
115
160
 
116
- ### 边界识别
161
+ ### Boundary Identification
117
162
 
118
- 自动区分:
119
- - **用户代码**:`src/`、`lib/`、`app/` 等(可修改)
120
- - **库代码**:`node_modules/`、`vendor/`、`.venv/` 等(不可变接口)
121
- - **生成代码**:`dist/`、`build/`、`*.generated.*` 等(禁止手动修改)
163
+ Automatically distinguish:
164
+ - **User Code**: `src/`, `lib/`, `app/` etc. (modifiable)
165
+ - **Library Code**: `node_modules/`, `vendor/`, `.venv/` etc. (immutable interface)
166
+ - **Generated Code**: `dist/`, `build/`, `*.generated.*` etc. (manual modification prohibited)
122
167
 
123
- ### 执行流程
168
+ ### Execution Flow
124
169
 
125
- 1) **检查图索引**:调用 `mcp__ckb__getStatus`
126
- - SCIP 可用使用图基分析
127
- - 若不可用提示生成索引或使用 Git 历史分析
170
+ 1) **Check Graph Index**: Call `mcp__ckb__getStatus`
171
+ - If SCIP availableUse graph-based analysis
172
+ - If unavailable Prompt to generate index or use Git history analysis
128
173
 
129
- 2) **生成 COD 产物**:
174
+ 2) **Generate COD Artifacts**:
130
175
  ```bash
131
- # 获取模块架构
176
+ # Get module architecture
132
177
  mcp__ckb__getArchitecture(depth=2, includeExternalDeps=false)
133
178
 
134
- # 获取热点(近 30 天)
179
+ # Get hotspots (last 30 days)
135
180
  mcp__ckb__getHotspots(limit=20)
136
181
 
137
- # 获取领域概念
182
+ # Get domain concepts
138
183
  mcp__ckb__listKeyConcepts(limit=12)
139
184
  ```
140
185
 
141
- 3) **生成项目画像**:整合以上数据 + 传统分析
186
+ 3) **Generate Project Profile**: Integrate above data + traditional analysis
142
187
 
143
- ## 参考骨架与模板
188
+ ## Reference Scaffolds and Templates
144
189
 
145
- - 工作流:`references/存量项目初始化.md`
146
- - 代码导航策略:`references/代码导航策略.md`
147
- - **项目画像模板(三层架构)**:`templates/project-profile-template.md`
148
- - 一次性提示词:`references/存量项目初始化提示词.md`
149
- - 模板(按需):`references/术语表模板.md`
190
+ - Workflow: `references/brownfield-bootstrap.md`
191
+ - Code navigation strategy: `references/code-navigation-strategy.md`
192
+ - **Project profile template (three-layer architecture)**: `templates/project-profile-template.md`
193
+ - One-time prompt: `references/brownfield-bootstrap-prompt.md`
194
+ - Template (as needed): `references/glossary-template.md`
150
195
 
151
196
  ---
152
197
 
153
- ## 上下文感知
198
+ ## Context Awareness
154
199
 
155
- Skill 在执行前自动检测上下文,选择合适的初始化范围。
200
+ This Skill automatically detects context before execution and selects the appropriate initialization scope.
156
201
 
157
- 检测规则参考:`skills/_shared/context-detection-template.md`
202
+ Detection rules reference: `skills/_shared/context-detection-template.md`
158
203
 
159
- ### 检测流程
204
+ ### Detection Flow
160
205
 
161
- 1. 检测 `<devbooks-root>/constitution.md` 是否存在
162
- 2. 检测 `<devbooks-root>/project.md` 是否存在
163
- 3. 检测 `<truth-root>/` 是否为空或基本为空
164
- 4. 检测 CKB 索引是否可用
165
- 5. 检测项目规模和语言栈
206
+ 1. Detect if `<devbooks-root>/constitution.md` exists
207
+ 2. Detect if `<devbooks-root>/project.md` exists
208
+ 3. Detect if `<truth-root>/` is empty or basically empty
209
+ 4. Detect if CKB index is available
210
+ 5. Detect project scale and language stack
166
211
 
167
- ### Skill 支持的模式
212
+ ### Modes Supported by This Skill
168
213
 
169
- | 模式 | 触发条件 | 行为 |
170
- |------|----------|------|
171
- | **全新初始化** | devbooks-root 不存在或为空 | 创建完整目录结构 + constitution + project + 画像 |
172
- | **补充配置** | constitution/project 缺失 | 只补充缺失的配置文件 |
173
- | **完整初始化** | truth-root 为空 | 生成所有基础产物(画像/基线/验证) |
174
- | **增量初始化** | truth-root 部分存在 | 只补充缺失产物 |
175
- | **增强模式** | CKB 索引可用 | 使用图分析生成更精确的画像 |
176
- | **基础模式** | CKB 索引不可用 | 使用传统分析方法 |
214
+ | Mode | Trigger Condition | Behavior |
215
+ |------|-------------------|----------|
216
+ | **Full New Init** | devbooks-root doesn't exist or is empty | Create complete directory structure + constitution + project + profile |
217
+ | **Supplement Config** | constitution/project missing | Only supplement missing configuration files |
218
+ | **Complete Init** | truth-root is empty | Generate all basic artifacts (profile/baseline/verification) |
219
+ | **Incremental Init** | truth-root partially exists | Only supplement missing artifacts |
220
+ | **Enhanced Mode** | CKB index available | Use graph analysis to generate more precise profile |
221
+ | **Basic Mode** | CKB index unavailable | Use traditional analysis methods |
177
222
 
178
- ### 检测输出示例
223
+ ### Detection Output Example
179
224
 
180
225
  ```
181
- 检测结果:
182
- - devbooks-root:存在
183
- - constitution.md:不存在将创建
184
- - project.md:不存在将创建
185
- - truth-root:为空
186
- - CKB 索引:可用
187
- - 项目规模:中型(~50K LOC
188
- - 运行模式:补充配置 + 完整初始化 + 增强模式
226
+ Detection Results:
227
+ - devbooks-root: Exists
228
+ - constitution.md: Doesn't exist Will create
229
+ - project.md: Doesn't exist Will create
230
+ - truth-root: Empty
231
+ - CKB index: Available
232
+ - Project scale: Medium (~50K LOC)
233
+ - Running mode: Supplement Config + Complete Init + Enhanced Mode
189
234
  ```
190
235
 
191
236
  ---
192
237
 
193
- ## MCP 增强
238
+ ## MCP Enhancement
194
239
 
195
- Skill 支持 MCP 运行时增强,自动检测并启用高级功能。
240
+ This Skill supports MCP runtime enhancement, automatically detecting and enabling advanced features.
196
241
 
197
- MCP 增强规则参考:`skills/_shared/mcp-enhancement-template.md`
242
+ MCP enhancement rules reference: `skills/_shared/mcp-enhancement-template.md`
198
243
 
199
- ### 依赖的 MCP 服务
244
+ ### Required MCP Services
200
245
 
201
- | 服务 | 用途 | 超时 |
202
- |------|------|------|
203
- | `mcp__ckb__getStatus` | 检测 CKB 索引可用性 | 2s |
204
- | `mcp__ckb__getArchitecture` | 获取模块依赖图 | 2s |
205
- | `mcp__ckb__getHotspots` | 获取技术债热点 | 2s |
206
- | `mcp__ckb__listKeyConcepts` | 获取领域概念 | 2s |
207
- | `mcp__ckb__getModuleOverview` | 获取模块概览 | 2s |
246
+ | Service | Purpose | Timeout |
247
+ |---------|---------|---------|
248
+ | `mcp__ckb__getStatus` | Detect CKB index availability | 2s |
249
+ | `mcp__ckb__getArchitecture` | Get module dependency graph | 2s |
250
+ | `mcp__ckb__getHotspots` | Get technical debt hotspots | 2s |
251
+ | `mcp__ckb__listKeyConcepts` | Get domain concepts | 2s |
252
+ | `mcp__ckb__getModuleOverview` | Get module overview | 2s |
208
253
 
209
- ### 检测流程
254
+ ### Detection Flow
210
255
 
211
- 1. 调用 `mcp__ckb__getStatus`(2s 超时)
212
- 2. CKB 可用使用图基分析生成 COD 产物
213
- 3. 若超时或失败降级到传统分析(Git 历史 + 文件统计)
256
+ 1. Call `mcp__ckb__getStatus` (2s timeout)
257
+ 2. If CKB availableUse graph-based analysis to generate COD artifacts
258
+ 3. If timeout or failure Degrade to traditional analysis (Git history + file statistics)
214
259
 
215
- ### 增强模式 vs 基础模式
260
+ ### Enhanced Mode vs Basic Mode
216
261
 
217
- | 功能 | 增强模式 | 基础模式 |
218
- |------|----------|----------|
219
- | 模块依赖图 | CKB getArchitecture | 目录结构推断 |
220
- | 技术债热点 | CKB getHotspots | Git log 统计 |
221
- | 领域概念 | CKB listKeyConcepts | 命名分析 |
222
- | 边界识别 | 精确模块边界 | 目录约定 |
262
+ | Feature | Enhanced Mode | Basic Mode |
263
+ |---------|---------------|------------|
264
+ | Module dependency graph | CKB getArchitecture | Directory structure inference |
265
+ | Technical debt hotspots | CKB getHotspots | Git log statistics |
266
+ | Domain concepts | CKB listKeyConcepts | Naming analysis |
267
+ | Boundary identification | Precise module boundaries | Directory conventions |
223
268
 
224
- ### 降级提示
269
+ ### Degradation Notice
225
270
 
226
- MCP 不可用时,输出以下提示:
271
+ When MCP is unavailable, output the following notice:
227
272
 
228
273
  ```
229
- ⚠️ CKB 不可用,使用传统分析方法生成项目画像。
230
- 如需更精确的架构分析,请运行 devbooks-index-bootstrap skill 生成索引。
274
+ Warning: CKB unavailable, using traditional analysis methods to generate project profile.
275
+ For more precise architecture analysis, run devbooks-index-bootstrap skill to generate index.
231
276
  ```
@@ -6,7 +6,8 @@ Goal: One-time completion of "project profile and conventions + baseline specs"
6
6
 
7
7
  Core principles:
8
8
  - **Do not try to document the whole system at once**: start with external-facing surfaces (API/CLI/events/config/Schema), then fill internal core later.
9
- - **Evidence first**: every spec item must point to code/tests/logs/runtime behavior; if unsure, write `TBD` + a verification plan.
9
+ - **Evidence first**: every spec item must point to code/tests/logs/runtime behavior.
10
+ - **TBD policy**: `spec.md` forbids TBD/TODO (gates will reject); unknown items must go into `verification.md` Open Questions or MANUAL verification tasks with a specific verification plan.
10
11
  - **Stabilize current behavior before refactoring**: the baseline phase should avoid behavioral change; do not "patch specs while changing behavior" and drift the truth source.
11
12
 
12
13
  ---
@@ -60,7 +61,7 @@ In `<change-root>/<baseline-id>/specs/<capability>/spec.md`, write **current-sta
60
61
  - Requirements/Scenarios must be observable (inputs/outputs/error semantics/invariants)
61
62
 
62
63
  Notes:
63
- - If uncertain, write `TBD` and add a verification action to the plan section of `verification.md` (do not guess).
64
+ - If uncertain: **do not write TBD in spec.md**; add a verification action to `verification.md` Open Questions or MANUAL verification tasks (with a verification plan).
64
65
  - If you find obvious bugs, do not fix them during baseline; create a separate change for fixes (avoid mixing behavior changes into baseline).
65
66
 
66
67
  ---
@@ -18,8 +18,8 @@ tools:
18
18
  Before execution, **must** search for configuration in the following order (stop when found):
19
19
  1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
20
20
  2. `dev-playbooks/project.md` (if exists) -> DevBooks 2.0 protocol, use default mappings
21
- 4. `project.md` (if exists) -> template protocol, use default mappings
22
- 5. If still undetermined -> **Stop and ask user**
21
+ 3. `project.md` (if exists) -> template protocol, use default mappings
22
+ 4. If still undetermined -> **Stop and ask user**
23
23
 
24
24
  **Key Constraints**:
25
25
  - If configuration specifies `agents_doc` (rules document), **must read that document first** before executing any operations
@@ -35,7 +35,7 @@ Before execution, **must** search for configuration in the following order (stop
35
35
  - Code formatting
36
36
 
37
37
  ### 2. Dependency Health Review
38
- - Layer constraint compliance (see devbooks-c4-map)
38
+ - Layer constraint compliance (see `<truth-root>/architecture/c4.md`)
39
39
  - Circular dependency detection
40
40
  - Internal module encapsulation (prohibit deep imports of *Internal files)
41
41
  - Dependency direction correctness
@@ -98,3 +98,8 @@ Output format:
98
98
  2) Maintainability risks (recommended)
99
99
  3) Style & consistency suggestions (optional)
100
100
  4) If new quality gates are needed (lint/complexity/dependency rules), propose them concretely
101
+ 5) **Provide an explicit verdict**:
102
+ - ✅ **APPROVED**: Code quality meets standards, ready to merge
103
+ - ⚠️ **APPROVED WITH COMMENTS**: Can merge but recommend follow-up improvements (list specific items)
104
+ - 🔄 **REQUEST CHANGES**: Requires fixes before re-review (list must-fix items)
105
+ - ❌ **REJECTED**: Serious issues or design flaws, needs to return to design phase
@@ -83,6 +83,8 @@ Inspired by VS Code’s `.github/pull_request_template.md`, this document define
83
83
  | L | 500–1000 | 2+ hours | Consider splitting |
84
84
  | XL | > 1000 | half day+ | **Must split** |
85
85
 
86
+ **Note**: Line count is a **review cost signal**, not a hard structural splitting rule. When splitting would harm module cohesion, distort boundaries, or create duplication, exceeding is allowed but should be explained.
87
+
86
88
  Principle: one PR does one thing; keep it atomic.
87
89
 
88
90
  ---
@@ -20,7 +20,7 @@ tools:
20
20
  Before execution, you **must** search for configuration in the following order (stop when found):
21
21
  1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
22
22
  2. `dev-playbooks/project.md` (if exists) -> DevBooks 2.0 protocol, use default mappings
23
- 4. `project.md` (if exists) -> template protocol, use default mappings
23
+ 3. `project.md` (if exists) -> template protocol, use default mappings
24
24
  5. If still unable to determine -> **Stop and ask the user**
25
25
 
26
26
  **Key Constraints**:
@@ -23,7 +23,7 @@ Hard constraints (must follow):
23
23
 
24
24
  Quality gates (must execute):
25
25
  - Run tests/static checks related to the change; retain failure outputs as fix evidence.
26
- - Fix in small steps: each change focuses on one plan item, **single commit < 200 lines**.
26
+ - Fix in small steps: each change focuses on one plan item, **default target: single commit 200 lines**; if structural integrity requires exceeding, explain in commit message or PR, and ensure acceptance anchors cover the change and commit sequence is rollbackable.
27
27
  - Avoid smells: long functions (P95 < 50 lines), deep nesting, duplicate logic, implicit dependencies, cycles, excessive coupling, cross-layer calls.
28
28
  - If lint/complexity/dependency rules exist, comply; if not, state "recommended quality gates to add."
29
29
 
@@ -20,8 +20,8 @@ tools:
20
20
  Before execution, **must** search for configuration in the following order (stop when found):
21
21
  1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
22
22
  2. `dev-playbooks/project.md` (if exists) -> DevBooks 2.0 protocol, use default mappings
23
- 4. `project.md` (if exists) -> template protocol, use default mappings
24
- 5. If still undetermined -> **Stop and ask the user**
23
+ 3. `project.md` (if exists) -> template protocol, use default mappings
24
+ 4. If still undetermined -> **Stop and ask the user**
25
25
 
26
26
  **Key Constraints**:
27
27
  - If `agents_doc` (rules document) is specified in configuration, **must read that document first** before executing any operations
@@ -19,8 +19,8 @@ tools:
19
19
  Before execution, you **must** search for configuration in the following order (stop when found):
20
20
  1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
21
21
  2. `dev-playbooks/project.md` (if exists) → DevBooks 2.0 protocol, use default mappings
22
- 4. `project.md` (if exists) → Template protocol, use default mappings
23
- 5. If still undetermined → **Stop and ask the user**
22
+ 3. `project.md` (if exists) → Template protocol, use default mappings
23
+ 4. If still undetermined → **Stop and ask the user**
24
24
 
25
25
  **Key Constraints**:
26
26
  - If `agents_doc` (rules document) is specified in configuration, **you must read that document first** before executing any operations