compound-workflow 1.9.0 → 1.9.2

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 CHANGED
@@ -30,6 +30,8 @@ If your package manager skipped the lifecycle script, or after updating the pack
30
30
  npx compound-workflow install
31
31
  ```
32
32
 
33
+ Then run `/setup-agents` in your agent harness to tailor `AGENTS.md` to this project — it detects your stack and installed harnesses, curates the Skill Index, and prompts for anything it can't infer. Re-run it whenever harnesses or skills change.
34
+
33
35
  ---
34
36
 
35
37
  ## The Workflow
@@ -66,6 +68,8 @@ Log session outcomes and spot trends. `/metrics` records a single session. `/ass
66
68
 
67
69
  **`/test-browser`** — Browser-level validation of affected routes. Useful for UI changes where automated tests aren't enough.
68
70
 
71
+ **`/setup-agents`** — Tailor `AGENTS.md` to this project. Detects your stack and installed harnesses, curates the Skill Index, and prompts for anything it can't infer. Re-run whenever harnesses or skills change.
72
+
69
73
  **`/install`** — Re-run setup. Safe to run again after updating the package or adding a new harness.
70
74
 
71
75
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compound-workflow",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -97,7 +97,7 @@ If installation fails, inform the user and stop.
97
97
 
98
98
  Before starting tests, ask user if they want to watch the browser:
99
99
 
100
- Use AskQuestion with:
100
+ Use AskUserQuestion with:
101
101
  - Question: "Do you want to watch the browser tests run?"
102
102
  - Options:
103
103
  1. **Headed (watch)** - Opens visible browser window so you can see tests run
@@ -154,7 +154,7 @@ git diff --name-only "origin/${default_branch}"...HEAD
154
154
 
155
155
  </determine_scope>
156
156
 
157
- ### 3. Map Files to Routes
157
+ ### 4. Map Files to Routes
158
158
 
159
159
  <file_to_route_mapping>
160
160
 
@@ -175,7 +175,7 @@ Build a list of URLs to test based on the mapping.
175
175
 
176
176
  </file_to_route_mapping>
177
177
 
178
- ### 4. Verify Server is Running
178
+ ### 5. Verify Server is Running
179
179
 
180
180
  <check_server>
181
181
 
@@ -200,7 +200,7 @@ Then run `/test-browser` again.
200
200
 
201
201
  </check_server>
202
202
 
203
- ### 5. Test Each Affected Page
203
+ ### 6. Test Each Affected Page
204
204
 
205
205
  <test_pages>
206
206
 
@@ -239,7 +239,7 @@ agent-browser screenshot --full page-name-full.png # Full page
239
239
 
240
240
  </test_pages>
241
241
 
242
- ### 6. Human Verification (When Required)
242
+ ### 7. Human Verification (When Required)
243
243
 
244
244
  <human_verification>
245
245
 
@@ -253,7 +253,7 @@ Pause for human input when testing touches:
253
253
  | SMS | "Verify you received the SMS code" |
254
254
  | External APIs | "Confirm the [service] integration is working" |
255
255
 
256
- Use AskQuestion:
256
+ Use AskUserQuestion:
257
257
  ```markdown
258
258
  **Human Verification Needed**
259
259
 
@@ -268,7 +268,7 @@ Did it work correctly?
268
268
 
269
269
  </human_verification>
270
270
 
271
- ### 7. Handle Failures
271
+ ### 8. Handle Failures
272
272
 
273
273
  <failure_handling>
274
274
 
@@ -307,7 +307,7 @@ When a test fails:
307
307
 
308
308
  </failure_handling>
309
309
 
310
- ### 8. Test Summary
310
+ ### 9. Test Summary
311
311
 
312
312
  <test_summary>
313
313
 
@@ -58,7 +58,7 @@ description.
58
58
  - Constrained, well-defined scope
59
59
 
60
60
  **If requirements are already clear:**\
61
- Use **AskQuestion** to suggest:
61
+ Use **AskUserQuestion** to suggest:
62
62
 
63
63
  > "Your requirements seem detailed enough to proceed directly to
64
64
  > planning. Should I run `/workflow:plan` instead, or would you like to
@@ -97,9 +97,9 @@ Also consider any repo-level guidance files such as `AGENTS.md`.
97
97
 
98
98
  Engage in collaborative dialogue rather than a rapid question loop.
99
99
 
100
- **Critical (non-negotiable):** Default response shape is **synthesize + discussion prompts + assumptions**. Multiple-choice / AskQuestion only for handoffs (Phase 0, Phase 4) or a single blocking question when the user is stuck.
100
+ **Critical (non-negotiable):** Default response shape is **synthesize + discussion prompts + assumptions**. Multiple-choice / AskUserQuestion only for handoffs (Phase 0, Phase 4) or a single blocking question when the user is stuck.
101
101
 
102
- **Enforcement rule:** Do **not** use AskQuestion during exploration until **after** at least one full dialogue iteration (Synthesize + discussion prompts + Capture). AskQuestion is only for handoffs or when one focused multiple-choice truly unblocks.
102
+ **Enforcement rule:** Do **not** use AskUserQuestion during exploration until **after** at least one full dialogue iteration (Synthesize + discussion prompts + Capture). AskUserQuestion is only for handoffs or when one focused multiple-choice truly unblocks.
103
103
 
104
104
  **Default cadence (per iteration):**
105
105
 
@@ -191,7 +191,7 @@ For each approach, provide:
191
191
  Lead with your recommendation and explain why. Apply YAGNI --- prefer
192
192
  simpler solutions.
193
193
 
194
- Use **AskQuestion** to confirm preferred direction if needed.
194
+ Use **AskUserQuestion** to confirm preferred direction if needed.
195
195
 
196
196
  ---
197
197
 
@@ -224,7 +224,7 @@ If Open Questions exist:
224
224
 
225
225
  ### Phase 4: Handoff
226
226
 
227
- Use **AskQuestion** to present next steps:
227
+ Use **AskUserQuestion** to present next steps:
228
228
 
229
229
  **Question:**
230
230
  "Brainstorm captured. What would you like to do next?"
@@ -49,7 +49,7 @@ Use it to resolve optional defaults used by this command:
49
49
 
50
50
  If not present, proceed with safe defaults and state what you assumed.
51
51
 
52
- ### 0. Idea Refinement
52
+ ### Step 1 — Idea Refinement
53
53
 
54
54
  **Check for brainstorm output first:**
55
55
 
@@ -72,11 +72,11 @@ Use file discovery tools (Glob/Read) to locate and read recent brainstorm docume
72
72
  5. Use brainstorm decisions as input to the research phase
73
73
 
74
74
  **If multiple brainstorms could match:**
75
- Use **AskQuestion** to ask which brainstorm to use, or whether to proceed without one.
75
+ Use **AskUserQuestion** to ask which brainstorm to use, or whether to proceed without one.
76
76
 
77
77
  **If no brainstorm found (or not relevant), run idea refinement:**
78
78
 
79
- Refine the idea through collaborative dialogue using **AskQuestion**:
79
+ Refine the idea through collaborative dialogue using **AskUserQuestion**:
80
80
 
81
81
  - Ask questions one at a time to understand the idea fully
82
82
  - Prefer multiple choice questions when natural options exist
@@ -96,7 +96,7 @@ Refine the idea through collaborative dialogue using **AskQuestion**:
96
96
 
97
97
  ## Main Tasks
98
98
 
99
- ### 1. Local Research (Always Runs - Parallel)
99
+ ### Step 2 — Local Research (Always Runs - Parallel)
100
100
 
101
101
  <thinking>
102
102
  First, I need to understand the project's conventions, existing patterns, and any documented learnings. This is fast and local - it informs whether external research is needed.
@@ -107,7 +107,7 @@ Run these agents **in parallel** to gather local context:
107
107
  - Task repo-research-analyst(feature_description)
108
108
  - Task learnings-researcher(feature_description)
109
109
 
110
- Also read the Skill Index from `AGENTS.md` directly — capture which skills are available and their trigger conditions. This will be used to annotate plan tasks with relevant skills in Step 1.6.
110
+ Also read the Skill Index from `AGENTS.md` directly — capture which skills are available and their trigger conditions. This is a read-and-hold step; you will assign skills to tasks in Step 6.
111
111
 
112
112
  **What to look for:**
113
113
 
@@ -117,9 +117,9 @@ Also read the Skill Index from `AGENTS.md` directly — capture which skills are
117
117
 
118
118
  These findings inform the next step.
119
119
 
120
- ### 1.5. Planning Fidelity + Confidence + Research Mode (REQUIRED)
120
+ ### Step 3 — Planning Fidelity + Confidence + Research Mode (REQUIRED)
121
121
 
122
- After Step 0 and local research, you MUST choose planning fidelity and confidence, then decide whether to run external research.
122
+ After Step 1 (Idea Refinement) and Step 2 (Local Research), you MUST choose planning fidelity and confidence, then decide whether to run external research.
123
123
 
124
124
  #### Fidelity
125
125
 
@@ -164,7 +164,7 @@ If risky work is detected:
164
164
 
165
165
  - Spike evaluation is mandatory.
166
166
  - Declare `spikes_needed: yes|no`.
167
- - If `spikes_needed: yes`, include explicit Spike Candidates with upfront dependency and priority modeling (see Step 3.5).
167
+ - If `spikes_needed: yes`, include explicit Spike Candidates with upfront dependency and priority modeling (see Step 11).
168
168
  - If `spikes_needed: no`, include a short rationale + risk mitigation note explaining why direct implementation is safe.
169
169
 
170
170
  #### Research Mode
@@ -179,7 +179,7 @@ Baseline policy (by fidelity):
179
179
 
180
180
  Override: high-risk topics always require external research, even if the user prefers speed.
181
181
 
182
- **Required sections by fidelity** (ensure the chosen template includes these; see Step 4):
182
+ **Required sections by fidelity** (ensure the chosen template includes these; see Step 12):
183
183
 
184
184
  - **Low**: problem, constraints, acceptance criteria, implementation outline, verification checklist
185
185
  - **Medium**: all Low + alternatives/tradeoffs, dependency/risk table, rollout notes, observability/test notes
@@ -202,18 +202,18 @@ Research mode: local only | local + external
202
202
  Open questions: none | <list>
203
203
  ```
204
204
 
205
- **When Open questions is not "none":** You MUST materialize them in the plan body as actionable items (see Step 2.5). If an unknown blocks implementation feasibility, prefer **Spike Candidates**. If confidence is `Low`, the plan MUST include at least one checkbox under Discussion Points or Spike Candidates so `/workflow:work` can create pending todos and triage can resolve them.
205
+ **When Open questions is not "none":** You MUST materialize them in the plan body as actionable items (see Step 9). If an unknown blocks implementation feasibility, prefer **Spike Candidates**. If confidence is `Low`, the plan MUST include at least one checkbox under Discussion Points or Spike Candidates so `/workflow:work` can create pending todos and triage can resolve them.
206
206
 
207
- ### 1.5b. External Research (Conditional)
207
+ ### Step 4 — External Research (Conditional)
208
208
 
209
- Run external research when Step 1.5 selected `local + external`.
209
+ Run external research when Step 3 selected `local + external`.
210
210
 
211
211
  Run these agents in parallel:
212
212
 
213
213
  - Task best-practices-researcher(feature_description)
214
214
  - Task framework-docs-researcher(feature_description)
215
215
 
216
- ### 1.5c. Git History Research (Conditional)
216
+ ### Step 5 — Git History Research (Conditional)
217
217
 
218
218
  Use git history research when historical context is likely to change the plan.
219
219
 
@@ -227,7 +227,7 @@ If selected, run:
227
227
 
228
228
  - Task git-history-analyzer(feature_description)
229
229
 
230
- ### 1.6. Consolidate Research
230
+ ### Step 6 Consolidate Research
231
231
 
232
232
  After all research steps complete, consolidate findings:
233
233
 
@@ -240,7 +240,7 @@ After all research steps complete, consolidate findings:
240
240
 
241
241
  **Optional validation:** Briefly summarize findings and ask if anything looks off or missing before proceeding to planning.
242
242
 
243
- ### 1.7. SpecFlow Analysis (by fidelity)
243
+ ### Step 7 SpecFlow Analysis (by fidelity)
244
244
 
245
245
  Run flow/gap analysis to surface missing requirements before locking structure:
246
246
 
@@ -248,11 +248,11 @@ Run flow/gap analysis to surface missing requirements before locking structure:
248
248
  - **Medium fidelity:** recommended
249
249
  - **High fidelity:** required
250
250
 
251
- **Step 1 — Dispatch subagent:** Task spec-flow-analyzer(feature_description, research_findings)
251
+ **Dispatch subagent:** Task spec-flow-analyzer(feature_description, research_findings)
252
252
 
253
- **Step 2 — Parent review:** Once findings are returned, assess whether gaps and edge cases are adequately surfaced. If coverage is insufficient or a critical flow was missed, re-dispatch with refined context before locking structure. Incorporate confirmed gaps into the upcoming issue structure and acceptance criteria.
253
+ **Parent review:** Once findings are returned, assess whether gaps and edge cases are adequately surfaced. If coverage is insufficient or a critical flow was missed, re-dispatch with refined context before locking structure. Incorporate confirmed gaps into the upcoming issue structure and acceptance criteria.
254
254
 
255
- ### 2. Issue Planning & Structure
255
+ ### Step 8 — Issue Planning & Structure
256
256
 
257
257
  <thinking>
258
258
  Think like a product manager - what would make this issue clear and actionable? Consider multiple perspectives
@@ -278,7 +278,7 @@ Think like a product manager - what would make this issue clear and actionable?
278
278
  - [ ] Gather supporting materials (error logs, screenshots, design mockups)
279
279
  - [ ] Prepare code examples or reproduction steps if applicable, name the mock filenames in the lists
280
280
 
281
- ### 2.5. Solution Scope Contract (REQUIRED for all plans)
281
+ ### Step 9 — Solution Scope Contract (REQUIRED for all plans)
282
282
 
283
283
  Every plan MUST include an explicit scope contract so `/workflow:work` can enforce intent.
284
284
 
@@ -299,7 +299,7 @@ Placement:
299
299
  - Put `solution_scope` in frontmatter.
300
300
  - Put `completion_expectation` and `non_goals` in a dedicated section (recommended: `## Scope Contract`) in the plan body.
301
301
 
302
- ### 2.6. Agentic Access & Validation Contract (REQUIRED for all plans)
302
+ ### Step 10 — Agentic Access & Validation Contract (REQUIRED for all plans)
303
303
 
304
304
  Every plan MUST include an explicit contract describing how an agent will execute and verify the work without hidden assumptions.
305
305
 
@@ -322,9 +322,9 @@ Placement:
322
322
  - Add a dedicated section in the plan body: `## Agentic Access & Validation Contract`.
323
323
  - Reference this section from implementation phases/todos so `/workflow:work` can enforce it directly.
324
324
 
325
- ### 3.5. Discussion Points & Spike Candidates
325
+ ### Step 11 — Discussion Points & Spike Candidates
326
326
 
327
- When you declared Open questions in Step 1.5 (other than "none"), and/or when risky-work spike evaluation requires spikes, the plan file MUST include one or both sections below with checkboxes so `/workflow:work` and `file-todos` can create pending todos for triage:
327
+ When you declared Open questions in Step 3 (other than "none"), and/or when risky-work spike evaluation requires spikes, the plan file MUST include one or both sections below with checkboxes so `/workflow:work` and `file-todos` can create pending todos for triage:
328
328
 
329
329
  - **## Discussion Points (resolve/decide)** — Decisions to make (no code). Use `- [ ]` items (e.g. "Decide: X or Y?", "Confirm constraint Z").
330
330
  - **## Spike Candidates (timeboxed)** — Timeboxed investigations to de-risk. Use `- [ ] Spike: <short description>` items.
@@ -361,7 +361,7 @@ Example Spike Candidate:
361
361
  - Parallelizable: yes
362
362
  ```
363
363
 
364
- ### 4. Choose Implementation Detail Level
364
+ ### Step 12 — Choose Implementation Detail Level
365
365
 
366
366
  Select how comprehensive you want the issue to be. Fidelity should drive this choice.
367
367
 
@@ -748,7 +748,7 @@ solution_scope: [partial_fix|full_remediation|migration]
748
748
  - Design documents: [links]
749
749
  ```
750
750
 
751
- ### 5. Issue Creation & Formatting
751
+ ### Step 13 — Issue Creation & Formatting
752
752
 
753
753
  <thinking>
754
754
  Apply best practices for clarity and actionability, making the issue easy to scan and understand
@@ -792,7 +792,7 @@ Apply best practices for clarity and actionability, making the issue easy to sca
792
792
  </details>
793
793
  ````
794
794
 
795
- ### 6. Final Review & Submission
795
+ ### Step 14 — Final Review & Submission
796
796
 
797
797
  **Pre-submission Checklist:**
798
798
 
@@ -820,7 +820,7 @@ mkdir -p docs/plans/
820
820
 
821
821
  Write the complete plan file to `docs/plans/YYYY-MM-DD-<type>-<slug>-plan.md`. This step is mandatory and cannot be skipped — even when running as part of LFG/SLFG or other automated pipelines.
822
822
 
823
- **When Open questions were declared (Step 1.5):** The written plan MUST include at least one of: `## Discussion Points (resolve/decide)` with `- [ ]` items, or `## Spike Candidates (timeboxed)` with `- [ ] Spike: ...` items. If confidence is `Low`, at least one checkbox is required in one of these sections. This ensures `file-todos` can create pending discussion/spike todos for `/workflow:triage`.
823
+ **When Open questions were declared (Step 3):** The written plan MUST include at least one of: `## Discussion Points (resolve/decide)` with `- [ ]` items, or `## Spike Candidates (timeboxed)` with `- [ ] Spike: ...` items. If confidence is `Low`, at least one checkbox is required in one of these sections. This ensures `file-todos` can create pending discussion/spike todos for `/workflow:triage`.
824
824
 
825
825
  **When risky-work Spike Evaluation declared `spikes_needed: yes`:** The written plan MUST include `## Spike Candidates (timeboxed)` with at least one spike checkbox and required per-candidate metadata (`Initial priority`, `Depends on`, `Unblocks`, `Timebox`, `Deliverable`, `Parallelizable`) so ordering can be defined in plan, confirmed in triage, and enforced in work.
826
826
 
@@ -830,7 +830,7 @@ Confirm: "Plan written to docs/plans/[filename]"
830
830
 
831
831
  **Technical review (required when Fidelity is Medium or High):** After writing the plan file, if the declared **Fidelity is Medium or High**, you **must** run technical review—it is not optional. Run **Task planning-technical-reviewer(plan_path)** using the plan path just written. Do not perform technical review in-context unless the environment cannot run the Task; if you fall back, state "planning-technical-reviewer unavailable; running direct technical review (degraded bias resistance)" and then load the `technical-review` skill and run it in-context. If Fidelity is Low, skip this step; the user can still choose "Technical review" from Post-Generation Options or call `/workflow:tech-review` later.
832
832
 
833
- **Non-interactive mode:** When the invocation is non-interactive (e.g., `workflow:plan` run by automation, CI, or with an explicit non-interactive flag/convention), skip AskQuestion calls and do not present Post-Generation Options. For determinism, the repo should define the flag or convention (e.g., in `AGENTS.md` Repo Config Block or a documented env var). Still **declare** Fidelity, Confidence, Solution scope, Spike evaluation, Spikes needed, Research mode, and Open questions in the required announcement format before writing the plan. Use these defaults when user input is unavailable: fidelity = Medium, confidence = Medium, solution_scope = full_remediation, spike evaluation = not-required unless risky-work triggers are present, spikes needed = n/a when spike evaluation is not required, research mode = local + external for Medium/High risk topics else local only. Proceed directly to writing the plan file and then exit or return the plan path as output.
833
+ **Non-interactive mode:** When the invocation is non-interactive (e.g., `workflow:plan` run by automation, CI, or with an explicit non-interactive flag/convention), skip AskUserQuestion calls and do not present Post-Generation Options. For determinism, the repo should define the flag or convention (e.g., in `AGENTS.md` Repo Config Block or a documented env var). Still **declare** Fidelity, Confidence, Solution scope, Spike evaluation, Spikes needed, Research mode, and Open questions in the required announcement format before writing the plan. Use these defaults when user input is unavailable: fidelity = Medium, confidence = Medium, solution_scope = full_remediation, spike evaluation = not-required unless risky-work triggers are present, spikes needed = n/a when spike evaluation is not required, research mode = local + external for Medium/High risk topics else local only. Proceed directly to writing the plan file and then exit or return the plan path as output.
834
834
 
835
835
  **Required in plan frontmatter:** Add these fields to the plan file:
836
836
 
@@ -840,7 +840,7 @@ Confirm: "Plan written to docs/plans/[filename]"
840
840
 
841
841
  ## Output Format
842
842
 
843
- **Filename:** Use the filename from Step 2 (Title & Categorization): `YYYY-MM-DD-<type>-<slug>-plan.md` with type and slug from the single contract.
843
+ **Filename:** Use the filename from Step 8 (Title & Categorization): `YYYY-MM-DD-<type>-<slug>-plan.md` with type and slug from the single contract.
844
844
 
845
845
  ```
846
846
  docs/plans/YYYY-MM-DD-<type>-<slug>-plan.md
@@ -860,35 +860,21 @@ Examples:
860
860
 
861
861
  Technical review (above) is required for Medium/High fidelity and must be run via subagent when available.
862
862
 
863
- After writing the plan file, use **AskQuestion** to present these options:
863
+ After writing the plan file, use **AskUserQuestion** to ask: "Plan ready at `docs/plans/YYYY-MM-DD-<type>-<slug>-plan.md`. What would you like to do next?"
864
864
 
865
- **Question:** "Plan ready at `docs/plans/YYYY-MM-DD-<type>-<slug>-plan.md`. What would you like to do next?"
865
+ **Options and routing:**
866
866
 
867
- **Options:**
867
+ 1. **Open plan in editor** → Navigate to `docs/plans/<plan_filename>.md`
868
+ 2. **Review and refine** → Load `document-review` skill
869
+ 3. **Start `/workflow:work`** → Run `/workflow:work <plan_path>` (includes triage gate)
870
+ 4. **Start `/workflow:triage`** → Ensure plan todos exist (create via `file-todos` if needed), then run `/workflow:triage` to approve the ready queue
871
+ 5. **Create Issue** → See "Issue Creation" section below
872
+ 6. **Other** → Accept free text for rework or specific changes
868
873
 
869
- 1. **Open plan in editor** - Open the plan file for review
870
- 2. **Review and refine** - Improve the document through structured self-review
871
- 3. **Start `/workflow:work`** - Execute this plan (includes default triage gate)
872
- 4. **Start `/workflow:triage`** - Manually curate/prioritize queue before execution
873
- 5. **Create Issue** - Create issue in project tracker (GitHub/Linear)
874
- 6. **Other** - Adjust the plan
874
+ Optional (only if present in this repo):
875
875
 
876
- Optional (only if those workflows exist in this repo):
877
-
878
- - `/deepen-plan` - Enhance each section with parallel research agents
879
- - **Technical review** - Load `technical-review` skill for technical correctness (no edits). Pair with `document-review` to apply any agreed changes to the plan.
880
-
881
- Based on selection:
882
-
883
- - **Open plan in editor** → Open the plan file in the editor (navigate to `docs/plans/<plan_filename>.md`)
884
- - **Review and refine** → Load `document-review` skill.
885
- - **Start `/workflow:work`** → Run `/workflow:work <plan_path>`; `/workflow:work` must run triage before implementation.
886
- - **Start `/workflow:triage`** → Ensure plan todos exist (create via `file-todos` if needed), then run `/workflow:triage` to approve priority/dependencies and the executable ready queue.
887
- - **Technical review** → Load `technical-review` skill; then if user agrees to changes, load `document-review` to update the plan.
888
- - **Create Issue** → See "Issue Creation" section below
889
- - **Other** → Accept free text for rework or specific changes
890
-
891
- **Note:** Only if `/deepen-plan` exists in this repo and the user has enabled it (e.g., ultrathink), you may run `/deepen-plan` after plan creation for extra depth; it is optional, not required.
876
+ - **Technical review** → Load `technical-review` skill; if user agrees to changes, load `document-review` to update the plan
877
+ - `/deepen-plan` → Enhance each section with parallel research agents (optional, not required)
892
878
 
893
879
  Loop back to options after changes until user selects `/workflow:work`, `/workflow:triage`, or ends the session.
894
880
 
@@ -903,7 +889,7 @@ When user selects "Create Issue", detect their project tracker from repo guidanc
903
889
 
904
890
  2. **If GitHub:**
905
891
 
906
- Use **type** and **title** from Step 2 (title has no prefix). Compose issue title as `"<type>: <title>"` (e.g., `feat: User authentication flow`).
892
+ Use **type** and **title** from Step 8 (title has no prefix). Compose issue title as `"<type>: <title>"` (e.g., `feat: User authentication flow`).
907
893
 
908
894
  If the `gh` CLI is available, create the issue via:
909
895
 
@@ -915,7 +901,7 @@ When user selects "Create Issue", detect their project tracker from repo guidanc
915
901
 
916
902
  3. **If Linear:**
917
903
 
918
- Use **type** and **title** from Step 2. For Linear, use either the full title or `"<type>: <title>"` per team convention.
904
+ Use **type** and **title** from Step 8. For Linear, use either the full title or `"<type>: <title>"` per team convention.
919
905
 
920
906
  If the `linear` CLI is available, create the issue via:
921
907
 
@@ -25,12 +25,13 @@ This command is an orchestrator, not an implementer.
25
25
  This command is responsible for:
26
26
 
27
27
  - reading and validating the approved plan
28
- - deriving executable todo contracts from approved feature requirements
28
+ - breaking the plan into executable todo contracts via `skill: file-todos`
29
29
  - preserving intent from the plan during task derivation and execution
30
- - resolving required skills from the capability registry
31
- - determining execution order based on dependencies and preconditions
32
- - **delegating execution to subagents**
33
- - **collecting and verifying subagent output**
30
+ - allocating the plan's `required_skills` onto each todo and passing them to subagents at delegation time
31
+ - determining execution order dependencies, preconditions, priority tier, blocking spikes first
32
+ - identifying which ready todos can run in parallel without conflicting
33
+ - delegating execution to subagents (never implementing directly)
34
+ - collecting and verifying subagent output
34
35
  - routing work through required review gates
35
36
  - deciding `complete`, `changes_required`, `blocked`, or `plan_conflict`
36
37
 
@@ -317,14 +318,14 @@ If yes: set `status = plan_conflict`, stop further dependent execution, surface
317
318
 
318
319
  ### Phase 1: Setup & Validation
319
320
 
320
- #### 1.1 Read and Validate Plan File
321
+ #### Step 1 Read and Validate Plan File
321
322
 
322
323
  - Read the plan file completely
323
324
  - Confirm the file exists and is readable
324
325
  - If missing acceptance criteria, scope, or non-goals — stop and return for refinement
325
326
  - Do not compensate for a weak plan by improvising hidden assumptions
326
327
 
327
- #### 1.2 Resolve Repo Defaults
328
+ #### Step 2 Resolve Repo Defaults
328
329
 
329
330
  Read `AGENTS.md` and look for the Repo Config Block. Resolve:
330
331
 
@@ -340,7 +341,7 @@ If any required quality gate command is missing:
340
341
  - record them in the first active todo work log entry
341
342
  - do not mark related todos complete unless the commands were run successfully
342
343
 
343
- #### 1.3 Resolve Plan Contract
344
+ #### Step 3 Resolve Plan Contract
344
345
 
345
346
  Extract from the plan:
346
347
 
@@ -362,7 +363,9 @@ If any of the following are missing, stop and return the plan for refinement:
362
363
  - actionable access/validation contract
363
364
  - enough implementation detail to derive executable tasks
364
365
 
365
- #### 1.4 Resolve Skill Assignments
366
+ #### Step 4 Resolve Skill Assignments
367
+
368
+ The plan selects required skills per task. Work validates them against the Skill Index and allocates them to subagents at delegation — it does not re-decide skills or add universal baselines.
366
369
 
367
370
  Read the Skill Index from `AGENTS.md`.
368
371
 
@@ -370,7 +373,7 @@ For each implementation phase or task in the plan:
370
373
 
371
374
  - Check if the plan already carries `required_skills` annotations (written during `/workflow:plan`)
372
375
  - If annotations exist: validate each skill against the registry — confirm it exists and is applicable
373
- - If annotations are missing: resolve skills now by mapping task responsibility, objective, and constraints to the Skill Index
376
+ - If annotations are missing on a task that needs skills: treat as a plan defect and stop — return to `/workflow:plan` for refinement
374
377
  - Record resolved skills per task — these will be attached to todo contracts in Phase 3
375
378
 
376
379
  If a required skill cannot be resolved from the registry:
@@ -378,7 +381,7 @@ If a required skill cannot be resolved from the registry:
378
381
  - surface it as a capability gap
379
382
  - do not proceed with that task until resolved
380
383
 
381
- #### 1.5 Resolve Testing Cadence
384
+ #### Step 5 Resolve Testing Cadence
382
385
 
383
386
  Infer testing cadence from the plan's risk profile.
384
387
 
@@ -432,7 +435,7 @@ Convert the approved plan into executable todo contracts.
432
435
 
433
436
  A todo is not a note. A todo is not a loose checklist item. A todo is an executable contract that can be delegated to a subagent, verified, and closed.
434
437
 
435
- #### 3.1 Todo Contract Rules
438
+ #### Step 1 Todo Contract Rules
436
439
 
437
440
  Every derived todo must be:
438
441
 
@@ -443,13 +446,13 @@ Every derived todo must be:
443
446
  - explicit about verification
444
447
  - explicit about evidence required for closure
445
448
  - explicitly anchored to approved intent
446
- - carrying resolved skill assignments from Phase 1.4
449
+ - carrying resolved skill assignments from Phase 1 Step 4
447
450
 
448
451
  If a candidate task is too broad: split it before delegation.
449
452
  If a candidate task is ambiguous: refine it before delegation.
450
453
  If a candidate task depends on unresolved decisions: mark it `blocked`.
451
454
 
452
- #### 3.2 Required Todo Contract Schema
455
+ #### Step 2 Required Todo Contract Schema
453
456
 
454
457
  Every executable todo MUST contain:
455
458
 
@@ -461,7 +464,7 @@ type: build | review | qa | docs | spike | discussion
461
464
  objective: <what this task must achieve>
462
465
  responsibility: <primary responsibility domain>
463
466
  required_skills:
464
- - <resolved from plan annotations or Phase 1.4>
467
+ - <resolved from plan annotations or Phase 1 Step 4>
465
468
  optional_skills:
466
469
  - <attached when they materially reduce risk>
467
470
  intent_anchor:
@@ -514,7 +517,7 @@ review_outcome:
514
517
  summary: pending
515
518
  ```
516
519
 
517
- #### 3.3 Todo Status Model
520
+ #### Step 3 Todo Status Model
518
521
 
519
522
  - `drafted` — derived but not yet ready to execute
520
523
  - `ready` — dependencies and preconditions satisfied
@@ -528,13 +531,13 @@ review_outcome:
528
531
 
529
532
  Important: `implemented` does not unblock downstream work. Only `complete` unblocks downstream work.
530
533
 
531
- #### 3.4 Responsibility Classification
534
+ #### Step 4 Responsibility Classification
532
535
 
533
536
  Every todo must declare one primary responsibility. If a task truly spans multiple major responsibilities, split it.
534
537
 
535
538
  Recommended values: `frontend`, `backend`, `schema`, `testing`, `playwright`, `infra`, `docs`, `spike`, `discussion`, `technical_review`, `qa_review`
536
539
 
537
- #### 3.5 Blocking Unknowns
540
+ #### Step 5 Blocking Unknowns
538
541
 
539
542
  When the plan includes unresolved decisions, missing access, risky unknowns, spike candidates, or discussion points — these must become explicit todos before dependent build work begins.
540
543
 
@@ -542,7 +545,7 @@ When the plan includes unresolved decisions, missing access, risky unknowns, spi
542
545
  - spike todos → reduce risk with a timebox and deliverable
543
546
  - build work blocked by them stays `blocked`
544
547
 
545
- #### 3.6 Create Todo Files
548
+ #### Step 6 Create Todo Files
546
549
 
547
550
  Confirm `file-todos` exists in the AGENTS.md registry before running. If missing, surface as a capability gap and stop.
548
551
 
@@ -566,7 +569,7 @@ Plan → todos mapping:
566
569
  - spike candidates → spike todos (`status: pending`)
567
570
  - review/qa requirements → review/qa todos
568
571
 
569
- #### 3.7 Dependency Rules
572
+ #### Step 7 Dependency Rules
570
573
 
571
574
  Execution order is dependency-driven, not list-order driven.
572
575
 
@@ -806,7 +809,7 @@ Ask-once fallback: if commands are not configured, ask once for run-provided com
806
809
 
807
810
  ### Phase 7: Completion
808
811
 
809
- #### 7.1 Final Drift Check
812
+ #### Step 1 Final Drift Check
810
813
 
811
814
  Verify the complete implementation still aligns to original plan intent:
812
815
 
@@ -817,7 +820,7 @@ Verify the complete implementation still aligns to original plan intent:
817
820
 
818
821
  If drift detected: set `status = plan_conflict`, stop, surface for review before claiming completion.
819
822
 
820
- #### 7.2 Completion Summary
823
+ #### Step 2 Completion Summary
821
824
 
822
825
  Provide:
823
826
 
@@ -829,7 +832,7 @@ Provide:
829
832
  - Plan conflicts / drift detected
830
833
  - Next execution step
831
834
 
832
- #### 7.3 Handoff Options
835
+ #### Step 3 Handoff Options
833
836
 
834
837
  - `/workflow:review` — validate quality of implemented work
835
838
  - `/workflow:compound` — capture durable learnings from this execution
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: setup-agents
3
- description: Create or update AGENTS.md for any project. Detects project stack and installed harness directories, prompts for missing config, curates the Skill Index from installed skills, and writes a clean minimal AGENTS.md. Use when onboarding a new project or refreshing an existing config.
3
+ description: Create or update AGENTS.md for any project. Detects project stack and installed harness directories, prompts for missing config, builds the Skill Index from all installed skills (no manual curation), and writes a clean minimal AGENTS.md. Use when onboarding a new project or refreshing an existing config.
4
4
  triggers:
5
5
  - setting up a new project
6
6
  - initialising AGENTS.md for the first time
@@ -70,47 +70,62 @@ From these, infer:
70
70
  | `format_command` | `scripts.format` in package.json; prettier config presence |
71
71
  | `dev_server_url` | vite config `server.port`; default `http://localhost:5173` for Vite, `http://localhost:3000` for others |
72
72
  | `worktree_install_command` | `package-lock.json` → `npm ci`; `yarn.lock` → `yarn install`; `pnpm-lock.yaml` → `pnpm install` |
73
+ | `default_branch` | `git symbolic-ref refs/remotes/origin/HEAD` → strip `refs/remotes/origin/`; fallback `main` |
74
+ | `project_tracker` | `.github/` exists → `github`; else `none` |
75
+ | `worktree_dir` | default `.worktrees` |
76
+ | `worktree_copy_files` | glob `.env*` in repo root, excluding `.env.example` and `.env.sample` |
73
77
 
74
- For each value, state whether it was detected or assumed.
78
+ For each value, state whether it was detected or defaulted.
75
79
 
76
80
  ---
77
81
 
78
- ## Phase 2: Prompt for Missing or Undetectable Values
82
+ ## Phase 2: Confirm the Proposed Config
79
83
 
80
- Ask for any values that could not be detected. Ask one at a time.
84
+ Do not prompt field-by-field. Show the resolved config from Phase 1 as a single block and ask one question.
81
85
 
82
- Required:
86
+ **Update mode:** start from the values already in `AGENTS.md`. Only overwrite with a Phase 1 detection when the existing value is empty or clearly stale (e.g. references a command that no longer exists in `package.json`). Flag overrides in the proposed block so the user can see what changed.
83
87
 
84
- - `default_branch` — cannot be reliably detected; ask (suggest `main`)
85
- - `project_tracker` — ask: `github`, `linear`, or none
86
- - `dev_server_url` — confirm detected value or ask
87
- - `worktree_dir` — suggest `.worktrees`
88
- - `worktree_copy_files` — ask which env/config files should be copied into new worktrees (e.g. `.env.local`)
89
- - `harnesses` — show detected list from Phase 1; confirm or correct
88
+ Output format:
90
89
 
91
- **Update mode only:** Show the current values and ask: "These values are already configured — confirm, update, or skip each?"
90
+ ```
91
+ Proposed AGENTS.md config:
92
+
93
+ default_branch: <value> [detected|default|existing]
94
+ project_tracker: <value> [detected|default|existing]
95
+ dev_server_url: <value> [detected|default|existing]
96
+ test_command: <value> [detected|existing]
97
+ test_fast_command: <value> [detected|existing|omit]
98
+ lint_command: <value> [detected|existing|omit]
99
+ typecheck_command: <value> [detected|existing|omit]
100
+ format_command: <value> [detected|existing|omit]
101
+ worktree_dir: <value> [default|existing]
102
+ worktree_install_command: <value> [detected|existing]
103
+ worktree_copy_files: [<files>] [detected|existing]
104
+ harnesses: [<dirs>] [detected]
105
+
106
+ Accept, or reply with `<key>: <value>` lines to override. Blank line accepts.
107
+ ```
108
+
109
+ One round-trip. If the user accepts, proceed to Phase 3. If they override fields, apply the overrides and proceed — do not re-confirm.
92
110
 
93
111
  ---
94
112
 
95
- ## Phase 3: Curate the Skill Index
113
+ ## Phase 3: Build the Skill Index
96
114
 
97
115
  List all directories under `$skills_dir` (resolved in Phase 1). For each one, read `SKILL.md` frontmatter to get `name` and `description`. These are the only skills that may appear in the Skill Index — never reference a skill not present on disk.
98
116
 
99
- Present the full discovered list to the user as a numbered menu:
117
+ **Include every discovered skill automatically.** The installed skill set is the source of truth; there is no curation step. Do not prompt the user to pick a subset.
118
+
119
+ Show the resolved list so the user can see what will be written:
100
120
 
101
121
  ```
102
- Installed skills (from <$skills_dir>):
103
- 1. <name> — <description from frontmatter>
104
- 2. <name> — <description from frontmatter>
122
+ Skill Index will include all installed skills from <$skills_dir>:
123
+ - <name> — <description from frontmatter>
124
+ - <name> — <description from frontmatter>
105
125
  ...
106
-
107
- Which should appear in the Skill Index? (Enter numbers, or "all", or "all except N,N")
108
126
  ```
109
127
 
110
- **Init mode:** Ask which to include.
111
- **Update mode:** Show which are currently included and ask: "Keep, remove, or any to add?"
112
-
113
- Do not categorise skills in advance — the user decides what is relevant for their project.
128
+ **Update mode:** diff against the existing Skill Index and note additions/removals, then write the refreshed list. If the user wants to exclude a skill, they should uninstall or remove it from `$skills_dir` rather than hand-curate the index.
114
129
 
115
130
  ---
116
131
 
@@ -215,7 +230,7 @@ harnesses:
215
230
 
216
231
  | Skill | Use when |
217
232
  | --- | --- |
218
- [... one row per skill the user selected in Phase 3; use the description from each skill's SKILL.md frontmatter ...]
233
+ [... one row per skill discovered in Phase 3; use the description from each skill's SKILL.md frontmatter ...]
219
234
  ```
220
235
 
221
236
  Confirm: "AGENTS.md written."