adr
Scan commits and diffs for decisions, record them as immutable ADRs in docs/decisions/.
Best use case
adr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Scan commits and diffs for decisions, record them as immutable ADRs in docs/decisions/.
Teams using adr should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/adr/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How adr Compares
| Feature / Agent | adr | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Scan commits and diffs for decisions, record them as immutable ADRs in docs/decisions/.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
Decision Record extractor. Analyzes code diffs and identifies significant technical decisions that should be recorded for future reference. Writes immutable ADR files to `docs/decisions/`. When evaluating the changes ask yourself, would someone benefit from knowing WHY something was done. ## Steps ### 1. Determine scope If `$ARGUMENTS` is "all": ```bash git log --oneline --all ``` Scan the full commit history. If `$ARGUMENTS` is a commit range (e.g., `HEAD~5..HEAD`): ```bash git log --oneline $ARGUMENTS git diff $ARGUMENTS ``` If `$ARGUMENTS` is empty (default — all unpushed changes): ```bash # Check for unpushed commits first git log origin/main..HEAD --oneline 2>/dev/null # Also check for uncommitted changes git diff --stat ``` If there are unpushed commits, use `git diff origin/main..HEAD` to see the full diff. If there are only uncommitted changes (no commits ahead), use `git diff` for unstaged and `git diff --cached` for staged. If neither exists, fall back to the last commit: `git diff HEAD~1..HEAD`. ### 2. Read existing decisions ```bash ls docs/decisions/ 2>/dev/null ``` Read any existing ADRs to understand what's already recorded. This prevents duplicates and enables amendment detection. ### 3. Analyze the diff For each commit in the range, read the full diff and apply the relevance filter (create vs skip criteria above). For each decision found: - Identify WHAT was decided - Identify WHY (from commit messages, code comments, or infer from the change pattern) - Identify what ALTERNATIVES were considered or rejected (if visible in the diff) - Identify what it SUPERSEDES (check existing ADRs) ### 4. Amendment detection Before creating a new decision, check if an existing ADR covers the same area. If a new decision modifies or supersedes an existing one: 1. Do NOT modify the original file (decisions are immutable) 2. Create a new ADR file with `amends: "YYYY-MM-DD-original-title.md"` in the frontmatter 3. Reference the original in the Context section: "This amends [YYYY-MM-DD - Original Title](../category/YYYY-MM-DD-original-title.md)" ### 5. Write ADR files Create `docs/decisions/` if it doesn't exist: ```bash mkdir -p docs/decisions ``` For each decision, write a file named `YYYY-MM-DD-kebab-case-topic.md` using today's date: ```markdown --- title: [Decision Title] date: YYYY-MM-DD status: accepted amends: (optional, filename of superseded ADR) tags: [relevant, tags] --- # [Decision Title] ## Context What situation or problem led to this decision? What constraints existed? ## Decision What was decided. Be specific about the choice made. ## Alternatives Considered What other approaches were evaluated and why they were rejected. ## Consequences What follows from this decision — both positive and negative. What does future code need to respect? ``` ### 6. Commit ```bash git add docs/decisions/ charlie-commit -m "Record architectural decisions from recent changes" ``` ### 7. Report For each decision created, output: ``` ADR: docs/decisions/YYYY-MM-DD-topic.md Decision: [one-line summary] Why: [one-line rationale] ``` If no decisions were found: "No architectural decisions detected in this changeset." ## Rules - Decisions are immutable — never edit an existing ADR file, create amendments instead - Always use `charlie-commit` (never `git commit`) - Never include co-authored-by or AI references - Use today's date for the filename, not the commit date - Signal over noise — fewer high-quality ADRs beat a pile of trivial ones - The WHY matters more than the WHAT — the code shows what changed, the ADR explains why
Related Skills
trick
Run Charlie tricks by name or path. Use when the user says "/trick", wants to run a trick, list available tricks, or execute a skill file. Also trigger when the user mentions running a specific trick by name (e.g., "run the session-save trick", "run ship", "do the commit trick").
research
Research a topic and save findings to Charlieverse knowledge. Use whenever the user wants to research something, look up documentation, investigate a library or tool, explore a concept, or asks "what do you know about X". Also trigger when the user says "/research", wants to build up knowledge about a subject, or asks you to "look into" something — even if they don't use the word "research" explicitly.
copilot
Run a task through GitHub Copilot CLI. Use when the user says "/copilot", wants to delegate work to Copilot, or mentions running something through Copilot. Also trigger when the user wants to use Copilot for a task.
codex
Run a task through OpenAI Codex CLI. Use when the user says "/codex", wants to delegate work to Codex, or mentions running something through Codex. Also trigger when the user wants to use an OpenAI model for a task.
session-save
Save or update the current session. Use this skill when asked to handoff, save session, update session, start a new chat, etc. Always call this before using the `update_session` MCP tool directly.
charlie-import
Import conversation history from AI providers (Claude, Copilot, Codex, Cursor) and generate stories from the imported data. Use on first session to bootstrap memory from existing conversations, or anytime the person wants to import history from another provider/machine.
typo-check
Find typos, grammar errors, punctuation/capitalization mistakes, and banned-phrase voice slips in prose and code comments. Use when the user says "/typo-check", wants to scan for typos, or before shipping user-facing text. Reports findings and confirms before fixing.
test-coverage
Evaluate the test coverage
ship
Commit, docs, changelog, and push in one go. Use when the user says "/ship", wants to ship their changes, or asks to commit and push everything.
qc
Run quality control checks on the codebase — type checking, linting, tests, and server smoke test. Use when the user says "/qc", wants to verify code quality, or after making significant changes.
docs
Generate or update public documentation from source code. Use when the user says "/docs", wants to update docs, or asks to generate documentation for the project.
commit
Review repo changes and create logical atomic commits. Use when the user says "/commit", wants to commit their work, or asks to break changes into commits.