Other

/install-runbook-linter

Lint a macOS onboarding runbook for privilege-correctness before it ships. Triggers: install runbook, fresh-Mac onboarding, brew cask runbook, admin/Standard user split, happy-camper onboarding.

$ golems-cli skills install install-runbook-linter

Updated 1 week ago

A macOS onboarding runbook is false-green when it reads fine to a human but assigns admin-only steps to a Standard (non-admin) user — the gen16 audit failed exactly here (a Standard user couldn't brew install). This skill turns that audit into a mechanical, replayable gate: runbook_lint.py parses a runbook and reports privilege-correctness violations, with RED→GREEN fixtures (fixtures/, tests/).

Run it

python3 lint_cli.py path/to/onboarding-RUNBOOK.md   # exit 1 if any violation
python3 -m pytest tests/                            # the RED→GREEN gate

Rules

RuleWhat it catches
privileged-in-standard-phaseA privileged command (brew tap/trust/install, --cask, sudo, npm install -g) inside a Standard-tagged phase. Scans only fenced code blocks, so prose prohibitions ("happy-camper must not run brew install") and comments never false-fire. npm install -g is exempt when the runbook establishes a per-user npm prefix (then it writes to user space).
cask-before-prereqsA brew install --cask with no Prerequisites / Phase-0 preflight section earlier in the document.
receipt-not-bundle-verifyEnd-state verification that trusts the cask receipt (brew list --cask) but never checks the on-disk bundle (/Applications/…app, --version, a bundle ls). A receipt is false-green; the on-disk bundle is the truth.
inconsistent-identifier-spellingLoad-bearing identifiers spelled in near-duplicate forms, such as happy-camper vs happy-campep or VoiceBar vs Voicebar. Scans prose and code, but only treats code/code-span identifiers and CamelCase names as load-bearing so heading prose does not false-fire.
prereq-incompletenessDeveloper tools used in fenced code (bun, brew, rustup, node, git, etc.) but not named in a Prerequisites / preflight section.

Phase classification

Phases are split on ## … headers and tagged admin / standard / neutral from role cues (admin, machine-wide vs Standard, happy-camper, user space, without admin). A header naming the Standard user wins (it's the privilege-sensitive one).