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.
Files changed (44) hide show
  1. package/CHANGELOG.md +242 -0
  2. package/README.md +133 -462
  3. package/bin/devbooks.js +42 -4
  4. package/package.json +2 -1
  5. package/scripts/config-discovery.sh +1 -1
  6. package/scripts/detect-mcp.sh +86 -0
  7. package/skills/Skill-Development-Guide.md +1 -2
  8. package/skills/_shared/mcp-enhancement-template-mcp-enhancement.md +30 -113
  9. package/skills/_shared/references/completeness-thinking-framework.md +86 -0
  10. package/skills/_shared/references/human-advice-calibration-prompt.md +27 -0
  11. package/skills/devbooks-archiver/SKILL.md +20 -12
  12. package/skills/devbooks-archiver/references/archiver-prompt.md +66 -38
  13. package/skills/devbooks-brownfield-bootstrap/SKILL.md +32 -65
  14. package/skills/devbooks-coder/SKILL.md +61 -240
  15. package/skills/devbooks-coder/references/completion-status-and-routing.md +8 -8
  16. package/skills/devbooks-convergence-audit/SKILL.md +20 -0
  17. package/skills/devbooks-delivery-workflow/SKILL.md +26 -227
  18. package/skills/devbooks-delivery-workflow/references/orchestration-bans-and-stage-table.md +45 -0
  19. package/skills/devbooks-design-backport/SKILL.md +16 -3
  20. package/skills/devbooks-design-doc/SKILL.md +21 -9
  21. package/skills/devbooks-docs-consistency/SKILL.md +170 -0
  22. package/skills/devbooks-docs-consistency/references/completeness-dimensions.yaml +31 -0
  23. package/skills/devbooks-docs-consistency/references/doc-classification.yaml +11 -0
  24. package/skills/devbooks-docs-consistency/references/docs-rules-schema.yaml +11 -0
  25. package/skills/devbooks-docs-consistency/scripts/alias.sh +5 -0
  26. package/skills/devbooks-docs-consistency/scripts/completeness-checker.sh +153 -0
  27. package/skills/devbooks-docs-consistency/scripts/doc-classifier.sh +121 -0
  28. package/skills/devbooks-docs-consistency/scripts/git-adapter.sh +32 -0
  29. package/skills/devbooks-docs-consistency/scripts/rules-engine.sh +255 -0
  30. package/skills/devbooks-docs-consistency/scripts/scanner.sh +93 -0
  31. package/skills/devbooks-docs-consistency/scripts/style-checker.sh +123 -0
  32. package/skills/devbooks-docs-sync/SKILL.md +23 -318
  33. package/skills/devbooks-entropy-monitor/SKILL.md +15 -32
  34. package/skills/devbooks-impact-analysis/SKILL.md +26 -46
  35. package/skills/devbooks-implementation-plan/SKILL.md +23 -9
  36. package/skills/devbooks-proposal-author/SKILL.md +21 -15
  37. package/skills/devbooks-proposal-challenger/SKILL.md +16 -3
  38. package/skills/devbooks-proposal-judge/SKILL.md +16 -3
  39. package/skills/devbooks-reviewer/SKILL.md +23 -42
  40. package/skills/devbooks-router/SKILL.md +22 -356
  41. package/skills/devbooks-router/references/routing-rules-and-templates.md +120 -0
  42. package/skills/devbooks-spec-contract/SKILL.md +23 -39
  43. package/skills/devbooks-test-owner/SKILL.md +68 -309
  44. package/skills/devbooks-test-reviewer/SKILL.md +15 -5
@@ -13,240 +13,39 @@ allowed-tools:
13
13
 
14
14
  # DevBooks: Delivery Acceptance Workflow (Complete Closed-Loop Orchestrator)
15
15
 
16
- > **Positioning**: This Skill is a **pure orchestration layer**, not an execution layer. It only **calls sub-agents**, never performs any change work itself.
16
+ ## Progressive Disclosure
17
17
 
18
- ---
19
-
20
- ## 🚨 ABSOLUTE RULES
21
-
22
- > **These rules have no exceptions. Violation means failure.**
23
-
24
- ### Rule 1: Main Agent Must Not Work Directly
25
-
26
- ```
27
- ❌ FORBIDDEN: Main Agent writing proposal.md / design.md / tests/ / src/ directly
28
- ❌ FORBIDDEN: Main Agent modifying any change package content directly
29
- ❌ FORBIDDEN: Main Agent skipping sub-agent calls
30
-
31
- ✅ REQUIRED: All work completed through Task tool sub-agent calls
32
- ✅ REQUIRED: Every stage has corresponding sub-agent call
33
- ✅ REQUIRED: Main Agent only orchestrates, waits, and verifies
34
- ```
35
-
36
- ### Rule 2: Must Not Skip Any Mandatory Stage
37
-
38
- ```
39
- ❌ FORBIDDEN: Skipping Challenger/Judge stages
40
- ❌ FORBIDDEN: Skipping Test-Reviewer stage
41
- ❌ FORBIDDEN: Skipping Code-Review stage
42
- ❌ FORBIDDEN: Skipping Green-Verify stage
43
- ❌ FORBIDDEN: Archiving without passing strict check
44
-
45
- ✅ REQUIRED: Complete execution of all 12 mandatory stages
46
- ✅ REQUIRED: Sub-agent must return success before continuing to next stage
47
- ```
48
-
49
- ### Rule 3: Must Not Archive with Fake Completion
50
-
51
- ```
52
- ❌ FORBIDDEN: Archiving when evidence/green-final/ doesn't exist or is empty
53
- ❌ FORBIDDEN: Archiving when verification.md AC coverage < 100%
54
- ❌ FORBIDDEN: Archiving when tasks.md has incomplete tasks
55
- ❌ FORBIDDEN: Archiving when change-check.sh --mode strict fails
56
-
57
- ✅ REQUIRED: Archiver sub-agent runs check script first
58
- ✅ REQUIRED: All checks pass before executing archive
59
- ```
60
-
61
- ### Rule 4: No Demo Mode (NO DEMO MODE)
62
-
63
- ```
64
- ❌ FORBIDDEN: Treating workflow as "demonstration" or "showcase"
65
- ❌ FORBIDDEN: Outputting "demo complete", "workflow demonstration" etc.
66
- ❌ FORBIDDEN: Claiming completion when artifacts don't exist or are empty
67
- ❌ FORBIDDEN: Using "simulate", "assume", "if" instead of actual execution
68
-
69
- ✅ REQUIRED: Every stage must produce real, verifiable artifacts
70
- ✅ REQUIRED: Artifacts must be written to filesystem (verifiable via ls/cat)
71
- ✅ REQUIRED: Use "executed", "completed", "created" for actual actions
72
- ✅ REQUIRED: If cannot actually execute, stop immediately and inform user
73
- ```
74
-
75
- **Signs of Demo Mode**:
76
- - Using words like "demonstration", "showcase", "simulate"
77
- - Claiming completion without actual file writes
78
- - Providing "Option A/B" instead of executing next step
79
- - Outputting "recommendations for next steps" instead of continuing
80
-
81
- ### Rule 5: Must Not Ignore REVISE REQUIRED
82
-
83
- ```
84
- ❌ FORBIDDEN: Continuing to next stage after receiving REVISE REQUIRED
85
- ❌ FORBIDDEN: Claiming "completed" after receiving REVISE REQUIRED
86
- ❌ FORBIDDEN: Providing "options" for user to choose after REVISE REQUIRED
87
- ❌ FORBIDDEN: Continuing execution after receiving REJECTED
88
-
89
- ✅ REQUIRED: Judge returns REVISE → go back to Stage 1 to rewrite proposal
90
- ✅ REQUIRED: Judge returns REJECTED → stop workflow, inform user
91
- ✅ REQUIRED: Test-Review returns REVISE REQUIRED → go back to Stage 7 to fix tests
92
- ✅ REQUIRED: Code-Review returns REVISE REQUIRED → go back to Stage 8 to fix code
93
- ✅ REQUIRED: After fixing, re-execute review stage until it passes
94
- ```
95
-
96
- ### Rule 6: Must Not Proceed with Partial Completion
97
-
98
- ```
99
- ❌ FORBIDDEN: Entering next stage when tasks.md completion rate < 100%
100
- ❌ FORBIDDEN: Entering next stage when test coverage < AC requirements
101
- ❌ FORBIDDEN: Entering Code stage when stub tests exist (skip/todo/not_implemented)
102
- ❌ FORBIDDEN: Entering Review stage when unimplemented functions exist (raise NotImplementedError)
103
-
104
- ✅ REQUIRED: When Stage 7 completes, all tests must be real and executable
105
- ✅ REQUIRED: When Stage 8 completes, tasks.md all tasks 100% complete
106
- ✅ REQUIRED: If scope too large, must split change package, cannot partially complete
107
- ```
108
-
109
- ---
110
-
111
- ## Prerequisites: Configuration Discovery
112
-
113
- Before execution, **must** search for configuration in the following order (stop when found):
114
- 1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
115
- 2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol
116
- 3. `project.md` (if exists) → Template protocol
117
- 4. If still unable to determine → **Stop and ask user**
118
-
119
- ---
120
-
121
- ## Complete Closed-Loop Flow (12 Mandatory Stages)
122
-
123
- ```
124
- ┌──────────────────────────────────────────────────────────────────────────┐
125
- │ Mandatory Flow (No Optional Stages) │
126
- ├──────────────────────────────────────────────────────────────────────────┤
127
- │ │
128
- │ ┌─────────┐ ┌───────────┐ ┌─────────┐ ┌─────────┐ │
129
- │ │1.Propose│──▶│2.Challenge│──▶│ 3.Judge │──▶│4.Design │ │
130
- │ └─────────┘ └───────────┘ └─────────┘ └─────────┘ │
131
- │ │ │ │
132
- │ │ ┌─────────────────────────────┘ │
133
- │ │ ▼ │
134
- │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
135
- │ │ │ 5.Spec │──▶│ 6.Plan │──▶│7.Test-R │ │
136
- │ │ └─────────┘ └─────────┘ └─────────┘ │
137
- │ │ │ │
138
- │ │ ┌───────────────────────────┘ │
139
- │ │ ▼ │
140
- │ │ ┌─────────┐ ┌──────────┐ ┌──────────┐ │
141
- │ │ │ 8.Code │──▶│9.TestRev │──▶│10.CodeRev│ │
142
- │ │ └─────────┘ └──────────┘ └──────────┘ │
143
- │ │ │ │
144
- │ │ ┌─────────────────────────────┘ │
145
- │ │ ▼ │
146
- │ │ ┌───────────┐ ┌─────────┐ │
147
- │ └───────▶│11.GreenV │──▶│12.Archive│ │
148
- │ └───────────┘ └─────────┘ │
149
- │ │
150
- └──────────────────────────────────────────────────────────────────────────┘
151
- ```
152
-
153
- ### Stage Details and Sub-Agent Calls
154
-
155
- | # | Stage | Sub-Agent | Skill | Artifact | Mandatory |
156
- |---|-------|-----------|-------|----------|-----------|
157
- | 1 | Propose | `devbooks-proposal-author` | devbooks-proposal-author | proposal.md | ✅ |
158
- | 2 | Challenge | `devbooks-challenger` | devbooks-proposal-challenger | Challenge opinions | ✅ |
159
- | 3 | Judge | `devbooks-judge` | devbooks-proposal-judge | Decision Log | ✅ |
160
- | 4 | Design | `devbooks-designer` | devbooks-design-doc | design.md | ✅ |
161
- | 5 | Spec | `devbooks-spec-owner` | devbooks-spec-contract | specs/*.md | ✅ |
162
- | 6 | Plan | `devbooks-planner` | devbooks-implementation-plan | tasks.md | ✅ |
163
- | 7 | Test-Red | `devbooks-test-owner` | devbooks-test-owner | verification.md + tests/ | ✅ |
164
- | 8 | Code | `devbooks-coder` | devbooks-coder | src/ implementation | ✅ |
165
- | 9 | Test-Review | `devbooks-reviewer` | devbooks-test-reviewer | Test review opinions | ✅ |
166
- | 10 | Code-Review | `devbooks-reviewer` | devbooks-reviewer | Code review opinions | ✅ |
167
- | 11 | Green-Verify | `devbooks-test-owner` | devbooks-test-owner | evidence/green-final/ | ✅ |
168
- | 12 | Archive | `devbooks-archiver` | devbooks-archiver | Archived to archive/ | ✅ |
169
-
170
- ---
18
+ ### Base (must read)
19
+ Goal: complete a 12-stage closed-loop delivery by orchestrating sub-agents only.
20
+ Input: user goal, config mapping, existing change package artifacts and stage status.
21
+ Output: sub-agent call sequence, stage progress, and result summary.
22
+ Boundaries: main agent does not modify files directly; must call sub-agents via Task; enforce role isolation and gates.
23
+ Evidence: artifact paths, script outputs, and review notes per stage.
171
24
 
172
- ## 📚 Reference Documentation
25
+ ### Advanced (optional)
26
+ Use when you need: ban details, stage table, resume rules.
173
27
 
174
- ### Must Read (Read Immediately)
28
+ ### Extended (optional)
29
+ Use when you need: gate handling, traceability templates, script pointers.
175
30
 
176
- 1. **Subagent Invocation Specification**: `references/subagent-invocation-spec.md`
177
- - Invocation format and examples
178
- - Role isolation constraints
179
- - When to read: Before starting orchestration
180
-
181
- 2. **Orchestration Logic Pseudocode**: `references/orchestration-logic-pseudocode.md`
182
- - Complete orchestration logic
183
- - Detailed implementation of 12 stages
184
- - When to read: When needing to understand orchestration logic
185
-
186
- ### Read as Needed
187
-
188
- 3. **Gate Checks and Error Handling**: `references/gate-checks-and-error-handling.md`
189
- - Stage gate checkpoints
190
- - Error handling flow
191
- - Rollback execution rules
192
- - When to read: When encountering errors or needing rollback
193
-
194
- 4. **Delivery Acceptance Workflow**: `references/delivery-acceptance-workflow.md`
195
- - Complete workflow description
196
- - When to read: When needing detailed workflow understanding
197
-
198
- 5. **Change Verification and Traceability Template**: `references/9-change-verification-traceability-template.md`
199
- - Verification template
200
- - When to read: When needing template reference
201
-
202
- ---
31
+ ## Core Notes
203
32
 
204
- ## Context Awareness
33
+ - Orchestration only: do not directly write proposal/design/tests/implementation.
34
+ - 12 stages are mandatory; any failure triggers rollback to the corresponding stage.
35
+ - Run config discovery first (prefer `.devbooks/config.yaml`), then invoke sub-agents.
205
36
 
206
- ### Detection Flow
37
+ ## References
207
38
 
208
- 1. Detect if change package exists
209
- 2. Detect current stage (which stages completed)
210
- 3. Resume from checkpoint
211
-
212
- ### Resume from Checkpoint
213
-
214
- If change package already has partial artifacts, continue from most recently completed stage:
215
-
216
- ```
217
- Detection results:
218
- - Change package: exists
219
- - Completed stages: 1-6 (proposal, challenge, judge, design, spec, plan)
220
- - Next stage: 7 (Test-Red)
221
- - Run mode: Resume from checkpoint
222
- ```
223
-
224
- ---
225
-
226
- ## MCP Enhancement
227
-
228
- This Skill supports MCP runtime enhancement, automatically detecting and enabling advanced features.
229
-
230
- ### Dependent MCP Services
231
-
232
- | Service | Purpose | Timeout |
233
- |---------|---------|---------|
234
- | `mcp__ckb__getStatus` | Detect CKB index availability | 2s |
235
-
236
- ### Detection Flow
237
-
238
- 1. Call `mcp__ckb__getStatus` (2s timeout)
239
- 2. Mark index availability in workflow status report
240
- 3. If unavailable → Suggest generating index before apply stage
241
-
242
- ---
39
+ - `skills/devbooks-delivery-workflow/references/orchestration-bans-and-stage-table.md`: bans, 12-stage table, resume notes.
40
+ - `skills/devbooks-delivery-workflow/references/subagent-invocation-spec.md`: sub-agent invocation format and isolation rules.
41
+ - `skills/devbooks-delivery-workflow/references/orchestration-logic-pseudocode.md`: orchestration main logic.
42
+ - `skills/devbooks-delivery-workflow/references/gate-checks-and-error-handling.md`: gate checkpoints and rollback strategy.
43
+ - `skills/devbooks-delivery-workflow/references/delivery-acceptance-workflow.md`: full workflow description.
44
+ - `skills/devbooks-delivery-workflow/references/9-change-verification-traceability-template.md`: verification & traceability templates.
243
45
 
244
- ## Optional Check Scripts
46
+ ## Recommended MCP Capability Types
245
47
 
246
- Scripts are located in this Skill's `scripts/` directory:
48
+ - Code search (code-search)
49
+ - Reference tracking (reference-tracking)
50
+ - Impact analysis (impact-analysis)
247
51
 
248
- - Initialize change package skeleton: `change-scaffold.sh`
249
- - One-click change package validation: `change-check.sh`
250
- - Structural guardrail decision validation: `guardrail-check.sh`
251
- - Evidence collection: `change-evidence.sh`
252
- - Progress dashboard: `progress-dashboard.sh`
@@ -0,0 +1,45 @@
1
+ # Orchestration bans and stage table (reference)
2
+
3
+ This file carries the orchestration bans and the 12-stage table for `devbooks-delivery-workflow`, to keep `SKILL.md` compact.
4
+
5
+ ## Absolute bans (mandatory)
6
+
7
+ 1) Main agent orchestrates only
8
+ - Do not directly write `proposal.md` / `design.md` / `tasks.md` / `verification.md`
9
+ - Do not directly modify `tests/**` or implementation code
10
+
11
+ 2) Do not skip mandatory stages
12
+ - Must run: Proposal → Challenge → Judge → Design → Spec → Plan → Test → Code → Test Review → Code Review → Green Verify → Archive
13
+
14
+ 3) No fake archive
15
+ - Do not archive if `evidence/green-final/` is missing/empty
16
+ - Do not archive if `change-check.sh <change-id> --mode strict` fails
17
+
18
+ 4) No “demo/simulate”
19
+ - Every stage must produce real artifacts on disk; do not replace execution with assumptions
20
+
21
+ 5) `REVISE REQUIRED` triggers rollback
22
+ - If Judge/Test-Review/Code-Review returns `REVISE REQUIRED`: go back, fix, and rerun review until it passes
23
+
24
+ ## 12-stage table (mandatory)
25
+
26
+ | # | Stage | Sub-agent | Skill | Key artifact(s) |
27
+ |---:|---|---|---|---|
28
+ | 1 | Propose | Proposal Author | `devbooks-proposal-author` | `proposal.md` |
29
+ | 2 | Challenge | Proposal Challenger | `devbooks-proposal-challenger` | `challenge-*.md` |
30
+ | 3 | Judge | Proposal Judge | `devbooks-proposal-judge` | writes back Decision Log |
31
+ | 4 | Design | Design Owner | `devbooks-design-doc` | `design.md` |
32
+ | 5 | Spec | Spec Owner | `devbooks-spec-contract` | `specs/**` |
33
+ | 6 | Plan | Planner | `devbooks-implementation-plan` | `tasks.md` |
34
+ | 7 | Test-Red | Test Owner | `devbooks-test-owner` | `verification.md` + `tests/**` + Red evidence |
35
+ | 8 | Code | Coder | `devbooks-coder` | implementation changes (must not change tests) |
36
+ | 9 | Test-Review | Test Reviewer | `devbooks-test-reviewer` | `test-review-*.md` |
37
+ | 10 | Code-Review | Reviewer | `devbooks-reviewer` | `code-review-*.md` |
38
+ | 11 | Green-Verify | Test Owner | `devbooks-test-owner` | Green evidence |
39
+ | 12 | Archive | Archiver | `devbooks-archiver` | moved under `archive/` |
40
+
41
+ ## Resume (recommended)
42
+
43
+ - If a change package already exists: resume from the most recent completed stage, do not redo confirmed artifacts.
44
+ - After each stage: write evidence under `evidence/` and leave trace in the change package docs.
45
+
@@ -99,9 +99,22 @@ Detection Results:
99
99
 
100
100
  ---
101
101
 
102
- ## MCP Enhancement
103
102
 
104
- This Skill does not depend on MCP services; no runtime detection required.
103
+ ## Progressive Disclosure
104
+ ### Base (Required)
105
+ Goal: Clarify this Skill's core outputs and usage scope.
106
+ Inputs: User goals, existing documents, change package context, or project path.
107
+ Outputs: Executable artifacts, next-step guidance, or recorded paths.
108
+ Boundaries: Does not replace other roles; does not touch `tests/`.
109
+ Evidence: Reference output paths or execution records.
105
110
 
106
- MCP enhancement rules reference: `skills/_shared/mcp-enhancement-template-mcp-enhancement.md`
111
+ ### Advanced (Optional)
112
+ Use when you need to refine strategy, boundaries, or risk notes.
107
113
 
114
+ ### Extended (Optional)
115
+ Use when you need to coordinate with external systems or optional tools.
116
+
117
+ ## Recommended MCP Capability Types
118
+ - Code search (code-search)
119
+ - Reference tracking (reference-tracking)
120
+ - Impact analysis (impact-analysis)
@@ -11,6 +11,26 @@ allowed-tools:
11
11
 
12
12
  # DevBooks: Design Document (Design Doc)
13
13
 
14
+ ## Progressive Disclosure
15
+
16
+ ### Base (Required)
17
+ Goal: Produce `<change-root>/<change-id>/design.md` with What/Constraints and AC-xxx only.
18
+ Inputs: approved `proposal.md`, impact notes (if any), and project context.
19
+ Outputs: `design.md` (What/Constraints/AC-xxx + Documentation Impact).
20
+ Boundaries: do not write implementation steps; do not write tests; do not modify code.
21
+ Evidence: reference artifact paths and the AC list.
22
+
23
+ ### Advanced (Optional)
24
+ Use when you need: option sets, boundary cases, dependency/architecture deltas.
25
+
26
+ ### Extended (Optional)
27
+ Use when you need: faster search/impact via optional MCP capabilities.
28
+
29
+ ## Recommended MCP Capability Types
30
+ - Code search (code-search)
31
+ - Reference tracking (reference-tracking)
32
+ - Impact analysis (impact-analysis)
33
+
14
34
  ## Workflow Position Awareness
15
35
 
16
36
  > **Core Principle**: Design Doc executes after Proposal is approved, serving as the starting point for implementation phase.
@@ -237,19 +257,11 @@ After completing design-doc, output:
237
257
  OR
238
258
  **Next: `devbooks-implementation-plan`** (if no external contract changes)
239
259
 
240
- Reason: Design is complete. The next step is to [define external contracts / create implementation plan].
260
+ Next: [define external contracts / create implementation plan].
241
261
 
242
262
  ### How to invoke
243
263
  ```
244
264
  Run devbooks-<skill-name> skill for change <change-id>
245
265
  ```
246
- ```
247
266
 
248
267
  ---
249
-
250
- ## MCP Enhancement
251
-
252
- This Skill does not depend on MCP services, no runtime detection required.
253
-
254
- MCP enhancement rules reference: `skills/_shared/mcp-enhancement-template-mcp-enhancement.md`
255
-
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: devbooks-docs-consistency
3
+ description: devbooks-docs-consistency: Check and maintain consistency between project documentation and code, supporting incremental scanning, custom rules, and completeness checks. Can run on-demand within change packages or globally. Old name devbooks-docs-sync is retained as an alias with deprecation notice.
4
+ recommended_experts: ["Technical Writer", "System Architect"]
5
+ allowed-tools:
6
+ - Glob
7
+ - Grep
8
+ - Read
9
+ - Edit
10
+ - Write
11
+ - Bash
12
+ ---
13
+
14
+ # DevBooks: Documentation Consistency (Docs Consistency)
15
+
16
+ ## Progressive Disclosure
17
+
18
+ ### Base (Required)
19
+ Goal: Check documentation consistency and completeness and produce reports.
20
+ Inputs: user docs, changed files (change-scoped) or full repo docs (global).
21
+ Outputs: evidence reports under `<change-root>/<change-id>/evidence/` (or specified output paths).
22
+ Boundaries: check-only by default; do not modify code or `tests/**`.
23
+ Evidence: reference generated report paths.
24
+
25
+ ### Advanced (Optional)
26
+ Use when you need: rules customization, doc classification tuning, completeness dimensions.
27
+
28
+ ### Extended (Optional)
29
+ Use when you need: faster search/impact via optional MCP capabilities.
30
+
31
+ ## Recommended MCP Capability Types
32
+ - Code search (code-search)
33
+ - Reference tracking (reference-tracking)
34
+ - Impact analysis (impact-analysis)
35
+
36
+ ## Prerequisites: Configuration Discovery (Protocol-Agnostic)
37
+
38
+ Before execution, **must** search for configuration in the following order (stop when found):
39
+ 1. `.devbooks/config.yaml` (if exists) -> Parse and use mappings within
40
+ 2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
41
+ 3. `project.md` (if exists) -> template protocol, use default mappings
42
+ 4. If still undetermined -> **Stop and ask user**
43
+
44
+ ---
45
+
46
+ ## Compatibility and Deprecation
47
+
48
+ - Old name: `devbooks-docs-sync`
49
+ - Current name: `devbooks-docs-consistency`
50
+ - Behavior: Old name continues to work as an alias with deprecation notice.
51
+ - Runtime notice: Alias points to new directory via symlink, can execute `scripts/alias.sh` to output notice.
52
+
53
+ Deprecation notice example:
54
+
55
+ ```
56
+ devbooks-docs-sync is deprecated, please use devbooks-docs-consistency.
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Role Definition
62
+
63
+ **docs-consistency** is the documentation consistency check role in the DevBooks Apply phase, responsible for identifying discrepancies between documentation and code and generating reports, without directly modifying code.
64
+
65
+ ### Document Classification
66
+
67
+ | Document Type | Target Audience | Checked by This Skill | Examples |
68
+ |---------------|-----------------|:---------------------:|----------|
69
+ | **Living Documents** | End Users | Yes | README.md, docs/*.md, API.md |
70
+ | **Historical Documents** | End Users | Limited (minimal checks only) | CHANGELOG.md |
71
+ | **Conceptual Documents** | Design/Architecture | Yes (structural checks) | architecture/*.md |
72
+
73
+ Classification rules are configurable, default rules in `references/doc-classification.yaml`.
74
+
75
+ ---
76
+
77
+ ## Execution Modes
78
+
79
+ ### Mode 1: Incremental Scan (Change-Scoped)
80
+
81
+ **Trigger condition**: Running within change package context.
82
+
83
+ **Behavior**:
84
+ 1. Read change scope
85
+ 2. Scan only changed files
86
+ 3. Record token consumption and scan time
87
+ 4. Output check report
88
+
89
+ ### Mode 2: Full Scan (Global Check)
90
+
91
+ **Trigger condition**: User explicitly requests global check (e.g., `devbooks-docs-consistency --global`).
92
+
93
+ **Behavior**:
94
+ 1. Scan all user documentation
95
+ 2. Generate diff report
96
+ 3. Output improvement suggestions
97
+
98
+ ### Mode 3: Check Mode (Check Only)
99
+
100
+ **Trigger condition**: User uses `--check` parameter.
101
+
102
+ **Behavior**: Check only, no modifications, output report.
103
+
104
+ ---
105
+
106
+ ## Command Examples
107
+
108
+ ```
109
+ # Rules engine: persistent rules
110
+ bash scripts/rules-engine.sh --rules references/docs-rules-schema.yaml --input README.md
111
+
112
+ # Rules engine: one-time task
113
+ bash scripts/rules-engine.sh --once "remove:@augment" --input README.md
114
+
115
+ # Document classification
116
+ bash scripts/doc-classifier.sh README.md
117
+
118
+ # Completeness check
119
+ bash scripts/completeness-checker.sh --input README.md --config references/completeness-dimensions.yaml --output evidence/completeness-report.md
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Completeness Checks
125
+
126
+ Execute completeness checks on living documents, covering by default: environment dependencies, security permissions, troubleshooting, configuration instructions, API documentation.
127
+
128
+ - Dimension configuration: `references/completeness-dimensions.yaml`
129
+ - Report output: `<change-root>/<change-id>/evidence/completeness-report.md`
130
+ - Methodology reference: [Completeness Thinking Framework](../_shared/references/completeness-thinking-framework.md)
131
+
132
+ ---
133
+
134
+ ## Style Preferences
135
+
136
+ Style preference reading priority: command-line arguments > config file > defaults.
137
+
138
+ - Documentation maintenance metadata: `dev-playbooks/specs/_meta/docs-maintenance.md`
139
+
140
+ ---
141
+
142
+ ## Output and Reports
143
+
144
+ Default output reports (change package context):
145
+
146
+ - `evidence/completeness-report.md`
147
+ - `evidence/token-usage.log`
148
+ - `evidence/scan-performance.log`
149
+
150
+ ---
151
+
152
+ ## Workflow Integration
153
+
154
+ Triggered by `devbooks-archiver` during archiving phase, generates documentation maintenance metadata during brownfield initialization by `devbooks-brownfield-bootstrap`.
155
+
156
+ ---
157
+
158
+
159
+ ## Metadata
160
+
161
+ | Field | Value |
162
+ |-------|-------|
163
+ | Skill Name | devbooks-docs-consistency |
164
+ | Phase | Apply (post-implementation, pre-archiving) |
165
+ | Artifacts | Documentation consistency check reports |
166
+ | Constraints | Check only, do not modify code |
167
+
168
+ ---
169
+
170
+ *This Skill documentation follows devbooks-* conventions.*
@@ -0,0 +1,31 @@
1
+ - name: Environment dependencies
2
+ patterns:
3
+ - "Node.js"
4
+ - "Python"
5
+ - "Dependencies"
6
+ - "Requirements"
7
+ - name: Security and permissions
8
+ patterns:
9
+ - "Security"
10
+ - "Permissions"
11
+ - "API key"
12
+ - "Token"
13
+ - "Secret"
14
+ - name: Troubleshooting
15
+ patterns:
16
+ - "Troubleshooting"
17
+ - "FAQ"
18
+ - "Common issues"
19
+ - "Error"
20
+ - name: Configuration
21
+ patterns:
22
+ - "Configuration"
23
+ - "config"
24
+ - ".env"
25
+ - "Environment variables"
26
+ - name: API documentation
27
+ patterns:
28
+ - "API"
29
+ - "Endpoint"
30
+ - "Request"
31
+ - "Response"
@@ -0,0 +1,11 @@
1
+ living_docs:
2
+ - "README.md"
3
+ - "docs/**/*.md"
4
+ - "API.md"
5
+ - "docs/*.md"
6
+ history_docs:
7
+ - "CHANGELOG.md"
8
+ - "**/CHANGELOG.md"
9
+ concept_docs:
10
+ - "architecture/*.md"
11
+ - "architecture/**/*.md"
@@ -0,0 +1,11 @@
1
+ rules:
2
+ - id: forbid-strongest-mind
3
+ type: persistent
4
+ target: content
5
+ action: check
6
+ pattern: "strongest mind"
7
+ - id: remove-augment
8
+ type: once
9
+ target: content
10
+ action: remove
11
+ pattern: "@augment"
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ echo "devbooks-docs-sync is deprecated; please use devbooks-docs-consistency." >&2
5
+ exit 0