Skip to content

chore(commit-rule): add git commit message specification document#56

Merged
alikia2x merged 4 commits into
developfrom
chore/aibeto-null-git_message
May 16, 2026
Merged

chore(commit-rule): add git commit message specification document#56
alikia2x merged 4 commits into
developfrom
chore/aibeto-null-git_message

Conversation

@Aibeto

@Aibeto Aibeto commented May 16, 2026

Copy link
Copy Markdown
Member

Changes

Add git-commit-message.md to tell AI how to write commits.

Changes Made

  • Added git commit message specification: Created .trae/rules/git-commit-message.md to establish a formal Conventional Commits-based guideline for the project
  • Defined commit message format: Specified the required structure as <type>(<scope>): <description> with optional body and footer sections
  • Listed allowed commit types: Documented the following allowed type values: feat, fix, update, docs, style, refactor, perf, test, ci, chore, revert
  • Specified requirements: Defined requirements for type, scope, and description formatting including case sensitivity, punctuation rules, and other constraints
  • Included examples: Provided usage examples including handling of BREAKING CHANGE footers
  • Enforced English-only messages: Specified that commit messages must use English language exclusively

Review Change Stack

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.
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR adds a Conventional Commits rule documentation file (.trae/rules/git-commit-message.md) that defines and enforces a standardized commit message format. The specification requires English-only messages with a <type>(<scope>): <description> header, optional body, optional footer, and restricts commit types to a defined list.

Changes

Commit Message Rules

Layer / File(s) Summary
Commit message rule documentation
.trae/rules/git-commit-message.md
Adds Conventional Commits specification requiring <type>(<scope>): <description> format, English-only text, optional body/footer sections, allowed type values (feat, fix, update, docs, style, refactor, perf, test, ci, chore, revert), and formatting examples including BREAKING CHANGE footer.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/aibeto-null-git_message

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Aibeto Aibeto changed the title Chore/aibeto null git message chore(commit-rule): add git commit message specification document May 16, 2026
…roject git commit message specification

remove redundant Chinese comments, simplify structure, standardize wording and align with Conventional Commits specs
@Aibeto Aibeto changed the base branch from main to develop May 16, 2026 13:08
Aibeto added 2 commits May 16, 2026 21:10
remove the no longer maintained trae commit lint rule file

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 97e72d2 and 5625198.

📒 Files selected for processing (1)
  • .trae/rules/git-commit-message.md

Comment on lines +6 to +26
## 提交信息

项目采用 Conventional Commits 规范来格式化提交信息。

### 基本格式

每条提交信息应遵循以下结构(只允许使用英文):

```text
<类型>(<作用域>): <描述>

[正文]

[脚注]
```

- **类型**:必填,表示本次提交的类别(见下文“类型列表”)。
- **作用域**:可选,用括号包裹,指明本次提交影响的代码范围(如模块名、组件名等)。
- **描述**:必填,是对变更的简短说明,使用祈使句、现在时态,首字母小写,末尾不加句号。
- **正文**:可选,对变更动机及与之前行为的对比进行详细说明。
- **脚注**:可选,主要用于关联 Issue 或标记破坏性变更(BREAKING CHANGE)。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check language patterns in other .trae rule files

fd -e md . .trae/rules/ --exec head -20

Repository: 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 ""
done

Repository: 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 -20

Repository: 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.

@alikia2x alikia2x left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alikia2x alikia2x merged commit f7a6df8 into develop May 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants