Generate an ADR from a completed plan implementation, clean up the plan file, and commit/push or create a PR.
You are finalizing a completed plan implementation by creating an Architecture Decision Record (ADR), cleaning up, and shipping the changes.
IMPORTANT: This workflow is designed to flow without unnecessary permission prompts. The tools listed in allowed-tools above are pre-authorized — use them without hesitation.
Find the plan file:
$ARGUMENTS contains a path, use itdocs/plans/ for the most recent plan fileRead the plan file in full.
Understand what was implemented by examining:
git log --oneline -20git diffgit diff HEADCreate an ADR file at docs/adrs/NNNN-<title>.md where:
NNNN is the next sequential number (check existing files in docs/adrs/, start at 0001 if none exist)<title> is a kebab-case summary of the decisionCreate the docs/adrs/ directory if it doesn't exist.
Use this template:
# NNNN. <Title>
Date: YYYY-MM-DD
## Status
Accepted
## Context
<What was the situation? What problem needed solving? What constraints existed?
Draw from the plan's goal description and any refinements from user Q&A.>
## Decision
<What was decided? What approach was chosen and why?
Draw from the plan's implementation steps and revision notes.
Focus on the reasoning — why this approach over alternatives.>
## Consequences
### Positive
<What benefits does this decision bring?>
### Negative
<What trade-offs or downsides were accepted?>
### Risks
<What could go wrong? What should be watched?>
The ADR should capture the reasoning behind decisions, not just describe what was built. Focus on:
Delete the plan file from docs/plans/.
Determine the current git state:
main or a feature branch?Stage all changes (implementation + ADR + plan file deletion).
Present options based on git state:
When committing, write a clear commit message summarizing what was implemented and why. Include the ADR reference.
When creating a PR:
## Summary and ## Test plan sections