dev-playbooks 1.2.6 → 1.2.8
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/README.md +2 -2
- package/bin/devbooks.js +2 -2
- package/package.json +1 -1
- package/skills/Skill-Development-Guide.md +1 -1
- package/skills/Skills-Usage-Guide.md +2 -2
- package/skills/_shared/mcp-enhancement-template.md +1 -1
- package/skills/_shared/references/deviation-detection-routing-protocol.md +1 -1
- package/skills/_shared/references/universal-gating-protocol.md +2 -2
- package/skills/_shared/workflow-next-steps.md +3 -3
- package/skills/devbooks-archiver/SKILL.md +315 -0
- package/skills/devbooks-brownfield-bootstrap/SKILL.md +2 -2
- package/skills/devbooks-code-review/SKILL.md +3 -3
- package/skills/devbooks-coder/SKILL.md +2 -2
- package/skills/devbooks-delivery-workflow/SKILL.md +53 -1
- package/skills/devbooks-delivery-workflow/references/delivery-acceptance-workflow.md +1 -1
- package/skills/devbooks-delivery-workflow/scripts/change-check.sh +4 -4
- package/skills/devbooks-design-backport/SKILL.md +3 -3
- package/skills/devbooks-design-doc/SKILL.md +2 -2
- package/skills/devbooks-docs-sync/SKILL.md +1 -1
- package/skills/devbooks-entropy-monitor/SKILL.md +1 -1
- package/skills/devbooks-impact-analysis/SKILL.md +1 -1
- package/skills/devbooks-implementation-plan/SKILL.md +1 -1
- package/skills/devbooks-proposal-author/SKILL.md +1 -1
- package/skills/devbooks-proposal-challenger/SKILL.md +1 -1
- package/skills/devbooks-proposal-judge/SKILL.md +1 -1
- package/skills/devbooks-router/SKILL.md +3 -3
- package/skills/devbooks-spec-contract/SKILL.md +1 -1
- package/skills/devbooks-test-owner/SKILL.md +2 -2
- package/skills/devbooks-test-reviewer/SKILL.md +1 -1
- package/templates/dev-playbooks/README.md +2 -2
- package/templates/dev-playbooks/docs/devbooks-setup-guide.md +1 -1
- package/templates/dev-playbooks/docs/workflow-diagram.svg +2 -2
- package/skills/devbooks-spec-gardener/SKILL.md +0 -228
- /package/skills/{devbooks-spec-gardener/references/spec-gardener-prompt.md → devbooks-archiver/references/archiver-prompt.md} +0 -0
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ Run devbooks-code-review skill for change add-oauth2
|
|
|
146
146
|
**4) Archive stage**
|
|
147
147
|
|
|
148
148
|
```
|
|
149
|
-
Run devbooks-
|
|
149
|
+
Run devbooks-archiver skill for change add-oauth2
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
---
|
|
@@ -185,7 +185,7 @@ Run devbooks-spec-gardener skill for change add-oauth2
|
|
|
185
185
|
|
|
186
186
|
| Skill | Description |
|
|
187
187
|
|-------|-------------|
|
|
188
|
-
| devbooks-
|
|
188
|
+
| devbooks-archiver | Maintain/dedupe specs |
|
|
189
189
|
| devbooks-delivery-workflow | End-to-end delivery workflow |
|
|
190
190
|
|
|
191
191
|
### Standalone Skills
|
package/bin/devbooks.js
CHANGED
|
@@ -806,7 +806,7 @@ ${DEVBOOKS_MARKERS.start}
|
|
|
806
806
|
| \`devbooks-proposal-author\` | 创建变更提案 |
|
|
807
807
|
| \`devbooks-design-doc\` | 创建设计文档 |
|
|
808
808
|
| \`devbooks-test-owner / devbooks-coder\` | 执行实现 |
|
|
809
|
-
| \`devbooks-
|
|
809
|
+
| \`devbooks-archiver\` | 归档变更包 |
|
|
810
810
|
|
|
811
811
|
${DEVBOOKS_MARKERS.end}
|
|
812
812
|
`;
|
|
@@ -942,7 +942,7 @@ function generateAgentsContent(filename) {
|
|
|
942
942
|
| \`devbooks-proposal-author\` | 创建变更提案 |
|
|
943
943
|
| \`devbooks-design-doc\` | 创建设计文档 |
|
|
944
944
|
| \`devbooks-test-owner / devbooks-coder\` | 执行实现(test-owner/coder/reviewer) |
|
|
945
|
-
| \`devbooks-
|
|
945
|
+
| \`devbooks-archiver\` | 归档变更包 |
|
|
946
946
|
|
|
947
947
|
${DEVBOOKS_MARKERS.end}
|
|
948
948
|
`;
|
package/package.json
CHANGED
|
@@ -95,7 +95,7 @@ echo "ok: verification passed"
|
|
|
95
95
|
|
|
96
96
|
### 1.5 Truth Source Separation
|
|
97
97
|
|
|
98
|
-
- **Read-only truth**: Skills may read from `<truth-root>/` but must not modify it directly (except for archive-related Skills such as `
|
|
98
|
+
- **Read-only truth**: Skills may read from `<truth-root>/` but must not modify it directly (except for archive-related Skills such as `archiver`).
|
|
99
99
|
- **Write to workspace**: Skills should write to `<change-root>/<change-id>/`.
|
|
100
100
|
- **Archive is merge**: archiving merges workspace outputs back into truth.
|
|
101
101
|
|
|
@@ -245,7 +245,7 @@ If you are not using DevBooks, replace `dev-playbooks/specs` / `dev-playbooks/ch
|
|
|
245
245
|
|
|
246
246
|
---
|
|
247
247
|
|
|
248
|
-
## `devbooks-
|
|
248
|
+
## `devbooks-archiver` (Archiver)
|
|
249
249
|
|
|
250
250
|
- Purpose: before archiving, prune and maintain `<truth-root>` (dedupe/merge/remove stale/reorganize/fix consistency) to prevent spec sprawl.
|
|
251
251
|
- When to use:
|
|
@@ -253,7 +253,7 @@ If you are not using DevBooks, replace `dev-playbooks/specs` / `dev-playbooks/ch
|
|
|
253
253
|
- You found duplicate/overlapping/stale entries in `<truth-root>`
|
|
254
254
|
- Copy-paste prompt:
|
|
255
255
|
```text
|
|
256
|
-
You are
|
|
256
|
+
You are Archiver. Explicitly use `devbooks-archiver`.
|
|
257
257
|
Inputs: `dev-playbooks/changes/<change-id>/specs/**` + `dev-playbooks/specs/**` + `dev-playbooks/changes/<change-id>/design.md` (if any).
|
|
258
258
|
You may modify only `dev-playbooks/specs/**` to merge/dedupe/categorize/delete stale items; do not modify the change package contents.
|
|
259
259
|
Output in order: operation list (CREATE/UPDATE/MOVE/DELETE) → full content for every CREATE/UPDATE file → merge mapping summary → Open Questions (<=3).
|
|
@@ -66,7 +66,7 @@ The following Skills do not depend on MCP and do not need an MCP Enhancement sec
|
|
|
66
66
|
- devbooks-proposal-challenger (review-only)
|
|
67
67
|
- devbooks-proposal-judge (verdict-only)
|
|
68
68
|
- devbooks-design-backport (document backport)
|
|
69
|
-
- devbooks-
|
|
69
|
+
- devbooks-archiver (file pruning)
|
|
70
70
|
- devbooks-test-reviewer (test review)
|
|
71
71
|
|
|
72
72
|
For these Skills, the MCP Enhancement section should be:
|
|
@@ -128,7 +128,7 @@ deviation-log.md is a **persistent file** unaffected by compact. Even if convers
|
|
|
128
128
|
| coder | HANDOFF (test issue) | `devbooks-test-owner` |
|
|
129
129
|
| test-owner | COMPLETED | `devbooks-coder` |
|
|
130
130
|
| test-owner | HANDOFF (design issue) | `devbooks-design-backport` |
|
|
131
|
-
| code-review | COMPLETED (has spec delta) | `devbooks-
|
|
131
|
+
| code-review | COMPLETED (has spec delta) | `devbooks-archiver` |
|
|
132
132
|
| code-review | COMPLETED (no spec delta) | Archive complete |
|
|
133
133
|
| Any | BLOCKED | Record breakpoint, wait for user |
|
|
134
134
|
| Any | FAILED | Fix and retry current skill |
|
|
@@ -39,9 +39,9 @@ From now on, each time you write files, restate the `<truth-root>` and `<change-
|
|
|
39
39
|
| Spec deltas | `<change-root>/<change-id>/specs/` | `./specs/` |
|
|
40
40
|
| Traceability doc | `<change-root>/<change-id>/verification.md` | `./verification.md` |
|
|
41
41
|
|
|
42
|
-
###
|
|
42
|
+
### Dev-Playbooks Default Paths
|
|
43
43
|
|
|
44
|
-
When using
|
|
44
|
+
When using Dev-Playbooks protocol:
|
|
45
45
|
- `<change-root>` = `dev-playbooks/changes`
|
|
46
46
|
- `<truth-root>` = `dev-playbooks/specs`
|
|
47
47
|
|
|
@@ -25,7 +25,7 @@ This document defines the canonical next step recommendations for each skill. Al
|
|
|
25
25
|
↓
|
|
26
26
|
┌─────────────────────────────────────────────────────────────────┐
|
|
27
27
|
│ ARCHIVE STAGE │
|
|
28
|
-
│
|
|
28
|
+
│ archiver │
|
|
29
29
|
└─────────────────────────────────────────────────────────────────┘
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -45,11 +45,11 @@ This document defines the canonical next step recommendations for each skill. Al
|
|
|
45
45
|
| `devbooks-implementation-plan` | `devbooks-test-owner` | Always (must be separate chat) |
|
|
46
46
|
| `devbooks-test-owner` | `devbooks-coder` | After Red baseline (must be separate chat) |
|
|
47
47
|
| `devbooks-coder` | `devbooks-code-review` | After all tasks completed |
|
|
48
|
-
| `devbooks-code-review` | `devbooks-
|
|
48
|
+
| `devbooks-code-review` | `devbooks-archiver` | If spec deltas exist |
|
|
49
49
|
| `devbooks-code-review` | Archive complete | If no spec deltas |
|
|
50
50
|
| `devbooks-test-reviewer` | `devbooks-coder` | If test issues found, hand back |
|
|
51
51
|
| `devbooks-design-backport` | `devbooks-implementation-plan` | Rerun plan after design update |
|
|
52
|
-
| `devbooks-
|
|
52
|
+
| `devbooks-archiver` | Archive complete | Always |
|
|
53
53
|
|
|
54
54
|
## Critical Constraints
|
|
55
55
|
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devbooks-archiver
|
|
3
|
+
description: devbooks-archiver: The single entry point for the archive phase, responsible for the complete archive closed-loop (auto-backport → spec merge → doc sync check → change package archive move). Use when user says "archive/finalize/close-loop/merge to truth" etc.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Glob
|
|
6
|
+
- Grep
|
|
7
|
+
- Read
|
|
8
|
+
- Write
|
|
9
|
+
- Edit
|
|
10
|
+
- Bash
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# DevBooks: Archiver
|
|
14
|
+
|
|
15
|
+
## Workflow Position Awareness
|
|
16
|
+
|
|
17
|
+
> **Core Principle**: Archiver is the **single entry point** for the archive phase, responsible for completing all finalization work from code review to change package archival.
|
|
18
|
+
|
|
19
|
+
### My Position in the Overall Workflow
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
proposal → design → test-owner(P1) → coder → test-owner(P2) → code-review → [Archiver]
|
|
23
|
+
↓
|
|
24
|
+
Auto backport → Spec merge → Doc check → Archive move
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Why Renamed to Archiver?
|
|
28
|
+
|
|
29
|
+
| Old Name | New Name | Reason for Change |
|
|
30
|
+
|----------|----------|-------------------|
|
|
31
|
+
| `spec-gardener` | `archiver` | Responsibilities expanded beyond just spec merging to complete archive closed-loop |
|
|
32
|
+
|
|
33
|
+
### Archiver's Complete Responsibilities
|
|
34
|
+
|
|
35
|
+
| Phase | Responsibility | Description |
|
|
36
|
+
|-------|---------------|-------------|
|
|
37
|
+
| 1 | Auto backport detection and handling | Detect deviation-log.md, auto-backport to design doc |
|
|
38
|
+
| 2 | Spec merge | Merge specs/contracts into truth-root |
|
|
39
|
+
| 3 | Architecture merge | Merge design.md's Architecture Impact into c4.md |
|
|
40
|
+
| 4 | Documentation sync check | Check if design.md's Documentation Impact has been processed |
|
|
41
|
+
| 5 | Change package archive move | Move change package to `<change-root>/archive/` |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Prerequisites: Configuration Discovery (Protocol Agnostic)
|
|
46
|
+
|
|
47
|
+
- `<truth-root>`: Current truth directory root
|
|
48
|
+
- `<change-root>`: Change package directory root
|
|
49
|
+
|
|
50
|
+
Before execution, **must** search for configuration in the following order (stop when found):
|
|
51
|
+
1. `.devbooks/config.yaml` (if exists) → Parse and use the mappings within
|
|
52
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
53
|
+
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
54
|
+
4. If still unable to determine → **Stop and ask the user**
|
|
55
|
+
|
|
56
|
+
**Critical Constraints**:
|
|
57
|
+
- If `agents_doc` (rules document) is specified in the configuration, **must read that document first** before executing any operations
|
|
58
|
+
- Do not guess directory roots
|
|
59
|
+
- Do not skip reading the rules document
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Complete Archive Flow
|
|
64
|
+
|
|
65
|
+
### Step 1: Pre-checks
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
Pre-check checklist:
|
|
69
|
+
- [ ] Change package exists (<change-root>/<change-id>/)
|
|
70
|
+
- [ ] verification.md Status = Ready or Done
|
|
71
|
+
- [ ] evidence/green-final/ exists and is non-empty
|
|
72
|
+
- [ ] tasks.md all tasks completed ([x])
|
|
73
|
+
- [ ] Code review passed (verification.md Status = Done set by Reviewer)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If check fails → Stop and output missing items, suggest user complete prerequisite steps first.
|
|
77
|
+
|
|
78
|
+
### Step 2: Auto Backport Detection and Handling
|
|
79
|
+
|
|
80
|
+
> **Design Decision**: Archive phase automatically handles all pending backports, users don't need to manually call design-backport.
|
|
81
|
+
|
|
82
|
+
**Detection Flow**:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
1. Read <change-root>/<change-id>/deviation-log.md
|
|
86
|
+
2. Check if there are "| ❌" pending backport records
|
|
87
|
+
→ Yes: Execute auto backport (steps 3-5)
|
|
88
|
+
→ No: Skip, proceed directly to merge phase
|
|
89
|
+
|
|
90
|
+
3. For each pending record, determine if it's Design-level content:
|
|
91
|
+
- DESIGN_GAP, CONSTRAINT_CHANGE, API_CHANGE → Need backport
|
|
92
|
+
- Pure implementation details (filename/classname/temp steps) → Don't backport, mark as IMPL_ONLY
|
|
93
|
+
|
|
94
|
+
4. Execute design backport:
|
|
95
|
+
- Read design.md
|
|
96
|
+
- Update according to design-backport protocol's "backportable content scope"
|
|
97
|
+
- Add change record at the end of design.md
|
|
98
|
+
|
|
99
|
+
5. Update deviation-log.md:
|
|
100
|
+
- Mark backported records as ✅
|
|
101
|
+
- Record backport time and archive batch
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Auto Backport Content Scope** (inherited from design-backport):
|
|
105
|
+
|
|
106
|
+
| Backportable | Not Backportable |
|
|
107
|
+
|--------------|------------------|
|
|
108
|
+
| External semantics/user-visible behavior | Specific file paths, class/function names |
|
|
109
|
+
| System-level immutable constraints (Invariants) | PR splits, task execution order |
|
|
110
|
+
| Core data contracts and evolution strategies | Overly detailed algorithm pseudocode |
|
|
111
|
+
| Cross-phase governance strategies | Script commands |
|
|
112
|
+
| Key tradeoffs and decisions | Table/field names |
|
|
113
|
+
|
|
114
|
+
### Step 3: Spec Merge
|
|
115
|
+
|
|
116
|
+
Merge change package spec artifacts into `<truth-root>`:
|
|
117
|
+
|
|
118
|
+
| Source Path | Target Path | Merge Strategy |
|
|
119
|
+
|-------------|-------------|----------------|
|
|
120
|
+
| `<change-root>/<change-id>/specs/**` | `<truth-root>/specs/**` | Incremental merge |
|
|
121
|
+
| `<change-root>/<change-id>/contracts/**` | `<truth-root>/contracts/**` | Versioned merge |
|
|
122
|
+
|
|
123
|
+
### Step 4: Architecture Merge
|
|
124
|
+
|
|
125
|
+
> **Design Decision**: C4 architecture changes are recorded in design.md's Architecture Impact section and merged into truth by Archiver during archiving.
|
|
126
|
+
|
|
127
|
+
**C4 Merge Flow**:
|
|
128
|
+
|
|
129
|
+
1. **Detect Architecture Changes**: Parse "Architecture Impact" section in `design.md`
|
|
130
|
+
2. **Determine If Merge Needed**:
|
|
131
|
+
- If "No Architecture Changes" is checked → Skip merge
|
|
132
|
+
- If "Has Architecture Changes" → Execute merge
|
|
133
|
+
3. **Execute Merge**:
|
|
134
|
+
- Read `<truth-root>/architecture/c4.md` (create if doesn't exist)
|
|
135
|
+
- Update corresponding sections based on Architecture Impact descriptions
|
|
136
|
+
- Update Container/Component tables
|
|
137
|
+
- Update dependency relationships
|
|
138
|
+
- Update layering constraints (if changed)
|
|
139
|
+
4. **Record Merge Log**: Append change record at end of c4.md
|
|
140
|
+
|
|
141
|
+
### Step 5: Documentation Sync Check
|
|
142
|
+
|
|
143
|
+
Check "Documentation Impact" section in design.md:
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
Check items:
|
|
147
|
+
- [ ] If "Documents requiring updates" is declared, verify these documents have been updated
|
|
148
|
+
- [ ] If "No updates needed" is checked, confirm reasonableness
|
|
149
|
+
- [ ] Output documentation sync status report
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**If there are unprocessed documentation updates**:
|
|
153
|
+
- Output warning, list documents needing updates
|
|
154
|
+
- Don't block archive, but mark as "Documentation pending update" in archive report
|
|
155
|
+
|
|
156
|
+
### Step 6: Change Package Archive Move (New)
|
|
157
|
+
|
|
158
|
+
Move completed change package to archive directory:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Source path
|
|
162
|
+
<change-root>/<change-id>/
|
|
163
|
+
|
|
164
|
+
# Target path
|
|
165
|
+
<change-root>/archive/<change-id>/
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Move Flow**:
|
|
169
|
+
|
|
170
|
+
1. **Create archive directory** (if doesn't exist): `<change-root>/archive/`
|
|
171
|
+
2. **Set final status**: Set `Status: Archived` in verification.md
|
|
172
|
+
3. **Add archive timestamp**: Add `Archived-At: <timestamp>` at end of verification.md
|
|
173
|
+
4. **Move change package**: `mv <change-root>/<change-id>/ <change-root>/archive/<change-id>/`
|
|
174
|
+
5. **Output archive completion report**
|
|
175
|
+
|
|
176
|
+
**verification.md Archive Status Update**:
|
|
177
|
+
|
|
178
|
+
```markdown
|
|
179
|
+
---
|
|
180
|
+
status: Archived
|
|
181
|
+
archived-at: 2024-01-16T10:30:00Z
|
|
182
|
+
archived-by: devbooks-archiver
|
|
183
|
+
---
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Execution Method
|
|
189
|
+
|
|
190
|
+
1) First read and follow: `_shared/references/universal-gating-protocol.md` (verifiability + structural quality gates).
|
|
191
|
+
2) Strictly execute the complete prompt: `references/archiver-prompt.md`.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Context Awareness
|
|
196
|
+
|
|
197
|
+
This Skill automatically detects context before execution and selects the appropriate running mode.
|
|
198
|
+
|
|
199
|
+
Detection rules reference: `skills/_shared/context-detection-template.md`
|
|
200
|
+
|
|
201
|
+
### Detection Flow
|
|
202
|
+
|
|
203
|
+
1. Detect `<truth-root>/` directory status
|
|
204
|
+
2. If change-id is provided, detect change package archive conditions
|
|
205
|
+
3. Detect duplicate/obsolete specs (maintenance mode)
|
|
206
|
+
|
|
207
|
+
### Modes Supported by This Skill
|
|
208
|
+
|
|
209
|
+
| Mode | Trigger Condition | Behavior |
|
|
210
|
+
|------|-------------------|----------|
|
|
211
|
+
| **Archive Mode** | change-id provided and gates pass | Execute complete archive flow (6 steps) |
|
|
212
|
+
| **Maintenance Mode** | No change-id | Execute truth-root deduplication, cleanup, organization |
|
|
213
|
+
| **Check Mode** | With --dry-run parameter | Output plan only, no actual modifications/moves |
|
|
214
|
+
|
|
215
|
+
### Archive Mode Complete Flow Diagram
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
219
|
+
│ Archive Mode Flow │
|
|
220
|
+
├─────────────────────────────────────────────────────────────┤
|
|
221
|
+
│ │
|
|
222
|
+
│ 1. Pre-checks │
|
|
223
|
+
│ ├─ Change package exists? │
|
|
224
|
+
│ ├─ verification.md Status = Ready/Done? │
|
|
225
|
+
│ ├─ evidence/green-final/ exists? │
|
|
226
|
+
│ └─ tasks.md all completed? │
|
|
227
|
+
│ │ │
|
|
228
|
+
│ ▼ │
|
|
229
|
+
│ 2. Auto backport │
|
|
230
|
+
│ ├─ Read deviation-log.md │
|
|
231
|
+
│ ├─ Detect pending backport records │
|
|
232
|
+
│ └─ Execute backport → Update marks │
|
|
233
|
+
│ │ │
|
|
234
|
+
│ ▼ │
|
|
235
|
+
│ 3. Spec merge │
|
|
236
|
+
│ ├─ specs/** → truth-root/specs/** │
|
|
237
|
+
│ └─ contracts/** → truth-root/contracts/** │
|
|
238
|
+
│ │ │
|
|
239
|
+
│ ▼ │
|
|
240
|
+
│ 4. Architecture merge │
|
|
241
|
+
│ └─ Architecture Impact → c4.md │
|
|
242
|
+
│ │ │
|
|
243
|
+
│ ▼ │
|
|
244
|
+
│ 5. Documentation sync check │
|
|
245
|
+
│ └─ Check if Documentation Impact processed │
|
|
246
|
+
│ │ │
|
|
247
|
+
│ ▼ │
|
|
248
|
+
│ 6. Change package archive move │
|
|
249
|
+
│ ├─ Set Status: Archived │
|
|
250
|
+
│ └─ mv <change-id>/ → archive/<change-id>/ │
|
|
251
|
+
│ │ │
|
|
252
|
+
│ ▼ │
|
|
253
|
+
│ ✅ Output archive completion report │
|
|
254
|
+
│ │
|
|
255
|
+
└─────────────────────────────────────────────────────────────┘
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Detection Output Example
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
Detection Results:
|
|
262
|
+
- truth-root: Exists, contains 12 spec files
|
|
263
|
+
- Change package: Exists, all gates green
|
|
264
|
+
- Backport status: 2 pending backport records
|
|
265
|
+
- Running mode: Archive mode (complete flow)
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Archive Report Template
|
|
271
|
+
|
|
272
|
+
After archive completion, output the following report:
|
|
273
|
+
|
|
274
|
+
```markdown
|
|
275
|
+
## Archive Report
|
|
276
|
+
|
|
277
|
+
### Change Package Info
|
|
278
|
+
- Change ID: <change-id>
|
|
279
|
+
- Archive Time: <timestamp>
|
|
280
|
+
|
|
281
|
+
### Execution Summary
|
|
282
|
+
| Step | Status | Notes |
|
|
283
|
+
|------|--------|-------|
|
|
284
|
+
| Pre-checks | ✅ | All passed |
|
|
285
|
+
| Auto backport | ✅ | Backported 2 records |
|
|
286
|
+
| Spec merge | ✅ | Merged 3 spec files |
|
|
287
|
+
| Architecture merge | ⏭️ | No architecture changes |
|
|
288
|
+
| Doc check | ⚠️ | README.md needs update |
|
|
289
|
+
| Archive move | ✅ | Moved to archive/ |
|
|
290
|
+
|
|
291
|
+
### Archive Location
|
|
292
|
+
`<change-root>/archive/<change-id>/`
|
|
293
|
+
|
|
294
|
+
### Follow-up Recommendations
|
|
295
|
+
- [ ] Update README.md (doc check warning)
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Maintenance Mode Responsibilities
|
|
301
|
+
|
|
302
|
+
In maintenance mode (no change-id), execute:
|
|
303
|
+
|
|
304
|
+
- Detect duplicate spec definitions
|
|
305
|
+
- Clean up obsolete/deprecated specs
|
|
306
|
+
- Organize directory structure
|
|
307
|
+
- Fix consistency issues
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## MCP Enhancement
|
|
312
|
+
|
|
313
|
+
This Skill does not depend on MCP services; no runtime detection required.
|
|
314
|
+
|
|
315
|
+
MCP enhancement rules reference: `skills/_shared/mcp-enhancement-template.md`
|
|
@@ -20,7 +20,7 @@ allowed-tools:
|
|
|
20
20
|
|
|
21
21
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
22
22
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
23
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
23
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
24
24
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
25
25
|
5. If still unable to determine → **Create DevBooks directory structure and initialize basic configuration**
|
|
26
26
|
|
|
@@ -74,7 +74,7 @@ Generate in `<truth-root>/architecture/`:
|
|
|
74
74
|
| Technical debt hotspots | `architecture/hotspots.md` | `mcp__ckb__getHotspots` |
|
|
75
75
|
| Layering constraints | `architecture/layering-constraints.md` | Code analysis (optional) |
|
|
76
76
|
|
|
77
|
-
> **Design Decision**: C4 architecture map is now generated by brownfield-bootstrap during initialization. Subsequent architecture changes are recorded in design.md's Architecture Impact section and merged by
|
|
77
|
+
> **Design Decision**: C4 architecture map is now generated by brownfield-bootstrap during initialization. Subsequent architecture changes are recorded in design.md's Architecture Impact section and merged by archiver during archiving.
|
|
78
78
|
|
|
79
79
|
### 4. Baseline Change Package
|
|
80
80
|
|
|
@@ -45,7 +45,7 @@ proposal → design → test-owner(phase1) → coder → test-owner(phase2) →
|
|
|
45
45
|
|
|
46
46
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
47
47
|
1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
|
|
48
|
-
2. `dev-playbooks/project.md` (if exists) ->
|
|
48
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
49
49
|
3. `project.md` (if exists) -> template protocol, use default mappings
|
|
50
50
|
4. If still undetermined -> **Stop and ask user**
|
|
51
51
|
|
|
@@ -172,7 +172,7 @@ After completing code-review, the next step depends on the situation:
|
|
|
172
172
|
|
|
173
173
|
| Condition | Next Skill | Reason |
|
|
174
174
|
|-----------|------------|--------|
|
|
175
|
-
| Spec deltas exist | `devbooks-
|
|
175
|
+
| Spec deltas exist | `devbooks-archiver` | Merge specs into truth before archive |
|
|
176
176
|
| No spec deltas | Archive complete | No further skills needed |
|
|
177
177
|
| Major issues found | Hand back to `devbooks-coder` | Fix issues before archive |
|
|
178
178
|
|
|
@@ -192,7 +192,7 @@ After completing code-review, output:
|
|
|
192
192
|
```markdown
|
|
193
193
|
## Recommended Next Step
|
|
194
194
|
|
|
195
|
-
**Next: `devbooks-
|
|
195
|
+
**Next: `devbooks-archiver`** (if spec deltas exist)
|
|
196
196
|
OR
|
|
197
197
|
**Archive complete** (if no spec deltas)
|
|
198
198
|
|
|
@@ -53,7 +53,7 @@ proposal → design → test-owner(phase1) → [Coder] → test-owner(phase2)
|
|
|
53
53
|
|
|
54
54
|
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
55
55
|
1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
|
|
56
|
-
2. `dev-playbooks/project.md` (if exists) ->
|
|
56
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
57
57
|
3. `project.md` (if exists) -> template protocol, use default mappings
|
|
58
58
|
5. If still unable to determine -> **Stop and ask the user**
|
|
59
59
|
|
|
@@ -161,7 +161,7 @@ GOOD: 3 tests failed, see <change-root>/<change-id>/evidence/green-final/test-ou
|
|
|
161
161
|
|
|
162
162
|
**Correct path examples**:
|
|
163
163
|
```bash
|
|
164
|
-
#
|
|
164
|
+
# Dev-Playbooks default path
|
|
165
165
|
dev-playbooks/changes/<change-id>/evidence/green-final/test-$(date +%Y%m%d-%H%M%S).log
|
|
166
166
|
|
|
167
167
|
# Using the script
|
|
@@ -19,7 +19,7 @@ allowed-tools:
|
|
|
19
19
|
|
|
20
20
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
21
21
|
1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
|
|
22
|
-
2. `dev-playbooks/project.md` (if exists) ->
|
|
22
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
23
23
|
3. `project.md` (if exists) -> template protocol, use default mappings
|
|
24
24
|
4. If still undetermined -> **Stop and ask the user**
|
|
25
25
|
|
|
@@ -28,6 +28,58 @@ Before execution, **must** search for configuration in the following order (stop
|
|
|
28
28
|
- Do not guess directory roots
|
|
29
29
|
- Do not skip reading the rules document
|
|
30
30
|
|
|
31
|
+
## Change Package Naming Convention (Mandatory)
|
|
32
|
+
|
|
33
|
+
Change package ID (change-id) **must** follow this naming convention:
|
|
34
|
+
|
|
35
|
+
### Format
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
<datetime>-<verb-prefixed-semantic-description>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Rules
|
|
42
|
+
|
|
43
|
+
| Component | Rule | Example |
|
|
44
|
+
|-----------|------|---------|
|
|
45
|
+
| Datetime | `YYYYMMDD-HHMM` format | `20240116-1030` |
|
|
46
|
+
| Separator | Use `-` between datetime and semantic | `-` |
|
|
47
|
+
| Semantic description | **Must start with a verb**, use lowercase and hyphens | `add-oauth2`, `fix-login-bug` |
|
|
48
|
+
|
|
49
|
+
### Valid Examples
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# ✅ Correct
|
|
53
|
+
20240116-1030-add-oauth2-support
|
|
54
|
+
20240116-1430-fix-user-auth-bug
|
|
55
|
+
20240116-0900-refactor-payment-module
|
|
56
|
+
20240115-2200-update-api-docs
|
|
57
|
+
|
|
58
|
+
# ❌ Incorrect
|
|
59
|
+
add-oauth2 # Missing datetime
|
|
60
|
+
20240116-oauth2 # Semantic doesn't start with verb
|
|
61
|
+
2024-01-16-add-oauth2 # Wrong date format (shouldn't have -)
|
|
62
|
+
oauth2-20240116 # Wrong order
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Common Verbs
|
|
66
|
+
|
|
67
|
+
| Verb | Usage |
|
|
68
|
+
|------|-------|
|
|
69
|
+
| `add` | Add new feature |
|
|
70
|
+
| `fix` | Fix defect |
|
|
71
|
+
| `update` | Update existing feature |
|
|
72
|
+
| `refactor` | Refactor code |
|
|
73
|
+
| `remove` | Remove feature |
|
|
74
|
+
| `improve` | Improve performance/experience |
|
|
75
|
+
| `migrate` | Migrate data/system |
|
|
76
|
+
|
|
77
|
+
### Why This Naming Convention?
|
|
78
|
+
|
|
79
|
+
1. **Timestamp first**: Auto-sorts by time in archive directory
|
|
80
|
+
2. **Verb prefix**: Clearly expresses change intent, aids code review
|
|
81
|
+
3. **Lowercase hyphens**: Avoids cross-platform filename issues
|
|
82
|
+
|
|
31
83
|
## Reference Skeleton (Read as Needed)
|
|
32
84
|
|
|
33
85
|
- Workflow: `references/delivery-acceptance-workflow.md`
|
|
@@ -163,7 +163,7 @@ Checklist:
|
|
|
163
163
|
- Update traceability statuses (DONE/BLOCKED/DEFERRED)
|
|
164
164
|
- Update plan progress based on anchors only
|
|
165
165
|
- Update value-stream evidence links in `verification.md`
|
|
166
|
-
- Spec gardening (optional): use `devbooks-
|
|
166
|
+
- Spec gardening (optional): use `devbooks-archiver` to dedupe/merge/cleanup truth root
|
|
167
167
|
|
|
168
168
|
---
|
|
169
169
|
|
|
@@ -529,7 +529,7 @@ check_spec_deltas() {
|
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
# =============================================================================
|
|
532
|
-
# Constitution Check (
|
|
532
|
+
# Constitution Check (Dev-Playbooks)
|
|
533
533
|
# Verify project constitution is present and valid
|
|
534
534
|
# =============================================================================
|
|
535
535
|
check_constitution() {
|
|
@@ -557,7 +557,7 @@ check_constitution() {
|
|
|
557
557
|
}
|
|
558
558
|
|
|
559
559
|
# =============================================================================
|
|
560
|
-
# Fitness Check (
|
|
560
|
+
# Fitness Check (Dev-Playbooks)
|
|
561
561
|
# Verify architecture fitness rules
|
|
562
562
|
# =============================================================================
|
|
563
563
|
check_fitness() {
|
|
@@ -1037,9 +1037,9 @@ else
|
|
|
1037
1037
|
check_verification
|
|
1038
1038
|
check_no_tests_changed
|
|
1039
1039
|
check_implicit_changes
|
|
1040
|
-
#
|
|
1040
|
+
# Dev-Playbooks: Constitution check
|
|
1041
1041
|
check_constitution # Constitution validity check (strict mode)
|
|
1042
|
-
#
|
|
1042
|
+
# Dev-Playbooks: Fitness check
|
|
1043
1043
|
check_fitness # Architecture fitness check (apply/archive/strict)
|
|
1044
1044
|
# New quality gates (harden-devbooks-quality-gates)
|
|
1045
1045
|
check_evidence_closure # AC-001: Green evidence required for archive
|
|
@@ -13,7 +13,7 @@ allowed-tools:
|
|
|
13
13
|
|
|
14
14
|
## Workflow Position Awareness
|
|
15
15
|
|
|
16
|
-
> **Core Principle**: Design Backport is now **primarily auto-invoked by
|
|
16
|
+
> **Core Principle**: Design Backport is now **primarily auto-invoked by Archiver during archive phase**, users typically don't need to call it manually.
|
|
17
17
|
|
|
18
18
|
### My Position in the Overall Workflow
|
|
19
19
|
|
|
@@ -32,7 +32,7 @@ coder has deviations → user manually calls design-backport → then archive
|
|
|
32
32
|
|
|
33
33
|
**New Flow** (auto handling):
|
|
34
34
|
```
|
|
35
|
-
coder has deviations →
|
|
35
|
+
coder has deviations → archiver auto-detects and backports during archive → archive
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### When Manual Call is Still Needed
|
|
@@ -52,7 +52,7 @@ coder has deviations → spec-gardener auto-detects and backports during archive
|
|
|
52
52
|
|
|
53
53
|
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
54
54
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
55
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
55
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
56
56
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
57
57
|
4. If still undetermined → **Stop and ask the user**
|
|
58
58
|
|
|
@@ -40,7 +40,7 @@ proposal → [Design Doc] → spec-contract → implementation-plan → test-own
|
|
|
40
40
|
|
|
41
41
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
42
42
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
43
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
43
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
44
44
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
45
45
|
5. If still unable to determine → **Stop and ask user**
|
|
46
46
|
|
|
@@ -100,7 +100,7 @@ The following change types **require** updating corresponding documentation:
|
|
|
100
100
|
|
|
101
101
|
Design documents **must** include an "Architecture Impact" section declaring the impact of this change on system architecture. This is a key mechanism to ensure architecture changes go through verification closed-loops.
|
|
102
102
|
|
|
103
|
-
> **Design Decision**: C4 architecture changes are no longer written directly to the truth directory by a standalone `devbooks-c4-map` skill. Instead, they are part of design.md and merged into truth by `devbooks-
|
|
103
|
+
> **Design Decision**: C4 architecture changes are no longer written directly to the truth directory by a standalone `devbooks-c4-map` skill. Instead, they are part of design.md and merged into truth by `devbooks-archiver` after change acceptance.
|
|
104
104
|
|
|
105
105
|
### Template
|
|
106
106
|
|
|
@@ -16,7 +16,7 @@ allowed-tools:
|
|
|
16
16
|
|
|
17
17
|
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
18
18
|
1. `.devbooks/config.yaml` (if exists) -> Parse and use the mappings within
|
|
19
|
-
2. `dev-playbooks/project.md` (if exists) ->
|
|
19
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
20
20
|
3. `project.md` (if exists) -> Template protocol, use default mappings
|
|
21
21
|
4. If still undetermined -> **Stop and ask the user**
|
|
22
22
|
|
|
@@ -19,7 +19,7 @@ allowed-tools:
|
|
|
19
19
|
|
|
20
20
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
21
21
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
22
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
22
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
23
23
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
24
24
|
5. If still unable to determine → **Stop and ask the user**
|
|
25
25
|
|
|
@@ -17,7 +17,7 @@ allowed-tools:
|
|
|
17
17
|
|
|
18
18
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
19
19
|
1. `.devbooks/config.yaml` (if exists) -> Parse and use the mappings within
|
|
20
|
-
2. `dev-playbooks/project.md` (if exists) ->
|
|
20
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
21
21
|
3. `project.md` (if exists) -> template protocol, use default mappings
|
|
22
22
|
5. If still unable to determine -> **Stop and ask the user**
|
|
23
23
|
|
|
@@ -54,7 +54,7 @@ proposal → design → [Implementation Plan] → test-owner(phase1) → coder
|
|
|
54
54
|
|
|
55
55
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
56
56
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
57
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
57
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
58
58
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
59
59
|
5. If still unable to determine → **Stop and ask the user**
|
|
60
60
|
|
|
@@ -18,7 +18,7 @@ allowed-tools:
|
|
|
18
18
|
|
|
19
19
|
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
20
20
|
1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
|
|
21
|
-
2. `dev-playbooks/project.md` (if exists) ->
|
|
21
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
22
22
|
3. `project.md` (if exists) -> Template protocol, use default mappings
|
|
23
23
|
4. If still undetermined -> **Stop and ask the user**
|
|
24
24
|
|
|
@@ -16,7 +16,7 @@ allowed-tools:
|
|
|
16
16
|
|
|
17
17
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
18
18
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
19
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
19
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
20
20
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
21
21
|
4. If still undetermined → **Stop and ask user**
|
|
22
22
|
|
|
@@ -18,7 +18,7 @@ allowed-tools:
|
|
|
18
18
|
|
|
19
19
|
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
20
20
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
21
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
21
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
22
22
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
23
23
|
5. If still unable to determine → **Stop and ask the user**
|
|
24
24
|
|
|
@@ -32,7 +32,7 @@ allowed-tools:
|
|
|
32
32
|
|
|
33
33
|
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
34
34
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
35
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
35
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
36
36
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
37
37
|
4. If still undetermined → **Stop and ask user**
|
|
38
38
|
|
|
@@ -251,7 +251,7 @@ Default routing:
|
|
|
251
251
|
Trigger signals: User says "archive/merge specs/close out/wrap up" etc.
|
|
252
252
|
|
|
253
253
|
Default routing:
|
|
254
|
-
- If spec deltas were produced this time: `devbooks-
|
|
254
|
+
- If spec deltas were produced this time: `devbooks-archiver` (prune `<truth-root>/**` before archive merge)
|
|
255
255
|
- If design decisions need to be written back: `devbooks-design-backport` (as needed)
|
|
256
256
|
- If user documentation affected: `devbooks-docs-sync` (ensure docs consistent with code)
|
|
257
257
|
|
|
@@ -302,7 +302,7 @@ Trigger signals: User says "prototype first/quick validation/spike/--prototype/t
|
|
|
302
302
|
|
|
303
303
|
## DevBooks Skill Adaptation
|
|
304
304
|
|
|
305
|
-
DevBooks uses `devbooks-proposal-author skill`, `devbooks-test-owner/coder skill`, `devbooks-
|
|
305
|
+
DevBooks uses `devbooks-proposal-author skill`, `devbooks-test-owner/coder skill`, `devbooks-archiver skill` as entry points.
|
|
306
306
|
Route according to A/B/C/D above, artifact paths follow `<truth-root>/<change-root>` mappings in project signposts.
|
|
307
307
|
|
|
308
308
|
---
|
|
@@ -21,7 +21,7 @@ allowed-tools:
|
|
|
21
21
|
|
|
22
22
|
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
23
23
|
1. `.devbooks/config.yaml` (if exists) -> Parse and use its mappings
|
|
24
|
-
2. `dev-playbooks/project.md` (if exists) ->
|
|
24
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
25
25
|
3. `project.md` (if exists) -> Template protocol, use default mappings
|
|
26
26
|
5. If still unable to determine -> **Stop and ask the user**
|
|
27
27
|
|
|
@@ -59,7 +59,7 @@ When user says "Coder is done, please verify" or similar, Test Owner enters **Ph
|
|
|
59
59
|
|
|
60
60
|
Before execution, **must** search for configuration in the following order (stop when found):
|
|
61
61
|
1. `.devbooks/config.yaml` (if exists) → Parse and use its mappings
|
|
62
|
-
2. `dev-playbooks/project.md` (if exists) →
|
|
62
|
+
2. `dev-playbooks/project.md` (if exists) → Dev-Playbooks protocol, use default mappings
|
|
63
63
|
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
64
64
|
5. If still unable to determine → **Stop and ask user**
|
|
65
65
|
|
|
@@ -205,7 +205,7 @@ Test Owner must produce a structured `verification.md` that serves as both test
|
|
|
205
205
|
|
|
206
206
|
**Correct path examples**:
|
|
207
207
|
```bash
|
|
208
|
-
#
|
|
208
|
+
# Dev-Playbooks default path
|
|
209
209
|
dev-playbooks/changes/<change-id>/evidence/red-baseline/test-$(date +%Y%m%d-%H%M%S).log
|
|
210
210
|
|
|
211
211
|
# Using the script
|
|
@@ -14,7 +14,7 @@ allowed-tools:
|
|
|
14
14
|
|
|
15
15
|
Before execution, you **must** search for configuration in the following order (stop when found):
|
|
16
16
|
1. `.devbooks/config.yaml` (if exists) -> Parse and use the mappings within
|
|
17
|
-
2. `dev-playbooks/project.md` (if exists) ->
|
|
17
|
+
2. `dev-playbooks/project.md` (if exists) -> Dev-Playbooks protocol, use default mappings
|
|
18
18
|
3. `project.md` (if exists) -> Template protocol, use default mappings
|
|
19
19
|
4. If still undetermined -> **Stop and ask the user**
|
|
20
20
|
|
|
@@ -146,7 +146,7 @@ Run devbooks-code-review skill for change add-oauth2
|
|
|
146
146
|
**4) Archive stage**
|
|
147
147
|
|
|
148
148
|
```
|
|
149
|
-
Run devbooks-
|
|
149
|
+
Run devbooks-archiver skill for change add-oauth2
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
---
|
|
@@ -185,7 +185,7 @@ Run devbooks-spec-gardener skill for change add-oauth2
|
|
|
185
185
|
|
|
186
186
|
| Skill | Description |
|
|
187
187
|
|-------|-------------|
|
|
188
|
-
| devbooks-
|
|
188
|
+
| devbooks-archiver | Maintain/dedupe specs |
|
|
189
189
|
| devbooks-delivery-workflow | End-to-end delivery workflow |
|
|
190
190
|
|
|
191
191
|
### Standalone Skills
|
|
@@ -132,7 +132,7 @@ Each change must declare which gates are covered; missing items require reasons:
|
|
|
132
132
|
| Test Owner | `devbooks-test-owner` | `verification.md` + `tests/` |
|
|
133
133
|
| Coder | `devbooks-coder` | Implement per tasks (no tests) |
|
|
134
134
|
| Reviewer | `devbooks-code-review` | Review feedback |
|
|
135
|
-
|
|
|
135
|
+
| Archiver | `devbooks-archiver` | Archive pruning + C4 merge |
|
|
136
136
|
| Design Backport | `devbooks-design-backport` | Backport design gaps |
|
|
137
137
|
|
|
138
138
|
### Workflow-Based
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
<text x="125" y="95" font-family="Arial, sans-serif" font-size="12" fill="#4a5568" text-anchor="middle">Code Review</text>
|
|
116
116
|
|
|
117
117
|
<rect x="20" y="120" width="210" height="40" rx="8" fill="white" stroke="#8e2de2" stroke-width="2"/>
|
|
118
|
-
<text x="125" y="145" font-family="Arial, sans-serif" font-size="12" fill="#4a5568" text-anchor="middle">
|
|
118
|
+
<text x="125" y="145" font-family="Arial, sans-serif" font-size="12" fill="#4a5568" text-anchor="middle">Archiver</text>
|
|
119
119
|
|
|
120
120
|
<rect x="20" y="170" width="210" height="40" rx="8" fill="white" stroke="#8e2de2" stroke-width="2"/>
|
|
121
121
|
<text x="125" y="195" font-family="Arial, sans-serif" font-size="12" fill="#4a5568" text-anchor="middle">Merge to truth-root</text>
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
<tspan>Test Owner and Coder must work in separate conversations. "Done" is defined by test/build evidence, not AI self-declaration.</tspan>
|
|
195
195
|
</text>
|
|
196
196
|
<text x="0" y="35" font-family="Arial, sans-serif" font-size="10" fill="#a0aec0">
|
|
197
|
-
<tspan>Skills: devbooks-proposal-author → devbooks-design-doc → devbooks-implementation-plan → devbooks-test-owner → devbooks-coder → devbooks-code-review → devbooks-
|
|
197
|
+
<tspan>Skills: devbooks-proposal-author → devbooks-design-doc → devbooks-implementation-plan → devbooks-test-owner → devbooks-coder → devbooks-code-review → devbooks-archiver</tspan>
|
|
198
198
|
</text>
|
|
199
199
|
</g>
|
|
200
200
|
</svg>
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devbooks-spec-gardener
|
|
3
|
-
description: devbooks-spec-gardener: Prune and maintain <truth-root> before archiving (deduplicate/merge, remove obsolete, organize directories, fix inconsistencies) to prevent specs from accumulating out of control. Use when user says "spec gardener/deduplicate specs/pre-archive cleanup/clean obsolete specs", or during DevBooks archive/pre-archive finalization.
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- Glob
|
|
6
|
-
- Grep
|
|
7
|
-
- Read
|
|
8
|
-
- Write
|
|
9
|
-
- Edit
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# DevBooks: Spec Gardener
|
|
13
|
-
|
|
14
|
-
## Workflow Position Awareness
|
|
15
|
-
|
|
16
|
-
> **Core Principle**: Spec Gardener is the endpoint of the archive phase, responsible for merging change package artifacts into truth, **and automatically handling any pending backports**.
|
|
17
|
-
|
|
18
|
-
### My Position in the Overall Workflow
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
proposal → design → test-owner → coder → test-owner(verify) → code-review → [Spec Gardener/Archive]
|
|
22
|
-
↓
|
|
23
|
-
Auto backport + Merge to truth + Archive
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### Spec Gardener's Responsibilities
|
|
27
|
-
|
|
28
|
-
1. **Auto backport detection**: Check if deviation-log.md has pending backport records
|
|
29
|
-
2. **Auto execute backport**: If pending records exist, automatically execute design backport
|
|
30
|
-
3. **Merge to truth**: Merge specs/contracts/architecture into truth-root
|
|
31
|
-
4. **Archive change package**: Set verification.md Status = Archived
|
|
32
|
-
|
|
33
|
-
### Why Auto Backport in Archive Phase?
|
|
34
|
-
|
|
35
|
-
**Design Decision**: Users only need to call skills linearly, no need to judge whether backport is needed.
|
|
36
|
-
|
|
37
|
-
| Scenario | Old Design (Manual judgment) | New Design (Auto handling) |
|
|
38
|
-
|----------|------------------------------|---------------------------|
|
|
39
|
-
| Coder has deviations | User needs to call design-backport → then archive | Spec Gardener auto-detects and backports |
|
|
40
|
-
| Coder has no deviations | Archive directly | Archive directly |
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Prerequisites: Configuration Discovery (Protocol Agnostic)
|
|
45
|
-
|
|
46
|
-
- `<truth-root>`: Current truth directory root
|
|
47
|
-
- `<change-root>`: Change package directory root
|
|
48
|
-
|
|
49
|
-
Before execution, **must** search for configuration in the following order (stop when found):
|
|
50
|
-
1. `.devbooks/config.yaml` (if exists) → Parse and use the mappings within
|
|
51
|
-
2. `dev-playbooks/project.md` (if exists) → DevBooks 2.0 protocol, use default mappings
|
|
52
|
-
3. `project.md` (if exists) → Template protocol, use default mappings
|
|
53
|
-
5. If still unable to determine → **Stop and ask the user**
|
|
54
|
-
|
|
55
|
-
**Critical Constraints**:
|
|
56
|
-
- If `agents_doc` (rules document) is specified in the configuration, **must read that document first** before executing any operations
|
|
57
|
-
- Do not guess directory roots
|
|
58
|
-
- Do not skip reading the rules document
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Core Responsibilities
|
|
63
|
-
|
|
64
|
-
### 0. Auto Backport Detection and Handling (Required Before Archive)
|
|
65
|
-
|
|
66
|
-
> **Design Decision**: Archive phase automatically handles all pending backports, users don't need to manually call design-backport.
|
|
67
|
-
|
|
68
|
-
**Detection Flow**:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
1. Read <change-root>/<change-id>/deviation-log.md
|
|
72
|
-
2. Check if there are "| ❌" pending backport records
|
|
73
|
-
→ Yes: Execute auto backport (steps 3-5)
|
|
74
|
-
→ No: Skip, proceed directly to merge phase
|
|
75
|
-
|
|
76
|
-
3. For each pending record, determine if it's Design-level content:
|
|
77
|
-
- DESIGN_GAP, CONSTRAINT_CHANGE, API_CHANGE → Need backport
|
|
78
|
-
- Pure implementation details (filename/classname/temp steps) → Don't backport, mark as IMPL_ONLY
|
|
79
|
-
|
|
80
|
-
4. Execute design backport:
|
|
81
|
-
- Read design.md
|
|
82
|
-
- Update according to design-backport protocol's "backportable content scope"
|
|
83
|
-
- Add change record at the end of design.md
|
|
84
|
-
|
|
85
|
-
5. Update deviation-log.md:
|
|
86
|
-
- Mark backported records as ✅
|
|
87
|
-
- Record backport time and archive batch
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Auto Backport Content Scope** (inherited from design-backport):
|
|
91
|
-
|
|
92
|
-
| Backportable | Not Backportable |
|
|
93
|
-
|--------------|------------------|
|
|
94
|
-
| External semantics/user-visible behavior | Specific file paths, class/function names |
|
|
95
|
-
| System-level immutable constraints (Invariants) | PR splits, task execution order |
|
|
96
|
-
| Core data contracts and evolution strategies | Overly detailed algorithm pseudocode |
|
|
97
|
-
| Cross-phase governance strategies | Script commands |
|
|
98
|
-
| Key tradeoffs and decisions | Table/field names |
|
|
99
|
-
|
|
100
|
-
**deviation-log.md Update Format**:
|
|
101
|
-
|
|
102
|
-
```markdown
|
|
103
|
-
| Time | Type | Description | Affected Files | Backported | Batch |
|
|
104
|
-
|------|------|-------------|----------------|:----------:|-------|
|
|
105
|
-
| 2024-01-15 10:30 | DESIGN_GAP | Concurrent scenario | tests/... | ✅ | archive-2024-01-16 |
|
|
106
|
-
| 2024-01-15 11:00 | IMPL_ONLY | Variable rename | src/... | ⏭️ | (skipped) |
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 1. Spec Merge and Maintenance
|
|
110
|
-
|
|
111
|
-
During archive phase, merge change package spec artifacts into `<truth-root>`:
|
|
112
|
-
|
|
113
|
-
| Source Path | Target Path | Merge Strategy |
|
|
114
|
-
|-------------|-------------|----------------|
|
|
115
|
-
| `<change-root>/<change-id>/specs/**` | `<truth-root>/specs/**` | Incremental merge |
|
|
116
|
-
| `<change-root>/<change-id>/contracts/**` | `<truth-root>/contracts/**` | Versioned merge |
|
|
117
|
-
|
|
118
|
-
### 2. C4 Architecture Map Merge (New)
|
|
119
|
-
|
|
120
|
-
> **Design Decision**: C4 architecture changes are now recorded in design.md's Architecture Impact section and merged into truth by spec-gardener during archiving.
|
|
121
|
-
|
|
122
|
-
During archive phase, detect and merge architecture changes:
|
|
123
|
-
|
|
124
|
-
| Detection Source | Target Path | Merge Logic |
|
|
125
|
-
|------------------|-------------|-------------|
|
|
126
|
-
| "Architecture Impact" section in `<change-root>/<change-id>/design.md` | `<truth-root>/architecture/c4.md` | Incremental update |
|
|
127
|
-
|
|
128
|
-
**C4 Merge Flow**:
|
|
129
|
-
|
|
130
|
-
1. **Detect Architecture Changes**: Parse "Architecture Impact" section in `design.md`
|
|
131
|
-
2. **Determine If Merge Needed**:
|
|
132
|
-
- If "No Architecture Changes" is checked → Skip merge
|
|
133
|
-
- If "Has Architecture Changes" → Execute merge
|
|
134
|
-
3. **Execute Merge**:
|
|
135
|
-
- Read `<truth-root>/architecture/c4.md` (create if doesn't exist)
|
|
136
|
-
- Update corresponding sections based on Architecture Impact descriptions
|
|
137
|
-
- Update Container/Component tables
|
|
138
|
-
- Update dependency relationships
|
|
139
|
-
- Update layering constraints (if changed)
|
|
140
|
-
4. **Record Merge Log**: Append change record at end of c4.md
|
|
141
|
-
|
|
142
|
-
**Merge Output Format** (appended to c4.md):
|
|
143
|
-
|
|
144
|
-
```markdown
|
|
145
|
-
## Change History
|
|
146
|
-
|
|
147
|
-
| Date | Change ID | Impact Summary |
|
|
148
|
-
|------|-----------|----------------|
|
|
149
|
-
| <date> | <change-id> | <brief description of architecture changes> |
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### 3. Deduplication and Cleanup
|
|
153
|
-
|
|
154
|
-
Execute in maintenance mode:
|
|
155
|
-
|
|
156
|
-
- Detect duplicate spec definitions
|
|
157
|
-
- Clean up obsolete/deprecated specs
|
|
158
|
-
- Organize directory structure
|
|
159
|
-
- Fix consistency issues
|
|
160
|
-
|
|
161
|
-
## Execution Method
|
|
162
|
-
|
|
163
|
-
1) First read and follow: `_shared/references/universal-gating-protocol.md` (verifiability + structural quality gates).
|
|
164
|
-
2) Strictly execute the complete prompt: `references/spec-gardener-prompt.md`.
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Context Awareness
|
|
169
|
-
|
|
170
|
-
This Skill automatically detects context before execution and selects the appropriate maintenance mode.
|
|
171
|
-
|
|
172
|
-
Detection rules reference: `skills/_shared/context-detection-template.md`
|
|
173
|
-
|
|
174
|
-
### Detection Flow
|
|
175
|
-
|
|
176
|
-
1. Detect `<truth-root>/` directory status
|
|
177
|
-
2. If change-id is provided, detect change package archive conditions
|
|
178
|
-
3. Detect duplicate/obsolete specs
|
|
179
|
-
|
|
180
|
-
### Modes Supported by This Skill
|
|
181
|
-
|
|
182
|
-
| Mode | Trigger Condition | Behavior |
|
|
183
|
-
|------|-------------------|----------|
|
|
184
|
-
| **Archive Mode** | change-id provided and gates pass | **Auto backport** → Merge to truth-root → Set Status=Archived |
|
|
185
|
-
| **Maintenance Mode** | No change-id | Execute deduplication, cleanup, organization operations |
|
|
186
|
-
| **Check Mode** | With --dry-run parameter | Output suggestions only, no actual modifications |
|
|
187
|
-
|
|
188
|
-
### Archive Mode Complete Flow
|
|
189
|
-
|
|
190
|
-
```
|
|
191
|
-
1. Pre-checks:
|
|
192
|
-
- [ ] Change package exists
|
|
193
|
-
- [ ] verification.md Status = Ready or Done
|
|
194
|
-
- [ ] evidence/green-final/ exists
|
|
195
|
-
- [ ] tasks.md all [x]
|
|
196
|
-
|
|
197
|
-
2. Auto backport (if needed):
|
|
198
|
-
- [ ] Detect deviation-log.md
|
|
199
|
-
- [ ] Backport to design.md
|
|
200
|
-
- [ ] Update deviation-log.md marks
|
|
201
|
-
|
|
202
|
-
3. Merge to truth:
|
|
203
|
-
- [ ] Merge specs/**
|
|
204
|
-
- [ ] Merge contracts/**
|
|
205
|
-
- [ ] Merge Architecture Impact to c4.md
|
|
206
|
-
|
|
207
|
-
4. Archive:
|
|
208
|
-
- [ ] Set verification.md Status = Archived
|
|
209
|
-
- [ ] Output archive report
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Detection Output Example
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
Detection Results:
|
|
216
|
-
- truth-root: Exists, contains 12 spec files
|
|
217
|
-
- Change package: Exists, all gates green
|
|
218
|
-
- Running mode: Archive mode
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## MCP Enhancement
|
|
224
|
-
|
|
225
|
-
This Skill does not depend on MCP services; no runtime detection required.
|
|
226
|
-
|
|
227
|
-
MCP enhancement rules reference: `skills/_shared/mcp-enhancement-template.md`
|
|
228
|
-
|