BuilderOS

/builder-os:bos-gate

Run the current phase's gate check and report pass/fail per condition

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

  1. Read the active initiative's state.json → current_phase, mode.
  2. Read the current phase artifact. If it does not exist, report that the phase has not produced output and stop.
  3. Run the script where commands can be executed: the BuilderOS script with gate {N} from the project root (--json for the machine form). It decides the script-decided conditions, E.1 included, applies lite mode, runs the evidence audit, and lists the rest as judge.
  4. Judge the judge lines against the artifact, per gate-checks. Do not re-judge what the script decided.
  5. Without command execution, load the conditions from gate-checks and check every one against the artifact yourself, E.1 and the evidence audit per evidence-ledger included. Record them all under checked_by.model.
  6. Record it. Where commands run, the BuilderOS script with record {N} --judged "{id}=pass|fail,..." (plus --verdict at phase 1, --review-due at 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 edit state.json for 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 from gate-checks, naming the failed condition, what was found, what would satisfy it, and the cheapest path.
  7. If the failure is a reasoning gap rather than missing work (an unfalsifiable assumption, an unresolved branch), offer pressure-testing rather 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

markdown
## 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.}
Generated from commands/bos-gate.mdView on GitHub