The decisions a repository lives by were made in conversations that are gone by the next morning, and the only record is a paragraph in a chat log nobody can find. The reasoning is lost first, so six months later the code looks arbitrary and somebody quietly undoes it.
setup: adr-related
given:
- 'Majordomus installed, with one decision proposed and committed'
- 'discovery is over the tracked tree, so a decision git does not hold is not yet part of the layer'
steps:
- id: what-was-decided
run: ['adr', 'list']
note: 'one line per decision: identity, status, date, title'
expect:
exit: 0
stdout_contains: ['adr-0001', 'proposed']
- id: the-record-itself
run: ['adr', 'show', 'adr-0001']
note: 'the path, then the file as written: the provenance says the tool derived it'
expect:
exit: 0
stdout_contains: ['schema: adr/v1', 'origin: extracted', 'file:docs/d']
- id: the-set-is-sound
run: ['adr', 'check']
note: 'identities, statuses, supersession and every reference, in one pass'
expect:
exit: 0
stdout_contains: ['every identity unique']
- id: what-it-put-in-force
run: ['adr', 'show', 'adr-0001']
note: 'related is the forward edge: the rule the decision declares, the file it reaches'
expect:
exit: 0
stdout_contains: ['related:', 'rule:majordomus.adr-integrity']
- id: the-graph-reads-it-backwards
run: ['knowledge', 'edges', '--type', 'declares']
note: 'the same fact as an edge, with the front-matter key that stated it as provenance; nothing wrote the reverse direction down'
expect:
exit: 0
stdout_contains: ['adr:adr-0001', 'rule:majordomus.adr-integrity', 'related.0']
- id: what-a-change-reaches
run: ['adr', 'affected']
note: 'the same edges read from a change set: which decisions this work touches. A clean tree reaches nothing, and the exit code never says a decision stopped holding'
expect:
exit: 0
stdout_contains: ['no decision names anything this change set touches']
- id: not-yours-to-choose
run: ['adr', 'propose', 'A decision that accepts itself', '--status', 'accepted']
note: 'the refusal that matters: a tool that can write accepted turns its inference into repository truth'
expect:
exit: 15
stdout_contains: ['not yours to choose']
- id: evidence-must-resolve
run: ['adr', 'propose', 'A decision derived from a file nobody has', '--from', 'file:docs/nosuch']
note: 'an extracted record without evidence is an assertion, and is refused as one'
expect:
exit: 2
stdout_contains: ['names a path that does not exist']
then:
- 'a reference a decision makes is validated where its type says the target lives'
- 'the reverse direction is the graph read backwards, never a second list'
- 'a change set names the decisions it reaches; whether they still hold is a person to read, not an exit code'
- 'a decision is one validated file under .ai/repo/adrs/, discovered as data'
- 'no invocation of the tool writes status accepted'
The decision is a file with an identity nothing else claims, the evidence it came from, and a status that says plainly whether a person has accepted it. The tool proposes; only a person accepts, and the command line has no way to say otherwise.
-
one line per decision: identity, status, date, title
adr-0001 proposed <date> The registry is the one canonical declaration
- exit 0
- stdout_contains /adr-0001/
- stdout_contains /proposed/
-
the path, then the file as written: the provenance says the tool derived it
.ai/repo/adrs/0001-the-registry-is-the-one-canonical-declaration.md
---
schema: adr/v1
id: adr-0001
kind: adr
title: The registry is the one canonical declaration
status: proposed
related:
- rule:majordomus.adr-integrity
- file:docs/d
date: <date>
tags:
- architecture
provenance:
origin: extracted
derived_from:
- file:docs/d
---
# 1. The registry is the one canonical declaration
## Context
What forced the decision. Derived from: file:docs/d.
## Decision
The registry is the one canonical declaration
## Alternatives rejected
What else was considered, and why it was not taken.
## Consequences
What this costs, what it forecloses, and what now has to be true.
- exit 0
- stdout_contains /schema: adr/v1/
- stdout_contains /origin: extracted/
- stdout_contains /file:docs/d/
-
identities, statuses, supersession and every reference, in one pass
examined 1 decision(s) in .ai/repo/adrs/
every identity unique, every status known, every reference resolves
0 identities added here, measured against main and every other ref
- exit 0
- stdout_contains /every identity unique/
-
related is the forward edge: the rule the decision declares, the file it reaches
.ai/repo/adrs/0001-the-registry-is-the-one-canonical-declaration.md
---
schema: adr/v1
id: adr-0001
kind: adr
title: The registry is the one canonical declaration
status: proposed
related:
- rule:majordomus.adr-integrity
- file:docs/d
date: <date>
tags:
- architecture
provenance:
origin: extracted
derived_from:
- file:docs/d
---
# 1. The registry is the one canonical declaration
## Context
What forced the decision. Derived from: file:docs/d.
## Decision
The registry is the one canonical declaration
## Alternatives rejected
What else was considered, and why it was not taken.
## Consequences
What this costs, what it forecloses, and what now has to be true.
- exit 0
- stdout_contains /related:/
- stdout_contains /rule:majordomus.adr-integrity/
-
the same fact as an edge, with the front-matter key that stated it as provenance; nothing wrote the reverse direction down
declares adr:adr-0001 rule:majordomus.adr-integrity .ai/repo/adrs/0001-the-registry-is-the-one-canonical-declaration.md:related.0
knowledge edges: 1 in scope all, type declares
INFO knowledge . — the schema check was not asked for (MAJORDOMUS_KNOWLEDGE_SCHEMA=unasked), so no file was checked against the schema of its kind
- exit 0
- stdout_contains /adr:adr-0001/
- stdout_contains /rule:majordomus.adr-integrity/
- stdout_contains /related.0/
-
the same edges read from a change set: which decisions this work touches. A clean tree reaches nothing, and the exit code never says a decision stopped holding
adr affected: no decision names anything this change set touches
- exit 0
- stdout_contains /no decision names anything this change set touches/
-
the refusal that matters: a tool that can write accepted turns its inference into repository truth
majordomus: adr propose: the status is not yours to choose; a proposed decision is accepted by a person editing the record
- exit 15
- stdout_contains /not yours to choose/
-
an extracted record without evidence is an assertion, and is refused as one
majordomus: adr propose: reference "file:docs/nosuch" names a path that does not exist
- exit 2
- stdout_contains /names a path that does not exist/
The chain from this page to the code: the use case names commands, rules and claims; each rule is dispatched from the registry and each claim names the test that proves it; the scenario above executed the commands. Nothing in this chain is prose about intent.
Computed from what they share: claims, rules, commands, category, applications. Nobody maintains this list.