@xulthekl/team-flow 0.39.1 → 0.40.1

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.
Files changed (34) hide show
  1. package/.claude/always/phase-guard.md +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +1 -1
  5. package/.cursor-plugin/marketplace.json +1 -1
  6. package/.cursor-plugin/plugin.json +1 -1
  7. package/.github/plugin/marketplace.json +2 -2
  8. package/GEMINI.md +1 -1
  9. package/INSTALL.md +1 -1
  10. package/README.md +1 -1
  11. package/docs/README_en.md +1 -1
  12. package/docs/solutions/INDEX.md +1 -0
  13. package/docs/solutions/cross-phase/2026-08-07-no-summary.md +17 -0
  14. package/gemini-extension.json +1 -1
  15. package/hooks/session-start +2 -2
  16. package/llms.txt +1 -1
  17. package/package.json +1 -1
  18. package/plugin.json +1 -1
  19. package/scripts/ensure-branch.mjs +2 -8
  20. package/scripts/lib/arch-merge.mjs +11 -10
  21. package/scripts/lib/cmd-deisolate.mjs +1 -5
  22. package/scripts/lib/cmd-execution.mjs +3 -2
  23. package/scripts/lib/cmd-prototype.mjs +30 -13
  24. package/scripts/lib/cmd-publish.mjs +16 -4
  25. package/scripts/lib/execution-plan.mjs +78 -18
  26. package/scripts/lib/git-utils.mjs +90 -0
  27. package/skills/ce-brainstorm/SKILL.md +65 -2
  28. package/skills/ce-brainstorm/references/brainstorm-sections.md +53 -9
  29. package/skills/ce-brainstorm/references/business-processes.md +140 -0
  30. package/skills/ce-brainstorm/references/business-scenarios.md +122 -0
  31. package/skills/ce-brainstorm/references/evidence-chain-validation.md +114 -0
  32. package/skills/ce-brainstorm/references/phase0-routing.md +7 -1
  33. package/skills/ce-brainstorm/references/prd-mapping.md +36 -8
  34. package/skills/ce-brainstorm/references/synthesis-summary.md +21 -0
@@ -11,6 +11,8 @@ If the user references an existing brainstorm topic or document, or there is an
11
11
  - If resuming, summarize the current state briefly, continue from its existing decisions and outstanding questions, and update the existing document instead of creating a duplicate
12
12
  - **Resume preserves the existing artifact's format, except pipeline mode.** Write back in whatever format the existing artifact uses — markdown if `.md`, HTML if `.html`. Explicit `output:` arguments override. Pipeline mode always forces `OUTPUT_FORMAT=md`.
13
13
 
14
+ **`requirement/` directory scan (v0.38.0+).** In addition to `prd/`, also scan `requirement/` for existing iteration versions (v1, v2, …). If `requirement/ledger.md` exists, read it to understand cross-iteration context — archived versions, entry statuses, and the overall requirement trajectory. When both `prd/` and `requirement/` exist, merge signals from both; when only `requirement/` exists (no `prd/`), treat `requirement/` as the authoritative source for resume decisions.
15
+
14
16
  Historical `docs/brainstorms/*-requirements.{md,html}` files remain legacy inputs for `ce-plan`, but new outputs write to `prd/{ITERATION_VERSION}/prd.md`.
15
17
 
16
18
  ## 0.1b Classify Task Domain
@@ -88,9 +90,13 @@ The spine is five tasks, in order:
88
90
  ## 0.5 Resolve Iteration Version
89
91
 
90
92
  Scan the `prd/` directory to detect existing iteration versions (v1, v2, v3, ...).
91
- - If no iterations exist: suggest creating v1, ask user to confirm
93
+ - Also scan `requirement/` for iteration versions — the directory may contain v-prefixed subdirectories (v1, v1.1, v2, …) representing past or parallel iterations.
94
+ - When both `prd/` and `requirement/` exist, union the detected versions and pick the highest as baseline for the next version number.
95
+ - If only `requirement/` exists, derive the new version from its latest entry (e.g., `requirement/v2/` → suggest v3).
96
+ - If no iterations exist in either directory: suggest creating v1, ask user to confirm
92
97
  - If iterations exist: suggest the latest iteration, offer to continue or create new
93
98
  - User confirms the target iteration version
94
99
  - Store as `ITERATION_VERSION` (e.g., "v1", "v2")
95
100
  - Target PRD path: `prd/{ITERATION_VERSION}/prd.md`
101
+ - **Legacy `prd/` compatibility:** projects migrating from `prd/` to `requirement/` may have both directories. Treat `prd/v1` and `requirement/v1` as the same logical iteration; do not create a duplicate version number.
96
102
  - Scan `prototype/` directory to confirm prototype branch aligns with PRD iteration version (if prototype exists).
@@ -7,13 +7,13 @@ ce-brainstorm 的对话流程收集的信息需要映射到 PRD 模板的 11 个
7
7
  | PRD 章节 | 信息来源 | 填充策略 |
8
8
  |---|---|---|
9
9
  | 一、版本修订记录 | 元数据(日期、作者、版本、状态) | **自动填充**:从对话上下文提取日期、用户信息;版本/状态按下方「版本格式规范」填充,**文档状态必须与 frontmatter `frozen` 一致** |
10
- | 二、业务流程一览 | Phase 1.3 对话:用户/流程/系统交互 | **对话填充**:brainstorm 对话中收集的业务流程信息 |
11
- | 三、D7.1_业务流程 | Phase 1.3 对话:Key Flows | **对话填充**:从 brainstorm 的 Key Flows 映射 |
10
+ | 二、业务流程一览 | Phase 1.3 对话 + `requirement/vN/business-analysis.md`(业务流程一览表) + `requirement/ledger.md`(流程台账 L1~L4 分组) | **对话+台账填充**:优先从 business-analysis.md 的业务流程一览表(L1 分组 ~ L4 子流程)提取;对话补充未落账的流程信息 |
11
+ | 三、D7.1_业务流程 | Phase 1.3 对话 + `requirement/vN/business-analysis.md`(流程详情:流程图 + 活动一览表) | **对话+台账填充**:优先从 business-analysis.md 的流程详情(流程图 + 活动一览表)提取;对话补充 Key Flows 中未落账的细节 |
12
12
  | 四、D7.2_画面原型及设计 | Phase 1.3 对话:UI/交互需求 | **对话填充**:如涉及 UI,从对话中收集原型信息 |
13
13
  | 五、D7.3_报表清单 | Phase 1.3 对话 | **占位保留**:brainstorm 不涉及报表细节,保留模板占位符 |
14
14
  | 六、D7.4_业务术语字典 | Phase 1.3 对话 + CONCEPTS.md | **部分填充**:从对话中提取的领域术语,其余保留占位符 |
15
- | 七、D7.5_系统功能清单 | Phase 1.3 对话:Requirements | **对话填充**:从 brainstorm 的 Requirements 映射 |
16
- | 八、D7.6_系统功能处理说明书 | Phase 1.3 对话:Key Decisions + Constraints | **部分填充**:权限/交互/异常等从对话收集,硬件/网络保留占位符 |
15
+ | 七、D7.5_系统功能清单 | Phase 1.3 对话 + `requirement/ledger.md`(需求台账 + 场景台账) + `requirement/vN/business-analysis.md` | **对话+台账填充**:每个功能标注关联需求 ID、关联场景 ID、关联流程步骤;从需求台账和场景台账提取关联关系 |
16
+ | 八、D7.6_系统功能处理说明书 | Phase 1.3 对话 + `requirement/vN/business-analysis.md`(按流程组织的功能模块) + `requirement/ledger.md`(流程台账) | **部分填充**:按流程组织,每个功能模块标注所属流程;权限/交互/异常从对话收集,硬件/网络保留占位符 |
17
17
  | 九、D7.7_要件定义自查报告 | 自动 | **占位保留**:这是 BA 自查工具,brainstorm 阶段不填充 |
18
18
  | 十、D7.8_要件定义完成报告 | 自动 | **占位保留**:这是完成态产物,brainstorm 阶段不填充 |
19
19
  | 十一、D7.9_评审会议纪 | 自动 | **占位保留**:这是评审产物,brainstorm 阶段不填充 |
@@ -22,16 +22,44 @@ ce-brainstorm 的对话流程收集的信息需要映射到 PRD 模板的 11 个
22
22
 
23
23
  1. **brainstorm 对话中没有信息的章节保留模板占位符**,不硬填
24
24
  2. **版本修订记录(§1)** 从元数据自动填充:日期、撰写人(如可获取)
25
- 3. **业务流程(§2-§3)** 从 brainstorm 的 Key Flows 和 Actors 映射
25
+ 3. **业务流程(§2-§3)** 优先从 `business-analysis.md` 提取(§2 ← 业务流程一览表,§3 ← 流程详情),对话中的 Key Flows 和 Actors 作为补充
26
26
  4. **画面原型(§4)** 仅在 brainstorm 涉及 UI 时填充
27
27
  5. **业务术语(§6)** 从对话中提取已定义的领域术语
28
- 6. **系统功能(§7-§8)** 从 Requirements 和 Key Decisions 映射
28
+ 6. **系统功能(§7-§8)** 从 Requirements 和 Key Decisions 映射;§7 每个功能标注关联需求 ID + 场景 ID + 流程步骤(来源:`ledger.md`),§8 按流程组织并标注所属流程(来源:`business-analysis.md` + `ledger.md`)
29
29
  7. **自查/完成/评审(§9-§11)** 全部保留占位符,由后续流程填充
30
30
 
31
+ ## 台账与业务分析文档映射(v0.38 新增)
32
+
33
+ 当 `requirement/` 目录下存在台账和业务分析文档时,ce-brainstorm 应优先从中提取结构化数据填充 PRD,而非仅依赖对话收集。
34
+
35
+ ### 输入文件与职责
36
+
37
+ | 文件 | 路径 | 职责 |
38
+ |------|------|------|
39
+ | 需求/场景/流程台账 | `requirement/ledger.md` | 全量条目和关联关系(需求 ID、场景 ID、流程 ID 及交叉引用) |
40
+ | 修订记录 | `requirement/vN/dialogue-log.md` | §1.2 修订记录的引用路径(指向具体对话日志) |
41
+ | 业务分析文档 | `requirement/vN/business-analysis.md` | §2/§3/§7/§8 的结构化数据来源 |
42
+
43
+ ### 章节级映射规则
44
+
45
+ | PRD 章节 | 台账/文档来源 | 提取内容 |
46
+ |----------|-------------|---------|
47
+ | §1.2 修订记录 | `requirement/vN/dialogue-log.md` | 修订记录引用路径(文件名 + 日期) |
48
+ | §2 业务流程一览 | `ledger.md` 流程台账 + `business-analysis.md` | L1 分组 ~ L4 子流程的业务流程一览表 |
49
+ | §3 D7.1_业务流程 | `business-analysis.md` | 流程详情:流程图 + 活动一览表 |
50
+ | §7 D7.5_系统功能清单 | `ledger.md` 需求台账 + 场景台账 | 每个功能标注:关联需求 ID + 关联场景 ID + 关联流程步骤 |
51
+ | §8 D7.6_系统功能处理说明书 | `business-analysis.md` + `ledger.md` 流程台账 | 按流程组织,每个功能模块标注所属流程 |
52
+
53
+ ### 缺失降级策略
54
+
55
+ - 台账或业务分析文档不存在时,退回对话填充策略(即原有行为),不阻断 brainstorm 流程
56
+ - 台账存在但某章节对应字段为空时,该章节保留模板占位符并在备注中标注"台账数据待补充"
57
+ - 复利归档后,PRD frontmatter 应更新已发布版本标记,与台账中的`发布版本`字段保持一致
58
+
31
59
  ## 迭代版本(vN)
32
60
 
33
- - `prd/vN/` 中的 N 是产品迭代版本(v1=MVP, v2=扩展),不是文档版本
34
- - ce-brainstorm 启动时扫描 `prd/` 目录检测已有迭代
61
+ - `prd/vN/` 或 `requirement/vN/` 中的 N 是产品迭代版本(v1=MVP, v2=扩展),不是文档版本
62
+ - ce-brainstorm 启动时扫描 `prd/` 和 `requirement/` 目录检测已有迭代(`requirement/` 优先)
35
63
  - 自动建议最新迭代或创建新迭代,用户确认后继续
36
64
  - 每个迭代目录下只有一个 `prd.md` 文件
37
65
 
@@ -22,6 +22,15 @@ The internal draft is structured in three labeled buckets. Items may appear in t
22
22
 
23
23
  A session-settled decision (per `references/settled-decisions.md`) is **Stated with provenance** — record it in the Stated bucket with its class, rejected alternative, and one-line reason, never in Inferred: it is the user's confirmed choice, not an agent bet.
24
24
 
25
+ **Evidence anchor references (SC-xxx / BP-xxx).** When dialogue content references a specific scenario or business flow that has an assigned ID in the scenario ledger or flow catalog, cite the ID as an evidence anchor rather than relying on prose description alone. Rules:
26
+
27
+ - Use `SC-xxx` for scenarios, `BP-xxx` for flows — always with the confirmation status tag (✅ confirmed / 🔵 pending).
28
+ - An item that touches multiple scenarios or flows lists all relevant IDs.
29
+ - Prefer ID anchors over prose re-description: "user checkout flow (BP-012 ✅)" is more precise and more traceable than re-describing the flow in words.
30
+ - When no ID exists for a referenced scenario or flow, note it as `(no ID assigned)` so the gap is visible — downstream spec-writing may need to create one.
31
+
32
+ This keeps internal-draft claims traceable to the source evidence that synthesis-quality-checker C3/C4 verify.
33
+
25
34
  This draft is internal. Do not paste it verbatim into chat. Compose it as a thinking step, then derive stage 2 from it.
26
35
 
27
36
  ---
@@ -32,6 +41,12 @@ The scoping synthesis is what the user actually sees. It reflects the dialogue's
32
41
 
33
42
  The scoping synthesis has up to four named sections, each **render-conditional** on having something to say. Empty sections are omitted, not padded.
34
43
 
44
+ **Scenario / flow ID references.** When any section below refers to a scenario or business flow that carries an `SC-xxx` or `BP-xxx` ID, include the ID inline — e.g., "…covers the support mute flow (BP-012 ✅)." Conventions:
45
+
46
+ - ✅ confirmed IDs need no further action in the synthesis.
47
+ - 🔵 pending IDs must surface in the **Call outs** section (see below) so the user knows which scope dependencies are not yet validated.
48
+ - When multiple IDs cluster under one bullet, list them all — partial ID coverage defeats traceability.
49
+
35
50
  1. **What we're building** (always present) — 1–3 sentences. The shape that emerged from dialogue, forward-looking, plain words. Not a transcript of "you said X."
36
51
  2. **Key trade-offs** (conditional) — 1–3 bullets, each with a brief why. Render only when real trade-offs were made in dialogue.
37
52
  3. **What's not in scope** (conditional) — 1–3 bullets, or fold into a single sentence. Render only when deferred items would surprise a downstream reader if absent.
@@ -79,6 +94,12 @@ Each conditional section has its own keep test. Sections are render-conditional
79
94
  - **Cheap-now-expensive-later correction** — a scope bet that's cheap to fix now but expensive after the Product Contract lands and ce-plan consumes it
80
95
  - **Non-obvious consequence of multi-turn answers** — a downstream effect of combining user-stated answers that the user is unlikely to have tracked through dialogue. Surfaced forward-looking ("X means Y for the doc"), not retrospectively ("you said X"). This category is the multi-turn-dialogue reason call-outs exist at all in ce-brainstorm; do not filter these as "already implied by Stated"
81
96
 
97
+ **Unconfirmed (🔵) scenario / flow annotation.** Any scenario (SC-xxx) or flow (BP-xxx) referenced in the synthesis that still carries 🔵 pending status in the ledger must appear as a call-out — even when no other keep-test category applies.
98
+
99
+ - Format: `🔵 <ID> (<name>) — not yet confirmed by user; scope depends on confirmation.`
100
+ - Example: `🔵 SC-007 (guest checkout) — not yet confirmed; notification scope depends on whether guests are included.`
101
+ - This bypasses the normal keep test: a 🔵 ID always surfaces regardless of other keep-test categories. Confirmed (✅) IDs never appear as call-outs on this basis alone.
102
+
82
103
  Cut anything that doesn't match a keep-test category, including:
83
104
 
84
105
  - Session-settled decisions — already chosen; they render as `Carrying forward:` lines, never call-outs