CRUMB a card from devarno-cloud

Phase-Open / Phase-Close Prompt Pair

petrova intermediate 7 min read

ELI5

Two prompts bookend every phase. The opener checks the door is unlocked before letting you in. The closer checks the room is tidy before letting you out — and even when the room looks tidy, it forces a final friction sweep so anything missed leaks into the next phase as a numbered milestone, not into the closing phase as a retrofit.

Technical Deep Dive

The pair in motion

sequenceDiagram
autonumber
participant H as Human
participant P as Planner (01-phase-open)
participant I as Implementer
participant A as Auditor
participant R as Reviewer (02-phase-close)
participant V as Verification round (03)
participant M as MILESTONES.md
participant D as docs/decisions/
H->>P: paste 01-phase-open.md (N)
P->>P: re-read intent, MILESTONES §N, prior close, MR-1/2/10/11
P->>P: Step 2 — entry criteria verdict (met/not-met/n/a)
alt any not-met
P-->>H: stop + surface missing
else all met
P->>D: write YYYY-MM-DD-phase-N-open.md
P->>M: status=open, set Active phase pointer
P-->>H: handoff: M{N}.1 + owner subagent
end
loop per milestone
I->>A: ship + session log
A->>I: audit.fail back-edge if blocked
A->>A: pass / advisory
end
H->>R: paste 02-phase-close.md (N)
R->>R: Step 1 verify acceptance evidence per gate
alt any block
R-->>I: route back, stop
else all pass
R->>V: invoke 03-verification-round inline
V-->>R: findings list
R->>R: classify closed/in-budget/deferred
R->>M: append M{N+1}.x.y for deferred (same commit)
R->>D: write YYYY-MM-DD-phase-N-close.md
R->>M: phase N=closed, phase N+1=next
R-->>H: deferred count + next prompt
end

Phase-open — the six steps (01-phase-open.md)

  1. Re-read ground truthintent.md, MILESTONES § Phase N, prior phase-close decision doc, CLAUDE.md invariants + drift watches, META-RULES (MR-1, MR-2, MR-10, MR-11).
  2. Check entry criteria — one-line verdict per criterion: met / not-met / n/a with citation. Any not-metstop (overriding is how the system rots).
  3. Re-evaluate scope — three questions: still serves north-star? deferred items still relevant? gates still falsifiable? Vague gates (“we’ll know it when we see it”) get flagged.
  4. Write the phase-open decision doc at docs/decisions/<TODAY_ISO>-phase-N-open.md — short on purpose; richness lives in MILESTONES.md and the prior close.
  5. Update MILESTONES.md — set status open, point Active-phase block at this phase, set open date.
  6. Hand off — first milestone owner subagent named; do not start implementer work in the open session.

Phase-close — the six steps (02-phase-close.md)

  1. Verify acceptance evidence per gate — auditor evidence located in docs/roles/auditor/outputs/, vague evidence is block. Any block → route to implementer; the close prompt was premature.
  2. Run the verification round inline — read prompts/03-verification-round.md as the next instructions, do not start a new session. MR-10 — even smooth phases run one.
  3. Classify and update MILESTONES.md — deferred items as M{N+1}.x.y before the close decision doc commits; phase N → closed; Active-phase pointer to N+1 (next).
  4. Write the phase-close decision doc — fixed structure with ## Acceptance gate verdicts, ## Invariants table, ## Friction budget (closed/in-budget/deferred subsections), ## Anti-shape audit per drift watch, ## Handoff to phase N+1.
  5. Self-audit — every deferred has a milestone ID; no block verdicts; auditor evidence cited; MILESTONES status correct; no MR-7 silent edits.
  6. Hand off — counts of in-budget vs deferred; if deferred > 3, surface a warning (“Phase N deferred a lot. Consider re-reading scope before opening N+1.” — leading indicator of north-star realignment).

Why the prompts are deliberately interactive

CLAUDE.md (in petrova-hq) marks the prompts as load-bearing: “each prompt is deliberately interactive and stops at checkpoints; do not ‘streamline’ them by removing the stops.” The interactivity exists because the human is the right tiebreaker for not-met, block, drift suspicion, and the friction-budget classifications — agents prone to forward motion will paper over these without the explicit stop.

Phase-open writes vs phase-close writes

phase-openphase-close
Subagentplannerreviewer
Decision docYYYY-MM-DD-phase-N-open.mdYYYY-MM-DD-phase-N-close.md
Lengthshort — checkpoint, not essaylong — gates, invariants, friction, anti-shape audit
MILESTONES.md editstatus open + Active pointerstatus closed + N+1 deferred entries + Active pointer
MR enforced primarilyMR-1, MR-11 (drift)MR-2, MR-7, MR-10

Key Terms

  • Active phase pointer — block at MILESTONES.md top naming the currently open phase. Owned by planner on open, by reviewer on close.
  • Friction budget## Friction budget section of the phase-close decision doc; the place MR-2 classifications live.
  • audit.fail back-edge — legitimate remediation loop in the AGENTS.xml handoff graph (auditor → implementer); exempt from the intra-phase DAG check.

Q&A

Q: What forces phase-close to invoke the verification round inline? A: 02-phase-close.md Step 2 says explicitly: “invoke prompts/03-verification-round.md inline (do not start a new session). Read it as your next instructions, perform the round, then return here.” MR-10 makes the round mandatory; running it inline keeps the reviewer’s context for classification.

Q: What happens when a phase-open Step 2 verdict is ‘not-met’? A: The planner stops and surfaces what’s missing. The prompt explicitly forbids overriding: “don’t override it. The criteria exist because the prior phase’s verification round earned them. Override is how the system rots.”

Q: Where do deferred friction items land before the close commit lands? A: As M{N+1}.x.y entries in MILESTONES.md, written in the same commit as the phase-close decision doc. Step 3 enforces ordering: deferred items → MILESTONES.md update → close decision doc. Otherwise the lineage between the deferred item and its phase-N origin breaks.

Examples

Reviewer pastes 02-phase-close.md for KAHN’s Phase 6. Step 1 verdicts: 3 gates pass, 1 advisory. Step 2 round surfaces six findings: one trivial typo (closed), one accepted partial-coverage note (in-budget — “telemetry seam ships in M7.3”), four deferred. Step 3 writes M7.2.1, M7.2.2, M7.3.1, M7.3.2, then writes 2026-05-06-phase-6-close.md, then flips MILESTONES status. Step 6 hands off with deferred=4 warning since count >3.

neighbors on the map