Skip to content

fix: prohibit Co-Authored-By trailers unless explicitly requested - #105

Merged
serkanalgur merged 1 commit into
mainfrom
fix/no-co-authored-by
Oct 6, 2026
Merged

serkanalgur merged 1 commit into
mainfrom
fix/no-co-authored-by

Conversation

@serkanalgur

@serkanalgur serkanalgur commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • Added an explicit rule to every commit-capable agent prompt prohibiting Co-Authored-By (and similar attribution) trailers unless the user explicitly requested them, along with a git convention section documenting the project's commit style.
  • Added an invariant test that fails if the rule is ever removed from the prompts.
  • After review found that reviewer and explorer can reach git commit through the permission fall-through, they gained the rule too.

Why

Models hallucinate attribution trailers such as Co-Authored-By: Claude or Co-Authored-By: Copilot even when the model writing the commit is not that system, polluting every commit message with false attribution. The rule makes the prohibition explicit and pinned by a test rather than left to model behavior.

How tested

  • bun test — 1423 tests pass, 0 fail.
  • The invariant test specifically asserts the rule text exists in every commit-capable agent prompt, so removing it will fail CI.

No issues linked; none referenced.

Models hallucinate attribution trailers such as 'Co-Authored-By: Claude'
even when the actual model is not Claude, which pollutes commit history
and misattributes authorship.

The rule is added in two layers:
- Per-prompt: a '## Commits' section in every bundled subagent whose
  frontmatter allows shell (architect, coder, documenter, reviewer,
  explorer, tester) and in the orchestrator's Git Workflow section, which
  opens PRs.
- Convention section: buildGitFlowConventionSection emits an
  unconditional 'No attribution trailers' clause appended to the seven
  bundled subagents inside a work tree when gitFlow is active. No gitFlow
  key gates it — authorship is not a knob.

Tests pin both layers: agent-definitions asserts the rule in each
shell-capable prompt and adds an invariant that any agent not explicitly
shell-denied carries it; git-flow asserts the clause survives every
combination of gitFlow sub-keys being off. CONTRIBUTING.md notes the rule
for human contributors.
@serkanalgur
serkanalgur merged commit e8d3d5d into main Oct 6, 2026
@serkanalgur
serkanalgur deleted the fix/no-co-authored-by branch October 6, 2026 14:20
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.

1 participant