○guaranteed
Extensionintermediatemaintaineragentwrites state
A command gained a behaviour and nobody wrote down what a person does with it. The documentation will drift the day it is written by hand, and a paragraph proves nothing.
setup: installed
given:
- 'Majordomus installed; the skeleton seeds the use-case section with no use case yet'
steps:
- id: nothing-yet
run: ['usecase', 'list']
note: 'the section exists and is empty'
expect:
exit: 0
stdout_contains: ['use cases: 0 in']
- id: the-gaps
run: ['usecase', 'coverage']
note: 'every public command is a target; a fresh policy reports gaps and fails on none'
expect:
exit: 0
stdout_contains: ['^command +doctor +0 +0 +0 +gap +advisory']
- id: scaffold
run: ['usecase', 'scaffold', '--for', 'command:doctor']
note: 'a draft from what the registry, the fixture and the claims already know; nothing in it is verified'
expect:
exit: 0
stdout_contains: ['wrote: \.ai/repo/use-cases/doctor-draft\.md']
- id: validate
run: ['usecase', 'validate']
note: 'the draft resolves: its command, setup and category exist'
expect:
exit: 0
stdout_contains: ['usecase validate: 0 failure']
- id: run-it
run: ['usecase', 'run', 'doctor-draft']
note: 'the scaffolded scenario executes the real command in a disposable repository'
expect:
exit: 0
stdout_contains: ['doctor-draft +pass']
- id: still-a-gap
run: ['usecase', 'coverage']
note: 'a draft never counts; coverage moves when the use case is active'
expect:
exit: 0
stdout_contains: ['^command +doctor +0 +0 +0 +gap']
then:
- 'a use case is a file; everything else (the page, the links, the tally) follows'
- 'a draft can run but cannot cover: status is authored, maturity is observed'
usecase scaffold writes a draft with the facts the tool already has, usecase run executes its scenario against the real tool and records the evidence, and usecase coverage says what is still missing. The draft counts for nothing until it is made active.
The scenario
Executed against the real tool, in a repository prepared by installed, every time this site is generated. What follows is not a description of what should happen; it is what happened.
given
- ·Majordomus installed; the skeleton seeds the use-case section with no use case yet
when
- 1
majordomus usecase list - 2
majordomus usecase coverage - 3
majordomus usecase scaffold --for command:doctor - 4
majordomus usecase validate - 5
majordomus usecase run doctor-draft - 6
majordomus usecase coverage
then
- ·a use case is a file; everything else (the page, the links, the tally) follows
- ·a draft can run but cannot cover: status is authored, maturity is observed
What the tool did
Evidence of the run this page was generated from: pass, 6 step(s). Output is normalised: the repository's path, timestamps, ids and durations are placeholders; nothing else is edited.
Tested by test/cases/94_use_cases.sh, which runs every scenario and refuses a step whose recorded output is not what it produced.
-
the section exists and is empty
use cases: 0 in .ai/repo/use-cases
- exit 0
- stdout_contains /use cases: 0 in/
-
every public command is a target; a fresh policy reports gaps and fails on none
command init 0 0 0 gap advisory
command update 0 0 0 gap advisory
command doctor 0 0 0 gap advisory
command watch 0 0 0 gap advisory
command start 0 0 0 gap advisory
command context 0 0 0 gap advisory
command checkpoint 0 0 0 gap advisory
command handover 0 0 0 gap advisory
command check 0 0 0 gap advisory
command finish 0 0 0 gap advisory
command history 0 0 0 gap advisory
command decision 0 0 0 gap advisory
command question 0 0 0 gap advisory
command prompt 0 0 0 gap advisory
command evidence 0 0 0 gap advisory
command skills 0 0 0 gap advisory
command capture 0 0 0 gap advisory
command search 0 0 0 gap advisory
command doctrine 0 0 0 gap advisory
command plan 0 0 0 gap advisory
command version 0 0 0 gap advisory
command session 0 0 0 gap advisory
command knowledge 0 0 0 gap advisory
command adr 0 0 0 gap advisory
command usecase 0 0 0 gap advisory
command rules 0 0 0 gap advisory
command migrate 0 0 0 gap advisory
command recover 0 0 0 gap advisory
command bench 0 0 0 gap advisory
command archive 0 0 0 gap advisory
usecase coverage: 30 target(s), 0 covered, 0 partial, 0 required gap(s) (columns: use cases, executable, evidence)
- exit 0
- stdout_contains /^command +doctor +0 +0 +0 +gap +advisory/
-
a draft from what the registry, the fixture and the claims already know; nothing in it is verified
wrote: .ai/repo/use-cases/doctor-draft.md (draft; complete the narrative and the assertions, then set status: active)
usecase scaffold: 1 draft(s) written
- exit 0
- stdout_contains /wrote: \.ai/repo/use-cases/doctor-draft\.md/
-
the draft resolves: its command, setup and category exist
OK use-case 1 use case(s), 0 application(s) — every command, doctrine, claim, responsibility, application, category, setup and stdin resolves; every scenario step names a listed command
usecase validate: 0 failure(s)
- exit 0
- stdout_contains /usecase validate: 0 failure/
-
the scaffolded scenario executes the real command in a disposable repository
doctor-draft pass 1 step(s)
usecase run: 1 scenario(s), 0 failed, 0 unmet, 0 not run; evidence under .ai/local/evidence/use-cases/
- exit 0
- stdout_contains /doctor-draft +pass/
-
a draft never counts; coverage moves when the use case is active
command init 0 0 0 gap advisory
command update 0 0 0 gap advisory
command doctor 0 0 0 gap advisory
command watch 0 0 0 gap advisory
command start 0 0 0 gap advisory
command context 0 0 0 gap advisory
command checkpoint 0 0 0 gap advisory
command handover 0 0 0 gap advisory
command check 0 0 0 gap advisory
command finish 0 0 0 gap advisory
command history 0 0 0 gap advisory
command decision 0 0 0 gap advisory
command question 0 0 0 gap advisory
command prompt 0 0 0 gap advisory
command evidence 0 0 0 gap advisory
command skills 0 0 0 gap advisory
command capture 0 0 0 gap advisory
command search 0 0 0 gap advisory
command doctrine 0 0 0 gap advisory
command plan 0 0 0 gap advisory
command version 0 0 0 gap advisory
command session 0 0 0 gap advisory
command knowledge 0 0 0 gap advisory
command adr 0 0 0 gap advisory
command usecase 0 0 0 gap advisory
command rules 0 0 0 gap advisory
command migrate 0 0 0 gap advisory
command recover 0 0 0 gap advisory
command bench 0 0 0 gap advisory
command archive 0 0 0 gap advisory
usecase coverage: 30 target(s), 0 covered, 0 partial, 0 required gap(s) (columns: use cases, executable, evidence)
- exit 0
- stdout_contains /^command +doctor +0 +0 +0 +gap/
Why the tool knows this
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.
The rules that make it hold
Guarantees exercised
Related use cases
Computed from what they share: claims, rules, commands, category, applications. Nobody maintains this list.
- Extend what the executable serves by adding a file, never by rebuilding itAdd a rule, a prompt or a knowledge node to .ai/ and have it appear as an MCP resource, an HTTP route and a reference entry, with the same binary.
- Prove a rule is actually enforced, not merely written downAnswer "is this rule real?" with a command rather than a reading of the source.
- Say what your work is for, once, and have every surface say itRecord an operational failure mode as one file and have the command line, the API, MCP and the website answer it without registering it anywhere.
- Trust the policy and the profiles only after they are validatedProve that the canonical policy parses with every key it needs declared, that every profile parses and the default exists, and that what the policy declares as enforced is what actually runs.
- Adopt a repository that already has its own rulesInstall the supervisory layer into a repository with a hand-written CLAUDE.md, without the tool taking ownership of a file somebody else wrote.
The moments this answers