home / skills / laurigates / claude-plugins / blueprint-adr-list

blueprint-adr-list skill

/blueprint-plugin/skills/blueprint-adr-list

This skill lists ADRs from the filesystem and renders a Markdown table with title, status, date, and domain for easy auditing.

npx playbooks add skill laurigates/claude-plugins --skill blueprint-adr-list

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.8 KB
---
model: haiku
created: 2026-01-29
modified: 2026-02-06
reviewed: 2026-02-06
description: "List all ADRs with title, status, date, and domain in a markdown table"
allowed-tools: Bash, Glob
name: blueprint-adr-list
---

List Architecture Decision Records dynamically from the filesystem.

**Use Case**: Generate ADR index tables for README files, audit ADR status, or quickly view all architectural decisions.

**Steps**:

## 1. Check for ADRs

```bash
ls docs/adrs/*.md 2>/dev/null | head -1
```

If no ADRs found:
```
No ADRs found in docs/adrs/
Run `/blueprint:derive-adr` to generate ADRs from project analysis.
```

## 2. Generate ADR Table

ADR formats vary: some use markdown headers (`## Status`, `## Date`), others use YAML frontmatter (`status:`, `date:`). The extraction handles both.

**Command to generate markdown table**:

```bash
printf "| ADR | Title | Status | Date |\n|-----|-------|--------|------|\n" && \
fd '^[0-9]{4}-.*\.md$' docs/adrs -x awk '
  # Extract title from H1 header
  /^# ADR-/ {gsub(/^# ADR-[0-9]+: /, ""); title=$0}

  # Extract status from ## Status section (next non-empty line)
  /^## Status/ {p_status=1; next}
  p_status && NF {status=$0; p_status=0}

  # Extract date from ## Date section (next non-empty line)
  /^## Date/ {p_date=1; next}
  p_date && NF {date=$0; p_date=0}

  # Fallback: YAML frontmatter fields
  /^status:/ && !status {gsub(/^status:[[:space:]]*/, ""); status=$0}
  /^date:/ && !date {gsub(/^date:[[:space:]]*/, ""); date=$0}

  END {
    # Extract ADR number from filename (path-depth independent)
    fname = FILENAME
    sub(/.*\//, "", fname)
    num = substr(fname, 1, 4)
    if (title == "") title = "(untitled)"
    if (status == "") status = "-"
    if (date == "") date = "-"
    printf "| [%s](%s) | %s | %s | %s |\n", num, FILENAME, title, status, date
  }
' {} | sort
```

## 3. Display Results

Output the generated table. Example:

```
| ADR | Title | Status | Date |
|-----|-------|--------|------|
| [0001](docs/adrs/0001-use-react.md) | Use React for Frontend | Accepted | 2024-01-15 |
| [0002](docs/adrs/0002-use-postgres.md) | Use PostgreSQL for Database | Accepted | 2024-01-20 |
| [0003](docs/adrs/0003-migrate-to-vite.md) | Migrate from CRA to Vite | Accepted | 2024-02-01 |
```

## 4. Optional: Extended Table with Domain

If domain tags are used, generate extended table:

```bash
printf "| ADR | Title | Status | Date | Domain |\n|-----|-------|--------|------|--------|\n" && \
fd '^[0-9]{4}-.*\.md$' docs/adrs -x awk '
  /^# ADR-/ {gsub(/^# ADR-[0-9]+: /, ""); title=$0}
  /^## Status/ {p_status=1; next}
  p_status && NF {status=$0; p_status=0}
  /^## Date/ {p_date=1; next}
  p_date && NF {date=$0; p_date=0}
  /^domain:/ {gsub(/^domain:[[:space:]]*/, ""); domain=$0}
  /^status:/ && !status {gsub(/^status:[[:space:]]*/, ""); status=$0}
  /^date:/ && !date {gsub(/^date:[[:space:]]*/, ""); date=$0}
  END {
    fname = FILENAME; sub(/.*\//, "", fname); num = substr(fname, 1, 4)
    if (title == "") title = "(untitled)"
    if (status == "") status = "-"
    if (date == "") date = "-"
    if (domain == "") domain = "-"
    printf "| [%s](%s) | %s | %s | %s | %s |\n", num, FILENAME, title, status, date, domain
  }
' {} | sort
```

## 5. Summary Statistics

After the table, show summary:

```bash
echo ""
echo "**Summary**:"
echo "- Total: $(fd '^[0-9]{4}-.*\.md$' docs/adrs | wc -l | tr -d ' ') ADRs"
echo "- Accepted: $(grep -rl '^Accepted$\|^status:.*Accepted' docs/adrs/*.md 2>/dev/null | wc -l | tr -d ' ')"
echo "- Superseded: $(grep -rl '^Superseded\|^status:.*Superseded' docs/adrs/*.md 2>/dev/null | wc -l | tr -d ' ')"
echo "- Deprecated: $(grep -rl '^Deprecated\|^status:.*Deprecated' docs/adrs/*.md 2>/dev/null | wc -l | tr -d ' ')"
```

**Tip**: Add the listing command to `docs/adrs/README.md` so anyone can regenerate the index. See the ADR README template generated by `/blueprint:derive-adr`.

Overview

This skill lists all Architecture Decision Records (ADRs) found under docs/adrs and outputs a Markdown table with ADR number, title, status, date, and optional domain. It is designed to produce a clean index for READMEs, audits, or quick overviews of architectural decisions. The output is generated dynamically by scanning files and extracting metadata from headers or YAML frontmatter.

How this skill works

The skill inspects files matching the pattern docs/adrs/NNNN-*.md and parses either markdown headers (e.g. # ADR-..., ## Status, ## Date) or YAML frontmatter fields (status:, date:, domain:). It builds a Markdown table row per ADR with a link to the file and fills missing values with placeholders. An optional extended mode adds a Domain column when domain tags are present. A short summary of totals and status counts is displayed after the table.

When to use it

  • Generate an ADR index for docs/adrs/README.md
  • Audit ADRs by status (Accepted, Superseded, Deprecated)
  • Quickly review recent ADR dates and titles
  • Create a portable Markdown table for project documentation
  • Add to CI or maintenance scripts to keep ADR index current

Best practices

  • Name ADR files with a 4-digit prefix (0001-...) so the scanner orders them predictably
  • Include either ## Status and ## Date sections or YAML frontmatter fields for reliable extraction
  • Use a domain: field when you want to enable the extended Domain column
  • Keep ADRs in docs/adrs to avoid changing the search path in the commands
  • Add the listing command to docs/adrs/README.md to make regeneration easy

Example use cases

  • Regenerate an ADR table before releasing project documentation
  • Run in a repository audit to count Accepted vs Superseded ADRs
  • Embed the table in a status page or architectural overview
  • Use in a pull request checklist to ensure new ADRs are indexed
  • Automate a docs check in CI to detect missing date or status fields

FAQ

What happens if an ADR is missing status or date?

The extractor inserts a hyphen (-) as a placeholder so the table stays well-formed and highlights missing metadata.

Can I include domain information?

Yes. If ADRs contain a domain: field the extended command produces a Domain column; otherwise it defaults to '-'.