chore(commit-rule): add git commit message specification document#56
Conversation
This commit adds the formal Conventional Commits based git commit guideline for the archive project, including basic format, examples, allowed commit types and PR template.
📝 WalkthroughWalkthroughThis PR adds a Conventional Commits rule documentation file ( ChangesCommit Message Rules
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…roject git commit message specification remove redundant Chinese comments, simplify structure, standardize wording and align with Conventional Commits specs
remove the no longer maintained trae commit lint rule file
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.trae/rules/git-commit-message.md:
- Around line 6-26: The commit-message template uses Chinese placeholders
(`<类型>(<作用域>): <描述>`) while the policy mandates English-only commit messages;
update the template placeholders to English equivalents (e.g., `<type>(<scope>):
<description>`) wherever they appear (notably the header/formatted example
block) so the example matches the "English-only" rule and avoids confusion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: e87e6c25-572e-47d0-ae67-c0ab32cf1873
📒 Files selected for processing (1)
.trae/rules/git-commit-message.md
| ## 提交信息 | ||
|
|
||
| 项目采用 Conventional Commits 规范来格式化提交信息。 | ||
|
|
||
| ### 基本格式 | ||
|
|
||
| 每条提交信息应遵循以下结构(只允许使用英文): | ||
|
|
||
| ```text | ||
| <类型>(<作用域>): <描述> | ||
|
|
||
| [正文] | ||
|
|
||
| [脚注] | ||
| ``` | ||
|
|
||
| - **类型**:必填,表示本次提交的类别(见下文“类型列表”)。 | ||
| - **作用域**:可选,用括号包裹,指明本次提交影响的代码范围(如模块名、组件名等)。 | ||
| - **描述**:必填,是对变更的简短说明,使用祈使句、现在时态,首字母小写,末尾不加句号。 | ||
| - **正文**:可选,对变更动机及与之前行为的对比进行详细说明。 | ||
| - **脚注**:可选,主要用于关联 Issue 或标记破坏性变更(BREAKING CHANGE)。 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check language patterns in other .trae rule files
fd -e md . .trae/rules/ --exec head -20Repository: project-cvsa/cvsa
Length of output: 234
🏁 Script executed:
#!/bin/bash
# List all markdown files in .trae/rules/ and check their language
ls -la .trae/rules/ | grep -E '\.(md|txt)$'Repository: project-cvsa/cvsa
Length of output: 132
🏁 Script executed:
#!/bin/bash
# Get more context from each markdown file in the directory
for file in .trae/rules/*.md; do
echo "=== File: $file ==="
head -30 "$file"
echo ""
doneRepository: project-cvsa/cvsa
Length of output: 531
🏁 Script executed:
#!/bin/bash
# Check for any AI/LLM configuration or documentation
find . -type f \( -name "*ai*" -o -name "*llm*" -o -name "*config*" -o -name "README*" \) -not -path "*/node_modules/*" -not -path "*/.git/*" | head -20Repository: project-cvsa/cvsa
Length of output: 885
Align the language of format template placeholders with the required English commit message format.
The file requires commit messages to be English-only ("只允许使用英文"), but the format template on line 15 uses Chinese placeholders: <类型>(<作用域>): <描述>.
Replace these with English equivalents (e.g., <type>(<scope>): <description>) to match the requirement and avoid confusion.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.trae/rules/git-commit-message.md around lines 6 - 26, The commit-message
template uses Chinese placeholders (`<类型>(<作用域>): <描述>`) while the policy
mandates English-only commit messages; update the template placeholders to
English equivalents (e.g., `<type>(<scope>): <description>`) wherever they
appear (notably the header/formatted example block) so the example matches the
"English-only" rule and avoids confusion.
Changes
Add git-commit-message.md to tell AI how to write commits.
Changes Made
.trae/rules/git-commit-message.mdto establish a formal Conventional Commits-based guideline for the project<type>(<scope>): <description>with optional body and footer sectionsfeat,fix,update,docs,style,refactor,perf,test,ci,chore,revertBREAKING CHANGEfooters