Rozhodnutí, podle kterých repozitář žije, vznikla v konverzacích, které jsou do druhého rána pryč, a jediný záznam je odstavec v chat logu, který nikdo nenajde. Odůvodnění se ztratí první, takže za půl roku kód vypadá libovolně a někdo ho tiše vrátí.
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'
Rozhodnutí je soubor s identitou, kterou si nic jiného nenárokuje, s důkazy, ze kterých vzešlo, a se stavem, který jasně říká, zda jej člověk přijal. Nástroj navrhuje; přijímá jen člověk a příkazová řádka nemá jak říct jinak.
-
jeden řádek na rozhodnutí: identita, stav, datum, název
adr-0001 proposed <date> The registry is the one canonical declaration
- exit 0
- stdout_contains /adr-0001/
- stdout_contains /proposed/
-
cesta, pak soubor tak, jak byl zapsán: provenience říká, že jej nástroj odvodil
.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/
-
identity, stavy, nahrazení a každý odkaz, v jednom průchodu
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 je dopředná hrana: pravidlo, které rozhodnutí deklaruje, soubor, ke kterému sahá
.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/
-
týž fakt jako hrana, s klíčem front matter, který jej uvedl, jako proveniencí; opačný směr nezapsal nikdo
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/
-
tytéž hrany čtené ze sady změn: kterých rozhodnutí se tato práce dotýká. Čistý strom se nedotýká ničeho a exit kód nikdy neřekne, že rozhodnutí přestalo platit
adr affected: no decision names anything this change set touches
- exit 0
- stdout_contains /no decision names anything this change set touches/
-
odmítnutí, na kterém záleží: nástroj, který smí zapisovat přijaté, mění svou inferenci v pravdu repozitáře
majordomus: adr propose: the status is not yours to choose; a proposed decision is accepted by a person editing the record
- kód 15
- stdout_contains /not yours to choose/
-
extrahovaný záznam bez důkazu je tvrzení a jako takové se odmítá
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/
Řetězec od této stránky ke kódu: případ užití jmenuje příkazy, pravidla a tvrzení; každé pravidlo se dispatchuje z registru a každé tvrzení jmenuje test, který ho dokazuje; scénář výše provedl příkazy. Nic v tomto řetězci není text o záměru.
Vypočteno z toho, co sdílejí: tvrzení, pravidla, příkazy, kategorie, aplikace. Tento seznam nikdo neudržuje.