@xulthekl/team-flow 0.39.0 → 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.
- package/.claude/always/phase-guard.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/marketplace.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/.github/plugin/marketplace.json +2 -2
- package/GEMINI.md +1 -1
- package/INSTALL.md +1 -1
- package/README.md +1 -1
- package/agents/build-executor.md +9 -7
- package/docs/README_en.md +1 -1
- package/docs/solutions/INDEX.md +1 -0
- package/docs/solutions/cross-phase/2026-08-07-no-summary.md +17 -0
- package/gemini-extension.json +1 -1
- package/hooks/session-start +2 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/ensure-branch.mjs +2 -8
- package/scripts/lib/arch-merge.mjs +11 -10
- package/scripts/lib/cmd-deisolate.mjs +1 -5
- package/scripts/lib/cmd-execution.mjs +3 -2
- package/scripts/lib/cmd-prototype.mjs +30 -13
- package/scripts/lib/cmd-publish.mjs +16 -4
- package/scripts/lib/execution-plan.mjs +78 -18
- package/scripts/lib/git-utils.mjs +90 -0
- package/skills/build-executor/SKILL.md +13 -10
- package/skills/ce-brainstorm/SKILL.md +65 -2
- package/skills/ce-brainstorm/references/brainstorm-sections.md +53 -9
- package/skills/ce-brainstorm/references/business-processes.md +140 -0
- package/skills/ce-brainstorm/references/business-scenarios.md +122 -0
- package/skills/ce-brainstorm/references/evidence-chain-validation.md +114 -0
- package/skills/ce-brainstorm/references/phase0-routing.md +7 -1
- package/skills/ce-brainstorm/references/prd-mapping.md +36 -8
- package/skills/ce-brainstorm/references/synthesis-summary.md +21 -0
- package/skills/workflow-start/SKILL.md +49 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Phase 1.5 — Business Scenario Analysis
|
|
2
|
+
|
|
3
|
+
Detailed scenario extraction and validation logic for Phase 1.5. Triggered after Phase 1.4 completes; applies to all tiers. This phase is analytical with user confirmation — loops until the user confirms.
|
|
4
|
+
|
|
5
|
+
## Trigger & Input
|
|
6
|
+
|
|
7
|
+
**Trigger**: Phase 1.4 completed.
|
|
8
|
+
|
|
9
|
+
**Input files**:
|
|
10
|
+
- `requirement/vN/dialogue-log.md` — conversation evidence
|
|
11
|
+
- `requirement/ledger.md` — archived scenario entries (read-only during this phase)
|
|
12
|
+
- `requirement/vN/business-analysis.md` — current version scenarios (if any exist)
|
|
13
|
+
|
|
14
|
+
## Step 1: Extract Candidate Scenarios
|
|
15
|
+
|
|
16
|
+
Read `dialogue-log.md` and identify all business scenarios implied by the conversation. A candidate scenario is a discrete business activity involving one or more roles pursuing a goal under specific conditions. Extract:
|
|
17
|
+
|
|
18
|
+
- The roles mentioned or implied
|
|
19
|
+
- The goals each role pursues
|
|
20
|
+
- Triggering conditions and preconditions
|
|
21
|
+
- Constraints and acceptance criteria mentioned
|
|
22
|
+
|
|
23
|
+
Output a raw candidate list — one entry per distinct business activity. Do not merge or deduplicate yet.
|
|
24
|
+
|
|
25
|
+
## Step 2: Compare with Existing Scenarios
|
|
26
|
+
|
|
27
|
+
Read two sources:
|
|
28
|
+
|
|
29
|
+
1. **Archived entries** — `requirement/ledger.md` (scenarios from previous versions that have been archived)
|
|
30
|
+
2. **Current version** — `requirement/vN/business-analysis.md` (scenarios already drafted in this version)
|
|
31
|
+
|
|
32
|
+
For each candidate from Step 1, classify:
|
|
33
|
+
|
|
34
|
+
| Classification | Action |
|
|
35
|
+
|---|---|
|
|
36
|
+
| **New** — no matching entry in either source | Create entry with status 🔵 pending |
|
|
37
|
+
| **Optimized** — existing entry needs revision per new evidence | Create a revised version in current `business-analysis.md`, mark change type |
|
|
38
|
+
| **Unchanged** — existing entry already covers it | Skip |
|
|
39
|
+
|
|
40
|
+
Matching criteria: same business activity (role + goal overlap), not merely same domain.
|
|
41
|
+
|
|
42
|
+
## Step 3: Six-Dimension Structuring
|
|
43
|
+
|
|
44
|
+
For each new or optimized scenario, fill all six dimensions:
|
|
45
|
+
|
|
46
|
+
| Dimension | Description |
|
|
47
|
+
|---|---|
|
|
48
|
+
| **Role** | Who performs this activity (specific role, not generic "user") |
|
|
49
|
+
| **Goal** | What the role aims to achieve |
|
|
50
|
+
| **Trigger** | What event or condition initiates this scenario |
|
|
51
|
+
| **Precondition** | What must be true before the scenario can start |
|
|
52
|
+
| **Constraint** | Rules, limits, or policies that bound the scenario |
|
|
53
|
+
| **Acceptance** | Testable conditions that prove the scenario succeeded |
|
|
54
|
+
|
|
55
|
+
**Entry metadata**:
|
|
56
|
+
|
|
57
|
+
| Field | Value |
|
|
58
|
+
|---|---|
|
|
59
|
+
| Scenario ID | `SC-xxx` (sequential within version) |
|
|
60
|
+
| Status | 🔵 pending |
|
|
61
|
+
| Related requirements | `REQ-xxx` references |
|
|
62
|
+
| Related process | Process name or ID if applicable |
|
|
63
|
+
| Change history | Version, date, change type (create/modify), summary |
|
|
64
|
+
|
|
65
|
+
## Step 3.5: QA-1 Quality Check
|
|
66
|
+
|
|
67
|
+
Dispatch `scenario-quality-checker` sub-agent after structuring completes.
|
|
68
|
+
|
|
69
|
+
**Check items**:
|
|
70
|
+
|
|
71
|
+
| ID | Category | Check | Level |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| C1 | Completeness | All roles from dialogue-log have corresponding scenario coverage | Error |
|
|
74
|
+
| C2 | Completeness | Every scenario has all six dimensions filled | Error |
|
|
75
|
+
| C3 | Consistency | Related requirement IDs (`REQ-xxx`) exist in the requirement list | Error |
|
|
76
|
+
| C4 | Consistency | New scenarios do not overlap/conflict with archived ledger entries | Warning |
|
|
77
|
+
| C5 | Accuracy | Each scenario has traceable evidence in dialogue-log (not fabricated) | Error |
|
|
78
|
+
| C6 | Accuracy | Acceptance criteria are testable (specific conditions, not vague) | Warning |
|
|
79
|
+
| C7 | Completeness | Optimized scenarios include a change reason | Warning |
|
|
80
|
+
|
|
81
|
+
**Routing**:
|
|
82
|
+
|
|
83
|
+
- **PASS** (0 Errors) → proceed to Step 4
|
|
84
|
+
- **FAIL** (≥1 Error) → return to Step 3, fix flagged items, re-check
|
|
85
|
+
- **Maximum 3 rounds** — if still failing after round 3, escalate to user for decision
|
|
86
|
+
|
|
87
|
+
Warnings are reported but do not block progression.
|
|
88
|
+
|
|
89
|
+
## Step 4: Present & Confirm (Blocking Question)
|
|
90
|
+
|
|
91
|
+
Display all scenarios (new + optimized) with full six-dimension detail. Ask the user for formal confirmation:
|
|
92
|
+
|
|
93
|
+
- **✅ Confirm** → upgrade status to ✅ confirmed, write to `requirement/vN/business-analysis.md`, exit phase
|
|
94
|
+
- **✏️ Adjust** → apply user feedback, return to Step 3, re-run QA-1
|
|
95
|
+
|
|
96
|
+
This is a blocking question — do not proceed until the user explicitly confirms.
|
|
97
|
+
|
|
98
|
+
## Write Rules
|
|
99
|
+
|
|
100
|
+
On confirmation:
|
|
101
|
+
|
|
102
|
+
1. Write confirmed scenarios to `requirement/vN/business-analysis.md` (requirements list + scenario list sections)
|
|
103
|
+
2. **Do not update `ledger.md`** — ledger is batch-updated during version archival (Phase 3.6), not during scenario confirmation
|
|
104
|
+
|
|
105
|
+
## Deprecation Handling
|
|
106
|
+
|
|
107
|
+
When a scenario is deprecated (user explicitly requests removal):
|
|
108
|
+
|
|
109
|
+
1. Delete the entry from `requirement/ledger.md`
|
|
110
|
+
2. Delete the entry detail from the version's `business-analysis.md`
|
|
111
|
+
3. Update `doc/active-registry/active-items.md` to reflect the current active set
|
|
112
|
+
|
|
113
|
+
## Status Lifecycle
|
|
114
|
+
|
|
115
|
+
Only two states exist:
|
|
116
|
+
|
|
117
|
+
| State | Meaning |
|
|
118
|
+
|---|---|
|
|
119
|
+
| 🔵 pending | Drafted, awaiting QA-1 pass and user confirmation |
|
|
120
|
+
| ✅ confirmed | User confirmed, written to business-analysis.md |
|
|
121
|
+
|
|
122
|
+
No other states. Scenarios transition from 🔵 to ✅ only via Step 4 user confirmation.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Evidence Chain Validation — Phase 3.6 + QA-4 + Version Archiving
|
|
2
|
+
|
|
3
|
+
This reference covers three connected operations after PRD generation: QA-4 quality check, bidirectional evidence chain validation, and version archiving. They execute in strict sequence: QA-4 → validation → archive.
|
|
4
|
+
|
|
5
|
+
## QA-4: PRD Quality Checker (prd-quality-checker)
|
|
6
|
+
|
|
7
|
+
**Trigger:** PRD document written (Phase 3 complete), before Phase 3.6 validation.
|
|
8
|
+
**Route:** PASS → enter Phase 3.6; FAIL → return to Phase 3 to fix PRD.
|
|
9
|
+
|
|
10
|
+
| ID | Category | Check | Severity |
|
|
11
|
+
|----|----------|-------|----------|
|
|
12
|
+
| C1 | Completeness | PRD §2 includes a business process overview table (L1–L4)? | Error |
|
|
13
|
+
| C2 | Completeness | PRD §3 includes a flowchart + activity table for each confirmed process? | Error |
|
|
14
|
+
| C3 | Completeness | Every feature in PRD §7 carries REQ-xxx + SC-xxx + BP-xxx triple-ID linkage? | Error |
|
|
15
|
+
| C4 | Completeness | PRD §8 feature modules organized by process (BP-xxx grouping)? | Error |
|
|
16
|
+
| C5 | Consistency | PRD §2 process overview table matches business-analysis.md process list? | Error |
|
|
17
|
+
| C6 | Consistency | PRD §3 process descriptions match business-analysis.md process details? | Error |
|
|
18
|
+
| C7 | Metadata | PRD frontmatter complete (title / project_name / iteration_version / date / prd_template)? | Warning |
|
|
19
|
+
| C8 | Format | §8.4 feature extraction preserves original requirements detail (not over-summarized)? | Warning |
|
|
20
|
+
|
|
21
|
+
**Verdict rule:** All Error-level checks pass → PASS. Any Error fails → FAIL. Warnings are reported but do not block.
|
|
22
|
+
|
|
23
|
+
## Phase 3.6: Bidirectional Validation
|
|
24
|
+
|
|
25
|
+
**Trigger:** QA-4 verdict = PASS.
|
|
26
|
+
**Nature:** Automatic validation + user confirmation.
|
|
27
|
+
|
|
28
|
+
### Inputs
|
|
29
|
+
|
|
30
|
+
- `requirement/vN/prd.md` — the generated PRD
|
|
31
|
+
- `requirement/ledger.md` — the master requirements ledger
|
|
32
|
+
|
|
33
|
+
### Five Validation Dimensions
|
|
34
|
+
|
|
35
|
+
**V1 — Scenario Coverage Completeness**
|
|
36
|
+
Every scenario marked ✅ in the ledger must have functional coverage in PRD §7/§8. Check: for each ledger SC-xxx row with status ✅, find at least one PRD §7 feature referencing that SC-xxx ID.
|
|
37
|
+
|
|
38
|
+
**V2 — Process Coverage Completeness**
|
|
39
|
+
Every process marked ✅ in the ledger must appear in PRD §3. Check: for each ledger BP-xxx row with status ✅, find a corresponding PRD §3 section describing that process.
|
|
40
|
+
|
|
41
|
+
**V3 — Step-to-Function Mapping**
|
|
42
|
+
Each step of each confirmed process must map to a PRD §7 feature. Check: for every BP-xxx step listed in the ledger, find a PRD §7 feature whose triple-ID includes that BP-xxx and a matching step description.
|
|
43
|
+
|
|
44
|
+
**V4 — Function Traceability Completeness**
|
|
45
|
+
Every PRD §7 feature must carry a valid REQ-xxx + SC-xxx + BP-xxx triple. Check: parse each feature's ID block; verify each ID resolves to an existing ledger row. Flag orphan IDs or missing links.
|
|
46
|
+
|
|
47
|
+
**V5 — Process Description Consistency**
|
|
48
|
+
PRD §3 process descriptions must be consistent with business-analysis.md. Check: compare process name, step count, step names, and actor assignments between the two documents. Semantic equivalence is sufficient; verbatim match is not required.
|
|
49
|
+
|
|
50
|
+
### Validation Verdict and Routing
|
|
51
|
+
|
|
52
|
+
| Verdict | Condition | Next Step |
|
|
53
|
+
|---------|-----------|-----------|
|
|
54
|
+
| PASS | V1–V5 all pass | Proceed to version archiving, then Phase 4 |
|
|
55
|
+
| CONDITIONAL_PASS | Failures in V1–V5 are explicitly marked "defer this iteration" by user | User annotates exempt items with justification → proceed to archiving |
|
|
56
|
+
| FAIL | Unresolvable gaps remain | Return to Phase 3 to fix PRD, or return to Phase 1.5/1.6 to supplement requirements |
|
|
57
|
+
|
|
58
|
+
## Version Archiving
|
|
59
|
+
|
|
60
|
+
**Trigger:** Phase 3.6 verdict = PASS or CONDITIONAL_PASS.
|
|
61
|
+
**Tier:** All tiers.
|
|
62
|
+
**Nature:** Atomic, automated, no user interaction.
|
|
63
|
+
|
|
64
|
+
### Pre-Checks (all must hold)
|
|
65
|
+
|
|
66
|
+
1. Current-version business-analysis.md: all REQ status = ✅
|
|
67
|
+
2. Current-version business-analysis.md: all SC status = ✅
|
|
68
|
+
3. Current-version business-analysis.md: all BP status = ✅
|
|
69
|
+
4. Phase 3.6 verdict = PASS or CONDITIONAL_PASS
|
|
70
|
+
|
|
71
|
+
### Processing Steps
|
|
72
|
+
|
|
73
|
+
**Step 1 — Ledger batch write/refresh**
|
|
74
|
+
|
|
75
|
+
For every item in the current version's business-analysis.md:
|
|
76
|
+
|
|
77
|
+
- New item → append a row to ledger.md
|
|
78
|
+
- Modified item → refresh the existing row's `last_modified_version` and `directory` fields
|
|
79
|
+
- Reverse references → refresh the `linked_processes` field in scenario/requirement ledger rows
|
|
80
|
+
|
|
81
|
+
**Step 2 — Append archive record**
|
|
82
|
+
|
|
83
|
+
Append one row to ledger.md's "Version Archive" section:
|
|
84
|
+
|
|
85
|
+
| archive_version | archive_date | included_requirements | included_scenarios | included_processes | prd_path | status |
|
|
86
|
+
|
|
87
|
+
**Step 3 — Mark business-analysis.md archived**
|
|
88
|
+
|
|
89
|
+
Set frontmatter field `archived: true` in the current version's business-analysis.md.
|
|
90
|
+
|
|
91
|
+
**Step 4 — Update active registry**
|
|
92
|
+
|
|
93
|
+
Update `doc/active-registry/active-items.md` to reflect the newly archived items and retire any superseded entries.
|
|
94
|
+
|
|
95
|
+
### Outputs
|
|
96
|
+
|
|
97
|
+
- `requirement/ledger.md` — batch update complete
|
|
98
|
+
- `requirement/vN/business-analysis.md` — archived flag set
|
|
99
|
+
- `doc/active-registry/active-items.md` — updated
|
|
100
|
+
|
|
101
|
+
### Exit
|
|
102
|
+
|
|
103
|
+
Archiving complete → ready to enter `ce-plan` (development phase).
|
|
104
|
+
|
|
105
|
+
## Compound Interest Archive Sync
|
|
106
|
+
|
|
107
|
+
When archiving completes, the compound interest (复利) system should also update:
|
|
108
|
+
|
|
109
|
+
1. Append a row to the ledger's "Release Records" table
|
|
110
|
+
2. Fill the `release_version` field on relevant items
|
|
111
|
+
3. Update PRD frontmatter metadata (mark published version)
|
|
112
|
+
4. Item statuses remain unchanged (stay ✅ confirmed)
|
|
113
|
+
|
|
114
|
+
This reference documents the trigger relationship only. Compound interest automation is owned by the `ce-compound` skill.
|
|
@@ -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
|
-
-
|
|
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
|
|
11
|
-
| 三、D7.1_业务流程 | Phase 1.3
|
|
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
|
|
16
|
-
| 八、D7.6_系统功能处理说明书 | Phase 1.3
|
|
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)**
|
|
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
|
|
@@ -93,6 +93,15 @@ Guard: `... check <dir> specifying bridging --json` → fail = BLOCK. Artifacts
|
|
|
93
93
|
### Route to build-executor (dispatch sub-agent)
|
|
94
94
|
Contract exists and approved, contract matches artifacts. Include `DP-4: 执行模式选择`: propose waves, run `tf execution recommend <change-dir> [--wave ...]`, show the user every available mode plus evidence and the recommendation, then obtain a clear selection. The command saves a current receipt; before the first implementation edit, `build-executor` must run `tf execution plan <change-dir> --mode <selected> --confirm ...` (and `--acknowledge-recommendation` when the selected mode differs from the recommendation) using matching artifacts, contract, and waves, then `tf execution show <change-dir> --json`; report the saved revision, selected mode, recommendation alignment, ordered waves, and actual concurrent-dispatch capability. A revision must repeat recommend and confirmation. Do not transition to `executing` until `show` reports `current: true`; then run `... check <dir> approved-for-build executing --json` → fail = BLOCK. **v0.13 §49 门禁前移**:该 guard 含 `test-matrix-ready` 维度——full 模式非存量 change 必须"带着矩阵开工"(矩阵存在非空 OR 显式 skip 附理由);FAIL 时回 bridging 让 contract-builder 补矩阵,或按指引显式 skip,禁止绕过。
|
|
95
95
|
|
|
96
|
+
**v0.39.0 主动串行编排**:workflow-start 必须主动串行编排 build-executor 和 code-reviewer,而不是被动等待 build-executor 完成所有 wave。流程:
|
|
97
|
+
1. 读取 execution plan 获取 wave 列表(`tf execution show <change-dir> --json`)
|
|
98
|
+
2. 对每个 wave:
|
|
99
|
+
- dispatch build-executor 执行当前 wave
|
|
100
|
+
- 等待 build-executor 完成(task-notification)
|
|
101
|
+
- dispatch code-reviewer 审查当前 wave
|
|
102
|
+
- 等待 review receipt + verdict=pass
|
|
103
|
+
3. 所有 wave 完成后,继续下一步路由
|
|
104
|
+
|
|
96
105
|
### 阶段产物同步门禁点(v0.37.0 §68.2 G4)
|
|
97
106
|
|
|
98
107
|
契约批准(DP-3)后、进入实施(DP-4)前,**阻塞确认**(AskUserQuestion)是否同步 change 规划制品(团队协作:契约是实施授权):
|
|
@@ -108,6 +117,8 @@ Execution hit blockage: test failure, unexpected behavior, build error, task can
|
|
|
108
117
|
### Route to code-reviewer
|
|
109
118
|
The current planned wave is implemented and ready for spec-compliance + code-quality verification. A reviewer must write an `tf execution review <change-dir> --wave <id> --base <sha> --head <sha> --report <path> --verdict <pass|fail>` receipt before any dependent wave or closing transition.
|
|
110
119
|
|
|
120
|
+
**v0.39.0 主动串行编排**:workflow-start 在每个 wave 完成后主动 dispatch code-reviewer,而不是等待 build-executor 完成所有 wave。这是 workflow-start 的编排责任,不是 build-executor 的责任。
|
|
121
|
+
|
|
111
122
|
**逐 wave 审查纪律(v0.36.4)**:每次 code-reviewer dispatch 只审查**一个** wave。禁止将多个 wave 合并为一次审查(vrm4teamflow C1 事件:W1-W4 合并审查导致设计约定类问题在 W4 才发现,修复范围扩大到 8 个 batch)。parallel wave 内的多个 task 作为整体审查一次(receipt 是 wave 级别),但审查 prompt 必须包含每个 task 的独立 diff。
|
|
112
123
|
|
|
113
124
|
### Route to release-archivist (dispatch sub-agent)
|
|
@@ -158,6 +169,42 @@ Use content inspection, not timestamps.
|
|
|
158
169
|
|
|
159
170
|
**Brief drift (advisory, v0.9, 不阻断)**: change-brief.md 是上游输入(非 team-flow 产物),**不**混入上述三条产物互查、**不**进入 `artifacts_hash`。当 brief 的 `plan_hash` 与当前 `prd/vN/plan.md` 不一致,或 brief AC 列表与 PRD 功能清单明显出入 → 提示"产品层已变更,brief 可能过期,建议回 orchestrator 重新分发(S4→S3 环路)",**不**触发产物重审。
|
|
160
171
|
|
|
172
|
+
## Review Findings 处理流程(v0.39.0)
|
|
173
|
+
|
|
174
|
+
当 code-reviewer 返回 findings 时,workflow-start 必须:
|
|
175
|
+
1. 分析 findings 的严重程度(Critical/Important/Minor)
|
|
176
|
+
2. 通过 SendMessage 将 findings 转发给 build-executor,附带修复指令
|
|
177
|
+
3. 等待 build-executor 修复并返回结果
|
|
178
|
+
4. **禁止直接 Read/Edit/Write 任何代码文件**——无论改动量大小
|
|
179
|
+
|
|
180
|
+
示例 SendMessage:
|
|
181
|
+
```yaml
|
|
182
|
+
to: build-executor
|
|
183
|
+
message: |
|
|
184
|
+
code-reviewer 发现以下 findings,请修复:
|
|
185
|
+
- F-15: policyYear prop 未传递(Critical)
|
|
186
|
+
- F-16: 评价下拉缺符号(Important)
|
|
187
|
+
|
|
188
|
+
修复后请通知我,我将 dispatch code-reviewer re-review。
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## 修复后 Re-review 流程(v0.39.0)
|
|
192
|
+
|
|
193
|
+
build-executor 修复 findings 后,workflow-start 必须:
|
|
194
|
+
1. dispatch code-reviewer 进行 re-review(只审查修复的 findings)
|
|
195
|
+
2. 等待 re-review 结果
|
|
196
|
+
3. 如果 re-review 通过(PASS 或 PASS_WITH_WARNINGS),记录 review receipt(verdict=pass)
|
|
197
|
+
4. 如果 re-review 不通过(FAIL),重复修复流程(≤3 轮,不收敛转人工)
|
|
198
|
+
5. **禁止在 review receipt 未记录或 verdict!=pass 时进入下一阶段**
|
|
199
|
+
|
|
200
|
+
## Closing 前置条件检查(v0.39.0)
|
|
201
|
+
|
|
202
|
+
在路由到 release-archivist 之前,workflow-start 必须检查:
|
|
203
|
+
- 所有 planned wave 的 review receipt 是否存在
|
|
204
|
+
- 所有 review receipt 的 verdict 是否为 pass
|
|
205
|
+
- 如果任何 receipt 缺失或 verdict!=pass,阻断并要求 re-review
|
|
206
|
+
- 检查命令:`tf execution show <change-dir> --json` 查看每个 wave 的 receipt 状态
|
|
207
|
+
|
|
161
208
|
## Guardrails
|
|
162
209
|
|
|
163
210
|
- No implementation before planning artifacts or contract exist
|
|
@@ -174,7 +221,8 @@ Use content inspection, not timestamps.
|
|
|
174
221
|
- **No routing to spec-writer without architecture-design gate pass** (v0.9 §26): `arch_design_decision` must be `required` or `skipped` (not `null`). hotfix/tweak 不豁免
|
|
175
222
|
- **No arch state write without auto-review PASS** (v0.28.1 §36): when `decision: required`, auto-review MUST complete with PASS or PASS_WITH_WARNINGS before writing `arch_design_decision` to yaml. FAIL → loop fix (≤3 rounds) or escalate to human
|
|
176
223
|
- **No routing past DP-A without user confirmation** (v0.29.0 §37): architecture-design 四步协议完成后,必须经 DP-A 用户确认门(AskUserQuestion)才能路由到 spec-writer。用户选择"需要调整"时,修改必须通过子代理执行,修改后重新 auto-review + 重新 DP-A 确认
|
|
177
|
-
- **Artifact Ownership — 主代理不得直接修改子代理产物** (v0.29.0 §37): 子代理是其产物的唯一负责人(architecture-design → `architecture/` 目录,spec-writer → `proposal.md`/`specs/`/`design.md`/`tasks.md`,contract-builder → `execution-contract.md
|
|
224
|
+
- **Artifact Ownership — 主代理不得直接修改子代理产物** (v0.29.0 §37): 子代理是其产物的唯一负责人(architecture-design → `architecture/` 目录,spec-writer → `proposal.md`/`specs/`/`design.md`/`tasks.md`,contract-builder → `execution-contract.md`,build-executor → 代码文件)。主代理(workflow-start)不得通过 Read + Edit/Write 直接修改子代理的产物文件。修改必须通过 `SendMessage` 恢复原子代理(优先)或启动新子代理执行。**v0.39.0 强化**:主代理 MUST NOT 直接 Edit/Write 任何文件 under `changes/<name>/` 或 `.worktrees/`——无论改动量大小,必须通过 SendMessage 委托子代理执行。例外:仅当子代理无法启动且用户明确授权时,主代理可直接修改,但必须在修改后重新触发对应的 review 验证
|
|
225
|
+
- **修复后必须 re-review** (v0.39.0): build-executor 修复 findings 后,workflow-start 必须 dispatch code-reviewer re-review 确认修复有效,记录 review receipt(verdict=pass)。禁止在 review receipt 未记录或 verdict!=pass 时进入下一阶段
|
|
178
226
|
- **No cross-change artifact modification (v0.30.0)**: 处理 change X 时 **MUST NOT** 编辑 `changes/Y/`(Y≠X)下任何产物。发现跨 change 依赖/问题时:① 在 change X 的 ADR/proposal 中显式声明依赖;② change Y 进入 workflow-start 时,扫描是否有其他 change 声明了对 Y 的依赖并提醒用户;③ change Y 的产物修改必须走 Y 自己的完整流程(architecture-design → auto-review → DP-A),不得绕过。跨 change 一致性核查可调度 `cross-change-consistency-checker` agent(来源:workflow-feedback 2026-08-01)
|
|
179
227
|
|
|
180
228
|
## State Writes (v0.22.5 F06 修复)
|