phase-1-schema
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePhase 1: Schema/Terminology Definition
第一阶段:Schema/术语定义
Define terminology and data structures used throughout the project
定义整个项目中使用的术语和数据结构
Purpose
目的
Unify the language of the project. Ensure all team members (or AI) communicate using the same terms and clearly understand data structures.
统一项目的语言规范,确保所有团队成员(或AI)使用相同的术语进行沟通,并清晰理解数据结构。
What to Do in This Phase
本阶段需完成的工作
- Build Glossary: Map business terms + global standards
- Identify Entities: Determine what "things" exist
- Define Relationships: Relationships between entities
- Design Schema: Define data structures
- 构建术语表:映射业务术语与全球标准术语
- 识别实体:确定项目涉及的各类"事物"
- 定义关系:明确实体之间的关联关系
- 设计Schema:定义数据结构
Glossary
术语表
Why is it Needed?
为什么需要术语表?
Explaining business terms to Claude Code every time is tedious.
Creating a glossary allows:
- Claude to automatically reference for context understanding
- Team communication consistency
- Reduced onboarding time for new team members/AI
每次向Claude Code解释业务术语都很繁琐。
创建术语表可实现:
- Claude自动参考术语表以理解上下文
- 团队沟通保持一致性
- 缩短新团队成员/AI的融入时间
Term Categories
术语分类
| Category | Description | Example |
|---|---|---|
| Business Terms | Internal proprietary terms | "Caddy" (golf booking assistant) |
| Global Standards | Industry common or technical standard terms | "OAuth", "REST API" |
| Mapping | Business ↔ Global correspondence | "Member" = User, "Payment" = Payment |
| 分类 | 描述 | 示例 |
|---|---|---|
| 业务术语 | 内部专有术语 | "Caddy"(高尔夫预订助手) |
| 全球标准术语 | 行业通用或技术标准术语 | "OAuth", "REST API" |
| 映射关系 | 业务术语与全球标准术语的对应关系 | "Member" = User,"Payment" = Payment |
Glossary Template
术语表模板
markdown
undefinedmarkdown
undefinedBusiness Terms (Internal Terms)
业务术语(内部术语)
| Term | English | Definition | Global Standard Mapping |
|---|---|---|---|
| Caddy | Caddy | AI assistant that helps book golf rounds | Booking Assistant |
| Round | Round | One 18-hole golf play | Session, Booking |
| Green Fee | Green Fee | Golf course usage fee | Usage Fee |
| 术语 | 英文 | 定义 | 对应全球标准术语 |
|---|---|---|---|
| Caddy | Caddy | 帮助预订高尔夫场次的AI助手 | Booking Assistant |
| Round | Round | 一场18洞高尔夫球局 | Session, Booking |
| Green Fee | Green Fee | 高尔夫球场使用费 | Usage Fee |
Global Standards
全球标准术语
| Term | Definition | Reference |
|---|---|---|
| OAuth 2.0 | Authentication protocol | RFC 6749 |
| REST | API architecture style | - |
| UUID | Universal Unique Identifier | RFC 4122 |
| 术语 | 定义 | 参考文档 |
|---|---|---|
| OAuth 2.0 | 身份验证协议 | RFC 6749 |
| REST | API架构风格 | - |
| UUID | 通用唯一标识符 | RFC 4122 |
Term Usage Rules
术语使用规则
- Use English in code (,
Caddy)Round - Use local language in UI/docs (Caddy, Round)
- API responses prioritize global standards ()
booking_assistant
undefined- 代码中使用英文(,
Caddy)Round - UI/文档中使用本地语言(Caddy, Round)
- API响应优先使用全球标准术语()
booking_assistant
undefinedClaude Code Auto-Reference Setup
Claude Code自动参考设置
To have Claude automatically reference the glossary:
Method 1: Include in CLAUDE.md
markdown
undefined要让Claude自动参考术语表:
方法1:将参考信息加入CLAUDE.md
markdown
undefinedTerm Reference
术语参考
For this project's term definitions, see .
docs/01-plan/glossary.md
**Method 2**: Add term rules to project CLAUDE.md
```markdown
<!-- Add to CLAUDE.md -->
Project terms are defined in docs/01-plan/glossary.md.
Always reference when using business terms.本项目的术语定义请查看。
docs/01-plan/glossary.md
**方法2**:在项目CLAUDE.md中添加术语规则
```markdown
<!-- 添加至CLAUDE.md -->
项目术语定义在docs/01-plan/glossary.md中。
使用业务术语时请务必参考该文档。Deliverables
交付物
docs/01-plan/
├── glossary.md # Glossary (recommended new)
│ ├── Business Terms
│ ├── Global Standards
│ └── Mapping Table
├── schema.md # Data schema
├── terminology.md # (existing) → recommend merging into glossary.md
└── domain-model.md # Domain modeldocs/01-plan/
├── glossary.md # 术语表(建议新增)
│ ├── 业务术语
│ ├── 全球标准术语
│ └── 映射表
├── schema.md # 数据Schema
├── terminology.md # (已有文档)→ 建议合并至glossary.md
└── domain-model.md # 领域模型PDCA Application
PDCA循环应用
- Plan: Identify what entities/terms are needed
- Design: Design schema structure, relationships
- Do: Write documentation
- Check: Review for omissions/contradictions
- Act: Finalize and proceed to Phase 2
- 计划(Plan):确定所需的实体/术语
- 设计(Design):设计Schema结构与实体关系
- 执行(Do):编写文档
- 检查(Check):检查是否存在遗漏或矛盾
- 处理(Act):最终定稿并进入第二阶段
Level-wise Application
分级应用
| Level | Application Level |
|---|---|
| Starter | Simple (core terms only) |
| Dynamic | Detailed (all entities) |
| Enterprise | Detailed (per microservice) |
| 级别 | 应用程度 |
|---|---|
| 入门级 | 基础版(仅核心术语) |
| 动态级 | 详细版(覆盖所有实体) |
| 企业级 | 精细化版(按微服务拆分) |
Example Questions
示例问题
"What are the core 'things' this project deals with?"
"What are the relationships between users, products, orders...?"
"Are 'member' and 'user' the same or different?""本项目涉及的核心'事物'有哪些?"
"用户、产品、订单之间的关系是什么?"
"'member'和'user'是相同的概念还是不同的?"Template
模板
See
templates/pipeline/phase-1-schema.template.md请查看
templates/pipeline/phase-1-schema.template.mdNext Phase
下一阶段
Phase 2: Coding Convention → Now that terms are defined, define code rules
第二阶段:编码规范 → 术语定义完成后,定义代码规则