Něco se s úlohou stalo minulý týden: checkpoint, rozhodnutí, předávka. Ten, kdo se ptá, u toho nebyl. Ledger má každou událost, ale číst soubor JSON od začátku do konce není odpověď, a ledger s poškozeným řádkem je horší než žádný, pokud ho nástroj tiše přeskočí.
history: ledger jako provozní historie, ve výchozím stavu nejnovější řádky, --task, --event, --since zužují výběr
history --validate: každý řádek správně utvořený, jinak exit 10
search <text>: trvalé záznamy porovnávané doslovně napříč druhy
watch: limity uchování ledgeru, předávek a checkpointů
setup: active-task-records
given:
- 'an active task that has already produced a checkpoint, a decision and an open question'
steps:
- id: history
run: ['history']
note: 'the ledger read back oldest first, one event per line, from a closed vocabulary'
expect:
exit: 0
stdout_contains: ['task.started', 'task.checkpoint', 'decision.recorded']
- id: by-event
run: ['history', '--event', 'task.checkpoint']
note: 'only the events of one kind'
expect:
exit: 0
stdout_contains: ['task.checkpoint']
stdout_not_contains: ['decision.recorded']
- id: valid
run: ['history', '--validate']
note: 'every line is a well-formed event; a malformed line would be a failure, not a skipped record'
expect:
exit: 0
stdout_contains: ['every event is registered', 'history --validate: ok']
- id: find
run: ['search', 'parser']
note: 'a durable record found literally, across kinds, without an index'
expect:
exit: 0
stdout_contains: ['^decision ', '^checkpoint ', 'match']
- id: caps
run: ['watch']
note: 'the ledger, the handovers and the checkpoints are under their retention caps'
expect:
exit: 0
stdout_contains: ['^OK retention ledger', '^OK retention checkpoints', '0 drift finding']
then:
- 'every event has a name from the closed vocabulary'
- 'the ledger is never silently repaired or truncated'
- 'rotation archives, it does not delete'
Co se stalo, lze číst podle úlohy, události a času, poškozený řádek je selhání, nikoli přeskočený záznam, a kniha se drží v mezích limitu tím, že nejstarší řádky rotuje do archivu.
-
účetní kniha čtená zpět od nejstaršího, jedna událost na řádek, z uzavřeného slovníku
<time> projections.updated - <head> targets=3
<time> task.started t-<id> <head> profile=implementation scope=lib
<time> task.checkpoint t-<id> <head> <time>--main--<head>--<hash>.md
<time> decision.recorded t-<id> <head> refuse tabs in the parser
<time> question.opened t-<id> <head> should tabs be an error or a warning?
- exit 0
- stdout_contains /task.started/
- stdout_contains /task.checkpoint/
- stdout_contains /decision.recorded/
-
jen události jednoho druhu
<time> task.checkpoint t-<id> <head> <time>--main--<head>--<hash>.md
- exit 0
- stdout_contains /task.checkpoint/
- stdout_not_contains /decision.recorded/
-
každý řádek je správně utvořená událost; poškozený řádek by byl selhání, ne přeskočený záznam
OK ledger 5 lines — every line carries ts and event, and every event is registered
history --validate: ok
- exit 0
- stdout_contains /every event is registered/
- stdout_contains /history --validate: ok/
-
trvalý záznam nalezený doslovně, napříč druhy, bez indexu
checkpoint .ai/local/state/checkpoints/<time>--main--<head>--<hash>.md:16 the parser now refuses tabs
decision .ai/local/state/decisions.md:13 ## <date> — refuse tabs in the parser
history .ai/local/state/ledger.jsonl:4 {"ts":"<time>","event":"decision.recorded","head":"<sha>","branch":"mai
search: 3 match(es)
- exit 0
- stdout_contains /^decision /
- stdout_contains /^checkpoint /
- stdout_contains /match/
-
ledger, předávky a checkpointy jsou pod svými stropy uchovávání
OK knowledge graph — buildable here: 101 node(s), 58 edge(s), compiled into a temporary file and removed; no stored index to go stale
OK layout .ai/manifest.yaml — schema ai-repository/v1
OK layout .ai/repo/scope.yaml — version 1; 14 in pathspec(s); every key is one the schema declares
OK layout .ai/local/ — ignored, and nothing under it is tracked
OK layout .ai/ — every section the manifest names exists; the layer is readable without the tool
· checkpoint t-<id> — <timed against the checkpoint interval>
INFO checkpoint .ai/local/state/checkpoints/<time>--main--<head>--<hash>.md — newest record, <age> ago [reproduce: majordomus checkpoint --show]
OK records ledger.jsonl — every line is a well-formed event
OK policy 39 key(s) — every policy value the code reads is declared, with no reader-side default
OK bootstrap 3 projection(s) — each points at .ai/README.md, carries no rule of its own and names only rules in force
OK catalogue 0 use case(s), 0 application(s) — every command, doctrine, claim, responsibility, category, setup and cross-reference resolves, both directions
OK context .ai/ — 19 context document(s) carry the contract; ids unique, references resolve, no final document superseded, no cycle [reproduce: majordomus context validate]
OK policy policy+profiles — match the last update (<hash12>)
INFO adr .ai/repo/adrs/ — no decisions; nothing to validate
OK records decisions.md — every entry is attributable
INFO project .ai/repo/project — no canonical project model here; nothing to validate
OK command surface — 30 public command(s), reconciled against the dispatch table [reproduce: majordomus doctor]
OK command coverage — every public command is exercised and refuted [reproduce: bash test/run.sh 31_command_coverage]
OK resolver handovers — no record for this worktree and branch (absence, not a stale match) [reproduce: majordomus handover --resolve]
OK lifecycle activity — 0 episode(s) opened here; too few to judge whether the writers stopped
OK knowledge wiring — the close path and the compaction adapter call the deriver
OK knowledge deriver — no episode has closed here; nothing to judge
INFO project .ai/repo/project — no canonical project model here; nothing to validate
OK projection AGENTS.md — content matches its stamp
OK projection CLAUDE.md — content matches its stamp
OK projection GEMINI.md — content matches its stamp
OK context builder — 58 lines, budget 300 [reproduce: majordomus context]
OK capture share/schemas/majordomus/capture/capture.v1 — 2 file(s) describe majordomus.capture/v1 at the path the identifier derives: the record as JSON Schema, the document as protobuf
OK capture .ai/local/prompts — ignored and untracked
OK capture .ai/local/prompts — no records yet; the archive is empty
OK capture .ai/local/prompts — every prompt is present as all three: the record, the Markdown and the YAML
OK prompts .ai/local/prompts — the archive and every record in it are readable by their owner only
OK prompts .ai/local/prompts — no records yet; the archive is empty
OK prompt 4 asset(s) — front matter valid, every token known
OK records open-questions.md — every entry parses
OK retention ledger — 5 lines, cap 5000
OK retention handovers — 0 files, cap 200
OK retention checkpoints — 1 files, cap 500
OK retention sessions — 0 records, cap 500
INFO project .ai/repo/project — no canonical project model here; nothing to validate
OK rules .ai/repo/rules/vendor/majordomus — every file matches the manifest (1 (1.0.0-alpha.4))
OK rules 61 rule(s) — resolve in one deterministic order; vendored baseline plus project rules, no override — 51 carry a validator, 10 are normative text this tool does not check
OK rules blocking — all 44 blocking rule(s) carry a validator
OK schema rules — 61 rule(s) resolve in one order: the vendored baseline in manifest order, then the project's, as a dependency graph
OK schema share/kinds.yaml — 36 kind(s); every one that carries metadata declares a schema
OK schema share/schemas — 53 schema(s), each valid JSON and each applied — by a kind, through an allow-list the tool reads, by a validator that names it, or as a generated document's contract (15)
OK scope t-<id> — 1 touched file(s), all within scope
OK session .ai/local/session-contexts — ignored and untracked
OK session .ai/local/session-contexts — no working contexts yet; the store is empty
INFO skill .ai/repo/skills/ — no skills; nothing to validate
OK state t-<id> — exact (head <head>)
· budget watch — <timed against the policy budget>
OK state t-<id> — active; scope, checkpoint, blockers and records reported above
· checkpoint <time>--main--<head>--<hash>.md — <timed against the checkpoint interval>
watch: 0 drift finding(s)
- exit 0
- stdout_contains /^OK retention ledger/
- stdout_contains /^OK retention checkpoints/
- stdout_contains /0 drift finding/
Ř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.