Implementing Slices
Consume docs/plans/<id>/, implement one vertical slice at a time, and commit each atomically when its tests pass.
Dispatch modes
Initial dispatch (after the test-architect's failing tests are confirmed)
Read 8-plan.md (steps/tests), 7-structure.md (order/checkpoints), immutable failing acceptance tests, and 4-repos.md when present. In multi-repo mode, use each slug, absolute path, and ## Worktrees path; execute every [repo: <slug>] step and prefixed test inside that worktree. Run the suite once in every involved worktree to confirm the failing baseline.
Review-fix dispatch (after a hard-gate failure)
The orchestrator supplies a typed failure class and reviewer findings. Fix every named item:
- Security: fix the vulnerability directly—parameterize queries, remove secrets, add auth, escape output; never weaken the fix.
- Tests: change code, never the immutable tests. Code review: fix every
issue:. Lint/format/typecheck/build: rerun until passing; use --fix first where available.
- For a non-obvious failure whose first fix is a guess, call the Skill tool with
systematic-debugging and complete Root Cause Analysis (5 Whys) (principle-fix-root-causes). Skip it for an obvious typo, named assertion, or one-line correction.
Then run the full suite, resolve every failure type from the round, and report each fix. The orchestrator re-dispatches ALL 5 reviewers.
Slice-by-slice execution
- Follow plan order.
[sequential] steps depend on prior steps; [parallel] steps may reorder. Switch repo worktrees for [repo: <slug>] steps and <repo>: tests.
- A slice finishes only when its acceptance tests and all prior-slice tests pass.
- Call the Skill tool with
git-commit: Conventional Commits, 50/72, one logical change. Single repo: one commit using the slice Commit: subject and citing design/structure paths. Multi-repo slice: one commit per named repo using its Commit: subject; each body cites the same paths and says part of slice <N>: <name>.
- Report
{slice: <name>, testsPassing: [list], commits: [{repo: <slug>, sha: <sha>}, ...]}; single-repo has one commit entry. After all slices, return paths, slice list, and final test status.
TDD and scope invariants
- Write only minimal code exercised by the current slice's tests. Do not preempt later slices; do not optimize/refactor before green. Stop if code has no test.
- Apply
principle-subtract-before-you-add: remove what the slice replaces before adding its replacement, and add no guard its tests do not exercise.
- Apply
principle-scope-fence: the plan authorizes exactly its named changes. Do NOT change acceptance tests or invent files/directories absent from the plan. Record concerns but satisfy tests as written.
Blockers
- Record what is blocked, why, and the required unblocker.
- Continue only with dependency-safe unblocked slices.
- Revisit blocked slices after unblocked work completes.
1---2name: implementing-slices3description: Defines test-first slice execution, commits, and review fixes. Load when an implementer executes `8-plan.md`.4---56# Implementing Slices78Consume `docs/plans/<id>/`, implement one vertical slice at a time, and commit each atomically when its tests pass.910## Dispatch modes1112### Initial dispatch (after the test-architect's failing tests are confirmed)1314Read `8-plan.md` (steps/tests), `7-structure.md` (order/checkpoints), immutable failing acceptance tests, and `4-repos.md` when present. In multi-repo mode, use each slug, absolute path, and `## Worktrees` path; execute every `[repo: <slug>]` step and prefixed test inside that worktree. Run the suite once in every involved worktree to confirm the failing baseline.1516### Review-fix dispatch (after a hard-gate failure)1718The orchestrator supplies a typed failure class and reviewer findings. Fix every named item:1920- Security: fix the vulnerability directly—parameterize queries, remove secrets, add auth, escape output; never weaken the fix.21- Tests: change code, never the immutable tests. Code review: fix every `issue:`. Lint/format/typecheck/build: rerun until passing; use `--fix` first where available.22- For a non-obvious failure whose first fix is a guess, call the Skill tool with `systematic-debugging` and complete **Root Cause Analysis (5 Whys)** (`principle-fix-root-causes`). Skip it for an obvious typo, named assertion, or one-line correction.2324Then run the full suite, resolve every failure type from the round, and report each fix. The orchestrator re-dispatches ALL 5 reviewers.2526## Slice-by-slice execution2728- Follow plan order. `[sequential]` steps depend on prior steps; `[parallel]` steps may reorder. Switch repo worktrees for `[repo: <slug>]` steps and `<repo>:` tests.29- A slice finishes only when its acceptance tests and all prior-slice tests pass.30- Call the Skill tool with `git-commit`: Conventional Commits, 50/72, one logical change. Single repo: one commit using the slice `Commit:` subject and citing design/structure paths. Multi-repo slice: one commit per named repo using its `Commit:` subject; each body cites the same paths and says `part of slice <N>: <name>`.31- Report `{slice: <name>, testsPassing: [list], commits: [{repo: <slug>, sha: <sha>}, ...]}`; single-repo has one commit entry. After all slices, return paths, slice list, and final test status.3233## TDD and scope invariants3435- Write only minimal code exercised by the current slice's tests. Do not preempt later slices; do not optimize/refactor before green. Stop if code has no test.36- Apply `principle-subtract-before-you-add`: remove what the slice replaces before adding its replacement, and add no guard its tests do not exercise.37- Apply `principle-scope-fence`: the plan authorizes exactly its named changes. Do NOT change acceptance tests or invent files/directories absent from the plan. Record concerns but satisfy tests as written.3839## Blockers40411. Record what is blocked, why, and the required unblocker.422. Continue only with dependency-safe unblocked slices.433. Revisit blocked slices after unblocked work completes.