| name | 03-work |
| description | Execute plan units with TDD enforcement and checkpoint resume. Use when a plan path is ready for implementation. |
Work
Use this skill when there is a plan path or tightly scoped bare prompt ready for execution.
See shared pipeline instructions for model routing and pipeline behavior.
Core rules
- Load project rules (4 steps):
- Load
rules/common/development-workflow.md and rules/common/testing.md
- Detect project language via language detection
- Load matching language-specific rules
- If frontend/browser concerns, also load
rules/web/ files
- Priority: project-level
{repo-root}/rules/ overrides package defaults
- Distinguish input: plan path vs bare prompt
- Derive tasks from plan implementation units
- Execution mode: inline mode — all plan units execute inline in the current session. No built-in subagent tools.
- Use
session_checkpoint to track progress and enable resume
- Use
task_splitter to analyze dependencies before execution
- If in worktree (via
07-worktree), execute inside it
- End by recommending
04-review
- When designing/restructuring modules, use the deep-module vocabulary (
../references/module-design.md) — evaluate depth and seam placement.
Advanced: If you need external child agent delegation (background runs, parallel audits), install pi-subagents separately. Super Pi does not require it.
Hard gates — TDD enforcement
Every step follows RED → GREEN → REFACTOR:
Blocking violations — stop and ask if:
- Code written before RED test
- RED fails for wrong reason
- Missing evidence test failed before implementation
- Missing evidence test passed after implementation
- Tests added only after code
Stop-the-line rule (Hard gate)
When any unexpected failure occurs during execution:
- STOP adding features or making changes
- PRESERVE evidence (error output, repro steps)
- DIAGNOSE root cause — follow debug discipline (
references/debug-discipline.md): build feedback loop first, then reproduce → hypothesise → instrument → fix
- FIX the root cause, not the symptom
- GUARD with a regression test
- RESUME only after verification passes
Anti-rationalization — when a gate fails or evidence is missing:
- Do not rationalize, downgrade, or explain away the failure.
- Stop, report the blocker with evidence, and either fix the root cause or ask for direction.
- Do not continue unrelated implementation after failed verification.
This is a hard gate — do not push past a failing test or broken build to continue implementation. Errors compound.
Error compaction after recovery
After a stop-the-line failure is diagnosed, fixed, and verified:
- Replace full traces in handoff/context with
ERROR(resolved): <root cause>
- Keep only the final repro, root cause, fix summary, and verification result
- Remove intermediate debug output and failed exploratory runs that are no longer relevant
- Update
session_checkpoint with the compacted state only
If the same tool, command, or implementation unit fails 3 consecutive times, stop retrying and ask the user for direction with a concise evidence summary.
Workflow
- Load context: consume latest handoff before any broad file reads —
context_handoff load or read .context/compound-engineering/handoffs/latest.md. If found, use activeFiles, blocker, verification, activeRules as starting point. If not found, proceed normally. Read CONTEXT.md if it exists at root — see ../references/domain-language.md.
- Detect input type (plan path vs bare prompt)
- Read implementation units if plan path
- Load
session_checkpoint to skip completed units
- Use
task_splitter for dependency analysis
- Execute: inline mode — all units run in the current session
- Follow TDD per unit: RED → minimal code → GREEN → refactor → unit-level verification
- Source-driven gate: Before implementing framework/library-specific code, verify the API or pattern against official documentation. Flag unverified patterns as UNVERIFIED in output.
- Record progress via
references/progress-update-format.md
- Save
session_checkpoint after each unit
- On failure:
session_checkpoint fail → retry → follow strategy
- Provide completion report (see
references/completion-report.md)
- Save handoff:
context_handoff save with current stage, next stage, activeFiles, blocker, verification, activeRules
- Handoff to
04-review using references/handoff.md
Before finishing this skill, apply the completion checklist in shared pipeline instructions.