mcpField
P
phase-1-schema

phase-1-schema

github.com/ww-w-ai数据与数据库60647 次安装4 周前更新
代码仓库

关于 phase-1-schema

phase-1-schema 是项目规划流程中的术语与数据结构定义阶段,适用于需要统一团队或 AI 沟通方式的项目。它指导整理业务词汇、实体、关系和 Schema,并给出文档交付结构。

主要功能

  1. 01建立业务术语表
  2. 02识别项目实体
  3. 03定义实体关系
  4. 04设计数据 Schema
  5. 05提供文档交付结构

适用场景

  1. 01统一团队使用的业务术语
  2. 02梳理项目实体及其关系
  3. 03为 Claude Code 配置术语参考
  4. 04整理项目规划文档

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/ww-w-ai/bkit-claude-code --skill phase-1-schema

安装后在 Claude Code 中输入/phase-1-schema确认已加载。

详细介绍

阶段 1:架构/术语定义

定义整个项目中使用的术语和数据结构

目的

统一项目用语。确保所有团队成员(或 AI)使用相同的术语进行沟通,并清楚地理解数据结构。

本阶段要做什么

  1. 构建术语表:映射业务术语和全局标准
  2. 识别实体:确定存在哪些“事物”
  3. 定义关系:定义实体之间的关系
  4. 设计架构:定义数据结构

术语表

为什么需要术语表?

每次都向 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