关于 phase-1-schema
phase-1-schema 是项目规划流程中的术语与数据结构定义阶段,适用于需要统一团队或 AI 沟通方式的项目。它指导整理业务词汇、实体、关系和 Schema,并给出文档交付结构。
主要功能
- 01建立业务术语表
- 02识别项目实体
- 03定义实体关系
- 04设计数据 Schema
- 05提供文档交付结构
适用场景
- 01统一团队使用的业务术语
- 02梳理项目实体及其关系
- 03为 Claude Code 配置术语参考
- 04整理项目规划文档
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ ww-w-ai/ bkit-claude-code --skill phase-1-schema安装后在 Claude Code 中输入/phase-1-schema确认已加载。
详细介绍
阶段 1:架构/术语定义
定义整个项目中使用的术语和数据结构
目的
统一项目用语。确保所有团队成员(或 AI)使用相同的术语进行沟通,并清楚地理解数据结构。
本阶段要做什么
- 构建术语表:映射业务术语和全局标准
- 识别实体:确定存在哪些“事物”
- 定义关系:定义实体之间的关系
- 设计架构:定义数据结构
术语表
为什么需要术语表?
每次都向 Claude Code 解释业务术语很费时。 创建术语表可以:
- 让 Claude 自动参考术语表来理解上下文
- 保持团队沟通一致
- 缩短新团队成员/AI 的上手时间
术语类别
| 类别 | 说明 | 示例 |
|---|---|---|
| 业务术语 | 内部专有术语 | “Caddy”(高尔夫预订助手) |
| 全局标准 | 行业通用术语或技术标准术语 | “OAuth”、“REST API” |
| 映射 | 业务术语 ↔ 全局标准的对应关系 | “Member” = User,“Payment” = Payment |
术语表模板
## Business 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 |
## Global Standards
| Term | Definition | Reference |
|------|------------|-----------|
| OAuth 2.0 | Authentication protocol | RFC 6749 |
| REST | API architecture style | - |
| UUID | Universal Unique Identifier | 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`)
Claude Code 自动参考设置
要让 Claude 自动参考术语表:
方法 1:在 CLAUDE.md 中添加
## Term Reference
For this project's term definitions, see `docs/01-plan/glossary.md`.
方法 2:在项目 CLAUDE.md 中添加术语规则
Project terms are defined in docs/01-plan/glossary.md.
Always reference when using business terms.
交付内容
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
PDCA 应用
- 计划:确定所需的实体/术语
- 设计:设计架构结构和关系
- 执行:编写文档
- 检查:检查是否有遗漏/矛盾
- 改进:最终定稿并进入阶段 2
分级应用
| 级别 | 应用级别 |
|---|---|
| 入门 | 简单(仅包含核心术语) |
| 动态 | 详细(涵盖所有实体) |
| 企业 | 详细(按微服务划分) |
示例问题
"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?"
模板
参见 templates/pipeline/phase-1-schema.template.md
下一阶段
阶段 2:编码规范 → 术语定义完成后,定义代码规则
评论
支持 Markdown