Comment by otterley

2 months ago

I would have expected people (maybe a small minority, but that includes myself) to have already instructed Claude to do this. It’s a trivial instruction to add to your CLAUDE.md file.

It doesn't work so well in my experience. I am currently wrapping (or asking the LLM to wrap) the commit message prompt in a script call.

   1. the LLM is instructed on how to write a commit message and never include co-authorship
   2. the LLM is asked to produce a commit message
   3. the LLM output is parsed by a script which removes co-authorship if the LLM chooses to include it nevertheless

  • Also for future reference, Copilot - specifically - includes a configuration flag to toggle the co-authorship (see `copilot help config`):

    > `includeCoAuthoredBy`: whether to instruct the agent to add a Co-authored-by trailer to git commits; defaults to `true`.

    This means that, if you don't explicitely configure otherwise, the LLM is specifically instructed to include co-authorship in its higher level instructions.

I always assumed that if I tried to tell it, that it'd say "I'm sorry, Dave. I'm afraid I can't do that"

  • We use CC to power some of our code features and override this setting so we can provide our own attribution. So there are several legit reasons to permit this.

I guess our system prompt didn't work. If folks are having to add it manually into their own Claude.md files...

  • Typo from speech to text, corrected: “I guess Anthropic’s system prompt didn't work. If folks are having to add it manually into their own Claude.md files...”

  • My mistake - it was the configuration setting that did it. Nevertheless, you can control many other aspects of its behavior by tuning the CLAUDE.md prompt.