A user cannot see what a declaration may hold: ship a full example martha.json with every role, profile, harness and key #303

Closed
opened 2026-11-27 09:44:15 +00:00 by supervisor · 1 comment
Owner

Purpose (product): a Martha user can read, in one file shipped with Martha, every role, profile, harness, provider, host kind and setting a declaration may hold, so they know what is possible before they write their own.

Raf, 2026-11-27: "can you generate a ~/beatles/.martha/martha.full-example.json? This json file should contain all possible roles, profiles, harnesses...right now, a user has no idead of what is possible"

Now: Vesta writes that file for Raf's own workspace, read from the declaration's source and proven with martha ls (brief 2026-11-27). This issue is the product half, placed later: ship the example with Martha (e.g. docs/ beside the-declaration.md, named by martha init and the getting-started page) and keep it valid by reading it in the declaration tests.

Done-when: the example ships in the release, the declaration reader reads it in a test, and martha init or getting-started names where it is.

Refs #164, docs/the-declaration.md

Purpose (product): a Martha user can read, in one file shipped with Martha, every role, profile, harness, provider, host kind and setting a declaration may hold, so they know what is possible before they write their own. Raf, 2026-11-27: "can you generate a ~/beatles/.martha/martha.full-example.json? This json file should contain all possible roles, profiles, harnesses...right now, a user has no idead of what is possible" Now: Vesta writes that file for Raf's own workspace, read from the declaration's source and proven with `martha ls` (brief 2026-11-27). This issue is the product half, placed later: ship the example with Martha (e.g. docs/ beside the-declaration.md, named by `martha init` and the getting-started page) and keep it valid by reading it in the declaration tests. Done-when: the example ships in the release, the declaration reader reads it in a test, and `martha init` or getting-started names where it is. Refs #164, docs/the-declaration.md
Member

Done-when, each line against ee374a16 (martha main at the landing of this package, PR 306):

  1. the example ships in the release — MET. docs/martha.full-example.json is committed. pack_a_release/pack_a_release.sh builds the release layer from git archive HEAD minus whatever .gitattributes marks export-ignore, and the only such line is installer/ export-ignore. git archive --format=tar ee374a16 -- docs/martha.full-example.json lists docs/martha.full-example.json, so the next v* tag's image carries it. The 0.4.3 a machine installs today predates the landing and so does not carry it; no release has been cut since.

  2. the declaration reader reads it in a test — MET. src/declare_crew/the_full_example_declaration.node-test.ts hands the file's text to declareCrew, the reader itself, and requires it to be declared with no refusal; it then requires every field DECLARATION_FIELDS accepts to be named in the example, on the block or on one of its entries, so the file can neither name a field a declaration is refused for nor fall behind the reader. The four fields it leaves out are each refused beside a field the example names (house_rules.clones and house_rules.worktrees beside workspace.root; house_rules.gate_enforce beside gate_enforces; engine_endpoint.key_from beside key_file), and the test names each one with its reason rather than tolerating a gap.

  3. martha init or getting-started names where it is — MET, both. martha init ends by printing theFullExampleLine(releaseTree()) (src/run_the_martha_command/run_the_martha_command.ts:170), and docs/getting-started.md names the file at line 94 and links it at line 101. Both take the path from the one constant THE_FULL_EXAMPLE_DECLARATION (src/declare_crew/the_full_example_declaration.ts:11), so the page, martha init and the test cannot drift apart.

Landed as ee374a16 on fast-forward from d2c930e1, PR 306, PASS at r=1 with Pallas's one-line inline fix to the test's refusal message.

Refs #164

Done-when, each line against `ee374a16` (martha main at the landing of this package, PR 306): 1. **the example ships in the release — MET.** `docs/martha.full-example.json` is committed. `pack_a_release/pack_a_release.sh` builds the release layer from `git archive HEAD` minus whatever `.gitattributes` marks `export-ignore`, and the only such line is `installer/ export-ignore`. `git archive --format=tar ee374a16 -- docs/martha.full-example.json` lists `docs/martha.full-example.json`, so the next `v*` tag's image carries it. The 0.4.3 a machine installs today predates the landing and so does not carry it; no release has been cut since. 2. **the declaration reader reads it in a test — MET.** `src/declare_crew/the_full_example_declaration.node-test.ts` hands the file's text to `declareCrew`, the reader itself, and requires it to be declared with no refusal; it then requires every field `DECLARATION_FIELDS` accepts to be named in the example, on the block or on one of its entries, so the file can neither name a field a declaration is refused for nor fall behind the reader. The four fields it leaves out are each refused beside a field the example names (`house_rules.clones` and `house_rules.worktrees` beside `workspace.root`; `house_rules.gate_enforce` beside `gate_enforces`; `engine_endpoint.key_from` beside `key_file`), and the test names each one with its reason rather than tolerating a gap. 3. **`martha init` or getting-started names where it is — MET, both.** `martha init` ends by printing `theFullExampleLine(releaseTree())` (`src/run_the_martha_command/run_the_martha_command.ts:170`), and `docs/getting-started.md` names the file at line 94 and links it at line 101. Both take the path from the one constant `THE_FULL_EXAMPLE_DECLARATION` (`src/declare_crew/the_full_example_declaration.ts:11`), so the page, `martha init` and the test cannot drift apart. Landed as `ee374a16` on fast-forward from `d2c930e1`, PR 306, PASS at r=1 with Pallas's one-line inline fix to the test's refusal message. Refs #164
vesta closed this issue 2026-11-27 15:06:39 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha#303
No description provided.