built by aktagon.com

Your ADRs are AI context. Lint them like code.

ctxgrd is a CLI linter for the structured markdown your team and your AI both depend on. ADRs, PRDs, runbooks — every .md file with frontmatter and an ID. Same input, same output, same exit code.

Lint your context. · Markdown only. On purpose.

Installone binary

A single Rust binary — no runtime, no daemon. Install from the public GitHub repo, or drop a prebuilt release binary on your PATH.

Bootstrap a configctxgrd init

One command writes a ctxgrd.toml that already passes its own validator, then lists every built-in pack — pick one to get a whole family of document types at once.

Scaffold a recordctxgrd new

Picks the next free ID for the namespace, slugifies the title, and writes the required-heading skeleton. Prints the path so you can pipe it to your editor.

Lint the whole treectxgrd

The default command. Walks the tree, lints every claimed document against its type, and points at the line. Exit 1 on errors — drop it straight into CI.

See your pipelinectxgrd status

Treats your document types as a dependency DAG and prints one aligned row per stage: namespace, state, doc count, and what it `needs`. The ready set — stages whose parents are all done — renders as `ready:`. Add --format json for agents.

Draw the pipelinectxgrd status --format mermaid|dot

The same per-namespace DAG as diagram source — Mermaid `flowchart LR` or Graphviz DOT, emitted as text (never rendered). Pipe it into a docs build or a PR comment to show the workflow shape and where you are in it.

Keep docs freshctxgrd pin

Pin a document to the commit of the code it documents. When that code moves, the doc is flagged stale — re-verify, then bless it back to green.

Adopt a packctxgrd pack

A pack is a reusable bundle of namespaces plus the rules they need. Adding one appends its blocks to ctxgrd.toml — it never clobbers what you already have.

Spot pack driftctxgrd pack outdated

Every block `pack add` writes is stamped with the pack version and a content fingerprint — `# pack: <name>@<version> sha:<hash>`. When the pack definition later evolves (a renamed namespace, a new rule), `pack outdated` reports the drift read-only: exit 0 when in sync, exit 1 when a block has fallen behind. Add --format json for agents.

Propagate a pack changectxgrd pack migrate

Pull a pack-definition change into your config. Migrate rewrites fingerprint-clean blocks to the pack's current shape and re-stamps them; a block you have hand-edited is left untouched and surfaced as a structured diff to resolve yourself. The change is idempotent and purely structural — it introduces no new diagnostics. Preview with --dry-run, script it with --format json.

Commercial packsctxgrd pack list --paid

Beyond the built-in packs, ctxgrd has room for commercial packs that bundle a specialised document standard. arc42 — the 12 canonical architecture-documentation sections as required headings — is the first. Commercial license, coming soon.

Wire into CIctxgrd hooks

Install a git pre-commit hook in one command — a lint failure aborts the commit. The same binary and exit codes drive your CI gate and editor LSP.

Project docs6 namespaces

ADR, PRD, RFC, BUG doc types plus the TODO state file and the README front door — engineering doc lifecycle with status vocabularies, required headings, and a README that links the entry guide.

Agent context1 namespace

AGENTS — the AGENTS.md cross-tool instruction standard (agents.md).

Claude Code3 namespaces

CLAUDE/CLAUDESKILLS/CLAUDEAGENTS — the files proprietary to Claude Code: the CLAUDE.md instruction file, .claude/skills SKILL.md definitions, and .claude/agents subagent definitions.

OpenAI Codex1 namespace

CODEXSKILLS — OpenAI Codex SKILL.md definitions (.codex/skills).

Gemini CLI1 namespace

GEMINI — the GEMINI.md instruction file Gemini CLI reads.

opencode1 namespace

OPENCODEAGENTS — opencode agent definitions (.opencode/agent/*.md), linted via the opencode.frontmatter rule.

Agent workflow3 namespaces

SPEC/TASK/PROMPT — ctxgrd's harness-neutral agent-development document pipeline: a SPEC is implemented via TASKs, and reusable PROMPTs are versioned.

Operations2 namespaces

RUN (runbooks) and PMR (postmortems) — the incident-management doc lifecycle, grounded in Google's SRE Book.

Security7 namespaces

Security-document lifecycle (THREAT/VULN/RISK/SECREV/DEPAUDIT) plus neutral governance (POLICY/ASSET) — framework-neutral evidence discipline, no certification intent.

Design system1 namespace

DESIGN.md structural linting — section order and token reference checks

Persona2 namespaces

SOUL.md/STYLE.md persona linting — section presence, order, and pairing

Guide1 namespace

GUIDE — end-user documentation typed by the Diátaxis taxonomy (tutorial/how-to/reference/explanation) with a required title, kept discoverable from the README.