CLI reference
One umbrella command, specline, with three subcommands. Specline is the checker — point it at a repo. rules and spec describe themselves and need no repo at all.
specline check [PATH] [--mode author|gate] [--format json|human]
[--changed <file>...] [--now <iso-date>] [--tier 0|1|2]
specline rules [--format json|markdown]
specline spec specline check
This is where the checking happens. Specline walks docs/ beneath PATH (default .), runs the tier's rules, and emits findings. JSON is the source of truth; the human output is just a view onto it.
| Flag | Meaning |
|---|---|
| --mode | gate (default) / author. Both report the same findings — only the ten integrity rules ever fail the run; completeness and quality are advisory warnings in either mode. |
| --format | human (default at a terminal) or json (agents, CI). |
| --changed | Repo-relative paths you touched. Spec-scoped findings error only for specs in this set; otherwise they warn (quarantine). |
| --now | Reference ISO date for time-dependent checks. Specline never reads the wall clock — determinism. |
| --tier | Override the repo's declared tier (0, 1, 2) for testing. |
Exit codes
| Code | Means |
|---|---|
| 0 | No error-severity findings (warnings allowed). |
| 1 | At least one error. CI gates on this; agents parse the findings. The two never disagree. |
| 2 | Usage error (bad flag, no docs/ found). |
| 3 | Internal error — to stderr, never as malformed stdout. |
Output contract
"tool_version": "0.1.0", "canon": "2.6.2", "mode": "gate", "summary": "errors": 0, "warnings": 1, "info": 0 , "findings": [ /* rule_id, severity, scope, file, line, message, fix_hint */ ]
The output never surprises you. Findings sort by file, then line (null first), then rule_id — so two runs on the same input and the same --now come out byte-identical.
specline rules
Prints the full rule catalog — every rule_id with its severity, scope, tier, and downgradable flag — as --format markdown (default) or json. No repo required; the catalog is the catalog.
specline spec
Prints the pinned canon to stdout. Use it to drop Specline straight into an agent's context. No repo required. (The web twin is /spec.md.)