decision-graph

decision-graph is a command for Claude Code from notactuallytreyanastasio/deciduous. It costs 12 tokens per session (3,755 once invoked), scanned B, original, Apache-2.0.

A command that builds a decision graph—a directed map showing how a codebase’s design choices changed over time—from its Git commit history.

In plain words
What is it for?
Use it to trace why design decisions were introduced, changed, or removed in a repository and to document their history.
Why use it?
It turns scattered commit messages, code, comments, and tests into a record of how the project evolved, while keeping the explanation grounded in the repository.

Command for Claude Code

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/notactuallytreyanastasio/deciduous/decision-graph
Clone the repo
git clone --depth 1 https://github.com/notactuallytreyanastasio/deciduous

Made for: Claude Code.

Wrote this? Show the measurements

A badge for your README with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them.

agentmods badge for decision-graph

README.md
[![agentmods](https://agentmods.dev/badge/commands/notactuallytreyanastasio/deciduous/decision-graph.svg)](https://agentmods.dev/commands/notactuallytreyanastasio/deciduous/decision-graph)
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,755 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00012 $0.03755
Opus 5 $0.00006 $0.01878
Sonnet 5 $0.00002 $0.00751
Haiku 4.5 $0.00001 $0.00376

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

Security

Grade B, and why

decision-graph scanned grade B with 1 finding 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 3d 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

allowed-tools: *
.claude/commands/decision-graph.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.

Decision Graph Construction

You are building a deciduous decision graph - a DAG that captures the evolution of design decisions in a codebase.

Target repository: $ARGUMENTS (if provided), otherwise the current directory.

Use the deciduous CLI (at ~/.cargo/bin/deciduous) to build the graph. Run deciduous commands in the current directory (not inside the source repo).

For git commands to explore commit history, use git -C <repo-path> to target the source repo.

CRITICAL: Only use information from the repository itself (commits, code, comments, tests). Do not use your prior knowledge about the project. Everything must be grounded in what you find in the repo.

Commit Exploration

Use a layered strategy to find all relevant commits:

Layer 1: See all commits. Start with the full list when building narratives.

git log --oneline --after="..." --before="..." -- path/

Layer 2: Keyword expansion. Once you have narratives, search for spelling variations and related terms you might have missed (e.g., "cache" -> "caching", "cached", "LRU", "invalidate"). For each key identifier in your narratives, trace its full lifecycle:

  • Introduction
  • Changes and modifications
  • Renames
  • Deprecation or removal
  • Replacement by other mechanisms
  • Becoming stable/public API

If there's a feature flag controlling the feature, search for commits mentioning that flag.

Layer 3: Follow authors. If a narrative has a key author, check their commits +/-1 month from known commits. They often work on related things.

Layer 4: Pull request context. If the gh CLI is available, use it to find PRs associated with key commits and paths. PRs often contain design discussion, review comments, and rationale that never appears in commit messages.

# Find PRs that touched a specific path
gh pr list --state merged --search "path/to/module" --limit 50

# Find the PR that introduced a specific commit
gh pr list --state merged --search "<commit-sha>" --limit 5

# Read PR description and review comments for context
gh pr view <pr-number>
gh api repos/{owner}/{repo}/pulls/<pr-number>/comments

# Search PR titles/bodies for keywords from your narratives
gh pr list --state merged --search "<keyword>" --limit 30

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. 3d ago First seen · 396 lines · 0 tokens per session scan B 4a4a918ed16c

Subscribe to this mod's changes

decision-graph is a command published in the GitHub repository notactuallytreyanastasio/deciduous (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 12 tokens to every session and 3,755 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.