dev-playbooks-cn 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.
- package/LICENSE +21 -0
- package/README.md +466 -0
- package/bin/devbooks.js +987 -0
- package/package.json +43 -0
- package/skills/Skills/344/275/277/347/224/250/350/257/264/346/230/216.md +446 -0
- package/skills/Skill/345/274/200/345/217/221/346/214/207/345/215/227.md +248 -0
- package/skills/_shared/context-detection-template.md +315 -0
- package/skills/_shared/mcp-enhancement-template.md +144 -0
- package/skills/_shared/references//351/200/232/347/224/250/345/256/210/351/227/250/345/215/217/350/256/256.md +114 -0
- package/skills/_template/config-discovery-template.md +126 -0
- package/skills/devbooks-brownfield-bootstrap/SKILL.md +167 -0
- package/skills/devbooks-brownfield-bootstrap/references//344/273/243/347/240/201/345/257/274/350/210/252/347/255/226/347/225/245.md +203 -0
- package/skills/devbooks-brownfield-bootstrap/references//345/255/230/351/207/217/351/241/271/347/233/256/345/210/235/345/247/213/345/214/226.md +96 -0
- package/skills/devbooks-brownfield-bootstrap/references//345/255/230/351/207/217/351/241/271/347/233/256/345/210/235/345/247/213/345/214/226/346/217/220/347/244/272/350/257/215.md +115 -0
- package/skills/devbooks-brownfield-bootstrap/references//346/234/257/350/257/255/350/241/250/346/250/241/346/235/277.md +42 -0
- package/skills/devbooks-brownfield-bootstrap/scripts/cod-update.sh +357 -0
- package/skills/devbooks-brownfield-bootstrap/templates/project-profile-template.md +172 -0
- package/skills/devbooks-c4-map/SKILL.md +151 -0
- package/skills/devbooks-c4-map/references/C4/346/236/266/346/236/204/345/234/260/345/233/276/346/217/220/347/244/272/350/257/215.md +33 -0
- package/skills/devbooks-c4-map/references//345/210/206/345/261/202/347/272/246/346/235/237/346/243/200/346/237/245/346/270/205/345/215/225.md +185 -0
- package/skills/devbooks-code-review/SKILL.md +175 -0
- package/skills/devbooks-code-review/references/PR/346/250/241/346/235/277/344/270/216/346/214/207/345/215/227.md +321 -0
- package/skills/devbooks-code-review/references//344/273/243/347/240/201/350/257/204/345/256/241/346/217/220/347/244/272/350/257/215.md +100 -0
- package/skills/devbooks-code-review/references//345/235/217/345/221/263/351/201/223/351/200/237/346/237/245/350/241/250.md +495 -0
- package/skills/devbooks-code-review/references//350/265/204/346/272/220/347/256/241/347/220/206/345/256/241/346/237/245/346/270/205/345/215/225.md +311 -0
- package/skills/devbooks-coder/SKILL.md +219 -0
- package/skills/devbooks-coder/references//344/273/243/347/240/201/345/256/236/347/216/260/346/217/220/347/244/272/350/257/215.md +70 -0
- package/skills/devbooks-coder/references//344/275/216/351/243/216/351/231/251/346/224/271/345/212/250/346/212/200/346/234/257.md +275 -0
- package/skills/devbooks-coder/references//346/227/245/345/277/227/350/247/204/350/214/203.md +329 -0
- package/skills/devbooks-coder/references//347/274/226/347/240/201/351/243/216/346/240/274/347/273/206/345/210/231.md +351 -0
- package/skills/devbooks-coder/references//351/224/231/350/257/257/347/240/201/350/247/204/350/214/203.md +463 -0
- package/skills/devbooks-delivery-workflow/SKILL.md +217 -0
- package/skills/devbooks-delivery-workflow/references//344/272/244/344/273/230/351/252/214/346/224/266/345/267/245/344/275/234/346/265/201.md +256 -0
- package/skills/devbooks-delivery-workflow/references//345/216/237/345/236/213-/347/224/237/344/272/247/345/217/214/350/275/250/346/250/241/345/274/217.md +168 -0
- package/skills/devbooks-delivery-workflow/references//345/217/230/346/233/264/351/252/214/350/257/201/344/270/216/350/277/275/346/272/257/346/250/241/346/235/277.md +133 -0
- package/skills/devbooks-delivery-workflow/scripts/ac-trace-check.sh +330 -0
- package/skills/devbooks-delivery-workflow/scripts/audit-scope.sh +262 -0
- package/skills/devbooks-delivery-workflow/scripts/change-check.sh +1040 -0
- package/skills/devbooks-delivery-workflow/scripts/change-codemod-scaffold.sh +135 -0
- package/skills/devbooks-delivery-workflow/scripts/change-evidence.sh +152 -0
- package/skills/devbooks-delivery-workflow/scripts/change-scaffold.sh +442 -0
- package/skills/devbooks-delivery-workflow/scripts/change-spec-delta-scaffold.sh +136 -0
- package/skills/devbooks-delivery-workflow/scripts/constitution-check.sh +237 -0
- package/skills/devbooks-delivery-workflow/scripts/env-match-check.sh +128 -0
- package/skills/devbooks-delivery-workflow/scripts/fitness-check.sh +387 -0
- package/skills/devbooks-delivery-workflow/scripts/guardrail-check.sh +519 -0
- package/skills/devbooks-delivery-workflow/scripts/handoff-check.sh +141 -0
- package/skills/devbooks-delivery-workflow/scripts/hygiene-check.sh +340 -0
- package/skills/devbooks-delivery-workflow/scripts/migrate-from-openspec.sh +385 -0
- package/skills/devbooks-delivery-workflow/scripts/migrate-to-v2-gates.sh +202 -0
- package/skills/devbooks-delivery-workflow/scripts/progress-dashboard.sh +319 -0
- package/skills/devbooks-delivery-workflow/scripts/prototype-promote.sh +341 -0
- package/skills/devbooks-delivery-workflow/scripts/spec-preview.sh +203 -0
- package/skills/devbooks-delivery-workflow/scripts/spec-promote.sh +118 -0
- package/skills/devbooks-delivery-workflow/scripts/spec-rollback.sh +124 -0
- package/skills/devbooks-delivery-workflow/scripts/spec-stage.sh +117 -0
- package/skills/devbooks-delivery-workflow/scripts/verify-all.sh +78 -0
- package/skills/devbooks-delivery-workflow/scripts/verify-npm-package.sh +123 -0
- package/skills/devbooks-delivery-workflow/scripts/verify-openspec-free.sh +81 -0
- package/skills/devbooks-delivery-workflow/scripts/verify-slash-commands.sh +146 -0
- package/skills/devbooks-delivery-workflow/templates/handoff.md +50 -0
- package/skills/devbooks-design-backport/SKILL.md +73 -0
- package/skills/devbooks-design-backport/references//345/233/236/345/206/231/350/256/276/350/256/241/346/226/207/346/241/243/346/217/220/347/244/272/350/257/215.md +196 -0
- package/skills/devbooks-design-doc/SKILL.md +121 -0
- package/skills/devbooks-design-doc/references//345/276/256/346/234/215/345/212/241/350/256/276/350/256/241/346/270/205/345/215/225.md +149 -0
- package/skills/devbooks-design-doc/references//350/256/276/350/256/241/346/226/207/346/241/243/346/217/220/347/244/272/350/257/215.md +189 -0
- package/skills/devbooks-design-doc/references//351/232/220/347/247/201/345/220/210/350/247/204/346/243/200/346/237/245/346/270/205/345/215/225.md +240 -0
- package/skills/devbooks-entropy-monitor/SKILL.md +188 -0
- package/skills/devbooks-entropy-monitor/references//347/206/265/345/272/246/351/207/217/346/226/271/346/263/225/350/256/272.md +223 -0
- package/skills/devbooks-entropy-monitor/scripts/entropy-measure.sh +449 -0
- package/skills/devbooks-entropy-monitor/scripts/entropy-report.sh +303 -0
- package/skills/devbooks-entropy-monitor/templates/thresholds.json +99 -0
- package/skills/devbooks-federation/SKILL.md +264 -0
- package/skills/devbooks-federation/scripts/federation-check.sh +144 -0
- package/skills/devbooks-federation/templates/federation.yaml +89 -0
- package/skills/devbooks-impact-analysis/SKILL.md +135 -0
- package/skills/devbooks-impact-analysis/references//345/275/261/345/223/215/345/210/206/346/236/220/346/217/220/347/244/272/350/257/215.md +82 -0
- package/skills/devbooks-impact-analysis/scripts/graph-cache.sh +214 -0
- package/skills/devbooks-implementation-plan/SKILL.md +83 -0
- package/skills/devbooks-implementation-plan/references//347/274/226/347/240/201/350/256/241/345/210/222/346/217/220/347/244/272/350/257/215.md +99 -0
- package/skills/devbooks-index-bootstrap/SKILL.md +240 -0
- package/skills/devbooks-proposal-author/SKILL.md +83 -0
- package/skills/devbooks-proposal-author/references//346/217/220/346/241/210/346/222/260/345/206/231/346/217/220/347/244/272/350/257/215.md +66 -0
- package/skills/devbooks-proposal-challenger/SKILL.md +86 -0
- package/skills/devbooks-proposal-challenger/references//344/274/246/347/220/206/344/270/216/345/220/210/350/247/204/346/243/200/346/237/245/346/270/205/345/215/225.md +176 -0
- package/skills/devbooks-proposal-challenger/references//346/217/220/346/241/210/350/264/250/347/226/221/346/217/220/347/244/272/350/257/215.md +57 -0
- package/skills/devbooks-proposal-debate-workflow/SKILL.md +78 -0
- package/skills/devbooks-proposal-debate-workflow/references//346/217/220/346/241/210/345/257/271/350/276/251/345/267/245/344/275/234/346/265/201.md +24 -0
- package/skills/devbooks-proposal-debate-workflow/references//346/217/220/346/241/210/345/257/271/350/276/251/346/250/241/346/235/277.md +35 -0
- package/skills/devbooks-proposal-debate-workflow/scripts/proposal-debate-check.sh +102 -0
- package/skills/devbooks-proposal-judge/SKILL.md +78 -0
- package/skills/devbooks-proposal-judge/references//346/217/220/346/241/210/350/243/201/345/206/263/346/217/220/347/244/272/350/257/215.md +37 -0
- package/skills/devbooks-router/SKILL.md +346 -0
- package/skills/devbooks-spec-contract/SKILL.md +191 -0
- package/skills/devbooks-spec-contract/references/API/350/256/276/350/256/241/346/214/207/345/215/227.md +349 -0
- package/skills/devbooks-spec-contract/references//345/245/221/347/272/246/344/270/216/346/225/260/346/215/256/345/256/232/344/271/211/346/217/220/347/244/272/350/257/215.md +85 -0
- package/skills/devbooks-spec-contract/references//350/247/204/346/240/274/345/217/230/346/233/264/346/217/220/347/244/272/350/257/215.md +63 -0
- package/skills/devbooks-spec-contract/references//351/232/220/345/274/217/345/217/230/346/233/264/346/243/200/346/265/213/346/217/220/347/244/272/350/257/215.md +183 -0
- package/skills/devbooks-spec-contract/scripts/implicit-change-detect.sh +378 -0
- package/skills/devbooks-spec-gardener/SKILL.md +72 -0
- package/skills/devbooks-spec-gardener/references//350/247/204/346/240/274/345/233/255/344/270/201/346/217/220/347/244/272/350/257/215.md +41 -0
- package/skills/devbooks-test-owner/SKILL.md +172 -0
- package/skills/devbooks-test-owner/references//345/217/230/346/233/264/351/252/214/350/257/201/344/270/216/350/277/275/346/272/257/346/250/241/346/235/277.md +228 -0
- package/skills/devbooks-test-owner/references//345/274/202/346/255/245/347/263/273/347/273/237/346/265/213/350/257/225/347/255/226/347/225/245.md +316 -0
- package/skills/devbooks-test-owner/references//346/265/213/350/257/225/344/273/243/347/240/201/346/217/220/347/244/272/350/257/215.md +208 -0
- package/skills/devbooks-test-owner/references//346/265/213/350/257/225/345/210/206/345/261/202/347/255/226/347/225/245.md +281 -0
- package/skills/devbooks-test-owner/references//346/265/213/350/257/225/351/251/261/345/212/250.md +394 -0
- package/skills/devbooks-test-owner/references//350/247/243/344/276/235/350/265/226/346/212/200/346/234/257/351/200/237/346/237/245/350/241/250.md +432 -0
- package/skills/devbooks-test-reviewer/SKILL.md +189 -0
- package/templates/.devbooks/config.yaml +88 -0
- package/templates/claude-commands/devbooks/apply.md +38 -0
- package/templates/claude-commands/devbooks/archive.md +33 -0
- package/templates/claude-commands/devbooks/backport.md +19 -0
- package/templates/claude-commands/devbooks/bootstrap.md +19 -0
- package/templates/claude-commands/devbooks/c4.md +19 -0
- package/templates/claude-commands/devbooks/challenger.md +19 -0
- package/templates/claude-commands/devbooks/code.md +19 -0
- package/templates/claude-commands/devbooks/debate.md +19 -0
- package/templates/claude-commands/devbooks/delivery.md +19 -0
- package/templates/claude-commands/devbooks/design.md +19 -0
- package/templates/claude-commands/devbooks/entropy.md +19 -0
- package/templates/claude-commands/devbooks/federation.md +19 -0
- package/templates/claude-commands/devbooks/gardener.md +19 -0
- package/templates/claude-commands/devbooks/impact.md +19 -0
- package/templates/claude-commands/devbooks/index.md +19 -0
- package/templates/claude-commands/devbooks/judge.md +19 -0
- package/templates/claude-commands/devbooks/plan.md +19 -0
- package/templates/claude-commands/devbooks/proposal.md +19 -0
- package/templates/claude-commands/devbooks/quick.md +42 -0
- package/templates/claude-commands/devbooks/review.md +19 -0
- package/templates/claude-commands/devbooks/router.md +19 -0
- package/templates/claude-commands/devbooks/spec.md +19 -0
- package/templates/claude-commands/devbooks/test-review.md +19 -0
- package/templates/claude-commands/devbooks/test.md +19 -0
- package/templates/dev-playbooks/README.md +458 -0
- package/templates/dev-playbooks/changes/.gitkeep +1 -0
- package/templates/dev-playbooks/constitution.md +116 -0
- package/templates/dev-playbooks/project.md +96 -0
- package/templates/dev-playbooks/scripts/.gitkeep +1 -0
- package/templates/dev-playbooks/specs/_meta/anti-patterns/.gitkeep +2 -0
- package/templates/dev-playbooks/specs/_meta/glossary.md +47 -0
- package/templates/dev-playbooks/specs/_meta/project-profile.md +79 -0
- package/templates/dev-playbooks/specs/architecture/fitness-rules.md +95 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
# DevBooks
|
|
2
|
+
|
|
3
|
+
**An agentic AI development workflow for Claude Code / Codex CLI**
|
|
4
|
+
|
|
5
|
+
> Turn large changes into a controlled, traceable, verifiable loop: Skills + quality gates + role isolation.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/dev-playbooks-cn)
|
|
8
|
+
[](../LICENSE)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Why DevBooks?
|
|
13
|
+
|
|
14
|
+
AI coding assistants are powerful, but often **unpredictable**:
|
|
15
|
+
|
|
16
|
+
| Pain point | Outcome |
|
|
17
|
+
|------|------|
|
|
18
|
+
| **AI self-declares "done"** | Tests fail, edge cases are missed |
|
|
19
|
+
| **Writing tests and code in the same chat** | Tests turn into “pass tests” instead of spec verification |
|
|
20
|
+
| **No verification gates** | False completion silently ships |
|
|
21
|
+
| **Only works for greenfield (0→1)** | Brownfield repos have no on-ramp |
|
|
22
|
+
| **Too few commands** | Complex changes are not just "spec/apply/archive" |
|
|
23
|
+
|
|
24
|
+
**DevBooks provides**:
|
|
25
|
+
- **Evidence-based done**: completion is defined by tests/build/evidence, not AI self-evaluation
|
|
26
|
+
- **Enforced role isolation**: Test Owner and Coder must work in separate conversations
|
|
27
|
+
- **Multiple quality gates**: green evidence checks, task completion, role boundary checks
|
|
28
|
+
- **21 Skills**: proposal, design, debate, review, entropy metrics, federation, and more
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## DevBooks At a Glance (Comparison)
|
|
33
|
+
|
|
34
|
+
| Dimension | DevBooks | OpenSpec | spec-kit | No spec |
|
|
35
|
+
|------|----------|----------|----------|--------|
|
|
36
|
+
| Spec-driven workflow | Yes | Yes | Yes | No |
|
|
37
|
+
| Artifact traceability | Change package (proposal/design/spec/tasks/verification/evidence) | Mostly folder/file organization | Docs + tasks orchestration | None |
|
|
38
|
+
| Role & responsibility boundaries | **Enforced** (Test Owner / Coder) | Convention-based (not enforced) | Convention-based (not enforced) | None |
|
|
39
|
+
| Definition of Done (DoD) | **Evidence + gates** (tests/build/audit) | Manual definition/checks | Manual definition/checks | Often subjective |
|
|
40
|
+
| Code quality assurance | Gates + metrics (entropy/hotspots) + review roles | External tools / manual review | External tools / manual review | Unstable |
|
|
41
|
+
| Impact analysis | CKB graph capability (falls back to grep) | Text search / manual reasoning | Text search / manual reasoning | Easy to miss |
|
|
42
|
+
| Brownfield onboarding | Baseline specs/glossary/minimal verification anchors | Manual | Limited | - |
|
|
43
|
+
| Automation coverage | 21 Skills (proposal→implementation→archive loop) | 3 core commands | Toolkit (greenfield-leaning) | - |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## How It Works
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
DevBooks Workflow
|
|
51
|
+
|
|
52
|
+
PROPOSAL stage APPLY stage ARCHIVE stage
|
|
53
|
+
(no coding) (role isolation enforced) (quality gates)
|
|
54
|
+
|
|
55
|
+
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
56
|
+
│ /devbooks: │ │ Chat A │ │ /devbooks: │
|
|
57
|
+
│ proposal │ │ ┌───────────┐ │ │ gardener │
|
|
58
|
+
│ impact │────────────│ │Test Owner │ │──────────────│ delivery │
|
|
59
|
+
│ design │ │ │(Red first)│ │ │ │
|
|
60
|
+
│ spec │ │ └───────────┘ │ │ Gates: │
|
|
61
|
+
│ plan │ │ │ │ ✓ Green evidence│
|
|
62
|
+
└─────────────────┘ │ Chat B │ │ ✓ Tasks done │
|
|
63
|
+
│ │ ┌───────────┐ │ │ ✓ Role boundary│
|
|
64
|
+
▼ │ │ Coder │ │ │ ✓ No failures │
|
|
65
|
+
┌─────────────────┐ │ │(no tests!)│ │ └─────────────────┘
|
|
66
|
+
│ Triangle debate │ │ └───────────┘ │
|
|
67
|
+
│ Author/Challenger│ └─────────────────┘
|
|
68
|
+
│ /Judge │
|
|
69
|
+
└─────────────────┘
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Hard constraint**: Test Owner and Coder **must work in separate conversations**. This is not a suggestion. Coder cannot modify `tests/**`. “Done” is defined by tests/build verification, not AI self-evaluation.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Quick Start
|
|
77
|
+
|
|
78
|
+
### Supported AI tools
|
|
79
|
+
|
|
80
|
+
| Tool | Slash commands | Natural language |
|
|
81
|
+
|------|-----------|----------|
|
|
82
|
+
| **Claude Code** | `/devbooks:*` | Yes |
|
|
83
|
+
| **Codex CLI** | `/devbooks:*` | Yes |
|
|
84
|
+
| Other assistants | - | “Run DevBooks proposal skill…” |
|
|
85
|
+
|
|
86
|
+
### Install & init
|
|
87
|
+
|
|
88
|
+
**Install via npm (recommended):**
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# global install
|
|
92
|
+
npm install -g dev-playbooks-cn
|
|
93
|
+
|
|
94
|
+
# init inside your project
|
|
95
|
+
dev-playbooks-cn init
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**One-off usage:**
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npx dev-playbooks-cn@latest init
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**From source (contributors):**
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
../scripts/install-skills.sh
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Install targets
|
|
111
|
+
|
|
112
|
+
After initialization:
|
|
113
|
+
- Claude Code: `~/.claude/skills/devbooks-*`
|
|
114
|
+
- Codex CLI: `$CODEX_HOME/skills/devbooks-*` (default `~/.codex/skills/devbooks-*`)
|
|
115
|
+
|
|
116
|
+
### Quick integration
|
|
117
|
+
|
|
118
|
+
DevBooks uses two directory roots:
|
|
119
|
+
|
|
120
|
+
| Directory | Purpose | Default |
|
|
121
|
+
|------|------|--------|
|
|
122
|
+
| `<truth-root>` | Current specs (read-only truth) | `dev-playbooks/specs/` |
|
|
123
|
+
| `<change-root>` | Change packages (workspace) | `dev-playbooks/changes/` |
|
|
124
|
+
|
|
125
|
+
See `../docs/DevBooks集成模板(协议无关).md` (currently in Chinese), or use `../docs/DevBooks安装提示词.md` to let your assistant configure it automatically.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Day-to-Day Change Workflow
|
|
130
|
+
|
|
131
|
+
### Use Router (recommended)
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
/devbooks:router <your request>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Router analyzes your request and outputs an execution plan (which command to run next).
|
|
138
|
+
|
|
139
|
+
### Direct commands
|
|
140
|
+
|
|
141
|
+
Once you know the flow, call the Skills directly:
|
|
142
|
+
|
|
143
|
+
**1) Proposal stage (no coding)**
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
/devbooks:proposal Add OAuth2 user authentication
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Artifacts: `proposal.md` (required), `design.md`, `tasks.md`
|
|
150
|
+
|
|
151
|
+
**2) Apply stage (role isolation enforced)**
|
|
152
|
+
|
|
153
|
+
You must use **two separate conversations**:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
# Chat A - Test Owner
|
|
157
|
+
/devbooks:test add-oauth2
|
|
158
|
+
|
|
159
|
+
# Chat B - Coder
|
|
160
|
+
/devbooks:code add-oauth2
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- Test Owner: writes `verification.md` + tests, runs **Red** first
|
|
164
|
+
- Coder: implements per `tasks.md`, makes gates **Green** (cannot modify tests)
|
|
165
|
+
|
|
166
|
+
**3) Review stage**
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
/devbooks:review add-oauth2
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**4) Archive stage**
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
/devbooks:gardener add-oauth2
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Command Reference
|
|
181
|
+
|
|
182
|
+
### Proposal stage
|
|
183
|
+
|
|
184
|
+
| Command | Skill | Description |
|
|
185
|
+
|------|-------|------|
|
|
186
|
+
| `/devbooks:router` | devbooks-router | Route to the right Skill |
|
|
187
|
+
| `/devbooks:proposal` | devbooks-proposal-author | Create a change proposal |
|
|
188
|
+
| `/devbooks:impact` | devbooks-impact-analysis | Cross-module impact analysis |
|
|
189
|
+
| `/devbooks:challenger` | devbooks-proposal-challenger | Challenge a proposal |
|
|
190
|
+
| `/devbooks:judge` | devbooks-proposal-judge | Adjudicate a proposal |
|
|
191
|
+
| `/devbooks:debate` | devbooks-proposal-debate-workflow | Triangle debate (Author/Challenger/Judge) |
|
|
192
|
+
| `/devbooks:design` | devbooks-design-doc | Create a design doc |
|
|
193
|
+
| `/devbooks:spec` | devbooks-spec-contract | Define specs & contracts |
|
|
194
|
+
| `/devbooks:c4` | devbooks-c4-map | Generate a C4 map |
|
|
195
|
+
| `/devbooks:plan` | devbooks-implementation-plan | Create an implementation plan |
|
|
196
|
+
|
|
197
|
+
### Apply stage
|
|
198
|
+
|
|
199
|
+
| Command | Skill | Description |
|
|
200
|
+
|------|-------|------|
|
|
201
|
+
| `/devbooks:test` | devbooks-test-owner | Test Owner role (separate chat required) |
|
|
202
|
+
| `/devbooks:code` | devbooks-coder | Coder role (separate chat required) |
|
|
203
|
+
| `/devbooks:backport` | devbooks-design-backport | Backport discoveries to design |
|
|
204
|
+
|
|
205
|
+
### Review stage
|
|
206
|
+
|
|
207
|
+
| Command | Skill | Description |
|
|
208
|
+
|------|-------|------|
|
|
209
|
+
| `/devbooks:review` | devbooks-code-review | Code review (readability/consistency) |
|
|
210
|
+
| `/devbooks:test-review` | devbooks-test-reviewer | Test quality & coverage review |
|
|
211
|
+
|
|
212
|
+
### Archive stage
|
|
213
|
+
|
|
214
|
+
| Command | Skill | Description |
|
|
215
|
+
|------|-------|------|
|
|
216
|
+
| `/devbooks:gardener` | devbooks-spec-gardener | Maintain/dedupe specs |
|
|
217
|
+
| `/devbooks:delivery` | devbooks-delivery-workflow | End-to-end delivery workflow |
|
|
218
|
+
|
|
219
|
+
### Standalone Skills
|
|
220
|
+
|
|
221
|
+
| Command | Skill | Description |
|
|
222
|
+
|------|-------|------|
|
|
223
|
+
| `/devbooks:entropy` | devbooks-entropy-monitor | System entropy metrics |
|
|
224
|
+
| `/devbooks:federation` | devbooks-federation | Cross-repo federation analysis |
|
|
225
|
+
| `/devbooks:bootstrap` | devbooks-brownfield-bootstrap | Brownfield project bootstrap |
|
|
226
|
+
| `/devbooks:index` | devbooks-index-bootstrap | Generate a SCIP index |
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## DevBooks Comparisons
|
|
231
|
+
|
|
232
|
+
### vs. OpenSpec
|
|
233
|
+
|
|
234
|
+
[OpenSpec](https://github.com/Fission-AI/OpenSpec) is a lightweight spec-driven framework with three core commands (proposal/apply/archive), organizing changes by feature folders.
|
|
235
|
+
|
|
236
|
+
**What DevBooks adds:**
|
|
237
|
+
- **Role isolation**: hard boundary between Test Owner and Coder (separate chats)
|
|
238
|
+
- **Quality gates**: 5+ verification gates to block false completion
|
|
239
|
+
- **21 Skills**: proposal, debate, review, entropy metrics, federation, etc.
|
|
240
|
+
- **Evidence-based done**: tests/build define “done”, not self-evaluation
|
|
241
|
+
|
|
242
|
+
**Choose OpenSpec**: you want a lightweight spec workflow.
|
|
243
|
+
|
|
244
|
+
**Choose DevBooks**: you need role separation and verification gates for larger changes.
|
|
245
|
+
|
|
246
|
+
### vs. spec-kit
|
|
247
|
+
|
|
248
|
+
[GitHub spec-kit](https://github.com/github/spec-kit) is a spec-driven toolkit with a constitution file, multi-step refinement, and structured planning.
|
|
249
|
+
|
|
250
|
+
**What DevBooks adds:**
|
|
251
|
+
- **Brownfield-first**: generates baseline specs for existing repos
|
|
252
|
+
- **Role isolation**: test authoring and implementation are separated
|
|
253
|
+
- **Quality gates**: runtime verification, not just workflow guidance
|
|
254
|
+
- **Prototype mode**: safe experiments without polluting main `src/`
|
|
255
|
+
|
|
256
|
+
**Choose spec-kit**: greenfield projects with supported AI tools.
|
|
257
|
+
|
|
258
|
+
**Choose DevBooks**: brownfield repos or when you want enforced gates.
|
|
259
|
+
|
|
260
|
+
### vs. Kiro.dev
|
|
261
|
+
|
|
262
|
+
[Kiro](https://kiro.dev/) is an AWS agentic IDE with a three-phase workflow (EARS requirements, design, tasks), but stores specs separately from implementation artifacts.
|
|
263
|
+
|
|
264
|
+
**DevBooks differences:**
|
|
265
|
+
- **Change package**: proposal/design/spec/plan/verification/evidence in one place for lifecycle traceability
|
|
266
|
+
- **Role isolation**: Test Owner and Coder are separated
|
|
267
|
+
- **Quality gates**: verified through gates, not just task completion
|
|
268
|
+
|
|
269
|
+
**Choose Kiro**: you want an IDE experience and AWS ecosystem integration.
|
|
270
|
+
|
|
271
|
+
**Choose DevBooks**: you want change packages to bundle artifacts and enforce role boundaries.
|
|
272
|
+
|
|
273
|
+
### vs. no spec
|
|
274
|
+
|
|
275
|
+
Without specs, the assistant generates code from vague prompts, leading to unpredictable output, scope creep, and “hallucinated completion”.
|
|
276
|
+
|
|
277
|
+
**DevBooks brings:**
|
|
278
|
+
- Specs agreed before implementation
|
|
279
|
+
- Quality gates that verify real completion
|
|
280
|
+
- Role isolation to prevent self-verification
|
|
281
|
+
- Evidence chain per change
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Core Principles
|
|
286
|
+
|
|
287
|
+
| Principle | Meaning |
|
|
288
|
+
|------|------|
|
|
289
|
+
| **Protocol first** | truth/change/archive live in the repo, not only in chat logs |
|
|
290
|
+
| **Anchor first** | done is defined by tests/static checks/build/evidence |
|
|
291
|
+
| **Role isolation** | Test Owner and Coder must work in separate conversations |
|
|
292
|
+
| **Truth root separation** | `<truth-root>` is read-only truth; `<change-root>` is the workspace |
|
|
293
|
+
| **Structural gates** | prioritize complexity/coupling/test quality, not proxy metrics |
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Advanced Features
|
|
298
|
+
|
|
299
|
+
<details>
|
|
300
|
+
<summary><strong>Quality gates</strong></summary>
|
|
301
|
+
|
|
302
|
+
DevBooks uses quality gates to block “false done”:
|
|
303
|
+
|
|
304
|
+
| Gate | Trigger mode | What it checks |
|
|
305
|
+
|------|----------|----------|
|
|
306
|
+
| Green evidence | archive, strict | `evidence/green-final/` exists and is non-empty |
|
|
307
|
+
| Task completion | strict | all tasks are done or SKIP-APPROVED |
|
|
308
|
+
| Test failure block | archive, strict | no failures in green evidence |
|
|
309
|
+
| P0 skip approval | strict | P0 skips require an approval record |
|
|
310
|
+
| Role boundary | apply --role | Coder cannot modify tests/, Test Owner cannot modify src/ |
|
|
311
|
+
|
|
312
|
+
Core scripts (in `../skills/devbooks-delivery-workflow/scripts/`):
|
|
313
|
+
- `change-check.sh --mode proposal|apply|archive|strict`
|
|
314
|
+
- `handoff-check.sh` - handoff boundary checks
|
|
315
|
+
- `audit-scope.sh` - full audit scan
|
|
316
|
+
- `progress-dashboard.sh` - progress visualization
|
|
317
|
+
|
|
318
|
+
</details>
|
|
319
|
+
|
|
320
|
+
<details>
|
|
321
|
+
<summary><strong>Prototype mode</strong></summary>
|
|
322
|
+
|
|
323
|
+
When the technical approach is uncertain:
|
|
324
|
+
|
|
325
|
+
1. Create a prototype: `change-scaffold.sh <change-id> --prototype`
|
|
326
|
+
2. Test Owner with `--prototype`: characterization tests (no Red baseline required)
|
|
327
|
+
3. Coder with `--prototype`: output to `prototype/src/` (isolates main src)
|
|
328
|
+
4. Promote or discard: `prototype-promote.sh <change-id>`
|
|
329
|
+
|
|
330
|
+
Prototype mode prevents experimental code from polluting the main tree.
|
|
331
|
+
|
|
332
|
+
Scripts live in `../skills/devbooks-delivery-workflow/scripts/`.
|
|
333
|
+
|
|
334
|
+
</details>
|
|
335
|
+
|
|
336
|
+
<details>
|
|
337
|
+
<summary><strong>Entropy monitoring</strong></summary>
|
|
338
|
+
|
|
339
|
+
DevBooks tracks four dimensions of system entropy:
|
|
340
|
+
|
|
341
|
+
| Metric | What it measures |
|
|
342
|
+
|------|----------|
|
|
343
|
+
| Structural entropy | module complexity and coupling |
|
|
344
|
+
| Change entropy | change patterns and volatility |
|
|
345
|
+
| Test entropy | coverage/quality decay over time |
|
|
346
|
+
| Dependency entropy | external dependency health |
|
|
347
|
+
|
|
348
|
+
Use `/devbooks:entropy` to generate reports and identify refactor opportunities.
|
|
349
|
+
|
|
350
|
+
Scripts (in `../skills/devbooks-entropy-monitor/scripts/`): `entropy-measure.sh`, `entropy-report.sh`
|
|
351
|
+
|
|
352
|
+
</details>
|
|
353
|
+
|
|
354
|
+
<details>
|
|
355
|
+
<summary><strong>Brownfield project bootstrap</strong></summary>
|
|
356
|
+
|
|
357
|
+
When `<truth-root>` is empty:
|
|
358
|
+
|
|
359
|
+
```
|
|
360
|
+
/devbooks:bootstrap
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Generates:
|
|
364
|
+
- project profile and glossary
|
|
365
|
+
- baseline specs from existing code
|
|
366
|
+
- minimal verification anchors
|
|
367
|
+
- module dependency map
|
|
368
|
+
- technical debt hotspots
|
|
369
|
+
|
|
370
|
+
</details>
|
|
371
|
+
|
|
372
|
+
<details>
|
|
373
|
+
<summary><strong>Cross-repo federation</strong></summary>
|
|
374
|
+
|
|
375
|
+
For multi-repo analysis:
|
|
376
|
+
|
|
377
|
+
```
|
|
378
|
+
/devbooks:federation
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Analyzes cross-repo contracts and dependencies to support coordinated changes.
|
|
382
|
+
|
|
383
|
+
</details>
|
|
384
|
+
|
|
385
|
+
<details>
|
|
386
|
+
<summary><strong>MCP auto-detection</strong></summary>
|
|
387
|
+
|
|
388
|
+
DevBooks Skills support graceful MCP (Model Context Protocol) degradation: you can run the full workflow without MCP/CKB; when CKB (Code Knowledge Base) is detected, DevBooks automatically enables graph-based capabilities for more accurate “scope/reference/call chain” analysis.
|
|
389
|
+
|
|
390
|
+
### What is it for?
|
|
391
|
+
|
|
392
|
+
- **More accurate impact analysis**: upgrades from “file-level guesses” to “symbol references + call graphs”
|
|
393
|
+
- **More focused reviews**: automatically pulls hotspots and prioritizes high-risk areas (tech debt/high churn)
|
|
394
|
+
- **Less manual grep**: reduces noise and repeated confirmation in large repos
|
|
395
|
+
|
|
396
|
+
### MCP status and behavior
|
|
397
|
+
|
|
398
|
+
| MCP status | Behavior |
|
|
399
|
+
|----------|------|
|
|
400
|
+
| CKB available | Enhanced mode: symbol-level impact/references/call graph/hotspots (`mcp__ckb__analyzeImpact`, `mcp__ckb__findReferences`, `mcp__ckb__getCallGraph`, `mcp__ckb__getHotspots`) |
|
|
401
|
+
| CKB unavailable | Basic mode: Grep + Glob text search (full functionality, lower precision) |
|
|
402
|
+
|
|
403
|
+
### Auto detection
|
|
404
|
+
|
|
405
|
+
- Skills that depend on MCP call `mcp__ckb__getStatus` first (2s timeout)
|
|
406
|
+
- Timeout/failure → silently falls back to basic mode (non-blocking)
|
|
407
|
+
- No manual “basic/enhanced” switch required
|
|
408
|
+
|
|
409
|
+
To enable enhanced mode: configure CKB per `../docs/推荐MCP.md` and run `/devbooks:index` to generate `index.scip`.
|
|
410
|
+
|
|
411
|
+
</details>
|
|
412
|
+
|
|
413
|
+
<details>
|
|
414
|
+
<summary><strong>Proposal debate workflow</strong></summary>
|
|
415
|
+
|
|
416
|
+
For strict proposal review, run the triangle debate:
|
|
417
|
+
|
|
418
|
+
```
|
|
419
|
+
/devbooks:debate
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
Three roles:
|
|
423
|
+
1. **Author**: creates and defends the proposal
|
|
424
|
+
2. **Challenger**: challenges assumptions, finds gaps, identifies risks
|
|
425
|
+
3. **Judge**: makes the final decision and records rationale
|
|
426
|
+
|
|
427
|
+
Decision: `Approved`, `Revise`, `Rejected`
|
|
428
|
+
|
|
429
|
+
</details>
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Repository Structure
|
|
434
|
+
|
|
435
|
+
```
|
|
436
|
+
skills/ # devbooks-* Skill sources (some ship scripts/)
|
|
437
|
+
templates/ # project init templates (used by `dev-playbooks-cn init`)
|
|
438
|
+
templates/dev-playbooks/ # DevBooks protocol directory template (copied into your project as `dev-playbooks/`)
|
|
439
|
+
scripts/ # install & helper scripts
|
|
440
|
+
docs/ # documentation
|
|
441
|
+
bin/ # CLI entry
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## Documentation
|
|
447
|
+
|
|
448
|
+
- [Slash command guide](../docs/Slash 命令使用指南.md)
|
|
449
|
+
- [Skills guide](../skills/Skills使用说明.md)
|
|
450
|
+
- [MCP configuration recommendations](../docs/推荐MCP.md)
|
|
451
|
+
- [Integration template (protocol-agnostic)](../docs/DevBooks集成模板(协议无关).md)
|
|
452
|
+
- [Installation prompt](../docs/DevBooks安装提示词.md)
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
## License
|
|
457
|
+
|
|
458
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# DevBooks change packages
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# 项目宪法 (Project Constitution)
|
|
2
|
+
|
|
3
|
+
> 本文档定义项目的不可违背原则(Global Inviolable Principles)。
|
|
4
|
+
> 所有 AI 助手和开发者在执行任何操作前必须遵守这些原则。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Part Zero: 强制指令
|
|
9
|
+
|
|
10
|
+
**在执行任何 Skill 或操作之前,必须:**
|
|
11
|
+
|
|
12
|
+
1. 阅读并理解本宪法文档
|
|
13
|
+
2. 确认操作不违反任何 GIP 原则
|
|
14
|
+
3. 如有冲突,立即停止并报告
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 全局不可违背原则 (Global Inviolable Principles)
|
|
19
|
+
|
|
20
|
+
### GIP-01: 角色隔离原则
|
|
21
|
+
|
|
22
|
+
**规则**:Test Owner 与 Coder 必须在独立对话/独立实例中执行。
|
|
23
|
+
|
|
24
|
+
**理由**:
|
|
25
|
+
- 防止测试与实现之间的认知污染
|
|
26
|
+
- 确保 Red-Green 循环的完整性
|
|
27
|
+
- 避免"自己写测试自己改测试"的反模式
|
|
28
|
+
|
|
29
|
+
**违规后果**:变更包不可归档。
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### GIP-02: 测试不可篡改原则
|
|
34
|
+
|
|
35
|
+
**规则**:Coder 角色禁止修改 `tests/**` 目录下的任何文件。
|
|
36
|
+
|
|
37
|
+
**理由**:
|
|
38
|
+
- 测试是规格的可执行形式
|
|
39
|
+
- 修改测试等于修改规格,需要设计层面决策
|
|
40
|
+
- 保证验收标准的独立性
|
|
41
|
+
|
|
42
|
+
**例外**:如需修改测试,必须交还 Test Owner 处理。
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### GIP-03: 设计优先原则
|
|
47
|
+
|
|
48
|
+
**规则**:代码实现必须追溯到设计文档中的 AC-xxx。
|
|
49
|
+
|
|
50
|
+
**理由**:
|
|
51
|
+
- 确保所有代码变更有明确的业务目的
|
|
52
|
+
- 支持全程追溯:设计 → 任务 → 测试 → 代码
|
|
53
|
+
- 防止"幽灵功能"和无授权变更
|
|
54
|
+
|
|
55
|
+
**验证方式**:`ac-trace-check.sh` 检查覆盖率。
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### GIP-04: 真理源唯一原则
|
|
60
|
+
|
|
61
|
+
**规则**:`specs/` 是系统行为的唯一真理源。
|
|
62
|
+
|
|
63
|
+
**理由**:
|
|
64
|
+
- 避免规格分散在多处导致不一致
|
|
65
|
+
- 确保所有角色参考同一来源
|
|
66
|
+
- 支持增量同步和冲突检测
|
|
67
|
+
|
|
68
|
+
**操作约束**:
|
|
69
|
+
- 变更包中的 spec delta 必须经过 stage → promote 流程
|
|
70
|
+
- 禁止直接修改 `specs/` 目录
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 逃生舱口 (Escape Hatches)
|
|
75
|
+
|
|
76
|
+
> 以下情况可临时绕过上述原则,但必须记录和追溯。
|
|
77
|
+
|
|
78
|
+
### EH-01: 紧急修复
|
|
79
|
+
|
|
80
|
+
**适用场景**:生产环境严重故障需要紧急修复。
|
|
81
|
+
|
|
82
|
+
**流程**:
|
|
83
|
+
1. 在 `evidence/` 中记录紧急修复原因
|
|
84
|
+
2. 标记 `[EMERGENCY]` 前缀
|
|
85
|
+
3. 事后补充完整的变更包
|
|
86
|
+
|
|
87
|
+
### EH-02: 原型验证
|
|
88
|
+
|
|
89
|
+
**适用场景**:技术方案不确定,需要快速验证。
|
|
90
|
+
|
|
91
|
+
**约束**:
|
|
92
|
+
- 代码必须放在 `prototype/` 目录
|
|
93
|
+
- 禁止直接合入生产代码
|
|
94
|
+
- 验证完成后通过正式流程提升
|
|
95
|
+
|
|
96
|
+
### EH-03: 人工裁决
|
|
97
|
+
|
|
98
|
+
**适用场景**:规则冲突或边缘情况需要人工判断。
|
|
99
|
+
|
|
100
|
+
**流程**:
|
|
101
|
+
1. 在 `proposal.md` 中记录决策点
|
|
102
|
+
2. 由项目负责人签字确认
|
|
103
|
+
3. 更新 Decision Log
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 宪法变更流程
|
|
108
|
+
|
|
109
|
+
1. 任何对本宪法的修改必须通过正式的变更提案
|
|
110
|
+
2. 变更提案需要经过 Challenger 质疑和 Judge 裁决
|
|
111
|
+
3. 宪法变更的优先级为 P0,需要所有核心成员确认
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
**宪法版本**:v1.0.0
|
|
116
|
+
**最后更新**:{{DATE}}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# 项目上下文 (Project Context)
|
|
2
|
+
|
|
3
|
+
> 本文档描述项目的技术栈、约定和领域上下文。
|
|
4
|
+
> 宪法性规则请参阅 `constitution.md`。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 目的
|
|
9
|
+
|
|
10
|
+
<!-- 在此描述你的项目目的 -->
|
|
11
|
+
|
|
12
|
+
## 技术栈
|
|
13
|
+
|
|
14
|
+
- **主语言**:<!-- 如 TypeScript, Python, Go -->
|
|
15
|
+
- **框架**:<!-- 如 React, Django, Gin -->
|
|
16
|
+
- **数据库**:<!-- 如 PostgreSQL, MongoDB -->
|
|
17
|
+
- **配置格式**:YAML / JSON
|
|
18
|
+
- **文档格式**:Markdown
|
|
19
|
+
- **版本控制**:Git
|
|
20
|
+
|
|
21
|
+
## 项目约定
|
|
22
|
+
|
|
23
|
+
### 代码风格
|
|
24
|
+
|
|
25
|
+
<!-- 描述你的代码风格要求 -->
|
|
26
|
+
|
|
27
|
+
### 架构模式
|
|
28
|
+
|
|
29
|
+
- **配置发现**:所有 Skills 通过 `config-discovery.sh` 发现配置
|
|
30
|
+
- **宪法优先**:执行任何操作前加载 `constitution.md`
|
|
31
|
+
- **三层同步**:Draft → Staged → Truth
|
|
32
|
+
|
|
33
|
+
### 测试策略
|
|
34
|
+
|
|
35
|
+
- **单元测试**:<!-- 如 Jest, pytest, go test -->
|
|
36
|
+
- **覆盖率目标**:80%
|
|
37
|
+
- **Red-Green 循环**:Test Owner 先产出 Red 基线,Coder 让其 Green
|
|
38
|
+
|
|
39
|
+
### Git 工作流
|
|
40
|
+
|
|
41
|
+
- **主分支**:`main` / `master`
|
|
42
|
+
- **变更分支**:`change/<change-id>`
|
|
43
|
+
- **提交格式**:`<type>: <subject>`
|
|
44
|
+
- type: feat, fix, refactor, docs, test, chore
|
|
45
|
+
|
|
46
|
+
## 领域上下文
|
|
47
|
+
|
|
48
|
+
### 核心概念
|
|
49
|
+
|
|
50
|
+
| 术语 | 定义 |
|
|
51
|
+
|------|------|
|
|
52
|
+
| Truth Root | 真理源根目录,存放规格和设计的最终版本 |
|
|
53
|
+
| Change Root | 变更包根目录,存放每次变更的所有产物 |
|
|
54
|
+
| Spec Delta | 规格增量,描述变更对规格的修改 |
|
|
55
|
+
| AC-ID | 验收标准标识符,格式 `AC-XXX` |
|
|
56
|
+
| GIP | 全局不可违背原则(Global Inviolable Principle) |
|
|
57
|
+
|
|
58
|
+
### 角色定义
|
|
59
|
+
|
|
60
|
+
| 角色 | 职责 | 约束 |
|
|
61
|
+
|------|------|------|
|
|
62
|
+
| Design Owner | 产出 What/Constraints + AC-xxx | 禁止写实现步骤 |
|
|
63
|
+
| Spec Owner | 产出规格 delta | - |
|
|
64
|
+
| Planner | 从设计推导 tasks | 不得参考 tests/ |
|
|
65
|
+
| Test Owner | 从设计/规格推导测试 | 不得参考 tasks/ |
|
|
66
|
+
| Coder | 按 tasks 实现 | 禁止修改 tests/ |
|
|
67
|
+
| Reviewer | 代码审查 | 不改 tests,不改设计 |
|
|
68
|
+
|
|
69
|
+
## 重要约束
|
|
70
|
+
|
|
71
|
+
1. **角色隔离**:Test Owner 与 Coder 必须独立对话
|
|
72
|
+
2. **测试不可篡改**:Coder 禁止修改 tests/
|
|
73
|
+
3. **设计优先**:代码必须追溯到 AC-xxx
|
|
74
|
+
4. **真理源唯一**:specs/ 是唯一权威
|
|
75
|
+
|
|
76
|
+
## 外部依赖
|
|
77
|
+
|
|
78
|
+
<!-- 列出项目的外部依赖 -->
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 目录根映射
|
|
83
|
+
|
|
84
|
+
| 路径 | 用途 |
|
|
85
|
+
|------|------|
|
|
86
|
+
| `dev-playbooks/` | DevBooks 管理目录(集中式) |
|
|
87
|
+
| `dev-playbooks/constitution.md` | 项目宪法 |
|
|
88
|
+
| `dev-playbooks/project.md` | 本文件 |
|
|
89
|
+
| `dev-playbooks/specs/` | 真理源 |
|
|
90
|
+
| `dev-playbooks/changes/` | 变更包 |
|
|
91
|
+
| `dev-playbooks/scripts/` | 项目级脚本(可选覆盖) |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
**文档版本**:v1.0.0
|
|
96
|
+
**最后更新**:{{DATE}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Project-specific scripts
|