refactor: feature 改为 JIRA 编码文件夹并同放 plan
规格改为 <CODE>-<slug>/spec.md,方案放 plan.md/_chores;同步 skill、安装器与工作流指南。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,15 +4,16 @@
|
||||
|
||||
| 类别 | 目录 | 性质 | 生命周期 |
|
||||
|---|---|---|---|
|
||||
| 过程文档 | `features/`、`plans/` | 会随需求演进 | 随需求创建,**定稿后不再修改** |
|
||||
| 过程文档 | `features/`(含 `spec.md` / `plan*.md`) | 会随需求演进 | 随需求创建,**定稿后不再修改** |
|
||||
| 事实文档 | `facts/`、`standards/` | 描述系统当前真实状态 | 随代码同步更新 |
|
||||
|
||||
## 目录
|
||||
|
||||
| 目录 | 内容 | 谁来写 |
|
||||
|---|---|---|
|
||||
| `features/` | 需求规格说明书:背景、字段表、业务规则、权限、验收标准 | 产品 / BA |
|
||||
| `plans/` | 技术方案:领域模型、DDL、API、时序图、任务拆分、风险 | 架构师 / 负责人 |
|
||||
| `features/` | 每个能力一个 JIRA 风格文件夹:`spec.md` + `plan.md` / `plan-{slug}.md` | 产品 / BA / 开发 |
|
||||
| `features/_chores/` | 无关联 feature 的横切技术方案 | 架构师 / 负责人 |
|
||||
| `features/_template/` | `spec.md`、`plan.md` 模板 | 架构师 |
|
||||
| `facts/` | 技术事实:API、库表、领域模型 | 全员,随代码同步 |
|
||||
| `facts/business/` | 业务事实:流程等 | BA / 开发 |
|
||||
| `facts/tech-topic/` | 技术专题 / ADR / 实现说明 | 需要时新建 |
|
||||
@@ -34,9 +35,9 @@
|
||||
|
||||
## 写作约定
|
||||
|
||||
- 需求规格与 Plan **定稿后不改**;同一资源的二次改造新建文件(`YYYYMMDD-{slug}.md`)。
|
||||
- 需求规格与 Plan **定稿后不改**;同一 feature 的二次改造新建 `plan-{slug}.md`。
|
||||
- 事实文档必须与代码一致;改了代码就要改文档。
|
||||
- 新建需求先复制 `_template.md` 再改,不要从零写。
|
||||
- 新建需求:复制 `features/_template/` 为 `features/<迭代>/<CODE>-<slug>/`,再改 `spec.md` / `plan.md`。
|
||||
|
||||
## 同步检查点
|
||||
|
||||
|
||||
29
example-project/docs/features/README.md
Normal file
29
example-project/docs/features/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 需求与方案(Features)
|
||||
|
||||
每个业务能力是一个 **JIRA 风格编码文件夹**,规格与技术方案放在一起:
|
||||
|
||||
```
|
||||
docs/features/
|
||||
├── _template/ # 模板:spec.md + plan.md
|
||||
├── _chores/ # 无关联 feature 的横切 plan
|
||||
│ └── plan-{slug}.md
|
||||
└── iteration1/
|
||||
├── README.md
|
||||
├── ACC-account/
|
||||
│ ├── spec.md # 业务规格
|
||||
│ ├── plan.md # 主技术方案(可选)
|
||||
│ └── plan-{slug}.md # 多份方案时
|
||||
└── plan-{slug}.md # 迭代级方案(可选)
|
||||
```
|
||||
|
||||
| 编码 | 文件夹 | 含义 |
|
||||
|---|---|---|
|
||||
| ACC | `ACC-account` | 账号 |
|
||||
| BKG | `BKG-booking` | 预约下单 |
|
||||
| CDC | `CDC-consultant-discovery` | 咨询师发现 |
|
||||
| COB | `COB-consultant-onboarding` | 咨询师入驻 |
|
||||
| CSC | `CSC-consultant-schedule` | 咨询师档期 |
|
||||
| CFL | `CFL-consultant-fulfillment` | 咨询师履约 |
|
||||
| SET | `SET-settlement` | 结算 |
|
||||
| ADM | `ADM-admin-ops` | 管理运营 |
|
||||
| PLT | `PLT-platform-capability` | 平台能力 |
|
||||
7
example-project/docs/features/_chores/README.md
Normal file
7
example-project/docs/features/_chores/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# `_chores` · 无关联 Feature 的 Plan
|
||||
|
||||
横切改造、基础设施、与具体业务 feature 无一一对应关系的技术方案放这里。
|
||||
|
||||
命名:`plan-{slug}.md`(可带日期前缀,如 `plan-20261106-fix-public-endpoints-and-error-doc.md`)。
|
||||
|
||||
有明确业务规格的方案应放在对应 feature 目录:`docs/features/<迭代>/<CODE>-<slug>/plan.md`(或多份时 `plan-{slug}.md`)。
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
>日期: YYYY-MM-DD
|
||||
>
|
||||
>关联需求:docs/features/{file}.md
|
||||
>关联需求:docs/features/<迭代>/<CODE>-<slug>/spec.md
|
||||
>
|
||||
>设计 design:docs/design/topics/{资源}-{操作}.md(实施后会写到原design文件)
|
||||
>
|
||||
>
|
||||
>
|
||||
>**plan一旦定稿就不修改。** 同一资源的二次改造新建 `YYYY-MM-DD-{slug}.md`,不修改原计划文件
|
||||
>**plan一旦定稿就不修改。** 同一资源的二次改造新建 `plan-{slug}.md`(与 spec 同目录;横切放 `_chores/`),不修改原计划文件
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 需求规格说明书:<需求名称>
|
||||
|
||||
> 文档类型:需求规格 / Feature Specification
|
||||
> 适用目录:`docs/features/`
|
||||
> 适用目录:`docs/features/<迭代>/<CODE>-<slug>/spec.md`
|
||||
> 需求类型:NEW / UPDATE
|
||||
> 版本:v0.1
|
||||
> 作者:<BA/产品/负责人>
|
||||
@@ -13,19 +13,29 @@
|
||||
|
||||
## 2. 特性索引
|
||||
|
||||
| Spec | 覆盖源 REQ / 章节 | 角色 | 状态 |
|
||||
|---|---|---|---|
|
||||
| [account.md](./account.md) | §6.1 + REQ-006 | 三端 | v0.1 |
|
||||
| [consultant-discovery.md](./consultant-discovery.md) | REQ-001、002 | 用户 | v0.1 |
|
||||
| [booking.md](./booking.md) | REQ-003、004、005 | 用户 | v0.1 |
|
||||
| [consultant-onboarding.md](./consultant-onboarding.md) | REQ-007、008 | 咨询师 | v0.1 |
|
||||
| [consultant-schedule.md](./consultant-schedule.md) | REQ-009 | 咨询师 | v0.1 |
|
||||
| [consultant-fulfillment.md](./consultant-fulfillment.md) | REQ-010、012 | 咨询师 | v0.1 |
|
||||
| [settlement.md](./settlement.md) | REQ-011 | 咨询师 | v0.1 |
|
||||
| [admin-ops.md](./admin-ops.md) | REQ-013~017 | 管理员 | v0.1 |
|
||||
| [platform-capability.md](./platform-capability.md) | §6.2~6.6 | 横切 | v0.1 |
|
||||
| Code | Spec | 覆盖源 REQ / 章节 | 角色 | 状态 |
|
||||
|---|---|---|---|---|
|
||||
| ACC | [ACC-account/spec.md](./ACC-account/spec.md) | §6.1 + REQ-006 | 三端 | v0.1 |
|
||||
| CDC | [CDC-consultant-discovery/spec.md](./CDC-consultant-discovery/spec.md) | REQ-001、002 | 用户 | v0.1 |
|
||||
| BKG | [BKG-booking/spec.md](./BKG-booking/spec.md) | REQ-003、004、005 | 用户 | v0.1 |
|
||||
| COB | [COB-consultant-onboarding/spec.md](./COB-consultant-onboarding/spec.md) | REQ-007、008 | 咨询师 | v0.1 |
|
||||
| CSC | [CSC-consultant-schedule/spec.md](./CSC-consultant-schedule/spec.md) | REQ-009 | 咨询师 | v0.1 |
|
||||
| CFL | [CFL-consultant-fulfillment/spec.md](./CFL-consultant-fulfillment/spec.md) | REQ-010、012 | 咨询师 | v0.1 |
|
||||
| SET | [SET-settlement/spec.md](./SET-settlement/spec.md) | REQ-011 | 咨询师 | v0.1 |
|
||||
| ADM | [ADM-admin-ops/spec.md](./ADM-admin-ops/spec.md) | REQ-013~017 | 管理员 | v0.1 |
|
||||
| PLT | [PLT-platform-capability/spec.md](./PLT-platform-capability/spec.md) | §6.2~6.6 | 横切 | v0.1 |
|
||||
|
||||
## 3. 里程碑(源 PRD)
|
||||
## 3. 迭代级 Plan
|
||||
|
||||
| Plan | 说明 |
|
||||
|---|---|
|
||||
| [plan-20261116-iteration1-feature-skeletons.md](./plan-20261116-iteration1-feature-skeletons.md) | 特性骨架 |
|
||||
| [plan-20261116-iteration1-prototypes-and-specs.md](./plan-20261116-iteration1-prototypes-and-specs.md) | 原型与规格 |
|
||||
| [plan-20261116-iteration1-prototypes-vite.md](./plan-20261116-iteration1-prototypes-vite.md) | Vite 原型 |
|
||||
|
||||
横切 / 无 feature 归属的方案见 [`../_chores/`](../_chores/)。
|
||||
|
||||
## 4. 里程碑(源 PRD)
|
||||
|
||||
| 阶段 | 范围 |
|
||||
|---|---|
|
||||
@@ -34,19 +44,17 @@
|
||||
| M3 | 管理端审核、分类与治理 |
|
||||
| M4 | 结算、通知与上线准备 |
|
||||
|
||||
## 4. 原型约定
|
||||
## 5. 原型约定
|
||||
|
||||
- 独立 Vite 工程:[`prototypes/`](./prototypes/)(`npm run dev` → http://127.0.0.1:5174/)
|
||||
- 技术:Vue 3 + Vue Router + Element Plus(**不**并入业务 `apps/frontend/`)
|
||||
- 路由:`/` 入口;`/user/*`、`/consultant/*`、`/admin/*`
|
||||
- 规格与原型冲突时,以规格中的业务规则与验收标准为准
|
||||
|
||||
## 5. v0.1 完成清单
|
||||
## 6. v0.1 完成清单
|
||||
|
||||
9 份 spec 已完成:
|
||||
|
||||
- [x] §5 完整字段表
|
||||
- [x] §7 可测试业务规则(含规则 ID,覆盖 CREATE / QUERY / UPDATE / DELETE / COMMON)
|
||||
- [x] §9 状态流转(若有)
|
||||
- [x] §12 Given-When-Then 验收标准
|
||||
- [x] §14 挂接独立 Vite 原型路由
|
||||
|
||||
Reference in New Issue
Block a user