The lint script checks the structure of Strata Blueprints documents mechanically. It flags structural problems and counts cells marked Not supplied:.
To check a single document:
node skills/strata-blueprints/scripts/strata-blueprints-lint.mjs path/to/document.md
To check a stack written as separate files in a folder:
node skills/strata-blueprints/scripts/strata-blueprints-lint.mjs path/to/stack-folder
For a folder, the lint reads sbp-vision.md, sbp-structure.md and every sbp-detail-*.md in it as one stack, ignores every other file, and reports each warning with its file and line.
The script produces three kinds of output:
WARN <check>: <message> (line N) flags a structural problem the script can decide. The checks are:
unfinished — marker TODO, TBD or FIXME founddiagram-title — fenced block has no Title: line before itdiagram-key — mermaid diagram Title: line has no Key:layer-heading — layer heading wrong, out of order, or Layer 1 or Layer 2 missing; for a folder, also flags a file holding a layer other than the one its name declaresscope-line — first line after a layer heading does not start with Scope:topic-order — topic not in the layer, out of order, or inside a ### Part (part) entry where it does not belongring — a layer refers outward to a later layerscenario-form — Given line not shaped Given ..., when ..., then ...reasons — assumption missing Basis: and If wrong:, or decision missing Reason:scenario-trace — a scenario id has no path in Layer 2 or no rule in Layer 3cost-shape — a cost is malformed or does not follow C<n>. Given <condition>, when <subject state>, then it costs <amount>. Paid by <who>.risk-shape — a risk is malformed or does not follow R<n>. Given ..., when ..., then .... Severity: High|Medium|Low|Not rated. Answered by <answer>.concern-shape — an open concern is malformed or does not follow O<n>. Given ..., when ..., then .... Raised by <who>.cr-id — cost, risk or concern id is wrong, repeated, or out of sequencerisk-ref — a risk’s Answered by field cites an id that does not exist, or cites an id defined in a later layerstanding (folder only) — for folder mode, a Standing line names a missing detail file, or a detail file is not named by any Standing lineINFO not-supplied: N means N cells are marked Not supplied: and are ready to be asked for.
0: no warnings1: at least one warning, with --strict2: file does not exist, or a folder holds none of sbp-vision.md, sbp-structure.md or sbp-detail-*.md filesWarnings are advisory; exit code 0 indicates the script ran successfully.
Exit with code 1 if any warnings are found:
node skills/strata-blueprints/scripts/strata-blueprints-lint.mjs path/to/document.md --strict
Use this in a gate to fail a build when warnings are present.
To list every element that a change reaches, give the id of the element that changed:
node skills/strata-blueprints/scripts/strata-blueprints-lint.mjs --impact D1 path/to/document.md
The output is a tree of every element that cites the id, directly or through other elements, with its depth, place, layer, topic and first words. Exit codes:
0: the id is defined and the tree is shown1: the id is not defined2: usage error