Repository navigation
fix(bin): forbid AI co-author trailers in generated ship briefs - #1379
eduardstan wants to merge 4 commits into
Conversation
|
Automated reminder: thanks for the PR! This branch currently has a merge conflict with the base branch. When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again. Noted for firstmate#1379 at |
… line; upstream kunchenguid#1379 approval gate stalled) Our workers generate their briefs from this copy, so the widened rule has to be here to have any effect. The same clause is folded into upstream PR kunchenguid#1379 and will arrive from there when that gate clears.
|
Automated reminder: thanks for the PR! This branch currently has a merge conflict with the base branch. When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again. Noted for firstmate#1379 at |
|
The two conflict reminders on this PR are answered — it is rebased and currently While going through my other open PRs here I noticed something that is probably worth flagging, since it affects the queue rather than this change specifically. Wheelhouse card #1940 evaluates this PR as meeting every gate except one:
That is also the state on all eleven of my open PRs, so none of them can clear the automated path until one is merged manually — it is a bootstrap condition rather than anything about the changes themselves. (G6 triage has separately not produced a verdict on mine; on #1966 it reported I am raising it here rather than on the others because this is the smallest one by some distance — 2 files, +23/−7 — and it is a narrow change to generated brief text with no runtime behaviour touched. If you want a low-risk candidate to start with, this is it. If you would rather start elsewhere, that is entirely fine; I mainly wanted the G3 dependency to be visible so it does not look like eleven PRs sitting idle for no reason. Two of the eleven exceed the G5 size limits (#1960 at 1080 lines, #1966 at 41 files / 2811 lines). Happy to split either into reviewable pieces if that would help — just say which. |
|
Following up once, then I will leave this alone. This PR is two files and thirty lines, rebased and clean, with all thirteen checks green. It was offered as a small, low-risk first merge rather than because it is urgent. Two things have changed since it was opened that make a first merge worth more than this change itself: The prime-agent adapter is now split and waiting. #1966 carried the whole thing at 41 files and could never clear the 20-file / 1000-line auto-merge limit, so it is closed in favour of three sized PRs: #2062 (registration and detection, 20 files / 746 lines), #2070 (herdr integration, 4 / 373) and #2075 (detached daemon-session cleanup, 6 / 279). Each was verified to stand alone against Fork PRs stopped running checks on 2026-08-08. Since then both workflow runs on a fork PR complete with No urgency and no expectation. If any of these are unwanted, closing them is a perfectly good answer and saves everyone time. |
Section 1 of AGENTS.md already bans crediting the model as commit co-author, but nothing carried that rule into project-repo work. State it plainly in the ship brief's standing Rules so every crewmate sees it; human co-author trailers remain allowed.
b7734bf to
851c299
Compare
…time (#57) Cursor injects the trailer after the typed message, and a per-machine cli-config opt-out is not a fleet contract. Every spawn now gives the pane a commit-msg hook that strips known AI trailers at the commit object, chaining the repository's own hooks at run time, failing closed on non-git launches, and cleaning up its read-only strip directory on abort and teardown. A secondmate home must be a git checkout so the strip cannot be skipped there; the upstream worker-account fixture is taught that. Fork patch. No upstream thread of this fleet's own tracks it; the nearest upstream threads are other contributors' brief-rule PRs kunchenguid#1379 and kunchenguid#4352 (open) and kunchenguid#4523 (closed by its author as a mistaken target).
Intent
Close the source of AI model co-author trailers landing in project commits. AGENTS.md section 1 already states 'Never add an agent name as a commit co-author' for this repo, but nothing carried that rule to crewmates working in project repos, and bin/fm-brief.sh's generated ship brief never mentioned it. Added a new standing rule to the ship brief's Rules block: 'Never add a co-author trailer naming an AI model or assistant... to any commit. Human co-author trailers stay allowed.' Renumbered the following rules (previously 2-7, now 3-8) to keep the list sequential. Deliberately did not touch the scout brief's Rules block since scout tasks never land commits (their scratch commits are discarded at teardown). Also deliberately did not add a git hook or commit-message filter per explicit task constraint: a brief instruction is the intended low-machinery fix. Checked whether the secondmate charter scaffold (same file, --secondmate branch) needed its own copy of the rule; it does not, because a secondmate delegates all project commit work to its own crewmates via the same fm-brief.sh ship/scout generator, which already carries the fix.
What Changed
bin/fm-brief.shship briefs now carry a standing rule 2 banning co-author trailers that name an AI model or assistant on any commit, while keeping human co-author trailers allowed; the following rules renumber from 2-7 to 3-8 and the no-mistakes ask-user cross-reference updates from "(rule 6)" to "(rule 7)".tests/fm-brief.test.shpins the new wording with anassert_grepacross all three ship delivery modes (no-mistakes / direct-PR / local-only); the suite passes 20/20.Risk Assessment
✅ Low: Text-only change to one brief generator plus a matching test assertion; both round-1 findings are fixed and the rest of the diff matches the stated intent exactly.
Testing
Ran the focused suite tests/fm-brief.test.sh (all 17 checks pass, including the newly pinned co-author assertion), then went beyond unit coverage by generating real ship, scout, and secondmate scaffolds with bin/fm-brief.sh and diffing the rendered Rules block against a replay of the pre-fix script at f7d0d0a: the ship brief gains the AI co-author ban as rule 2 with correct 1-8 renumbering and a fixed
(rule 7)cross-reference, while the scout brief and secondmate charter are confirmed untouched exactly as the intent describes. A repo-wide grep confirms no stale rule-number references remain. This is a generated-markdown surface rather than a UI, so the reviewer-visible evidence is the actual generated brief files and a before/after Rules-block comparison instead of screenshots.Evidence: Generated ship brief (end-user artifact a crewmate receives)
Evidence: Rules block before/after comparison
After: 1. Never push to the default branch. Never merge a PR. 2. Never add a co-author trailer naming an AI model or assistant (e.g.Co-authored-by: Claude ...) to any commit. Human co-author trailers stay allowed. 3. Stay inside this worktree; modify nothing outside it. 4. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations. 5. Report status by appending one line: 6. If you hit the same obstacle twice ... 7. If a decision belongs above the implementation worker ... 8. Never stop, restart, or update the sharedno-mistakesdaemon ... - ask-user findings are never yours to answer: escalate to firstmate (rule 7) and stop. Before (f7d0d0a): no co-author rule at all; rules ran 1-7; cross-ref read "(rule 6)".Evidence: Generated scout brief (deliberately unchanged)
Evidence: Generated secondmate charter (has no Rules block, so needs no copy)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed ✅
bin/fm-brief.sh:344- Renumbering left a stale cross-reference: the no-mistakes Definition of done still says "ask-user findings are never yours to answer: escalate to firstmate (rule 6) and stop", but rule 6 is now "If you hit the same obstacle twice, appendblocked: {why}and stop" — the needs-decision rule moved to 7. In the default no-mistakes mode, a crewmate that hits an ask-user gate finding follows the pointer and appendsblocked:instead ofneeds-decision:, routing it to firstmate's stuck-worker help path rather than the configured-authority decision path. Change "(rule 6)" to "(rule 7)".tests/fm-brief.test.sh:210- tests/fm-brief.test.sh asserts every other brief wording contract with assert_grep (nonterminal working: line, project-memory wording, authority wording), but nothing pins the new co-author rule, so a future edit to the Rules block can silently drop it. One assert_grep for "Never add a co-author trailer naming an AI model or assistant" in test_ship_modes_generate_clean_briefs matches the existing convention.🔧 Fix: fix stale rule cross-reference, pin co-author rule in tests
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-brief.test.sh(17/17 pass, includes the newNever add a co-author trailer naming an AI model or assistantassertion across all three ship delivery modes)Manual generation of a real ship brief:FM_HOME=$tmp bin/fm-brief.sh demo-ship-001 acme-webthen inspected the rendered# RulesblockManual generation of the scout brief:FM_HOME=$tmp bin/fm-brief.sh demo-scout-001 acme-web --scout(confirmed no co-author rule, numbering untouched)Manual generation of the secondmate charter:FM_HOME=$tmp FM_SECONDMATE_CHARTER='Own release ops' bin/fm-brief.sh demo-second-001 --secondmate acme-web(confirmed it has no Rules block, so no rule copy is needed)Baseline replay: generated a ship brief fromgit show f7d0d0a:bin/fm-brief.shin a temp copy of bin/ — zero co-author mentions and cross-ref read(rule 6), proving the new rule and renumbering are both real behavior changesgrep -rniE 'rule [2-8]\b' bin/ skills/ docs/ AGENTS.md CLAUDE.md— only one rule-number cross-reference exists repo-wide and it now correctly points at rule 7git status --porcelain— clean worktree after testing, no transient artifacts left behind✅ **Document** - passed
✅ No issues found.
⏭️ **Lint** - skipped
✅ **Push** - passed
✅ No issues found.