miadi-orchestration-kit

03 · Specify

Five parts, each usable alone, in the order the loop runs them. S1 exists. S2 to S5 are specified, not built.

S1 · The reason at exit (built, 0.1.49)

/inventory-exit-reason [reason] in a session the person is closing short.

S2 · The reason after exit

Most exits happen without the command: 482 sessions have no end line, and a person often says why only later (“I killed that one, it was in the wrong folder”).

inventory.mjs exit --session <id> --kind <kind> --reason "<words>" --by "<person>[, via <seat>]" [--at <ISO>]

S3 · One view of exits: miadi-hooks-interpret exits

The interpreter is the door the lookup guard names, so the question “how and why did sessions end” gets a verb there.

miadi-hooks-interpret exits [--since <date>] [--until <date>] [--headless | --all] [--json]

S4 · The investigation pass

A seat (the witness seat by default) reads exits and writes patterns. It runs after the nightly pass (D2 in STATUS), and is built as ../self-improvement-cycle/ S3 and S4 for the scorer exit-reason.

S5 · Recurrence

When a pattern’s change lands, its landed field is filled (by the person or by the seat that merged it, with the commit or release). Every later pass reports, for that pattern:

A returned pattern goes back to S4 step 5 with its new sessions. A held one stays listed with its last count, so it can be reopened.

Data

ExitEvent (a row of exits)

ExitPattern

InvestigationPass

Creative Advancement Scenarios

Creative Advancement Scenario: A seat on the wrong model

User Intent: Guillaume wants the work done on the model it needs and the cause counted. Current Reality: A seat launched by mctgo answers on Sonnet. He expected Opus. Natural Progression Steps:

  1. He types /inventory-exit-reason wrong model, this needed Opus.
  2. The record gets exit.kind: wrong_model, models.started: claude-sonnet-5-5 and a restart line with --model claude-opus-5-5. He types /exit and runs the restart line.
  3. The next pass finds three wrong_model exits that week, all launched by mct new with no --model, and matches them to jgwill/Miadi#1060.
  4. When the mct new change lands, the pass after counts wrong_model exits from mct launches since then. Achieved Outcome: The fix for #1060 is judged by the exits after it, not by memory. Supporting Features: S1, S3, S4, S5.

Creative Advancement Scenario: A reason given the next day

User Intent: Guillaume wants a session he killed yesterday to say why. Current Reality: The session has no end line and its record is unreviewed. Natural Progression Steps:

  1. He tells the witness seat “I killed that one, it was in the wrong folder”.
  2. The seat runs inventory.mjs exit --kind wrong_setup --reason "I killed that one, it was in the wrong folder" --by "Guillaume, via the witness seat".
  3. exits now lists the session with its reason and source: after. Achieved Outcome: The reason joins the next pass with the same weight as one given at exit. Supporting Features: S2, S3.

Creative Advancement Scenario: The weekly reading

User Intent: Guillaume wants to know, in five lines, why seats ended short this week and what to decide. Current Reality: Reasons are in records, unread together. Natural Progression Steps:

  1. The witness seat runs S4 over the week.
  2. It reports two new patterns with drafted issues, one recurring, one held.
  3. He decides each draft. The seat opens the ones he approves. Achieved Outcome: Each decision is made from counted sessions and leaves a pattern whose recurrence the next pass reports. Supporting Features: S3, S4, S5.