Documentation
¶
Overview ¶
Package condition is the scope-condition disposition vocabulary as DATA: the four values a condition is dispositioned with, the identity marker a condition carries, the two block grammars a disposition is written under, and the one reader that folds those blocks into a condition's standing disposition.
Two writers put dispositions into an intent's `## Audit Notes`: the fidelity verdict ingest (one block per receipt, covering every condition) and the condition verb (one dated block per write, covering one condition and naming what occasioned it). Both, and every reader of what they wrote — the verb's render, the verdict ingest's report of what it leaves standing, and the record lint the principles spec builds over the same dispositions — read one vocabulary from here, so no two of them can disagree about what a disposition is (spc-2609020626046252).
It is a leaf for the reason core/grounds and core/issueschema are: core/lint must read dispositions, core/intent's tests import core/lint, and a lint that imported intent back would be an import cycle. It imports core/mdrecord for the one notion of where a section starts and stops, and otherwise only the standard library: no filesystem, no transport, no record store.
Index ¶
Constants ¶
const ( Survived = "survived" Narrowed = "narrowed" Falsified = "falsified" Untested = "untested" )
The four disposition values (spc-59). Narrowed is the one that requires a stated narrowing and the only one permitted to carry one; Untested is the word for the absence of a judgement.
Variables ¶
var ( // MarkerRe matches a condition's identity marker anywhere inside its bullet // (spc-55). It is not line-anchored: an editor that rewraps a bullet moves the // marker, and a positional read would orphan every disposition keyed on it. MarkerRe = regexp.MustCompile(`<!-- cond: (cond-[0-9]{16}) -->`) // MarkerIDRe is the identity alone, whole-string. MarkerIDRe = regexp.MustCompile(`^cond-[0-9]{16}$`) // ReviewMarkerRe is the verdict ingest's block marker: one line, whole-line, // carrying the receipt state and id. ReviewMarkerRe = regexp.MustCompile(`(?m)^<!-- abcd-review: (OWED|INGESTED|DEAD_LETTER) receipt=(rcp-[0-9a-f]+) -->\r?$`) // BlockMarkerRe is the condition verb's block marker: the one identity the // block dispositions and what occasioned it, a reading item or a delivered // intent and nothing else. BlockMarkerRe = regexp.MustCompile(`(?m)^<!-- abcd-condition: (cond-[0-9]{16}) occasion=((?:rdi|itd)-[0-9]+) -->\r?$`) )
Enum is the closed set, in the order a refusal names it.
Functions ¶
func IsBlockMarker ¶
IsBlockMarker reports whether line opens a disposition-bearing block under either grammar. It is the boundary both writers end a block at, so a verdict block replaced in place never swallows a condition block that follows it.
func Standing ¶
func Standing(content string) map[string]Disposition
Standing folds ReadDispositions into each identity's standing disposition.
The fold is by source precedence, not by position. Among the entries of one source, document order decides: the last condition-block entry is the condition's standing reading-occasioned judgement, and the last verdict entry its standing audit. Between the sources, a condition-block entry stands over every verdict entry, except that a verdict entry whose rationale names the standing condition block's occasion replaces it, wherever either sits (the last such verdict entry in document order). A re-audit covers every condition by construction and knows nothing of the readings, so without that precedence it would erase, silently, the one thing the join exists to keep; an auditor who has weighed the reading says so by naming it.
Position cannot decide between the sources because it is not the order of writing: the verdict ingest replaces the receipt's OWED stub in place, and the stub is parked at ship time, before any condition block, so a verdict ingested after a condition block sits above it (the 2026-09-25 ruling in .abcd/work/DECISIONS.md).
Types ¶
type Disposition ¶
type Disposition struct {
ConditionID string `json:"condition_id"`
Disposition string `json:"disposition"`
Rationale string `json:"rationale,omitempty"`
Narrowing string `json:"narrowing,omitempty"`
// Source names the block: `verdict rcp-…` or `condition <occasion>`.
Source string `json:"source"`
Date string `json:"date,omitempty"`
Occasion string `json:"occasion,omitempty"`
}
Disposition is one disposition as a block records it. Occasion is set only for an entry from a condition block, and is what tells the two sources apart; Date likewise.
func ReadDispositions ¶
func ReadDispositions(content string) []Disposition
ReadDispositions returns every disposition the `## Audit Notes` section records, in document order. A bullet whose value is outside the enum is not a disposition and is skipped, as is a condition-block bullet naming an identity other than the one its marker names: the marker is the block's key.