Loop/loopMaintenancehigh riskintermediatesafety C · 55Forward Futurepre-dates current gate · under review

Define done before Codex starts

Set the completion contract up front, track proof for every requirement, and block partial work from being called done.

prompt
→ Claude Code
Run $goal-planner-codex [task] for long-running Codex work where partial work could be mistaken for done. Landing a PR and verifying production is one example. Before acting, define every required outcome and its evidence. After each bounded action, mark requirements proved, weak, missing, or contradicted. Complete the Goal only when all are proved; otherwise stop as blocked, stalled, or exhausted. Ask before creating Goal state. Finish with the requirement-to-evidence table, status, owner, and next action.
claude-code · codex

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

  1. Recover a measurable definition of done for every ambiguous requirement.
  2. Record the requirements, scope, non-goals, evidence plan, and current status without expanding the requested work.
  3. Execute one bounded action at a time and attach current evidence to each affected requirement.
  4. 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.

Source: Forward Future ↗graded C · 55/100 — how grades work →

More maintenance loops

Upgrade to current Node LTS

Loop/goallooprepoB

Move the project to the current Node LTS across .nvmrc, CI config, Dockerfiles, and engines, fixing deprecations until everything is green on the new runtime.

prompt
→ Claude Code
/goal the project runs on the current Node LTS — update .nvmrc, the engines field, CI workflow files, and any Dockerfile base images to the LTS version, then run install, build, lint, and the full test suite on it, fixing deprecation warnings and breakages one at a time; stop when all are green or after 15 turns

Upgrade dependencies one at a time

Loop/goallooprepoB

Walk through outdated dependencies one package per turn, upgrading, running the full check suite, and pinning back anything that breaks.

prompt
→ Claude Code
/goal `npm outdated` lists no minor or patch updates — upgrade exactly one package per turn, run tests, lint, and build after each, commit if green, and pin the previous version with a note in UPGRADE-BLOCKERS.md if it fails; stop after 20 turns

Triage untriaged issues to zero

Loop/looplooprepoA

Pick the oldest untriaged issue, validate it against the current build, then label it, close if obsolete, or document repro steps—one per turn until the queue empties or 12 iterations pass.

prompt
→ Claude Code
/loop pick the single oldest untriaged issue in the tracker; reproduce or validate it against the current build, then either label it (area, priority, effort), close it with a polite explanation if it is obsolete, or write the missing repro steps. One issue per iteration, never close anything that still reproduces, and propose bulk closes for maintainer review instead of executing them. Continue until the untriaged queue hits zero — stop after 12 turns and report the triaged/closed/escalated counts.
maintenancelow risk