Imported from SharathSPhD/sage (
.claude/skills/gate-runner/SKILL.md). Install upstream withnpx skills add SharathSPhD/sage --skill gate-runner. Copyright stays with the author.
Gate runner
Given a unit id <unit> with spec gates/<unit>.yaml:
while not all_gates_green(unit):
status = run: uv run python gates/run_gates.py <unit> # deterministic, scripted
if status.code_failures: dispatch numerics-engineer or solver-architect (whichever owns the module)
if status.domain_failures: dispatch theory-verifier + the relevant specialist (physicist / econometrician / data-engineer)
if status.statistical_failures: dispatch benchmarker
if status.doc_failures: dispatch doc-writer
if status.adversarial_open: dispatch red-team # artefact + claim ONLY — never the reasoning
if same_failure_twice(status): dispatch triz-engine # MANDATORY escalation, not optional
if iterations > 8: halt; update SESSION.md; escalate to the PI
commit (conventional, referencing <unit>); update gates/status.json; update docs + dashboard; push
Rules
- The runner script is the only judge of gate state. Never mark a gate green by hand.
- Track failure signatures across iterations (failing gate id + underlying reason). Two iterations with the same signature = the TRIZ trigger. Do not rationalise it away as "almost fixed".
- Anti-gaming (hooks enforce, you respect): a domain gate may not be weakened without a
memory/decisions.mdADR signed off by red-team; deleting or xfail-ing a failing test to close a gate is a hard failure;no_todo_no_stubmeans no TODO, nopass # later, noNotImplementedErroranywhere in a closed unit; every domain-gate artifact must regenerate viamake reproducefrom its fixed seed — non-regenerable = not green. conjectured-tier units: the gate spec must state what would count as the claim being wrong. Refuse to close the gate if it doesn't.- On close: CHANGELOG entry, claims-ledger update if the unit's claim tier changed, dashboard regeneration. Dashboard stale = gate not green.
- On halt: SESSION.md records the failure history, the TRIZ output if any, and the precise question for the human.