Lifecycle
- Comparing
- v2 to v3
- Current
- Read the document
RFCs and ADRs have a status. Spec pages and refs do not.
Statuses
draft, proposed, accepted, rejected and withdrawn. The last three are terminal. A document with a terminal status is frozen: any change to it once it exists on the configured branch is reported by lint, and every writer refuses it.
Transitions
In strict mode, the default:
| From | To |
|---|---|
draft |
proposed, withdrawn |
proposed |
accepted, rejected, withdrawn |
accepted |
none |
rejected |
none |
withdrawn |
none |
Non-strict mode adds draft → accepted and draft → rejected. No other transition exists in either mode. proposed → draft is never permitted.
Transition commands
archdoc propose <id>, accept <id>, reject <id> and withdraw <id> each:
- Load the document. Fail if the identifier is unknown or the type is not RFC or ADR.
- Check the transition is permitted from the current status under the
strictsetting. Fail naming the transitions permitted from the current status. - For
acceptand reject: fail ifthere is no H1, or it does not read asthefront matter gives it; fail if a required section is missing, or appears before one it must follow; fail if any required section is empty; fail if any unresolved [[...]] remains. For accept: fail if thedocument hasa closing section and another H2 follows it; fail if the document hasanOpen questionssection and it is non-empty, namingResolved questions.For both, then: fail at the first fault L20 or L21 reports, naming its line, with each Changelog entry's date compared against today, theperforms no content checks.decided date about to be written, rather than the document's own.withdraw - Rewrite
statusand, for a terminal transition,decidedto today. Front matter is rewritten field by field, preserving order and comments. The body is not touched except in step 5. - For
reject: append## Rejection rationaleto the end of the body with an HTML comment prompting for the rationale. - For
acceptandreject: fail if lint reports any error other than L03 about the document as rewritten, judged within the rest of the repository and, forreject, with the rejection rationale taken as written, listing each error aslintprints it.The step 3 checks runL11 compares the file on disk with the configured branch, so it judges the document as it stood before the transition. The file is written only once thisappendpasses. - Print the new status.
A transition refuses to write a decided date earlier than created, and refuses a status the graph does not know. reject refuses a document whose parse stops short of the end of the file. None of the transition commands commits.
Backfilling
archdoc new --backfill creates a document already in a terminal status, with created and decided set to the dates given and backfilled set to today. A backfilled document uses no transition. It requires a Sources section, and Alternatives considered and Backwards compatibility are pre-filled with Not recorded..
Source spec/lifecycle.md · commit 2dff01c · published