Skip to content

appendCommitCoAuthorNote

appendCommitCoAuthorNote(systemPrompt, coAuthor?): string

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/dist/utils/systemPromptNotes.d.ts:83

GS2-35: append the commit co-authoring rule to the composed code-mode system prompt.

Gaunt Sloth has no dedicated git-commit tool — the agent commits by calling run_shell_command with git commit, composing the message (including any trailer) itself. Left unguided, models emit Co-Authored-By: <their own model name> (e.g. Claude, GPT, Gemini) from trained habit, which is factually wrong: the commit was produced by Gaunt Sloth, not by the model. This note is the fix at the correct layer — first-party prompt guidance that (a) states the exact trailer to emit and (b) forbids a model-name co-author.

The identity is config-driven (commit.coAuthor in import(‘#src/config/types.js’).GthConfig). Each field falls back INDEPENDENTLY to the Gaunt Sloth account (DEFAULT_COMMIT_CO_AUTHOR_NAME / DEFAULT_COMMIT_CO_AUTHOR_EMAIL) — so a partial override (name only, or a config that bypassed the loader) still yields a complete trailer, and a fully-absent config yields the default account. Blank/whitespace values are treated as unset.

Backend-agnostic: composed through the shared code path so BOTH the lean GthLangChainAgent and the deep GthDeepAgent inject it (the git-commit capability rides on run_shell_command, which both backends expose in code mode). Returns the note alone when there is no base prompt.

string | undefined

CommitCoAuthor

string