Specline canon 2.8.0 Handbook For agents ↗
Specline · CLI

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.

usage
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.

FlagMeaning
--modegate (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.
--formathuman (default at a terminal) or json (agents, CI).
--changedRepo-relative paths you touched. Spec-scoped findings error only for specs in this set; otherwise they warn (quarantine).
--nowReference ISO date for time-dependent checks. Specline never reads the wall clock — determinism.
--tierOverride the repo's declared tier (0, 1, 2) for testing.

Exit codes

CodeMeans
0No error-severity findings (warnings allowed).
1At least one error. CI gates on this; agents parse the findings. The two never disagree.
2Usage error (bad flag, no docs/ found).
3Internal error — to stderr, never as malformed stdout.

Output contract

specline check . --format json

  "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.)