Git & PR Workflow Standards
Core Principles
- * Small PRs: ≤300 LOC changed ideally
- Commit often: Early, meaningful commits with clear messages
- Linear history: Prefer rebase over merge commits
- Professional: No AI attribution, no tool branding, clean descriptions
🚨 ABSOLUTE ZERO-TOLERANCE RULE: NO AI ATTRIBUTION 🚨
NEVER, UNDER ANY CIRCUMSTANCES, include ANY of the following in:
- * Git commit messages
- Pull request descriptions
- Issue comments
- GitHub discussions
- Code comments
- Documentation
- ANY public-facing repository content
❌ STRICTLY FORBIDDEN TEXT - NEVER USE
- * "Claude"
- "Anthropic"
- "claude.com"
- "Claude Code"
- "Claude Desktop"
- "Generated with Claude"
- "Co-Authored-By: Claude"
- "🤖 Generated with Claude Code"
- "Co-Authored-By: Claude "
- Any emoji followed by "Generated with" or "Powered by"
- Any reference to AI assistants, AI code generation, or automated tools
- Any branding, attribution, or links to third-party AI services
✅ CORRECT FORMAT - ALWAYS USE
- * Clean, professional commit messages
- Clear description of what changed
- Explanation of why the change was made
- No attribution, no branding, no tool references
Examples
❌ FORBIDDEN COMMIT
CODEBLOCK0
✅ CORRECT COMMIT
CODEBLOCK1
❌ FORBIDDEN PR DESCRIPTION
CODEBLOCK2
✅ CORRECT PR DESCRIPTION
CODEBLOCK3
Enforcement
- * ZERO TOLERANCE rule with NO EXCEPTIONS
- Every commit must be verified before pushing
- Every PR must be reviewed for attribution before creating
- If attribution is found, it must be removed immediately via force push or amendment
- This rule applies to ALL repositories, ALL projects, ALL commits
- Violations compromise the professional appearance of our work
Why This Matters
- * Maintains professional repository appearance
- Avoids unwanted third-party attribution
- Ensures our work is presented as our own
- Prevents confusion about authorship and ownership
- Compliance with company branding guidelines
PR Requirements
Every PR must include:
- * Problem/Context: What issue are we solving and why?
- Solution summary: How does this change address the problem?
- Test plan: Commands + results proving functionality
- Risk/rollback: Potential issues and how to revert if needed
- Story link + Type + Estimate: Link to issue/story with type (feature/bug/chore) and points
Reference Files
See references/ai-attribution-enforcement.md for comprehensive forbidden text list and enforcement details.
See references/pr-templates.md for complete PR templates for feature, bug, and chore PRs.
See references/branch-conventions.md for branch naming patterns and examples.
Git & PR 工作流标准
核心原则
- * 小型PR: 理想情况下,代码变更不超过300行
- 频繁提交: 尽早提交有意义的变更,并附上清晰的提交信息
- 线性历史: 优先使用变基而非合并提交
- 专业规范: 不标注AI来源,不添加工具品牌,保持描述简洁
🚨 绝对零容忍规则:禁止标注AI来源 🚨
在任何情况下,都不得在以下内容中包含任何以下信息:
- * Git提交信息
- 拉取请求描述
- Issue评论
- GitHub讨论
- 代码注释
- 文档
- 任何面向公众的仓库内容
❌ 严格禁止使用的文本 - 切勿使用
- * Claude
- Anthropic
- claude.com
- Claude Code
- Claude Desktop
- 由Claude生成
- 共同作者:Claude
- 🤖 由 Claude Code 生成
- 共同作者:Claude
- 任何后接由...生成或由...驱动的表情符号
- 任何提及AI助手、AI代码生成或自动化工具的内容
- 任何第三方AI服务的品牌标识、来源标注或链接
✅ 正确格式 - 始终使用
- * 清晰专业的提交信息
- 明确描述变更内容
- 解释变更原因
- 不标注来源,不添加品牌,不提及工具
示例
❌ 禁止的提交信息
添加多维向量支持
- - 支持384、768、1024和1536维度
- 更新新维度的验证逻辑
- 添加全面的测试覆盖
🤖 由 Claude Code 生成
共同作者:Claude
✅ 正确的提交信息
添加多维向量支持
- - 支持384、768、1024和1536维度
- 更新新维度的验证逻辑
- 添加全面的测试覆盖
❌ 禁止的PR描述
markdown
摘要
实现了基于JWT令牌的新认证流程。
测试计划
所有测试均通过。
🤖 由Claude驱动
✅ 正确的PR描述
markdown
摘要
实现了基于JWT令牌的新认证流程。
测试计划
所有测试均通过。
执行规则
- * 零容忍规则,无任何例外
- 每次提交在推送前必须经过验证
- 每个PR在创建前必须检查是否存在来源标注
- 如发现来源标注,必须立即通过强制推送或修改提交来移除
- 此规则适用于所有仓库、所有项目、所有提交
- 违反此规则将损害我们工作的专业形象
为何重要
- * 维护仓库的专业外观
- 避免不必要的第三方来源标注
- 确保我们的工作以自主成果呈现
- 防止作者身份和所有权混淆
- 遵守公司品牌规范
PR要求
每个PR必须包含:
- * 问题/背景: 我们要解决什么问题?为什么?
- 解决方案摘要: 此变更如何解决问题?
- 测试计划: 证明功能的命令及结果
- 风险/回滚: 潜在问题及必要时如何回退
- 故事链接 + 类型 + 估算: 关联问题/故事的链接,包含类型(功能/缺陷/杂务)和点数
参考文件
参见 references/ai-attribution-enforcement.md 获取完整的禁止文本列表及执行细节。
参见 references/pr-templates.md 获取功能、缺陷和杂务PR的完整PR模板。
参见 references/branch-conventions.md 获取分支命名模式及示例。