work-kit-cli 0.2.8 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -13
- package/cli/src/commands/bootstrap.test.ts +40 -0
- package/cli/src/commands/bootstrap.ts +77 -13
- package/cli/src/commands/cancel.ts +1 -16
- package/cli/src/commands/complete.ts +92 -98
- package/cli/src/commands/completions.ts +2 -2
- package/cli/src/commands/doctor.ts +1 -1
- package/cli/src/commands/extract.ts +217 -0
- package/cli/src/commands/init.test.ts +50 -0
- package/cli/src/commands/init.ts +70 -35
- package/cli/src/commands/learn.test.ts +217 -0
- package/cli/src/commands/learn.ts +104 -0
- package/cli/src/commands/loopback.ts +8 -11
- package/cli/src/commands/next.ts +93 -60
- package/cli/src/commands/observe.ts +16 -21
- package/cli/src/commands/pause-resume.test.ts +142 -0
- package/cli/src/commands/pause.ts +34 -0
- package/cli/src/commands/report.ts +217 -0
- package/cli/src/commands/resume.ts +126 -0
- package/cli/src/commands/setup.ts +280 -0
- package/cli/src/commands/status.ts +8 -6
- package/cli/src/commands/uninstall.ts +8 -3
- package/cli/src/commands/workflow.ts +43 -33
- package/cli/src/config/agent-map.ts +9 -9
- package/cli/src/config/constants.ts +54 -0
- package/cli/src/config/loopback-routes.ts +13 -13
- package/cli/src/config/model-routing.test.ts +190 -0
- package/cli/src/config/model-routing.ts +208 -0
- package/cli/src/config/project-config.test.ts +127 -0
- package/cli/src/config/project-config.ts +106 -0
- package/cli/src/config/{phases.ts → workflow.ts} +40 -23
- package/cli/src/context/prompt-builder.ts +10 -9
- package/cli/src/index.ts +130 -9
- package/cli/src/observer/data.ts +196 -65
- package/cli/src/observer/renderer.ts +127 -107
- package/cli/src/observer/watcher.ts +28 -16
- package/cli/src/state/helpers.test.ts +28 -28
- package/cli/src/state/helpers.ts +37 -25
- package/cli/src/state/schema.ts +135 -45
- package/cli/src/state/store.ts +127 -7
- package/cli/src/state/validators.test.ts +13 -13
- package/cli/src/state/validators.ts +3 -4
- package/cli/src/utils/colors.ts +2 -0
- package/cli/src/utils/fs.ts +13 -0
- package/cli/src/utils/json.ts +20 -0
- package/cli/src/utils/knowledge.ts +471 -0
- package/cli/src/utils/time.ts +27 -0
- package/cli/src/{engine → workflow}/loopbacks.test.ts +2 -2
- package/cli/src/workflow/loopbacks.ts +42 -0
- package/cli/src/workflow/parallel.ts +64 -0
- package/cli/src/workflow/transitions.test.ts +129 -0
- package/cli/src/{engine → workflow}/transitions.ts +18 -22
- package/package.json +2 -2
- package/skills/auto-kit/SKILL.md +44 -27
- package/skills/cancel-kit/SKILL.md +4 -4
- package/skills/full-kit/SKILL.md +45 -28
- package/skills/pause-kit/SKILL.md +25 -0
- package/skills/resume-kit/SKILL.md +64 -0
- package/skills/wk-bootstrap/SKILL.md +11 -5
- package/skills/wk-build/SKILL.md +12 -11
- package/skills/wk-build/{stages → steps}/commit.md +1 -1
- package/skills/wk-build/{stages → steps}/core.md +3 -3
- package/skills/wk-build/{stages → steps}/integration.md +2 -2
- package/skills/wk-build/{stages → steps}/migration.md +1 -1
- package/skills/wk-build/{stages → steps}/red.md +1 -1
- package/skills/wk-build/{stages → steps}/refactor.md +1 -1
- package/skills/wk-build/{stages → steps}/setup.md +1 -1
- package/skills/wk-build/{stages → steps}/ui.md +1 -1
- package/skills/wk-deploy/SKILL.md +7 -6
- package/skills/wk-deploy/{stages → steps}/merge.md +1 -1
- package/skills/wk-deploy/{stages → steps}/monitor.md +1 -1
- package/skills/wk-deploy/{stages → steps}/remediate.md +1 -1
- package/skills/wk-plan/SKILL.md +15 -14
- package/skills/wk-plan/{stages → steps}/architecture.md +1 -1
- package/skills/wk-plan/{stages → steps}/audit.md +2 -2
- package/skills/wk-plan/{stages → steps}/blueprint.md +2 -2
- package/skills/wk-plan/{stages → steps}/clarify.md +1 -1
- package/skills/wk-plan/{stages → steps}/investigate.md +1 -1
- package/skills/wk-plan/{stages → steps}/scope.md +1 -1
- package/skills/wk-plan/{stages → steps}/sketch.md +1 -1
- package/skills/wk-plan/{stages → steps}/ux-flow.md +1 -1
- package/skills/wk-review/SKILL.md +11 -10
- package/skills/wk-review/{stages → steps}/compliance.md +1 -1
- package/skills/wk-review/{stages → steps}/handoff.md +2 -2
- package/skills/wk-review/{stages → steps}/performance.md +1 -1
- package/skills/wk-review/{stages → steps}/security.md +1 -1
- package/skills/wk-review/{stages → steps}/self-review.md +1 -1
- package/skills/wk-test/SKILL.md +9 -8
- package/skills/wk-test/steps/e2e.md +56 -0
- package/skills/wk-test/{stages → steps}/validate.md +1 -1
- package/skills/wk-test/{stages → steps}/verify.md +1 -1
- package/skills/wk-wrap-up/SKILL.md +19 -5
- package/skills/wk-wrap-up/steps/knowledge.md +76 -0
- package/skills/wk-wrap-up/steps/summary.md +86 -0
- package/cli/src/engine/loopbacks.ts +0 -32
- package/cli/src/engine/parallel.ts +0 -60
- package/cli/src/engine/transitions.test.ts +0 -129
- package/skills/wk-test/stages/e2e.md +0 -53
- /package/cli/src/{engine/phases.ts → workflow/gates.ts} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resume-kit
|
|
3
|
+
description: "Resume a paused or abandoned 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 work-kit session. The user typically runs Claude Code from the **main repo root**, not from inside a worktree, so you must discover resumable sessions across all worktrees of the current repo and let the user pick one. Both `paused` and `in-progress` sessions are listed, since a crashed terminal leaves state as `in-progress`.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. From the main repo root, run:
|
|
13
|
+
```bash
|
|
14
|
+
work-kit resume
|
|
15
|
+
```
|
|
16
|
+
This scans every worktree of the current git repo for `.work-kit/tracker.json` files in `paused` or `in-progress` state and returns one of:
|
|
17
|
+
|
|
18
|
+
- `action: "error"` — no resumable sessions in this repo. Tell the user and stop.
|
|
19
|
+
- `action: "select_session"` — one or more sessions found. The `sessions` array is sorted by most-recently-updated first and contains entries like:
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"slug": "item-count-badge",
|
|
23
|
+
"branch": "feat/item-count-badge",
|
|
24
|
+
"worktreeRoot": "/abs/path/to/worktree",
|
|
25
|
+
"status": "paused",
|
|
26
|
+
"pausedAt": "2026-04-06T18:42:11.000Z",
|
|
27
|
+
"currentPhase": "build",
|
|
28
|
+
"currentStep": "implement",
|
|
29
|
+
"lastUpdatedAgoMs": 7320000
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
- `action: "resumed"` — only happens if you passed `--worktree-root` directly (not the default flow).
|
|
33
|
+
|
|
34
|
+
2. **Show the list to the user.** Format it as a numbered list with: slug, status, current phase/step, **last updated time** (humanized from `lastUpdatedAgoMs`), and branch. The last-updated column is critical — it lets the user spot a session that was "closed by mistake" (high age + `in-progress` = likely a crashed terminal). Example:
|
|
35
|
+
```
|
|
36
|
+
Found 3 resumable sessions (most recent first):
|
|
37
|
+
1. fix-csv-export in-progress (test/e2e, updated 30s ago) ← still running elsewhere?
|
|
38
|
+
2. item-count-badge paused (build/implement, updated 2h ago) feat/item-count-badge
|
|
39
|
+
3. dark-mode-toggle in-progress (plan/clarify, updated 3d ago) ← likely abandoned
|
|
40
|
+
Which one do you want to resume? (number or slug)
|
|
41
|
+
```
|
|
42
|
+
When you see an `in-progress` session with a recent `lastUpdatedAgoMs` (< a few minutes), warn the user that another Claude instance may still be working on it. When you see one with a large age, hint that it was probably closed without pausing.
|
|
43
|
+
Wait for the user to reply.
|
|
44
|
+
|
|
45
|
+
3. Once the user picks one, resolve it to a slug and run:
|
|
46
|
+
```bash
|
|
47
|
+
work-kit resume --slug <slug>
|
|
48
|
+
```
|
|
49
|
+
The result will be `action: "resumed"` with `worktreeRoot`, `phase`, and `step` populated.
|
|
50
|
+
|
|
51
|
+
4. **`cd` into the returned `worktreeRoot`.** All subsequent commands must run from there, not from the main repo root.
|
|
52
|
+
|
|
53
|
+
5. Continue the orchestrator loop (same as `/full-kit` / `/auto-kit`):
|
|
54
|
+
```bash
|
|
55
|
+
work-kit next
|
|
56
|
+
```
|
|
57
|
+
Then follow the action returned (`spawn_agent`, `spawn_parallel_agents`, `wait_for_user`, etc.) using the Agent tool. Keep looping `work-kit next` until you hit `wait_for_user`, `complete`, or `error`.
|
|
58
|
+
|
|
59
|
+
## Notes
|
|
60
|
+
|
|
61
|
+
- `work-kit resume` (no args) is read-only — it just lists paused sessions, it doesn't flip any state. State changes only happen on `--slug`.
|
|
62
|
+
- `work-kit resume --slug <slug>` is idempotent: if the matched session is already in-progress, it returns `action: "resumed"` without re-writing the tracker.
|
|
63
|
+
- A paused session keeps all state — phases, steps, loopbacks, timing — exactly as they were.
|
|
64
|
+
- If the user invokes `/resume-kit <slug>` (passing a slug directly), skip the listing step and call `work-kit resume --slug <slug>` immediately.
|
|
@@ -7,13 +7,19 @@ allowed-tools: Bash, Read
|
|
|
7
7
|
|
|
8
8
|
# Session Bootstrap
|
|
9
9
|
|
|
10
|
-
Run `
|
|
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,
|
|
14
|
+
- Report current state to the user: slug, phase, step, status
|
|
15
|
+
- **If `knowledge` is present in the bootstrap output**, surface it to the agent and the user:
|
|
16
|
+
- `knowledge.lessons` — project-specific learnings from prior sessions
|
|
17
|
+
- `knowledge.conventions` — codified rules this project follows
|
|
18
|
+
- `knowledge.risks` — fragile or dangerous areas to handle with care
|
|
19
|
+
- Read each of these silently into your working context — they're prior knowledge you should respect when planning and building. Briefly mention to the user that prior knowledge was loaded (one line; do not dump the full text into the chat).
|
|
20
|
+
- `workflow.md` is intentionally NOT loaded — it's a write-only artifact for human curators.
|
|
15
21
|
- If recovery is suggested: follow the recovery instruction
|
|
16
|
-
- Otherwise: run `
|
|
22
|
+
- Otherwise: run `work-kit next` to continue the workflow
|
|
17
23
|
|
|
18
24
|
## If no active work
|
|
19
25
|
|
|
@@ -24,6 +30,6 @@ Run `npx work-kit-cli bootstrap` to detect work-kit state.
|
|
|
24
30
|
## If session is stale
|
|
25
31
|
|
|
26
32
|
- Report the staleness warning to the user
|
|
27
|
-
- Run `
|
|
28
|
-
- If the state is recoverable, run `
|
|
33
|
+
- Run `work-kit status` to get full diagnostics
|
|
34
|
+
- If the state is recoverable, run `work-kit next` to resume
|
|
29
35
|
- If the state is corrupted, suggest starting fresh
|
package/skills/wk-build/SKILL.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: build
|
|
3
|
-
description: "Run the Build phase — 8
|
|
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
|
-
##
|
|
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
|
|
24
|
-
1. Read the
|
|
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
|
|
28
|
+
5. Proceed to the next step
|
|
29
29
|
|
|
30
30
|
## Key Principle
|
|
31
31
|
|
|
@@ -33,18 +33,19 @@ For each sub-stage:
|
|
|
33
33
|
|
|
34
34
|
## Recording
|
|
35
35
|
|
|
36
|
-
Throughout every
|
|
36
|
+
Throughout every step, capture these 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.
|
|
40
|
+
- **`## Observations`** — Whenever you notice a project convention, a fragile area, a learning, or feedback about the work-kit workflow itself, append a typed bullet: `- [lesson|convention|risk|workflow] text` (workflow tag may include `:phase/step`). At `wrap-up/knowledge` these are routed to `.work-kit-knowledge/` so future sessions benefit.
|
|
40
41
|
|
|
41
|
-
These feed into the final work-kit log summary. If you don't record them here, they're lost.
|
|
42
|
+
These feed into the final work-kit log summary and the project knowledge files. If you don't record them here, they're lost.
|
|
42
43
|
|
|
43
44
|
## Boundaries
|
|
44
45
|
|
|
45
46
|
### Always
|
|
46
47
|
- Follow the Blueprint step order unless a dependency requires reordering
|
|
47
|
-
- Run the test suite after every
|
|
48
|
+
- Run the test suite after every step that changes code
|
|
48
49
|
- Record every deviation from the Blueprint in the ## Deviations section
|
|
49
50
|
- Match existing codebase patterns found during Plan/Investigate
|
|
50
51
|
- Commit .work-kit/ files separately from feature code
|
|
@@ -53,7 +54,7 @@ These feed into the final work-kit log summary. If you don't record them here, t
|
|
|
53
54
|
- Redesigning any part of the Blueprint (adapt minimally, don't redesign)
|
|
54
55
|
- Adding dependencies not specified in the Blueprint
|
|
55
56
|
- Changing the data model beyond what Architecture specified
|
|
56
|
-
- Skipping the Red (failing tests)
|
|
57
|
+
- Skipping the Red (failing tests) step
|
|
57
58
|
|
|
58
59
|
### Never
|
|
59
60
|
- Write implementation code before writing failing tests (Red comes before Core)
|
|
@@ -78,11 +79,11 @@ This phase runs as a **fresh agent**. Read only these sections from `.work-kit/s
|
|
|
78
79
|
- `## Criteria` — what "done" looks like
|
|
79
80
|
- `## Description` — original request for context
|
|
80
81
|
|
|
81
|
-
Do NOT read the Plan
|
|
82
|
+
Do NOT read the Plan step working notes (Clarify, Investigate, Sketch, etc.) — they're consumed by Plan: Final.
|
|
82
83
|
|
|
83
84
|
## Final Output
|
|
84
85
|
|
|
85
|
-
After all
|
|
86
|
+
After all steps are done, append a `### Build: Final` section to state.md. This is the **only section the Test agent reads**.
|
|
86
87
|
|
|
87
88
|
```markdown
|
|
88
89
|
### Build: Final
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Build
|
|
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
|
|
46
|
-
- Don't build UI yet — that's the UI
|
|
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
|
|
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
|
|
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,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deploy
|
|
3
|
-
description: "Run the Deploy phase (optional) — 3
|
|
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
|
-
##
|
|
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
|
|
19
|
-
1. Read the
|
|
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
|
|
22
|
+
4. Proceed to next step
|
|
23
23
|
|
|
24
24
|
## Key Principle
|
|
25
25
|
|
|
@@ -30,6 +30,7 @@ For each sub-stage:
|
|
|
30
30
|
Update the shared state.md sections:
|
|
31
31
|
|
|
32
32
|
- **`## Decisions`** — Record merge method choice, any rollback decisions.
|
|
33
|
+
- **`## Observations`** — Whenever you notice deploy fragility, a missing convention, or feedback about the deploy phase itself, append: `- [lesson|convention|risk|workflow] text` (workflow tag may include `:phase/step`). At `wrap-up/knowledge` these are routed to `.work-kit-knowledge/` so future sessions benefit.
|
|
33
34
|
|
|
34
35
|
## This phase is optional
|
|
35
36
|
|
|
@@ -63,7 +64,7 @@ This phase runs as a **fresh agent**. Read only these sections from `.work-kit/s
|
|
|
63
64
|
|
|
64
65
|
## Final Output
|
|
65
66
|
|
|
66
|
-
After all
|
|
67
|
+
After all steps are done, append a `### Deploy: Final` section to state.md. This is what **Wrap-up reads**.
|
|
67
68
|
|
|
68
69
|
```markdown
|
|
69
70
|
### Deploy: Final
|
package/skills/wk-plan/SKILL.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan
|
|
3
|
-
description: "Run the Plan phase — 8
|
|
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
|
|
8
|
+
You are the **Planning Lead**. Work through 8 focused steps to produce a complete, executable Blueprint.
|
|
9
9
|
|
|
10
|
-
##
|
|
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,24 +20,25 @@ 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
|
|
24
|
-
1. Read the
|
|
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
|
|
27
|
-
4. Update `**Phase:** plan` and `**
|
|
28
|
-
5. Proceed to the next
|
|
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
|
|
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
|
|
36
|
+
Throughout every step, capture these 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
|
+
- **`## Observations`** — Whenever you notice a project convention, a fragile area, a learning, or feedback about the work-kit workflow itself, append a typed bullet: `- [lesson|convention|risk|workflow] text` (workflow tag may include `:phase/step`). At `wrap-up/knowledge` these are routed to `.work-kit-knowledge/` so future sessions benefit.
|
|
39
40
|
|
|
40
|
-
These feed into the final work-kit log summary. If you don't record
|
|
41
|
+
These feed into the final work-kit log summary and the project knowledge files. If you don't record them here, they're lost.
|
|
41
42
|
|
|
42
43
|
## Loop-back
|
|
43
44
|
|
|
@@ -49,7 +50,7 @@ If **Audit** returns "revise":
|
|
|
49
50
|
|
|
50
51
|
## Final Output
|
|
51
52
|
|
|
52
|
-
After all
|
|
53
|
+
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
54
|
|
|
54
55
|
```markdown
|
|
55
56
|
### Plan: Final
|
|
@@ -57,10 +58,10 @@ After all sub-stages are done, append a `### Plan: Final` section to state.md. T
|
|
|
57
58
|
**Verdict:** ready | revised_with_caveats
|
|
58
59
|
|
|
59
60
|
**Blueprint:**
|
|
60
|
-
<the full ordered implementation plan from Blueprint
|
|
61
|
+
<the full ordered implementation plan from Blueprint step — copy it here>
|
|
61
62
|
|
|
62
63
|
**Architecture:**
|
|
63
|
-
<data model, API surface, components, service layer — from Architecture
|
|
64
|
+
<data model, API surface, components, service layer — from Architecture step>
|
|
64
65
|
|
|
65
66
|
**Criteria:**
|
|
66
67
|
<reference to ## Criteria section>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Plan
|
|
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
|
|
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
|
|
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
|
|
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,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review
|
|
3
|
-
description: "Run the Review phase — 5
|
|
3
|
+
description: "Run the Review phase — 5 steps: Self-Review, Security, Performance, Compliance, Handoff."
|
|
4
4
|
user-invocable: false
|
|
5
5
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Agent
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are the **Senior Reviewer**. Perform multi-dimensional code review before the feature ships.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Steps (in order)
|
|
11
11
|
|
|
12
12
|
1. **Self-Review** — Check your own diff for obvious issues
|
|
13
13
|
2. **Security** — OWASP top 10 security review
|
|
@@ -17,11 +17,11 @@ You are the **Senior Reviewer**. Perform multi-dimensional code review before th
|
|
|
17
17
|
|
|
18
18
|
## Execution
|
|
19
19
|
|
|
20
|
-
For each
|
|
21
|
-
1. Read the
|
|
20
|
+
For each step:
|
|
21
|
+
1. Read the step file (e.g., `.claude/skills/wk-review/steps/self-review.md`)
|
|
22
22
|
2. Follow its instructions — fix issues directly when possible
|
|
23
23
|
3. Update `.work-kit/state.md` with findings
|
|
24
|
-
4. Proceed to next
|
|
24
|
+
4. Proceed to next step
|
|
25
25
|
|
|
26
26
|
## Key Principle
|
|
27
27
|
|
|
@@ -29,10 +29,11 @@ For each sub-stage:
|
|
|
29
29
|
|
|
30
30
|
## Recording
|
|
31
31
|
|
|
32
|
-
Throughout every
|
|
32
|
+
Throughout every step, update the shared state.md sections:
|
|
33
33
|
|
|
34
34
|
- **`## Decisions`** — If you make judgment calls during review (e.g., "accepted this deviation because..."), record them.
|
|
35
|
-
- **`## Deviations`** — Compliance
|
|
35
|
+
- **`## Deviations`** — Compliance step will audit these. If you fix a deviation during review, note that it was resolved.
|
|
36
|
+
- **`## Observations`** — Whenever you spot a fragile area, a missing convention, or feedback about the review phase itself, append: `- [lesson|convention|risk|workflow] text` (workflow tag may include `:phase/step`). At `wrap-up/knowledge` these are routed to `.work-kit-knowledge/` so future sessions benefit.
|
|
36
37
|
|
|
37
38
|
Review findings feed directly into the Handoff decision and the final work-kit log.
|
|
38
39
|
|
|
@@ -58,9 +59,9 @@ Agent: Compliance ──┘
|
|
|
58
59
|
Each sub-agent receives:
|
|
59
60
|
- The git diff (`git diff main...HEAD`)
|
|
60
61
|
- The relevant Context Input sections
|
|
61
|
-
- Its
|
|
62
|
+
- Its step skill file instructions
|
|
62
63
|
|
|
63
|
-
Each writes its own `### Review: <
|
|
64
|
+
Each writes its own `### Review: <step>` section to state.md.
|
|
64
65
|
|
|
65
66
|
**Handoff agent** reads all 4 review sections + Test: Final → makes the ship decision.
|
|
66
67
|
|
|
@@ -83,7 +84,7 @@ Each writes its own `### Review: <sub-stage>` section to state.md.
|
|
|
83
84
|
- Approve without checking acceptance criteria status
|
|
84
85
|
- Rubber-stamp without reading the diff ("looks good" is not a review)
|
|
85
86
|
- Make changes_requested without specifying exactly what needs to change
|
|
86
|
-
- Skip any of the 4 parallel review
|
|
87
|
+
- Skip any of the 4 parallel review steps
|
|
87
88
|
|
|
88
89
|
## Final Output
|
|
89
90
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Review
|
|
2
|
+
description: "Review step: Finalize PR, make ship/no-ship decision."
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Handoff
|
|
@@ -14,7 +14,7 @@ description: "Review sub-stage: Finalize PR, make ship/no-ship decision."
|
|
|
14
14
|
- How to test it
|
|
15
15
|
- Screenshots if applicable
|
|
16
16
|
- Any concerns or known limitations
|
|
17
|
-
2. Review all findings from prior review
|
|
17
|
+
2. Review all findings from prior review steps
|
|
18
18
|
3. Check acceptance criteria status from Test/Validate
|
|
19
19
|
4. Make the decision: **approved**, **changes_requested**, or **rejected**
|
|
20
20
|
|