write-decision

write-decision is a command for Claude Code, OpenCode from juliusz-cwiakalski/agentic-delivery-os. It costs 27 tokens per session (4,795 once invoked), scanned A, original, MIT.

A command that creates a decision record explaining an important project or technical choice and its reasoning. It supports several record types, including ADRs, which are documents for recording architecture decisions.

In plain words
What is it for?
Use it to write or update records for architecture, product, technical, business, or organisational decisions, with the amount of detail matched to the required level of review.
Why use it?
It keeps the reasoning behind a decision available to future developers instead of leaving it only in conversations or undocumented context. Larger decisions can follow a review flow before being accepted.

Command for Claude CodeOpenCode

Written for Claude Code and OpenCode: $ARGUMENTS substitution, but also installed under .opencode/. Also seen: agent in frontmatter; positional $N argument; mentions OpenCode.

Good fit Use it to write or update records for architecture, product, technical, business, or organisational decisions, with the amount of detail matched to the required level of review.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/juliusz-cwiakalski/agentic-delivery-os/write-decision
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.

Clone the repo
git clone --depth 1 https://github.com/juliusz-cwiakalski/agentic-delivery-os

Made for: Claude Code, 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 write-decision

README.md
[![agentmods](https://agentmods.dev/badge/commands/juliusz-cwiakalski/agentic-delivery-os/write-decision/github.svg)](https://agentmods.dev/commands/juliusz-cwiakalski/agentic-delivery-os/write-decision)
Your own site
<a href="https://agentmods.dev/commands/juliusz-cwiakalski/agentic-delivery-os/write-decision"><img src="https://agentmods.dev/badge/commands/juliusz-cwiakalski/agentic-delivery-os/write-decision/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for write-decision

Your own site · 80×15
<a href="https://agentmods.dev/commands/juliusz-cwiakalski/agentic-delivery-os/write-decision"><img src="https://agentmods.dev/badge/commands/juliusz-cwiakalski/agentic-delivery-os/write-decision.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 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,795 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00027 $0.04795
Opus 5 $0.00014 $0.02397
Sonnet 5 $0.00005 $0.00959
Haiku 4.5 $0.00003 $0.00479

Measured 3d ago against content hash 100bbb1fe761, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

write-decision 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 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.

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.

.opencode/command/write-decision.md · 241 lines

How it starts

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

Renders the record proportionally by rigor (R1 compact subset / R2 standard / R3 full), records AI-assistance provenance, and keeps R2/R3 records in a PR-reviewed flow: Proposed on the branch, Accepted when merged to main.

User invocation: /write-decision

Inputs other than MUST be sourced from the active decision planning context (especially the accepted <decision_planning_summary> or <technical_decision_planning_summary> block and their accepted generic or adr.* fields) and relevant repository docs; NOTHING may be invented.

The resulting decision record becomes the canonical record of the decision and its rationale, and should be linked from related changes and specs.

<directory_rules>

  • Normalize number: strip non-digits; pad left with '0' to length 4.
  • groupFolder is NOT used; all decision records live directly under doc/decisions/.
  • decisionType defaults to ADR; may be overridden to PDR, TDR, BDR, or ODR based on planning context or user input.
  • slug = normalized-from-title (lowercase ASCII kebab-case, <=60 chars), derived from the decision title.
  • filename = --.md (e.g., ADR-0001-event-bus.md, TDR-0001-state-mgmt.md)
  • fullPath = doc/decisions/--.md </directory_rules>

<front_matter_rules> A YAML front matter block MUST precede the decision record body and include at least these keys:

id: - # e.g., ADR-0001, PDR-0001, TDR-0001 decision_type: <adr|pdr|tdr|bdr|odr> created: # UTC date when file is first created decision_date: null | # Date when status changed to Accepted review_date: null | # Next retrospective/review date; set on Acceptance last_updated: # UTC date of last modification status: <Proposed|Accepted|Deprecated|Superseded> summary: owners: [] service: <primary impacted service, system, or domain> links: related_changes: ["PDEV-123", ...] supersedes: ["-####", ...] superseded_by: ["-####", ...] spec: ["doc/spec/...", ...] contracts: ["doc/contracts/...", ...] diagrams: ["doc/diagrams/...", ...] decisions: ["-####", ...] # other relevant decision records

Validation:

  • Status lifecycle is Proposed → Accepted → (Deprecated | Superseded).
  • id MUST be exactly <TYPE>-<number> where TYPE is ADR/PDR/TDR/BDR/ODR and is the zero-padded string form.
  • decision_type MUST be one of: adr, pdr, tdr, bdr, odr (lowercase).
  • created and last_updated MUST be valid dates in ISO format YYYY-MM-DD (UTC calendar date).
  • On first creation:
    • status MUST be "Proposed" because branch records are pre-merge drafts.
    • records merged to main SHOULD be "Accepted".
    • when status becomes Accepted, set decision_date and review_date.
  • owners MUST contain at least one entry (e.g., a team or person handle).
  • related_changes MAY be empty; when present, values MUST be valid workItemRef identifiers (e.g., PDEV-123, GH-456).
  • Additional front-matter fields allowed by doc/documentation-handbook.md (e.g., tags, security) MAY be added but MUST NOT replace the keys above. </front_matter_rules>

<context_lookup> The decision record generator must base its content on:

Read the full file on GitHub · 241 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 · 241 lines · 27 tokens per session scan A 100bbb1fe761

Subscribe to this mod's changes

write-decision is a command published in the GitHub repository juliusz-cwiakalski/agentic-delivery-os (37 stars, last pushed 3d ago), licensed MIT. It adds 27 tokens to every session and 4,795 once invoked, about $0.0001 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-09-07.