commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGather Context
收集上下文信息
Run the following commands to understand the current state:
- — check current git status
git status - — check staged/unstaged changes
git diff HEAD - — check current branch
git branch --show-current - — reference recent commit style
git log --oneline -10
运行以下命令了解当前状态:
- — 查看当前Git状态
git status - — 查看暂存/未暂存的变更
git diff HEAD - — 查看当前分支
git branch --show-current - — 参考近期的提交风格
git log --oneline -10
Commit Message Convention
提交消息规范
Format: or
{type}: {description}{type}({scope}): {description}格式: 或
{type}: {description}{type}({scope}): {description}Type Prefixes (always lowercase)
类型前缀(始终小写)
| Type | Purpose |
|---|---|
| New feature |
| Bug fix |
| Code restructuring without behavior change |
| Formatting, linting (no logic change) |
| Documentation only |
| Adding or updating tests |
| Performance improvement |
| Build, CI, dependencies, config |
| Urgent production fix |
| 类型 | 用途 |
|---|---|
| 新增功能 |
| 修复Bug |
| 代码重构(不改变行为) |
| 格式调整、代码检查(无逻辑变更) |
| 仅修改文档 |
| 添加或更新测试 |
| 性能优化 |
| 构建、CI、依赖、配置相关变更 |
| 紧急生产环境修复 |
Scope (optional)
范围(可选)
Add scope in parentheses when the change targets a specific module or component:
feat(source-map): ...fix(full-text): ...test(query-rewriting): ...
当变更针对特定模块或组件时,在括号中添加范围:
feat(source-map): ...fix(full-text): ...test(query-rewriting): ...
Description Rules
描述规则
- Write the description in the language configured in the project's CLAUDE.md. If no language is configured, follow the user's conversational language.
- Keep it concise — aim for under 50 characters.
- Use natural, fluent phrasing. Do not force-translate well-known technical terms. For example, write as-is rather than translating it.
source_map - Focus on WHAT changed and WHY, not HOW.
- 描述使用项目CLAUDE.md中配置的语言编写。如果未配置语言,则遵循用户的会话语言。
- 保持简洁——目标是少于50个字符。
- 使用自然流畅的表述。不要强行翻译知名技术术语,例如直接写而非翻译。
source_map - 重点说明变更内容和变更原因,而非实现方式。
Examples
示例
feat: 멀티턴 컨텍스트 유지 기능 추가
fix: 요청 DTO 모델 기본값을 settings 기반으로 통일
refactor: 미사용 openai_api_key/openai_base_url 프로퍼티 제거
style: black 포맷팅 적용
perf: Classification max_tokens 30 → 15로 조정
chore: 보안 취약점 패키지 업데이트 (urllib3, langchain-core)
docs: README 환경변수 가이드 업데이트
test: 멀티턴 컨텍스트 유지 기능 테스트 추가
feat(source-map): 검색하지 않은 턴에서도 source_map 지속 반환
fix(full-text): 전문 조회 실패 시 state 누출 방지
hotfix: uv lock syncedfeat: 멀티턴 컨텍스트 유지 기능 추가
fix: 요청 DTO 모델 기본값을 settings 기반으로 통일
refactor: 미사용 openai_api_key/openai_base_url 프로퍼티 제거
style: black 포맷팅 적용
perf: Classification max_tokens 30 → 15로 조정
chore: 보안 취약점 패키지 업데이트 (urllib3, langchain-core)
docs: README 환경변수 가이드 업데이트
test: 멀티턴 컨텍스트 유지 기능 테스트 추가
feat(source-map): 검색하지 않은 턴에서도 source_map 지속 반환
fix(full-text): 전문 조회 실패 시 state 누출 방지
hotfix: uv lock syncedTask
任务
- Analyze the diff to understand the nature and purpose of the changes.
- Determine the appropriate type prefix (and scope, if applicable).
- Draft a commit message following the convention above.
- Present the proposed commit message and wait for user approval.
- Once approved, stage the relevant files individually and create the commit.
Important:
- Do NOT commit without explicit user approval.
- Do NOT use or
git add -A— stage specific files by name.git add . - Do NOT include files that may contain secrets (, credentials, tokens, etc.).
.env - If there are multiple logical units of change, suggest splitting into separate commits.
- 分析diff以理解变更的性质和目的。
- 确定合适的类型前缀(以及可选的范围)。
- 按照上述规范草拟提交消息。
- 提交拟议的提交消息并等待用户批准。
- 获得批准后,单独暂存相关文件并创建提交。
重要提示:
- 未经用户明确批准,请勿提交。
- 请勿使用或
git add -A——按文件名暂存特定文件。git add . - 请勿包含可能包含机密信息的文件(、凭证、令牌等)。
.env - 如果存在多个逻辑独立的变更单元,建议拆分为多个提交。