As a project grows, architecture decisions evolve. In this scenario, ADR-0002 (PostgreSQL) is superseded by ADR-0003 (Event Sourcing with PostgreSQL & Redpanda). The project lead marks ADR-0002 as superseded and exports deterministic Mermaid (relationships.mmd) and SVG (relationships.svg) graph artifacts to visualize decision lineages across the repository.
# 1. Supersede ADR-0002 with ADR-0003
python skills/adr-toolkit/scripts/adr.py supersede 2 --by 3 --dir docs/decisions --json
# 2. Export Mermaid and SVG relationship graph artifacts
python skills/adr-toolkit/scripts/adr.py graph --dir docs/decisions --format both --json
# 3. Update index (automatically embeds Mermaid graph in README.md)
python skills/adr-toolkit/scripts/adr.py index --dir docs/decisions --jsonsupersedevalidates the status transition, updatesADR-0002frontmatter status tosupersededwithsuperseded_by: ADR-0003, and addssupersedes: ADR-0002toADR-0003.graphparsessupersedesandrelatedrelationships from all ADRs, writing deterministicdocs/decisions/relationships.mmd(Mermaid) anddocs/decisions/relationships.svg(Python-rendered SVG, crisp on zoom with zero external dependencies).indexregeneratesdocs/decisions/README.mdand embeds the Mermaid navigation graph directly into the Markdown index.
{
"ok": true,
"operation": "supersede",
"dry_run": false,
"updated": [
"docs/decisions/0002-use-postgresql-for-persistence.md",
"docs/decisions/0003-use-event-sourcing-with-redpanda.md"
],
"old_id": "ADR-0002",
"new_id": "ADR-0003",
"warnings": []
}{
"ok": true,
"operation": "graph",
"format": "both",
"artifacts": [
"docs/decisions/relationships.mmd",
"docs/decisions/relationships.svg"
],
"edges_count": 1,
"warnings": []
}flowchart TD
ADR-0002["ADR-0002: Use PostgreSQL for persistence (Superseded)"]
ADR-0003["ADR-0003: Use Event Sourcing with Redpanda (Accepted)"]
ADR-0003 -->|supersedes| ADR-0002