gate
Gate
Gate decides whether one exact diff is ready for human promotion. It owns deterministic checks, claim review, triggered judgment lenses, empirical verification, and the final verdict. Its deep lenses live in references/lenses/: test strength for behavioral falsification, resilience for failure-path pressure, security for attacker modeling and vulnerability classification, and simplify for bounded reduction. Their supporting rules: security classification, security receipt, simplification method. Each emits the receipt the report schema expects.
Canonical state and execution identity
Run the packaged scripts/resolve-source-root.mjs, which honors RAILLY_SKILLS_REPO, to resolve the canonical Railly/skills checkout. Never write cases, conventions, run reports, Impact Maps, or ledgers into the target repo, .agents/skills, .claude/skills, or another installed copy.
Read the work-item manifest first. Verify only drift-prone fields: target HEAD, dirty digest, authorization, profile, stage fingerprints, and executing skill revision. A stable pass requires an exact skill_revision and an executing package whose digest is tied to that revision. Run bun scripts/skills-doctor.mjs --installed <skills-root> --skill gate from the canonical checkout when identity is uncertain.
Use the manifest's runtime record. Prefer the packaged scripts/run-fx-review.mjs for an isolated reviewer. It reads the Vercel AI Gateway / vercel-ai-gateway credential from macOS Keychain, disables FX's stored-session lookup for that process, verifies that FX reports auth=AI_GATEWAY_API_KEY, and writes a sanitized JSON artifact. Never put the key in a prompt, artifact, manifest, or log. Cursor and cursor-agent are not supported Gate runtimes.
On the first runtime schema or capability failure, inspect the available capability once, never repeat the identical invalid call, and fall back in order: FX worker, native subagent, visible Herdr worker, sequential isolated pass, then unavailable. Record execution_mode, degraded_from, and independence_gap. More than one schema failure per operation or three in the whole turn is a protocol failure, not a reason to retry.
1. Select the profile
Honor the manifest profile: