whodecided AGENTS.md

whodecided AGENTS.md is an instructions file for Codex, OpenCode from zhu-kai/whodecided. It costs 1,331 tokens per session, scanned C, original, MIT.

Repository instructions for Whodecided, a TypeScript command-line tool that records coding decisions in plain-text files and feeds approved decisions back to coding agents.

In plain words
What is it for?
Use it when building, testing, running, or modifying Whodecided, especially its decision ledger, command-line interface, and storage rules.
Why use it?
It gives contributors the commands, project structure, and rules needed to change the tool without breaking its decision record or design limits.

Instructions file for CodexOpenCode

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 instructions/zhu-kai/whodecided/agents-md
Clone the repo
git clone --depth 1 https://github.com/zhu-kai/whodecided

Made for: Codex, OpenCode.

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 whodecided AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zhu-kai/whodecided/agents-md.svg)](https://agentmods.dev/instructions/zhu-kai/whodecided/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/zhu-kai/whodecided/agents-md"><img src="https://agentmods.dev/badge/instructions/zhu-kai/whodecided/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,331 This file is loaded in full into every session.
When invoked 1,331 The same file — it is already loaded in full.
Security scan C 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.01331 $0.01331
Opus 5 $0.00665 $0.00665
Sonnet 5 $0.00266 $0.00266
Haiku 4.5 $0.00133 $0.00133

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

Security

Grade C, and why

whodecided AGENTS.md scanned grade C 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 5d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Data sovereignty.** Truth is plain text in `.wdd/`. `rm -rf` the tool and everything stays readable with cat/jq/grep.
AGENTS.md · 64 lines

How it starts

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

AGENTS.md

Guidance for AI agents and contributors working on whodecided itself.

What this is

A thin TypeScript CLI that distills the decisions an AI coding agent (and you) made inside Claude Code / Codex sessions into an append-only, ratifiable ledger, then feeds ratified precedent back to agents. "Common law for agentic coding."

The product is: a schema + a discardable CLI + a .wdd/ directory of plain text inside the user's repo. git, claude -p/codex exec, and the browser are shelled out. The tool holds no state of its own.

Build / test / run

npm run build      # tsc → dist/
npm test           # vitest (unit tests live next to sources as *.test.ts)
node dist/cli.js --help
  • Node ≥ 20, ESM ("type": "module" → import paths use .js).
  • Single runtime dependency: yaml. Do not add more; argv parsing and everything else is stdlib.
  • dist/ and planning/ are gitignored. Design docs (SPEC.md, REVIEW-SPEC.md, CROSS-REVIEW.md) live in planning/ — read them for the full rationale; they are not published.

Architecture

Read-only pipeline with exactly two write points (distill → ledger, ratify → ledger):

cli.ts → commands/*            command routing + orchestration
  transcript/  locate + parse  CC (~/.claude/projects) and Codex (~/.codex/sessions rollouts) → SessionEvent[]
  extract/     candidates      deterministic decision candidates + aware heuristics (NO LLM)
  distill/     detect + distiller   auto-detect claude/codex (config wins, sessions vote) → subprocess → LedgerEntry[] (schema-validated, retry, degrade)
  ledger/      schema + io      append-only jsonl read/write; verdictOf/isPinned/noteOf
  patch/       apply            THE single write path: validate → append ratify lines → (opt) commit
  ledger/      evidence         persisted (redacted) transcript excerpt per decision, keyed by ref
  extract/     redact           mask secrets before a slice reaches the distiller or evidence
  checks/      gate diff-signals risk supersede coverage   pure triage signals over ledger/diff/traces
  commands/    signals          assembles branch diff + per-decision signals for review/board/report
  render/      term/md/html     terminal docket / PR markdown / single-file workbench (Timeline + Threads tabs, keyboard review, change map, per-decision diff, triage)
  config.ts git.ts jsonl.ts validate.ts   infra (git.ts: branchDiff/churn/productFiles)

Read the full file on GitHub · 64 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. 5d ago First seen · 64 lines · 1,331 tokens per session scan C a18ae20ff94c

Subscribe to this mod's changes

whodecided AGENTS.md is an instructions file published in the GitHub repository zhu-kai/whodecided (22 stars, last pushed 1mo ago), licensed MIT. It adds 1,331 tokens to every session, about $0.0067 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.