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.
built by aktagon.com
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.
$ ctxgrd init Created ctxgrd.toml $ ctxgrd pack add agents Added pack 'agents' — 5 namespaces, 4 rule families. $ ctxgrd error[core.cross-ref]: cross-reference 'ADR-007' does not resolve to a known document --> docs/adrs/ADR-013.md:14:5 | 14 | Per ADR-007, the rule compiler is pure, so its output is cacheable. | ^^^^^^^ | help: use an existing ID, or mark retired with ~~ADR-007~~ found: 1 error · 0 warnings
Lint your context. · Markdown only. On purpose.
Every capability
The whole workflow — bootstrap a config, scaffold records, lint, track the pipeline, keep docs fresh — in one command-line tool.
A single Rust binary — no runtime, no daemon. Install from the public GitHub repo, or drop a prebuilt release binary on your PATH.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
What it checks
Rules ship as packs — each a bundle of namespaces, one per document type. Point ctxgrd at a tree and every file is linted against its type.
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.
AGENTS — the AGENTS.md cross-tool instruction standard (agents.md).
CLAUDE/CLAUDESKILLS/CLAUDEAGENTS — the files proprietary to Claude Code: the CLAUDE.md instruction file, .claude/skills SKILL.md definitions, and .claude/agents subagent definitions.
CODEXSKILLS — OpenAI Codex SKILL.md definitions (.codex/skills).
GEMINI — the GEMINI.md instruction file Gemini CLI reads.
OPENCODEAGENTS — opencode agent definitions (.opencode/agent/*.md), linted via the opencode.frontmatter rule.
SPEC/TASK/PROMPT — ctxgrd's harness-neutral agent-development document pipeline: a SPEC is implemented via TASKs, and reusable PROMPTs are versioned.
RUN (runbooks) and PMR (postmortems) — the incident-management doc lifecycle, grounded in Google's SRE Book.
Security-document lifecycle (THREAT/VULN/RISK/SECREV/DEPAUDIT) plus neutral governance (POLICY/ASSET) — framework-neutral evidence discipline, no certification intent.
DESIGN.md structural linting — section order and token reference checks
SOUL.md/STYLE.md persona linting — section presence, order, and pairing
GUIDE — end-user documentation typed by the Diátaxis taxonomy (tutorial/how-to/reference/explanation) with a required title, kept discoverable from the README.