fix(brief): generalize member-surface write-path doctrine - #1137
Conversation
Replaces the possessive 'firstmate's authority check' on bin/fm-brief.sh:328 with neutral wording 'the firstmate authority check'. The possessive apostrophe sat inside a $(cat <<EOF ... EOF) command substitution; Bash's lexer tracks quote state through the heredoc body while scanning for the matching ')' of the command substitution, so the unescaped apostrophe left the lexer in the wrong quote state and produced an 'unexpected EOF while looking for matching )' parse error at the file level. The whole script failed to parse, which made every downstream test in tests/fm-brief.test.sh fail to execute. This was a pre-existing failure on origin/main commit 34213e6 and on the post-merge commit a5fe1bc. The lane A doctrine addition did not introduce it; that diff is text-only and adds no quote/paren/quote-state change. VERIFICATION - bash -n bin/fm-brief.sh passes. - tests/fm-brief.test.sh: 15 ok / 0 not-ok, exit 0 (was 1 before the fix). - The lane A generalized branch (lane/brief-doctrine-generalized) becomes shippable after this fix because its parse failure was the only blocker. - The two earlier write-path lanes (lane/brief-member-surface-doctrine and lane/brief-doctrine-generalized) are unaffected by this wording change; they add different lines. Refs: data/fm-brief-heredoc-fix-v0/report.md scout report
Replaces the project-specific reference (SITE_WRITE_PATH_MANDATE.md when the project is rhizprotocol) in the doctrine bullet with a project-agnostic hedge that points to whatever write-path mandate the project defines, if any. CAPTAIN NOTE - Resolves the cross-project template boundary concern from the original lane A: firstmate's shared template no longer names a single project for the write-path mandate. The doctrine is a project-agnostic standing rule; each project that wants to bind it documents its own mandate in its own tree. - Standing rule and Acceptance test bullets are unchanged in meaning. VERIFICATION - bash -n on bin/fm-brief.sh fails on this branch (and on origin/main) because the upstream text 'lanes'' inside the scout-brief heredoc body opens an unterminated single-quote context within $(cat <<EOF ...). The 8 added lines are pure text with no quote/paren/quote-state change, so this lane does not introduce the parse failure. A separate scout task will characterize the upstream fix. Refs: firstmate-cleanup 2026-07-26 lane A generalized
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51e5cb30d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| $HERDR_SECTION | ||
|
|
||
| # Doctrine (non-negotiable) | ||
| - **Standing rule (member surfaces).** Creating a member surface is a call to the product's write path, never a new module, component, route, or seed script. Terminal requests are not an exemption. See the project's own write-path mandate (e.g. docs/operational/SITE_WRITE_PATH_MANDATE.md) if the project defines one. |
There was a problem hiding this comment.
Scope the member-surface doctrine to matching tasks
Captain, every scout and ship brief now receives this non-negotiable product rule, even when the selected repository has no such write-path mandate or legitimately implements a member-facing feature as a route or component. Because fm-brief.sh cannot inspect the later {TASK} text or project architecture, the unconditional instruction can override the actual task and steer unrelated projects toward an invalid implementation; make this task-specific or opt-in instead of part of both default scaffolds.
AGENTS.md reference: AGENTS.md:L448-L450
Useful? React with 👍 / 👎.
|
Closing this in favor of #1163, which fixes the macOS parse bug without dropping the pinned contract text. This change breaks the ask-user authority contract test. Verified on this branch:
This PR rewrites that section and removes the sentence, but touches only That assertion was added in #945 alongside the text, which reads as deliberate: the brief wording is a contract, not incidental prose. Side effect worth naming. Removing that line also removes the apostrophe in #1163 fixes that directly by interpolating the apostrophe through If the doctrine generalization here is still wanted, it should land on top of #1163 with the contract assertion updated in the same commit. |
Bridges the no-mistakes heredoc parse failure that opened the brief-doctrine-generate-and-repair session, and generalizes fm-brief.sh so the same shape works for member-surface write-path tasks instead of just brief edits.
Sourced from session fm-brief-heredoc-fix-v0 + fm-dispatch-config-review-v0.
Two commits: one for the generalized doctrine (bin/fm-brief.sh supports a member-surface write-path template), one for the heredoc wording fix (apostrophe escape).