From 3b2e607542520e7c7446f83a8b0a28f61cce38e0 Mon Sep 17 00:00:00 2001 From: Zhijie Shen Date: Wed, 5 Aug 2026 08:49:16 +0800 Subject: [PATCH] docs: make the Co-Authored-By trailer model-agnostic The git practices mandated 'Co-Authored-By: Claude Sonnet 4.6', which asked every non-Claude contributor (Codex, Gemini CLI, opencode, ...) to either misattribute their work or silently deviate. Generalize the rule: AI-assisted commits must include a Co-Authored-By trailer naming the ACTUAL assistant + model used, with examples for several tools. The task-workflow commit examples now vary across tools to illustrate this, and the PR template's tool-specific line is neutralized. Co-Authored-By: opencode/glm-5.2 --- docs/engineering-practices.md | 7 ++++++- docs/task-workflow.md | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/engineering-practices.md b/docs/engineering-practices.md index 04f4880..b4ec3d7 100644 --- a/docs/engineering-practices.md +++ b/docs/engineering-practices.md @@ -105,9 +105,14 @@ Current docs: **Never commit secrets.** `.env` is gitignored. API keys go in `.env` only. Run `git diff --cached | grep -i "AIza\|api_key\|secret"` before committing if unsure. -**Always include the co-author trailer:** +**Always include a co-author trailer on AI-assisted commits**, naming the actual +assistant and model that produced the change. This keeps the human- vs. AI-authored +audit trail accurate for reviewers and future contributors. Use the real tool + +model — do not attribute work to a tool that wasn't used. ``` Co-Authored-By: Claude Sonnet 4.6 +Co-Authored-By: Codex +Co-Authored-By: opencode/glm-5.2 ``` --- diff --git a/docs/task-workflow.md b/docs/task-workflow.md index 3a8cd17..6680557 100644 --- a/docs/task-workflow.md +++ b/docs/task-workflow.md @@ -100,9 +100,11 @@ API keys go in `.env` only (which is gitignored). Closes # -Co-Authored-By: Claude Sonnet 4.6 +Co-Authored-By: ``` +Name the **actual** assistant + model used (see [Engineering Practices → Git](engineering-practices.md#git-branching--issue-management)). Don't hardcode a tool you didn't use. + Examples: ``` fix: skip orphaned tool_result entries instead of silently producing corrupt Message[] @@ -117,7 +119,7 @@ refactor: extract duplicate retry loop into shared withRetry utility Reduces duplication across Gemini, Anthropic, OpenAI clients without changing behavior. Closes #75 -Co-Authored-By: Claude Sonnet 4.6 +Co-Authored-By: Codex ``` **Use `Closes` if the commit fully resolves the issue.** Use `Part of` or `References` if it's partial work. @@ -168,7 +170,7 @@ This keeps the issue as the canonical record of progress and makes it easy to re - [ ] - [ ] -🤖 Generated with [Claude Code](https://claude.com/claude-code) +🤖 Generated with an AI assistant ``` **What to explain in the description:**