dev-playbooks 2.2.0 → 2.3.0
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.
- package/CHANGELOG.md +242 -0
- package/README.md +133 -462
- package/bin/devbooks.js +42 -4
- package/package.json +2 -1
- package/scripts/config-discovery.sh +1 -1
- package/scripts/detect-mcp.sh +86 -0
- package/skills/Skill-Development-Guide.md +1 -2
- package/skills/_shared/mcp-enhancement-template-mcp-enhancement.md +30 -113
- package/skills/_shared/references/completeness-thinking-framework.md +86 -0
- package/skills/_shared/references/human-advice-calibration-prompt.md +27 -0
- package/skills/devbooks-archiver/SKILL.md +20 -12
- package/skills/devbooks-archiver/references/archiver-prompt.md +66 -38
- package/skills/devbooks-brownfield-bootstrap/SKILL.md +32 -65
- package/skills/devbooks-coder/SKILL.md +61 -240
- package/skills/devbooks-coder/references/completion-status-and-routing.md +8 -8
- package/skills/devbooks-convergence-audit/SKILL.md +20 -0
- package/skills/devbooks-delivery-workflow/SKILL.md +26 -227
- package/skills/devbooks-delivery-workflow/references/orchestration-bans-and-stage-table.md +45 -0
- package/skills/devbooks-design-backport/SKILL.md +16 -3
- package/skills/devbooks-design-doc/SKILL.md +21 -9
- package/skills/devbooks-docs-consistency/SKILL.md +170 -0
- package/skills/devbooks-docs-consistency/references/completeness-dimensions.yaml +31 -0
- package/skills/devbooks-docs-consistency/references/doc-classification.yaml +11 -0
- package/skills/devbooks-docs-consistency/references/docs-rules-schema.yaml +11 -0
- package/skills/devbooks-docs-consistency/scripts/alias.sh +5 -0
- package/skills/devbooks-docs-consistency/scripts/completeness-checker.sh +153 -0
- package/skills/devbooks-docs-consistency/scripts/doc-classifier.sh +121 -0
- package/skills/devbooks-docs-consistency/scripts/git-adapter.sh +32 -0
- package/skills/devbooks-docs-consistency/scripts/rules-engine.sh +255 -0
- package/skills/devbooks-docs-consistency/scripts/scanner.sh +93 -0
- package/skills/devbooks-docs-consistency/scripts/style-checker.sh +123 -0
- package/skills/devbooks-docs-sync/SKILL.md +23 -318
- package/skills/devbooks-entropy-monitor/SKILL.md +15 -32
- package/skills/devbooks-impact-analysis/SKILL.md +26 -46
- package/skills/devbooks-implementation-plan/SKILL.md +23 -9
- package/skills/devbooks-proposal-author/SKILL.md +21 -15
- package/skills/devbooks-proposal-challenger/SKILL.md +16 -3
- package/skills/devbooks-proposal-judge/SKILL.md +16 -3
- package/skills/devbooks-reviewer/SKILL.md +23 -42
- package/skills/devbooks-router/SKILL.md +22 -356
- package/skills/devbooks-router/references/routing-rules-and-templates.md +120 -0
- package/skills/devbooks-spec-contract/SKILL.md +23 -39
- package/skills/devbooks-test-owner/SKILL.md +68 -309
- package/skills/devbooks-test-reviewer/SKILL.md +15 -5
|
@@ -61,7 +61,8 @@ Generate in `<truth-root>/_meta/`:
|
|
|
61
61
|
|----------|------|-------------|
|
|
62
62
|
| Project profile | `_meta/project-profile.md` | Detailed technical profile with three-layer architecture |
|
|
63
63
|
| Glossary | `_meta/glossary.md` | Unified language table (optional but recommended) |
|
|
64
|
-
|
|
|
64
|
+
| Documentation maintenance metadata | `_meta/docs-maintenance.md` | Documentation style and maintenance configuration |
|
|
65
|
+
| Domain concepts | `_meta/key-concepts.md` | Concept extraction based on code semantics (optional) |
|
|
65
66
|
|
|
66
67
|
### 3. Architecture Analysis Artifacts
|
|
67
68
|
|
|
@@ -69,9 +70,9 @@ Generate in `<truth-root>/architecture/`:
|
|
|
69
70
|
|
|
70
71
|
| Artifact | Path | Data Source |
|
|
71
72
|
|----------|------|-------------|
|
|
72
|
-
| **C4 Architecture Map** | `architecture/c4.md` | Comprehensive analysis
|
|
73
|
-
| Module dependency graph | `architecture/module-graph.md` |
|
|
74
|
-
| Technical debt hotspots | `architecture/hotspots.md` |
|
|
73
|
+
| **C4 Architecture Map** | `architecture/c4.md` | Comprehensive analysis (optionally with structured capability) |
|
|
74
|
+
| Module dependency graph | `architecture/module-graph.md` | Structured dependency analysis (optional) |
|
|
75
|
+
| Technical debt hotspots | `architecture/hotspots.md` | Change history + complexity analysis (optional) |
|
|
75
76
|
| Layering constraints | `architecture/layering-constraints.md` | Code analysis (optional) |
|
|
76
77
|
|
|
77
78
|
> **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 archiver during archiving.
|
|
@@ -91,16 +92,16 @@ Generate in `<change-root>/<baseline-id>/`:
|
|
|
91
92
|
|
|
92
93
|
## COD Model Generation (Code Overview & Dependencies)
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
Optionally generate the project's "code map" during initialization, based on available structured code analysis capability:
|
|
95
96
|
|
|
96
97
|
### Auto-generated Artifacts
|
|
97
98
|
|
|
98
99
|
| Artifact | Path | Data Source |
|
|
99
100
|
|----------|------|-------------|
|
|
100
101
|
| **C4 Architecture Map** | `<truth-root>/architecture/c4.md` | Comprehensive analysis |
|
|
101
|
-
| Module dependency graph | `<truth-root>/architecture/module-graph.md` |
|
|
102
|
-
| Technical debt hotspots | `<truth-root>/architecture/hotspots.md` |
|
|
103
|
-
| Domain concepts | `<truth-root>/_meta/key-concepts.md` |
|
|
102
|
+
| Module dependency graph | `<truth-root>/architecture/module-graph.md` | Structured dependency analysis (optional) |
|
|
103
|
+
| Technical debt hotspots | `<truth-root>/architecture/hotspots.md` | Change history + complexity analysis (optional) |
|
|
104
|
+
| Domain concepts | `<truth-root>/_meta/key-concepts.md` | Code semantic concept extraction (optional) |
|
|
104
105
|
| Project profile | `<truth-root>/_meta/project-profile.md` | Comprehensive analysis |
|
|
105
106
|
|
|
106
107
|
### C4 Architecture Map Generation Rules
|
|
@@ -162,23 +163,9 @@ Automatically distinguish:
|
|
|
162
163
|
|
|
163
164
|
### Execution Flow
|
|
164
165
|
|
|
165
|
-
1) **Check
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
2) **Generate COD Artifacts**:
|
|
170
|
-
```bash
|
|
171
|
-
# Get module architecture
|
|
172
|
-
mcp__ckb__getArchitecture(depth=2, includeExternalDeps=false)
|
|
173
|
-
|
|
174
|
-
# Get hotspots (last 30 days)
|
|
175
|
-
mcp__ckb__getHotspots(limit=20)
|
|
176
|
-
|
|
177
|
-
# Get domain concepts
|
|
178
|
-
mcp__ckb__listKeyConcepts(limit=12)
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
3) **Generate Project Profile**: Integrate above data + traditional analysis
|
|
166
|
+
1) **Check available capability**: confirm structured code analysis capability (such as dependency or reference tracking).
|
|
167
|
+
2) **Generate COD artifacts**: use available code search, reference tracking, and change history analysis to produce dependency graphs, hotspots, and concepts.
|
|
168
|
+
3) **Generate project profile**: integrate the above data with traditional analysis.
|
|
182
169
|
|
|
183
170
|
## Reference Scaffolds and Templates
|
|
184
171
|
|
|
@@ -201,7 +188,7 @@ Detection rules reference: `skills/_shared/context-detection-template-context-de
|
|
|
201
188
|
1. Detect if `<devbooks-root>/constitution.md` exists
|
|
202
189
|
2. Detect if `<devbooks-root>/project.md` exists
|
|
203
190
|
3. Detect if `<truth-root>/` is empty or basically empty
|
|
204
|
-
4. Detect
|
|
191
|
+
4. Detect whether structured analysis capability is available
|
|
205
192
|
5. Detect project scale and language stack
|
|
206
193
|
|
|
207
194
|
### Modes Supported by This Skill
|
|
@@ -212,8 +199,8 @@ Detection rules reference: `skills/_shared/context-detection-template-context-de
|
|
|
212
199
|
| **Supplement Config** | constitution/project missing | Only supplement missing configuration files |
|
|
213
200
|
| **Complete Init** | truth-root is empty | Generate all basic artifacts (profile/baseline/verification) |
|
|
214
201
|
| **Incremental Init** | truth-root partially exists | Only supplement missing artifacts |
|
|
215
|
-
| **
|
|
216
|
-
| **
|
|
202
|
+
| **Structured Analysis** | Structured capability available | Use dependency/reference tracking to refine the profile |
|
|
203
|
+
| **Text Analysis** | Only text search available | Use traditional analysis methods |
|
|
217
204
|
|
|
218
205
|
### Detection Output Example
|
|
219
206
|
|
|
@@ -223,49 +210,29 @@ Detection Results:
|
|
|
223
210
|
- constitution.md: Doesn't exist → Will create
|
|
224
211
|
- project.md: Doesn't exist → Will create
|
|
225
212
|
- truth-root: Empty
|
|
226
|
-
-
|
|
213
|
+
- Structured capability: Available
|
|
227
214
|
- Project scale: Medium (~50K LOC)
|
|
228
|
-
- Running mode: Supplement Config + Complete Init +
|
|
215
|
+
- Running mode: Supplement Config + Complete Init + Structured Analysis
|
|
229
216
|
```
|
|
230
217
|
|
|
231
218
|
---
|
|
232
219
|
|
|
233
|
-
## MCP Enhancement
|
|
234
|
-
|
|
235
|
-
This Skill supports MCP runtime enhancement, automatically detecting and enabling advanced features.
|
|
236
|
-
|
|
237
|
-
MCP enhancement rules reference: `skills/_shared/mcp-enhancement-template-mcp-enhancement.md`
|
|
238
|
-
|
|
239
|
-
### Required MCP Services
|
|
240
220
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
221
|
+
## Progressive Disclosure
|
|
222
|
+
### Base (Required)
|
|
223
|
+
Goal: Clarify this Skill's core outputs and usage scope.
|
|
224
|
+
Inputs: User goals, existing documents, change package context, or project path.
|
|
225
|
+
Outputs: Executable artifacts, next-step guidance, or recorded paths.
|
|
226
|
+
Boundaries: Does not replace other roles; does not touch `tests/`.
|
|
227
|
+
Evidence: Reference output paths or execution records.
|
|
248
228
|
|
|
249
|
-
###
|
|
250
|
-
|
|
251
|
-
1. Call `mcp__ckb__getStatus` (2s timeout)
|
|
252
|
-
2. If CKB available → Use graph-based analysis to generate COD artifacts
|
|
253
|
-
3. If timeout or failure → Degrade to traditional analysis (Git history + file statistics)
|
|
254
|
-
|
|
255
|
-
### Enhanced Mode vs Basic Mode
|
|
256
|
-
|
|
257
|
-
| Feature | Enhanced Mode | Basic Mode |
|
|
258
|
-
|---------|---------------|------------|
|
|
259
|
-
| Module dependency graph | CKB getArchitecture | Directory structure inference |
|
|
260
|
-
| Technical debt hotspots | CKB getHotspots | Git log statistics |
|
|
261
|
-
| Domain concepts | CKB listKeyConcepts | Naming analysis |
|
|
262
|
-
| Boundary identification | Precise module boundaries | Directory conventions |
|
|
229
|
+
### Advanced (Optional)
|
|
230
|
+
Use when you need to refine strategy, boundaries, or risk notes.
|
|
263
231
|
|
|
264
|
-
###
|
|
232
|
+
### Extended (Optional)
|
|
233
|
+
Use when you need to coordinate with external systems or optional tools.
|
|
265
234
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
For more precise architecture analysis, manually generate SCIP index.
|
|
271
|
-
```
|
|
235
|
+
## Recommended MCP Capability Types
|
|
236
|
+
- Code search (code-search)
|
|
237
|
+
- Reference tracking (reference-tracking)
|
|
238
|
+
- Impact analysis (impact-analysis)
|
|
@@ -12,256 +12,77 @@ allowed-tools:
|
|
|
12
12
|
|
|
13
13
|
# DevBooks: Implementation Lead (Coder)
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Progressive Disclosure
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
### Base (Required)
|
|
18
|
+
Goal: Implement only what is specified in `tasks.md` and produce Green evidence.
|
|
19
|
+
Inputs: user goal, `tasks.md`, project codebase, change package context.
|
|
20
|
+
Outputs: implementation changes, updated `tasks.md`, Green evidence logs under `evidence/green-final/`.
|
|
21
|
+
Boundaries: do not modify `tests/**`; do not edit `verification.md` or the AC matrix.
|
|
22
|
+
Evidence: reference gate outputs and log paths.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
### Advanced (Optional)
|
|
25
|
+
Use when you need: risk notes, minimal-diff planning, deviation recording.
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
↓ ↓
|
|
28
|
-
Implement+fast-track Evidence audit+check off
|
|
29
|
-
(@smoke/@critical) (no @full rerun)
|
|
30
|
-
```
|
|
27
|
+
### Extended (Optional)
|
|
28
|
+
Use when you need: faster search/impact via optional MCP capabilities.
|
|
31
29
|
|
|
32
|
-
##
|
|
30
|
+
## Recommended MCP Capability Types
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
| Coder runs full tests and waits for results | Coder runs fast-track (`@smoke`/`@critical`), `@full` triggered async | Fast iteration |
|
|
38
|
-
| Directly hand to Test Owner after completion | Status becomes `Implementation Done` after completion, wait for @full | Async doesn't block, archive syncs |
|
|
32
|
+
- Code search (code-search)
|
|
33
|
+
- Reference tracking (reference-tracking)
|
|
34
|
+
- Impact analysis (impact-analysis)
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Prerequisites: Configuration Discovery
|
|
43
|
-
|
|
44
|
-
Before execution, **must** search for configuration in the following order (stop when found):
|
|
45
|
-
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
46
|
-
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol
|
|
47
|
-
3. `project.md` (if exists) → Template protocol
|
|
48
|
-
4. If still unable to determine → **Stop and ask user**
|
|
49
|
-
|
|
50
|
-
**Key Constraints**:
|
|
51
|
-
- If `agents_doc` (rules document) is specified in configuration, **must read that document first** before performing any operations
|
|
52
|
-
- Do not guess directory roots
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## 📚 Reference Documentation
|
|
57
|
-
|
|
58
|
-
### Must Read (Read Immediately)
|
|
59
|
-
|
|
60
|
-
1. **AI Behavior Guidelines**: `~/.claude/skills/_shared/references/ai-behavior-guidelines.md`
|
|
61
|
-
- Verifiability gating, structural quality gating, completeness gating
|
|
62
|
-
- Foundation rules for all skills
|
|
63
|
-
|
|
64
|
-
2. **Code Implementation Prompt**: `references/code-implementation-prompt.md`
|
|
65
|
-
- Complete code implementation guide
|
|
66
|
-
- Strictly follow this prompt
|
|
67
|
-
|
|
68
|
-
### Read as Needed
|
|
69
|
-
|
|
70
|
-
3. **Test Execution Strategy**: `references/test-execution-strategy.md`
|
|
71
|
-
- @smoke/@critical/@full label details
|
|
72
|
-
- Async vs sync boundaries
|
|
73
|
-
- When to read: When needing to understand test run strategy
|
|
74
|
-
|
|
75
|
-
4. **Completion Status and Routing**: `references/completion-status-and-routing.md`
|
|
76
|
-
- Completion status classification (MECE)
|
|
77
|
-
- Routing output template
|
|
78
|
-
- When to read: When outputting status upon task completion
|
|
79
|
-
|
|
80
|
-
5. **Hotspot Awareness and Risk Assessment**: `references/hotspot-awareness-and-risk-assessment.md`
|
|
81
|
-
- MCP enhancement features
|
|
82
|
-
- Hotspot file warnings
|
|
83
|
-
- When to read: When needing risk assessment
|
|
84
|
-
|
|
85
|
-
6. **Low Risk Modification Techniques**: `references/low-risk-modification-techniques.md`
|
|
86
|
-
- Safe refactoring techniques
|
|
87
|
-
- When to read: When needing refactoring
|
|
88
|
-
|
|
89
|
-
7. **Coding Style Guidelines**: `references/coding-style-guidelines.md`
|
|
90
|
-
- Code style specifications
|
|
91
|
-
- When to read: When uncertain about code style
|
|
92
|
-
|
|
93
|
-
8. **Logging Standard**: `references/logging-standard.md`
|
|
94
|
-
- Log levels and formats
|
|
95
|
-
- When to read: When needing to add logs
|
|
96
|
-
|
|
97
|
-
9. **Error Code Standard**: `references/error-code-standard.md`
|
|
98
|
-
- Error code design
|
|
99
|
-
- When to read: When needing to define error codes
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Core Workflow
|
|
104
|
-
|
|
105
|
-
### 1. Resume from Checkpoint
|
|
106
|
-
|
|
107
|
-
**Must** execute before each start:
|
|
108
|
-
|
|
109
|
-
1. **Read progress**: Open `<change-root>/<change-id>/tasks.md`, identify checked `- [x]` tasks
|
|
110
|
-
2. **Locate resume point**: Find first `- [ ]` after "last `[x]`"
|
|
111
|
-
3. **Output confirmation**: Clearly inform user of current progress, e.g.:
|
|
112
|
-
```
|
|
113
|
-
Detected T1-T6 completed (6/10), continuing from T7.
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### 2. Real-time Progress Updates
|
|
117
|
-
|
|
118
|
-
> **Core Principle**: Complete one task, check off one immediately. Don't wait until all complete to batch check.
|
|
119
|
-
|
|
120
|
-
**Check-off Timing**:
|
|
121
|
-
|
|
122
|
-
| Timing | Action |
|
|
123
|
-
|--------|--------|
|
|
124
|
-
| Code writing complete | Don't check yet |
|
|
125
|
-
| Compilation passes | Don't check yet |
|
|
126
|
-
| Related tests pass | **Check immediately** |
|
|
127
|
-
| Multiple tasks complete together | Check one by one, don't batch |
|
|
128
|
-
|
|
129
|
-
### 3. Implement Code
|
|
130
|
-
|
|
131
|
-
Strictly follow `references/code-implementation-prompt.md`.
|
|
132
|
-
|
|
133
|
-
### 4. Run Tests
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
# During development: frequently run @smoke
|
|
137
|
-
npm test -- --grep "@smoke"
|
|
138
|
-
|
|
139
|
-
# Before commit: run @critical
|
|
140
|
-
npm test -- --grep "@smoke|@critical"
|
|
141
|
-
|
|
142
|
-
# After commit: CI automatically runs @full (Coder doesn't wait)
|
|
143
|
-
git push # Trigger CI
|
|
144
|
-
```
|
|
36
|
+
## Role Isolation (Mandatory)
|
|
145
37
|
|
|
146
|
-
|
|
38
|
+
- Test Owner and Coder must be separate conversations/instances.
|
|
39
|
+
- Do not switch roles within one conversation.
|
|
40
|
+
- If tests or `verification.md` require changes, hand off to Test Owner.
|
|
147
41
|
|
|
148
|
-
|
|
42
|
+
## Core Responsibilities
|
|
149
43
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
| Allowed | Prohibited |
|
|
157
|
-
|---------|------------|
|
|
158
|
-
| Modify `src/**` code | ❌ Modify `tests/**` |
|
|
159
|
-
| Check off `tasks.md` task items | ❌ Modify `verification.md` |
|
|
160
|
-
| Record deviations to `deviation-log.md` | ❌ Check off AC coverage matrix |
|
|
161
|
-
| Run fast-track tests (`@smoke`/`@critical`) | ❌ Set verification.md Status to Verified/Done |
|
|
162
|
-
| Trigger `@full` tests (CI/background) | ❌ Wait for @full completion (can start next change) |
|
|
163
|
-
|
|
164
|
-
### Code Quality Constraints
|
|
165
|
-
|
|
166
|
-
#### Prohibited Patterns for Commit
|
|
167
|
-
|
|
168
|
-
| Pattern | Detection Command | Reason |
|
|
169
|
-
|---------|-------------------|--------|
|
|
170
|
-
| `test.only` | `rg '\.only\s*\(' src/` | Skips other tests |
|
|
171
|
-
| `console.log` | `rg 'console\.log' src/` | Debug code remnants |
|
|
172
|
-
| `debugger` | `rg 'debugger' src/` | Debug breakpoint remnants |
|
|
173
|
-
| `// TODO` without issue | `rg 'TODO(?!.*#\d+)' src/` | Untraceable todos |
|
|
174
|
-
| `any` type | `rg ': any[^a-z]' src/` | Type safety holes |
|
|
175
|
-
| `@ts-ignore` | `rg '@ts-ignore' src/` | Hides type errors |
|
|
176
|
-
|
|
177
|
-
#### Pre-commit Checks Required
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
# 1. Compilation check (mandatory)
|
|
181
|
-
npm run compile || exit 1
|
|
44
|
+
1. Implement strictly according to `<change-root>/<change-id>/tasks.md`.
|
|
45
|
+
2. Run the gate checks required by the change (tests/build/static checks).
|
|
46
|
+
3. Save Green evidence to `<change-root>/<change-id>/evidence/green-final/`.
|
|
47
|
+
4. Check off tasks only when relevant gates pass.
|
|
48
|
+
5. Record discoveries that require design/spec updates to `deviation-log.md`.
|
|
182
49
|
|
|
183
|
-
|
|
184
|
-
npm run lint || exit 1
|
|
50
|
+
## Hard Boundaries
|
|
185
51
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
# 4. test.only check (mandatory)
|
|
190
|
-
if rg -l '\.only\s*\(' tests/ src/**/test/; then
|
|
191
|
-
echo "error: found .only() in tests" >&2
|
|
192
|
-
exit 1
|
|
193
|
-
fi
|
|
194
|
-
|
|
195
|
-
# 5. Debug code check (mandatory)
|
|
196
|
-
if rg -l 'console\.(log|debug)|debugger' src/ --type ts; then
|
|
197
|
-
echo "error: found debug statements" >&2
|
|
198
|
-
exit 1
|
|
199
|
-
fi
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## Output Management
|
|
205
|
-
|
|
206
|
-
Prevent large outputs from polluting context:
|
|
207
|
-
|
|
208
|
-
| Scenario | Handling |
|
|
209
|
-
|----------|----------|
|
|
210
|
-
| Command output > 50 lines | Keep only first and last 10 lines + middle summary |
|
|
211
|
-
| Test output | Extract key failure info, don't paste full output in dialogue |
|
|
212
|
-
| Log output | Write to disk at `<change-root>/<change-id>/evidence/`, only reference path in dialogue |
|
|
213
|
-
| Large file contents | Reference path, don't inline |
|
|
214
|
-
|
|
215
|
-
---
|
|
52
|
+
- Allowed: implementation code, `tasks.md`, `deviation-log.md`, evidence logs.
|
|
53
|
+
- Prohibited: `tests/**`, edits to `verification.md`, checking off the AC matrix.
|
|
216
54
|
|
|
217
|
-
##
|
|
218
|
-
|
|
219
|
-
**Green evidence must be saved**:
|
|
220
|
-
```
|
|
221
|
-
<change-root>/<change-id>/evidence/green-final/
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
**Correct path examples**:
|
|
225
|
-
```bash
|
|
226
|
-
# Dev-Playbooks default path
|
|
227
|
-
dev-playbooks/changes/<change-id>/evidence/green-final/test-$(date +%Y%m%d-%H%M%S).log
|
|
228
|
-
|
|
229
|
-
# Using script
|
|
230
|
-
devbooks change-evidence <change-id> --label green-final -- npm test
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## Deviation Detection and Persistence
|
|
236
|
-
|
|
237
|
-
**Reference**: `~/.claude/skills/_shared/references/deviation-detection-routing-protocol.md`
|
|
238
|
-
|
|
239
|
-
During implementation, **must immediately** write to `deviation-log.md` in these situations:
|
|
240
|
-
|
|
241
|
-
| Situation | Type | Example |
|
|
242
|
-
|-----------|------|---------|
|
|
243
|
-
| Added functionality not in tasks.md | NEW_FEATURE | Added warmup() method |
|
|
244
|
-
| Modified constraints in design.md | CONSTRAINT_CHANGE | Timeout changed to 60s |
|
|
245
|
-
| Found boundary case not covered by design | DESIGN_GAP | Concurrent write scenario |
|
|
246
|
-
| Public interface inconsistent with design | API_CHANGE | Parameter added |
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## Context Awareness
|
|
251
|
-
|
|
252
|
-
Detection rules reference: `~/.claude/skills/_shared/context-detection-template.md`
|
|
253
|
-
|
|
254
|
-
### Modes Supported by This Skill
|
|
255
|
-
|
|
256
|
-
| Mode | Trigger Condition | Behavior |
|
|
257
|
-
|------|-------------------|----------|
|
|
258
|
-
| **Initial Implementation** | All tasks.md are `[ ]` | Start from MP1.1 |
|
|
259
|
-
| **Resume from Checkpoint** | tasks.md has some `[x]` | Continue from first `[ ]` after last `[x]` |
|
|
260
|
-
| **Gate Fixing** | Test failures need fixing | Prioritize failed items |
|
|
261
|
-
|
|
262
|
-
### Prerequisite Checks
|
|
55
|
+
## Prerequisites: Configuration Discovery
|
|
263
56
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
-
|
|
267
|
-
|
|
57
|
+
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
58
|
+
1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
|
|
59
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
60
|
+
3. `project.md` (if exists) -> Template protocol, use default mappings
|
|
61
|
+
4. If still undetermined -> **Stop and ask the user**
|
|
62
|
+
|
|
63
|
+
If the configuration specifies `agents_doc` (rules document), you **must read that document first** before performing any operations.
|
|
64
|
+
|
|
65
|
+
## Minimal Workflow
|
|
66
|
+
|
|
67
|
+
1. Read `<change-root>/<change-id>/tasks.md` and resume from the first unchecked item.
|
|
68
|
+
2. Implement tasks with a minimal diff.
|
|
69
|
+
3. Run relevant gates; if any gate fails, fix implementation (not tests) and rerun.
|
|
70
|
+
4. Write logs to `evidence/green-final/` and reference them in your output.
|
|
71
|
+
5. Check off completed tasks; do not batch-check.
|
|
72
|
+
6. If you find gaps in design/spec/tasks, write them to `deviation-log.md` and hand off.
|
|
73
|
+
|
|
74
|
+
## References
|
|
75
|
+
|
|
76
|
+
Required:
|
|
77
|
+
- `~/.claude/skills/_shared/references/ai-behavior-guidelines.md`
|
|
78
|
+
- `references/code-implementation-prompt.md`
|
|
79
|
+
|
|
80
|
+
As needed:
|
|
81
|
+
- `references/test-execution-strategy.md`
|
|
82
|
+
- `references/completion-status-and-routing.md`
|
|
83
|
+
- `references/hotspot-awareness-and-risk-assessment.md`
|
|
84
|
+
- `references/low-risk-modification-techniques.md`
|
|
85
|
+
- `references/coding-style-guidelines.md`
|
|
86
|
+
- `references/logging-standard.md`
|
|
87
|
+
- `references/error-code-standard.md`
|
|
88
|
+
- `~/.claude/skills/_shared/references/deviation-detection-routing-protocol.md`
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Code | Status | Determination Criteria | Next Step |
|
|
6
6
|
|:----:|--------|------------------------|-----------|
|
|
7
|
-
| ✅ | IMPLEMENTATION_DONE | Fast-track tests green, @full triggered, no deviations |
|
|
7
|
+
| ✅ | IMPLEMENTATION_DONE | Fast-track tests green, @full triggered, no deviations | Hand off to Test Owner (separate conversation) for Phase 2 evidence audit |
|
|
8
8
|
| ⚠️ | IMPLEMENTATION_DONE_WITH_DEVIATION | Fast-track green, deviation-log has pending records | `devbooks-design-backport` |
|
|
9
|
-
| 🔄 | HANDOFF | Found test issues needing modification |
|
|
9
|
+
| 🔄 | HANDOFF | Found test issues needing modification | Hand off to Test Owner (separate conversation) to update tests |
|
|
10
10
|
| ❌ | BLOCKED | Needs external input/decision | Record breakpoint, wait for user |
|
|
11
11
|
| 💥 | FAILED | Fast-track tests not passing | Fix and retry |
|
|
12
12
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
→ Yes: IMPLEMENTATION_DONE_WITH_DEVIATION
|
|
18
18
|
|
|
19
19
|
2. Check if need to modify tests/
|
|
20
|
-
→ Yes: HANDOFF to
|
|
20
|
+
→ Yes: HANDOFF to Test Owner (separate conversation)
|
|
21
21
|
|
|
22
22
|
3. Check if fast-track tests (@smoke + @critical) all pass
|
|
23
23
|
→ No: FAILED
|
|
@@ -48,7 +48,7 @@ After completing coder, **must** output in this format:
|
|
|
48
48
|
|
|
49
49
|
## Next Step
|
|
50
50
|
|
|
51
|
-
**Recommended**:
|
|
51
|
+
**Recommended**: Hand off to Test Owner (new conversation/instance) for Phase 2 / wait for @full if needed
|
|
52
52
|
|
|
53
53
|
**Reason**: [specific reason]
|
|
54
54
|
|
|
@@ -59,16 +59,16 @@ After completing coder, **must** output in this format:
|
|
|
59
59
|
|
|
60
60
|
| My Status | Next Step | Reason |
|
|
61
61
|
|-----------|-----------|--------|
|
|
62
|
-
| IMPLEMENTATION_DONE |
|
|
62
|
+
| IMPLEMENTATION_DONE | Hand off to Test Owner (separate conversation) | Fast-track green; Test Owner audits evidence after @full passes |
|
|
63
63
|
| IMPLEMENTATION_DONE_WITH_DEVIATION | `devbooks-design-backport` | Backport design first |
|
|
64
|
-
| HANDOFF (test issues) |
|
|
64
|
+
| HANDOFF (test issues) | Hand off to Test Owner (separate conversation) | Coder cannot modify tests |
|
|
65
65
|
| BLOCKED | Wait for user | Record breakpoint area |
|
|
66
66
|
| FAILED | Fix and retry | Analyze failure reason |
|
|
67
67
|
|
|
68
68
|
## Key Constraints
|
|
69
69
|
|
|
70
70
|
- Coder **can never modify** `tests/**`
|
|
71
|
-
- If test issues found,
|
|
71
|
+
- If test issues are found, hand off to Test Owner (separate conversation) to handle
|
|
72
72
|
- If deviations exist, must design-backport first before continuing
|
|
73
73
|
- **After Coder completion status is `Implementation Done`, must wait for @full to pass before entering Test Owner Phase 2**
|
|
74
|
-
- **
|
|
74
|
+
- **Role isolation is mandatory**: do not switch roles within one conversation
|
|
@@ -392,3 +392,23 @@ This report uses "evidence first, distrust declarations" principle. All conclusi
|
|
|
392
392
|
- Fake completion → Immediately revert status, re-verify
|
|
393
393
|
- Suspicious items → Supplement evidence or re-run tests
|
|
394
394
|
- Trustworthy items → Continue current process
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
## Progressive Disclosure
|
|
398
|
+
### Base (Required)
|
|
399
|
+
Goal: Clarify this Skill's core outputs and usage scope.
|
|
400
|
+
Inputs: User goals, existing documents, change package context, or project path.
|
|
401
|
+
Outputs: Executable artifacts, next-step guidance, or recorded paths.
|
|
402
|
+
Boundaries: Does not replace other roles; does not touch `tests/`.
|
|
403
|
+
Evidence: Reference output paths or execution records.
|
|
404
|
+
|
|
405
|
+
### Advanced (Optional)
|
|
406
|
+
Use when you need to refine strategy, boundaries, or risk notes.
|
|
407
|
+
|
|
408
|
+
### Extended (Optional)
|
|
409
|
+
Use when you need to coordinate with external systems or optional tools.
|
|
410
|
+
|
|
411
|
+
## Recommended MCP Capability Types
|
|
412
|
+
- Code search (code-search)
|
|
413
|
+
- Reference tracking (reference-tracking)
|
|
414
|
+
- Impact analysis (impact-analysis)
|