Convert execution plans into numbered MADR Architecture Decision Records stored in docs/adr/.
Follow these steps in order:
docs/adr/README.md.Determine the plan format by checking in this order:
Present when any of these exist relative to the workspace root:
.planning/phases/*/PLAN.md.planning/ROADMAP.md.planning/phases/*/RESEARCH.mdUse the most recent PLAN.md unless the user specifies a phase. If multiple phases exist, ask which one to record.
A .plan.md file (often in .cursor/plans/) with this structure:
name, overview, and todosAny markdown document the user points to that contains:
If the user says "create an ADR" without pointing to a plan, ask: "Which plan or decision should I record? Point me to a file, or describe the decision."
Map plan content to MADR fields. Not every field will have a direct source -- infer where reasonable, leave blank with a TODO marker where not.
MADR FieldGSD Plan SourceCreatePlan SourceGeneric SourceTitlePhase name / goalname from frontmatterFirst H1 or user-providedContext and ProblemRESEARCH.md problem section, or PLAN.md overviewoverview from frontmatterOpening paragraphs or problem statementDecision DriversConstraints, requirements from RESEARCHTrade-offs discussed in bodyBullet lists of requirements or constraintsConsidered OptionsAlternative approaches in RESEARCH or PLANMultiple approaches in body sectionsSections describing different optionsDecision OutcomeThe chosen plan/approach in PLAN.mdThe plan body (the chosen path)The recommended or selected approachConsequencesRisk sections, known trade-offsNoted risks or caveatsStated pros/cons of chosen path
VERIFICATION.md, pull verification criteria into Consequences.docs/adr/ matching the pattern NNNN-*.md.0001.NNNN-kebab-case-title.md where the title is derived from the decision title, lowercased, spaces replaced with hyphens, non-alphanumeric characters removed, truncated to 60 characters.
Read references/madr-template.md and fill in the extracted fields. Rules:
accepted. If the user says the decision is still under review, use proposed.YYYY-MM-DD format.git config user.name) if available, otherwise leave as TODO.TODO unless the user specifies.Write to docs/adr/NNNN-kebab-case-title.md. Create the docs/adr/ directory if it does not exist.
If the user has a different ADR directory convention (check for existing adr/, doc/adr/, architecture/decisions/), use that instead.
Maintain a docs/adr/README.md that lists all ADRs. If it does not exist, create it using the template in assets/adr-index-template.md.
Append a row to the table:
text
| NNNN | Title | accepted | YYYY-MM-DD |
After writing the ADR, tell the user:
docs/adr/0003-use-postgres-for-persistence.md)proposed, deprecated, superseded by ADR-NNNN)accepted and update the old ADR's status to superseded by ADR-NNNN.<!-- TODO: fill in after implementation -->. Warn the user the ADR is incomplete.