adr-search

A command for searching Architectural Decision Records, documents that record important technical choices, by text, status, tags, or date.

In plain words
What is it for?
Use it to find decisions about a topic, list accepted or proposed records, filter by dates or tags, and return results as standard text, detailed text, or JSON.
Why use it?
It helps locate relevant decisions without opening and reading every record.

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-search
Clone the repo
git clone --depth 1 https://github.com/zircote-plugins/adr
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 789 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.00015 $0.00789
Opus 5 $0.00008 $0.00394
Sonnet 5 $0.00003 $0.00158
Haiku 4.5 $0.00002 $0.00079

Measured 2d ago against content hash 316fb367a80f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

adr-search 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 2d ago.

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-search.md · 146 lines

How it starts

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

Search ADRs

Search Architectural Decision Records by content, status, tags, or date range.

Process

  1. Parse search arguments
  2. Build search criteria
  3. Search ADR files
  4. Rank and filter results
  5. Display matches with context

Argument Parsing

Supported arguments:

  • <query>: Text to search for in ADR content
  • --status=<status>: Filter by status
  • --since=<date>: ADRs created/modified since date
  • --until=<date>: ADRs created/modified until date
  • --tag=<tag>: Filter by tag (if tags are used)
  • --format=<format>: Output format (default, verbose, json)

Search Modes

Full-Text Search

Search across all ADR content:

  • Title
  • Context
  • Decision
  • Consequences
  • Options (if present)

Use Grep to find matches, then parse files for context.

Status Filter

Filter by decision status:

/adr-search --status=accepted
/adr-search --status=proposed

Date Range

Filter by date:

/adr-search --since=2024-01-01  # Or relative: --since=30d
/adr-search --since=30d  # Last 30 days

Combined Search

Combine criteria:

/adr-search "postgresql" --status=accepted --since=90d

Search Output

Default Format

Show matches with context:

Found 3 ADRs matching "database":

ADR-0001: Use PostgreSQL for Primary Storage [accepted]
  ...we chose PostgreSQL as our primary **database**...
  File: docs/adr/0001-use-postgresql.md

ADR-0007: Database Connection Pooling [accepted]
  ...the **database** connection pooling strategy...
  File: docs/adr/0007-database-connection-pooling.md

ADR-0012: Database Migration Strategy [proposed]
  ...approach for **database** schema migrations...
  File: docs/adr/0012-database-migration-strategy.md

Verbose Format

Include more context per match:

  • Full title
  • Status and date
  • All matching excerpts
  • Related ADRs

JSON Format

Structured output for tooling:

{
  "query": "database",
  "filters": {"status": "accepted"},
  "results": [
    {
      "id": "0001",
      "title": "Use PostgreSQL for Primary Storage",
      "status": "accepted",
      "file": "docs/adr/0001-use-postgresql.md",
      "matches": [
        {"section": "Context", "excerpt": "...primary database..."}
      ]
    }
  ],
  "total": 3
}

Read the full file on GitHub · 146 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. 2d ago First seen · 146 lines · 15 tokens per session scan A 316fb367a80f

Subscribe to this mod's changes

adr-search is a command published in the GitHub repository zircote-plugins/adr (5 stars, last pushed 15d ago), licensed MIT. It adds 15 tokens to every session and 789 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.