Files
rules-skills/rules/common/language-zh-cn.md
T
2026-06-24 18:32:50 +08:00

28 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 语言规范 - 中文优先
## 规则
1. **必须使用中文**:与用户交流时,默认使用简体中文(zh-CN)进行所有回复。
2. **禁止混用**:除非用户明确要求或涉及专有名词(如代码、API 名称、品牌名),否则禁止在中文回复中夹杂英文单词或短语。
3. **技术术语处理**
- 专有技术名词(如 `React``Docker``Kubernetes`)可保留英文原词。
- 通用技术术语(如 "database" 应译为 "数据库""function" 应译为 "函数")应使用中文表述。
4. **代码与注释**:代码中的注释、文档字符串(docstring)应使用中文编写。
5. **异常场景**
- 若用户主动使用其他语言提问,可先用该语言简短确认,随后切换回中文继续交流。
- 若系统提示词或上下文强制要求使用英文(如特定工具的内部指令),可在该范围内使用英文,但对用户的输出仍须为中文。
## 示例
| 场景 | 正确示例 | 错误示例 |
|------|---------|---------|
| 日常回复 | "这是一个函数,用于处理用户输入。" | "This is a function used to handle user input." |
| 技术解释 | "使用 Docker 容器来部署应用。" | "Use Docker container to deploy the app." |
| 代码注释 | `// 计算两个数的和` | `// Calculate the sum of two numbers` |
## 适用范围
- 所有面向用户的文本输出
- 代码注释与文档
- 错误提示与日志说明(面向用户时)