@specpow/framework 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# MES 功能文档转代码
|
|
2
|
+
|
|
3
|
+
使用 `mes-prd-to-code` schema 从功能文档生成代码。$ARGUMENTS 为功能文档路径。
|
|
4
|
+
|
|
5
|
+
## 执行步骤
|
|
6
|
+
|
|
7
|
+
1. 检查当前状态:
|
|
8
|
+
```bash
|
|
9
|
+
specpow status
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
2. 确认执行参数:
|
|
13
|
+
- 从 $ARGUMENTS 中提取功能文档路径
|
|
14
|
+
- 从文档名推导变更名称(如 `订单管理.md` → `order-management`)
|
|
15
|
+
- 向用户展示即将执行的命令,等待确认:
|
|
16
|
+
```
|
|
17
|
+
即将执行:
|
|
18
|
+
变更名称: <change-name>
|
|
19
|
+
Schema: mes-prd-to-code
|
|
20
|
+
功能文档: <文档路径>
|
|
21
|
+
命令: specpow propose "<change-name>" --schema mes-prd-to-code
|
|
22
|
+
|
|
23
|
+
确认执行?(y/n)
|
|
24
|
+
```
|
|
25
|
+
- 用户确认后执行,用户可修改变更名称
|
|
26
|
+
|
|
27
|
+
3. 执行创建命令:
|
|
28
|
+
```bash
|
|
29
|
+
specpow propose "<change-name>" --schema mes-prd-to-code
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
4. 按 schema 定义的工件顺序执行:
|
|
33
|
+
- parse: 读取功能文档,解析结构化信息
|
|
34
|
+
- confirm-scope: 苏格拉底式对话确认范围
|
|
35
|
+
- tech-design: 生成技术设计文档
|
|
36
|
+
- tasks: 拆分实施任务
|
|
37
|
+
- test-gen: 生成测试代码
|
|
38
|
+
- code: 生成完整代码
|
|
39
|
+
|
|
40
|
+
5. 验证工件已创建:
|
|
41
|
+
```bash
|
|
42
|
+
specpow status
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
6. 提示用户编辑生成的工件文件,然后运行 `/specpow-apply`。
|