BuilderOS

bos.mjs

One script, Node built-ins only. It decides the structural gate conditions, writes state with acceptance, captures check runs, and briefs each session. Every rule it applies is also written in a skill, so where commands cannot run the model applies the same rules and the state says so.

Running it

Run it from the project root, the directory holding PRODUCT.md and .builderos/. The session briefing prints the exact path of the installed copy. After vendor, a copy lives at .builderos/bin/bos.mjs for sessions without the plugin.

bash
node .builderos/bin/bos.mjs brief
node .builderos/bin/bos.mjs gate 2
node .builderos/bin/bos.mjs record 2 --judged "2.5=pass,2.6=pass"

Options on every command:

Every session

What the hooks and the hub call to know where things stand.

bos.mjs brief

Session briefing, with the attention line

bos.mjs context

UserPromptSubmit hook

bos.mjs guard

PreToolUse hook, reads stdin

bos.mjs doctor

bos.mjs pace

Process metrics from state history and git: time per phase, failed gates, spec rework after the plan, and phase 1 kills across initiatives

bos.mjs map [slug]

bos.mjs page

Write .builderos/index.html: a timeline from WORK.md, open decisions and what they block, in progress, next, done, with links to every document, design, demo and preview; the roadmap regenerates both

Gates and state

The only path that writes a gate result into state.json.

bos.mjs gate <0-7|C|M|N> [--json] script-decided gate conditions; the rest listed as judge

bos.mjs record <0-7> --judged "id=pass|fail,..." [--accepted-by "who"] [--verdict v] [--override reason [--waive ids]] [--review-due date] [--reenter N]

bos.mjs record <0-6> --kill "reason"

End the initiative at the phase it is in, in the person's words write a gate result to state.json: the script's verdict plus the model's on the judge conditions; advances, closes, or keeps the phase open. Phases 0, 4 and 6 also need the person who accepted the artifact

bos.mjs run-check --label slug [--cwd dir] [--dataset file --results file] -- executable args...

Explicitly execute an authorized check and record its command, exit and output

bos.mjs round --asked N

bos.mjs claim --by who [--release

bos.mjs defer-review --review-due YYYY-MM-DD --reason "..."

Defer phase 7 without inventing an outcome verdict

bos.mjs watch --note "..." (--recheck YYYY-MM-DD | --clear --breach <slug>)

Roll a KEEP watch after a check without breach, or clear it when a breach started a new initiative

Initiatives and tracks

Open work, skip what is already covered, move to a heavier track.

bos.mjs init

First run: .builderos/ folders, an empty WORK.md, the .gitignore lines

bos.mjs new <slug> --title "..." --track spike|change|build|feature|product (startup) [--mode full|lite] [--reason "..."]

Create an initiative with a valid state.json and make it active

bos.mjs resume <slug> [--reason "..."]

Make a paused initiative the active one again

bos.mjs reframe --reason "..."

A new cycle from phase 0, keeping the history

bos.mjs jump <0-7> --reason "..." a forced move: back reopens phases, forward records them overridden, not run

bos.mjs cover --c4 "reason"

Feature track: run the coverage check on PRODUCT.md and the request and, if it passes, record phases 0 and 1 as covered and start at phase 2 (C.4 is the model's call)

bos.mjs cover --m4 "reason"

Change track: run the mandate check on the request and, if it passes, record phases 0 to 3 as covered and start at phase 4; a failure moves the work to feature

bos.mjs cover --n5 "reason"

Build track: run the need check on the request and, if it passes, record phases 0 to 2 as covered and start at phase 3; a failure moves the work to product

bos.mjs upgrade --to build|feature|product --reason "..."

The ratchet: move the active initiative to a heavier track and restart at phase 0

bos.mjs roadmap

Regenerate the project page (and the tables of a ROADMAP.md from before 3.9)

Evidence, reviews and upkeep

Bring outside material in, open the flows for editing, check a product review, keep the script with the project.

bos.mjs evidence add --class c --id id --where w [--shared] [--from file]

Save notes, tickets, exports or excerpts brought from outside the session as evidence files the source tags resolve to; raw material required, never overwritten

bos.mjs review [--file f] [--json]

Check a product review file in .builderos/reviews/: levers read, stage, what to build next

bos.mjs vendor [--hooks]

Copy the script into the project at .builderos/bin/bos.mjs, so a session without the plugin still runs the gates

bos.mjs migrate

Other

bos.mjs work

The board from .builderos/WORK.md (written by the model): last session, doing, next, what waits on a person, built and never tried

bos.mjs stop

Stop hook

The usage line, verbatim: scripts/bos.mjs

usage: node bos.mjs brief | gate <0-7|C|M|N> [--json] | new <slug> --title t --track k | cover --c4 reason | cover --m4 reason | cover --n5 reason | upgrade --to build|feature|product --reason text | record <0-7> --judged ids | run-check --label slug -- executable args... | defer-review --review-due date --reason text | roadmap | page | migrate | pace | vendor [--hooks] | guard (PreToolUse hook, reads stdin) | stop (Stop hook) | context (UserPromptSubmit hook) | evidence add --class c --id id --where w [--shared] [--from file] | review [--file f] [--json] | map [slug] | work | doctor | claim --by who [--release | --take --reason text] | round --asked N | round --answered 
Generated from scripts/bos.mjsView on GitHub