work-kit-cli 0.2.7 → 0.3.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.
Files changed (86) hide show
  1. package/README.md +13 -13
  2. package/cli/src/commands/bootstrap.ts +39 -13
  3. package/cli/src/commands/cancel.ts +1 -16
  4. package/cli/src/commands/complete.ts +92 -98
  5. package/cli/src/commands/completions.ts +2 -2
  6. package/cli/src/commands/doctor.ts +1 -1
  7. package/cli/src/commands/init.ts +40 -32
  8. package/cli/src/commands/loopback.ts +8 -11
  9. package/cli/src/commands/next.ts +64 -51
  10. package/cli/src/commands/pause-resume.test.ts +142 -0
  11. package/cli/src/commands/pause.ts +34 -0
  12. package/cli/src/commands/report.ts +217 -0
  13. package/cli/src/commands/resume.ts +38 -0
  14. package/cli/src/commands/setup.ts +136 -0
  15. package/cli/src/commands/status.ts +6 -6
  16. package/cli/src/commands/uninstall.ts +8 -3
  17. package/cli/src/commands/workflow.ts +27 -27
  18. package/cli/src/config/agent-map.ts +9 -9
  19. package/cli/src/config/constants.ts +44 -0
  20. package/cli/src/config/loopback-routes.ts +13 -13
  21. package/cli/src/config/project-config.test.ts +127 -0
  22. package/cli/src/config/project-config.ts +106 -0
  23. package/cli/src/config/{phases.ts → workflow.ts} +40 -23
  24. package/cli/src/context/prompt-builder.ts +10 -9
  25. package/cli/src/index.ts +63 -7
  26. package/cli/src/observer/data.ts +64 -56
  27. package/cli/src/observer/renderer.ts +162 -75
  28. package/cli/src/state/helpers.test.ts +28 -28
  29. package/cli/src/state/helpers.ts +37 -25
  30. package/cli/src/state/schema.ts +88 -45
  31. package/cli/src/state/store.ts +92 -7
  32. package/cli/src/state/validators.test.ts +13 -13
  33. package/cli/src/state/validators.ts +3 -4
  34. package/cli/src/utils/colors.ts +2 -0
  35. package/cli/src/utils/json.ts +20 -0
  36. package/cli/src/utils/time.ts +27 -0
  37. package/cli/src/{engine → workflow}/loopbacks.test.ts +2 -2
  38. package/cli/src/workflow/loopbacks.ts +42 -0
  39. package/cli/src/workflow/parallel.ts +64 -0
  40. package/cli/src/workflow/transitions.test.ts +129 -0
  41. package/cli/src/{engine → workflow}/transitions.ts +18 -22
  42. package/package.json +2 -2
  43. package/skills/auto-kit/SKILL.md +22 -22
  44. package/skills/cancel-kit/SKILL.md +4 -4
  45. package/skills/full-kit/SKILL.md +23 -23
  46. package/skills/pause-kit/SKILL.md +25 -0
  47. package/skills/resume-kit/SKILL.md +28 -0
  48. package/skills/wk-bootstrap/SKILL.md +5 -5
  49. package/skills/wk-build/SKILL.md +10 -10
  50. package/skills/wk-build/{stages → steps}/commit.md +1 -1
  51. package/skills/wk-build/{stages → steps}/core.md +3 -3
  52. package/skills/wk-build/{stages → steps}/integration.md +2 -2
  53. package/skills/wk-build/{stages → steps}/migration.md +1 -1
  54. package/skills/wk-build/{stages → steps}/red.md +1 -1
  55. package/skills/wk-build/{stages → steps}/refactor.md +1 -1
  56. package/skills/wk-build/{stages → steps}/setup.md +1 -1
  57. package/skills/wk-build/{stages → steps}/ui.md +1 -1
  58. package/skills/wk-deploy/SKILL.md +6 -6
  59. package/skills/wk-deploy/{stages → steps}/merge.md +1 -1
  60. package/skills/wk-deploy/{stages → steps}/monitor.md +1 -1
  61. package/skills/wk-deploy/{stages → steps}/remediate.md +1 -1
  62. package/skills/wk-plan/SKILL.md +13 -13
  63. package/skills/wk-plan/{stages → steps}/architecture.md +1 -1
  64. package/skills/wk-plan/{stages → steps}/audit.md +2 -2
  65. package/skills/wk-plan/{stages → steps}/blueprint.md +2 -2
  66. package/skills/wk-plan/{stages → steps}/clarify.md +1 -1
  67. package/skills/wk-plan/{stages → steps}/investigate.md +1 -1
  68. package/skills/wk-plan/{stages → steps}/scope.md +1 -1
  69. package/skills/wk-plan/{stages → steps}/sketch.md +1 -1
  70. package/skills/wk-plan/{stages → steps}/ux-flow.md +1 -1
  71. package/skills/wk-review/SKILL.md +10 -10
  72. package/skills/wk-review/{stages → steps}/compliance.md +1 -1
  73. package/skills/wk-review/{stages → steps}/handoff.md +2 -2
  74. package/skills/wk-review/{stages → steps}/performance.md +1 -1
  75. package/skills/wk-review/{stages → steps}/security.md +1 -1
  76. package/skills/wk-review/{stages → steps}/self-review.md +1 -1
  77. package/skills/wk-test/SKILL.md +8 -8
  78. package/skills/wk-test/{stages → steps}/e2e.md +1 -1
  79. package/skills/wk-test/{stages → steps}/validate.md +1 -1
  80. package/skills/wk-test/{stages → steps}/verify.md +1 -1
  81. package/skills/wk-wrap-up/SKILL.md +6 -5
  82. package/skills/wk-wrap-up/steps/summary.md +86 -0
  83. package/cli/src/engine/loopbacks.ts +0 -32
  84. package/cli/src/engine/parallel.ts +0 -60
  85. package/cli/src/engine/transitions.test.ts +0 -129
  86. /package/cli/src/{engine/phases.ts → workflow/gates.ts} +0 -0
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: full-kit
3
- description: "Full pipeline for feature development. Runs all phases and sub-stages in order. Usage: /full-kit <description> to start, /full-kit to continue."
3
+ description: "Full pipeline for feature development. Runs all phases and steps in order. Usage: /full-kit <description> to start, /full-kit to continue."
4
4
  user-invocable: true
5
5
  argument-hint: "[--gated] [description]"
6
6
  allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep
7
7
  ---
8
8
 
9
- You are the **Work Orchestrator (Full Mode)**. You run the complete lifecycle of a feature through every phase and sub-stage. No shortcuts.
9
+ You are the **Work Orchestrator (Full Mode)**. You run the complete lifecycle of a feature through every phase and step. No shortcuts.
10
10
 
11
11
  Best for: large features, new systems, or when you want maximum rigor.
12
12
 
@@ -14,7 +14,7 @@ Best for: large features, new systems, or when you want maximum rigor.
14
14
 
15
15
  Before starting, verify the CLI is installed:
16
16
  ```bash
17
- npx work-kit-cli doctor
17
+ work-kit doctor
18
18
  ```
19
19
 
20
20
  If `work-kit` is not found, ask the user to install it:
@@ -37,7 +37,7 @@ Do not proceed until `doctor` reports all checks passed.
37
37
  ```bash
38
38
  git worktree add worktrees/<slug> -b feature/<slug>
39
39
  cd worktrees/<slug>
40
- npx work-kit-cli init --mode full --description "<description>"
40
+ work-kit init --mode full --description "<description>"
41
41
  ```
42
42
  If the user passed `--gated` (e.g., `/full-kit --gated add user avatar`), add `--gated` to the init command. Strip `--gated` from the description text.
43
43
  2. Parse the JSON response and follow the action
@@ -45,34 +45,34 @@ Do not proceed until `doctor` reports all checks passed.
45
45
 
46
46
  ## Continuing Work (`/full-kit` with no args)
47
47
 
48
- 1. Run `npx work-kit-cli bootstrap` to detect session state
48
+ 1. Run `work-kit bootstrap` to detect session state
49
49
  2. Parse the JSON response:
50
50
  - If `active: false` — no session found, ask the user for a description and start new work
51
51
  - If `recovery` is set — report the recovery suggestion to the user before continuing
52
- - If `active: true` — report current state (slug, phase, sub-stage) to the user
52
+ - If `active: true` — report current state (slug, phase, step) to the user
53
53
  3. `cd` into the worktree directory
54
- 4. Run `npx work-kit-cli next` to get the next action
54
+ 4. Run `work-kit next` to get the next action
55
55
  5. Follow the execution loop below
56
56
 
57
57
  ## Execution Loop
58
58
 
59
59
  The CLI manages all state transitions, prerequisites, and loopbacks. Follow this loop:
60
60
 
61
- 1. Run `npx work-kit-cli next` to get the next action
61
+ 1. Run `work-kit next` to get the next action
62
62
  2. Parse the JSON response
63
63
  3. Follow the action type:
64
- - **`spawn_agent`**: Use the Agent tool with the provided `agentPrompt`. Pass `skillFile` path for reference. After the agent completes: `npx work-kit-cli complete <phase>/<sub-stage> --outcome <outcome>`
65
- - **`spawn_parallel_agents`**: Spawn all agents in the `agents` array in parallel using the Agent tool. Wait for all to complete. Then spawn `thenSequential` if provided. After all complete: `npx work-kit-cli complete <onComplete target>`
66
- - **`wait_for_user`**: Report the message to the user and stop. Wait for them to say "proceed" before running `npx work-kit-cli next` again. (Only appears in `--gated` mode.)
67
- - **`loopback`**: Report the loopback to the user, then run `npx work-kit-cli next` to continue from the target.
64
+ - **`spawn_agent`**: Use the Agent tool with the provided `agentPrompt`. Pass `skillFile` path for reference. After the agent completes: `work-kit complete <phase>/<step> --outcome <outcome>`
65
+ - **`spawn_parallel_agents`**: Spawn all agents in the `agents` array in parallel using the Agent tool. Wait for all to complete. Then spawn `thenSequential` if provided. After all complete: `work-kit complete <onComplete target>`
66
+ - **`wait_for_user`**: Report the message to the user and stop. Wait for them to say "proceed" before running `work-kit next` again. (Only appears in `--gated` mode.)
67
+ - **`loopback`**: Report the loopback to the user, then run `work-kit next` to continue from the target.
68
68
  - **`complete`**: Done — run wrap-up if not already done.
69
69
  - **`error`**: Report the error and suggestion to the user. Stop.
70
- 4. After each agent completes: `npx work-kit-cli complete <phase>/<sub-stage> --outcome <outcome>`
71
- 5. Then `npx work-kit-cli next` again to continue
70
+ 4. After each agent completes: `work-kit complete <phase>/<step> --outcome <outcome>`
71
+ 5. Then `work-kit next` again to continue
72
72
 
73
73
  ## Phase Prerequisites
74
74
 
75
- Prerequisites are enforced by the CLI (`npx work-kit-cli validate <phase>`). You don't need to check manually — the `next` command handles it.
75
+ Prerequisites are enforced by the CLI (`work-kit validate <phase>`). You don't need to check manually — the `next` command handles it.
76
76
 
77
77
  | Phase | Requires |
78
78
  |----------|-----------------------------------|
@@ -90,12 +90,12 @@ Each phase runs as a **fresh agent** (sub-agent spawned by the orchestrator). Th
90
90
  ```
91
91
  Orchestrator (main agent — you)
92
92
 
93
- ├── Agent: Plan (single agent, all 8 sub-stages)
93
+ ├── Agent: Plan (single agent, all 8 steps)
94
94
  │ ├── reads: ## Description, ## Criteria, codebase
95
95
  │ ├── runs: Clarify → Investigate → ... → Audit
96
96
  │ └── writes: ### Plan: Final (Blueprint, Architecture, Scope, Constraints)
97
97
 
98
- ├── Agent: Build (single agent, all 8 sub-stages)
98
+ ├── Agent: Build (single agent, all 8 steps)
99
99
  │ ├── reads: ### Plan: Final, ## Criteria
100
100
  │ ├── runs: Setup → Migration → ... → Commit
101
101
  │ └── writes: ### Build: Final (PR, files changed, test status, deviations)
@@ -116,7 +116,7 @@ Orchestrator (main agent — you)
116
116
  │ ├── then: Handoff (reads all 4 results → ship decision)
117
117
  │ └── writes: ### Review: Final (decision, issues, concerns)
118
118
 
119
- ├── Agent: Deploy (single agent, all 3 sub-stages)
119
+ ├── Agent: Deploy (single agent, all 3 steps)
120
120
  │ ├── reads: ### Review: Final, ### Build: Final
121
121
  │ ├── runs: Merge → Monitor → Remediate
122
122
  │ └── writes: ### Deploy: Final (merge/deploy status)
@@ -145,7 +145,7 @@ Orchestrator (main agent — you)
145
145
 
146
146
  ### Phase Handoff via Final Sections
147
147
 
148
- Each phase writes a `### <Phase>: Final` section — a self-contained summary of that phase's output. The next phase's agent reads **only** the Final sections it needs, not the sub-stage working notes.
148
+ Each phase writes a `### <Phase>: Final` section — a self-contained summary of that phase's output. The next phase's agent reads **only** the Final sections it needs, not the step working notes.
149
149
 
150
150
  ```
151
151
  state.md grows like this:
@@ -168,14 +168,14 @@ state.md grows like this:
168
168
  For each phase:
169
169
  1. **Check prerequisites** — verify the required prior phase is marked complete in state.md
170
170
  2. **Spawn a fresh agent** for the phase — pass it the phase skill file and the relevant Final sections from state.md
171
- 3. The agent reads each sub-stage file when directed (e.g., `.claude/skills/wk-plan/stages/clarify.md`)
172
- 4. The agent updates `.work-kit/state.md` after each sub-stage completes
171
+ 3. The agent reads each step file when directed (e.g., `.claude/skills/wk-plan/steps/clarify.md`)
172
+ 4. The agent updates `.work-kit/state.md` after each step completes
173
173
  5. The agent writes the `### <Phase>: Final` section before exiting
174
174
  6. After the agent completes, summarize results to the user and wait for confirmation
175
175
 
176
176
  ## Loop-Back Rules
177
177
 
178
- Some sub-stages can route backwards based on their outcome:
178
+ Some steps can route backwards based on their outcome:
179
179
 
180
180
  - **Plan Audit** → "revise" → re-run Blueprint
181
181
  - **Build Refactor** → "broken" → re-run Core
@@ -183,7 +183,7 @@ Some sub-stages can route backwards based on their outcome:
183
183
  - **Deploy Merge** → "fix_needed" → re-run Build (from Core)
184
184
  - **Deploy Remediate** → "fix_and_redeploy" → re-run Build (from Core)
185
185
 
186
- On loop-back: add a `## Loop-back context` section to state.md with what needs to change and why, then resume at the target sub-stage.
186
+ On loop-back: add a `## Loop-back context` section to state.md with what needs to change and why, then resume at the target step.
187
187
 
188
188
  ## Completion
189
189
 
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: pause-kit
3
+ description: "Pause the active work-kit session. Use when stepping away mid-flight. Usage: /pause-kit [reason]"
4
+ user-invocable: true
5
+ argument-hint: "[reason]"
6
+ allowed-tools: Bash, Read
7
+ ---
8
+
9
+ You are pausing the active work-kit session so it can be resumed cleanly later.
10
+
11
+ ## Steps
12
+
13
+ 1. Run `work-kit bootstrap` to confirm a session is active. If no session is active, tell the user there is nothing to pause and stop.
14
+ 2. `cd` into the worktree path reported by bootstrap.
15
+ 3. Run:
16
+ ```bash
17
+ work-kit pause${ARGUMENTS:+ --reason "$ARGUMENTS"}
18
+ ```
19
+ 4. Parse the JSON response.
20
+ 5. Report the message to the user. Tell them they can run `/resume-kit` (or `work-kit resume`) when ready.
21
+
22
+ ## Notes
23
+
24
+ - Pausing only flips state to `paused` and records `pausedAt` — no files are deleted, no git operations happen.
25
+ - The orchestrator (`/full-kit`, `/auto-kit`) refuses to advance a paused session until it is resumed.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: resume-kit
3
+ description: "Resume a paused work-kit session and continue where it left off. Usage: /resume-kit"
4
+ user-invocable: true
5
+ allowed-tools: Bash, Read, Agent, Write, Edit, Glob, Grep
6
+ ---
7
+
8
+ You are resuming a paused work-kit session.
9
+
10
+ ## Steps
11
+
12
+ 1. Run `work-kit bootstrap` to find the active session. If `active: false`, tell the user there is no session and stop.
13
+ 2. `cd` into the worktree path reported by bootstrap.
14
+ 3. Run:
15
+ ```bash
16
+ work-kit resume
17
+ ```
18
+ 4. Parse the JSON. If `action: "resumed"`, report the slug, phase, and step to the user.
19
+ 5. Continue the orchestrator loop (same as `/full-kit` / `/auto-kit`):
20
+ ```bash
21
+ work-kit next
22
+ ```
23
+ Then follow the action returned (`spawn_agent`, `spawn_parallel_agents`, `wait_for_user`, etc.) using the Agent tool.
24
+
25
+ ## Notes
26
+
27
+ - `resume` is idempotent: if the session was already in-progress, it just reports the current location.
28
+ - A paused session keeps all state — phases, steps, loopbacks, timing — exactly as they were.
@@ -7,13 +7,13 @@ allowed-tools: Bash, Read
7
7
 
8
8
  # Session Bootstrap
9
9
 
10
- Run `npx work-kit-cli bootstrap` to detect work-kit state.
10
+ Run `work-kit bootstrap` to detect work-kit state.
11
11
 
12
12
  ## If active work exists
13
13
 
14
- - Report current state to the user: slug, phase, sub-stage, status
14
+ - Report current state to the user: slug, phase, step, status
15
15
  - If recovery is suggested: follow the recovery instruction
16
- - Otherwise: run `npx work-kit-cli next` to continue the workflow
16
+ - Otherwise: run `work-kit next` to continue the workflow
17
17
 
18
18
  ## If no active work
19
19
 
@@ -24,6 +24,6 @@ Run `npx work-kit-cli bootstrap` to detect work-kit state.
24
24
  ## If session is stale
25
25
 
26
26
  - Report the staleness warning to the user
27
- - Run `npx work-kit-cli status` to get full diagnostics
28
- - If the state is recoverable, run `npx work-kit-cli next` to resume
27
+ - Run `work-kit status` to get full diagnostics
28
+ - If the state is recoverable, run `work-kit next` to resume
29
29
  - If the state is corrupted, suggest starting fresh
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: build
3
- description: "Run the Build phase — 8 sub-stages from Setup to Commit. Follows the Blueprint from Plan."
3
+ description: "Run the Build phase — 8 steps from Setup to Commit. Follows the Blueprint from Plan."
4
4
  user-invocable: false
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  ---
7
7
 
8
8
  You are the **Lead Developer**. Execute the implementation plan from the Blueprint precisely.
9
9
 
10
- ## Sub-stages (in order)
10
+ ## Steps (in order)
11
11
 
12
12
  1. **Setup** — Create branch, install deps, scaffold
13
13
  2. **Migration** — Database schema changes
@@ -20,12 +20,12 @@ You are the **Lead Developer**. Execute the implementation plan from the Bluepri
20
20
 
21
21
  ## Execution
22
22
 
23
- For each sub-stage:
24
- 1. Read the sub-stage file (e.g., `.claude/skills/wk-build/stages/setup.md`)
23
+ For each step:
24
+ 1. Read the step file (e.g., `.claude/skills/wk-build/steps/setup.md`)
25
25
  2. Reference the Blueprint in `.work-kit/state.md` — follow its steps for this layer
26
26
  3. Write actual code, run actual commands
27
27
  4. Update `.work-kit/state.md` with outputs
28
- 5. Proceed to the next sub-stage
28
+ 5. Proceed to the next step
29
29
 
30
30
  ## Key Principle
31
31
 
@@ -33,7 +33,7 @@ For each sub-stage:
33
33
 
34
34
  ## Recording
35
35
 
36
- Throughout every sub-stage, capture three things in the shared state.md sections:
36
+ Throughout every step, capture three things in the shared state.md sections:
37
37
 
38
38
  - **`## Decisions`** — Whenever you choose between real alternatives, append: `**<context>**: chose <X> over <Y> — <why>`. Skip obvious choices.
39
39
  - **`## Deviations`** — Whenever you diverge from the Blueprint, append: `**<Blueprint step>**: <what changed> — <why>`. Every deviation needs a reason.
@@ -44,7 +44,7 @@ These feed into the final work-kit log summary. If you don't record them here, t
44
44
 
45
45
  ### Always
46
46
  - Follow the Blueprint step order unless a dependency requires reordering
47
- - Run the test suite after every sub-stage that changes code
47
+ - Run the test suite after every step that changes code
48
48
  - Record every deviation from the Blueprint in the ## Deviations section
49
49
  - Match existing codebase patterns found during Plan/Investigate
50
50
  - Commit .work-kit/ files separately from feature code
@@ -53,7 +53,7 @@ These feed into the final work-kit log summary. If you don't record them here, t
53
53
  - Redesigning any part of the Blueprint (adapt minimally, don't redesign)
54
54
  - Adding dependencies not specified in the Blueprint
55
55
  - Changing the data model beyond what Architecture specified
56
- - Skipping the Red (failing tests) sub-stage
56
+ - Skipping the Red (failing tests) step
57
57
 
58
58
  ### Never
59
59
  - Write implementation code before writing failing tests (Red comes before Core)
@@ -78,11 +78,11 @@ This phase runs as a **fresh agent**. Read only these sections from `.work-kit/s
78
78
  - `## Criteria` — what "done" looks like
79
79
  - `## Description` — original request for context
80
80
 
81
- Do NOT read the Plan sub-stage working notes (Clarify, Investigate, Sketch, etc.) — they're consumed by Plan: Final.
81
+ Do NOT read the Plan step working notes (Clarify, Investigate, Sketch, etc.) — they're consumed by Plan: Final.
82
82
 
83
83
  ## Final Output
84
84
 
85
- After all sub-stages are done, append a `### Build: Final` section to state.md. This is the **only section the Test agent reads**.
85
+ After all steps are done, append a `### Build: Final` section to state.md. This is the **only section the Test agent reads**.
86
86
 
87
87
  ```markdown
88
88
  ### Build: Final
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Build sub-stage: Create clean commits, push branch, create PR."
2
+ description: "Build step: Create clean commits, push branch, create PR."
3
3
  ---
4
4
 
5
5
  # Commit
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Build sub-stage: Make failing tests pass — service layer, API, business logic (TDD green phase)."
2
+ description: "Build step: Make failing tests pass — service layer, API, business logic (TDD green phase)."
3
3
  ---
4
4
 
5
5
  # Core — Make Tests Pass
@@ -42,8 +42,8 @@ description: "Build sub-stage: Make failing tests pass — service layer, API, b
42
42
  ## Rules
43
43
 
44
44
  - Write the **minimum** code to pass tests — no gold-plating
45
- - Don't refactor yet — that's the Refactor sub-stage
46
- - Don't build UI yet — that's the UI sub-stage
45
+ - Don't refactor yet — that's the Refactor step
46
+ - Don't build UI yet — that's the UI step
47
47
  - If a test expectation seems wrong, fix the test only if the Blueprint supports it
48
48
  - Match existing code patterns exactly — naming, file structure, error handling
49
49
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Build sub-stage: Wire everything together, verify full data flow end-to-end."
2
+ description: "Build step: Wire everything together, verify full data flow end-to-end."
3
3
  ---
4
4
 
5
5
  # Integration
@@ -49,4 +49,4 @@ description: "Build sub-stage: Wire everything together, verify full data flow e
49
49
  |--------|---------|
50
50
  | "Unit tests passing means integration is fine" | Unit tests mock boundaries. Integration failures live at the boundaries — where your code meets the database, API, or UI layer. |
51
51
  | "I already verified data flow during Core" | Core verified that individual pieces work. Integration verifies they work together. A function that passes its unit test can still send the wrong data shape to the next function. |
52
- | "Integration testing is the Test phase's job" | The Test phase runs automated suites. This sub-stage verifies that the pieces you just built actually connect. Finding a wiring bug here takes 5 minutes; finding it in Test takes 30. |
52
+ | "Integration testing is the Test phase's job" | The Test phase runs automated suites. This step verifies that the pieces you just built actually connect. Finding a wiring bug here takes 5 minutes; finding it in Test takes 30. |
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Build sub-stage: Generate and verify database schema changes."
2
+ description: "Build step: Generate and verify database schema changes."
3
3
  ---
4
4
 
5
5
  # Migration
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Build sub-stage: Write failing tests BEFORE implementation (TDD red phase)."
2
+ description: "Build step: Write failing tests BEFORE implementation (TDD red phase)."
3
3
  ---
4
4
 
5
5
  # Red — Write Failing Tests
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Build sub-stage: Improve code quality while keeping all tests green (TDD refactor phase)."
2
+ description: "Build step: Improve code quality while keeping all tests green (TDD refactor phase)."
3
3
  ---
4
4
 
5
5
  # Refactor
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Build sub-stage: Branch creation, dependency installation, scaffolding."
2
+ description: "Build step: Branch creation, dependency installation, scaffolding."
3
3
  ---
4
4
 
5
5
  # Setup
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Build sub-stage: Implement UI components, pages, and interactions."
2
+ description: "Build step: Implement UI components, pages, and interactions."
3
3
  ---
4
4
 
5
5
  # UI
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: deploy
3
- description: "Run the Deploy phase (optional) — 3 sub-stages: Merge, Monitor, Remediate."
3
+ description: "Run the Deploy phase (optional) — 3 steps: Merge, Monitor, Remediate."
4
4
  user-invocable: false
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  ---
7
7
 
8
8
  You are the **Release Engineer**. Get this PR merged and deployed safely.
9
9
 
10
- ## Sub-stages (in order)
10
+ ## Steps (in order)
11
11
 
12
12
  1. **Merge** — Get the PR merged safely
13
13
  2. **Monitor** — Watch for deployment issues
@@ -15,11 +15,11 @@ You are the **Release Engineer**. Get this PR merged and deployed safely.
15
15
 
16
16
  ## Execution
17
17
 
18
- For each sub-stage:
19
- 1. Read the sub-stage file (e.g., `.claude/skills/wk-deploy/stages/merge.md`)
18
+ For each step:
19
+ 1. Read the step file (e.g., `.claude/skills/wk-deploy/steps/merge.md`)
20
20
  2. Follow its instructions
21
21
  3. Update `.work-kit/state.md` with outputs
22
- 4. Proceed to next sub-stage
22
+ 4. Proceed to next step
23
23
 
24
24
  ## Key Principle
25
25
 
@@ -63,7 +63,7 @@ This phase runs as a **fresh agent**. Read only these sections from `.work-kit/s
63
63
 
64
64
  ## Final Output
65
65
 
66
- After all sub-stages are done, append a `### Deploy: Final` section to state.md. This is what **Wrap-up reads**.
66
+ After all steps are done, append a `### Deploy: Final` section to state.md. This is what **Wrap-up reads**.
67
67
 
68
68
  ```markdown
69
69
  ### Deploy: Final
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Deploy sub-stage: Get the PR merged safely."
2
+ description: "Deploy step: Get the PR merged safely."
3
3
  ---
4
4
 
5
5
  # Merge
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Deploy sub-stage: Monitor deployment after merge."
2
+ description: "Deploy step: Monitor deployment after merge."
3
3
  ---
4
4
 
5
5
  # Monitor
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Deploy sub-stage: Handle deployment outcome — confirm success or manage failure."
2
+ description: "Deploy step: Handle deployment outcome — confirm success or manage failure."
3
3
  ---
4
4
 
5
5
  # Remediate
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: plan
3
- description: "Run the Plan phase — 8 sub-stages from Clarify to Audit."
3
+ description: "Run the Plan phase — 8 steps from Clarify to Audit."
4
4
  user-invocable: false
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  ---
7
7
 
8
- You are the **Planning Lead**. Work through 8 focused sub-stages to produce a complete, executable Blueprint.
8
+ You are the **Planning Lead**. Work through 8 focused steps to produce a complete, executable Blueprint.
9
9
 
10
- ## Sub-stages (in order)
10
+ ## Steps (in order)
11
11
 
12
12
  1. **Clarify** — Understand the request, define acceptance criteria, clarify requirements
13
13
  2. **Investigate** — Read codebase, trace paths, map blast radius
@@ -20,20 +20,20 @@ You are the **Planning Lead**. Work through 8 focused sub-stages to produce a co
20
20
 
21
21
  ## Execution
22
22
 
23
- For each sub-stage:
24
- 1. Read the sub-stage file (e.g., `.claude/skills/wk-plan/stages/clarify.md`)
23
+ For each step:
24
+ 1. Read the step file (e.g., `.claude/skills/wk-plan/steps/clarify.md`)
25
25
  2. Follow its instructions completely
26
- 3. Write outputs to `.work-kit/state.md` under a section for that sub-stage
27
- 4. Update `**Phase:** plan` and `**Sub-stage:** <current>` in state.md
28
- 5. Proceed to the next sub-stage
26
+ 3. Write outputs to `.work-kit/state.md` under a section for that step
27
+ 4. Update `**Phase:** plan` and `**Step:** <current>` in state.md
28
+ 5. Proceed to the next step
29
29
 
30
30
  ## Continuity
31
31
 
32
- Maintain context across all sub-stages — each builds on the previous. Reference prior outputs explicitly. Don't re-discover what you already found.
32
+ Maintain context across all steps — each builds on the previous. Reference prior outputs explicitly. Don't re-discover what you already found.
33
33
 
34
34
  ## Recording
35
35
 
36
- Throughout every sub-stage, capture two things in the shared state.md sections:
36
+ Throughout every step, capture two things in the shared state.md sections:
37
37
 
38
38
  - **`## Decisions`** — Whenever you choose between real alternatives, append: `**<context>**: chose <X> over <Y> — <why>`. Skip obvious choices.
39
39
 
@@ -49,7 +49,7 @@ If **Audit** returns "revise":
49
49
 
50
50
  ## Final Output
51
51
 
52
- After all sub-stages are done, append a `### Plan: Final` section to state.md. This is the **only section the Build agent reads** — it must be self-contained.
52
+ After all steps are done, append a `### Plan: Final` section to state.md. This is the **only section the Build agent reads** — it must be self-contained.
53
53
 
54
54
  ```markdown
55
55
  ### Plan: Final
@@ -57,10 +57,10 @@ After all sub-stages are done, append a `### Plan: Final` section to state.md. T
57
57
  **Verdict:** ready | revised_with_caveats
58
58
 
59
59
  **Blueprint:**
60
- <the full ordered implementation plan from Blueprint sub-stage — copy it here>
60
+ <the full ordered implementation plan from Blueprint step — copy it here>
61
61
 
62
62
  **Architecture:**
63
- <data model, API surface, components, service layer — from Architecture sub-stage>
63
+ <data model, API surface, components, service layer — from Architecture step>
64
64
 
65
65
  **Criteria:**
66
66
  <reference to ## Criteria section>
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plan sub-stage: Define technical design — data model, API surface, component structure."
2
+ description: "Plan step: Define technical design — data model, API surface, component structure."
3
3
  ---
4
4
 
5
5
  # Architecture
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plan sub-stage: Audit the Blueprint for gaps, contradictions, and coverage."
2
+ description: "Plan step: Audit the Blueprint for gaps, contradictions, and coverage."
3
3
  ---
4
4
 
5
5
  # Audit
@@ -9,7 +9,7 @@ description: "Plan sub-stage: Audit the Blueprint for gaps, contradictions, and
9
9
 
10
10
  ## Instructions
11
11
 
12
- 1. Re-read ALL prior sub-stage outputs (Clarify through Blueprint)
12
+ 1. Re-read ALL prior step outputs (Clarify through Blueprint)
13
13
  2. Check for:
14
14
  - **Gaps:** Steps missing that are needed to satisfy criteria
15
15
  - **Contradictions:** Blueprint says X but Architecture says Y
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plan sub-stage: Produce a full ordered step-by-step implementation plan."
2
+ description: "Plan step: Produce a full ordered step-by-step implementation plan."
3
3
  ---
4
4
 
5
5
  # Blueprint
@@ -9,7 +9,7 @@ description: "Plan sub-stage: Produce a full ordered step-by-step implementation
9
9
 
10
10
  ## Instructions
11
11
 
12
- 1. Synthesize ALL prior sub-stage outputs (Clarify → Architecture) into one executable plan
12
+ 1. Synthesize ALL prior step outputs (Clarify → Architecture) into one executable plan
13
13
  2. Order steps by dependency — what must be done first
14
14
  3. Each step must specify:
15
15
  - What to do (create file, modify function, run command)
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plan sub-stage: Understand the request, define acceptance criteria, and clarify requirements."
2
+ description: "Plan step: Understand the request, define acceptance criteria, and clarify requirements."
3
3
  ---
4
4
 
5
5
  # Clarify
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plan sub-stage: Read codebase systematically, trace paths, map blast radius."
2
+ description: "Plan step: Read codebase systematically, trace paths, map blast radius."
3
3
  ---
4
4
 
5
5
  # Investigate
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plan sub-stage: Define in/out scope, estimate complexity, refine criteria."
2
+ description: "Plan step: Define in/out scope, estimate complexity, refine criteria."
3
3
  ---
4
4
 
5
5
  # Scope
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plan sub-stage: Produce a rough directional plan based on investigation findings."
2
+ description: "Plan step: Produce a rough directional plan based on investigation findings."
3
3
  ---
4
4
 
5
5
  # Sketch
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plan sub-stage: Define user-facing flows, screens, interactions, edge cases."
2
+ description: "Plan step: Define user-facing flows, screens, interactions, edge cases."
3
3
  ---
4
4
 
5
5
  # UX Flow