Your Agent Pipeline's Review Gate Should Be Code, Not a Prompt Convention
Description and use
Moving from prompt conventions to code in ZOdyssey enforces a reliable review gate, preventing regressions and ensuring plan integrity.
Problem
Agent pipelines often rely on prompt conventions to enforce review gates, which can be bypassed and lead to regressions such as accidental deletion of critical gates.
Outcome
By moving the review gate from a prompt to code, ZOdyssey prevents accidental gate removal, enforces plan integrity, and ensures that product code changes only occur after a verified OKAY verdict.
Workflow
- 1. Define plan in .zcode/plans/
<slug>.md and run scripts/parse-plan.mjs to lint it. - 2. Execute the REVIEW phase via momus, which produces a verdict (OKAY or REJECT) and records a plan SHA256.
- 3. The PreToolUse hook (skills/odyssey/hooks/pre-tool.mjs) checks state.review.verdict; if not OKAY, it blocks any product code edits.
- 4. If the plan is edited after an OKAY verdict, the hook re‑hashes the plan and compares it to the bound SHA; a mismatch blocks the edit and requires re‑review.
- 5. Upon successful review, executors run the EXECUTE phase, limited to plan‑specified files and capped dispatches.
- 6. Verification runs acceptance criteria and records evidence; record‑todo refuses completion without passing records.
Evidence
The Bash gate has been silently deleted TWICE.
The review gate itself, pre-tool.mjs:876-884
- Record date: 2026-09-06T21:52:57.372Z