commit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gather Context

收集上下文信息

Run the following commands to understand the current state:
  1. git status
    — check current git status
  2. git diff HEAD
    — check staged/unstaged changes
  3. git branch --show-current
    — check current branch
  4. git log --oneline -10
    — reference recent commit style
运行以下命令了解当前状态:
  1. git status
    — 查看当前Git状态
  2. git diff HEAD
    — 查看暂存/未暂存的变更
  3. git branch --show-current
    — 查看当前分支
  4. git log --oneline -10
    — 参考近期的提交风格

Commit Message Convention

提交消息规范

Format:
{type}: {description}
or
{type}({scope}): {description}
格式:
{type}: {description}
{type}({scope}): {description}

Type Prefixes (always lowercase)

类型前缀(始终小写)

TypePurpose
feat
New feature
fix
Bug fix
refactor
Code restructuring without behavior change
style
Formatting, linting (no logic change)
docs
Documentation only
test
Adding or updating tests
perf
Performance improvement
chore
Build, CI, dependencies, config
hotfix
Urgent production fix
类型用途
feat
新增功能
fix
修复Bug
refactor
代码重构(不改变行为)
style
格式调整、代码检查(无逻辑变更)
docs
仅修改文档
test
添加或更新测试
perf
性能优化
chore
构建、CI、依赖、配置相关变更
hotfix
紧急生产环境修复

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
    source_map
    as-is rather than translating it.
  • 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 synced
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 synced

Task

任务

  1. Analyze the diff to understand the nature and purpose of the changes.
  2. Determine the appropriate type prefix (and scope, if applicable).
  3. Draft a commit message following the convention above.
  4. Present the proposed commit message and wait for user approval.
  5. Once approved, stage the relevant files individually and create the commit.
Important:
  • Do NOT commit without explicit user approval.
  • Do NOT use
    git add -A
    or
    git add .
    — stage specific files by name.
  • Do NOT include files that may contain secrets (
    .env
    , credentials, tokens, etc.).
  • If there are multiple logical units of change, suggest splitting into separate commits.
  1. 分析diff以理解变更的性质和目的。
  2. 确定合适的类型前缀(以及可选的范围)。
  3. 按照上述规范草拟提交消息。
  4. 提交拟议的提交消息并等待用户批准
  5. 获得批准后,单独暂存相关文件并创建提交。
重要提示:
  • 未经用户明确批准,请勿提交。
  • 请勿使用
    git add -A
    git add .
    ——按文件名暂存特定文件。
  • 请勿包含可能包含机密信息的文件(
    .env
    、凭证、令牌等)。
  • 如果存在多个逻辑独立的变更单元,建议拆分为多个提交。