plugins/ruflo-adr/skills/adr-index/SKILL.md
Build or rebuild the full ADR index and dependency graph in AgentDB from the docs/adr/ directory.
After importing ADRs from another project, when the AgentDB graph is out of sync, or when bootstrapping ADR tracking on an existing codebase that already has ADR files.
Scan directory -- Glob for docs/adr/ADR-*.md to find all ADR files. If no files found, report that no ADRs exist yet.
Parse each ADR -- Read each file and extract:
ADR-042 from ADR-042-use-postgres.md)# ADR-NNN: <Title> heading**Status**: line**Date**: line**Tags**: line## Links section (supersedes, amended-by, related)Store in AgentDB -- For each ADR, call mcp__claude-flow__agentdb_hierarchical-store with:
adr/<adr-id>{ "id": "<id>", "title": "<title>", "status": "<status>", "date": "<date>", "tags": "<tags>", "file": "<filepath>" }Build causal edges -- For each ADR with links:
mcp__claude-flow__agentdb_causal-edge with from: ADR-XXX, to: <current>, relation: supersedesmcp__claude-flow__agentdb_causal-edge with from: <current>, to: ADR-YYY, relation: amendsmcp__claude-flow__agentdb_causal-edge with from: <current>, to: ADR-ZZZ, relation: relatedmcp__claude-flow__agentdb_causal-edge with from: <current>, to: ADR-WWW, relation: depends-onStore in memory -- For each ADR, call mcp__claude-flow__memory_store with:
adr-patterns<adr-id><title> — <first paragraph of Context section>
This enables semantic search across ADRs.Verify graph -- Call mcp__claude-flow__agentdb_causal-query to retrieve all edges and verify:
Report -- Output a summary:
## ADR Index Summary
Total ADRs: N
- Proposed: X
- Accepted: Y
- Deprecated: Z
- Superseded: W
Relationships: M edges
- Supersedes: A
- Amends: B
- Depends-on: C
- Related: D
Issues found: (list any dangling refs or status mismatches)