Skip to content

The guide an agent reads before building a home - #11

Merged
Mathieu2301 merged 1 commit into
mathieu/agent-clifrom
mathieu/agent-guide
Sep 14, 2026
Merged

Mathieu2301 merged 1 commit into
mathieu/agent-clifrom
mathieu/agent-guide

Conversation

@Mathieu2301

Copy link
Copy Markdown
Member

Stacked on #10, whose code this documents. Base is mathieu/agent-cli, not main.

Why

The agent-first toolchain landed before the document explaining it. Someone's Claude Code or Codex, handed a house, could read the SDK reference and copy templates/home — but nothing stated the judgment neither of them carries:

  • the coordinator is the only place authorization happens. Removing the caller check produces no error, just a home anyone enrolled can drive;
  • miakapp.yaml requirements and coordinator grants intersect silently. Asking for more does not fail at publication; the component never receives the path and the interface renders a hole. This is the quietest way a Miakapp home breaks;
  • an unknown outcome is never retried, because the physical world has no rollback.

What is in it

docs/agent-guide.md, ten sections: what the three artifacts are and who trusts whom, characterizing an existing house before designing anything, the coordinator's four declarations with the state-before-event ordering rule, the component's semantic vocabulary and the two states it must never hide, the intersection rule and the test that enforces it, the check loop, publishing with generation CAS, and a pre-delivery checklist.

Plus the exit-code table as a table, since the usual caller is a program: branch on the code, reconcile on 7, never retry it.

Provenance

Every claim is taken from the code it describes — UI vocabulary and limits from packages/component, command surface and exit codes from packages/cli, ordering and authorization rules from templates/home. Protocol claims are pinned to their source: 4409 to RFC 0001 §7.4, the staleness requirement to RFC 0002 §12.2, and the guide says explicitly that the broker, not RFC 0002, is the authority for the guest ABI.

The two CI lessons are the ones this repository paid for on #10: a check that exists is not a check that runs, and a local run under Bun 1.4 proves nothing about a runner pinned to 1.2.23.

Closes the second deliverable of workstream F.

Review

Docs only — one new file and a README pointer. The useful review question is not prose but accuracy: whether any rule here is stated more confidently than the code supports.

The toolchain shipped before the document that explains it. An agent handed
someone's house could read the SDK reference and the template, but nothing
stated the judgment neither of them carries: that the coordinator is the only
place authorization happens, that component requirements and coordinator grants
intersect silently so a mismatch renders a hole instead of raising, and that a
call whose outcome is unknown must never be retried because the lamp may
already have moved.

Everything here is taken from the code it describes: the UI vocabulary and
limits from packages/component, the command surface and the exit-code table
from packages/cli, the ordering and authorization rules from templates/home.
The two CI lessons are the ones this repository paid for on #10 — a check that
exists is not a check that runs, and a local run under the wrong Bun proves
nothing about the runner.

Closes the second deliverable of workstream F.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant