Six role texts that name only the roles a crew declares (#164, PR A) #166

Manually merged
terra merged 7 commits from venus/164-role-texts into main 2026-11-25 07:07:50 +00:00
Member

Purpose (product): every role a crew declares gets a shipped role text that matches how it works, and no member ever speaks of a role its crew does not declare. This is PR A of #164's design (issuecomment-4172, plus the r=1 change in 4173). PR B, the starter crew and the getting-started rewrite, follows once this lands. Refs #164.

Who a line goes to is filled in (the_crews_roles.ts):

dispatcher no dispatcher, Supervisor neither
{{hands_off_to}}: HANDOFF, BLOCKED the dispatcher the Supervisor the owner
{{verdict_to}}: VERDICT the dispatcher the member who handed it off the member who handed it off
{{asks_to}}: questions, decisions, push asks the Supervisor the Supervisor the owner

Blocks. [[if <role>]]…[[end]] and [[if no <role>]]…[[end]] are kept or dropped by mode.roles. An unknown role, a stray [[end]], a nested block or an unclosed block is refused as CrewTextRefused naming the file and line. A text with no mark is returned untouched. The practice is numbered after its blocks are read, so a dropped rule leaves no empty number.

Texts. New: roles/dispatcher.md, architect.md and security.md. Rewritten: supervisor.md, builder.md, reviewer.md, modes/solo.md, modes/team.md and practice.md. They describe the other members by what they do, and they hold no crew-only words. With no Supervisor, a member's work comes from the owner's first prompt or terminal, and the practice drops the same-day brief rule. The progress rule offers supervisor as a waiting_on value only when there is one. docs/the-declaration.md gains "What each role is told".

Test (the_crews_roles.node-test.ts): eight shapes, solo and team × with or without a Supervisor × with or without a dispatcher, with architect and security each declared in half of them. In every member's composed section:

  • no undeclared role is named (whole word, either case, plural too);
  • no [[/{{ mark is left;
  • in a crew with no Supervisor, the shipped practice, role and mode texts never say "brief";
  • in every shape, the builder's handoff and ask lines and the reviewer's and the practice's verdict lines each name the right party.

The expected parties are written in the test, not asked of whoEachLineGoesTo.

Mutants, each applied, run and restored; each fails the test:

  • (a) the old "Your brief is a file the Supervisor writes" back in modes/solo.md, unguarded: fail 1.
  • (b) builder.md "hand it off to the Supervisor" in place of {{hands_off_to}}: fail 2.
  • (c) [[if no …]] blocks always kept: fail 1.
  • (d) {{verdict_to}} resolving like {{hands_off_to}}: fail 1.

Other changes.

  • The #306 practice test keeps its title: with a Supervisor it still counts six rules, and it now also checks that a crew with none gets five, with no brief.
  • BUILDER, REVIEWER and SECURITY stay module-private. The tree spells those words as literals in about 300 places, so exporting them made check:restated-values judge each one.

Local checks. Composer tests 26/26. The test files of the composer's users (a_crews_tools, heed_the_crew_tools, the package contract, launch, start_a_member, approve, declare_crew, init, architecture): 721 tests, 720 pass, 0 fail. tsc and eslint are clean. These pass on the range: check:restated-values, check:private, check:base-tests (459 files, every title kept), check:no-import-cycle and check:marthas-names.

Purpose (product): every role a crew declares gets a shipped role text that matches how it works, and no member ever speaks of a role its crew does not declare. This is PR A of #164's design (issuecomment-4172, plus the r=1 change in 4173). PR B, the starter crew and the getting-started rewrite, follows once this lands. Refs #164. **Who a line goes to is filled in** (`the_crews_roles.ts`): | | dispatcher | no dispatcher, Supervisor | neither | |---|---|---|---| | `{{hands_off_to}}`: HANDOFF, BLOCKED | the dispatcher | the Supervisor | the owner | | `{{verdict_to}}`: VERDICT | the dispatcher | the member who handed it off | the member who handed it off | | `{{asks_to}}`: questions, decisions, push asks | the Supervisor | the Supervisor | the owner | **Blocks.** `[[if <role>]]…[[end]]` and `[[if no <role>]]…[[end]]` are kept or dropped by `mode.roles`. An unknown role, a stray `[[end]]`, a nested block or an unclosed block is refused as `CrewTextRefused` naming the file and line. A text with no mark is returned untouched. The practice is numbered after its blocks are read, so a dropped rule leaves no empty number. **Texts.** New: `roles/dispatcher.md`, `architect.md` and `security.md`. Rewritten: `supervisor.md`, `builder.md`, `reviewer.md`, `modes/solo.md`, `modes/team.md` and `practice.md`. They describe the other members by what they do, and they hold no crew-only words. With no Supervisor, a member's work comes from the owner's first prompt or terminal, and the practice drops the same-day brief rule. The progress rule offers `supervisor` as a `waiting_on` value only when there is one. `docs/the-declaration.md` gains "What each role is told". **Test** (`the_crews_roles.node-test.ts`): eight shapes, solo and team × with or without a Supervisor × with or without a dispatcher, with architect and security each declared in half of them. In every member's composed section: - no undeclared role is named (whole word, either case, plural too); - no `[[`/`{{` mark is left; - in a crew with no Supervisor, the shipped practice, role and mode texts never say "brief"; - in every shape, the builder's handoff and ask lines and the reviewer's and the practice's verdict lines each name the right party. The expected parties are written in the test, not asked of `whoEachLineGoesTo`. **Mutants**, each applied, run and restored; each fails the test: - (a) the old "Your brief is a file the Supervisor writes" back in modes/solo.md, unguarded: fail 1. - (b) builder.md "hand it off to the Supervisor" in place of `{{hands_off_to}}`: fail 2. - (c) `[[if no …]]` blocks always kept: fail 1. - (d) `{{verdict_to}}` resolving like `{{hands_off_to}}`: fail 1. **Other changes.** - The #306 practice test keeps its title: with a Supervisor it still counts six rules, and it now also checks that a crew with none gets five, with no brief. - `BUILDER`, `REVIEWER` and `SECURITY` stay module-private. The tree spells those words as literals in about 300 places, so exporting them made check:restated-values judge each one. **Local checks.** Composer tests 26/26. The test files of the composer's users (a_crews_tools, heed_the_crew_tools, the package contract, launch, start_a_member, approve, declare_crew, init, architecture): 721 tests, 720 pass, 0 fail. tsc and eslint are clean. These pass on the range: check:restated-values, check:private, check:base-tests (459 files, every title kept), check:no-import-cycle and check:marthas-names.
Martha ships a role text for supervisor, dispatcher, architect, security, builder and reviewer. Who a line goes to
is filled in from the declared roles: {{hands_off_to}} (a HANDOFF or a BLOCKED: the dispatcher, else the Supervisor,
else the owner), {{verdict_to}} (the dispatcher, else back to the member who handed the work off) and {{asks_to}}
(the Supervisor, else the owner). A sentence that holds only for some crews sits in an [[if <role>]] or
[[if no <role>]] block, kept or dropped by mode.roles; an unknown role, a stray [[end]], a nested or unclosed block
is refused by file and line. The mode texts say where a member's work comes from with no Supervisor, the practice
drops the same-day brief rule then, and the progress rule names supervisor as a waiting_on only when there is one.
A test composes every member of eight shapes (solo and team, with and without a Supervisor and a dispatcher) and
finds no undeclared role, no brief without a Supervisor, and each line routed to the one who takes it.
Role names the tree already spells as literals stay private; the block reader and the shape check split for eslint (#164)
Some checks failed
dependency advisories / node in . (pull_request) Successful in 12s
dependency advisories / node in installer (pull_request) Successful in 13s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 14s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Successful in 29s
CI / Martha's names are its own (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 30s
CI / the host drift check bites (pull_request) Successful in 1m6s
CI / the engine drift check bites (pull_request) Successful in 29s
CI / the posted text check bites (pull_request) Successful in 12s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 12s
CI / workflows are valid (pull_request) Successful in 12s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 37s
CI / installer (pull_request) Successful in 3m43s
CI / the pictures change only with the version (pull_request) Successful in 20s
CI / every check runs in a job (pull_request) Successful in 16s
CI / every job has a timeout (pull_request) Successful in 17s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 33s
CI / no literal restates a defined value (pull_request) Successful in 1m10s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 19s
CI / gate coverage (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
b7773af9af
Mars's r=1 FAIL: any [[…]] was read as a block, so a crew's conventions holding a shell test or a wiki link would
stop it starting. Now only [[if <role>]], [[if no <role>]] and [[end]] are marks, and everything else is text. Trailing
spaces and blank lines are tidied only where a dropped block stood, so hard breaks and code stay as written.
{{verdict_to}} without a dispatcher is the member who built the work: with a Supervisor routing, the one who handed
the work to the reviewer is not its builder. A {{…}} Martha does not fill is refused even inside a dropped block.
The {{bogus}} refusal case sits in a block the crew drops, so it pins the check before blocks (#164 r=1)
All checks were successful
dependency advisories / node in . (pull_request) Successful in 12s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 11s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Successful in 27s
CI / Martha's names are its own (pull_request) Successful in 28s
CI / no import cycle (pull_request) Successful in 28s
CI / the host drift check bites (pull_request) Successful in 1m11s
CI / the engine drift check bites (pull_request) Successful in 29s
CI / the posted text check bites (pull_request) Successful in 15s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 12s
CI / workflows are valid (pull_request) Successful in 14s
CI / installer (pull_request) Successful in 2m10s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 36s
CI / the pictures change only with the version (pull_request) Successful in 18s
CI / every check runs in a job (pull_request) Successful in 13s
CI / every job has a timeout (pull_request) Successful in 14s
CI / no literal restates a defined value (pull_request) Successful in 59s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 16s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 40s
CI / the relay loads in the recorded host (pull_request) Successful in 14m50s
CI / the clean-install proof removes its container (pull_request) Successful in 16m2s
CI / gate coverage (pull_request) Successful in 15m22s
7c914b2114
# Conflicts:
#	src/hand_a_member_its_crew_text/hand_a_member_its_crew_text.ts
the_crews_roles test fixtures carry memory: null, the field PR 167 added to what the ported rules read
All checks were successful
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 4s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 12s
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Successful in 28s
CI / Martha's names are its own (pull_request) Successful in 29s
CI / no import cycle (pull_request) Successful in 28s
CI / the engine drift check bites (pull_request) Successful in 34s
CI / the host drift check bites (pull_request) Successful in 1m7s
CI / the posted text check bites (pull_request) Successful in 14s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 14s
CI / workflows are valid (pull_request) Successful in 11s
CI / installer (pull_request) Successful in 2m13s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 36s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / no literal restates a defined value (pull_request) Successful in 1m2s
CI / every check runs in a job (pull_request) Successful in 14s
CI / every job has a timeout (pull_request) Successful in 14s
host drift / the recording is of the host members run (pull_request) Successful in 1m56s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 33s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 16s
CI / the relay loads in the recorded host (pull_request) Successful in 15m34s
CI / the clean-install proof removes its container (pull_request) Successful in 17m2s
CI / gate coverage (pull_request) Successful in 17m48s
6ba7d6bbe4
terra manually merged commit d1e6684eef into main 2026-11-25 07:07:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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!166
No description provided.