@slamb2k/mad-skills 2.0.6 → 2.0.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/.claude-plugin/marketplace.json +30 -0
- package/.claude-plugin/plugin.json +18 -0
- package/README.md +101 -25
- package/agents/ship-analyzer.md +91 -0
- package/hooks/hooks.json +18 -0
- package/hooks/session-guard-prompt.sh +59 -0
- package/hooks/session-guard.sh +406 -0
- package/package.json +6 -7
- package/skills/brace/SKILL.md +243 -17
- package/skills/brace/assets/gitignore-template +0 -3
- package/skills/brace/references/phase-prompts.md +37 -0
- package/skills/brace/references/report-template.md +5 -1
- package/skills/build/SKILL.md +295 -16
- package/skills/distil/SKILL.md +261 -10
- package/skills/manifest.json +26 -16
- package/skills/prime/SKILL.md +79 -11
- package/skills/rig/SKILL.md +168 -10
- package/skills/ship/SKILL.md +193 -22
- package/skills/speccy/SKILL.md +165 -0
- package/skills/speccy/references/interview-guide.md +96 -0
- package/skills/speccy/tests/evals.json +34 -0
- package/skills/sync/SKILL.md +178 -20
- package/skills/brace/instructions.md +0 -229
- package/skills/build/instructions.md +0 -293
- package/skills/distil/instructions.md +0 -255
- package/skills/prime/instructions.md +0 -73
- package/skills/rig/instructions.md +0 -162
- package/skills/ship/instructions.md +0 -192
- package/skills/sync/instructions.md +0 -178
- package/src/cli.js +0 -419
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
# Brace Instructions
|
|
2
|
-
|
|
3
|
-
Initialize any project directory with the GOTCHA/BRACE framework. Idempotent —
|
|
4
|
-
safe to re-run on existing projects. Content templates and subagent prompts
|
|
5
|
-
are in `references/`.
|
|
6
|
-
|
|
7
|
-
**Key principle:** Scan first, present plan, get approval, then act.
|
|
8
|
-
|
|
9
|
-
Phase prompts: `references/phase-prompts.md`
|
|
10
|
-
Scaffold manifest: `references/scaffold-manifest.md`
|
|
11
|
-
Report format: `references/report-template.md`
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Flags
|
|
16
|
-
|
|
17
|
-
Parse optional flags from the request:
|
|
18
|
-
- `--no-brace` — Skip BRACE build methodology (goals/build_app.md)
|
|
19
|
-
- `--force` — Overwrite existing files without prompting
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Pre-flight
|
|
24
|
-
|
|
25
|
-
Before starting, check all dependencies in this table:
|
|
26
|
-
|
|
27
|
-
| Dependency | Type | Check | Required | Resolution | Detail |
|
|
28
|
-
|-----------|------|-------|----------|------------|--------|
|
|
29
|
-
| claude-mem | plugin | — | no | ask | `claude plugin install claude-mem` |
|
|
30
|
-
|
|
31
|
-
For each row, in order:
|
|
32
|
-
1. Run the Check command (for cli/npm) or test file existence (for agent/skill)
|
|
33
|
-
2. If found: continue silently
|
|
34
|
-
3. If missing: apply Resolution strategy
|
|
35
|
-
- **stop**: notify user with Detail, halt execution
|
|
36
|
-
- **url**: notify user with Detail (install link), halt execution
|
|
37
|
-
- **install**: notify user, run the command in Detail, continue if successful
|
|
38
|
-
- **ask**: notify user, offer to run command in Detail, continue either way (or halt if required)
|
|
39
|
-
- **fallback**: notify user with Detail, continue with degraded behavior
|
|
40
|
-
4. After all checks: summarize what's available and what's degraded
|
|
41
|
-
|
|
42
|
-
1. Capture **FLAGS** from the user's request
|
|
43
|
-
2. Create a task list tracking all 5 phases
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Phase 1: Directory Scan
|
|
48
|
-
|
|
49
|
-
Launch **Bash** subagent (**haiku**):
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
Task(
|
|
53
|
-
subagent_type: "Bash",
|
|
54
|
-
model: "haiku",
|
|
55
|
-
description: "Scan directory for existing GOTCHA structure",
|
|
56
|
-
prompt: <read from references/phase-prompts.md#phase-1>
|
|
57
|
-
)
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Parse SCAN_REPORT. Extract:
|
|
61
|
-
- `directory_name` (used as default project name)
|
|
62
|
-
- `existing_dirs` / `missing_dirs`
|
|
63
|
-
- `existing_files` / `missing_files`
|
|
64
|
-
- `has_claude_md` / `has_gitignore`
|
|
65
|
-
- `has_atlas` (legacy ATLAS naming detected)
|
|
66
|
-
- `has_forge` (legacy FORGE naming detected)
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Phase 1b: Legacy Upgrade Detection
|
|
71
|
-
|
|
72
|
-
**Skip if neither `has_atlas` nor `has_forge` is true.**
|
|
73
|
-
|
|
74
|
-
If SCAN_REPORT shows `has_atlas: true` or `has_forge: true`, ask the user via AskUserQuestion:
|
|
75
|
-
|
|
76
|
-
Question: "Legacy naming detected. Upgrade to BRACE?"
|
|
77
|
-
Options:
|
|
78
|
-
- "Yes, upgrade to BRACE" — Replace legacy references with BRACE equivalents
|
|
79
|
-
- "No, leave as-is" — Keep existing naming
|
|
80
|
-
|
|
81
|
-
Store result as `upgrade_legacy: true|false` in USER_CONFIG.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Phase 2: Project Inquiry
|
|
86
|
-
|
|
87
|
-
**Runs on primary thread** (user interaction required).
|
|
88
|
-
|
|
89
|
-
1. Derive default project name from SCAN_REPORT `directory_name`
|
|
90
|
-
2. Present via AskUserQuestion:
|
|
91
|
-
|
|
92
|
-
Question: "What to include in GOTCHA setup?"
|
|
93
|
-
Options:
|
|
94
|
-
- "Full GOTCHA + BRACE (Recommended)"
|
|
95
|
-
- "GOTCHA structure only (no BRACE methodology)"
|
|
96
|
-
- "Cancel"
|
|
97
|
-
|
|
98
|
-
3. If not cancelled, ask for project description (one sentence) via
|
|
99
|
-
AskUserQuestion with free text.
|
|
100
|
-
|
|
101
|
-
4. Ask installation level via AskUserQuestion:
|
|
102
|
-
|
|
103
|
-
Question: "Where should global preferences and universal principles go?"
|
|
104
|
-
Options:
|
|
105
|
-
- "Both — global + project (Recommended)" → portable AND global coverage
|
|
106
|
-
- "Global (~/.claude/CLAUDE.md) only" → applies to all projects
|
|
107
|
-
- "Project level only" → self-contained, portable
|
|
108
|
-
|
|
109
|
-
5. Store as USER_CONFIG:
|
|
110
|
-
- project_name: from directory name or user override
|
|
111
|
-
- description: from user input
|
|
112
|
-
- include_brace: true/false (based on selection and `--no-brace`)
|
|
113
|
-
- install_level: "both" | "global" | "project"
|
|
114
|
-
|
|
115
|
-
**If cancelled, stop here.**
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Phase 3: Present Plan & Approve
|
|
120
|
-
|
|
121
|
-
Build the ACTION_PLAN from SCAN_REPORT + USER_CONFIG + FLAGS.
|
|
122
|
-
|
|
123
|
-
For each item in `references/scaffold-manifest.md`:
|
|
124
|
-
- If component not selected in USER_CONFIG → status: "not selected"
|
|
125
|
-
- If item already exists (from SCAN_REPORT) and no `--force` → status: "skip"
|
|
126
|
-
- If item exists and `--force` → status: "overwrite"
|
|
127
|
-
- If CLAUDE.md exists → status: "merge" (append GOTCHA section)
|
|
128
|
-
- If .gitignore exists → status: "merge" (append missing entries)
|
|
129
|
-
- Otherwise → status: "create"
|
|
130
|
-
|
|
131
|
-
If `upgrade_legacy` is true in USER_CONFIG, set status "upgrade" for:
|
|
132
|
-
- CLAUDE.md (replaces "merge" or "skip" — upgrade takes priority)
|
|
133
|
-
- goals/build_app.md (replaces "skip")
|
|
134
|
-
- goals/manifest.md (replaces "skip")
|
|
135
|
-
|
|
136
|
-
Present plan summary to user via AskUserQuestion:
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
GOTCHA Framework Setup for: {project_name}
|
|
140
|
-
|
|
141
|
-
Will create: {list of items with status "create"}
|
|
142
|
-
Will merge: {list of items with status "merge"}
|
|
143
|
-
Will upgrade: {list of items with status "upgrade" — legacy → BRACE}
|
|
144
|
-
Will skip: {count} existing items
|
|
145
|
-
Not selected: {count} items
|
|
146
|
-
Global config: {install_level description}
|
|
147
|
-
|
|
148
|
-
Proceed?
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Options: "Yes, proceed" / "Cancel"
|
|
152
|
-
|
|
153
|
-
**If cancelled, stop here.**
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## Phase 4: Scaffold Structure
|
|
158
|
-
|
|
159
|
-
Launch **general-purpose** subagent:
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
Task(
|
|
163
|
-
subagent_type: "general-purpose",
|
|
164
|
-
description: "Create GOTCHA framework structure",
|
|
165
|
-
prompt: <read from references/phase-prompts.md#phase-4>
|
|
166
|
-
)
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Before sending the prompt, substitute these variables:
|
|
170
|
-
- `{ACTION_PLAN}` — the action plan from Phase 3
|
|
171
|
-
- `{PROJECT_NAME}` — from USER_CONFIG
|
|
172
|
-
- `{PROJECT_DESCRIPTION}` — from USER_CONFIG
|
|
173
|
-
- `{INSTALL_LEVEL}` — from USER_CONFIG ("both", "global", or "project")
|
|
174
|
-
- `{CLAUDE_MD_TEMPLATE}` — read from `references/claude-md-template.md`
|
|
175
|
-
(the section between BEGIN TEMPLATE and END TEMPLATE)
|
|
176
|
-
- `{GITIGNORE_CONTENT}` — read from `assets/gitignore-template`
|
|
177
|
-
- `{GOALS_MANIFEST}` — read from `references/scaffold-manifest.md`
|
|
178
|
-
(the goals/manifest.md content block)
|
|
179
|
-
- `{TOOLS_MANIFEST}` — read from `references/scaffold-manifest.md`
|
|
180
|
-
(the tools/manifest.md content block)
|
|
181
|
-
- `{BRACE_WORKFLOW}` — read from `references/brace-workflow.md`
|
|
182
|
-
(the section after the header, used for goals/build_app.md)
|
|
183
|
-
- `{GLOBAL_PREFERENCES_CONTENT}` — read from `assets/global-preferences-template.md`
|
|
184
|
-
(the section between BEGIN TEMPLATE and END TEMPLATE)
|
|
185
|
-
|
|
186
|
-
Parse SCAFFOLD_REPORT. If status is "failed", report to user and stop.
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Phase 5: Verification & Report
|
|
191
|
-
|
|
192
|
-
Launch **Bash** subagent (**haiku**):
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
-
Task(
|
|
196
|
-
subagent_type: "Bash",
|
|
197
|
-
model: "haiku",
|
|
198
|
-
description: "Verify GOTCHA structure",
|
|
199
|
-
prompt: <read from references/phase-prompts.md#phase-5>
|
|
200
|
-
)
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Parse VERIFY_REPORT. Present the final summary using the format in
|
|
204
|
-
`references/report-template.md`.
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
## Idempotency Rules
|
|
209
|
-
|
|
210
|
-
- **Skip** directories and files that already exist (unless `--force`)
|
|
211
|
-
- **Merge** CLAUDE.md: append GOTCHA section if file exists but lacks it
|
|
212
|
-
- **Merge** .gitignore: append missing entries only
|
|
213
|
-
- **Never delete** user content
|
|
214
|
-
- **Never overwrite** without `--force` or explicit user approval
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
## Error Handling
|
|
219
|
-
|
|
220
|
-
Standard escalation pattern:
|
|
221
|
-
1. If retryable (permission issue after mkdir): retry once
|
|
222
|
-
2. If persistent: report to user with specific error
|
|
223
|
-
3. Offer: skip and continue / abort
|
|
224
|
-
4. Never silently swallow errors
|
|
225
|
-
|
|
226
|
-
Common issues:
|
|
227
|
-
- Permission denied → report, suggest checking directory permissions
|
|
228
|
-
- CLAUDE.md merge conflict → show both versions, let user choose
|
|
229
|
-
- Directory is read-only → abort with clear message
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# Build Instructions
|
|
2
|
-
|
|
3
|
-
Execute a detailed design/plan through the full feature-dev lifecycle with
|
|
4
|
-
maximum context isolation. Every heavy stage runs in a subagent so the primary
|
|
5
|
-
conversation only accumulates structured reports.
|
|
6
|
-
|
|
7
|
-
Stage prompts: `references/stage-prompts.md`
|
|
8
|
-
Report budgets: `references/report-contracts.md`
|
|
9
|
-
Agent selection: `references/architecture-notes.md`
|
|
10
|
-
Project detection: `references/project-detection.md`
|
|
11
|
-
|
|
12
|
-
## Flags
|
|
13
|
-
|
|
14
|
-
Parse optional flags from the request:
|
|
15
|
-
- `--skip-questions`: Skip Stage 2 (clarifying questions)
|
|
16
|
-
- `--skip-review`: Skip Stage 5 (code review)
|
|
17
|
-
- `--no-ship`: Stop after Stage 8 docs update
|
|
18
|
-
- `--parallel-impl`: Split implementation into parallel agents when independent
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Pre-flight
|
|
23
|
-
|
|
24
|
-
Before starting, check all dependencies in this table:
|
|
25
|
-
|
|
26
|
-
| Dependency | Type | Check | Required | Resolution | Detail |
|
|
27
|
-
|-----------|------|-------|----------|------------|--------|
|
|
28
|
-
| ship | skill | `.claude/skills/ship/SKILL.md` | yes | stop | Install with: npx @slamb2k/mad-skills --skill ship |
|
|
29
|
-
| feature-dev:code-explorer | agent | — | no | fallback | Uses general-purpose agent |
|
|
30
|
-
| feature-dev:code-architect | agent | — | no | fallback | Uses general-purpose agent |
|
|
31
|
-
| feature-dev:code-reviewer | agent | — | no | fallback | Uses general-purpose agent |
|
|
32
|
-
|
|
33
|
-
For each row, in order:
|
|
34
|
-
1. Run the Check command (for cli/npm) or test file existence (for agent/skill)
|
|
35
|
-
2. If found: continue silently
|
|
36
|
-
3. If missing: apply Resolution strategy
|
|
37
|
-
- **stop**: notify user with Detail, halt execution
|
|
38
|
-
- **url**: notify user with Detail (install link), halt execution
|
|
39
|
-
- **install**: notify user, run the command in Detail, continue if successful
|
|
40
|
-
- **ask**: notify user, offer to run command in Detail, continue either way (or halt if required)
|
|
41
|
-
- **fallback**: notify user with Detail, continue with degraded behavior
|
|
42
|
-
4. After all checks: summarize what's available and what's degraded
|
|
43
|
-
|
|
44
|
-
1. Capture **PLAN** (the user's argument) and **FLAGS**
|
|
45
|
-
2. Detect project type using `references/project-detection.md` to populate
|
|
46
|
-
**PROJECT_CONFIG** (language, test_runner, test_setup)
|
|
47
|
-
3. Check for outstanding questions from previous work:
|
|
48
|
-
- Search CLAUDE.md for a "Known Issues" or "Open Questions" section
|
|
49
|
-
- Search `goals/` for files containing "open_question" or "unresolved"
|
|
50
|
-
- Search memory (if available) for recent items of type "task" or
|
|
51
|
-
"open_question" that are unresolved
|
|
52
|
-
- Check for `DEBRIEF_ITEMS` in any recent build logs
|
|
53
|
-
4. If outstanding items found, present via AskUserQuestion:
|
|
54
|
-
```
|
|
55
|
-
"Found {count} outstanding items from previous work:"
|
|
56
|
-
{numbered list with summary of each}
|
|
57
|
-
"Address any of these before starting the build?"
|
|
58
|
-
```
|
|
59
|
-
Options:
|
|
60
|
-
- **"Yes, let me choose which ones"** → present each; options:
|
|
61
|
-
"Incorporate into this build" / "Skip for now" / "Explain more"
|
|
62
|
-
Items marked "incorporate" get appended to the PLAN as additional
|
|
63
|
-
requirements for Stage 1 to explore.
|
|
64
|
-
- **"No, proceed with the build"** → continue normally
|
|
65
|
-
5. Create a task list tracking all stages
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Stage 1: Explore
|
|
70
|
-
|
|
71
|
-
Launch **feature-dev:code-explorer** (fallback: general-purpose):
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
Task(
|
|
75
|
-
subagent_type: "feature-dev:code-explorer",
|
|
76
|
-
description: "Explore codebase for build plan",
|
|
77
|
-
prompt: <read from references/stage-prompts.md#stage-1>
|
|
78
|
-
)
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Substitute `{PLAN}` into the prompt.
|
|
82
|
-
Parse EXPLORE_REPORT. Extract `questions` for Stage 2.
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Stage 2: Clarifying Questions
|
|
87
|
-
|
|
88
|
-
**Skip if `--skip-questions` or no questions found.**
|
|
89
|
-
|
|
90
|
-
Runs on the **primary thread** (requires user interaction).
|
|
91
|
-
|
|
92
|
-
1. Review EXPLORE_REPORT `questions` and `potential_issues`
|
|
93
|
-
2. Present questions to user via AskUserQuestion
|
|
94
|
-
3. Store answers as CLARIFICATIONS
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Stage 3: Architecture Design
|
|
99
|
-
|
|
100
|
-
Launch **feature-dev:code-architect** (fallback: general-purpose):
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
Task(
|
|
104
|
-
subagent_type: "feature-dev:code-architect",
|
|
105
|
-
description: "Design implementation architecture",
|
|
106
|
-
prompt: <read from references/stage-prompts.md#stage-3>
|
|
107
|
-
)
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Substitute `{PLAN}`, `{EXPLORE_REPORT}`, `{CLARIFICATIONS}`.
|
|
111
|
-
Parse ARCH_REPORT. Present `approach_summary` to user for confirmation.
|
|
112
|
-
|
|
113
|
-
If rejected, incorporate feedback and re-run.
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Stage 4: Implementation
|
|
118
|
-
|
|
119
|
-
If `--parallel-impl` and ARCH_REPORT has independent `parallel_groups`,
|
|
120
|
-
launch **multiple general-purpose subagents in parallel**.
|
|
121
|
-
|
|
122
|
-
Otherwise launch **one general-purpose subagent**:
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
Task(
|
|
126
|
-
subagent_type: "general-purpose",
|
|
127
|
-
description: "Implement plan",
|
|
128
|
-
prompt: <read from references/stage-prompts.md#stage-4>
|
|
129
|
-
)
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Substitute `{PLAN}`, `{ARCH_REPORT}`, conventions, `{PROJECT_CONFIG.test_runner}`.
|
|
133
|
-
Parse IMPL_REPORT(s). If any failed, assess retry or abort.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Stage 5: Code Review
|
|
138
|
-
|
|
139
|
-
**Skip if `--skip-review`.**
|
|
140
|
-
|
|
141
|
-
Launch **3 feature-dev:code-reviewer subagents in parallel** (fallback: general-purpose):
|
|
142
|
-
|
|
143
|
-
1. Simplicity & DRY
|
|
144
|
-
2. Bugs & Correctness
|
|
145
|
-
3. Conventions & Integration
|
|
146
|
-
|
|
147
|
-
Prompts in `references/stage-prompts.md#stage-5`.
|
|
148
|
-
|
|
149
|
-
Consolidate reports. Present **only critical and high severity findings**.
|
|
150
|
-
Ask: "Fix these now, or proceed as-is?"
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Stage 6: Fix Review Findings
|
|
155
|
-
|
|
156
|
-
**Only if Stage 5 found issues AND user wants them fixed.**
|
|
157
|
-
|
|
158
|
-
Launch **general-purpose subagent**:
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
Task(
|
|
162
|
-
subagent_type: "general-purpose",
|
|
163
|
-
description: "Fix review findings",
|
|
164
|
-
prompt: <read from references/stage-prompts.md#stage-6>
|
|
165
|
-
)
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Stage 7: Verify
|
|
171
|
-
|
|
172
|
-
Launch **Bash subagent** (haiku):
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
Task(
|
|
176
|
-
subagent_type: "Bash",
|
|
177
|
-
model: "haiku",
|
|
178
|
-
description: "Run verification tests",
|
|
179
|
-
prompt: <read from references/stage-prompts.md#stage-7>
|
|
180
|
-
)
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Substitute `{PROJECT_CONFIG.test_runner}` and `{PROJECT_CONFIG.test_setup}`.
|
|
184
|
-
|
|
185
|
-
If tests fail:
|
|
186
|
-
- First failure: launch general-purpose agent to fix, retry
|
|
187
|
-
- Second failure: report to user and stop
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Stage 8: Update Progress Documentation
|
|
192
|
-
|
|
193
|
-
**Skip if EXPLORE_REPORT has no `source_docs`.**
|
|
194
|
-
|
|
195
|
-
Launch **general-purpose subagent**:
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
Task(
|
|
199
|
-
subagent_type: "general-purpose",
|
|
200
|
-
description: "Update progress documentation",
|
|
201
|
-
prompt: <read from references/stage-prompts.md#stage-8>
|
|
202
|
-
)
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
**If `--no-ship`: Stop here and present final summary.**
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## Stage 9: Ship
|
|
210
|
-
|
|
211
|
-
Invoke the `/ship` skill:
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
/ship {approach_summary from ARCH_REPORT}. Files: {files from IMPL_REPORT}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## Stage 10: Debrief
|
|
220
|
-
|
|
221
|
-
**Always runs** on the primary thread (requires user interaction).
|
|
222
|
-
|
|
223
|
-
1. Scan all stage reports for unresolved items:
|
|
224
|
-
- EXPLORE_REPORT: `potential_issues` not addressed by implementation
|
|
225
|
-
- ARCH_REPORT: `risks` with deferred mitigations
|
|
226
|
-
- REVIEW_REPORT: `medium`/`low` findings not fixed in Stage 6
|
|
227
|
-
- TEST_REPORT: warnings, skipped tests, flaky results
|
|
228
|
-
- DOCS_REPORT: `docs_skipped` items
|
|
229
|
-
- IMPL_REPORT: `issues_encountered` that were worked around
|
|
230
|
-
|
|
231
|
-
2. Compile into DEBRIEF_ITEMS (see `references/stage-prompts.md#stage-10`).
|
|
232
|
-
Categorise each as: unresolved_risk, deferred_fix, open_question,
|
|
233
|
-
assumption, or tech_debt.
|
|
234
|
-
|
|
235
|
-
3. **If no items found, skip to Final Report.**
|
|
236
|
-
|
|
237
|
-
4. Present numbered summary via AskUserQuestion grouped by category.
|
|
238
|
-
Each item shows: `[category] summary (effort)`.
|
|
239
|
-
|
|
240
|
-
Options:
|
|
241
|
-
- **"Fix now"** → create a task list of resolution activities for
|
|
242
|
-
each item; present for user confirmation, then work through them
|
|
243
|
-
- **"Create goals for future sessions"** → write goal files to `goals/`
|
|
244
|
-
(if GOTCHA structure exists) or append to CLAUDE.md as Known Issues
|
|
245
|
-
- **"Note and continue"** → acknowledge items without formal tracking;
|
|
246
|
-
log to memory (if exists) or as source file comments. No further action.
|
|
247
|
-
- **"Let me choose per item"** → present each individually with full
|
|
248
|
-
description, evidence, and impact. Options per item:
|
|
249
|
-
"Fix now" / "Add to goals" / "Explain more" / "Note and continue".
|
|
250
|
-
"Explain more" reads source files cited in evidence, provides
|
|
251
|
-
expanded context, then re-presents the item for decision.
|
|
252
|
-
|
|
253
|
-
5. After resolution, include debrief summary in the Final Report.
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Final Report
|
|
258
|
-
|
|
259
|
-
```
|
|
260
|
-
Build complete
|
|
261
|
-
|
|
262
|
-
Plan: {first line of PLAN}
|
|
263
|
-
Approach: {approach_summary}
|
|
264
|
-
|
|
265
|
-
Files modified: {count}
|
|
266
|
-
Files created: {count}
|
|
267
|
-
Tests: {passed}/{total}
|
|
268
|
-
|
|
269
|
-
Docs updated: {count or "none"}
|
|
270
|
-
|
|
271
|
-
PR: {pr_url} (merged at {merge_commit})
|
|
272
|
-
|
|
273
|
-
Key decisions:
|
|
274
|
-
- {decision 1}
|
|
275
|
-
- {decision 2}
|
|
276
|
-
|
|
277
|
-
Review findings addressed: {count fixed} / {count found}
|
|
278
|
-
|
|
279
|
-
Debrief: {count resolved} / {count surfaced} items addressed
|
|
280
|
-
{list of items created as goals or tasks, if any}
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
If any stage failed, report the failure point and what was accomplished.
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
## Rollback
|
|
288
|
-
|
|
289
|
-
If implementation succeeds but later stages fail:
|
|
290
|
-
- Tests fail: fix agent attempts repair, then reports to user
|
|
291
|
-
- Review critical: user decides fix or proceed
|
|
292
|
-
- Ship fails: code is still committed locally; user can manually push
|
|
293
|
-
- Never silently revert completed implementation work
|