Situace
Worker se před hodinou k něčemu rozhodl v konverzaci, která bude do oběda zkomprimovaná a zítra pryč. Rozhodnutí je v ledgeru jednoho stroje pod limitem uchování a nikde, kam by dosáhl druhý checkout nebo veřejný povrch. Nikdo si nevzpomene to zapsat a odstavec, který by někdo napsal, by byl shrnutím konverzace, což vrstva odmítá ukládat.
Scénář
setup: session-open
given:
- 'Majordomus installed, with one execution episode open in this worktree'
- 'the knowledge section carries the curated and candidates source classes and no candidate yet'
steps:
- id: open-the-work
run: ['start', 'keep what this episode learned', '--scope', '.ai/repo/knowledge']
note: 'a task is optional for the derivation; it is here so the decision has one to name'
expect:
exit: 0
- id: decide-something
run: ['decision', 'add', 'A candidate is reviewed by a person before it is curated', '--why', 'a record only one machine can read is a record nobody reads']
note: 'one decision.recorded line in the ledger, stamped with the open episode'
expect:
exit: 0
- id: derive-it
run: ['knowledge', 'derive']
note: 'from the ledger and git, deterministically: one candidate record, status candidate, origin extracted, derived_from naming the episode and the decision'
expect:
exit: 0
stdout_contains: ['^written \.ai/repo/knowledge/candidates/', 'knowledge derive: 1 written']
- id: the-evidence-it-ran
run: ['history', '--event', 'knowledge.derived']
note: 'the ledger says which episode was derived and what was written; the line exists even when nothing was'
expect:
exit: 0
stdout_contains: ['knowledge.derived']
- id: derive-it-again
run: ['knowledge', 'derive']
note: 'the same evidence yields the same bytes: the record id is the episode plus a digest of the evidence, so the file is rewritten identically and reported unchanged'
expect:
exit: 0
stdout_contains: ['^unchanged \.ai/repo/knowledge/candidates/', 'knowledge derive: 0 written. 1 unchanged']
then:
- 'the decision is a tracked record with resolvable provenance, readable from every checkout and every surface'
- 'verified is still nobody''s: the deriver wrote a candidate, and promotion is an act a person performs with evidence'Výsledek
knowledge derive mění řádky ledgeru epizody na kandidátské záznamy v .ai/repo/knowledge/candidates/, ledger zaznamená, že to proběhlo, a druhý běh nad týmiž důkazy nezapíše nic. Koncové události a události kompakce providera dělají totéž, aniž by někdo příkaz psal; v majordomus knowledge promote člověk kandidáta ověřuje.