with one click
adr-writer
Write an Architecture Decision Record (ADR) for a technical decision
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Write an Architecture Decision Record (ADR) for a technical decision
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | adr-writer |
| description | Write an Architecture Decision Record (ADR) for a technical decision |
Write a well-structured Architecture Decision Record (ADR) and save it to /src/docs/adr/ or wherever the project keeps ADRs.
Use the MADR (Markdown Architectural Decision Records) format:
# ADR-NNN: <title>
**Date:** YYYY-MM-DD
**Status:** Proposed | Accepted | Deprecated | Superseded by [ADR-NNN]
**Deciders:** <team or individuals>
## Context and Problem Statement
<Describe the context, forces, and the decision that needs to be made.>
## Decision Drivers
- <driver 1>
- <driver 2>
## Considered Options
- Option A: <name>
- Option B: <name>
- Option C: <name>
## Decision Outcome
**Chosen option:** <Option X>, because <justification>.
### Positive Consequences
- <consequence 1>
### Negative Consequences / Trade-offs
- <consequence 1>
## Pros and Cons of the Options
### Option A: <name>
- Good: <reason>
- Bad: <reason>
### Option B: <name>
- Good: <reason>
- Bad: <reason>
const existing = context.vfs.list().filter(p => p.match(/\/docs\/adr\/.*\.md$/i) || p.match(/\/adr\/.*\.md$/i));
context.emit({ type: 'progress', message: `Found ${existing.length} existing ADRs` });
// Determine next ADR number
const nums = existing.map(p => parseInt(p.match(/(\d+)/)?.[1] ?? '0')).filter(n => n > 0);
const nextNum = nums.length > 0 ? Math.max(...nums) + 1 : 1;
const adrId = String(nextNum).padStart(3, '0');
// Read existing code to understand the current architecture
const sourceFiles = context.vfs.list().filter(p => p.startsWith('/src/'));
// Read the most relevant files for this decision
const adrPath = `/src/docs/adr/ADR-${adrId}-<slug>.md`;
const lines = [
`# ADR-${adrId}: <Title>`,
'',
'**Date:** ' + new Date().toISOString().split('T')[0],
'**Status:** Proposed',
// ...
];
context.vfs.write(adrPath, lines.join('\n'));
context.emit({ type: 'file_write', path: adrPath });
const indexPath = '/src/docs/adr/README.md';
const index = context.vfs.read(indexPath);
if (index) {
const updated = index + `\n- [ADR-${adrId}](ADR-${adrId}-<slug>.md) — <title>`;
context.vfs.write(indexPath, updated);
}
Before emitting done, verify:
Evaluate workflow run quality by analyzing artifacts and scratch outputs, identify gaps and root causes, and write a structured assessment with actionable recommendations.
Diagnose a bug, identify root cause, implement a targeted fix, and verify it
Analyze requirements and produce a detailed implementation plan before writing code
Create a GitHub branch, commit changes to it, and open a pull request
Explore a newly-loaded workspace, map its structure, and write project notes to memory
Restructure code without changing external behavior — extract, rename, split, move