Define done before Codex starts
Set the completion contract up front, track proof for every requirement, and block partial work from being called done.
Use this when
Use this for long-running Codex work, pull requests, runtime checks, or user-visible artifacts where a plausible partial result could be mistaken for completion.
How it runs
- Recover a measurable definition of done for every ambiguous requirement.
- Record the requirements, scope, non-goals, evidence plan, and current status without expanding the requested work.
- Execute one bounded action at a time and attach current evidence to each affected requirement.
- Audit every requirement before closure and preserve honest blocked, exhausted, stalled, or contradicted states.
Done when
✓ Every Codex Goal requirement has current, adequate proof. The final audit contains no weak, missing, or contradicted required item; otherwise the work remains open, blocked, or exhausted.
Why it works
A durable completion contract keeps the definition of done visible across long sessions. Mapping every requirement to evidence makes false completion easy to detect.
Implementation note
Use $goal-planner-codex only when the user explicitly asks for a Codex Goal or completion audit. Create native Goal state only with approval; ordinary task planning does not need it, and budget exhaustion never counts as success.
More maintenance loops
Weekly tech debt report
Every Friday, compile a trend report of debt signals — TODO count, lint suppressions, type coverage, largest files — so the team sees drift before it compounds.
Keep memory pins under control
Audit and prune pinned memory contexts to stay under 7, replacing competing invariants atomically and checking load count before each pin.
Chase a refund until it lands
Open the claim, watch replies and deadlines, and keep the case moving until the money actually arrives.