skills/implement/SKILL.md
Atomic TDD build skill. Takes a context packet (shaped ticket) and produces code + tests on a feature branch. Red → Green → Refactor. Does not shape, review, QA, or ship — single concern: spec to green tests. Use when: "implement this spec", "build this", "TDD this", "code this up", "write the code for this ticket", after /shape has produced a context packet. Trigger: /implement, /build (alias).
npx skillsauth add phrazzld/spellbook implementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Spec in, green tests out. One packet, one feature branch, one concern.
delegate on judgment per the shared Roster contract: native subagents
by default; add cross-model critics, roster providers, or sprite lanes
(/sprites) only when they answer a distinct question. See
harnesses/shared/AGENTS.md (Roster).
Local lane guidance: Use one bounded builder lane and one adversarial validator/refactor lane; give them the context packet, oracle, boundaries, repo anchors, and what would embarrass us if green tests missed it.
Completion evidence core applies: use harnesses/shared/AGENTS.md
(Completion Evidence) as the universal evidence shape, then fill the local
fields required by the implementation final message.
Input. A context packet: goal, non-goals, constraints, repo anchors, oracle (executable preferred), implementation sequence. Resolution order:
/implement backlog.d/033-foo.md)/implement 033) → resolves via backlog.d/<id>-*.md/shape output in the current sessionRequired packet fields (hard gate — missing any = stop):
goal (one sentence, testable outcome with a well-defined exit condition)oracle (how we know it's done, ideally executable commands)implementation sequence (ordered steps, or explicit "single chunk")If the packet contains Formal Spec Required: yes, also require a Formal Spec block with: informal spec, formal examples, acceptance oracle, hardening
budget, and waiver path. Missing or vague formal-spec fields are packet
incompleteness, not builder judgment.
See references/context-packet.md for the full shape.
Output.
<type>/<slug> from current branch)Stops at: green tests + clean tree. Does not run /code-review,
/qa, /ci, or open a PR.
Resolve the packet (order above). Parse required fields. If any are missing or vague ("add feature X" with no oracle), stop with:
Packet incomplete: missing <field>. Run /shape first.
Do not try to fill in the gaps. Shape is a different skill's judgment.
git checkout -b <type>/<slug> from the current branch. Builders never
commit to master/main. If you forget, create the branch after and
cherry-pick before handing off.
Spawn roster-backed builder lanes with:
Builder prompt must include:
You MUST write a failing test before production code. RED → GREEN → REFACTOR → COMMIT. Exceptions: config files, generated code, UI layout. Document any skipped-TDD step inline in the commit message.
For packets with Formal Spec Required: yes, the first red test must be an
acceptance test derived from the formal examples and acceptance oracle. Unit
tests come after the failing acceptance check exists; production code comes
after both acceptance and unit intent are executable. Waive this only through
the packet's named waiver path and record the waiver in the Completion Gate.
See references/tdd-loop.md for the full cycle and skip rules.
Milestone critic gate. After each chunk's builder returns, dispatch a fresh
read-only critic that sees ONLY the chunk diff + the packet oracle + the todo —
never the builder's reasoning. It returns blocking gaps (oracle clause unmet,
behavior lost, invariant violated). Do not advance to the next chunk until the
critic returns no blocking gap, or the gap is explicitly waived in the
Completion Gate. Skip for trivial diffs (<20 LOC, single file). This enforces
the milestone gate defined in harnesses/shared/AGENTS.md (Layer 2 — Dispatch).
Before exiting, confirm:
git status clean (no untracked debug files)TODO/FIXME/console.log added that isn't in the spec/hardening property, or the handoff names why example tests are enoughIf any check fails, dispatch a builder sub-agent to fix. Max 2 fix loops, then escalate.
Output: feature branch name, commit list, oracle checklist (which commands pass), Completion Gate, residual risks. Do not run review, do not merge, do not push unless the packet explicitly says so.
## Completion Gate
- Exact end-user behavior changed: behavior or internal operator behavior implemented.
- Evidence that proves it: failing-then-passing test, oracle command, or artifact proving the behavior.
- Exact command/path/route exercised: command, URL, route, file path, or tool call actually run.
- Repo-fit check: live repo pattern, contract, or boundary the implementation follows.
- Observability / instrumentation debt: named signal added, existing signal used, or debt recorded.
- Residual risk: unverified path, deferred edge case, or none with reason.
Completion evidence core applies: behavior changed or verified, live evidence,
exact command/path/route, repo-fit check, and residual risk. See
harnesses/shared/AGENTS.md (Completion Evidence).
Local fields include observability / instrumentation debt when the changed behavior has no named signal.
For internal-only changes, replace "end-user" with the developer/operator behavior the implementation changes.
/refactor's job, not yours./deliver / /flywheel)/shape)/code-review)/qa)/ci)/refactor)/deliver --polish-only → /ship)Stop with a loud report if:
Not stopping conditions: spec is hard, unfamiliar codebase, initial tests red. Those are the job.
console.log, print("here"), commented-out
code. The tree must be clean before exit.git checkout -b first.Run cargo run --locked -p harness-kit-checks -- check-evidence-blocks skills
to prove /implement keeps the shared Completion Evidence contract. Semantic proof is per packet:
the named red-to-green test, oracle command, or artifact must pass in the
target repo.
testing
Capture one compounding repo-technical learning while a solved problem is still fresh. Use when: after a bug fix, diagnosis, delivery, review, or incident reveals a reusable pattern worth adding to `docs/solutions/`. Trigger: /compound, /capture-learning, /learning.
testing
Route Misty Step factory application capabilities. Use when choosing, auditing, integrating, or operating Canary, Powder, Landmark, Aesthetic, or Bitterblossom: production observability, incidents, health checks, error logging, backlog/work-card state, release intelligence, UI/UX system adoption, or supervised/unsupervised agent dispatch. Trigger: /factory-apps, /factory-stack.
testing
Prove a skill beats no-skill with a falsifiable A/B eval, or retire it. Design, generate, run, and maintain a skill-specific eval: name the one claim the skill must earn, run it skill-on vs raw same-model, grade blind with objective checks first, return a keep/adapt/cut verdict. Use when: "eval this skill", "does this skill help", "prove the skill beats no skill", "write an eval for", "benchmark a skill", "is this skill worth it", "skill A/B", "skill regression test", "generate skill evals". Trigger: /skill-eval, /eval-skill, /prove-skill.
tools
> Template. Copy to `<target-repo>/.agents/skills/<repo>-<domain>/SKILL.md` > and fill every bracketed placeholder from the live target repo. Delete this > line and every other `> ` guidance line before committing. See > `../../references/repo-local-skill-generation.md` for the full process. --- name: <repo>-<domain> description: | [One paragraph: what this skill verifies/runs/operates for <repo>, stated in terms of the repo's real shape (service/CLI/library/etc.), not generic process. En