1---2name: madr-decision-log3description: create, review, normalize, validate, and maintain markdown architectural decision records using madr conventions. use when a repository needs durable adr files, a repeatable docs/decisions workflow, adr indexing, status updates, supersession handling, or file-based quality checks around decision records.4---56# MADR Decision Log78## Trigger Signals910- a decision should become a durable markdown record rather than remain trapped in chat or meeting notes11- the repository needs a `docs/decisions/` practice with numbering, indexing, review, and validation12- an ADR should be reviewed, normalized, superseded, or updated without losing historical meaning13- the team wants a file-oriented MADR workflow rather than a lightweight one-off decision summary1415## Inspect First1617- existing ADRs, RFCs, design docs, and release notes that already touch the same decision18- whether the repository already uses `docs/decisions/`, another decision directory, or a numbering convention worth preserving19- whether the request is about creating a new ADR, reviewing one, bootstrapping an ADR corpus, or maintaining an existing ADR log20- whether the repo already emits machine-readable decision indexes under runtime surfaces such as `.hforge/runtime/decisions/`; keep those derived artifacts separate from the authored markdown ADRs2122## Workflow23241. determine the mode: create, review, bootstrap, or maintain252. default to authored ADR files under `docs/decisions/` unless the repository already has a different documented location263. use the canonical template and conventions from:27 - `skills/madr-decision-log/references/adr-template.md`28 - `skills/madr-decision-log/references/madr-reference.md`29 - `skills/madr-decision-log/references/review-checklist.md`304. when repository artifacts are needed, use the packaged scripts instead of rebuilding helpers ad hoc:31 - `python skills/madr-decision-log/scripts/new_adr.py --dir docs/decisions --title "<decision title>"`32 - `python skills/madr-decision-log/scripts/validate_madr.py docs/decisions`33 - `python skills/madr-decision-log/scripts/build_log.py docs/decisions`345. preserve existing numbering, folder rules, and terminology when the repository already has an ADR practice356. when a decision is superseded, keep the old ADR, update its status, link the successor, and rebuild the ADR log3637### Create mode3839- capture the problem statement, decision drivers, considered options, chosen option, consequences, confirmation strategy, and known stakeholders40- scaffold the file with `skills/madr-decision-log/scripts/new_adr.py` when the user wants repository artifacts41- write the ADR using the MADR structure and keep option names consistent across sections42- validate before handoff with `skills/madr-decision-log/scripts/validate_madr.py`4344### Review mode4546- compare the ADR against `skills/madr-decision-log/references/review-checklist.md`47- separate structural issues, reasoning gaps, missing metadata, and wording improvements48- keep the decision meaning intact while normalizing the document into clearer MADR shape49- when the user asked for review only, do not silently rewrite first; report the issues and then provide a corrected version or patch5051### Bootstrap mode5253- create `docs/decisions/` if it does not exist54- create or propose an initial repository-level ADR such as `0001-record-architecture-decisions.md` when a seed decision is useful55- build `ADR-LOG.md` from the actual ADR files using `skills/madr-decision-log/scripts/build_log.py`56- validate the directory using `skills/madr-decision-log/scripts/validate_madr.py`5758### Maintenance mode5960- update status and supersession links without deleting historical ADRs61- rebuild `ADR-LOG.md` after filename, status, or path changes62- treat the ADR log as a generated navigation artifact; the ADR files remain the source of truth6364## Output Contract6566- repository-ready MADR markdown or an explicit review report, depending on the request67- preserved numbering and directory conventions unless a change was requested68- validation results when files were created or updated69- explicit note on supersession, confirmation, and follow-up links when the decision changes over time7071## Failure Modes7273- the task is still exploratory and no stable decision exists yet74- the repository already has an ADR convention, but the response would overwrite it instead of extending it75- chosen option names drift across sections and make the ADR inconsistent76- the request mixes authored ADR files with generated runtime decision indexes and loses the source-of-truth distinction7778## Escalation7980- escalate when the decision changes public contracts, cross-team ownership, migration policy, or release obligations81- escalate when a requested rewrite would change the historical meaning of an existing ADR rather than clarify it82- escalate when the repository already has conflicting ADR practices and the owner must choose the canonical one8384## References8586- `skills/madr-decision-log/references/adr-template.md`87- `skills/madr-decision-log/references/madr-reference.md`88- `skills/madr-decision-log/references/review-checklist.md`89- `skills/madr-decision-log/scripts/new_adr.py`90- `skills/madr-decision-log/scripts/validate_madr.py`91- `skills/madr-decision-log/scripts/build_log.py`