/implement: Implementation + green loop (TDD step 5)
SkillDev toolsStep 5 of the Weft TDD workflow. Use after /unit-test's red phase: replaces the declare mocks with real code in-place, enforces signature parity with the mock surface, and loops vp check --fix → vp run check → vp run test until green. Finishes with graphify update.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the /implement: Implementation + green loop (TDD step 5) skill
What this skill tells your AI
The instructions your AI receives, as published by stefvw93/weft in .claude/skills/implement/SKILL.md and read by ahel’s review.
Replace the declare mocks with real code, keeping the surface identical, until all checks and tests are green.
When to run
- Previous step:
/unit-test(tests exist and a red run is recorded). - Next step:
/e2e. - Gate (exit):
vp run checkandvp run testboth green, signature parity confirmed,graphify update .run.
Procedure
-
Replace mocks in-place. In the feature's source file, replace each
declarestatement with its real implementation. Same file, same exports, same signatures. Keep the JSDoc written in/mock(update prose only if behavior details demand it). -
Implementation standards: Effect patterns throughout, tagged errors (the union declared in
/mock), Services/Layers for shared capabilities, Schema at unknown/I-O boundaries,pipe(effect, ...)preferred,Optionfor optionality,readonlydata, explicit type guards.Effect.genvspipeby readability. No JSX-style patterns. -
Signature-parity pass (explicit, not assumed). Diff the implemented exports against the mock surface committed in step 2:
- No export added, removed, or renamed.
- No signature changed (parameters, return types, generics, error union).
Typecheck alone does not catch additions or loosened types. Do this pass deliberately. Any deviation triggers the pause rule: stop implementing, return to
/specand/mockto update spec + surface (and/type-tests+/unit-testif affected), then resume here. -
Green loop. Repeat until both are clean:
vp check --fix: auto-fix formatting/lint (safe here: packages just packed by the run tasks).vp run check: pack, then format/lint/typecheck. Must be green.vp run test: pack, then run all node/jsdom tests. Every test from the red phase must now pass; no other test may regress.
Never use bare
vp check/vp testas validation. They skippackand report false cross-package errors (the pack rule). -
Update the knowledge graph: run
graphify update .(AST-only, no API cost). -
Hand off. Next step is
/e2e.
Rules
- Implementation must match mock signatures exactly and behavior must match
specs.md. - If implementation reveals mocks/specs need changes, apply the pause rule: update specs and mocks first, never drift silently.
- Fix the implementation to satisfy the tests; changing a test is only legitimate when the pause rule has first changed the spec it encodes.
Signals
- GitHub stars
- 44
- Forks
- 1
- Last commit
- Sep 2026
- Hacker News mentions
- 20
Advanced
- Catalog kind
- skill
- Gateway key
implement-stefvw93- Source
- github.com/stefvw93/weft