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 before writing any code: detect language via repo markers (map in Workflow step 2), then load
rules/common/development-workflow.md,rules/common/testing.md, matchingrules/{lang}/files, plusrules/web/for frontend/browser concerns. Emit aRules loaded:manifest — no manifest, no implementation - 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_checkpointto track progress and enable resume; before executing a plan, flip its Status header toexecuting - Use
task_splitterto analyze dependencies before execution - End by chaining into
04-review(see Workflow step 15) — no user prompt between stages - When designing/restructuring modules, use the deep-module vocabulary (
../references/module-design.md) — evaluate depth and seam placement. - Continuous execution: do not pause between units for confirmation. Progress goes to
session_checkpoint; report once at completion. Four — and only four — valves may stop and ask: (1) stop-the-line failure that cannot self-heal, (2) 3-failure cap on the same unit, (3) destructive or irreversible operations (delete, overwrite, force-push, or anything without an undo path), (4) spec ambiguity or plan gap discovered mid-execution — record as blocker, ask, never guess. Do not automate past any valve.
Advanced: If you need external child agent delegation (background runs, parallel audits), install
pi-subagentsseparately. 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.
Common rationalizations and their reality:
| Excuse | Reality |
|---|---|
| "Close enough — the gate almost passed" | A failed gate means not done. Fix it or stop and report; those are the only exits. |
| "One more retry will converge" | Past the 3-failure cap, retries do not converge — the failure is structural. Ask for direction. |
| "The fix is tiny, skip re-verification" | Unverified fixes are how regressions land. Every fix ends with verification. |
| "This failure is a special case" | No evidence, no exception. Treat it like every other failure. |
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 with
ERROR(resolved): <root cause>; keep only the final repro, root cause, fix summary, and verification result - Remove stale debug output and failed exploratory runs; update
session_checkpointwith 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 loador read.context/compound-engineering/handoffs/latest.md. If found, useactiveFiles,blocker,verification,activeRulesas starting point;activeRulesmay already list loaded rules — verify against the repo, do not blindly trust. If not found, proceed normally. ReadCONTEXT.md(orGLOSSARY.md) if either exists at root — see../references/domain-language.md. - Load project rules (blocking — no implementation before this completes):
- Detect language: merge
{repo-root}/rules/language-detection.md(project-level map, same marker wins) with the built-in table:tsconfig.json/package.json→typescript,Cargo.toml→rust,go.mod→golang,pyproject.toml/requirements.txt→python; others in language detection - Check
{repo-root}/rules/first (overrides package defaults); then loadrules/common/development-workflow.md,rules/common/testing.md, matchingrules/{lang}/files,rules/web/only for frontend/browser concerns - Emit manifest before any code:
Rules loaded: language=<lang> (via <marker>[, project-level map]), common=<files>, lang=<files>, web=<files or N/A> - Same-session re-entry: if the transcript already contains a
Rules loaded:manifest for the same language, do not re-read the rule files — reuse them, cite the earlier manifest, and note the skip
- Detect language: merge
- Detect input type (plan path vs bare prompt)
- Read implementation units if plan path
- Load
session_checkpointto skip completed units - Use
task_splitterfor 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_checkpointafter each unit - On failure:
session_checkpointfail→retry→ follow strategy - Provide completion report (see
references/completion-report.md) — include theRules appliedsection - Save handoff:
context_handoff savewith current stage, next stage, activeFiles, blocker, verification, activeRules (carry loaded rules inactiveRules) - Chain to review: immediately read
../04-review/SKILL.mdand execute it in this session — do not wait for user instruction.references/handoff.mdstill defines the handoff artifact to save first.
Before finishing this skill, apply the completion checklist in shared pipeline instructions.


