CI mirror: carry no-agent-co-author rule in every generated brief - #5
Open
sbracewell64 wants to merge 3 commits into
Open
CI mirror: carry no-agent-co-author rule in every generated brief#5sbracewell64 wants to merge 3 commits into
sbracewell64 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Validate and ship the brief scaffold change that makes every generated brief carry the no-agent-co-author rule, including ship, scout, and secondmate variants where applicable, while preserving the existing brief tests and shipping the committed branch through review, test, document, lint, push, PR, and CI to the captain's fork for a cross-fork PR into kunchenguid/firstmate.
What Changed
bin/fm-brief.shnow defines a singleCOAUTHOR_RULEstring ("Never add an agent name as a commit co-author.") and emits it as the first entry of the Rules section in all three scaffold families: ship briefs (all delivery modes), scout briefs, and the secondmate charter, which gains a# Rulessection for it.RULE1strings, and updated the in-brief(rule 6)ask-user escalation cross-reference to(rule 7)plus the header comment describing the scaffold.tests/fm-brief.test.shasserts the rule text is present in ship-mode briefs, scout briefs, and the secondmate charter; the full 15-test brief suite passes.Risk Assessment
✅ Low: The change is a bounded edit to generated brief text — one shared rule string added to three brief variants with consistent renumbering and an updated cross-reference — with no logic, control-flow, or downstream-parser impact, and test coverage added for all three variants.
Testing
Ran the targeted brief suite (all 15 checks pass, including the three new co-author assertions) and then verified the intent on the real product artifact by scaffolding all seven brief variants — three ship delivery modes, herdr-lab, scout, and both secondmate forms — and reading the generated brief.md files. Every variant carries "Never add an agent name as a commit co-author." as rule 1, numbering is contiguous 1-8 in ship and scout briefs, and the in-brief "(rule 7)" ask-user cross-reference resolves to the correct needs-decision rule. Regenerating the same briefs from base commit a5fe1bc confirms the rule was genuinely absent before and that every subsequent rule shifted by exactly one, so the captured before/after is a real behavioral delta rather than a green-test claim. Three adjacent suites that consume brief text (ask-user authority, secondmate safety, instruction owners) also pass. No screenshot or rendered-UI artifact applies here: the change has no UI surface — the end-user experience is the generated markdown brief a crewmate reads, so the brief text itself is the correct product-level evidence and is captured verbatim. Worktree left clean.
Evidence: Before/after of the generated brief Rules section (base a5fe1bc vs 1e9e3ea)
### ship-nomistakes --- BEFORE --- # 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: 5. If you hit the same obstacle twice, appendblocked: {why}and stop; firstmate will help. 6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings), 7. Never stop, restart, or update the sharedno-mistakesdaemon - it is one instance serving --- AFTER ---- # Rules 1. Never add an agent name as a commit co-author. 2. Never push to the default branch. Never merge a PR. 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, appendblocked: {why}and stop; firstmate will help. 7. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings), 8. Never stop, restart, or update the sharedno-mistakesdaemon - it is one instance serving ### scout-task --- BEFORE --- # 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: 5. If you hit the same obstacle twice, appendblocked: {why}and stop; firstmate will help. 6. If a decision belongs to a human (product choices, destructive actions), 7. Never stop, restart, or update the sharedno-mistakesdaemon - it is one instance serving --- AFTER ---- # Rules 1. Never add an agent name as a commit co-author. 2. Never push to any remote and never open a PR. 3. Stay inside this worktree; the only files you may write outside it are the report and the status file below. 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, appendblocked: {why}and stop; firstmate will help. 7. If a decision belongs to a human (product choices, destructive actions), 8. Never stop, restart, or update the sharedno-mistakesdaemon - it is one instance serving ### sm-alpha (secondmate charter) --- BEFORE --- (no '# Rules' section in this brief) --- AFTER ---- # Rules 1. Never add an agent name as a commit co-author. co-author rule presence: ship-nomistakes before=absent after=present scout-task before=absent after=present sm-alpha before=absent after=presentEvidence: Full Rules section of all 7 generated brief variants
/tmp/no-mistakes-evidence/01KYFQS3Q5JVKQVKR0EGV6FYJS/fmhome/data)Evidence: Targeted test runs
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 4 issues found → auto-fixed ✅
bin/fm-brief.sh:366- The ship brief's Rules list is now mis-numbered. $COAUTHOR_RULE emits '1.' (line 365) and $RULE1 still emits '1.' in all three delivery modes (lines 298, 310, 324), so the generated brief has two rule 1s; line 367 was bumped to '3.' while line 368 was left at '3.', so there is no rule 2 and two rule 3s. Rendered order is 1, 1, 3, 3, 4, 5, 6, 7. Fix by making the three RULE1 strings start with '2.' and shifting lines 367-388 to 3-8 -- and note that the '(rule 6)' cross-reference at line 336 points at the needs-decision rule, which becomes rule 7 after the shift, so it must be updated in the same pass. The stale comment at line 288 ('shape Setup / Rule 1 / ...') should also say rule 2.bin/fm-brief.sh:269- The scout brief now has two rules numbered '5.': the status-reporting rule was renumbered 4 -> 5 (line 259) but the pre-existing '5. If you hit the same obstacle twice' (line 269) was not shifted. Rendered order is 1, 2, 3, 4, 5, 5, 6, 7. Bump lines 269, 270 and 273 to 6, 7 and 8.bin/fm-brief.sh:157- The new secondmate '# Rules' section adds a status-reporting rule (rule 2) on top of the co-author rule, but the charter already specifies status reporting in the '# Escalation to main firstmate' section (lines 174-188) in more detail (paused-vs-blocked semantics, corr= correlation, keyed phases, no receipt 'working:' lines). The new rule is a shorter, partially conflicting restatement that goes beyond the stated goal of carrying the no-agent-co-author rule. Consider limiting the new section to the co-author rule alone.bin/fm-brief.sh:156- The secondmate heredoc hardcodes the co-author rule text instead of interpolating $COAUTHOR_RULE (the heredoc is unquoted, so the variable would expand). Editing the variable would silently leave the secondmate charter behind, and all three tests assert the same literal string. Use $COAUTHOR_RULE here for a single source of truth.🔧 Fix: fix brief rule numbering and secondmate co-author rule
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-brief.test.sh— full brief suite, 15/15 pass including the 3 new co-author assertionsManual end-to-end scaffold of all 7 generation paths:bin/fm-brief.sh ship-nomistakes some-proj,... ship-directpr direct-proj,... ship-localonly local-proj,... ship-herdr some-proj --herdr-lab,... scout-task some-proj --scout,... sm-alpha --secondmate direct-proj,... sm-noproj --secondmate --no-projectsRule-numbering audit of each generatedbrief.md: confirmed contiguous1 2 3 4 5 6 7 8with no gaps/duplicates, and that the in-brief(rule 7)ask-user cross-reference resolves to the needs-decision ruleBaseline regeneration from base commita5fe1bc(temp copy ofbin/so sourced sibling libs resolve) to prove the co-author rule was absent before and numbering shifted by exactly onebash tests/fm-ask-user-authority.test.sh— covers the renumberedrule 6→rule 7escalation referencebash tests/fm-secondmate-safety.test.sh— covers the secondmate charter that gained a new# Rulessectionbash tests/fm-instruction-owners.test.sh— covers instruction/ownership wording across briefsgit status --porcelain— worktree clean, no transient test artifacts left behindbin/fm-brief.sh:76- The no-agent-co-author sentence now exists in three places: AGENTS.md:44 (captain-facing prime-directive scope for firstmate's own repo), .agents/skills/firstmate-coding-guidelines/SKILL.md:96 (contributor style rule), and the generated brief literal in bin/fm-brief.sh (worker instruction for every project). I deliberately did not add a fourth copy to AGENTS.md section 11 or CONTRIBUTING.md, because section 11 already delegates generated-variant facts to the script and its help, which I updated. The first two copies predate this change and serve genuinely different audiences, so consolidating them is out of scope here; flagging the judgment call so a reviewer can confirm the placement rather than expecting synchronized prose.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.