Skip to content

Start a session from a rendered framing, not a pasted transcript

List the prompt assets the repository ships, render one against the durable state, and read the context it embeds.

verified Sessions and handoverbasicagentread-only

Situation

Every new session starts with the same paragraph somebody types from memory, and the repository state it describes is whatever that person last remembered.

Scenario

setup: installed
given:
  - 'Majordomus installed; the skeleton ships its prompt assets'
steps:
  - id: which
    run: ['prompt', 'list']
    note: 'the small set of versioned framings; nothing ranks them'
    expect:
      exit: 0
      stdout_contains: ['continue', 'handover', 'review']
  - id: refuse-unknown
    run: ['prompt', 'show', 'nosuch']
    note: 'an asset that does not exist is named with the command that lists them'
    expect:
      exit: 12
      stdout_contains: ['no prompt asset', 'prompt list']
  - id: the-context
    run: ['context']
    note: 'what a prompt embeds: durable state in authority order, within the budget'
    expect:
      exit: 0
      stdout_contains: ['^## GIT', '^## BUDGET']
then:
  - 'a prompt is rendered against a closed set of state tokens'
  - 'the context inside it is the same one `context` prints'

Outcome

The framing is a versioned file under .ai/repo/prompts/; rendering it embeds the assembled context, so the session starts from durable state and a budget, not from a paste.

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 ships its prompt assets

when

  1. 1majordomus prompt list
  2. 2majordomus prompt show nosuch
  3. 3majordomus context

then

  • a prompt is rendered against a closed set of state tokens
  • the context inside it is the same one `context` prints

What the tool did

Evidence of the run this page was generated from: pass, 3 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.

  1. the small set of versioned framings; nothing ranks them

    continue               resume a task from durable state instead of from someone's memory
    debug                  frame a defect so that the fix is proven, not asserted
    handover               produce a continuation record body for the current task
    review                 review the working diff against the claimed scope and the finish contract
    • exit 0
    • stdout_contains /continue/
    • stdout_contains /handover/
    • stdout_contains /review/
  2. an asset that does not exist is named with the command that lists them

    majordomus: no prompt asset 'nosuch' (.ai/repo/prompts/nosuch.md); try: majordomus prompt list
    • exit 12
    • stdout_contains /no prompt asset/
    • stdout_contains /prompt list/
  3. what a prompt embeds: durable state in authority order, within the budget

    # Majordomus context — <time>
    # a projection of durable state, not a source of truth: validate every line against git
    
    ## GIT
    repository   <repo>
    branch       main
    head         <sha>
    working_tree clean
    
    ## TASK
    none active — run: majordomus start "<task>" --scope <paths>
    
    ## KNOWLEDGE (candidates awaiting review on this branch; majordomus knowledge candidates)
    No knowledge candidates await review on this branch. That is an answer, not a gap: `majordomus knowledge candidates` lists every branch.
    
    ## EXCLUDED
    - context documents — no active task names a scope; run: majordomus context resolve <path>
    - handover — no record for this worktree and branch — absence, not a stale match
    
    ## BUDGET
    21 of 300 lines
    • exit 0
    • stdout_contains /^## GIT/
    • stdout_contains /^## BUDGET/

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.

Searches the titles and descriptions of every page this site publishes.