dev-playbooks 1.0.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 (142) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +463 -0
  3. package/bin/devbooks.js +986 -0
  4. package/package.json +41 -0
  5. package/skills/Skill-Development-Guide.md +249 -0
  6. package/skills/Skills-Usage-Guide.md +447 -0
  7. package/skills/_shared/context-detection-template.md +315 -0
  8. package/skills/_shared/mcp-enhancement-template.md +144 -0
  9. package/skills/_shared/references/universal-gating-protocol.md +114 -0
  10. package/skills/_template/config-discovery-template.md +126 -0
  11. package/skills/devbooks-brownfield-bootstrap/SKILL.md +168 -0
  12. package/skills/devbooks-brownfield-bootstrap/references/10-glossary-template.md +42 -0
  13. package/skills/devbooks-brownfield-bootstrap/references/brownfield-bootstrap-prompt.md +115 -0
  14. package/skills/devbooks-brownfield-bootstrap/references/brownfield-bootstrap.md +96 -0
  15. package/skills/devbooks-brownfield-bootstrap/references/code-navigation-strategy.md +203 -0
  16. package/skills/devbooks-brownfield-bootstrap/scripts/cod-update.sh +357 -0
  17. package/skills/devbooks-brownfield-bootstrap/templates/project-profile-template.md +172 -0
  18. package/skills/devbooks-c4-map/SKILL.md +151 -0
  19. package/skills/devbooks-c4-map/references/c4-architecture-map-prompt.md +33 -0
  20. package/skills/devbooks-c4-map/references/layered-constraint-checklist.md +185 -0
  21. package/skills/devbooks-code-review/SKILL.md +175 -0
  22. package/skills/devbooks-code-review/references/code-review-prompt.md +100 -0
  23. package/skills/devbooks-code-review/references/code-smell-cheatsheet.md +498 -0
  24. package/skills/devbooks-code-review/references/pr-template-and-guidelines.md +321 -0
  25. package/skills/devbooks-code-review/references/resource-management-review-checklist.md +311 -0
  26. package/skills/devbooks-coder/SKILL.md +219 -0
  27. package/skills/devbooks-coder/references/code-implementation-prompt.md +74 -0
  28. package/skills/devbooks-coder/references/coding-style-guidelines.md +351 -0
  29. package/skills/devbooks-coder/references/error-code-standard.md +463 -0
  30. package/skills/devbooks-coder/references/logging-standard.md +329 -0
  31. package/skills/devbooks-coder/references/low-risk-modification-techniques.md +275 -0
  32. package/skills/devbooks-delivery-workflow/SKILL.md +217 -0
  33. package/skills/devbooks-delivery-workflow/references/9-change-verification-traceability-template.md +133 -0
  34. package/skills/devbooks-delivery-workflow/references/delivery-acceptance-workflow.md +177 -0
  35. package/skills/devbooks-delivery-workflow/references/prototype-production-dual-track.md +169 -0
  36. package/skills/devbooks-delivery-workflow/scripts/ac-trace-check.sh +330 -0
  37. package/skills/devbooks-delivery-workflow/scripts/audit-scope.sh +262 -0
  38. package/skills/devbooks-delivery-workflow/scripts/change-check.sh +1039 -0
  39. package/skills/devbooks-delivery-workflow/scripts/change-codemod-scaffold.sh +135 -0
  40. package/skills/devbooks-delivery-workflow/scripts/change-evidence.sh +152 -0
  41. package/skills/devbooks-delivery-workflow/scripts/change-scaffold.sh +467 -0
  42. package/skills/devbooks-delivery-workflow/scripts/change-spec-delta-scaffold.sh +135 -0
  43. package/skills/devbooks-delivery-workflow/scripts/constitution-check.sh +237 -0
  44. package/skills/devbooks-delivery-workflow/scripts/env-match-check.sh +128 -0
  45. package/skills/devbooks-delivery-workflow/scripts/fitness-check.sh +365 -0
  46. package/skills/devbooks-delivery-workflow/scripts/guardrail-check.sh +516 -0
  47. package/skills/devbooks-delivery-workflow/scripts/handoff-check.sh +141 -0
  48. package/skills/devbooks-delivery-workflow/scripts/hygiene-check.sh +340 -0
  49. package/skills/devbooks-delivery-workflow/scripts/migrate-from-openspec.sh +385 -0
  50. package/skills/devbooks-delivery-workflow/scripts/migrate-to-v2-gates.sh +202 -0
  51. package/skills/devbooks-delivery-workflow/scripts/progress-dashboard.sh +319 -0
  52. package/skills/devbooks-delivery-workflow/scripts/prototype-promote.sh +341 -0
  53. package/skills/devbooks-delivery-workflow/scripts/spec-preview.sh +203 -0
  54. package/skills/devbooks-delivery-workflow/scripts/spec-promote.sh +118 -0
  55. package/skills/devbooks-delivery-workflow/scripts/spec-rollback.sh +124 -0
  56. package/skills/devbooks-delivery-workflow/scripts/spec-stage.sh +117 -0
  57. package/skills/devbooks-delivery-workflow/scripts/verify-all.sh +78 -0
  58. package/skills/devbooks-delivery-workflow/scripts/verify-npm-package.sh +123 -0
  59. package/skills/devbooks-delivery-workflow/scripts/verify-openspec-free.sh +81 -0
  60. package/skills/devbooks-delivery-workflow/scripts/verify-slash-commands.sh +146 -0
  61. package/skills/devbooks-delivery-workflow/templates/handoff.md +50 -0
  62. package/skills/devbooks-design-backport/SKILL.md +73 -0
  63. package/skills/devbooks-design-backport/references/design-backport-prompt.md +132 -0
  64. package/skills/devbooks-design-doc/SKILL.md +121 -0
  65. package/skills/devbooks-design-doc/references/design-doc-prompt.md +188 -0
  66. package/skills/devbooks-design-doc/references/microservice-design-checklist.md +149 -0
  67. package/skills/devbooks-design-doc/references/privacy-compliance-checklist.md +240 -0
  68. package/skills/devbooks-entropy-monitor/SKILL.md +188 -0
  69. package/skills/devbooks-entropy-monitor/references/entropy-metrics-methodology.md +218 -0
  70. package/skills/devbooks-entropy-monitor/scripts/entropy-measure.sh +449 -0
  71. package/skills/devbooks-entropy-monitor/scripts/entropy-report.sh +303 -0
  72. package/skills/devbooks-entropy-monitor/templates/thresholds.json +99 -0
  73. package/skills/devbooks-federation/SKILL.md +264 -0
  74. package/skills/devbooks-federation/scripts/federation-check.sh +144 -0
  75. package/skills/devbooks-federation/templates/federation.yaml +89 -0
  76. package/skills/devbooks-impact-analysis/SKILL.md +135 -0
  77. package/skills/devbooks-impact-analysis/references/impact-analysis-prompt.md +82 -0
  78. package/skills/devbooks-impact-analysis/scripts/graph-cache.sh +214 -0
  79. package/skills/devbooks-implementation-plan/SKILL.md +83 -0
  80. package/skills/devbooks-implementation-plan/references/implementation-plan-prompt.md +95 -0
  81. package/skills/devbooks-index-bootstrap/SKILL.md +240 -0
  82. package/skills/devbooks-proposal-author/SKILL.md +83 -0
  83. package/skills/devbooks-proposal-author/references/proposal-authoring-prompt.md +66 -0
  84. package/skills/devbooks-proposal-challenger/SKILL.md +86 -0
  85. package/skills/devbooks-proposal-challenger/references/ethics-and-compliance-checklist.md +176 -0
  86. package/skills/devbooks-proposal-challenger/references/proposal-challenge-prompt.md +57 -0
  87. package/skills/devbooks-proposal-debate-workflow/SKILL.md +78 -0
  88. package/skills/devbooks-proposal-debate-workflow/references/11-proposal-debate-template.md +35 -0
  89. package/skills/devbooks-proposal-debate-workflow/references/proposal-debate-workflow.md +24 -0
  90. package/skills/devbooks-proposal-debate-workflow/scripts/proposal-debate-check.sh +102 -0
  91. package/skills/devbooks-proposal-judge/SKILL.md +78 -0
  92. package/skills/devbooks-proposal-judge/references/proposal-judge-prompt.md +37 -0
  93. package/skills/devbooks-router/SKILL.md +346 -0
  94. package/skills/devbooks-spec-contract/SKILL.md +191 -0
  95. package/skills/devbooks-spec-contract/references/api-design-guide.md +349 -0
  96. package/skills/devbooks-spec-contract/references/contract-and-data-definition-prompt.md +85 -0
  97. package/skills/devbooks-spec-contract/references/implicit-change-detection-prompt.md +183 -0
  98. package/skills/devbooks-spec-contract/references/spec-change-prompt.md +63 -0
  99. package/skills/devbooks-spec-contract/scripts/implicit-change-detect.sh +378 -0
  100. package/skills/devbooks-spec-gardener/SKILL.md +73 -0
  101. package/skills/devbooks-spec-gardener/references/spec-gardener-prompt.md +41 -0
  102. package/skills/devbooks-test-owner/SKILL.md +173 -0
  103. package/skills/devbooks-test-owner/references/9-change-verification-traceability-template.md +133 -0
  104. package/skills/devbooks-test-owner/references/async-system-test-strategy.md +316 -0
  105. package/skills/devbooks-test-owner/references/decoupling-techniques-cheatsheet.md +269 -0
  106. package/skills/devbooks-test-owner/references/test-code-prompt.md +171 -0
  107. package/skills/devbooks-test-owner/references/test-driven-development.md +351 -0
  108. package/skills/devbooks-test-owner/references/test-layering-strategy.md +281 -0
  109. package/skills/devbooks-test-reviewer/SKILL.md +189 -0
  110. package/templates/.devbooks/config.yaml +88 -0
  111. package/templates/claude-commands/devbooks/apply.md +38 -0
  112. package/templates/claude-commands/devbooks/archive.md +33 -0
  113. package/templates/claude-commands/devbooks/backport.md +19 -0
  114. package/templates/claude-commands/devbooks/bootstrap.md +20 -0
  115. package/templates/claude-commands/devbooks/c4.md +20 -0
  116. package/templates/claude-commands/devbooks/challenger.md +19 -0
  117. package/templates/claude-commands/devbooks/code.md +20 -0
  118. package/templates/claude-commands/devbooks/debate.md +20 -0
  119. package/templates/claude-commands/devbooks/delivery.md +20 -0
  120. package/templates/claude-commands/devbooks/design.md +20 -0
  121. package/templates/claude-commands/devbooks/entropy.md +19 -0
  122. package/templates/claude-commands/devbooks/federation.md +19 -0
  123. package/templates/claude-commands/devbooks/gardener.md +19 -0
  124. package/templates/claude-commands/devbooks/impact.md +19 -0
  125. package/templates/claude-commands/devbooks/index.md +19 -0
  126. package/templates/claude-commands/devbooks/judge.md +19 -0
  127. package/templates/claude-commands/devbooks/plan.md +20 -0
  128. package/templates/claude-commands/devbooks/proposal.md +20 -0
  129. package/templates/claude-commands/devbooks/quick.md +43 -0
  130. package/templates/claude-commands/devbooks/review.md +20 -0
  131. package/templates/claude-commands/devbooks/router.md +19 -0
  132. package/templates/claude-commands/devbooks/spec.md +20 -0
  133. package/templates/claude-commands/devbooks/test-review.md +19 -0
  134. package/templates/claude-commands/devbooks/test.md +20 -0
  135. package/templates/dev-playbooks/changes/.gitkeep +1 -0
  136. package/templates/dev-playbooks/constitution.md +116 -0
  137. package/templates/dev-playbooks/project.md +96 -0
  138. package/templates/dev-playbooks/scripts/.gitkeep +1 -0
  139. package/templates/dev-playbooks/specs/_meta/anti-patterns/.gitkeep +2 -0
  140. package/templates/dev-playbooks/specs/_meta/glossary.md +48 -0
  141. package/templates/dev-playbooks/specs/_meta/project-profile.md +79 -0
  142. package/templates/dev-playbooks/specs/architecture/fitness-rules.md +95 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DevBooks Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,463 @@
1
+ # DevBooks
2
+
3
+ **Agentic AI Development Workflow for Claude Code / Codex CLI**
4
+
5
+ > Transform large changes into controllable, traceable, and verifiable closed loops: Skills + Quality Gates + Role Isolation.
6
+
7
+ [![npm](https://img.shields.io/npm/v/dev-playbooks)](https://www.npmjs.com/package/dev-playbooks)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
9
+
10
+ ---
11
+
12
+ ## Why DevBooks?
13
+
14
+ AI coding assistants are powerful, but often **unpredictable**:
15
+
16
+ | Pain Point | Consequence |
17
+ |------------|-------------|
18
+ | **AI self-declares "done"** | Tests actually fail, edge cases missed |
19
+ | **Same conversation writes tests and code** | Tests become "pass-through tests", not spec verification |
20
+ | **No verification gates** | False completions silently enter production |
21
+ | **Only supports 0→1 projects** | No way to onboard legacy codebases |
22
+ | **Too few commands** | Complex changes need more than "spec/apply/archive" |
23
+
24
+ **DevBooks Solutions**:
25
+ - **Evidence-based completion**: Completion defined by tests/builds/evidence, not AI self-assessment
26
+ - **Mandatory role isolation**: Test Owner and Coder must work in separate conversations
27
+ - **Multiple quality gates**: Green evidence checks, task completion rate, role boundary checks
28
+ - **21 Skills**: Covering proposals, design, debate, review, entropy metrics, federation analysis, and more
29
+
30
+ ---
31
+
32
+ ## DevBooks Comparison
33
+
34
+ | Dimension | DevBooks | OpenSpec | spec-kit | No Spec |
35
+ |-----------|----------|----------|----------|---------|
36
+ | **Spec-driven** | Yes | Yes | Yes | No |
37
+ | **Legacy project support** | Auto-generate baseline | Manual | Limited | - |
38
+ | **Completion definition** | Test+build evidence | AI self-assessment | AI self-assessment | AI self-assessment |
39
+ | **Code quality assurance** | Entropy metrics+gates | None | None | None |
40
+ | **Test/implementation separation** | Mandatory isolation | None | None | None |
41
+ | **Change traceability** | Change package archive | Feature folders | Spec files | None |
42
+ | **Workflow complexity** | High (21 Skills) | Low (3 commands) | Medium (~5 commands) | None |
43
+ | **Learning curve** | Steep | Gentle | Medium | None |
44
+ | **Best for** | Large/critical changes | Lightweight changes | 0→1 projects | Simple tasks |
45
+
46
+ ---
47
+
48
+ ## How It Works
49
+
50
+ ```
51
+ DevBooks Workflow
52
+
53
+ PROPOSAL Phase APPLY Phase ARCHIVE Phase
54
+ (No coding) (Role isolation enforced) (Quality gates)
55
+
56
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
57
+ │ /devbooks: │ │ Session A │ │ /devbooks: │
58
+ │ proposal │ │ ┌───────────┐ │ │ gardener │
59
+ │ impact │─────────│ │Test Owner │ │────────────│ delivery │
60
+ │ design │ │ │(Run Red │ │ │ │
61
+ │ spec │ │ │ first) │ │ │ Quality Gates: │
62
+ │ plan │ │ └───────────┘ │ │ ✓ Green evidence│
63
+ └─────────────────┘ │ │ │ ✓ Task complete │
64
+ │ │ Session B │ │ ✓ Role boundary │
65
+ ▼ │ ┌───────────┐ │ │ ✓ No failures │
66
+ ┌─────────────────┐ │ │ Coder │ │ └─────────────────┘
67
+ │ Triangle Debate │ │ │(Cannot │ │
68
+ │ Author/Challenger│ │ │edit tests)│ │
69
+ │ /Judge │ │ └───────────┘ │
70
+ └─────────────────┘ └─────────────────┘
71
+ ```
72
+
73
+ **Core Constraint**: Test Owner and Coder **must work in separate conversations**. This is a hard constraint, not a suggestion. Coder cannot modify `tests/**`; completion is verified by tests/builds, not AI self-assessment.
74
+
75
+ ---
76
+
77
+ ## Quick Start
78
+
79
+ ### Supported AI Tools
80
+
81
+ | Tool | Slash Commands | Natural Language | Config File |
82
+ |------|----------------|------------------|-------------|
83
+ | **Claude Code** | `/devbooks:*` | Supported | `CLAUDE.md` |
84
+ | **Codex CLI** | `/devbooks:*` | Supported | `AGENTS.md` |
85
+ | **Cursor** | - | Supported | `.cursorrules` |
86
+ | **Windsurf** | - | Supported | `.windsurfrules` |
87
+ | **Continue.dev** | - | Supported | `.continuerules` |
88
+ | **GitHub Copilot** | - | Supported | `.github/copilot-instructions.md` |
89
+ | **Gemini Code Assist** | - | Supported | - |
90
+ | **Aider** | - | Supported | `.aider.conf.yml` |
91
+ | **Cline** | - | Supported | `.clinerules` |
92
+
93
+ > **Tip**: For tools without Slash command support, use natural language, e.g., "Run DevBooks proposal skill..."
94
+
95
+ ### Installation
96
+
97
+ **npm install (recommended):**
98
+
99
+ ```bash
100
+ # Global install
101
+ npm install -g dev-playbooks
102
+
103
+ # Initialize in your project
104
+ dev-playbooks init
105
+ ```
106
+
107
+ **One-off usage:**
108
+
109
+ ```bash
110
+ npx dev-playbooks@latest init
111
+ ```
112
+
113
+ **Install from source (contributors):**
114
+
115
+ ```bash
116
+ ./scripts/install-skills.sh
117
+ ```
118
+
119
+ ### Installation Locations
120
+
121
+ After initialization:
122
+ - Claude Code: `~/.claude/skills/devbooks-*`
123
+ - Codex CLI: `$CODEX_HOME/skills/devbooks-*` (default `~/.codex/skills/devbooks-*`)
124
+
125
+ ### Quick Integration
126
+
127
+ DevBooks uses two directory roots:
128
+
129
+ | Directory | Purpose | Default |
130
+ |-----------|---------|---------|
131
+ | `<truth-root>` | Current specs (read-only truth) | `dev-playbooks/specs/` |
132
+ | `<change-root>` | Change packages (workspace) | `dev-playbooks/changes/` |
133
+
134
+ See `docs/devbooks-integration-template.md` or use `docs/installation-prompt.md` to let AI auto-configure.
135
+
136
+ ---
137
+
138
+ ## Daily Change Workflow
139
+
140
+ ### Using Router (Recommended)
141
+
142
+ ```
143
+ /devbooks:router <your requirement>
144
+ ```
145
+
146
+ Router analyzes requirements and outputs an execution plan, telling you which command to use next.
147
+
148
+ ### Direct Commands
149
+
150
+ Once familiar with the flow, call Skills directly:
151
+
152
+ **1. Proposal Phase (No coding)**
153
+
154
+ ```
155
+ /devbooks:proposal Add OAuth2 user authentication
156
+ ```
157
+
158
+ Artifacts: `proposal.md` (required), `design.md`, `tasks.md`
159
+
160
+ **2. Apply Phase (Mandatory role isolation)**
161
+
162
+ Must open **2 separate conversations**:
163
+
164
+ ```
165
+ # Session A - Test Owner
166
+ /devbooks:test add-oauth2
167
+
168
+ # Session B - Coder
169
+ /devbooks:code add-oauth2
170
+ ```
171
+
172
+ - Test Owner: Write `verification.md` + tests, run **Red** first
173
+ - Coder: Implement per `tasks.md`, make gates **Green** (cannot modify tests)
174
+
175
+ **3. Review Phase**
176
+
177
+ ```
178
+ /devbooks:review add-oauth2
179
+ ```
180
+
181
+ **4. Archive Phase**
182
+
183
+ ```
184
+ /devbooks:gardener add-oauth2
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Command Reference
190
+
191
+ ### Proposal Phase
192
+
193
+ | Command | Skill | Description |
194
+ |---------|-------|-------------|
195
+ | `/devbooks:router` | devbooks-router | Smart routing to appropriate Skill |
196
+ | `/devbooks:proposal` | devbooks-proposal-author | Create change proposal |
197
+ | `/devbooks:impact` | devbooks-impact-analysis | Cross-module impact analysis |
198
+ | `/devbooks:challenger` | devbooks-proposal-challenger | Challenge and critique proposal |
199
+ | `/devbooks:judge` | devbooks-proposal-judge | Judge proposal |
200
+ | `/devbooks:debate` | devbooks-proposal-debate-workflow | Triangle debate (Author/Challenger/Judge) |
201
+ | `/devbooks:design` | devbooks-design-doc | Create design document |
202
+ | `/devbooks:spec` | devbooks-spec-contract | Define specs and contracts |
203
+ | `/devbooks:c4` | devbooks-c4-map | Generate C4 architecture map |
204
+ | `/devbooks:plan` | devbooks-implementation-plan | Create implementation plan |
205
+
206
+ ### Apply Phase
207
+
208
+ | Command | Skill | Description |
209
+ |---------|-------|-------------|
210
+ | `/devbooks:test` | devbooks-test-owner | Test Owner role (separate conversation required) |
211
+ | `/devbooks:code` | devbooks-coder | Coder role (separate conversation required) |
212
+ | `/devbooks:backport` | devbooks-design-backport | Backport findings to design document |
213
+
214
+ ### Review Phase
215
+
216
+ | Command | Skill | Description |
217
+ |---------|-------|-------------|
218
+ | `/devbooks:review` | devbooks-code-review | Code review (readability/consistency) |
219
+ | `/devbooks:test-review` | devbooks-test-reviewer | Test quality and coverage review |
220
+
221
+ ### Archive Phase
222
+
223
+ | Command | Skill | Description |
224
+ |---------|-------|-------------|
225
+ | `/devbooks:gardener` | devbooks-spec-gardener | Spec maintenance and deduplication |
226
+ | `/devbooks:delivery` | devbooks-delivery-workflow | Complete delivery closed loop |
227
+
228
+ ### Standalone Skills
229
+
230
+ | Command | Skill | Description |
231
+ |---------|-------|-------------|
232
+ | `/devbooks:entropy` | devbooks-entropy-monitor | System entropy metrics |
233
+ | `/devbooks:federation` | devbooks-federation | Cross-repo federation analysis |
234
+ | `/devbooks:bootstrap` | devbooks-brownfield-bootstrap | Legacy project initialization |
235
+ | `/devbooks:index` | devbooks-index-bootstrap | Generate SCIP index |
236
+
237
+ ---
238
+
239
+ ## Advanced Features
240
+
241
+ <details>
242
+ <summary><strong>Detailed Comparison with Other Tools</strong></summary>
243
+
244
+ ### vs. OpenSpec
245
+
246
+ [OpenSpec](https://github.com/Fission-AI/OpenSpec) is a lightweight spec-driven framework using three core commands (proposal/apply/archive) to align humans and AI, organizing changes by feature folders.
247
+
248
+ **DevBooks adds:**
249
+ - **Role isolation**: Hard boundary between Test Owner and Coder (separate conversations required)
250
+ - **Quality gates**: 5+ verification gates to catch false completions
251
+ - **21 Skills**: Covering proposals, debate, review, entropy metrics, federation analysis
252
+ - **Evidence-based completion**: Tests/builds define "done", not AI self-assessment
253
+
254
+ **Choose OpenSpec**: Simple spec-driven changes, need lightweight workflow.
255
+
256
+ **Choose DevBooks**: Large changes, need role separation and quality verification.
257
+
258
+ ### vs. spec-kit
259
+
260
+ [GitHub spec-kit](https://github.com/github/spec-kit) provides a spec-driven development toolkit with constitution files, multi-step refinement, and structured planning.
261
+
262
+ **DevBooks adds:**
263
+ - **Legacy-first**: Auto-generate baseline specs for existing codebases
264
+ - **Role isolation**: Mandatory separation of test writing and implementation
265
+ - **Quality gates**: Runtime verification, not just workflow guidance
266
+ - **Prototype mode**: Safe experimentation without polluting main src/
267
+
268
+ **Choose spec-kit**: 0→1 greenfield projects, using supported AI tools.
269
+
270
+ **Choose DevBooks**: Legacy projects or need mandatory quality gates.
271
+
272
+ ### vs. Kiro.dev
273
+
274
+ [Kiro](https://kiro.dev/) is AWS's agentic IDE using a three-phase workflow (EARS format requirements, design, tasks), but stores specs and implementation artifacts separately.
275
+
276
+ **DevBooks differences:**
277
+ - **Change packages**: Each change contains proposal/design/spec/plan/verification/evidence, entire lifecycle traceable in one location
278
+ - **Role isolation**: Mandatory separation of Test Owner and Coder
279
+ - **Quality gates**: Verification through gates, not just task completion
280
+
281
+ **Choose Kiro**: Want integrated IDE experience and AWS ecosystem.
282
+
283
+ **Choose DevBooks**: Want change packages bundling all artifacts with mandatory role boundaries.
284
+
285
+ ### vs. No Spec
286
+
287
+ Without specs, AI generates code from vague prompts, leading to unpredictable outputs, scope creep, and "hallucinated completions".
288
+
289
+ **DevBooks provides:**
290
+ - Agreed specs before implementation
291
+ - Quality gates to verify real completion
292
+ - Role isolation to prevent self-validation
293
+ - Evidence chain for every change
294
+
295
+ </details>
296
+
297
+ <details>
298
+ <summary><strong>Quality Gates</strong></summary>
299
+
300
+ DevBooks provides quality gates to catch "false completions":
301
+
302
+ | Gate | Trigger Mode | Check Content |
303
+ |------|--------------|---------------|
304
+ | Green Evidence Check | archive, strict | `evidence/green-final/` exists and non-empty |
305
+ | Task Completion Check | strict | All tasks in tasks.md complete or SKIP-APPROVED |
306
+ | Test Failure Interception | archive, strict | No failure patterns in Green evidence |
307
+ | P0 Skip Approval | strict | P0 task skips must have approval record |
308
+ | Role Boundary Check | apply --role | Coder cannot modify tests/, Test Owner cannot modify src/ |
309
+
310
+ **Core Scripts:**
311
+ - `change-check.sh --mode proposal|apply|archive|strict`
312
+ - `handoff-check.sh` - Role handoff verification
313
+ - `audit-scope.sh` - Full audit scan
314
+ - `progress-dashboard.sh` - Progress visualization
315
+
316
+ </details>
317
+
318
+ <details>
319
+ <summary><strong>Prototype Mode</strong></summary>
320
+
321
+ When technical approach is uncertain:
322
+
323
+ 1. Create prototype: `change-scaffold.sh <change-id> --prototype`
324
+ 2. Test Owner uses `--prototype`: Characterization tests (no Red baseline needed)
325
+ 3. Coder uses `--prototype`: Output to `prototype/src/` (isolated from main src)
326
+ 4. Promote or discard: `prototype-promote.sh <change-id>`
327
+
328
+ Prototype mode prevents experimental code from polluting main source tree.
329
+
330
+ </details>
331
+
332
+ <details>
333
+ <summary><strong>Entropy Metrics Monitoring</strong></summary>
334
+
335
+ DevBooks tracks four-dimensional system entropy:
336
+
337
+ | Metric | What It Measures |
338
+ |--------|------------------|
339
+ | Structural Entropy | Module complexity and coupling |
340
+ | Change Entropy | Churn and volatility patterns |
341
+ | Test Entropy | Test coverage and quality decay |
342
+ | Dependency Entropy | External dependency health |
343
+
344
+ Use `/devbooks:entropy` to generate reports and identify refactoring opportunities.
345
+
346
+ Tools: `tools/devbooks-complexity.sh`, `tools/devbooks-entropy-viz.sh`
347
+
348
+ </details>
349
+
350
+ <details>
351
+ <summary><strong>Legacy Project Initialization</strong></summary>
352
+
353
+ When `<truth-root>` is empty:
354
+
355
+ ```
356
+ /devbooks:bootstrap
357
+ ```
358
+
359
+ Generates:
360
+ - Project profile and glossary
361
+ - Baseline specs from existing code
362
+ - Minimal verification anchors
363
+ - Module dependency graph
364
+ - Tech debt hotspots
365
+
366
+ </details>
367
+
368
+ <details>
369
+ <summary><strong>Cross-Repository Federation</strong></summary>
370
+
371
+ Multi-repository analysis:
372
+
373
+ ```
374
+ /devbooks:federation
375
+ ```
376
+
377
+ Analyzes contracts and dependencies across repository boundaries, supporting coordinated changes.
378
+
379
+ </details>
380
+
381
+ <details>
382
+ <summary><strong>MCP Code Intelligence Enhancement</strong></summary>
383
+
384
+ DevBooks connects to CKB (Code Knowledge Base) service via MCP (Model Context Protocol), providing AI with **semantic-level code understanding**, not just text search.
385
+
386
+ **CKB Capabilities:**
387
+
388
+ | Capability | Description | Typical Scenario |
389
+ |------------|-------------|------------------|
390
+ | **Impact Analysis** | Analyze propagation range and risk of symbol changes | Assess downstream impact before modifying interfaces |
391
+ | **Call Graph** | Trace function call chains and dependencies | Understand code execution paths |
392
+ | **Hotspot Discovery** | Identify high-churn, high-coupling code areas | Prioritize refactoring |
393
+ | **Symbol References** | Precisely find all usage locations of symbols | Confirm impact scope before renaming |
394
+
395
+ **Graceful Degradation:**
396
+
397
+ | Environment | Behavior |
398
+ |-------------|----------|
399
+ | CKB Available | Semantic analysis mode: Use graph-based tools for precise analysis |
400
+ | CKB Unavailable | Text search mode: Fall back to Grep + Glob (full functionality, reduced precision) |
401
+
402
+ Auto-detection with 2-second timeout. No manual configuration needed. Recommend configuring CKB for best code understanding.
403
+
404
+ </details>
405
+
406
+ <details>
407
+ <summary><strong>Proposal Debate Workflow</strong></summary>
408
+
409
+ Rigorous proposal review using triangle debate:
410
+
411
+ ```
412
+ /devbooks:debate
413
+ ```
414
+
415
+ Three roles:
416
+ 1. **Author**: Create and defend proposal
417
+ 2. **Challenger**: Question assumptions, find gaps, identify risks
418
+ 3. **Judge**: Make final decision, record rationale
419
+
420
+ Decision outcomes: `Approved`, `Revise`, `Rejected`
421
+
422
+ </details>
423
+
424
+ ---
425
+
426
+ ## Repository Structure
427
+
428
+ ```
429
+ skills/ # 21 devbooks-* Skills source code
430
+ templates/ # Project initialization templates
431
+ scripts/ # Installation and helper scripts
432
+ tools/ # Complexity and entropy metrics tools
433
+ docs/ # Supporting documentation
434
+ bin/ # CLI entry point
435
+ ```
436
+
437
+ ---
438
+
439
+ ## Documentation
440
+
441
+ - [Slash Commands Guide](docs/slash-commands-guide.md)
442
+ - [Skills Usage Guide](skills/Skills-Usage-Guide.md)
443
+ - [MCP Configuration](docs/Recommended-MCP.md)
444
+ - [Integration Template](docs/devbooks-integration-template.md)
445
+ - [Installation Prompt](docs/installation-prompt.md)
446
+
447
+ ---
448
+
449
+ ## Design Principles
450
+
451
+ | Principle | Description |
452
+ |-----------|-------------|
453
+ | **Protocol First** | Truth/changes/archives written to project, not just in chat |
454
+ | **Anchor First** | Completion defined by tests, static analysis, builds, and evidence |
455
+ | **Role Isolation** | Test Owner and Coder must work in separate conversations |
456
+ | **Truth Source Separation** | `<truth-root>` is read-only truth; `<change-root>` is temporary workspace |
457
+ | **Structure Gating** | Prioritize complexity/coupling/test quality over proxy metrics |
458
+
459
+ ---
460
+
461
+ ## License
462
+
463
+ MIT