adr-export

A command for converting Architectural Decision Records (ADRs) into shareable HTML, JSON, or PDF files.

In plain words
What is it for?
Use it to export all or selected ADRs, filter by status, combine them into one file, and choose an output location.
Why use it?
It makes decision documents easier to publish, distribute, or archive outside the original project files.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/zircote-plugins/adr/adr-export
Clone the repo
git clone --depth 1 https://github.com/zircote-plugins/adr
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,063 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.01063
Opus 5 $0.00007 $0.00531
Sonnet 5 $0.00003 $0.00213
Haiku 4.5 $0.00001 $0.00106

Measured yesterday against content hash 4bea33f6fdec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

adr-export scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/adr-export.md · 208 lines

How it starts

The opening of the file, as written. The whole thing — 208 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Export ADRs

Export Architectural Decision Records to HTML, JSON, or PDF format for sharing, documentation sites, or archival.

Process

  1. Parse export options
  2. Read all ADRs
  3. Parse and structure content
  4. Generate output in specified format
  5. Write to output location

Argument Parsing

Supported arguments:

  • --format=<format>: Output format (html, json, pdf)
  • --output=<path>: Output directory or file
  • --filter=<status>: Only export ADRs with status
  • --single: Export as single combined file
  • --ids=<ids>: Export specific ADRs (comma-separated)

Default: HTML format to {adr_path}/export/

HTML Export

Single ADR Export

Convert each ADR to styled HTML:

  • Apply CSS styling
  • Add status badges
  • Format code blocks
  • Include navigation links

Combined Export

Create single HTML document:

  • Table of contents
  • All ADRs in sequence
  • Status filtering
  • Search functionality (if JavaScript enabled)

Styling

Apply project styling or defaults:

  • Status badge colors
  • Typography
  • Responsive layout
  • Print-friendly styles

Example HTML structure:

<!DOCTYPE html>
<html>
<head>
  <title>Architecture Decision Records</title>
  <style>/* ADR styles */</style>
</head>
<body>
  <header>
    <h1>Architecture Decision Records</h1>
    <nav><!-- TOC --></nav>
  </header>
  <main>
    <article id="adr-0001">
      <span class="badge badge-accepted">Accepted</span>
      <h2>ADR-0001: Use PostgreSQL</h2>
      <!-- Content -->
    </article>
  </main>
</body>
</html>

JSON Export

Export structured data for tooling integration.

Schema: See ${CLAUDE_PLUGIN_ROOT}/schemas/adr-export.schema.json for the full JSON schema.

{
  "metadata": {
    "project": "Project Name",
    "exported": "{ISO-8601-timestamp}",
    "total": 25
  },
  "adrs": [
    {
      "id": "0001",
      "title": "Use PostgreSQL for Primary Storage",
      "slug": "use-postgresql-for-primary-storage",
      "status": "accepted",
      "date": "{date}",
      "format": "madr",
      "file": "docs/adr/0001-use-postgresql.md",
      "sections": {
        "context": "...",
        "decision": "...",
        "consequences": ["...", "..."]
      },
      "links": {
        "supersedes": [],
        "superseded_by": null,
        "relates_to": ["0003", "0007"]
      }
    }
  ],
  "statistics": {
    "by_status": {
      "accepted": 20,
      "proposed": 3,
      "deprecated": 1,
      "superseded": 1
    },
    "by_month": {
      "2025-01": 5,
      "2024-12": 3
    }
  }
}

Read the full file on GitHub · 208 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 208 lines · 14 tokens per session scan A 4bea33f6fdec

Subscribe to this mod's changes

adr-export is a command published in the GitHub repository zircote-plugins/adr (5 stars, last pushed 14d ago), licensed MIT. It adds 14 tokens to every session and 1,063 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.