adr-rubber-duck

adr-rubber-duck is a command for coding agents from classmethod/tsumiki. It costs 33 tokens per session (4,738 once invoked), scanned A, original, MIT.

A conversational assistant for writing an Architecture Decision Record, or ADR—a document that records an important technical choice, its context, alternatives, reasons, and effects.

In plain words
What is it for?
Use it to review prior decisions, explore constraints and trade-offs, conduct an interview, and create a numbered ADR draft in docs/adr/.
Why use it?
It turns a vague architecture question into a documented decision by asking focused questions and checking existing ADRs.

Command

Part of the tsumiki plugin — 12 skills, 17 commands, 10 agents, 1 plugin shipped together

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/classmethod/tsumiki/adr-rubber-duck
Clone the repo
git clone --depth 1 https://github.com/classmethod/tsumiki

Or install tsumiki, the plugin that ships this one along with the rest of its 12 skills, 17 commands, 10 agents, 1 plugin.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adr-rubber-duck

README.md
[![agentmods](https://agentmods.dev/badge/commands/classmethod/tsumiki/adr-rubber-duck.svg)](https://agentmods.dev/commands/classmethod/tsumiki/adr-rubber-duck)
Your own site
<a href="https://agentmods.dev/commands/classmethod/tsumiki/adr-rubber-duck"><img src="https://agentmods.dev/badge/commands/classmethod/tsumiki/adr-rubber-duck.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,738 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.00033 $0.04738
Opus 5 $0.00016 $0.02369
Sonnet 5 $0.00007 $0.00948
Haiku 4.5 $0.00003 $0.00474

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

Security

Grade A, and why

adr-rubber-duck 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 4d 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-rubber-duck.md · 396 lines

How it starts

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

ざっくりとしたアーキテクチャ上の決定事項を聞きながら、AskUserQuestion を中心としたヒアリングで背景・制約・選択肢・トレードオフを根掘り葉掘り深掘りし、ADRドラフトを docs/adr/ に作成します。

context

ADR出力ディレクトリ="docs/adr" セッションディレクトリ="docs/adr/.sessions" カレントディレクトリ={{プロジェクトルート}} セッションファイル="" ADR番号="" ADRファイル名="" イテレーション回数=0 最大イテレーション=15 既存ADR一覧=[] 置き換え候補ADR=[] 置き換え対象ADR=[] ヒアリング結果={背景と課題: "", 制約条件: [], 検討した選択肢: [], 決定: "", 決定理由: "", 影響: []} 調査結果=[]

steps

step1: 初期トピックの受け取り

  • $1 がある場合、初期トピックとして記録する
  • $1 がない場合、ユーザーに「どのようなアーキテクチャ上の決定について検討したいですか?(ざっくりで構いません)」と尋ねる
  • step2 を実行する

step2: 既存ADRのスキャンとセッション初期化

  • {{ADR出力ディレクトリ}} を Glob(docs/adr/*.md)で検索し、既存ADR一覧を作成する
    • 各ADRのファイル名・タイトル・ステータスを Read で確認する(ファイル数が多い場合は Task に委譲する)
    • 既存ADRの最大番号 +1 を今回の ADR番号 とする(4桁ゼロ埋め。既存ADRがなければ 0001)
  • 初期トピックと関連しそうな既存ADRがあれば 置き換え候補ADR として記録する(この時点では確定しない)
  • セッションファイルを作成する
    • {{セッションディレクトリ}} がなければ作成する
    • トピックを 内容の英語化ルール に従って英語スラッグ化する
    • セッションファイル名を "{{セッションディレクトリ}}/{{timestamp}}_{{スラッグ}}.md" とする
      • 例: docs/adr/.sessions/20260706123456_use_postgresql.md
    • <session_template> の形式で初期情報を記録する
  • step3 を実行する

step3: ヒアリングループ(深掘り)

  • イテレーション回数を +1 する
  • ヒアリング観点ルール に従い、現在最も不足している観点を特定する
  • AskUserQuestion で観点に沿った質問を行う(1回につき最大4問)
    • 選択肢は具体的に書き、ユーザーが選ぶだけで答えられるようにする
    • 自由記述が必要な深い理由・背景は「Other」で受けるか、テキストで補足質問する
  • 回答を受けて、さらに深掘りが必要なら追加の AskUserQuestion を行う
    • 「なぜそれが必要か」「それが満たされないと何が起きるか」まで掘り下げる
  • 必要に応じて以下の調査を実施する:
    • コードベース調査: Task/Grep/Read で現状のアーキテクチャ・依存関係・影響範囲を確認
    • 技術調査: WebSearch/WebFetch で選択肢の比較情報・ベストプラクティスを収集
    • 調査結果は選択肢の長所・短所の裏付けとして 調査結果 に記録する
  • 新しい情報を ヒアリング結果 に統合する
  • セッションファイルを更新する(対話の要点・整理された内容・調査結果を追記)
  • 次のアクションを判断するルール に基づいて判断し、該当するステップに進む

step4: 置き換え対象ADRの確認

  • 置き換え候補ADR とヒアリング結果を突き合わせ、今回の決定によって無効化・上書きされる既存ADRを洗い出す
  • 候補がある場合、AskUserQuestion で各候補が置き換え対象かどうかをユーザーに確認する
    • 候補のタイトル・現在のステータス・今回の決定との関係を提示する
  • 候補がない場合も「置き換えるべき既存ADRはありませんか?」と既存ADR一覧を提示して確認する
  • 確定したものを 置き換え対象ADR に記録する
  • step5 を実行する

step5: ADRドラフト作成

  • <adr_template> の形式で ADRドラフトを作成する
    • ステータスは「ドラフト」とする
    • 署名欄は「(未署名)」とする
    • 検討した選択肢には、採用しなかった選択肢も長所・短所付きで必ず記載する
    • 置き換え対象ADR があれば「置き換えるADR」セクションに番号・タイトル付きで記載する。なければ「なし」と記載する
  • ADRファイル名を "{{ADR出力ディレクトリ}}/{{ADR番号}}-{{スラッグ}}.md" として Write で出力する
    • 例: docs/adr/0005-use-postgresql.md
  • 置き換え対象の既存ADRファイルは更新しない(新ADRはまだドラフトのため)
  • セッションファイルに完成したADRへのパスとサマリーを追記する
  • step6 を実行する

Read the full file on GitHub · 396 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. 4d ago First seen · 396 lines · 33 tokens per session scan A 70ef019abdd5

Subscribe to this mod's changes

adr-rubber-duck is a command published in the GitHub repository classmethod/tsumiki (972 stars, last pushed 28d ago), licensed MIT. It adds 33 tokens to every session and 4,738 once invoked, about $0.0002 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-30.