ruvnet/ruflo/tree/main/plugins/ruflo-adr
ruflo-adr
ADR のライフサイクル管理——作成、インデックス化、整合、置き換え、コンプライアンス確認を行い、AgentDB の階層ストアと因果エッジ(supersedes/amends/depends-on/related)で Architecture Decision Record をコードにリンクします
この mod について
ruflo-adr
概要
Architecture Decision Record を提案、承認、非推奨、置き換え済みというライフサイクル全体で管理します。ADR は docs/adr/ の markdown ファイルとして保存し、supersedes/amends/depends-on の関係を追跡する因果エッジとともに AgentDB にインデックスします。git diff をスキャンするコンプライアンスチェックと、ディスクから削除された ADR(#2666)を調整する adr-reindex も含みます。
インストール
claude --plugin-dir plugins/ruflo-adr
Agents
| Agent | モデル | 役割 |
|-------|--------|------|
| adr-architect | sonnet | ADR ライフサイクル管理、grep/blame によるコードと ADR のリンク、AgentDB グラフストレージ |
Skills
| Skill | 使い方 | 説明 |
|-------|--------|------|
| adr-create | /adr-create <title> | 連番を付けて AgentDB に登録した新しい ADR を作成 |
| adr-index | /adr-index | AgentDB の ADR インデックスと依存関係グラフを構築または再構築(追加・更新のみ——削除はしない) |
| adr-review | /adr-review [--branch BRANCH] | 承認済み ADR に照らしてコード変更をレビューし、コンプライアンス違反を確認 |
| adr-verify | /adr-verify | adr-patterns + adr-edges 名前空間を読み返し、孤立参照、置き換えサイクル、ステータスの不一致を表示。サイクルがある場合は終了コード 1 |
| adr-reindex | /adr-reindex | 削除された ADR ファイルを調整:現在ディスクにある内容から adr-patterns + adr-edges を削除して再構築 |
コマンド(7 サブコマンド)
# ライフサイクル
adr create <title>
adr list
adr status <adr-id> <new-status>
adr supersede <old-id> <new-id>
# コンプライアンス
adr check # 最近の git 変更をスキャンして ADR 違反を確認
adr graph # ADR の依存関係グラフを表示
adr search <query> # ADR 全体を意味検索
ADR ライフサイクル
proposed --> accepted --> deprecated
\--> superseded by ADR-XXX
因果エッジとして追跡する関係:supersedes、amends、depends-on、related。
本文の関係フィールドでは **Amends by scope**: や **Depends-on / confirms**: のような修飾子を使えます。Relates は Related の別名です。折り返されたリストは、ADR 参照(Markdown リンクを含む)と区切り文字だけを含む行で継続できます。説明文の続きは関係としてスキャンされないため、追加の関係は別の太字フィールドで宣言してください。
互換性
- CLI:
@claude-flow/cliの v3.6 major+minor に固定されています。 - 検証:
bash plugins/ruflo-adr/scripts/smoke.shが契約です。
名前空間の連携
このプラグインは adr-patterns AgentDB 名前空間を所有します。命名規則は ruflo-agentdb ADR-0001 "Namespace convention" に従います。予約済み名前空間(pattern、claude-memories、default)を上書きしてはいけません。
adr-patterns は規約に従い、kebab-case の <plugin-stem>-<intent> を使います。ruflo-intelligence の hooks_transfer を通じた意味 ADR 検索とプロジェクト間のパターン転送に利用されます。
検証
bash plugins/ruflo-adr/scripts/smoke.sh
# 期待値:"22 passed, 0 failed"
アーキテクチャ決定
ADR-0001—— ruflo-adr プラグイン契約(ピン留め、名前空間の連携、smoke を契約化)ADR-0002—— 削除された ADR の調整(ハード削除プリミティブ + 削除して再構築する reindex)
関連プラグイン
ruflo-agentdb—— 名前空間規約の所有者。ADR グラフのバックエンドストアruflo-ddd—— ドメインの決定を ADR として記録ruflo-sparc—— アーキテクチャフェーズ(Phase 3)で ADR を生成ruflo-migrations—— スキーマ変更の決定を ADR として記録ruflo-jujutsu—— PR の ADR 対応差分分析ruflo-intelligence——hooks_transferが ADR パターンをプロジェクト間で転送
ライセンス
MIT
mod として
ADR には関数フック mod も含まれます(ADR-445 パターン。hooks/ のフックをプラグインとともに読み込みます)。ネットワーク、プロセス、モデル呼び出しは行いません。
- Guard(デフォルトで有効):
adr*名前空間への ADR 書き込み(agentdb_hierarchical-store、agentdb_causal-edge、memory_store)にキー、トークン、パスワードが含まれる場合は拒否します。締め付けのみを行い、セッションが拒否するものを許可することはありません。拒否時に秘密情報を繰り返しません。guardオプションで無効化できます。 /adr-mod: ローカルで応答します。/adr-mod status、/adr-mod scan <text>、/adr-mod format。- ステータスファイル:
.claude-flow/adr-mod/status.json(version、updatedMs、カウンター)をセッション開始時と拒否が発生するたびに書き込みます。コンソールが読み取ります。 - オプション(
userConfig):guard(デフォルトでオン)。
テスト:claude plugin validate plugins/ruflo-adr、claude plugin test plugins/ruflo-adr、bash plugins/ruflo-adr/scripts/smoke.sh。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add ruvnet/ruflo claude plugin install ruflo-adr
原文 / README
ruflo-adr
ADR lifecycle management -- create, index, reconcile, supersede, and link Architecture Decision Records to code.
Overview
Manages Architecture Decision Records through their full lifecycle (proposed, accepted, deprecated, superseded). ADRs are stored as markdown files in docs/adr/ and indexed in AgentDB with causal edges tracking supersedes/amends/depends-on relationships. Includes compliance checking that scans git diffs for ADR violations, and reconciliation (adr-reindex) for ADRs deleted from disk (#2666).
Installation
claude --plugin-dir plugins/ruflo-adr
Agents
| Agent | Model | Role |
|-------|-------|------|
| adr-architect | sonnet | ADR lifecycle management, code-ADR linking via grep/blame, AgentDB graph storage |
Skills
| Skill | Usage | Description |
|-------|-------|-------------|
| adr-create | /adr-create <title> | Create a new ADR with sequential numbering and AgentDB registration |
| adr-index | /adr-index | Build or rebuild the ADR index and dependency graph in AgentDB (add/update only — never removes) |
| adr-review | /adr-review [--branch BRANCH] | Review code changes against accepted ADRs for compliance violations |
| adr-verify | /adr-verify | Read back adr-patterns + adr-edges namespaces, surface dangling refs / supersede cycles / status mismatches; exits 1 on cycles |
| adr-reindex | /adr-reindex | Reconcile a deleted ADR file: drop-and-rebuild adr-patterns + adr-edges from what's on disk right now |
Commands (7 subcommands)
# Lifecycle
adr create <title>
adr list
adr status <adr-id> <new-status>
adr supersede <old-id> <new-id>
# Compliance
adr check # Scan recent git changes for ADR violations
adr graph # Show ADR dependency graph
adr search <query> # Semantic search across ADRs
ADR Lifecycle
proposed --> accepted --> deprecated
\--> superseded by ADR-XXX
Relationships tracked as causal edges: supersedes, amends, depends-on, related.
Body relationship fields accept qualifiers such as **Amends by scope**: or
**Depends-on / confirms**:, and Relates is an alias for Related. Wrapped
lists may continue on lines containing only ADR references (including Markdown
links) and separators. Narrative continuation is not scanned for relationships;
declare additional relationships in another bold field.
Compatibility
- CLI: pinned to
@claude-flow/cliv3.6 major+minor. - Verification:
bash plugins/ruflo-adr/scripts/smoke.shis the contract.
Namespace coordination
This plugin owns the adr-patterns AgentDB namespace. It defers to ruflo-agentdb ADR-0001 §"Namespace convention" for naming rules. Reserved namespaces (pattern, claude-memories, default) MUST NOT be shadowed.
adr-patterns follows kebab-case <plugin-stem>-<intent> per the convention. The plugin uses it for semantic ADR search and for cross-project pattern transfer (via hooks_transfer in ruflo-intelligence).
Verification
bash plugins/ruflo-adr/scripts/smoke.sh
# Expected: "22 passed, 0 failed"
Architecture Decisions
ADR-0001— ruflo-adr plugin contract (pinning, namespace coordination, smoke as contract)ADR-0002— Reconcile deleted ADRs (hard-delete primitive + drop-and-rebuild reindex)
Related Plugins
ruflo-agentdb— namespace convention owner; backing store for the ADR graphruflo-ddd— document domain decisions as ADRsruflo-sparc— Architecture phase (Phase 3) produces ADRsruflo-migrations— schema change decisions recorded as ADRsruflo-jujutsu— ADR-aware diff analysis on PRsruflo-intelligence—hooks_transferships ADR patterns across projects
License
MIT
As a mod
ADR also ships as a function-hook mod (ADR-445 pattern; hooks in hooks/, loaded with the plugin). No network, no process, no model call.
- Guard (default on): refuses an ADR write (
agentdb_hierarchical-store,agentdb_causal-edgeormemory_storeinto anadr*namespace) that holds a key, token or password. It only tightens: it never allows anything the session would deny, and the refusal never repeats the secret. Turn it off with theguardoption. /adr-mod: answered locally./adr-mod status,/adr-mod scan <text>,/adr-mod format.- Status file:
.claude-flow/adr-mod/status.json(version,updatedMs, counters), written at session start and whenever a call is refused; the console reads it. - Options (
userConfig):guard(onby default).
Test: claude plugin validate plugins/ruflo-adr, claude plugin test plugins/ruflo-adr, and bash plugins/ruflo-adr/scripts/smoke.sh.
