@gordon.gan/specflow 1.5.0-beta → 1.8.0-beta

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 (41) hide show
  1. package/README.md +2 -2
  2. package/dist/cli/commands/approval-assemble.d.ts +48 -5
  3. package/dist/cli/commands/approval-assemble.js +347 -34
  4. package/dist/core/approval/assemble.js +15 -22
  5. package/dist/core/approval/bundle.d.ts +9 -0
  6. package/dist/core/approval/bundle.js +172 -0
  7. package/dist/core/approval/forbidden-patterns.d.ts +6 -0
  8. package/dist/core/approval/forbidden-patterns.js +40 -0
  9. package/dist/core/approval/index-schema.d.ts +203 -0
  10. package/dist/core/approval/index-schema.js +47 -0
  11. package/dist/core/approval/index.d.ts +10 -2
  12. package/dist/core/approval/index.js +7 -1
  13. package/dist/core/approval/lint.d.ts +10 -0
  14. package/dist/core/approval/lint.js +302 -0
  15. package/dist/core/approval/paths.d.ts +5 -0
  16. package/dist/core/approval/paths.js +15 -0
  17. package/dist/core/approval/pipeline.d.ts +28 -0
  18. package/dist/core/approval/pipeline.js +146 -0
  19. package/dist/core/approval/playbook-schema.d.ts +182 -0
  20. package/dist/core/approval/playbook-schema.js +51 -0
  21. package/dist/core/approval/render.d.ts +20 -0
  22. package/dist/core/approval/render.js +210 -0
  23. package/dist/core/approval/review-pack.d.ts +26 -0
  24. package/dist/core/approval/review-pack.js +205 -0
  25. package/dist/core/approval/types.d.ts +103 -0
  26. package/dist/integrations/shared/capability-evidence.js +3 -0
  27. package/dist/integrations/shared/parity-manifest.js +3 -0
  28. package/package.json +2 -1
  29. package/prompts/approval/acp-pipeline.md +106 -0
  30. package/prompts/approval/ai-review.md +145 -0
  31. package/prompts/approval/generate.md +107 -9
  32. package/prompts/approval/multi-repo-guidance.md +71 -10
  33. package/prompts/approval/multi-repo-spoke-subagent.md +94 -0
  34. package/prompts/approval/runtime-guidance.md +64 -0
  35. package/prompts/approval/segmented-generation.md +14 -8
  36. package/skills/GUIDANCE_PACKS.md +1 -1
  37. package/skills/specflow-approval/SKILL.md +160 -22
  38. package/templates/approval-index.yaml +25 -4
  39. package/templates/approval-part.md +1 -1
  40. package/templates/approval-playbook-talos-scenario-job-compile.yaml +29 -0
  41. package/templates/approval-playbook.yaml +28 -0
@@ -0,0 +1,64 @@
1
+ # Approval · Runtime Semantics Guidance (optional domain pack)
2
+
3
+ > **Optional** — load only when the change design touches async execution, leases, retries,
4
+ > cancellation, LWW/idempotency keys, or result-ingest validation.
5
+ >
6
+ > **Not** part of default Stage 12e checklist. Use when analysis/design mentions these topics;
7
+ > then add checks from §2 to AI review findings for **this change only**.
8
+
9
+ ---
10
+
11
+ ## 1. When to load
12
+
13
+ | Signal in design/analysis | Action |
14
+ |---------------------------|--------|
15
+ | Job lease, reclaim, retry, duplicate execution | §1.1 |
16
+ | User/system cancel, abort, teardown | §1.2 |
17
+ | Step/job status enum vs ingest validator | §1.3 |
18
+ | None of the above | **Skip this file** |
19
+
20
+ ---
21
+
22
+ ## 2. Mandatory decisions (pick one per topic — when in scope)
23
+
24
+ ### 2.1 Retry / reclaim vs accumulated state
25
+
26
+ When the same execution key can run again, document how prior partial state is handled:
27
+
28
+ | Option | Write in approval |
29
+ |--------|-------------------|
30
+ | **A wipe** | Clear prior results before re-run |
31
+ | **B epoch/version** | Reads/writes scoped by epoch or version |
32
+ | **C no retry** | Disable retry for this execution type |
33
+
34
+ **Hard**: add decision row + §4 scenario + testable AC. **Forbidden**: leave unspecified when retry exists in design.
35
+
36
+ ### 2.2 Cancel / abort
37
+
38
+ When cancel is in scope:
39
+
40
+ - Document abort behavior (in-flight work, teardown, partial commit)
41
+ - Terminal status for cancelled runs
42
+ - §4.3 sequence for cancel path
43
+
44
+ ### 2.3 Status ingest / validator alignment
45
+
46
+ When external ingest validates status values:
47
+
48
+ - Document the **closed** allowed set
49
+ - **Forbidden**: doc lists values outside validator unless same iteration changes validator
50
+
51
+ ---
52
+
53
+ ## 3. AI review hook (when loaded)
54
+
55
+ Add targeted findings (category `runtime_semantics`) — do not apply to changes without these topics.
56
+
57
+ ```yaml
58
+ design_points: [P<n>-retry-policy, P<n>-cancel]
59
+ acp:
60
+ review:
61
+ enabled: true
62
+ ```
63
+
64
+ Cross-links: `api-guidance.md` (contract layers), `ai-review.md` (generic R9 unclosed branches).
@@ -1,7 +1,7 @@
1
1
  # Approval · Segmented Generation (Map → CLI Reduce)
2
2
 
3
3
  > Used by `/specflow:approval` **Stage 12** when `mode=segmented` (default for non-trivial §4).
4
- > **Reduce 禁止 LLM**:拼接必须 `specflow approval assemble <change>` `specflow approval check <change>`。
4
+ > **Reduce 禁止 LLM**:拼接必须 `specflow approval finalize <change>`(或 debug:`check` / `assemble`)。
5
5
 
6
6
  ---
7
7
 
@@ -24,7 +24,8 @@ Copy template: `templates/approval-index.yaml` → `approval/index.yaml`.
24
24
  Gate → user confirms index + optional chapters + mode
25
25
  12b Map Append → parts 04.4* / 04.5* / 04.6* / 04.7–04.9 (batched)
26
26
  12c Optional → parts 05* / 07 / 08 (only if optional.s5/s7/s8)
27
- 12d CLI Reduce specflow approval check specflow approval assemble --force
27
+ 12e AI Review fix parts; review-result.json + part_hashes
28
+ 12f Finalize → specflow approval finalize <change>
28
29
  ```
29
30
 
30
31
  **Never** skip 12d. **Never** paste assembled markdown from memory instead of running CLI.
@@ -110,16 +111,21 @@ Only if user opted in AND `optional.s5/s7/s8: true` in index:
110
111
 
111
112
  ---
112
113
 
113
- ## 6. Stage 12dCLI Reduce
114
+ ## 6. Stage 12e–12fAI Review + Finalize
115
+
116
+ **12e (in-session)**: Read `prompts/approval/ai-review.md`; fix parts; write `approval/review-result.json`.
117
+
118
+ **12f (one CLI)**:
114
119
 
115
120
  ```bash
116
- specflow approval check <change>
117
- specflow approval assemble <change> --force
121
+ specflow approval finalize <change> [--bundle] [--workspace-root <root>]
118
122
  ```
119
123
 
120
- - `check` MUST pass with **zero errors** before assemble
121
- - Warnings (orphan parts) should be fixed or removed
122
- - Report paths: `specflow/changes/<name>/approval.md`
124
+ - First run without `review-result.json`: pauses, writes `review-packet.json`, agent completes 12e, re-run finalize
125
+ - Chains lint review-check check assemble → bundle (when enabled)
126
+ - Subcommands (`lint`, `assemble`, …) are for CI/debug only
127
+
128
+ See **`prompts/approval/acp-pipeline.md`**.
123
129
 
124
130
  ---
125
131
 
@@ -26,7 +26,7 @@ Workflow 通过路由 `Read` 路径加载 guidance;禁止写成「invoke `/mys
26
26
 
27
27
  另:前端详设结构由 `prompts/approval/frontend-guidance.md` 驱动;接口/RPC 可生成契约由 **`prompts/approval/api-guidance.md`** 驱动(分层 L2/L3/L4、RPC 锁名、proto/OpenAPI 包)。与 DB 的 `database-guidance.md` 对称。
28
28
 
29
- **分片生成(非 trivial §4)**:`prompts/approval/segmented-generation.md` + `templates/approval-index.yaml`;Map 写 `approval/parts/`,Reduce `specflow approval assemble`(禁止 LLM 拼接)。
29
+ **分片生成(非 trivial §4)**:`prompts/approval/segmented-generation.md` + `prompts/approval/acp-pipeline.md` + `templates/approval-index.yaml`;Map 写 `approval/parts/`,Stage 12e AI Review 后 **`specflow approval finalize`**(一键 lint → review-check → assemble bundle)。多仓合订用 `templates/approval-playbook.yaml`。
30
30
 
31
31
  ```yaml
32
32
  # specflow/config.yaml(可选,优先于自动探测)
@@ -116,21 +116,129 @@ Read **`prompts/approval/multi-repo-guidance.md`**.
116
116
 
117
117
  ```text
118
118
  跨 N 个仓库,审批技术文档如何产出?
119
- A) 一份合订 (unified) — 单份 approval.md
120
- B) 多份分仓 (per_repo) — 每仓各自 approval.md
119
+ A) 一份合订视图 (bundle) — 各仓 per_repo 真源 + CLI bundle 只读合订 (**推荐**)
120
+ B) 多份分仓 (per_repo) — 每仓各自 approval.md(默认 Map 模式)
121
+ C) 一份 LLM 合订 (legacy unified) — 仅当用户明确要求且无 bundle;不推荐
121
122
  ```
122
123
 
123
- 4. If **A** ask **主仓** (stores `approval.md` + `approval/` workspace):
124
+ 4. **A (recommended)**: `document_mode: per_repo` + `multi_repo.bundle.enabled: true` + primary repo for playbook output; **B**: per_repo only; **C**: legacy unified (discourage).
125
+ 5. If **A or C** — ask **主仓** for playbook/bundle output path.
126
+ 6. Write `approval/index.yaml` → `multi_repo` + `acp.pipeline: acp/v2`.
127
+ 7. **Per_repo**: Stage 12 + ACP **per repo**; if **A**, run `specflow approval bundle` after all repos assemble.
128
+
129
+ Single-repo → skip (`multi_repo.enabled=false`).
130
+
131
+ ---
132
+
133
+ ## Stage 1c: Multi-Repo Subagent Orchestration (主仓一键 · 子仓并行)
134
+
135
+ **Trigger**: `multi_repo.enabled=true` **and** user chose **A (bundle)** or **B (per_repo only)** **and** session supports **Task** subagents (Cursor Agent / compatible harness).
136
+
137
+ **User-facing promise**: user starts **once** from the **primary** repo (`/specflow:approval <primary.change>`). Orchestrator runs spoke approvals **in parallel**; primary **waits** for all spokes to finish `finalize` successfully, then runs **primary Map + finalize + bundle** (mode A).
138
+
139
+ Read **`prompts/approval/multi-repo-spoke-subagent.md`** before dispatching subagents.
140
+
141
+ ### 1c.1 Preconditions (hard)
142
+
143
+ 1. User gate **A** answered → `document_mode: per_repo` + `multi_repo.bundle.enabled: true` + `primary_repo` set.
144
+ 2. Primary `approval/index.yaml` lists every `multi_repo.repos[]` with `id`, `change`, **`root_hint`** (absolute planning root).
145
+ 3. Primary `approval/approval-playbook.yaml` exists (copy from `templates/approval-playbook.yaml` or `templates/approval-playbook-talos-scenario-job-compile.yaml`); every **non-primary** source has explicit `root:` in playbook. **Spoke** `index.yaml` must set `multi_repo.bundle.enabled: false` (only primary enables bundle).
146
+ 4. **Scope map** recorded: which `parts` / `interfaces` / `pages` / `capabilities` belong to each repo (from primary index inventory — **split**, do not duplicate bodies across repos).
147
+ 5. If migrating from legacy **unified** (mode C): **split parts first** — move `04.6-ui` → web, Worker L2 → worker, platform keeps L3/DDL/compile; add cross-refs. Do not bundle until split is done.
148
+
149
+ ### 1c.2 Phase diagram
124
150
 
125
151
  ```text
126
- 合订文档存放在哪个主仓? (talos / talos-web / talos-worker / …)
152
+ [Primary orchestrator]
153
+ Stage 1b intake + user gate A + playbook + scope map
154
+ Stage 2–11 (closed-loop) — primary reads ALL repos' four artifacts
155
+ Stage 12a — primary index + playbook + overlay only (optional skeleton on primary)
156
+
157
+ ═══ PARALLEL (Task subagent × each non-primary repo) ═══
158
+ For each spoke in multi_repo.repos[] where repo.id != primary_repo:
159
+ Launch Task (generalPurpose) with multi-repo-spoke-subagent.md brief
160
+ Inputs: repo_id, planning_root=root_hint, change, role, scope, workset_root, primary_change
161
+ Spoke runs: 12a → 12b → 12e → finalize <spoke.change> (NO --bundle)
162
+
163
+ ═══ WAIT GATE (orchestrator blocks) ═══
164
+ Collect each spoke return payload → all finalize_ok: true
165
+ If any blocked → STOP; report failing repo + diagnostics; do NOT bundle
166
+
167
+ ═══ PRIMARY (sequential) ═══
168
+ Stage 12b Map primary-scoped parts only
169
+ Stage 12e AI Review + finalize <primary.change> # no --bundle yet if review pauses
170
+ Re-run finalize until primary ok
171
+
172
+ ═══ BUNDLE (primary only) ═══
173
+ specflow approval finalize <primary.change> --bundle --workspace-root <primary.planning_root> [--render]
174
+ Report: each per_repo approval.md path + approval-unified.md (readonly)
127
175
  ```
128
176
 
129
- 5. Write `approval/index.yaml` `multi_repo` with user choices + `outputs`.
130
- 6. **Unified**: Stage 12 workspace + `specflow approval assemble` run in **primary** planning root only.
131
- 7. **Per_repo**: repeat Stage 12 + assemble **per repo** (scope = that repo only).
177
+ **`--workspace-root`**: use the **primary repo planning root** (directory containing `specflow/changes/`), not the workset parent — unless every playbook `sources[]` entry sets explicit `root:` (recommended for web/worker).
132
178
 
133
- Single-repo skip (`multi_repo.enabled=false`).
179
+ ### 1c.3 Subagent dispatch template
180
+
181
+ For each spoke, launch **one** Task in parallel (same turn when possible):
182
+
183
+ ```text
184
+ Task · Spoke approval · <repo_id>
185
+
186
+ Read prompts/approval/multi-repo-spoke-subagent.md and execute spoke approval end-to-end.
187
+
188
+ repo_id: <id>
189
+ planning_root: <root_hint absolute path>
190
+ change: <spoke change name>
191
+ role: platform | web | worker
192
+ primary_repo_id: <primary_repo>
193
+ primary_change: <primary change name>
194
+ workset_root: <parent containing all repos, optional>
195
+ scope:
196
+ parts: [<part ids for this repo only>]
197
+ interfaces: [<I ids>]
198
+ pages: [<page ids>]
199
+ capabilities: [<cap ids>]
200
+ cross_ref_policy: 跨仓细节用「见 <other-repo> approval §x」;禁止复制平台 DDL/Worker OpenAPI 全文到本仓
201
+
202
+ Return the YAML payload from multi-repo-spoke-subagent.md § Return payload.
203
+ ```
204
+
205
+ **Parallelism**: launch all spoke Tasks in **one** assistant message. Do **not** start primary Map §4 batches that belong to a spoke until spoke Tasks are dispatched (orchestrator may prepare primary skeleton while spokes run).
206
+
207
+ ### 1c.4 Wait gate & bundle (hard)
208
+
209
+ Before primary `--bundle`:
210
+
211
+ | Check | Action |
212
+ |-------|--------|
213
+ | Each spoke `finalize_ok: true` | else STOP |
214
+ | Each spoke `approval.md` exists | Read path from return payload |
215
+ | Primary `finalize` ok (no lint/review errors) | else fix primary parts first |
216
+ | Playbook sources match actual per-repo parts | `specflow approval bundle <primary.change>` dry path via finalize |
217
+
218
+ On success announce:
219
+
220
+ ```text
221
+ Multi-repo approval complete (mode A):
222
+ - talos/.../approval.md (platform)
223
+ - talos-web/.../approval.md (web)
224
+ - talos-worker/.../approval.md (worker)
225
+ - talos/.../approval-unified.md (readonly bundle)
226
+ Apply uses per_repo approval.md only.
227
+ ```
228
+
229
+ ### 1c.5 Fallback (no Task / subagent)
230
+
231
+ If subagents unavailable, run spokes **sequentially** in the same session: `cd <root_hint>` → full spoke flow → return to primary. Same wait gate before bundle. **Never** skip per-repo finalize.
232
+
233
+ ### 1c.6 User confirmation
234
+
235
+ After Stage 12a + scope map, ask once:
236
+
237
+ ```text
238
+ 将并行在 N-1 个子仓生成 approval(<repo list>),主仓完成后合订 bundle。确认继续?
239
+ ```
240
+
241
+ On confirm: dispatch subagents + proceed. User does **not** run spoke CLIs manually.
134
242
 
135
243
  ---
136
244
 
@@ -455,7 +563,7 @@ Each dimension produces a verdict (`READY` | `NEEDS REFINEMENT` | `BLOCKED`) wit
455
563
  ## Stage 12: Generate approval.md (Index → Map → CLI Reduce)
456
564
 
457
565
  Follow `generate.md` Part E (structure) and Part F (segmented pipeline + anti-lazy rules).
458
- Read `prompts/approval/segmented-generation.md` when `mode=segmented`.
566
+ Read `prompts/approval/segmented-generation.md` when `mode=segmented`; read `prompts/approval/acp-pipeline.md` for ACP verify/finalize flow.
459
567
 
460
568
  **Output artifact**: `specflow/changes/<name>/approval.md`
461
569
  **Workspace** (segmented): `specflow/changes/<name>/approval/` — `index.yaml`, `analysis.json`, `parts/*.md`, `manifest.json`
@@ -469,7 +577,7 @@ Read `prompts/approval/segmented-generation.md` when `mode=segmented`.
469
577
 
470
578
  Copy `templates/approval-index.yaml` → `approval/index.yaml`; fill `tables[]` / `interfaces[]` / `pages[]` with stable ids and `part` paths **before** any Map batch.
471
579
 
472
- **Anti-lazy (hard)**: when segmented, **never** one-shot the full `approval.md`; **never** stub parts (`TODO` / `待补充` / empty); **always** finish with CLI Reduce (12d).
580
+ **Anti-lazy (hard)**: when segmented, **never** one-shot the full `approval.md`; **never** stub parts (`TODO` / `待补充` / empty); **always** finish with `specflow approval finalize` (Stage 12f).
473
581
 
474
582
  ### 12a Index + Skeleton
475
583
 
@@ -506,16 +614,45 @@ Only if user accepted **and** `optional.s5/s7/s8: true` in index:
506
614
  - Insert `05-*` / `07-deploy` / `08-closed-loop` into `parts_order`
507
615
  - §8: one table only (from analysis)
508
616
 
509
- ### 12d CLI Reduce (mandatory for segmented)
617
+ ### 12e AI Review (ACP — in-session, mandatory for non-lightweight)
618
+
619
+ Read **`prompts/approval/ai-review.md`**. This step runs **inside `/specflow-approval`** — not as separate user-facing commands.
620
+
621
+ 1. Run once (or when paused): `specflow approval finalize <change>` — if `review-result.json` missing, CLI pauses and writes `review-packet.json`.
622
+ 2. Read `review-packet.json` + all parts; fix **parts only**; write `approval/review-result.json` (use `specflow approval review-hashes <change> --json` for `part_hashes`).
623
+ 3. Use **generic long-document checks** in `ai-review.md` (R1–R13). Load optional packs (`runtime-guidance.md`, `api-guidance.md`) **only** when the change design requires them.
624
+
625
+ Set in `index.yaml`:
626
+
627
+ ```yaml
628
+ acp:
629
+ pipeline: acp/v2
630
+ review:
631
+ enabled: true
632
+ required_pass: true
633
+ ```
634
+
635
+ ### 12f Finalize (one CLI — preferred)
636
+
637
+ After Map + AI Review, **one command** finishes Verify → Reduce → optional bundle:
510
638
 
511
639
  ```bash
512
- specflow approval check <change>
513
- specflow approval assemble <change> --force
640
+ specflow approval finalize <change> [--bundle] [--workspace-root <workset-root>]
514
641
  ```
515
642
 
516
- - `check` must pass with **zero errors** before assemble
517
- - Reduce is **deterministic** — no LLM stitching
518
- - Report final path: `specflow/changes/<name>/approval.md`
643
+ Chains: `lint --strict` → `review-check` `check` `assemble --force` `bundle` (when `multi_repo.bundle.enabled`).
644
+
645
+ **Do not** ask the user to run `lint` / `review-pack` / `review-check` / `assemble` separately unless debugging a single stage.
646
+
647
+ Low-level subcommands (`lint`, `review-pack`, `assemble`, …) remain for CI hooks and troubleshooting — not the default skill path.
648
+
649
+ ### 12g Multi-repo bundle
650
+
651
+ When `multi_repo.bundle.enabled`, **only the primary orchestrator** runs `finalize --bundle` **after** all spokes (Stage 1c wait gate) and primary finalize succeed. Produces readonly `approval-unified.md` from `approval-playbook.yaml`. **Apply 只用各仓 approval.md 真源。**
652
+
653
+ Spoke subagents **must not** pass `--bundle`. See **Stage 1c**.
654
+
655
+ Optional HTML: `specflow approval render <change>` or `finalize --render` → `approval.html` (browser-readable; mermaid via CDN).
519
656
 
520
657
  ### Monolithic fast path
521
658
 
@@ -586,22 +723,23 @@ If not forced segmented, ask generation mode:
586
723
 
587
724
  Do NOT run 12b until index + optional choices are confirmed.
588
725
 
589
- After 12b/12c, run `specflow approval check` and fix all errors before asking final write.
726
+ After 12b/12c, run **Stage 12e AI Review** (fix parts, write `review-result.json` with `part_hashes`).
590
727
 
591
728
  Then ask:
592
729
 
593
- > "确认拼接并写入 `specflow/changes/<name>/approval.md`?"
730
+ > "确认 finalize 并写入各仓 `approval.md`?(多仓时将并行子仓 approval,完成后主仓合订 bundle)"
594
731
 
595
- Do NOT assemble until the user confirms (unless they already confirmed end-to-end generation).
732
+ Do NOT finalize until the user confirms (unless they already confirmed end-to-end generation).
596
733
 
597
734
  On confirmation:
598
735
 
599
- 1. **Segmented**: `specflow approval assemble <change> --force`do not paste assembled markdown manually.
600
- 2. **Monolithic**: write `approval.md` directly (or parts + assemble).
736
+ 1. **Multi-repo mode A/B**: run **Stage 1c**dispatch spoke subagents in parallel → wait gate → primary Map/12e/finalize → `finalize --bundle --workspace-root <primary.planning_root>`.
737
+ 2. **Segmented (single-repo)**: `specflow approval finalize <change>` do not paste assembled markdown manually; do not run lint/assemble subcommands separately unless debugging.
738
+ 3. **Monolithic**: write `approval.md` directly (or parts + finalize).
601
739
  3. Include only optional chapters the user accepted.
602
740
  4. Do **not** include「AI 预审建议」in the file.
603
741
  5. Do NOT change `phase` — it remains `refined`.
604
- 6. Report the file path and next-step suggestions.
742
+ 6. Report the file path (and bundle path if multi-repo) and next-step suggestions.
605
743
 
606
744
  ---
607
745
 
@@ -51,11 +51,28 @@ meta:
51
51
  tech_stack: unknown
52
52
  project_mode: brownfield
53
53
 
54
+ # ACP (recommended for non-lightweight) — see prompts/approval/acp-pipeline.md
55
+ acp:
56
+ pipeline: acp/v2
57
+ context_budget_tokens: 40000
58
+ output_budget_tokens: 8000
59
+ review:
60
+ enabled: true
61
+ required_pass: true
62
+ # feature_slices:
63
+ # - id: core-flow
64
+ # parts: [04-detail-core, 04.5-api]
65
+
54
66
  # 多仓时启用 (见 prompts/approval/multi-repo-guidance.md)
55
67
  # multi_repo:
56
68
  # enabled: true
57
- # document_mode: unified # unified | per_repo 用户确认后填写
58
- # primary_repo: talos # unified 时必填
69
+ # document_mode: per_repo # per_repo + bundle (推荐 A) | per_repo only (B) | unified (C)
70
+ # primary_repo: talos # bundle 或 unified 时必填
71
+ # bundle:
72
+ # enabled: true
73
+ # playbook: approval-playbook.yaml
74
+ # output: approval-unified.md
75
+ # readonly: true
59
76
  # repos:
60
77
  # - id: talos
61
78
  # label: 平台
@@ -66,7 +83,11 @@ meta:
66
83
  # role: web
67
84
  # change: <web-change-name>
68
85
  # outputs:
69
- # unified:
86
+ # per_repo:
87
+ # - repo: talos
88
+ # change: <change-name>
89
+ # path: specflow/changes/<change-name>/approval.md
90
+ # bundle:
70
91
  # repo: talos
71
92
  # change: <change-name>
72
- # path: specflow/changes/<change-name>/approval.md
93
+ # path: specflow/changes/<change-name>/approval-unified.md
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  Approval part fragment — NOT a standalone document.
3
3
  Written under specflow/changes/<name>/approval/parts/<part-id>.md
4
- Assembled by: specflow approval assemble <change>
4
+ Assembled by: specflow approval finalize <change>
5
5
  -->
6
6
 
7
7
  <!-- part-id: <must match filename without .md> -->
@@ -0,0 +1,29 @@
1
+ # specflow.approval.playbook/v1 — TALOS scenario-job-compile 三仓合订示例
2
+ # Copy to: specflow/changes/scenario-job-compile/approval/approval-playbook.yaml
3
+ # Used after per_repo split: each repo has its own approval/parts + approval.md
4
+ schema: specflow.approval.playbook/v1
5
+ change: scenario-job-compile
6
+ title: 场景作业编译与逐步上报(三仓合订)
7
+ primary_repo: talos
8
+
9
+ sources:
10
+ - repo: talos
11
+ change: scenario-job-compile
12
+ include_parts: all
13
+ - repo: talos-web
14
+ change: web-scenario-cases
15
+ root: /Users/gankang/TALOS-WORK/talos-web
16
+ include_parts: all
17
+ - repo: talos-worker
18
+ change: scenario-execution
19
+ root: /Users/gankang/TALOS-WORK/talos-worker
20
+ include_parts: all
21
+
22
+ overlay:
23
+ - overlays/01-unified-scope.md
24
+
25
+ assemble:
26
+ inject_headers: true
27
+ dedupe_appendix: true
28
+ output: approval-unified.md
29
+ readonly: true
@@ -0,0 +1,28 @@
1
+ # specflow.approval.playbook/v1 — copy to specflow/changes/<change>/approval/approval-playbook.yaml
2
+ schema: specflow.approval.playbook/v1
3
+ change: <change-name>
4
+ title: <合订标题>
5
+ primary_repo: talos
6
+
7
+ sources:
8
+ - repo: talos
9
+ change: <platform-change>
10
+ include_parts: all
11
+ - repo: talos-web
12
+ change: <web-change>
13
+ root: /path/to/talos-web/planning-root
14
+ include_parts: [04.6-ui, 06-test]
15
+ - repo: talos-worker
16
+ change: <worker-change>
17
+ root: /path/to/talos-worker/planning-root
18
+ include_parts: [04.5-api-worker, 04.7-logic]
19
+
20
+ # optional overlay markdown under approval/overlays/
21
+ # overlay:
22
+ # - overlays/01-unified-scope.md
23
+
24
+ assemble:
25
+ inject_headers: true
26
+ dedupe_appendix: true
27
+ output: approval-unified.md
28
+ readonly: true