Merge pull request 'sync: d8d-iterate Phase 3 利用原型增量更新能力' (#8) from sync/d8d-skills-20260408-075904 into master
Reviewed-on: http://gitea.d8d.fun/d8dfun/bmad-method-template/pulls/8
This commit is contained in:
@@ -1,22 +1,74 @@
|
||||
# Phase 3: 原型更新(可选)
|
||||
|
||||
**目标**:当变更涉及新 UI 页面或重大交互变更时,更新原型系统。
|
||||
**目标**:当变更涉及新 UI 页面、交互变更或文档变更时,利用 d8d-prototype 的增量更新能力精确更新原型系统。
|
||||
|
||||
## 触发条件
|
||||
|
||||
```
|
||||
IF 变更类型 == design → 执行 Phase 3
|
||||
IF 变更类型 == feature 且涉及新页面/组件 → 执行 Phase 3
|
||||
IF 变更类型 == feature 且只有后端变更 → 看是否有文档变更
|
||||
IF 变更类型 == bugfix → 跳过
|
||||
IF 变更类型 == refactor 且不涉及 UI → 跳过
|
||||
IF 变更类型 == regression → 跳过
|
||||
```
|
||||
|
||||
## 决策逻辑:是否需要更新原型
|
||||
|
||||
```
|
||||
has_new_pages = Phase 2 是否新增了 UI 页面/组件
|
||||
has_doc_changes = Phase 2 是否新增/修改了文档(PRD、架构、UX、Epic、implementation-artifacts)
|
||||
|
||||
IF has_new_pages AND has_doc_changes → [A] 全部更新
|
||||
IF has_new_pages AND NOT has_doc_changes → [P] 特定页面更新
|
||||
IF NOT has_new_pages AND has_doc_changes → [D] 文档中心更新
|
||||
IF NOT has_new_pages AND NOT has_doc_changes → 跳过 Phase 3
|
||||
```
|
||||
|
||||
## 执行方式
|
||||
|
||||
### 方式 A: 调用 d8d-prototype 全量更新
|
||||
### Step 3.1: 检测原型状态
|
||||
|
||||
当新增多个页面时:
|
||||
读取 `prototype/.prototype-state.md` 判断状态:
|
||||
|
||||
```
|
||||
IF 不存在 → 首次生成(全量流程)
|
||||
IF status=in_progress → 续跑(调用 d8d-prototype 恢复)
|
||||
IF status=completed → 增量更新(进入 Step 3.2)
|
||||
```
|
||||
|
||||
### Step 3.2: 增量更新(利用 d8d-prototype 的 [U] 选项)
|
||||
|
||||
当原型已完成(status=completed)时,根据决策逻辑选择增量模式:
|
||||
|
||||
#### [D] 文档中心更新
|
||||
|
||||
适用:Phase 2 新增了 implementation-artifacts(如 Story 规格、旅程验证)但没有新 UI 页面。
|
||||
|
||||
执行 step-05b-update-docs.md(d8d-prototype 的迭代文档更新步骤):
|
||||
1. 全量扫描 `_bmad-output/` 所有 `.md` 和 `.yaml` 文件
|
||||
2. 按类型分组(Planning / Story 规格 / 旅程验证 / Pipeline / Other)
|
||||
3. 重建 `docs-index.html`,包含分组卡片
|
||||
4. 更新 `view-doc.html` fetch 路径覆盖所有子目录
|
||||
5. 补充 `server.js` 的 `.yaml/.yml` MIME 类型(如缺失)
|
||||
|
||||
#### [P] 特定页面更新
|
||||
|
||||
适用:新增了部分 UI 页面但文档未变。
|
||||
|
||||
1. 读取现有原型页面,了解样式规范
|
||||
2. 为新增页面创建独立 HTML 文件
|
||||
3. 更新 `admin-index.html` 或 `mobile-index.html`,将新页面加入 iframe 网格
|
||||
|
||||
#### [A] 全部更新
|
||||
|
||||
适用:页面和文档都有变更(如大型 feature 或 design 变更)。
|
||||
|
||||
调用 d8d-prototype 的 `[U] → [A]` 全部更新流程:
|
||||
1. 先执行 step-05b 更新文档中心
|
||||
2. 再按需重新生成变更的页面
|
||||
|
||||
### Step 3.3: 首次生成(原型不存在时)
|
||||
|
||||
```
|
||||
Skill tool: d8d-prototype
|
||||
@@ -25,24 +77,16 @@ Arguments:
|
||||
PRD: {planning_artifacts}/prd.md
|
||||
UX设计: {planning_artifacts}/ux-design-specification.md
|
||||
架构: {planning_artifacts}/architecture.md
|
||||
输出目录: {planning_artifacts}/prototypes
|
||||
输出目录: prototype/
|
||||
```
|
||||
|
||||
### 方式 B: 只生成新增页面
|
||||
### Step 3.4: 跳过
|
||||
|
||||
当只新增少量页面时,直接生成单个 HTML 文件:
|
||||
|
||||
1. 读取现有原型页面,了解样式规范
|
||||
2. 为新增页面创建独立 HTML 文件
|
||||
3. 更新 admin-index.html,将新页面加入 iframe 网格
|
||||
|
||||
### 方式 C: 跳过
|
||||
|
||||
当变更不涉及新 UI 时,直接跳过此 Phase。
|
||||
当决策逻辑判断不需要更新时:
|
||||
|
||||
```
|
||||
在 iterate-progress.md 中记录:
|
||||
phase-03-prototype: skipped (reason: no UI changes)
|
||||
phase-03-prototype: skipped (reason: no UI or doc changes)
|
||||
```
|
||||
|
||||
## 输出
|
||||
@@ -51,6 +95,8 @@ phase-03-prototype: skipped (reason: no UI changes)
|
||||
```yaml
|
||||
phase-03-prototype:
|
||||
status: completed | skipped
|
||||
new_pages: [page-name-1, page-name-2] # 如果执行了
|
||||
mode: full | [D] | [P] | [A] | first-time
|
||||
pages_updated: [...] # 更新/新增的页面列表
|
||||
docs_updated: true | false # 文档中心是否更新
|
||||
reason: "..." # 如果跳过了
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user