@martinffx/atelier 1.4.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.
@@ -1,21 +1,21 @@
1
1
  # Implementer Prompt Template
2
2
 
3
- Use this template when dispatching an implementer subagent. Paste the full task text from
4
- plan.json — don't make the subagent read the plan file.
3
+ Use this template when dispatching an implementer subagent. Paste the complete work-item
4
+ requirements. Do not make the subagent recover context.
5
5
 
6
6
  ## Template
7
7
 
8
8
  ```
9
- You are implementing Task {TASK_ID}: {TASK_NAME}
9
+ You are implementing {WORK_ITEM_NAME}
10
10
 
11
- ## Task Description
11
+ ## Work Item Requirements
12
12
 
13
- {FULL TEXT of task from plan.json — paste it here}
13
+ {WORK_ITEM_REQUIREMENTS}
14
14
 
15
15
  ## Context
16
16
 
17
- {Scene-setting: where this fits in the feature, what was built before this task,
18
- relevant architectural decisions from design.md, existing patterns to follow}
17
+ {Scene-setting: where this fits in the work, what was built before it, constraints, and
18
+ existing patterns to follow}
19
19
 
20
20
  ## Before You Begin
21
21
 
@@ -33,9 +33,8 @@ Once you're clear on requirements:
33
33
  1. Implement exactly what the task specifies
34
34
  2. Write tests following TDD (failing test → verify fail → implement → verify pass)
35
35
  3. Verify implementation works
36
- 4. Commit your work
37
- 5. Self-review (see below)
38
- 6. Report back
36
+ 4. Self-review (see below)
37
+ 5. Report back. Do not commit; the coordinator integrates and commits reviewed work serially.
39
38
 
40
39
  Work from: {WORKING_DIRECTORY}
41
40
 
@@ -47,7 +46,7 @@ It's always OK to pause and clarify. Don't guess or make assumptions.
47
46
  Review your work with fresh eyes:
48
47
 
49
48
  **Completeness:**
50
- - Did I fully implement everything in the spec?
49
+ - Did I fully implement every requirement?
51
50
  - Did I miss any requirements?
52
51
  - Are there edge cases I didn't handle?
53
52
 
@@ -1,23 +1,27 @@
1
1
  ---
2
2
  name: spec-brainstorm
3
3
  description: >
4
- Conversational design workshop for new features. Interviews the human one question
4
+ Conversational design workshop for substantial work. Interviews the human one question
5
5
  at a time, explores 2-3 approaches with trade-offs, and presents the design
6
6
  section by section for approval before writing the spec. Combines requirements
7
7
  discovery with codebase research and architecture design.
8
- Use when the user says "create a spec", "design this feature", "let's brainstorm",
9
- "what should we build", or at the start of any feature/refactor/complex-bug workflow.
8
+ Use when the user explicitly requests a spec or when spec-orchestrator selects a
9
+ Spec-backed Plan. Ambiguous design or discovery requests route through spec-orchestrator.
10
10
  user-invocable: true
11
11
  argument-hint: <topic or feature description>
12
12
  ---
13
13
 
14
14
  # Spec Brainstorm
15
15
 
16
- Conversational design workshop that produces a focused, reviewed spec.
16
+ Conversational design workshop for substantial work that produces a focused, reviewed spec.
17
17
 
18
18
  One question at a time. Multiple approaches explored. Design approved in
19
19
  sections. Ruthless scope control. No implementation until design is approved.
20
20
 
21
+ Run this skill only after `spec-orchestrator` selects a Spec-backed Plan or the human
22
+ explicitly requests a spec. Bounded work should go directly to `spec-plan` for an Inline
23
+ Plan. Do not reclassify the planning mode here.
24
+
21
25
  ## Artifact
22
26
 
23
27
  ```
@@ -33,11 +37,11 @@ Requirements are inline — no separate requirements.json needed.
33
37
 
34
38
  These principles apply to every spec, every time.
35
39
 
36
- ### "Too simple for a design" is an anti-pattern
40
+ ### Specs must earn their cost
37
41
 
38
- Every project goes through this process. No exceptions. The five-minute conversation
39
- often reveals assumptions that would cost hours in implementation. If it's truly trivial,
40
- the spec will be short — but it still gets written.
42
+ Persisted specs are for work whose discovery, architecture, dependencies, or coordination
43
+ needs justify a durable artifact. Do not pull bounded work into this workflow merely because
44
+ it touches multiple files or takes time. That work belongs in an Inline Plan.
41
45
 
42
46
  ### Design for isolation and clarity
43
47
 
@@ -54,8 +58,9 @@ changes.
54
58
  ### Decomposition
55
59
 
56
60
  If the request describes multiple independent subsystems, flag it immediately. Decompose
57
- into sub-projects before diving into details. Each sub-project gets its own spec and its
58
- own plan. A spec that tries to cover three subsystems helps no one.
61
+ into sub-projects before diving into details. Each substantial sub-project gets its own spec
62
+ and plan; bounded sub-projects can use Inline Plans. A spec that tries to cover three
63
+ subsystems helps no one.
59
64
 
60
65
  ### YAGNI ruthlessly
61
66
 
@@ -330,16 +335,16 @@ note them at handoff.
330
335
  **Tell the human:**
331
336
 
332
337
  > "Spec written to `docs/specs/<path>`. Every section was approved during our
333
- > conversation — review it if you'd like, or we can go straight to the
334
- > implementation plan. Ready for spec-plan?"
338
+ > conversation - review it if you'd like, or we can go straight to the
339
+ > Spec-backed Plan. Ready for spec-plan?"
335
340
 
336
341
  If the human requests changes — in conversation or by annotating the file —
337
342
  address every note, update the spec, and re-run the self-review. If a change
338
343
  alters the substance of an approved section, re-present that section for
339
344
  approval before continuing.
340
345
 
341
- The next step is **spec-plan**. Do not start planning without the human's
342
- go-ahead. Do not write code.
346
+ The next step is **spec-plan** in Spec-backed mode. Do not start planning without the
347
+ human's go-ahead. Do not write code.
343
348
 
344
349
  If planning reveals design flaws, loop back to research. See **spec-orchestrator**
345
350
  for iteration patterns.
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: spec-finish
3
3
  description: >
4
- Post-implementation completion workflow. Use after spec-implement completes to validate,
5
- review, create stacked commits, and open a PR via code-pull-request. Triggers when
6
- implementation is done, when the user says "finish", "done", "complete", or after
7
- implementation tasks are finished.
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 implementation tasks complete
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 → go back to spec-implement.
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
- - Fix or note for follow-up
82
- - Re-validate
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 — return to
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 → use spec-implement
161
- - If tests failing → go back to spec-implement
162
- - If review found blocking issues → go back to spec-implement
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 implementation tasks from an approved plan.json. Use when spec-plan has produced
5
- approved tasks and the human is ready to start coding. Tracks progress via beads
6
- (preferred) or harness-native todos, enforces TDD, reports between batches. Trigger when the user says "implement", "go", "start",
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
- Pick up tasks. Execute them. Track progress. Report. Stop when blocked.
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. **Approved spec** — `docs/specs/YYYY-MM-DD-<feature>/design.md`
26
- 2. **Approved plan** — `docs/specs/YYYY-MM-DD-<feature>/plan.json`
27
- 3. **Tasks created** — In beads, harness todo list, or plan.json task list
28
- 4. **Not on main/master** — Never start implementation on main/master without explicit
29
- user consent. Create a branch or use a git worktree first.
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, create task tracking and proceed.
46
+ If no concerns, proceed. Use existing tracker entries when present.
48
47
 
49
48
  ---
50
49
 
51
- ## Step 2: Choose Execution Mode
50
+ ## Step 2: Choose Execution Style
52
51
 
53
- If the human hasn't specified a mode, ask.
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: beads `bd update <id> --status in_progress` → `bd close <id>`, or harness todo list
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
- - Two-stage review after each: spec compliance, then code quality
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 Tasks
84
+ ## Step 3: Execute the Plan
86
85
 
87
- For each task, follow the plan exactly. Find the next ready task:
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
- Check the todo list for the next unblocked task (respecting `depends_on` from plan.json).
95
+ **With harness todos:** Check the todo list for the next unblocked task, respecting
96
+ `depends_on` from plan.json.
96
97
 
97
- Mark it in progress:
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
- Read the task's **inputs** first — understand what context you need.
109
- Then read the **description** — know what to build and the constraints.
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** — run the tests listed in the task and check
128
- all acceptance criteria are met.
129
+ Verify the task against its **validation** and acceptance criteria.
129
130
 
130
- ### After each task: Review
131
+ ### After each batch: Review and commit
131
132
 
132
- Invoke **code-review** to review the implementation before moving to the next task.
133
- This catches issues early rather than accumulating debt across multiple tasks.
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
- Mark the task done:
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: Tasks T1-T3
161
- - T1: UserEntity with validation ✓
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
- - Fundamental approach needs rethinking
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 tasks are done, verify and present the work.
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 tasks closed** — `bd list --label <feature> --json` (beads) or check harness todo list — all tasks must be done
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 tasks complete and verified, the next step is **spec-finish**.
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. Routes to correct spec skill based on task type.
5
- Establishes discipline and manages transitions between workflow phases. Use when starting
6
- any conversation or task to determine which spec skill applies.
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
- # Spec Workflow
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
- **Never write code until the human has reviewed and approved a written plan.**
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
- Every project goes through this process. A todo list, a single-function utility, a config
32
- change — all of them. "Simple" projects are where unexamined assumptions cause the most
33
- wasted work. The spec can be short, the plan can be brief, but you MUST present them
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
- ## Artifacts
36
+ ## Planning Modes
37
37
 
38
- Every feature produces two artifacts in `docs/specs/YYYY-MM-DD-<feature>/`:
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-brainstorm → Discovery + design + architecture → design.md
49
- spec-plan → Implementation plan + tasks → plan.json
50
- spec-implement → Execute tasks, track progress, report
51
- spec-finish → Post-implementation validation
52
- code-subagents → Parallel dispatch, two-stage review
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
- ### "Create a spec for X" / Build / Add Feature
87
+ ### Ordinary bounded work
56
88
 
57
89
  ```
58
- spec-brainstorm → spec-plan → spec-implement → spec-finish
90
+ spec-plan (Inline mode) → approval → implement directly
59
91
  ```
60
92
 
61
- ### Fix Complex Bug / Refactor
93
+ ### Substantial work or explicit spec request
62
94
 
63
95
  ```
64
- spec-brainstorm (research-heavy) → spec-plan (targeted) → spec-implement
96
+ spec-brainstorm → spec-plan (Spec-backed Plan) → approval → spec-implement → spec-finish
65
97
  ```
66
98
 
67
- ### Quick Fix / Trivial Change
99
+ ### Truly mechanical change
68
100
 
69
- If genuinely trivial (typo, single-line config, variable rename) — skip the pipeline.
70
- But be honest. If there's any doubt, plan it.
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... | The ONLY next step is... |
75
- |---------------------|--------------------------|
76
- | spec-brainstorm | spec-plan |
77
- | spec-plan | spec-implement |
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 NOT jump from requirements to code. Do NOT jump from research to implementation.
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 tasks → update plan.json
96
- - Blocked on dependency not in plan → back to plan
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
- - Implementation reveals design is fundamentally wrong → back to brainstorm
100
- - "This can't work as designed" → back to brainstorm
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 plan" | Simple tasks have the most unexamined assumptions |
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" | That's the brainstorm phase. Write it in design.md. |
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 touch more code than features. Plan it. |
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 skill is overkill" | Simple things become complex. Use it. |
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