Write Adr logo

Write Adr

Organization
existential-birds
write-adr

Use when you want to generate Architecture Decision Records from this session. Triggers on "write ADRs", "document our decisions", "create decision records", "record the choices we made". Also useful after design discussions where decisions were reached but not documented. Does NOT extract decisions alone (use adr-decision-extraction) or provide MADR template (use adr-writing). Orchestrates the full workflow: subagent extraction, user confirmation, parallel generation, and verification.

Overview

Publisherexistential-birds
Repositorybeagle
Skill namewrite-adr
Stars
82
Forks
8
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by existential-birds on GitHub. Read the source before you install it.

Installation

Install the Write Adr AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/existential-birds/beagle.git /tmp/beagle
mkdir -p .claude/skills
cp -r /tmp/beagle/plugins/beagle-analysis/skills/write-adr .claude/skills/write-adr
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Write Adr in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Write Adr on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Write Adr is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Write ADR

Generate Architecture Decision Records (ADRs) from decisions made during the current session.

Workflow Overview

  1. Context - Gather repository context and existing ADRs
  2. Extract - Analyze conversation for decisions using a subagent
  3. Confirm - Present decisions to user for selection
  4. Write - Generate ADRs in parallel using subagents
  5. Report - Summarize created files and status
  6. Verify - Validate generated ADRs against Definition of Done

Gates (objective pass conditions)

Advance only when the pass condition holds. These are checkable without “I verified internally.”

AfterPass condition
Step 2 (extract)The subagent response is valid JSON with a top-level decisions array (empty is OK). Each non-empty item has id, title, and at least one of context, decision, alternatives, or rationale present as a non-empty string or non-empty array. If parsing fails or the shape is wrong, re-run extraction or fix the payload before Step 3.
Step 4 (pre-allocate)From repo root, python plugins/beagle-analysis/skills/adr-writing/scripts/next_adr_number.py --count N prints exactly N lines (one number per line). You have a written mapping (in the reply draft or notes) from each selected decision to one of those lines before launching any ADR writer unit.
Step 5 (report)Every file path in the summary table is copied from a subagent completion output (not invented). Optionally spot-check: test -f <path> for each path before marking success.
Step 6 (verify)For each ADR path, opening the file shows line 1 is ---, frontmatter parses as YAML, status and date are present, and the body meets the Step 6 bullets below (alternatives count, Good/Bad consequences).

Step 1: Gather Context

bash
# Get current branch and recent commits
git branch --show-current
git log --oneline -5

# Check for existing ADRs
ls docs/adrs/ 2>/dev/null || echo "No ADR directory found"

# Count existing ADRs for numbering
find docs/adrs -name "*.md" 2>/dev/null | wc -l

This context helps the ADR writer:

  • Reference related commits in the ADR
  • Avoid duplicate ADRs for already-documented decisions
  • Determine correct sequence numbering

Step 2: Extract Decisions

Analyze the current conversation for architectural decisions. If the agent supports subagents, dispatch this as a single extraction subagent; otherwise run the same extraction inline — identical output. Use this brief:

text
Load the **adr-decision-extraction** skill ([../adr-decision-extraction/SKILL.md](../adr-decision-extraction/SKILL.md)).

Analyze the conversation for decisions that warrant ADRs:
- Technology choices, architecture patterns, design trade-offs
- Rejected alternatives, significant implementation approaches

Return JSON:
{
  "decisions": [
    {
      "id": 1,
      "title": "Use PostgreSQL for primary datastore",
      "context": "Brief context about why this came up",
      "decision": "What was decided",
      "alternatives": ["What was considered but rejected"],
      "rationale": "Why this choice was made"
    }
  ]
}

If the subagent returns an empty decisions array, skip to Step 5 with message: "No architectural decisions detected in this session."

Gate: Meet the Step 2 row in Gates (objective pass conditions) before Step 3.

Step 3: Confirm with User

Display all extracted decisions with full details, then ask user to select:

text
## Detected Decisions

### 1. Use PostgreSQL for primary datastore
**Confidence:** high

**Problem:** Need ACID transactions for financial records

**Decision:** PostgreSQL for user data storage

**Alternatives discussed:**
- MongoDB
- SQLite

**Rationale:** ACID compliance, team familiarity, mature ecosystem

**Source:** Discussion about database selection in planning phase

---

### 2. Implement event sourcing for audit trail
**Confidence:** medium

**Problem:** Compliance requires complete audit history

**Decision:** Event sourcing pattern for state changes

**Alternatives discussed:**
- Database triggers
- Application-level logging

**Rationale:** Immutable audit trail, temporal queries, debugging capability

**Source:** Compliance requirements discussion

---

## Selection

Which decisions should I write ADRs for?
- Enter numbers (e.g., "1,2" or "1-2"), "all", or "none" to skip

Important: Always display the full decision details (problem, decision, alternatives, rationale) from the extraction output BEFORE asking for selection. Do not truncate to just title and context.

Parse user response:

  • "all" - Process all decisions
  • "none" or empty - Skip with message "No ADRs will be created."
  • "1,2" or "1-2" - Process specified decisions

Step 4: Write ADRs (Parallel)

Pre-allocate ADR numbers before launching subagents to prevent numbering conflicts:

bash
# Pre-allocate numbers for all confirmed decisions (from repository root)
# Example: If user selected 3 decisions
python plugins/beagle-analysis/skills/adr-writing/scripts/next_adr_number.py --count 3
# Output:
# 0003
# 0004
# 0005

Assign each pre-allocated number to its corresponding decision before launching subagents.

Gate: Meet the Step 4 row in Gates (objective pass conditions) before launching the first ADR writer unit.

For each confirmed decision, run an ADR writer unit with its pre-assigned number. If the agent supports subagents, dispatch one writer per decision in parallel; otherwise write each ADR sequentially — identical output. Use this brief:

text
Load the **adr-writing** skill ([../adr-writing/SKILL.md](../adr-writing/SKILL.md)).

Write an ADR for this decision:
```json
{decision JSON}

IMPORTANT: Use this pre-assigned ADR number: {assigned_number}

Instructions:

  1. Explore codebase for additional context
  2. Write MADR-formatted ADR to docs/adrs/
  3. Use the pre-assigned number {assigned_number} - DO NOT call next_adr_number.py
  4. Filename format: {assigned_number}-slugified-title.md
  5. Return created file path

**Critical:** Pass the pre-allocated number to each writer unit. Writers must NOT call `next_adr_number.py` themselves - this causes duplicate numbers when running in parallel.

Wait for all writer units to complete before proceeding.

## Step 5: Report Results

**Gate:** Meet the Step 5 row in **Gates (objective pass conditions)** when building the summary (paths from subagent outputs; optional `test -f`).

Collect outputs from all subagents and present summary:

```markdown
## ADR Generation Complete

| File | Decision | Status |
|------|----------|--------|
| docs/adrs/0003-use-postgresql.md | Use PostgreSQL for primary datastore | Draft |

### Next Steps
- Review generated ADRs for accuracy
- Update status from "proposed" to "accepted" when finalized

### Gaps Requiring Investigation
- [List any decisions where subagent noted missing context]

If no decisions were processed:

text
No ADRs were created. Run this command again after making architectural decisions.

Step 6: Verify Generated ADRs

For each created ADR, validate against Definition of Done:

markdown
## Verification Checklist

| ADR | E | C | A | D | R | Status |
|-----|---|---|---|---|---|--------|
| 0003-use-postgresql.md |||||| Incomplete |

Legend: E=Evidence, C=Criteria, A=Agreement, D=Documentation, R=Realization

Gate: Meet the Step 6 row in Gates (objective pass conditions) for every created ADR.

Verification steps:

  1. Open each generated ADR file
  2. Confirm filename follows NNNN-slugified-title.md pattern
  3. Verify YAML frontmatter exists at file start:
    • File MUST begin with ---
    • Contains status: draft (or valid status)
    • Contains date: YYYY-MM-DD (actual date)
    • Ends with --- before title
    • If frontmatter is missing, add it immediately
  4. Review for [INVESTIGATE] prompts - these need follow-up
  5. Verify at least 2 alternatives are documented
  6. Confirm consequences section has both Good and Bad items

If gaps exist:

  • Keep status as draft until gaps are resolved
  • Use [INVESTIGATE] prompts to guide follow-up session
  • Schedule review with stakeholders before changing to accepted

Output Location

ADRs are written to docs/adrs/ (same convention as adr-writing). If no ADR directory exists, create it with an initial 0000-use-madr.md template record.

MADR Format Reference

markdown
---
status: draft
date: YYYY-MM-DD
---

# {TITLE}

## Context and Problem Statement

{What is the issue motivating this decision?}

## Decision Drivers

* {driver 1}
* {driver 2}

## Decision Outcome

Chosen option: "{option}", because {reason}.

### Consequences

* Good, because {positive}
* Bad, because {negative}

Frequently asked questions

What does the Write Adr AI skill do?

Use when you want to generate Architecture Decision Records from this session. Triggers on "write ADRs", "document our decisions", "create decision records", "record the choices we made". Also useful after design discussions where decisions were reached but not documented. Does NOT extract decisions alone (use adr-decision-extraction) or provide MADR template (use adr-writing). Orchestrates the full workflow: subagent extraction, user confirmation, parallel generation, and verification.

Why use Write Adr on TypingMind?

Because you install it once and use it with any model. Write Adr is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Write Adr in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/existential-birds/beagle/tree/main/plugins/beagle-analysis/skills/write-adr. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Write Adr?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Write Adr?

As many as you like. As long as a model supports skills, you can use Write Adr with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Write Adr AI skill free?

Yes. It is published on GitHub by existential-birds under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇