Documentation
¶
Overview ¶
Package decide is the WRITE side of the decision record: `abcd decide "<title>"` mints an ADR id and lays the skeleton the store's existing files carry, under `.abcd/development/decisions/adrs/`.
It exists because ADRs were the last record family allocating by hand. Two branches minted `0055` and `0056` on the same day for different decisions — the add/add collision the timestamp mint removed for captures, intents and specs — and the 2026-09-01 ruling (`.abcd/work/DECISIONS.md`, that date) took the family onto the same seam: an ADR filed from then on is `adr-<yymmddHHMMSS><rrrr>`, in a file the stamp orders. The hand-numbered ordinals `0001`–`0058` keep their ids and their filenames; nothing is renumbered, and every reader admits both vintages through one derivation (`recordid.CanonADRID` / `recordid.ADRFileID`).
The boundary is the same one the intent and spec stores draw: the core owns the ID, the DATE, the FILENAME and the record's structure; a human owns every word of the decision. The skeleton this package writes states nothing — it carries the four sections the store's README specifies, each with the question it answers, and `status: proposed`, because a freshly minted file is a draft whose decision is not yet locked and only its author can say otherwise.
Index ¶
Constants ¶
const ADRsRelDir = recordid.ADRsRelDir
ADRsRelDir is the decision store, repo-relative and slash-separated: the resolver's own spelling, so the mint and every lookup name one directory.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decision ¶
type Decision struct {
ID string `json:"id"`
Slug string `json:"slug"`
Title string `json:"title"`
Date string `json:"date"`
Path string `json:"path"`
}
Decision is one minted decision record: what it is called, where it landed, and the id every citation of it resolves through.
func Create ¶
Create mints a decision record for title and writes its skeleton, returning what it minted. On any refusal nothing is written.
The id is drawn through the shared record-id seam and reads no maximum (adr-45 ruling 2): the clock orders the ids and the entropy separates two minters in the same second, so a sibling checkout — which no lock here can see — needs no coordination to stay distinct. That is the whole point of the change: the hand-numbered ordinal had exactly the cross-branch collision no convention can close.
type Stated ¶ added in v0.12.0
type Stated struct {
// Title becomes the H1 and the slug, redacted as Create's is.
Title string
// Frontmatter is extra frontmatter lines, each "key: value\n", written
// after the store's nine keys.
Frontmatter string
// Body is everything below the H1: the four sections the store carries.
Body string
}
Stated is a decision whose words are already written: a setup offer that states a rule the person accepts at a prompt (the drain eligibility record, ruling BX2) mints it through the same seam as Create, so its id, date and filename come from the one allocator. The person's yes to the offer is the decision, so the record is written accepted.