phase-1-schema

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Phase 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

本阶段需完成的工作

  1. Build Glossary: Map business terms + global standards
  2. Identify Entities: Determine what "things" exist
  3. Define Relationships: Relationships between entities
  4. Design Schema: Define data structures
  1. 构建术语表:映射业务术语与全球标准术语
  2. 识别实体:确定项目涉及的各类"事物"
  3. 定义关系:明确实体之间的关联关系
  4. 设计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

术语分类

CategoryDescriptionExample
Business TermsInternal proprietary terms"Caddy" (golf booking assistant)
Global StandardsIndustry common or technical standard terms"OAuth", "REST API"
MappingBusiness ↔ Global correspondence"Member" = User, "Payment" = Payment
分类描述示例
业务术语内部专有术语"Caddy"(高尔夫预订助手)
全球标准术语行业通用或技术标准术语"OAuth", "REST API"
映射关系业务术语与全球标准术语的对应关系"Member" = User,"Payment" = Payment

Glossary Template

术语表模板

markdown
undefined
markdown
undefined

Business Terms (Internal Terms)

业务术语(内部术语)

TermEnglishDefinitionGlobal Standard Mapping
CaddyCaddyAI assistant that helps book golf roundsBooking Assistant
RoundRoundOne 18-hole golf playSession, Booking
Green FeeGreen FeeGolf course usage feeUsage Fee
术语英文定义对应全球标准术语
CaddyCaddy帮助预订高尔夫场次的AI助手Booking Assistant
RoundRound一场18洞高尔夫球局Session, Booking
Green FeeGreen Fee高尔夫球场使用费Usage Fee

Global Standards

全球标准术语

TermDefinitionReference
OAuth 2.0Authentication protocolRFC 6749
RESTAPI architecture style-
UUIDUniversal Unique IdentifierRFC 4122
术语定义参考文档
OAuth 2.0身份验证协议RFC 6749
RESTAPI架构风格-
UUID通用唯一标识符RFC 4122

Term Usage Rules

术语使用规则

  1. Use English in code (
    Caddy
    ,
    Round
    )
  2. Use local language in UI/docs (Caddy, Round)
  3. API responses prioritize global standards (
    booking_assistant
    )
undefined
  1. 代码中使用英文
    Caddy
    ,
    Round
  2. UI/文档中使用本地语言(Caddy, Round)
  3. API响应优先使用全球标准术语
    booking_assistant
undefined

Claude 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
undefined

Term 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 model
docs/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

分级应用

LevelApplication Level
StarterSimple (core terms only)
DynamicDetailed (all entities)
EnterpriseDetailed (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.md

Next Phase

下一阶段

Phase 2: Coding Convention → Now that terms are defined, define code rules
第二阶段:编码规范 → 术语定义完成后,定义代码规则