@martinffx/atelier 1.3.0 → 2.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/.codex-plugin/plugin.json +27 -0
- package/CHANGELOG.md +38 -0
- package/README.md +164 -136
- package/agents/architect.md +6 -6
- package/agents/oracle.md +1 -1
- package/agents/{recon.md → sentinel.md} +3 -3
- package/dist/atelier.js +14303 -12938
- package/package.json +7 -1
- package/skills/code-commit/SKILL.md +74 -66
- package/skills/code-handoff/SKILL.md +1 -1
- package/skills/code-review/SKILL.md +2 -2
- package/skills/code-review/references/rq.md +3 -3
- package/skills/code-subagents/SKILL.md +44 -75
- package/skills/code-subagents/references/batch-reviewer-prompt.md +44 -0
- package/skills/code-subagents/references/implementor-prompt.md +10 -11
- package/skills/spec-brainstorm/SKILL.md +19 -14
- package/skills/spec-finish/SKILL.md +14 -14
- package/skills/spec-implement/SKILL.md +40 -39
- package/skills/spec-orchestrator/SKILL.md +71 -36
- package/skills/spec-plan/SKILL.md +79 -25
- package/skills/code-subagents/references/code-quality-reviewer-prompt.md +0 -48
- package/skills/code-subagents/references/spec-reviewer-prompt.md +0 -62
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-finish
|
|
3
3
|
description: >
|
|
4
|
-
Post-implementation completion workflow. Use after spec-implement
|
|
5
|
-
review, create stacked commits, and open a PR via code-pull-request.
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Post-implementation completion workflow for Spec-backed Plans. Use after spec-implement
|
|
5
|
+
completes to validate, review, create stacked commits, and open a PR via code-pull-request.
|
|
6
|
+
Triggers only with an active Spec-backed Plan after spec-implement completes, including when
|
|
7
|
+
the user says "finish", "done", or "complete" in that context.
|
|
8
8
|
user-invocable: true
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -15,11 +15,11 @@ Post-implementation workflow: validate → review → stack commits → prepare
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
17
17
|
Before starting, verify:
|
|
18
|
-
1. All
|
|
18
|
+
1. All Spec-backed Plan tasks are complete
|
|
19
19
|
2. Working directory is clean (committed or staged)
|
|
20
20
|
3. Tests pass
|
|
21
21
|
|
|
22
|
-
If not complete
|
|
22
|
+
If not complete, go back to `spec-implement`.
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
@@ -61,7 +61,7 @@ npm run build
|
|
|
61
61
|
go build ./...
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
**If any fail:** Return to spec-implement to fix.
|
|
64
|
+
**If any fail:** Return to `spec-implement` to fix.
|
|
65
65
|
|
|
66
66
|
**If all pass:** Proceed.
|
|
67
67
|
|
|
@@ -78,8 +78,8 @@ Use the Skill tool to invoke code-review skill for comprehensive code review.
|
|
|
78
78
|
- No debug code left
|
|
79
79
|
|
|
80
80
|
### If code-review finds issues
|
|
81
|
-
-
|
|
82
|
-
-
|
|
81
|
+
- Minor fixes may be made here, then re-validated and reviewed.
|
|
82
|
+
- Blocking or scope-changing fixes return to `spec-implement`.
|
|
83
83
|
|
|
84
84
|
---
|
|
85
85
|
|
|
@@ -114,8 +114,8 @@ Use the Skill tool to invoke code-review skill for comprehensive code review.
|
|
|
114
114
|
## Step 5: Open the PR
|
|
115
115
|
|
|
116
116
|
Steps 1-4 (validate, review, stack commits, update docs) must all be complete
|
|
117
|
-
before proceeding. **If code-review found blocking issues, stop
|
|
118
|
-
spec-implement to fix them. Do not proceed to Step 5b.**
|
|
117
|
+
before proceeding. **If code-review found blocking or scope-changing issues, stop and return
|
|
118
|
+
to spec-implement to fix them. Do not proceed to Step 5b.**
|
|
119
119
|
|
|
120
120
|
### Step 5a: Present Completion Summary
|
|
121
121
|
|
|
@@ -157,6 +157,6 @@ This skill orchestrates other skills:
|
|
|
157
157
|
|
|
158
158
|
## When NOT to Use
|
|
159
159
|
|
|
160
|
-
- If implementation still in progress
|
|
161
|
-
- If tests failing
|
|
162
|
-
- If review found blocking issues
|
|
160
|
+
- If implementation is still in progress, use spec-implement
|
|
161
|
+
- If tests are failing, go back to spec-implement
|
|
162
|
+
- If review found blocking or scope-changing issues, go back to spec-implement
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-implement
|
|
3
3
|
description: >
|
|
4
|
-
Execute
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"do it", or after spec-plan completes task creation. Do NOT use without an approved plan —
|
|
8
|
-
invoke spec-plan first.
|
|
4
|
+
Execute an approved Spec-backed Plan from plan.json. Uses task tracking when useful, enforces
|
|
5
|
+
TDD, and reports between batches. Trigger when the user says "implement", "go", "start", or
|
|
6
|
+
"do it" after approving a persisted plan. Do NOT use without an approved Spec-backed Plan.
|
|
9
7
|
user-invocable: true
|
|
10
8
|
---
|
|
11
9
|
|
|
12
10
|
# Spec Implement
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
Execute the approved Spec-backed Plan. Track progress when it uses tracked tasks. Report. Stop
|
|
13
|
+
when blocked.
|
|
15
14
|
|
|
16
15
|
**Announce at start:** "I'm using the spec-implement skill to execute this plan."
|
|
17
16
|
|
|
@@ -22,11 +21,11 @@ back to spec-plan. If the design is wrong, go back to spec-brainstorm.
|
|
|
22
21
|
|
|
23
22
|
Before starting, verify these exist:
|
|
24
23
|
|
|
25
|
-
1.
|
|
26
|
-
2.
|
|
27
|
-
3.
|
|
28
|
-
4.
|
|
29
|
-
|
|
24
|
+
1. Approved `docs/specs/YYYY-MM-DD-<feature>/design.md`
|
|
25
|
+
2. Approved `docs/specs/YYYY-MM-DD-<feature>/plan.json`
|
|
26
|
+
3. Any tracker entries selected during planning are available
|
|
27
|
+
4. You are not on main/master without explicit user consent. Create a branch or use a git
|
|
28
|
+
worktree first.
|
|
30
29
|
|
|
31
30
|
If anything is missing, do not proceed. Tell the human what's needed.
|
|
32
31
|
|
|
@@ -44,20 +43,20 @@ Read plan.json critically before writing code. Look for:
|
|
|
44
43
|
If you find concerns, **raise them with the human before starting**. Don't guess. Don't
|
|
45
44
|
assume. Don't force through blockers.
|
|
46
45
|
|
|
47
|
-
If no concerns,
|
|
46
|
+
If no concerns, proceed. Use existing tracker entries when present.
|
|
48
47
|
|
|
49
48
|
---
|
|
50
49
|
|
|
51
|
-
## Step 2: Choose Execution
|
|
50
|
+
## Step 2: Choose Execution Style
|
|
52
51
|
|
|
53
|
-
If the human
|
|
52
|
+
If the human has not specified an execution style, ask.
|
|
54
53
|
|
|
55
54
|
### Autonomous Mode
|
|
56
55
|
|
|
57
56
|
> "Implement it all. Don't stop until you're done."
|
|
58
57
|
|
|
59
58
|
- Execute all tasks in dependency order
|
|
60
|
-
- Track progress
|
|
59
|
+
- Track progress when the Spec-backed Plan has tracker entries
|
|
61
60
|
- Run type checking / linting continuously
|
|
62
61
|
- Only stop if blocked
|
|
63
62
|
|
|
@@ -75,26 +74,30 @@ If the human hasn't specified a mode, ask.
|
|
|
75
74
|
|
|
76
75
|
- Invoke **code-subagents** for dispatch patterns and review cycle
|
|
77
76
|
- Fresh subagent per task — no context pollution
|
|
78
|
-
-
|
|
77
|
+
- One combined plan and code-quality review per completed batch
|
|
79
78
|
- Independent tasks dispatch in parallel, dependent tasks run sequentially
|
|
80
79
|
|
|
81
80
|
Default to batched if the human hasn't expressed a preference.
|
|
82
81
|
|
|
83
82
|
---
|
|
84
83
|
|
|
85
|
-
## Step 3: Execute
|
|
84
|
+
## Step 3: Execute the Plan
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
Follow the approved plan exactly.
|
|
87
|
+
|
|
88
|
+
For each task, find the next ready task:
|
|
88
89
|
|
|
89
90
|
**With beads (preferred):**
|
|
90
91
|
```bash
|
|
91
92
|
bd ready --label <feature> --json
|
|
92
93
|
```
|
|
93
94
|
|
|
94
|
-
**With harness todos:**
|
|
95
|
-
|
|
95
|
+
**With harness todos:** Check the todo list for the next unblocked task, respecting
|
|
96
|
+
`depends_on` from plan.json.
|
|
96
97
|
|
|
97
|
-
|
|
98
|
+
**Without a tracker:** Read the next unblocked task directly from plan.json.
|
|
99
|
+
|
|
100
|
+
When a tracker exists, mark it in progress:
|
|
98
101
|
|
|
99
102
|
**With beads:**
|
|
100
103
|
```bash
|
|
@@ -105,8 +108,8 @@ bd update <task-id> --status in_progress
|
|
|
105
108
|
Update the todo status to in_progress.
|
|
106
109
|
|
|
107
110
|
### For each task
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
|
|
112
|
+
Read the task's **inputs** and **description** first.
|
|
110
113
|
|
|
111
114
|
Write tests that cover the validation criteria before writing implementation.
|
|
112
115
|
Invoke `typescript-testing` or `python-testing` (whichever matches the project)
|
|
@@ -118,23 +121,22 @@ for test design patterns when needed.
|
|
|
118
121
|
3. Run them — verify they fail for the RIGHT reason
|
|
119
122
|
4. Implement minimal code to make tests pass
|
|
120
123
|
5. Refactor if needed (tests stay green)
|
|
121
|
-
6. Commit (use code-commit for commit message)
|
|
122
124
|
```
|
|
123
125
|
|
|
124
126
|
Do NOT write implementation before tests. Do NOT skip "verify it fails." Do NOT write
|
|
125
127
|
more code than needed to pass the test.
|
|
126
128
|
|
|
127
|
-
Verify the task against its **validation**
|
|
128
|
-
all acceptance criteria are met.
|
|
129
|
+
Verify the task against its **validation** and acceptance criteria.
|
|
129
130
|
|
|
130
|
-
### After each
|
|
131
|
+
### After each batch: Review and commit
|
|
131
132
|
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
In Subagent Mode, use **code-subagents** for one combined batch review. In other modes,
|
|
134
|
+
invoke **code-review** once for the batch. Resolve blocking findings and revalidate, then the
|
|
135
|
+
coordinator commits the reviewed batch serially using **code-commit**.
|
|
134
136
|
|
|
135
137
|
### On completion
|
|
136
138
|
|
|
137
|
-
|
|
139
|
+
When a tracker exists, mark the task done:
|
|
138
140
|
|
|
139
141
|
**With beads:**
|
|
140
142
|
```bash
|
|
@@ -157,10 +159,8 @@ all implicit requirements without spelling them out.
|
|
|
157
159
|
After each batch:
|
|
158
160
|
|
|
159
161
|
```
|
|
160
|
-
Completed:
|
|
161
|
-
-
|
|
162
|
-
- T2: UserEntity tests (6 passing) ✓
|
|
163
|
-
- T3: UserRepository ✓
|
|
162
|
+
Completed: [tasks]
|
|
163
|
+
- [completed work]
|
|
164
164
|
|
|
165
165
|
Test output: 6 passed, 0 failed
|
|
166
166
|
Type check: clean
|
|
@@ -236,21 +236,21 @@ If the design was wrong:
|
|
|
236
236
|
- Tasks can't be completed as specified
|
|
237
237
|
|
|
238
238
|
**Return to spec-brainstorm when:**
|
|
239
|
-
-
|
|
240
|
-
- Implementation reveals design is wrong
|
|
239
|
+
- The fundamental approach needs rethinking
|
|
240
|
+
- Implementation reveals the design is wrong
|
|
241
241
|
|
|
242
242
|
---
|
|
243
243
|
|
|
244
244
|
## Completion
|
|
245
245
|
|
|
246
|
-
When all
|
|
246
|
+
When all planned work is done, verify and present it.
|
|
247
247
|
|
|
248
248
|
### Verification checklist
|
|
249
249
|
|
|
250
250
|
1. **Run full test suite** — all tests must pass, not just the new ones
|
|
251
251
|
2. **Run type check / lint** — clean output, no new warnings
|
|
252
252
|
3. **Invoke code-review** — full review of all changes
|
|
253
|
-
4. **Verify
|
|
253
|
+
4. **Verify completion** — close every tracker entry when tracking is used
|
|
254
254
|
5. **Diff review** — review the full diff against main/master. Look for:
|
|
255
255
|
- Files that changed but shouldn't have
|
|
256
256
|
- Debug code or temporary hacks left behind
|
|
@@ -263,6 +263,7 @@ Present to the human:
|
|
|
263
263
|
```
|
|
264
264
|
## Feature Complete: {feature name}
|
|
265
265
|
|
|
266
|
+
**Plan:** Spec-backed Plan
|
|
266
267
|
**Tasks:** {completed} / {total}
|
|
267
268
|
**Tests:** {new tests added}, {total passing}
|
|
268
269
|
**Files:** {created}, {modified}
|
|
@@ -281,7 +282,7 @@ Present to the human:
|
|
|
281
282
|
|
|
282
283
|
### Next steps
|
|
283
284
|
|
|
284
|
-
After all
|
|
285
|
+
After all planned work is complete and verified, the next step is **spec-finish**.
|
|
285
286
|
|
|
286
287
|
> "Implementation complete. Ready to validate, review, and prepare for PR?"
|
|
287
288
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-orchestrator
|
|
3
3
|
description: >
|
|
4
|
-
Skill routing and workflow orchestration.
|
|
5
|
-
|
|
6
|
-
any conversation or task to determine which
|
|
4
|
+
Skill routing and workflow orchestration. Selects Inline Plan or Spec-backed Plan, routes
|
|
5
|
+
to the correct workflow skill, and manages transitions between phases. Use when starting
|
|
6
|
+
any conversation or task to determine which planning mode and skill apply.
|
|
7
7
|
user-invocable: false
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -16,7 +16,7 @@ IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
|
|
|
16
16
|
This is not negotiable. This is not optional. You cannot rationalize your way out of this.
|
|
17
17
|
</EXTREMELY-IMPORTANT>
|
|
18
18
|
|
|
19
|
-
#
|
|
19
|
+
# Planning Workflow
|
|
20
20
|
|
|
21
21
|
You have skills. You MUST use them. Not "should." Not "when convenient." MUST.
|
|
22
22
|
|
|
@@ -26,58 +26,92 @@ need to follow it. But you must check.
|
|
|
26
26
|
|
|
27
27
|
## The One Rule
|
|
28
28
|
|
|
29
|
-
**
|
|
29
|
+
**When an implementation choice exists, never write code until the human has reviewed and
|
|
30
|
+
approved a written plan.** Exact mechanical changes may use the exception below.
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
and get approval.
|
|
32
|
+
The plan may be inline in the conversation or backed by persisted spec artifacts. Select
|
|
33
|
+
the mode before invoking an artifact-producing skill, state the choice with one brief
|
|
34
|
+
reason, and let the human override it.
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Planning Modes
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
### Inline Plan (default)
|
|
39
|
+
|
|
40
|
+
Use for bounded, well-understood work, including ordinary features, bug fixes, refactors,
|
|
41
|
+
configuration changes, and multi-file changes. Route to **spec-plan** with Inline mode
|
|
42
|
+
explicitly selected. It presents a concise plan in conversation, creates no planning artifacts
|
|
43
|
+
or tracker entries, and stops for approval. After approval, implement the plan directly; do
|
|
44
|
+
not invoke `spec-implement`, `spec-finish`, or `code-subagents`.
|
|
45
|
+
|
|
46
|
+
Direct Inline implementation must:
|
|
47
|
+
|
|
48
|
+
- Avoid main/master unless the human explicitly permits it
|
|
49
|
+
- Stay within the approved scope and files
|
|
50
|
+
- Run every validation item in the approved plan
|
|
51
|
+
- Review the final diff for unintended changes
|
|
52
|
+
- Do not commit, push, or open a PR without explicit human instruction
|
|
53
|
+
|
|
54
|
+
When in doubt, choose Inline Plan. File count and estimated duration alone do not make work
|
|
55
|
+
spec-worthy.
|
|
56
|
+
|
|
57
|
+
### Spec-backed Plan
|
|
58
|
+
|
|
59
|
+
Use when at least one concrete signal exists:
|
|
60
|
+
|
|
61
|
+
- The human explicitly requests a spec or durable planning artifacts
|
|
62
|
+
- Requirements or boundaries need discovery before planning
|
|
63
|
+
- The work materially changes architecture, public contracts, data models, or cross-system behavior
|
|
64
|
+
- Multiple dependent subsystems need decomposition and dependency tracking
|
|
65
|
+
- The plan must survive the conversation for handoff, audit, or multi-person coordination
|
|
66
|
+
|
|
67
|
+
Route through **spec-brainstorm**. This mode produces:
|
|
39
68
|
|
|
40
69
|
```
|
|
41
70
|
design.md ← spec-brainstorm (requirements + research + architecture)
|
|
42
71
|
plan.json ← spec-plan (tasks, dependencies)
|
|
43
72
|
```
|
|
44
73
|
|
|
74
|
+
Do not infer substantial work from size alone. If no concrete signal applies, use Inline Plan.
|
|
75
|
+
|
|
45
76
|
## Skill Routing
|
|
46
77
|
|
|
47
78
|
```
|
|
48
|
-
spec-
|
|
49
|
-
spec-
|
|
50
|
-
spec-
|
|
51
|
-
spec-
|
|
52
|
-
|
|
79
|
+
spec-orchestrator → Select and announce planning mode
|
|
80
|
+
spec-brainstorm → Spec-backed discovery + design → design.md
|
|
81
|
+
spec-plan → Inline Plan or Spec-backed Plan → approval
|
|
82
|
+
spec-implement → Execute approved Spec-backed Plans; track tasks
|
|
83
|
+
spec-finish → Post-implementation validation for Spec-backed Plans
|
|
84
|
+
code-subagents → Parallel dispatch for Spec-backed Plan tasks
|
|
53
85
|
```
|
|
54
86
|
|
|
55
|
-
###
|
|
87
|
+
### Ordinary bounded work
|
|
56
88
|
|
|
57
89
|
```
|
|
58
|
-
spec-
|
|
90
|
+
spec-plan (Inline mode) → approval → implement directly
|
|
59
91
|
```
|
|
60
92
|
|
|
61
|
-
###
|
|
93
|
+
### Substantial work or explicit spec request
|
|
62
94
|
|
|
63
95
|
```
|
|
64
|
-
spec-brainstorm
|
|
96
|
+
spec-brainstorm → spec-plan (Spec-backed Plan) → approval → spec-implement → spec-finish
|
|
65
97
|
```
|
|
66
98
|
|
|
67
|
-
###
|
|
99
|
+
### Truly mechanical change
|
|
68
100
|
|
|
69
|
-
|
|
70
|
-
|
|
101
|
+
A typo or exact single-line replacement may skip planning when there is no implementation
|
|
102
|
+
choice to review. If any choice exists, use an Inline Plan.
|
|
71
103
|
|
|
72
104
|
## Hard Transitions
|
|
73
105
|
|
|
74
|
-
| After completing... |
|
|
75
|
-
|
|
76
|
-
| spec-brainstorm | spec-plan |
|
|
77
|
-
|
|
|
106
|
+
| After completing... | Next step |
|
|
107
|
+
|---------------------|-----------|
|
|
108
|
+
| spec-brainstorm | spec-plan in Spec-backed mode |
|
|
109
|
+
| approved Inline Plan | implement the approved plan directly |
|
|
110
|
+
| approved Spec-backed Plan | spec-implement in Spec-backed mode |
|
|
78
111
|
| spec-implement | spec-finish |
|
|
79
112
|
|
|
80
|
-
Do
|
|
113
|
+
Do not begin implementation without an approved written plan. Spec-backed work must not
|
|
114
|
+
jump from research to implementation.
|
|
81
115
|
|
|
82
116
|
## Iteration Patterns
|
|
83
117
|
|
|
@@ -92,12 +126,13 @@ The workflow is not purely linear. Expect backflows:
|
|
|
92
126
|
- Tasks can't be decomposed without more context → back to brainstorm
|
|
93
127
|
|
|
94
128
|
### Implement → Plan (missing tasks)
|
|
95
|
-
- Implementation reveals missing
|
|
96
|
-
-
|
|
129
|
+
- Implementation reveals missing work → revise the active plan and get approval
|
|
130
|
+
- Spec-backed work is blocked on an unplanned dependency → update plan.json
|
|
97
131
|
|
|
98
132
|
### Implement → Research (fundamental issue)
|
|
99
|
-
-
|
|
100
|
-
|
|
133
|
+
- Inline planning or implementation develops substantial needs → ask the human whether to
|
|
134
|
+
switch to a Spec-backed Plan
|
|
135
|
+
- Implementation reveals spec-backed design is fundamentally wrong → back to brainstorm
|
|
101
136
|
|
|
102
137
|
### Finish → Implement (bugs found)
|
|
103
138
|
- Validation finds bugs → back to implement
|
|
@@ -112,17 +147,17 @@ If you loop 2+ times on the same issue, stop and ask the human:
|
|
|
112
147
|
|
|
113
148
|
| What you're thinking | Why it's wrong |
|
|
114
149
|
|----------------------|----------------|
|
|
115
|
-
| "This is too simple for a
|
|
150
|
+
| "This is too simple for a persisted spec" | Use an Inline Plan instead |
|
|
116
151
|
| "I already know how to do this" | Knowing how ≠ having the human's approval for how |
|
|
117
152
|
| "The human seems impatient" | Wasting time on wrong code is worse than planning |
|
|
118
153
|
| "I'll just do a quick prototype" | Prototypes become production. Plan it. |
|
|
119
|
-
| "I need to explore the code first" |
|
|
154
|
+
| "I need to explore the code first" | Gather enough context for an Inline Plan; use brainstorm only when discovery is substantial |
|
|
120
155
|
| "Let me just fix this one thing" | One thing becomes three. Plan it. |
|
|
121
156
|
| "I can plan in my head" | Plans in your head can't be reviewed or annotated |
|
|
122
|
-
| "This is just a refactor" | Refactors
|
|
157
|
+
| "This is just a refactor" | Refactors still need at least an Inline Plan |
|
|
123
158
|
| "I'll write the plan after" | Post-hoc plans are fiction. Plan before. |
|
|
124
159
|
| "I need more context first" | Skills tell you HOW to gather context. Check first. |
|
|
125
|
-
| "The
|
|
160
|
+
| "The spec workflow is overkill" | It may be. Default to an Inline Plan unless substantial-work signals exist. |
|
|
126
161
|
| "I know what that skill says" | Skills evolve. Read current version. Invoke it. |
|
|
127
162
|
| "This feels productive" | Undisciplined action wastes time. Skills prevent this. |
|
|
128
163
|
|
|
@@ -1,22 +1,72 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-plan
|
|
3
3
|
description: >
|
|
4
|
-
Write implementation plans
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
execution (use spec-implement).
|
|
4
|
+
Write approved implementation plans in one of two modes. Explicit Inline mode creates a
|
|
5
|
+
conversational plan for bounded work. Spec-backed Plan converts an approved design.md into
|
|
6
|
+
plan.json and optional tracked tasks. Trigger after spec-orchestrator selects a mode, when
|
|
7
|
+
the user asks to plan work, or after spec-brainstorm completes. Direct invocation without a
|
|
8
|
+
selected mode uses Spec-backed Plan. Do NOT use for research or execution.
|
|
10
9
|
user-invocable: true
|
|
11
10
|
---
|
|
12
11
|
|
|
13
12
|
# Spec Plan
|
|
14
13
|
|
|
15
|
-
Write a plan so clear that any engineer can follow it.
|
|
16
|
-
|
|
17
|
-
not write code.
|
|
14
|
+
Write a proportional plan so clear that any engineer can follow it. The selected planning
|
|
15
|
+
mode determines whether the plan stays in the conversation or becomes a persisted structured
|
|
16
|
+
artifact. This skill does not write code.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
`spec-orchestrator` owns automatic classification and the human may override it. When this
|
|
19
|
+
skill is directly invoked without a selected mode, use Spec-backed Plan. If Inline planning
|
|
20
|
+
reveals substantial design or coordination needs, ask the human whether to switch to a
|
|
21
|
+
Spec-backed Plan before presenting the plan.
|
|
22
|
+
|
|
23
|
+
## Outputs
|
|
24
|
+
|
|
25
|
+
### Inline Plan (when explicitly selected)
|
|
26
|
+
|
|
27
|
+
No repository artifact and no task tracker entry. Present the plan in conversation using:
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
## context
|
|
31
|
+
|
|
32
|
+
## scope
|
|
33
|
+
|
|
34
|
+
## changes
|
|
35
|
+
|
|
36
|
+
## files
|
|
37
|
+
|
|
38
|
+
## validation
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Inline Plan Workflow
|
|
42
|
+
|
|
43
|
+
Read enough of the codebase to identify the current behavior, boundaries, affected files,
|
|
44
|
+
and concrete validation. Keep the plan proportional. Populate every section:
|
|
45
|
+
|
|
46
|
+
- `context`: Current behavior, relevant constraints, and why the change is needed
|
|
47
|
+
- `scope`: Explicit in-scope and out-of-scope boundaries
|
|
48
|
+
- `changes`: Ordered implementation changes at useful engineering granularity
|
|
49
|
+
- `files`: Exact files expected to be created, modified, or deleted
|
|
50
|
+
- `validation`: Concrete tests, checks, or manual verification
|
|
51
|
+
|
|
52
|
+
Do not manufacture phases, task IDs, dependency graphs, acceptance matrices, `design.md`,
|
|
53
|
+
`plan.json`, Beads issues, or harness todos. The conversation is the plan artifact.
|
|
54
|
+
|
|
55
|
+
**Tell the human:** "Inline Plan ready for review."
|
|
56
|
+
|
|
57
|
+
**STOP. Wait for human review.**
|
|
58
|
+
|
|
59
|
+
If the human requests changes, revise the plan in conversation and present the complete
|
|
60
|
+
plan again. Do not implement until the human explicitly approves it. A material scope
|
|
61
|
+
change after approval also requires a revised plan and renewed approval.
|
|
62
|
+
|
|
63
|
+
Approval authorizes implementation. Implement the approved conversational plan directly using
|
|
64
|
+
the Inline execution safeguards in `spec-orchestrator`. Do not invoke `spec-implement`,
|
|
65
|
+
`spec-finish`, `code-subagents`, or task tracking.
|
|
66
|
+
|
|
67
|
+
Do not create planning artifacts or tracker entries during this handoff.
|
|
68
|
+
|
|
69
|
+
## Spec-backed Plan Artifacts
|
|
20
70
|
|
|
21
71
|
```
|
|
22
72
|
docs/specs/YYYY-MM-DD-<feature-name>/
|
|
@@ -103,7 +153,7 @@ structured plan.json when approved.
|
|
|
103
153
|
|
|
104
154
|
---
|
|
105
155
|
|
|
106
|
-
## Step 1: Write the Plan Draft
|
|
156
|
+
## Spec-backed Step 1: Write the Plan Draft
|
|
107
157
|
|
|
108
158
|
Read the approved design.md, then write a plan as a markdown section in the same
|
|
109
159
|
document or as a separate draft.
|
|
@@ -146,7 +196,7 @@ Each task should take 15-60 minutes. If larger, decompose into smaller tasks.
|
|
|
146
196
|
|
|
147
197
|
---
|
|
148
198
|
|
|
149
|
-
## Step 2: The Annotation Cycle
|
|
199
|
+
## Spec-backed Step 2: The Annotation Cycle
|
|
150
200
|
|
|
151
201
|
The human annotates the plan draft directly — adding corrections, rejections, domain
|
|
152
202
|
knowledge, business constraints, or "remove this entirely."
|
|
@@ -178,14 +228,15 @@ explicitly approves it.
|
|
|
178
228
|
|
|
179
229
|
---
|
|
180
230
|
|
|
181
|
-
## Step 3: Create Structured Tasks
|
|
231
|
+
## Spec-backed Step 3: Create Structured Tasks
|
|
182
232
|
|
|
183
233
|
When the human approves — "looks good", "approved", "create tasks" — convert the plan
|
|
184
234
|
into plan.json.
|
|
185
235
|
|
|
186
236
|
### Task Tracking
|
|
187
237
|
|
|
188
|
-
|
|
238
|
+
Create tracker entries when they add execution value. For multi-task or dependency-ordered
|
|
239
|
+
work, **prefer beads**:
|
|
189
240
|
```bash
|
|
190
241
|
# Create epic and tasks with dependencies
|
|
191
242
|
bd create "Feature: {name}" --label {feature} --type epic
|
|
@@ -193,15 +244,15 @@ bd create "Task: {name}" --label {feature} --type task --epic {epic-id}
|
|
|
193
244
|
bd dep add --type blocks {task-a} {task-b} # task-a blocks task-b
|
|
194
245
|
```
|
|
195
246
|
|
|
196
|
-
|
|
197
|
-
|
|
247
|
+
If tracking is useful and beads is unavailable, use the harness's native todo system.
|
|
248
|
+
Do not duplicate a simple plan.json into a tracker merely to satisfy the workflow.
|
|
198
249
|
|
|
199
250
|
### What to do
|
|
200
251
|
|
|
201
252
|
1. Convert the annotated plan draft into structured plan.json
|
|
202
253
|
2. Each task maps to a unit with inputs, description, files, and validation
|
|
203
254
|
3. Dependencies between tasks are captured in `depends_on` fields
|
|
204
|
-
4.
|
|
255
|
+
4. When execution benefits from task tracking, create tasks using beads or harness todos:
|
|
205
256
|
- Create an epic/feature container
|
|
206
257
|
- Add tasks per phase with clear descriptions
|
|
207
258
|
- Mark dependencies between tasks (beads: `bd dep add`, harness: manual ordering)
|
|
@@ -221,11 +272,12 @@ After creating plan.json, verify:
|
|
|
221
272
|
|
|
222
273
|
## Handoff
|
|
223
274
|
|
|
224
|
-
When plan.json is created and
|
|
275
|
+
When plan.json is created, and any useful tracker entries have been created, the next
|
|
276
|
+
step is **spec-implement** in Spec-backed mode.
|
|
225
277
|
|
|
226
278
|
Tell the human:
|
|
227
279
|
|
|
228
|
-
> "Plan is approved
|
|
280
|
+
> "Spec-backed Plan is approved. Ready to start implementation?"
|
|
229
281
|
>
|
|
230
282
|
> **Autonomous** — I'll work through all tasks, only stopping if blocked.
|
|
231
283
|
>
|
|
@@ -240,9 +292,11 @@ loop back to research. See **spec-orchestrator** for iteration patterns.
|
|
|
240
292
|
|
|
241
293
|
## Quick Reference
|
|
242
294
|
|
|
243
|
-
|
|
|
244
|
-
|
|
245
|
-
| "write a plan"
|
|
246
|
-
| "I added notes" |
|
|
247
|
-
|
|
|
248
|
-
|
|
|
295
|
+
| Selected mode / human says | You do |
|
|
296
|
+
|----------------------------|--------|
|
|
297
|
+
| Inline / "write a plan" | Present the five-section Inline Plan, stop |
|
|
298
|
+
| Inline / "I added notes" | Revise and re-present the complete Inline Plan |
|
|
299
|
+
| Inline / "approved" | Implement the approved conversational plan directly; create no artifacts |
|
|
300
|
+
| Spec-backed / "write a plan" | Write the plan draft from design.md, stop |
|
|
301
|
+
| Spec-backed / "I added notes" | Re-read, address all notes, do NOT implement |
|
|
302
|
+
| Spec-backed / "approved" / "create tasks" | Create plan.json and useful task tracking |
|