Skip to content

Lint

pb lint is referential integrity over the markdown graph. It is not Biome. In this repo, pnpm lint is style; pnpm pb lint is the graph.

bash
pb lint
pb lint --format github
pb lint --json

Exit 0 if there are no errors. Warnings do not fail the process. --format github prints Workflow commands:

text
::error file=docs/backlog/tasks/TASK-001.md,line=4,col=1,title=dangling-ref::dangling depends_on US-999

Every diagnostic has file:line:col (and often suggestion / fix).

Errors

CodeWhen
parse-errorYAML/markdown could not be read
duplicate-idSame id in two files
unknown-typeFolder/type not in config
missing-fieldRequired frontmatter key empty
unknown-fieldKey not in the type schema
type-mismatchtype: does not match the folder type
bad-idId fails the prefix/pad pattern
filename-mismatchFile is not {id}-<slug>.md
invalid-enumStatus, priority, area, … not in the allow-list
not-arrayField must be an inline YAML array
not-numberField must be a number
not-dateField must be YYYY-MM-DD
dangling-refParent, edge, or covers target missing
wrong-type-refRef exists but is the wrong type
dependency-cycleCycle in depends_on
edge-cycleCycle in another acyclic edge (e.g. supersedes)
unverified-doneWork item done with no verified block (when checks.commands is set)
stale-verifiedItem changed since pb verify
stale-content-hashAccepted ADR / active BR body does not match content_hash — run pb bump

Warnings

CodeWhen
open-childrenEpic/story is done but children are not done/cancelled
superseded-statusADR has superseded_by but status is not superseded
deprecated-adrADR status: deprecated
deprecated-ruleRule status: deprecated
parentless-taskTask has no story and is P0 or estimate ≥ 3
unbound-criterioncovers is not ID#N or N is out of range
missing-evidenceIdea is promoted but has no URL or internal ID under ## Evidence

Fix IDs and edges; do not delete diagnostics by moving files. After a body edit on an accepted ADR or active rule:

bash
pb bump ADR-0001

Released under the MIT License.