Repository navigation
Conversation
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.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Speaking as Kun's firstmate: Scheduled firstmate-oss pass. Diff reviewed against main (head 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:
Merge-eligible: YES. Overlap: this PR and #2706 both edit |
kunchenguid
left a comment
There was a problem hiding this comment.
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.
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.shnow 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: noCo-Authored-By:trailer naming Claude, Codex, Cursor, Grok, Orca, or any other agent, model, or tool." The scout scaffold gets it too becausebin/fm-promote.shkeeps 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 thefm-brief.shheader, which owns what the generated scaffolds contain.tests/fm-brief.test.shgainstest_every_crewmate_scaffold_forbids_agent_co_authors, asserting on the generatedbrief.mdfor all four scaffolds (no-mistakes, direct-PR, local-only, scout) that both the rule text and the forbiddenCo-Authored-By:trailer name are present. Against the base commit it reportsnot 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.bin/fm-arm-pretool-check.shPreToolUse 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 acommit-msghook, which lives in the project's shared git common dir, collides with any project that setscore.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 inAGENTS.md, firstmate's own instruction surface, which a crewmate in a project worktree never reads.AGENTS.mdstays 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 — InsightEngineacfb2e1f"chore(planning): archive v1.0 ATX-1457 milestone" (2026-07-15, trailerCursor <[email protected]>), reachable only from tagv1.0-atx-1457and 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) onfork/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
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: 0Evidence: Rule 8 presence matrix across scaffolds (generated brief.md)
Evidence: Hard-constraint checks: no history rewrite, scope, commit hygiene
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.shat target 82a8d63 — 21 ok / 0 not ok, including the newtest_every_crewmate_scaffold_forbids_agent_co_authorsCounterfactual:git archive 1cb900c | tar -x -C $SCRATCH, copied the targettests/fm-brief.test.shin, ranbash tests/fm-brief.test.shthere →not ok - no-mistakes brief did not carry the no-agent-co-author commit ruleManual CLI exercise, ship scaffolds:FM_HOME=<tmp> bin/fm-brief.sh demo-<kind> alpha --mode <no-mistakes|direct-PR|local-only>against both base and target binaries; diffed the generatedbrief.mdRules sectionsManual CLI exercise, scout scaffold:FM_HOME=<tmp> bin/fm-brief.sh demo-scout alpha --scoutagainst both base and targetScope check on the secondmate path:FM_HOME=<tmp> bin/fm-brief.sh demo-secondmate --secondmate alpha— charter has no Rules section and no commit instruction, correctly excludedgit merge-base --is-ancestor 1cb900c 82a8d63andgit 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.shgit log -1 --format='%B' 82a8d63 | grep -cE '^Co-Authored-By:'→ 0, andgit log -1 --format='%(trailers)'empty✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.