Skip to content

fix(bin): forbid agent commit co-authors in every generated crewmate brief - #2704

Open
Lakescape wants to merge 2 commits into
kunchenguid:mainfrom
Lakescape:fm/fm-brief-agent-coauthor-rule
Open

Lakescape wants to merge 2 commits into
kunchenguid:mainfrom
Lakescape:fm/fm-brief-agent-coauthor-rule

Conversation

@Lakescape

Copy link
Copy Markdown
Contributor

Intent

Firstmate repo task: stop agent co-author trailers from reaching landed history.

THE DEFECT: AGENTS.md carries the rule 'Never add an agent name as a commit co-author', but it is not reaching crewmates, because the generated brief scaffold never states it and firstmate does not reliably restate it by hand. Measured 2026-08-17: agent Co-Authored-By trailers are present across landed history in projects/InsightEngine (Claude Opus 5, Claude Code) and projects/orca-command-center (Orca, Claude Opus 5 1M context), including commits landed that same night. This is a rig defect, not a worker discipline problem: a rule that only lives in a file the worker never reads is not a control.

DELIVERABLE 1, pick the mechanism and say why. Two candidates were named: A, emit the rule in the standard brief contract so bin/fm-brief.sh states it in the generated Rules section of every ship brief and no brief can omit it; B, strip or refuse agent Co-Authored-By trailers on the commit path. The task required weighing them (A is advisory and depends on worker compliance; B is deterministic but needs a commit path firstmate actually controls across every harness and backend), considering whether both are warranted, and making the reasoning visible in the PR body rather than buried. CHOSEN: A only, deliberately, for these reasons which belong in the PR body: (1) firstmate owns no commit path that every worker goes through; workers commit inside project worktrees under eight verified harnesses plus muse, on five runtime backends. (2) The existing PreToolUse infrastructure (bin/fm-arm-pretool-check.sh) only sees a command string, so it cannot see a message supplied via -F, a heredoc, EDITOR, or a later --amend; a shell-layer guard is silently bypassed by ordinary usage. (3) The only guard that catches every message source is a git commit-msg hook, which lives in the project's shared .git common dir and is repo-wide config; installing one means firstmate writing into project git config, colliding with any project that already sets core.hooksPath, and affecting commits made outside firstmate entirely, trading a documentation gap for a project-mutation surface. (4) The no-mistakes pipeline is an external binary and not extensible here. (5) A is sufficient because the defect was never worker non-compliance, it was that the rule lived exclusively in AGENTS.md, which is firstmate's own instruction surface and which a crewmate in a project worktree never reads; the brief is the one document every crewmate does read, so stating it there closes the actual gap.

DELIVERABLE 2, implement it with a colocated test that fails against the current code and passes after, showing both. Implemented as rule 8 of the standard Rules section in bin/fm-brief.sh: 'Never add an agent name as a commit co-author: no Co-Authored-By: trailer naming Claude, Codex, Cursor, Grok, Orca, or any other agent, model, or tool.' Applied to BOTH the ship and the scout scaffold, deliberately: bin/fm-promote.sh keeps the scout brief loaded and sends ship instructions by message, so a promoted worker never receives a ship brief and its scratch work becomes ship commits under scout rules. A one-sentence pointer was added to the fm-brief.sh header, which is the owner of what the generated scaffolds contain. Test added to the existing colocated tests/fm-brief.test.sh as test_every_crewmate_scaffold_forbids_agent_co_authors, covering all four scaffolds (no-mistakes, direct-PR, local-only, scout). Evidence shown to the captain: before the change it reported 'not ok - no-mistakes brief did not carry the no-agent-co-author commit rule'; after, the suite is 21 ok / 0 not ok. The test asserts on the GENERATED brief output, which is fm-brief.sh's own generated public artifact, not on implementation source bytes.

DELIVERABLE 3, sweep the already-landed local-only commits: determine which existing commits carrying agent co-author trailers are still local-only (not pushed to any remote) and therefore still amendable, REPORT the list, and do NOT amend or rewrite any history. Done and reported: exactly one fleet-wide, InsightEngine acfb2e1f 'chore(planning): archive v1.0 ATX-1457 milestone', 2026-07-15, trailer 'Cursor [email protected]', reachable only from tag v1.0-atx-1457 and on no local or remote branch. Nothing was amended. Everything else is already pushed and stays as it is: InsightEngine has 1,563 trailered commits on remote refs, orca-command-center 61, and this repo's one (bc1a21b) is on fork/main.

HARD CONSTRAINTS accepted and honored, do not flag these as omissions: do not rewrite git history (no rebase -i, no filter-branch, no commit --amend on anything but the worker's own in-progress commit); do not touch anything under projects/ (the sweep was strictly read-only); do not weaken or restate the AGENTS.md rule in a second place, so AGENTS.md stays the owner and the brief is the allowed single-line reinforcement at the risk point, and AGENTS.md was deliberately NOT edited at all (minimal means zero here). Per .agents/skills/firstmate-coding-guidelines, a single deliberate one-line reinforcement at a genuine risk point is permitted and is what rule 8 is.

Commit hygiene was itself in scope: the delivered commit carries no Co-Authored-By trailer naming any agent. Verified: git log -1 --format='%(trailers)' is empty.

Verification already run locally: tests/fm-brief.test.sh 21 ok / 0 not ok; bin/fm-lint.sh clean (ShellCheck 0.11.0 pinned; actionlint absent locally and no workflow was touched); bin/fm-doc-audience-check.sh ok (surfaces=69, local_links=255); adjacent suites green: fm-ask-user-authority, fm-secondmate-safety 77 ok, fm-subagent-pretool-check 13 ok, fm-tangle-guard 6 ok.

What Changed

  • bin/fm-brief.sh now emits rule 8 in the standard Rules section of both the ship and the scout scaffold: "Never add an agent name as a commit co-author: no Co-Authored-By: trailer naming Claude, Codex, Cursor, Grok, Orca, or any other agent, model, or tool." The scout scaffold gets it too because bin/fm-promote.sh keeps the scout brief loaded and sends ship instructions by message, so a promoted worker's scratch work becomes ship commits under scout rules. A one-line pointer was added to the fm-brief.sh header, which owns what the generated scaffolds contain.
  • tests/fm-brief.test.sh gains test_every_crewmate_scaffold_forbids_agent_co_authors, asserting on the generated brief.md for all four scaffolds (no-mistakes, direct-PR, local-only, scout) that both the rule text and the forbidden Co-Authored-By: trailer name are present. Against the base commit it reports not ok - no-mistakes brief did not carry the no-agent-co-author commit rule; with the change the suite is 21 ok / 0 not ok.
  • Mechanism choice, stated here rather than buried: this is the brief-contract fix (A), not a commit-path guard (B), and A alone is deliberate. Firstmate owns no commit path every worker goes through — workers commit inside project worktrees across eight verified harnesses plus muse on five runtime backends. The existing bin/fm-arm-pretool-check.sh PreToolUse hook only sees a command string, so it cannot see a message supplied via -F, a heredoc, EDITOR, or a later --amend; a shell-layer guard is silently bypassed by ordinary usage. The only guard catching every message source is a commit-msg hook, which lives in the project's shared git common dir, collides with any project that sets core.hooksPath, and would affect commits made outside firstmate entirely — trading a documentation gap for a project-mutation surface. The no-mistakes pipeline is an external binary and not extensible here. The defect was never worker non-compliance: the rule lived only in AGENTS.md, firstmate's own instruction surface, which a crewmate in a project worktree never reads. AGENTS.md stays the owner and was deliberately left unedited; the brief is the one document every crewmate does read.

Read-only sweep of already-landed agent co-author trailers (nothing amended, no history rewritten, nothing under projects/ touched): exactly one trailered commit is still local-only and therefore amendable — InsightEngine acfb2e1f "chore(planning): archive v1.0 ATX-1457 milestone" (2026-07-15, trailer Cursor <[email protected]>), reachable only from tag v1.0-atx-1457 and on no local or remote branch. Everything else is already pushed and stays as it is: InsightEngine 1,563 trailered commits on remote refs, orca-command-center 61, and this repo's one (bc1a21b) on fork/main.

Risk Assessment

✅ Low: Additive, well-bounded change: two identical instruction lines in the two brief heredocs that cover all four crewmate scaffolds, plus a colocated test that executes the real script and asserts on its generated brief artifact; no control flow, no existing assertion or downstream rule-number reference is affected.

Testing

Exercised bin/fm-brief.sh directly and captured the generated brief.md — the document a crewmate actually reads — for all four scaffolds under both base and target code: rule 8 forbidding agent Co-Authored-By trailers is absent before and present after in every one, with rules 1-7 unchanged. The colocated suite passes 21 ok / 0 not ok at target, and the same target test file run against a pristine base-commit checkout fails on the new assertion, establishing the fail-before/pass-after regression. Also confirmed no history rewrite (base is ancestor, one new commit), no files touched outside bin/ and tests/, and zero Co-Authored-By trailer lines on the delivered commit. No screenshot applies: the change has no rendered UI surface — its end-user surface is generated markdown text, which is captured verbatim in the artifacts. Worktree left clean and temp scratch directories removed.

Evidence: Generated brief.md Rules section — base vs target, all four scaffolds

Source: Generated brief.md Rules section — base vs target, all four scaffolds

Generated crewmate brief.md — Rules section, base 1cb900c vs target 82a8d63
Command per scaffold: FM_HOME=<tmp> bin/fm-brief.sh <id> alpha --mode <kind>   (scout: --scout)

################ scaffold: no-mistakes ################
---------------- BEFORE (1cb900c) ----------------
# Rules
1. Never push to the default branch. Never merge a PR.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/fmbrief-demo.dNujCP/before/state/demo-no-mistakes.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

---------------- AFTER (82a8d63) -----------------
# Rules
1. Never push to the default branch. Never merge a PR.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/fmbrief-demo.dNujCP/after/state/demo-no-mistakes.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.
8. Never add an agent name as a commit co-author: no `Co-Authored-By:` trailer naming Claude, Codex, Cursor, Grok, Orca, or any other agent, model, or tool.


################ scaffold: direct-PR ################
---------------- BEFORE (1cb900c) ----------------
# Rules
1. Never push to the default branch (push only your `fm/demo-direct-PR` branch). Never merge a PR.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/fmbrief-demo.dNujCP/before/state/demo-direct-PR.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

---------------- AFTER (82a8d63) -----------------
# Rules
1. Never push to the default branch (push only your `fm/demo-direct-PR` branch). Never merge a PR.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/fmbrief-demo.dNujCP/after/state/demo-direct-PR.status'`
   States: wo

... [3626 bytes truncated] ...

stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

---------------- AFTER (82a8d63) -----------------
# Rules
1. Never push to any remote and never open a PR. Work only on your `fm/demo-local-only` branch; firstmate handles the merge into local `main`.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/fmbrief-demo.dNujCP/after/state/demo-local-only.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.
8. Never add an agent name as a commit co-author: no `Co-Authored-By:` trailer naming Claude, Codex, Cursor, Grok, Orca, or any other agent, model, or tool.


################ scaffold: scout ################
---------------- BEFORE (1cb900c) ----------------
# Rules
1. Never push to any remote and never open a PR.
2. Stay inside this worktree; the only files you may write outside it are the report and the status file below.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/fmbrief-demo.dNujCP/before/state/demo-scout.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on and the needs-decision/blocked/paused/done/failed states. No step-by-step
   FYI progress lines; firstmate reads your pane for that.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset):
   firstmate then leaves your idle pane alone and rechecks it on a long cadence instead of
   treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs to a human (product choices, destructive actions),
   append `needs-decision: {summary of options}` and stop. Firstmate will reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

---------------- AFTER (82a8d63) -----------------
# Rules
1. Never push to any remote and never open a PR.
2. Stay inside this worktree; the only files you may write outside it are the report and the status file below.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/fmbrief-demo.dNujCP/after/state/demo-scout.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on and the needs-decision/blocked/paused/done/failed states. No step-by-step
   FYI progress lines; firstmate reads your pane for that.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset):
   firstmate then leaves your idle pane alone and rechecks it on a long cadence instead of
   treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs to a human (product choices, destructive actions),
   append `needs-decision: {summary of options}` and stop. Firstmate will reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.
8. Never add an agent name as a commit co-author: no `Co-Authored-By:` trailer naming Claude, Codex, Cursor, Grok, Orca, or any other agent, model, or tool.
Evidence: Regression counterfactual: new test fails on base code, passes on target

Source: Regression counterfactual: new test fails on base code, passes on target

=== Counterfactual: target tests/fm-brief.test.sh run against BASE code 1cb900c === not ok - no-mistakes brief did not carry the no-agent-co-author commit rule === Same suite against TARGET code 82a8d63 === ok - fm-brief.sh: every crewmate scaffold forbids agent commit co-authors ok count: 21 not-ok count: 0

=== Counterfactual: tests/fm-brief.test.sh (target test file) run against BASE code 1cb900c ===
not ok - no-mistakes brief did not carry the no-agent-co-author commit rule

=== Same suite against TARGET code 82a8d63 ===
ok - fm-brief.sh: investigation and visual-review completions load the shared decision policy
ok - fm-brief: scout and secondmate code paths still scaffold well-formed briefs
ok - fm-brief.sh: every crewmate scaffold forbids agent commit co-authors

ok count: 21   not-ok count: 0
Evidence: Rule 8 presence matrix across scaffolds (generated brief.md)
scaffold BEFORE(1cb900c) AFTER(82a8d63)
no-mistakes 0 hit 1 hit
direct-PR 0 hit 1 hit
local-only 0 hit 1 hit
scout 0 hit 1 hit

AFTER, brief.md line 46:
8. Never add an agent name as a commit co-author: no `Co-Authored-By:` trailer naming Claude, Codex, Cursor, Grok, Orca, or any other agent, model, or tool.
Evidence: Hard-constraint checks: no history rewrite, scope, commit hygiene
$ git merge-base --is-ancestor 1cb900c 82a8d63 && echo OK
1cb900c is ancestor of 82a8d63: OK
$ git rev-list --count 1cb900c..82a8d63
1
$ git diff --name-only 1cb900c 82a8d63
bin/fm-brief.sh
tests/fm-brief.test.sh
$ git log -1 --format='%B' 82a8d63 | grep -cE '^Co-Authored-By:'
0

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-brief.test.sh at target 82a8d63 — 21 ok / 0 not ok, including the new test_every_crewmate_scaffold_forbids_agent_co_authors
  • Counterfactual: git archive 1cb900c | tar -x -C $SCRATCH, copied the target tests/fm-brief.test.sh in, ran bash tests/fm-brief.test.sh there → not ok - no-mistakes brief did not carry the no-agent-co-author commit rule
  • Manual CLI exercise, ship scaffolds: FM_HOME=&lt;tmp&gt; bin/fm-brief.sh demo-&lt;kind&gt; alpha --mode &lt;no-mistakes|direct-PR|local-only&gt; against both base and target binaries; diffed the generated brief.md Rules sections
  • Manual CLI exercise, scout scaffold: FM_HOME=&lt;tmp&gt; bin/fm-brief.sh demo-scout alpha --scout against both base and target
  • Scope check on the secondmate path: FM_HOME=&lt;tmp&gt; bin/fm-brief.sh demo-secondmate --secondmate alpha — charter has no Rules section and no commit instruction, correctly excluded
  • git merge-base --is-ancestor 1cb900c 82a8d63 and git rev-list --count 1cb900c..82a8d63 → 1 (no history rewrite)
  • git diff --name-only 1cb900c 82a8d63 → only bin/fm-brief.sh and tests/fm-brief.test.sh
  • git log -1 --format=&#39;%B&#39; 82a8d63 | grep -cE &#39;^Co-Authored-By:&#39; → 0, and git log -1 --format=&#39;%(trailers)&#39; empty
✅ **Document** - passed

✅ No issues found.

⚠️ **Lint** - 1 warning
  • ⚠️ linter found issues (exit code 127)
✅ **Push** - passed

✅ No issues found.

AGENTS.md carries "Never add an agent name as a commit co-author", but that
file is firstmate's own instruction surface and a crewmate working in a
project worktree never reads it. The rule therefore reached workers only when
firstmate restated it by hand, which is not a control: agent Co-Authored-By
trailers are present across landed history in more than one project.

The generated brief is the one document every crewmate does read, so the rule
now ships as rule 8 of the standard Rules section for ship and scout scaffolds
alike. Scouts are included because promotion keeps the scout brief loaded and
carries scratch work into ship commits. AGENTS.md remains the owner; the brief
is a single-line reinforcement at the point where the rule is forgotten.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Scheduled firstmate-oss pass. Diff reviewed against main (head 8319331879f4e39616a1e17374e78c1146995229). No security risk. Approving the pending first-time fork workflow runs.

Classification: corrective. Existing AGENTS.md policy ("Never add an agent name as a commit co-author") now ships as rule 8 on every ship and scout scaffold. Commit behavior is unchanged: no hook, no strip, no project mutation. Mechanism A (brief contract) is the right owner given firstmate does not control every harness commit path. Scout inclusion is load-bearing because promote keeps the scout brief loaded.

VISION:

  • One captain, one interface: aligns. Policy is stated where the worker actually reads it.
  • Authority is explicit and never inferred: aligns. Does not write project git config or install hooks (those would mutate projects). AGENTS.md stays the owner; brief is the allowed one-line reinforcement.
  • Scripts own the mechanics, agents own the judgment: aligns. Generated contract text only.
  • A restart is a non-event: cannot tell / not applicable (no durable fleet state).
  • Delegation with a spine: aligns. Explicit contract before work; does not blur ship/scout.
  • The fleet outlives any vendor: aligns. Named agents are examples, rule covers any agent/model/tool.
  • Scope: aligns. Brief scaffold, not workshop.

Merge-eligible: YES.

Overlap: this PR and #2706 both edit bin/fm-brief.sh and tests/fm-brief.test.sh (additive hunks, likely auto-mergeable).

@kunchenguid kunchenguid left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Speaking as Kun's firstmate: reviewed the full diff. No security risk. Corrective brief-contract restatement of existing co-author policy. Approve pending first-time fork CI.

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.

2 participants