/builder-os:bos-gate
Arguments
- [--phase N]
- Check a specific phase instead of the current one. Read-only, never advances.
- [--override "reason"]
- Advance despite failures, logged.
- [--audit]
- Evidence audit only, no gate verdict.
What it does
Resources: The installation root is the parent of this loaded commands/ directory (or the hook’s installation-root line). Resolve skills/, references/ and scripts/ there; project artifacts belong in the working project.
Checks whether the current phase artifact satisfies its gate. The only path that advances current_phase.
REQUIRED BACKGROUND: gate-checks for the conditions and the refusal protocol, evidence-ledger for tag counting.
The BuilderOS script is the node …/scripts/bos.mjs command named on the BuilderOS script: line at session start. Use that quoted path from the project root. Without the hook, resolve it from this command’s installation root.
Steps
- Read the active initiative's
state.json→current_phase,mode. - Read the current phase artifact. If it does not exist, report that the phase has not produced output and stop.
- Run the script where commands can be executed: the BuilderOS script with
gate {N}from the project root (--jsonfor the machine form). It decides the script-decided conditions, E.1 included, applies lite mode, runs the evidence audit, and lists the rest asjudge. - Judge the
judgelines against the artifact, pergate-checks. Do not re-judge what the script decided. - Without command execution, load the conditions from
gate-checksand check every one against the artifact yourself, E.1 and the evidence audit perevidence-ledgerincluded. Record them all underchecked_by.model. - Record it. Where commands run, the BuilderOS script with
record {N} --judged "{id}=pass|fail,..."(plus--verdictat phase 1,--review-dueat phase 6, and--accepted-by "who"at phases 0, 4 and 6 once the person has accepted, never on their behalf) writes the result and advances or holds the phase; never editstate.jsonfor a gate by hand when it can run. Elsewhere, write the same fields the schema shows. All pass → report the next command. Any fail → the phase stays where it is. Emit the refusal format fromgate-checks, naming the failed condition, what was found, what would satisfy it, and the cheapest path. - If the failure is a reasoning gap rather than missing work (an unfalsifiable assumption, an unresolved branch), offer
pressure-testingrather than asking the user to rewrite blind.
Override
/builder-os:bos-gate --override "reason"Advances despite failures, through record {N} --judged ... --override "reason" where commands run. Writes overridden: true, the reason, and the failed condition ids to state.json, and appends gate_overridden to history. The override shows in every /builder-os:bos-status from then on and is read by phase 7 when judging the outcome.
Refuse an override with an empty or evasive reason ("later", "fine", "trust me"). The reason is the entire value of the mechanism.
Output
## GATE {N}: {PASSED | FAILED}
| # | Condition | Result |
|---|-----------|--------|
| {N}.1 | {condition} | ✓ |
| {N}.2 | {condition} | ✗ |
**Evidence:** {primary units} units from {distinct} sources · {untagged} untagged claims · {assumption ratio}%
{On failure, the refusal block from gate-checks.}
{On pass, the next command.}commands/bos-gate.mdView on GitHub