@@ -33,25 +33,94 @@ pair for `$resume-from-handoff`.
3333
3434## Phase 0: Review Gate
3535
36- Before writing the final handoff or committing, review all files created or
37- materially changed in this session.
38-
39- 1 . Self-review each touched file for project rules, design gates, naming, test
40- standards, and reporting integrity.
41- 2 . Run an appropriate Codex review when available for substantial code,
42- executable specs, cross-cutting docs, or milestone work. Use an
43- adversarial/focused review only for major milestone deliverables or explicit
44- user challenge language.
45- 3 . Triage findings:
46- - Agree and confident to fix: fix now, then verify.
47- - Agree but out of scope: record in the handoff Deferred section with the
48- finding quoted.
49- - Disagree, uncertain, or scope-changing: stop and surface to the user.
50- 4 . If fixes were applied, self-review the fix set. Run a second Codex review
51- only for high-severity findings or cross-cutting executable changes.
52- 5 . Cap review invocations at 3 unless the user explicitly approves more.
53-
54- Proceed only when no finding is blocking on user input.
36+ Before rotating continuity files or committing, run this mandatory two-round
37+ gate over every file created or materially changed in this session. The gate can
38+ halt the skill: if triage requires user direction, stop before Phase 1 and do
39+ not rotate, commit, or push.
40+
41+ The review stays inside the current Codex session. A native cross-check is a
42+ distinct native Codex review pass performed by this session after setting aside
43+ its authoring conclusions and re-reading the deliverables with a reviewer lens.
44+ Never invoke ` codex review ` , ` codex exec ` , ` codex-companion ` , the Claude
45+ companion plugin, a subprocess reviewer, a subagent reviewer, or another model
46+ service. Do not create an external data-egress approval path for this gate.
47+
48+ ### Pure Design/Process-Document Exemption
49+
50+ If the entire session changed only pure design/process-document content,
51+ self-review is sufficient and the native cross-check is skipped. This exemption
52+ covers instruction/rule files, skills, ` AGENTS.md ` , ADRs with no runtime impact,
53+ ` design/gdd/** ` , and memory files. Mixed code-and-document changes are not
54+ exempt. Executable specifications, CI configuration, tools, tests, public API
55+ contracts, and ADRs with runtime-behavioral requirements are not pure documents.
56+
57+ ### Round 1
58+
59+ 1 . Self-review every touched file end-to-end, not just the diff. Check the
60+ applicable ADRs, GDDs, project rules, naming, test standards, design gates,
61+ verification claims, and recorded caveats.
62+ 2 . Unless the pure-document exemption applies, select exactly one native tier:
63+ - ` STANDARD ` is the default for routine session work: individual ADR
64+ amendments, tool / lint additions, tests, GDD system authoring, doc edits,
65+ and CI tweaks.
66+ - ` ADVERSARIAL ` is reserved for this exact major-deliverable trigger list:
67+ Foundation ADR cluster closure, master architecture doc, control-manifest
68+ v1.0+ promotion, batch ADR Proposed→Accepted events, stage-gate advances,
69+ release candidates / gold masters, or explicit user ` red-team / challenge `
70+ language.
71+ - If uncertain whether the work meets a major trigger, use ` STANDARD ` .
72+ 3 . Perform the selected cross-check as a fresh reasoning pass by the current
73+ Codex session. Inspect the complete touched files and their relevant
74+ contracts. Report each finding as ` HIGH ` , ` MEDIUM ` , or ` LOW ` with an exact
75+ ` path:line ` reference, the violated contract or risk, and a concrete
76+ recommendation. If there are no findings, report ` CLEAN ` .
77+ 4 . Triage every finding:
78+ - Agree and confident that the fix preserves approved intent: apply it only
79+ within files already created or materially modified during this session,
80+ then run the narrowest meaningful verification.
81+ - Agree but out of scope: do not apply it; record it in the handoff Deferred
82+ section with the native finding quoted verbatim.
83+ - Disagree, uncertain, disputed, design-changing, architectural,
84+ game-feel/balance-changing, or scope-changing: halt and surface the finding
85+ plus analysis to the user. Do not proceed to rotation or commit.
86+
87+ ### Round 2
88+
89+ Run Round 2 only when Round 1 caused a fix.
90+
91+ 1 . Always self-review the complete Round 1 fix set against the original
92+ finding, surrounding behavior, and verification evidence.
93+ 2 . Run a second native cross-check only when Round 1 included at least one
94+ ` HIGH ` finding or the fix changed cross-cutting executable behavior. This
95+ includes shared helpers, CI configuration, determinism-critical paths such
96+ as ` src/core/sim/** ` , public APIs, or ADR executable specifications. Use the
97+ same ` STANDARD ` or ` ADVERSARIAL ` tier selected in Round 1. Pure
98+ design/process-document fixes remain exempt from the second native
99+ cross-check.
100+ 3 . Triage Round 2 with a stop bias because a new finding means the first fix was
101+ incomplete:
102+ - Trivial and confidently intent-preserving only: fix a typo, document-text
103+ error, off-by-one in a named constant, or one-line obvious syntax error;
104+ inline-self-review that exact edit, verify it, and record it in the
105+ handoff. Do not run a third pass for this trivial fix.
106+ - Any non-trivial fix, ambiguity, disagreement, scope change, design or
107+ architecture decision, balance/game-feel decision, or finding outside the
108+ Round 1 fix set: halt and surface it to the user before Phase 1.
109+
110+ ### Pass Cap And Audit Trail
111+
112+ - Cap the gate at three native review passes total, counting Round 1, a
113+ conditional Round 2 cross-check, and any user-directed rerun after a scope
114+ extension. A fourth native review pass requires explicit user approval. When
115+ asking, report the active reported context percentage and the estimated
116+ additional percentage cost; never substitute fixed token-window or time
117+ estimates. If the active percentage is unavailable, say so explicitly.
118+ - Record the review audit trail in ` production/session-handoff.md ` : exemption or
119+ tier, ` CLEAN ` or findings, fixes applied and verified, findings deferred with
120+ quotations, user-cleared findings, and any stopped pass.
121+ - The gate passes only when every finding is fixed and verified, explicitly
122+ deferred as out of scope, or cleared by the user, with nothing blocking on
123+ user input. Only then proceed to Phase 1.
55124
56125## Phase 1: Choose The Label
57126
0 commit comments