IMPLEMENTAUDIT
On this page
  1. Planning depth
  2. Phase spec anatomy
  3. Owner/source discipline
  4. Source surfaces
  5. Phase file responsibilities
  6. Before dispatch
  7. Per-phase execution loop
  8. Goal synthesis stages
  9. Preflight red is not permission to wing it
Core model

Planning and phases

How a request becomes a roadmap, phase specs, ownership and source-of-truth notes, and acceptance checks.

The plan has to survive outside the chat.

The planner writes a roadmap and phase files so another reader can see:

  • what the agent promised
  • why it belongs there
  • which checks prove it
  • what happens if a phase cannot close.

Planning depth

Small tasks can use a compact plan.
Larger or riskier tasks need a deeper plan before dispatch.
The purpose is bounded work and evidence, not ceremony.

The planner loop frames the request, writes the roadmap, self-critiques, and only then dispatches phase work.

Phase spec anatomy

A phase spec names:

  • the work
  • why it exists
  • acceptance criteria
  • mandatory commands
  • evidence required in transcript
  • rollback/defer path
  • optional sidecar status
  • cleanliness notes.

The phase spec is a file the agent can reopen from disk; it is not just a chat summary.

Owner/source discipline

Each change needs an owner and source of truth.
If a generated file is involved, the phase should identify the generator rather than hand-editing stale output.

Source surfaces

skills/implementaudit/references/planning-depth.md, skills/implementaudit/references/phase-design.md, skills/implementaudit/templates/ROADMAP.md, and skills/implementaudit/templates/phase-goal.txt.

Phase file responsibilities

A phase file should be reopenable evidence.
It should name:

  • work
  • owner/source
  • route
  • acceptance criteria
  • mandatory checks
  • before evidence
  • after evidence
  • rollback or defer path
  • sidecar status if relevant.

Before dispatch

The planner should self-critique phase atomicity and criteria falsifiability.
A preflight failure is PREFLIGHT_RED, not a bypass.
It must be classified before dispatch continues.

After plan review, the planner can offer owner-choice handoff options: Start now, Adjust assumption, Tweak a phase, Restructure phases, or Abort.
Those are planner handoff and owner-decision options only; they do not authorize execution, install, release, publication, or provenance by themselves.

Stage 7 prints ready-to-paste handoff text only.
Slash commands fire only when the user submits or pastes the printed line.

Dispatch prep should leave inspectable evidence:

  • STATE.md is set to READY_TO_DISPATCH with Current phase: 1.
  • The baseline reference is recorded before mutation.
  • PROTOCOL.md is copied into the run folder.
  • The path and SHA256 of ${IMPLEMENTAUDIT_SKILL_DIR:-skills/implementaudit}/scripts/repo-state.sh are recorded in THINKING.md before dispatch.
  • Every phase spec exists and validates before dispatch.
  • Mandatory commands are deduplicated so the run checks evidence, not ceremony.

Per-phase execution loop

Each phase repeats the same evidence shape before the run advances.

  1. Open the phase spec from disk.
  2. Validate the phase with validate-phase.sh when available.
  3. Record before evidence (Smoke A).
  4. Edit only the owner/source files for the phase.
  5. Record after evidence (Smoke B).
  6. Check cleanliness and unrelated mutations.
  7. Record CONTINUITY_DECISION and AGENTS_UPDATE_DECISION if relevant.
  8. Advance STATE.md or hand off with the blocker.

Goal synthesis stages

When the input is not already a bounded audit target, the planner uses a native Stage 0-7 contract before it hands off or dispatches work.
These stages are for creating a safe work record, not for adding ceremony.

StagePlain purposeEvidence or marker
0Context/tool/memory detection: detect context, tools, repo state, and applicable instructions.context.md and tools.md
1Intake: normalize the request and ask only necessary intake questions.bounded audit object
2Recon / Gemba: inspect real files before promising a plan.owner/source notes
3Deep think: choose repair/design/mixed route and evidence needs.route note
4Phase decomposition: draft the roadmap and phase checklist.ROADMAP.md, phase spec
5Write run-root artifacts: check scope, rollback, sidecars, and generated-artifact ownership.STATE.md, PROTOCOL.md, constraints and rollback notes
6Plan review + self-critique: check atomicity and falsifiable criteria, then surface owner-choice handoff options.Self-critique: and owner choice
6.iIndependent cold review: a fresh-context reviewer evaluates executor-facing artifacts.PASS, GAP-REVISE, BLOCKED, or OWNER DECISION
6.iiPre-flight smoke check: run deduplicated mandatory checks before dispatch.PREFLIGHT_GREEN or PREFLIGHT_RED
7Print one ready-to-paste handoff only when dispatch is safe; it does not automatically dispatch, and the user must paste a /goal line for it to run.ready-to-paste goal or audited handoff

Preflight red is not permission to wing it

PREFLIGHT_RED re-enters planning.
Dispatch may continue only when the broken baseline is the phase target and the owner accepts that risk.
Unrelated or unclear baseline failures require stop-the-line handling or an owner decision.