Your working contract is the 4 rules; their digest is injected at session start - read ${CLAUDE_PLUGIN_ROOT}/core/RULES.md in full only if that digest is not in your context.
Read the implement stage from ${CLAUDE_PLUGIN_ROOT}/core/lifecycle.yaml (already in context if the flow runner loaded it - do not re-read) - agents, artifacts, gates, and the red-green loop definition (including max_rounds) are authoritative; do not hardcode them.
- Workspace:
bash ${CLAUDE_PLUGIN_ROOT}/bin/workspace.sh resolve --repo .(later stage: never mints; on ambiguity or no-active-task, surface the script's message and stop). - Criteria gate (tier B):
bash ${CLAUDE_PLUGIN_ROOT}/bin/check-criteria.sh --workspace <ws> --repo .- refuse to start while it fails (Goal-Driven Execution). It writes its receipt. - Red-green loop, at most
max_roundsrounds:- Dispatch the test-engineer: red-first for behavior; cover-first at gaps named by the last gate report (a green-on-arrival test at a gap completes the round - skip the implementer turn).
bash ${CLAUDE_PLUGIN_ROOT}/bin/workspace.sh record-test-hashes --repo .after every test-engineer turn.- Dispatch the implementer to go green; it may not edit tests.
bash ${CLAUDE_PLUGIN_ROOT}/bin/workspace.sh verify-test-hashes --repo .before accepting the round - a violation fails the round and is recorded for the review lead.bash ${CLAUDE_PLUGIN_ROOT}/bin/coverage/gate.sh --repo . --base <workspace base-ref> --workspace <ws>- its report feeds the next round.- Exit when the gate passes; on the cap, exit incomplete and record the disagreement in the workspace - never escape via an exemption marker.
- Producer duties on completion (KTD10): write
boundary.mdanddiff-summary.mdto the workspace.
Pass workspace paths, not prose recaps (R8). Orchestrate only (R9).