@gordon.gan/specflow 1.4.6-beta → 1.7.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.
- package/README.md +2 -2
- package/dist/cli/commands/approval-assemble.d.ts +48 -5
- package/dist/cli/commands/approval-assemble.js +347 -34
- package/dist/core/approval/assemble.js +64 -17
- package/dist/core/approval/bundle.d.ts +9 -0
- package/dist/core/approval/bundle.js +172 -0
- package/dist/core/approval/forbidden-patterns.d.ts +6 -0
- package/dist/core/approval/forbidden-patterns.js +37 -0
- package/dist/core/approval/index-schema.d.ts +432 -0
- package/dist/core/approval/index-schema.js +103 -0
- package/dist/core/approval/index.d.ts +10 -2
- package/dist/core/approval/index.js +7 -1
- package/dist/core/approval/lint.d.ts +10 -0
- package/dist/core/approval/lint.js +302 -0
- package/dist/core/approval/paths.d.ts +5 -0
- package/dist/core/approval/paths.js +15 -0
- package/dist/core/approval/pipeline.d.ts +28 -0
- package/dist/core/approval/pipeline.js +146 -0
- package/dist/core/approval/playbook-schema.d.ts +182 -0
- package/dist/core/approval/playbook-schema.js +51 -0
- package/dist/core/approval/render.d.ts +20 -0
- package/dist/core/approval/render.js +210 -0
- package/dist/core/approval/review-pack.d.ts +26 -0
- package/dist/core/approval/review-pack.js +205 -0
- package/dist/core/approval/types.d.ts +131 -0
- package/dist/integrations/shared/capability-evidence.js +2 -0
- package/dist/integrations/shared/parity-manifest.js +2 -0
- package/package.json +2 -1
- package/prompts/approval/acp-pipeline.md +104 -0
- package/prompts/approval/ai-review.md +145 -0
- package/prompts/approval/api-guidance.md +179 -0
- package/prompts/approval/generate.md +164 -13
- package/prompts/approval/multi-repo-guidance.md +238 -0
- package/prompts/approval/project-conventions-guidance.md +1 -1
- package/prompts/approval/runtime-guidance.md +64 -0
- package/prompts/approval/segmented-generation.md +23 -11
- package/skills/GUIDANCE_PACKS.md +2 -2
- package/skills/specflow-approval/SKILL.md +80 -18
- package/templates/approval-index.yaml +41 -0
- package/templates/approval-part.md +1 -1
- package/templates/approval-playbook.yaml +28 -0
|
@@ -20,8 +20,9 @@ Before running this flow, the SKILL.md has confirmed:
|
|
|
20
20
|
- Tech Stack Intake gate completed when greenfield or stack dimensions are missing
|
|
21
21
|
(user confirmed 前端 / 后端 / 数据库与缓存 / 基础设施, or marked「不涉及」)
|
|
22
22
|
- `uiInScope` resolved; when yes, FE 五元组 confirmed (or marked pending refine)
|
|
23
|
-
- Anchor files extracted from `
|
|
23
|
+
- Anchor files extracted from **each in-scope repo** when `multi_repo.enabled` (Stage 1b)
|
|
24
24
|
- Optional: `specflow/specs/` baseline exists (for Pass 7)
|
|
25
|
+
- When multi-repo: `multi_repo.document_mode` + (`primary_repo` if unified) confirmed by user
|
|
25
26
|
|
|
26
27
|
You MUST read, in this order, before any analysis:
|
|
27
28
|
|
|
@@ -37,6 +38,11 @@ You MUST read, in this order, before any analysis:
|
|
|
37
38
|
Do not skip any of the four required artifacts. If any is missing, stop and tell the
|
|
38
39
|
SKILL.md caller which are missing.
|
|
39
40
|
|
|
41
|
+
When **`multi_repo.enabled=true`**, read **`prompts/approval/multi-repo-guidance.md`** first.
|
|
42
|
+
Load four artifacts **from every repo** in `multi_repo.repos[]` before analysis. Unified mode
|
|
43
|
+
merges cross-repo content into **one** document stored under **`primary_repo`**; per_repo mode
|
|
44
|
+
writes **separate** `approval.md` per repo (see §G).
|
|
45
|
+
|
|
40
46
|
---
|
|
41
47
|
|
|
42
48
|
## Part A: Closed-Loop Verification (7 Passes)
|
|
@@ -809,7 +815,7 @@ CREATE TABLE `orders` (
|
|
|
809
815
|
**适用范围**:暴露 API / RPC / CLI 命令 / 跨模块函数接口的变更(含「协议不变但本迭代新消费」)。
|
|
810
816
|
**项目类型适配**:Web/服务 → HTTP(+RPC);CLI → commander 等命令参数;库 → 导出函数签名。
|
|
811
817
|
|
|
812
|
-
> **项目约定(先于起草)**:执行 `prompts/approval/project-conventions-guidance.md`,`topic=api
|
|
818
|
+
> **项目约定(先于起草)**:执行 `prompts/approval/project-conventions-guidance.md`,`topic=api`;再执行 **`prompts/approval/api-guidance.md`**(分层、RPC 锁名、proto/OpenAPI 可生成包)。
|
|
813
819
|
> 懒加载项目 API/错误码/鉴权/契约约定。有 UI 时 **§4.6** 另跑 `topic=frontend` + `frontend-guidance.md`
|
|
814
820
|
> (勿把页面树塞进 §4.5)。
|
|
815
821
|
> **优先级**:项目约定 + 现网 OpenAPI/proto **>** SpecFlow §4.5 骨架 **>** LLM。
|
|
@@ -859,6 +865,17 @@ CREATE TABLE `orders` (
|
|
|
859
865
|
|
|
860
866
|
> **清单规则(硬)**:本迭代**不调用、不消费**的接口 **不列入** §4.5 清单。**一旦列入清单,无论变更类型是否为「不变」,均须按 §4.5.2 完整骨架输出**,不得精简、不得只写路径、不得跳过示例。
|
|
861
867
|
|
|
868
|
+
> **分层规则(硬 — 防 B2 类混写)**:同一业务链上的 **Worker HTTP(L2)**、**平台 gRPC+HTTP 绑定(L3)**、**东向 client RPC(L4)** 必须是 **独立 `In`**,各自完整展开。禁止在 L2 写满 HTTP 后,用「内部经 I6/I7 调用」一行代替 L4 详设。见 `api-guidance.md` §1。
|
|
869
|
+
|
|
870
|
+
**2b) 契约面分层(合订/三端推荐)**:
|
|
871
|
+
|
|
872
|
+
| 层 | 面 | 清单要求 |
|
|
873
|
+
|----|-----|----------|
|
|
874
|
+
| L1 | 控制台 HTTP | 字段表 + 示例 + 错误 |
|
|
875
|
+
| L2 | Worker→Gateway HTTP | OpenAPI schema 草案 + **完整** work 鉴权头示例 |
|
|
876
|
+
| L3 | Gateway 转码 RPC | **冻结** RPC 名 + proto 字段号 + `google.api.http` + **Gateway 注册点** |
|
|
877
|
+
| L4 | 平台 `client/<svc>/` RPC | 完整骨架;不变亦须字段表+示例,禁止 stub |
|
|
878
|
+
|
|
862
879
|
**3) 通用错误码约定**(强制;按项目现网风格映射):
|
|
863
880
|
|
|
864
881
|
| 错误类别 / 状态 | 典型 HTTP 或退出码 | 含义(本迭代) |
|
|
@@ -876,6 +893,8 @@ CREATE TABLE `orders` (
|
|
|
876
893
|
3. **幂等 / 终态语义**:若存在上报类接口,写清「成功 ≠ 资源终态」等不变量(对齐 §2 决策)。
|
|
877
894
|
4. **兼容缺省**:可选字段缺省时的兼容行为写进字段表「默认」列。
|
|
878
895
|
5. **与流程对齐**:接口编号可被 §4.2/§4.3 时序与 §6 测试引用。
|
|
896
|
+
6. **RPC 锁名(硬)**:新增/修改 gRPC **禁止**「暂定」「如 XxxRpc」「实现时命名/对齐」。须写死 `package.ServiceMethod`,并在决策表或 §4.5 元信息一致。见 `api-guidance.md` §2。
|
|
897
|
+
7. **错误映射唯一(硬)**:条件 → **唯一** gRPC code → **唯一** HTTP;禁止「403/409(与 progress 同类)」「或现网」。
|
|
879
898
|
|
|
880
899
|
##### 4.5.2 逐接口详设(强制骨架)
|
|
881
900
|
|
|
@@ -888,8 +907,9 @@ CREATE TABLE `orders` (
|
|
|
888
907
|
| 应用场景 | 谁、在什么用户动作/系统时机下调用 |
|
|
889
908
|
| 协议 | 方法 + 路径(或 CLI 命令 / 导出函数签名) |
|
|
890
909
|
| Content-Type / 编码 | 如 `application/json`(若适用) |
|
|
891
|
-
| 对应 RPC / 内部名 |
|
|
910
|
+
| 对应 RPC / 内部名 | **冻结**全名(例 `scheduler.SubmitStepResult`);proto 路径;**禁止**暂定/如/实现时 |
|
|
892
911
|
| 鉴权 | 本接口鉴权要点(可引用通道表) |
|
|
912
|
+
| Gateway 注册 | 新增 HTTP 绑定时:**文件+函数名**或 ProtoSets 路径(禁止只写「含新绑定」) |
|
|
893
913
|
| 本迭代变更 | 一句话(新增字段 / 行为扩展 / 不变仅消费 …) |
|
|
894
914
|
|
|
895
915
|
2. **请求体字段**(有则写;路径参数 / Query / CLI flags 用同级加粗标签分块,如 `**Query 参数**`,仍**不要**升为标题):
|
|
@@ -912,6 +932,13 @@ CREATE TABLE `orders` (
|
|
|
912
932
|
|
|
913
933
|
7. **处理顺序**(可选):多步服务端合同用编号列表;与 §4.2/§4.3、§4.4 对齐。
|
|
914
934
|
|
|
935
|
+
8. **Proto / OpenAPI 契约包**( **新增** 或 **修改 HTTP 绑定** 的 RPC — 硬):在接口小节末尾用加粗标签 `**Proto 草案**` / `**OpenAPI 指针**` 输出:
|
|
936
|
+
- proto:`rpc` 全名 + `message` 字段号表 + `google.api.http` 原文
|
|
937
|
+
- Gateway:与现网同类 RPC **同一注册点**的文件/函数,或 ProtoSets 条目
|
|
938
|
+
- Worker:OpenAPI 路径 + schema 字段与 L3 一致;HTTP 示例含 **全部** 必填头
|
|
939
|
+
- status/enum **闭合**,与现网 ingest 校验一致(禁止「等」、禁止逐步 ingest 写 `running` 除非同步改白名单)
|
|
940
|
+
详见 `api-guidance.md` §3。
|
|
941
|
+
|
|
915
942
|
##### 4.5.3 调用关系(推荐)
|
|
916
943
|
|
|
917
944
|
用短文本或 Mermaid 概括调用方如何串起 `I1…In`(主路径一条线即可),便于实现与联调对照。
|
|
@@ -925,6 +952,8 @@ CREATE TABLE `orders` (
|
|
|
925
952
|
|
|
926
953
|
- [ ] 有通道/鉴权表(或多通道说明)+ 本迭代接口清单(编号+变更类型+场景)
|
|
927
954
|
- [ ] 有通用错误码约定 + 命名/错误风格约定
|
|
955
|
+
- [ ] **分层**:L2 Worker HTTP / L3 RPC / L4 东向 RPC 各有独立 `In`,无「内部调用」stub
|
|
956
|
+
- [ ] **RPC 已冻结**:无暂定/如/实现时;新增 RPC 含 proto 字段号 + http option + Gateway 注册点
|
|
928
957
|
- [ ] 清单中**每个**接口(含**不变**)具备:元信息、字段表、成功请求/响应示例、**失败示例(G2)**、错误表
|
|
929
958
|
- [ ] **不变**接口未因「无协议变更」而省略字段表/示例;内容与现网契约或锚点一致
|
|
930
959
|
- [ ] 无「只有路径、无字段/无示例/无错误」的偷懒写法;示例与字段表一致
|
|
@@ -1312,14 +1341,16 @@ specflow init --artifact-language <language>
|
|
|
1312
1341
|
(d) 每张表字段说明表(含「本迭代用法」)。
|
|
1313
1342
|
禁止仅用散文描述 schema。MySQL DDL 禁止省略 ENGINE/CHARSET。零 DDL 迭代仍须展示当前基线 DDL —— 当表处于读/写路径时,禁止声称「不涉及数据库」。
|
|
1314
1343
|
|
|
1315
|
-
10. **§4.5 接口章节质量(硬规则)
|
|
1344
|
+
10. **§4.5 接口章节质量(硬规则)**:起草前执行 `project-conventions-guidance.md` `topic=api` + **`api-guidance.md`**.若变更涉及对外/跨服务/跨模块接口(含新增、修改、行为扩展、**协议不变但本迭代消费或调用**),§4.5 **必须**包含:
|
|
1316
1345
|
(a) 调用方/通道 + 鉴权总览,
|
|
1317
1346
|
(b) 编号稳定的接口清单(变更类型含 新增/修改/行为扩展/不变·本迭代消费/不变·协议不变),
|
|
1318
|
-
(c)
|
|
1319
|
-
(d)
|
|
1320
|
-
|
|
1321
|
-
(f)
|
|
1322
|
-
|
|
1347
|
+
(c) **契约面分层**:Worker HTTP / 平台 RPC+HTTP 绑定 / 东向 RPC **各自独立 `In`**,禁止 L2 详写、L4 一句 stub,
|
|
1348
|
+
(d) 通用错误码映射(**唯一** gRPC code → **唯一** HTTP;禁止「或」「同类映射」),
|
|
1349
|
+
(e) 清单中**每个**接口的元信息表、字段表、≥1 组成功请求/响应示例,
|
|
1350
|
+
**(f) 每个接口 ≥1 组失败示例(G2)**,
|
|
1351
|
+
(g) 错误条件表,
|
|
1352
|
+
**(h) 新增/改 HTTP 绑定的 RPC**:冻结 RPC 全名 + proto 字段号 + `google.api.http` + Gateway 注册点 + Worker OpenAPI schema(禁止「暂定」「如」「实现时对齐」)。
|
|
1353
|
+
禁止 stub。**一旦列入清单,无论是否不变,均须完整骨架**;可标注「与现网一致」但仍须贴字段表与示例。
|
|
1323
1354
|
|
|
1324
1355
|
11. **§3 架构图须附设计要点(硬规则)**:每个架构 Mermaid 图后**必须**跟编号「设计说明 / 图要点」列表(边界/不变式/复用) —— 禁止仅复述节点名。仅有组件表不够。
|
|
1325
1356
|
|
|
@@ -1381,7 +1412,8 @@ When `approval/index.yaml` has `mode: segmented` (default for non-trivial §4),
|
|
|
1381
1412
|
2. **Gate** — user confirms index inventory + optional chapters + mode
|
|
1382
1413
|
3. **12b Map Append** — batched `04.4*` / `04.5*` / `04.6*` / `04.7–04.9`
|
|
1383
1414
|
4. **12c Optional** — `05*` / `07` / `08` only when opted in
|
|
1384
|
-
5. **
|
|
1415
|
+
5. **12e AI Review** — fix parts; write `review-result.json` with `part_hashes` (see `ai-review.md`)
|
|
1416
|
+
6. **12f Finalize** — `specflow approval finalize <change>` (lint → review-check → check → assemble → bundle)
|
|
1385
1417
|
|
|
1386
1418
|
**Reduce 禁止 LLM** — never stitch parts in chat or paste from memory.
|
|
1387
1419
|
|
|
@@ -1389,16 +1421,18 @@ When `approval/index.yaml` has `mode: segmented` (default for non-trivial §4),
|
|
|
1389
1421
|
|
|
1390
1422
|
| # | Forbidden | Required |
|
|
1391
1423
|
|---|-----------|----------|
|
|
1392
|
-
| L1 | One-shot full `approval.md` when `mode=segmented` | Write parts;
|
|
1424
|
+
| L1 | One-shot full `approval.md` when `mode=segmented` | Write parts; `specflow approval finalize` |
|
|
1393
1425
|
| L2 | Empty part, `< 20` chars, placeholder-only | Full section per Part E |
|
|
1394
1426
|
| L3 | `TODO` / `待补充` / `此处省略` / bare `TBD` | Concrete text or `[待 refine 澄清: <元素>]` |
|
|
1395
1427
|
| L4 | `详见 design/tasks` without §/In/Page id | Cross-ref `§4.5 I2` / `Page·列表` / `P1` |
|
|
1396
1428
|
| L5 | New table/interface/page ids not in index | Update `index.yaml` first |
|
|
1397
|
-
| L6 | Skip DDL/字段表/失败示例 because "same as design" or "unchanged API" | G2–G6 minimum
|
|
1429
|
+
| L6 | Skip DDL/字段表/失败示例 because "same as design" or "unchanged API" | G2–G6 minimum; **不变**仍须完整 §4.5 骨架 |
|
|
1430
|
+
| L6b | Collapse L4 RPC into「内部调用 I7」; L2-only HTTP without proto | **分层**: L2/L3/L4 各独立 `In`;见 `api-guidance.md` §1 |
|
|
1431
|
+
| L6c | RPC「暂定/如/实现时命名」 | **冻结** `Service.Method` + proto 字段号;见 `api-guidance.md` §2–§3 |
|
|
1398
1432
|
| L7 | Skip IDE skills/rules scan for §4.6 | `frontend-guidance.md` §3 before Map |
|
|
1399
1433
|
| L8 | Paste skill/rule bodies verbatim | Readable Chinese + path in §4.6.1 |
|
|
1400
1434
|
| L9 | Foreign `## N.` headings in parts | `###`/`####` only; CLI injects chapter headers |
|
|
1401
|
-
| L10 | Mark done without
|
|
1435
|
+
| L10 | Mark done without finalize passing | Fix diagnostics; run `specflow approval finalize` |
|
|
1402
1436
|
|
|
1403
1437
|
CLI lazy validation mirrors L2–L3 (`lazy_part_content` on assemble/check).
|
|
1404
1438
|
|
|
@@ -1430,3 +1464,120 @@ Do not reload entire four artifacts each batch.
|
|
|
1430
1464
|
|
|
1431
1465
|
Do not rerun Pass 1–7 unless analysis is stale.
|
|
1432
1466
|
|
|
1467
|
+
---
|
|
1468
|
+
|
|
1469
|
+
## Part G: Multi-Repo Approval (多仓)
|
|
1470
|
+
|
|
1471
|
+
> Router: `prompts/approval/multi-repo-guidance.md`
|
|
1472
|
+
|
|
1473
|
+
### G.1 Trigger
|
|
1474
|
+
|
|
1475
|
+
User natural language, workset, or cross-repo design → `multi_repo.enabled=true`.
|
|
1476
|
+
|
|
1477
|
+
### G.2 User gates (hard, before Stage 12a)
|
|
1478
|
+
|
|
1479
|
+
1. **Document mode**: **A** bundle (per_repo + CLI bundle, recommended) **or** **B** per_repo only **or** **C** legacy unified LLM merge (discourage).
|
|
1480
|
+
2. If **A or C**: **主仓** `primary_repo` — playbook/bundle or unified workspace path.
|
|
1481
|
+
3. Record in `index.yaml`; set `acp.pipeline: acp/v2`; do not assemble until answered.
|
|
1482
|
+
|
|
1483
|
+
### G.3 Bundle 合订视图 (recommended)
|
|
1484
|
+
|
|
1485
|
+
- Each repo: own `approval/` + `specflow approval assemble <repo.change>`.
|
|
1486
|
+
- Primary repo: `approval-playbook.yaml` + `specflow approval bundle <primary.change>`.
|
|
1487
|
+
- Output: `approval-unified.md` (readonly concatenation, no LLM merge).
|
|
1488
|
+
|
|
1489
|
+
### G.4 Legacy unified LLM 合订 (discouraged)
|
|
1490
|
+
|
|
1491
|
+
- Read **every** repo's four artifacts + anchors.
|
|
1492
|
+
- `index.change` **should equal** primary repo's change name.
|
|
1493
|
+
- Header lists all repos; §2.3 / 附录 B per-repo tables.
|
|
1494
|
+
- CLI: `specflow approval assemble <primary.change>` from **primary** planning root.
|
|
1495
|
+
|
|
1496
|
+
### G.5 Per-repo 分仓
|
|
1497
|
+
|
|
1498
|
+
- Separate `approval/` (or monolithic `approval.md`) **in each repo**.
|
|
1499
|
+
- Each document scoped to that repo only; cross-ref sibling paths.
|
|
1500
|
+
- Separate assemble per repo.
|
|
1501
|
+
|
|
1502
|
+
### G.6 Inventory
|
|
1503
|
+
|
|
1504
|
+
Recommend `repo` on `tables[]` / `interfaces[]` / `pages[]` entries for unified mode traceability.
|
|
1505
|
+
|
|
1506
|
+
---
|
|
1507
|
+
|
|
1508
|
+
## Part H: ACP Pipeline (Approval Compiler Pipeline)
|
|
1509
|
+
|
|
1510
|
+
> Router: `prompts/approval/acp-pipeline.md` · AI review: `prompts/approval/ai-review.md`
|
|
1511
|
+
|
|
1512
|
+
### H.1 When to use
|
|
1513
|
+
|
|
1514
|
+
| Signal | Action |
|
|
1515
|
+
|--------|--------|
|
|
1516
|
+
| Segmented mode (`approval/parts/`) | **Always** run ACP Verify before assemble |
|
|
1517
|
+
| Multi-repo bundle | per_repo assemble → `approval bundle` |
|
|
1518
|
+
| Long doc / cross-part inconsistency risk | Enable `acp.review` (Stage 12e) |
|
|
1519
|
+
|
|
1520
|
+
### H.2 Pipeline stages
|
|
1521
|
+
|
|
1522
|
+
```text
|
|
1523
|
+
Analyze (Pass 1–7) → IR Freeze (index.yaml + interfaces[].frozen)
|
|
1524
|
+
→ Map (batched parts) → lint → review-pack → AI Review (12e) → review-check
|
|
1525
|
+
→ check → assemble → bundle (optional)
|
|
1526
|
+
```
|
|
1527
|
+
|
|
1528
|
+
### H.3 index.yaml `acp` block
|
|
1529
|
+
|
|
1530
|
+
```yaml
|
|
1531
|
+
acp:
|
|
1532
|
+
pipeline: acp/v2
|
|
1533
|
+
review:
|
|
1534
|
+
enabled: true
|
|
1535
|
+
required_pass: true # assemble --require-review gates on this
|
|
1536
|
+
```
|
|
1537
|
+
|
|
1538
|
+
Also freeze RPC names in `interfaces[].frozen` before Map batches.
|
|
1539
|
+
|
|
1540
|
+
### H.4 CLI
|
|
1541
|
+
|
|
1542
|
+
**Preferred (skill default)**:
|
|
1543
|
+
|
|
1544
|
+
```bash
|
|
1545
|
+
specflow approval finalize <change> [--bundle] [--workspace-root <root>]
|
|
1546
|
+
```
|
|
1547
|
+
|
|
1548
|
+
| Command | Purpose |
|
|
1549
|
+
|---------|---------|
|
|
1550
|
+
| `specflow approval review-hashes <change> [--json]` | Emit `part_hashes[]` for `review-result.json` |
|
|
1551
|
+
| `specflow approval finalize <change>` | One-shot: lint → review-check → check → assemble → bundle |
|
|
1552
|
+
| `specflow approval lint <change> [--strict]` | Debug / CI: cross-part consistency |
|
|
1553
|
+
| `specflow approval review-pack <change>` | Debug: generate review packet |
|
|
1554
|
+
| `specflow approval review-check <change>` | Debug: validate review-result |
|
|
1555
|
+
| `specflow approval check <change>` | Debug: parts/index validation |
|
|
1556
|
+
| `specflow approval assemble <change> [--require-review]` | Debug: merge parts only |
|
|
1557
|
+
| `specflow approval bundle <change>` | Debug: multi-repo readonly merge |
|
|
1558
|
+
|
|
1559
|
+
### H.5 Stage 12e AI Review (mandatory when `acp.review.enabled`)
|
|
1560
|
+
|
|
1561
|
+
Runs **inside `/specflow-approval`** — not as separate user steps:
|
|
1562
|
+
|
|
1563
|
+
1. `specflow approval finalize <change>` — pauses with `review-packet.json` if needed
|
|
1564
|
+
2. Agent reads `prompts/approval/ai-review.md` + parts; fixes parts; writes `review-result.json`
|
|
1565
|
+
3. Re-run `specflow approval finalize <change>`
|
|
1566
|
+
|
|
1567
|
+
AI review targets **long-document failure modes**: cross-part naming drift, inventory/body mismatch, depth imbalance across batches, unclosed branches, diagram/prose divergence, §4.6/§4.5 misalignment — not product-specific case rules.
|
|
1568
|
+
|
|
1569
|
+
Optional domain packs (`runtime-guidance.md`, `api-guidance.md`) apply **only when** design/analysis mentions those topics.
|
|
1570
|
+
|
|
1571
|
+
### H.6 Render (MD → HTML)
|
|
1572
|
+
|
|
1573
|
+
```bash
|
|
1574
|
+
specflow approval render <change> [--input approval.md] [--output approval.html]
|
|
1575
|
+
specflow approval finalize <change> --render # optional: render after finalize
|
|
1576
|
+
```
|
|
1577
|
+
|
|
1578
|
+
Standalone HTML with embedded CSS; Mermaid diagrams load from CDN when present.
|
|
1579
|
+
|
|
1580
|
+
### H.7 Playbook bundle (multi-repo)
|
|
1581
|
+
|
|
1582
|
+
Template: `templates/approval-playbook.yaml`. Lists per-repo `approval.md` paths; `bundle` concatenates with repo headers — **no LLM merge**.
|
|
1583
|
+
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Approval · Multi-Repo (多仓) Guidance
|
|
2
|
+
|
|
3
|
+
> Used by `/specflow:approval` when the user **自然语言指定多仓**、workset 含多个规划根、或
|
|
4
|
+
> design/tasks 明确跨 `talos` / `talos-web` / `talos-worker` 等仓库。
|
|
5
|
+
>
|
|
6
|
+
> **目的**:按各仓四件套与锚点生成技术审批文档,并 **询问用户** 产出 **一份合订** 还是 **多份分仓**;
|
|
7
|
+
> 合订时 **必须** 指定 **主仓** 存放 `approval.md` 与 `approval/` 工作区。
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 0. When to run
|
|
12
|
+
|
|
13
|
+
| 信号 | 动作 |
|
|
14
|
+
|------|------|
|
|
15
|
+
| 用户说「三仓 / talos+web+worker / 多仓合订 / 前后端一体」 | 启用 `multi_repo.enabled=true` |
|
|
16
|
+
| `specflow workset` / 会话上下文含多个 git 规划根 | 列出候选仓,请用户确认 |
|
|
17
|
+
| 仅单仓 change,无跨仓表述 | `multi_repo.enabled=false`,走单仓流程 |
|
|
18
|
+
| Hub + Spoke 联邦 | 见 §5;各 Spoke 可有不同 change id |
|
|
19
|
+
|
|
20
|
+
Announce:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
Multi-repo approval: enabled | single-repo
|
|
24
|
+
Repos in scope: talos(scenario-job-compile), talos-web(web-scenario-cases), …
|
|
25
|
+
Document mode: (pending user) unified | per_repo
|
|
26
|
+
Primary repo (if unified): (pending user)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 1. Resolve repos (硬顺序)
|
|
32
|
+
|
|
33
|
+
1. **Parse user natural language** — 仓名、别名(平台/控制台/Worker)、change 名。
|
|
34
|
+
2. **Cross-check workset** — `specflow workset list` / 用户给出的绝对路径;成员顺序 **不** 等于主仓。
|
|
35
|
+
3. **Per repo, verify** (Read-only):
|
|
36
|
+
- `specflow/changes/<change>/.specflow.yaml` → `phase: refined`
|
|
37
|
+
- 四件套:`proposal.md`, `specs/**`, `design.md`, `tasks.md`
|
|
38
|
+
4. **Record** in `approval/index.yaml` → `multi_repo.repos[]`:
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
multi_repo:
|
|
42
|
+
enabled: true
|
|
43
|
+
document_mode: unified # unified | per_repo — 用户确认后写入
|
|
44
|
+
primary_repo: talos # unified 时必填
|
|
45
|
+
repos:
|
|
46
|
+
- id: talos
|
|
47
|
+
label: 平台
|
|
48
|
+
role: platform
|
|
49
|
+
change: scenario-job-compile
|
|
50
|
+
root_hint: /path/to/talos # agent 读取用,可选
|
|
51
|
+
- id: talos-web
|
|
52
|
+
label: 控制台
|
|
53
|
+
role: web
|
|
54
|
+
change: web-scenario-cases
|
|
55
|
+
- id: talos-worker
|
|
56
|
+
label: Worker
|
|
57
|
+
role: worker
|
|
58
|
+
change: scenario-execution
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**禁止**在未 Read 各仓四件套前假设内容一致;change id **可以** 各仓不同。
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 2. User gate — 一份还是多份 (硬)
|
|
66
|
+
|
|
67
|
+
在 Pass 1 之前或 Stage 12a 之前,**必须** 询问:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
本需求跨 N 个仓库,审批技术文档如何产出?
|
|
71
|
+
|
|
72
|
+
A) 一份合订视图 (bundle) — 各仓 per_repo 真源 + CLI bundle 只读合订 (**推荐**)
|
|
73
|
+
B) 多份分仓 (per_repo) — 每仓各自 approval.md(默认 Map 模式)
|
|
74
|
+
C) 一份 LLM 合订 (legacy unified) — 仅当用户明确要求且无 bundle;不推荐
|
|
75
|
+
|
|
76
|
+
请选择 A、B 或 C。
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 2.1 Bundle(推荐 — A)
|
|
80
|
+
|
|
81
|
+
**真源**: 各仓 **per_repo** `approval.md` + `approval/parts/`(ACP Map 分片)。
|
|
82
|
+
|
|
83
|
+
**只读合订**: 主仓 `approval-playbook.yaml` + `specflow approval bundle <primary.change>` → `approval-unified.md`(**无 LLM 合并**)。
|
|
84
|
+
|
|
85
|
+
再询问主仓:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
合订 playbook 与 bundle 输出存放在哪个主仓?
|
|
89
|
+
1) talos (平台)
|
|
90
|
+
2) talos-web (控制台)
|
|
91
|
+
…
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**硬规则**:
|
|
95
|
+
|
|
96
|
+
- `multi_repo.document_mode: per_repo`
|
|
97
|
+
- `multi_repo.bundle.enabled: true`
|
|
98
|
+
- `multi_repo.primary_repo: <id>` — playbook 与 bundle 输出路径
|
|
99
|
+
- 各仓独立 Stage 12 + assemble;**全部 assemble 通过后** 在主仓执行 bundle
|
|
100
|
+
- `acp.pipeline: acp/v2` 写入 `index.yaml`
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
multi_repo:
|
|
104
|
+
document_mode: per_repo
|
|
105
|
+
primary_repo: talos
|
|
106
|
+
bundle:
|
|
107
|
+
enabled: true
|
|
108
|
+
output: approval-unified.md
|
|
109
|
+
outputs:
|
|
110
|
+
per_repo: [ …各仓路径… ]
|
|
111
|
+
bundle:
|
|
112
|
+
repo: talos
|
|
113
|
+
change: scenario-job-compile
|
|
114
|
+
path: specflow/changes/scenario-job-compile/approval-unified.md
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 2.2 Per-repo only(B)
|
|
118
|
+
|
|
119
|
+
见 §2.3;`bundle.enabled: false`。
|
|
120
|
+
|
|
121
|
+
### 2.3 Legacy unified LLM 合订(C — 不推荐)
|
|
122
|
+
|
|
123
|
+
仅在用户 **明确要求** 且拒绝 bundle 时使用。再询问主仓:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
合订文档存放在哪个主仓?(approval.md 与 approval/ 工作区写在该仓 change 目录下)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**硬规则**:
|
|
130
|
+
|
|
131
|
+
- `multi_repo.document_mode: unified`
|
|
132
|
+
- `multi_repo.primary_repo: <id>` **必填**
|
|
133
|
+
- **工作区路径**(分片模式):
|
|
134
|
+
- `specflow/changes/<primary.change>/approval/index.yaml`
|
|
135
|
+
- `specflow/changes/<primary.change>/approval/parts/*.md`
|
|
136
|
+
- 产出:`specflow/changes/<primary.change>/approval.md`
|
|
137
|
+
- CLI:`specflow approval assemble <primary.change>` **在主仓规划根**执行
|
|
138
|
+
- 文档 §1.2 / §2.3 / 附录 B **必须** 按仓分表;Pass 6 锚点 **分仓列举**
|
|
139
|
+
- 合订 **不是** 只写主仓 design;须合并各仓 specs/design/tasks 的跨端语义
|
|
140
|
+
|
|
141
|
+
写入 `multi_repo.outputs.unified`:
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
outputs:
|
|
145
|
+
unified:
|
|
146
|
+
repo: talos
|
|
147
|
+
change: scenario-job-compile
|
|
148
|
+
path: specflow/changes/scenario-job-compile/approval.md
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 2.4 Per-repo(B 详情)
|
|
152
|
+
|
|
153
|
+
**硬规则**:
|
|
154
|
+
|
|
155
|
+
- `multi_repo.document_mode: per_repo`
|
|
156
|
+
- **每个** `repos[]` 条目独立:
|
|
157
|
+
- 在该仓 `specflow/changes/<repo.change>/approval/`(分片)或 `approval.md`(单体)
|
|
158
|
+
- 内容 **仅** 本仓 scope;交叉引用用「见 `<other-repo>` approval §x」
|
|
159
|
+
- 各仓分别 `specflow approval assemble <repo.change>`(若在主仓 CLI,需 `--store` 或 cd 到该根)
|
|
160
|
+
- **禁止**只在主仓写一份然后复制到其它仓
|
|
161
|
+
|
|
162
|
+
写入 `multi_repo.outputs.per_repo[]`:
|
|
163
|
+
|
|
164
|
+
```yaml
|
|
165
|
+
outputs:
|
|
166
|
+
per_repo:
|
|
167
|
+
- repo: talos
|
|
168
|
+
change: scenario-job-compile
|
|
169
|
+
path: specflow/changes/scenario-job-compile/approval.md
|
|
170
|
+
- repo: talos-web
|
|
171
|
+
change: web-scenario-cases
|
|
172
|
+
path: specflow/changes/web-scenario-cases/approval.md
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 3. Analysis & Map 上下文
|
|
178
|
+
|
|
179
|
+
| 模式 | Read 范围 | index 库存 |
|
|
180
|
+
|------|-----------|------------|
|
|
181
|
+
| unified | 各仓四件套 + 各仓锚点 + 各仓约定 | `interfaces/pages/tables` 带 `repo` 字段(推荐) |
|
|
182
|
+
| per_repo | **当前仓**四件套 + 本仓锚点 | 仅本仓实体 |
|
|
183
|
+
|
|
184
|
+
**Unified 分片建议**:
|
|
185
|
+
|
|
186
|
+
- `02-design-review` — 三仓决策表
|
|
187
|
+
- `04.5-api` — 按 `repo` 或 L1/L2/L3/L4 分批;Worker 切片须 Read `api-guidance.md` + worker OpenAPI 路径
|
|
188
|
+
- `04.6-*` — 仅 `ui_in_scope` 且 web 仓
|
|
189
|
+
- 附录 B — 按仓允许/禁止路径
|
|
190
|
+
|
|
191
|
+
**Inventory 扩展**(可选列):
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
interfaces:
|
|
195
|
+
- id: I4
|
|
196
|
+
short: 逐步上报
|
|
197
|
+
change: scenario-job-compile
|
|
198
|
+
part: 04.5-api-worker
|
|
199
|
+
repo: talos-worker
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 4. Document header (unified)
|
|
205
|
+
|
|
206
|
+
合订 `approval.md` 头部 **必须** 声明:
|
|
207
|
+
|
|
208
|
+
```markdown
|
|
209
|
+
> **覆盖变更(多仓合订,主仓: talos)**:
|
|
210
|
+
> - 平台 `talos/scenario-job-compile`
|
|
211
|
+
> - 控制台 `talos-web/web-scenario-cases`
|
|
212
|
+
> - Worker `talos-worker/scenario-execution`
|
|
213
|
+
> **存放路径**: `specflow/changes/scenario-job-compile/approval.md`
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## 5. Hub / Federated 注意
|
|
219
|
+
|
|
220
|
+
- Hub change id 可与 Spoke change id **同名或不同**;`multi_repo.repos[].change` 用 **各规划根内真实目录名**。
|
|
221
|
+
- Hub 合同摘要可读 `--store`;Spoke approval **不**替代 Hub archive。
|
|
222
|
+
- `coordination.yaml`(若有)可 Read;无则 chat 列出各仓 phase。
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 6. 自检
|
|
227
|
+
|
|
228
|
+
- [ ] 用户已选 unified **或** per_repo
|
|
229
|
+
- [ ] unified → `primary_repo` 已选且工作区在该仓
|
|
230
|
+
- [ ] per_repo → 每仓输出路径已写入 `outputs.per_repo`
|
|
231
|
+
- [ ] 各仓四件套已 Read;非主仓内容已进合订正文或分仓文档
|
|
232
|
+
- [ ] Gate 摘要中列出 **所有** 将写入的 `approval.md` 路径
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 7. 与单仓关系
|
|
237
|
+
|
|
238
|
+
`multi_repo.enabled=false` 时忽略本章;`change` 字段为当前规划根 change,行为与旧版一致。
|
|
@@ -33,7 +33,7 @@ Conflict policy: project > SpecFlow guidance > LLM
|
|
|
33
33
|
|--------------|----------------------|----------------|
|
|
34
34
|
| `architecture` | 起草 **§3** 前 | 分层、模块边界、目录约定、禁止直连 |
|
|
35
35
|
| `database` | 起草 **§4.4** 前(且有持久化) | 迁移工具禁令、命名、字符集、现网表规范 |
|
|
36
|
-
| `api` | 起草 **§4.5** 前(且有对外/跨端接口) | 错误码、鉴权、契约/OpenAPI
|
|
36
|
+
| `api` | 起草 **§4.5** 前(且有对外/跨端接口) | 错误码、鉴权、契约/OpenAPI、通道;然后 **`api-guidance.md`**(分层、RPC 锁名、proto 可生成包) |
|
|
37
37
|
| `frontend` | 起草 **§4.6** 前(且 `uiInScope=yes`) | 组件/状态/路由/API client/设计系统/**表单/测试/a11y** 等落地约定;须含 IDE skills/rules 扫描(见 `frontend-guidance.md` §3) |
|
|
38
38
|
|
|
39
39
|
每个主题 **最多 Read 5 个文件**(配置列出的优先;自动探测时取最相关的前 5 个)。细节 references 仅在入口文件点名时再读(禁止 reference 链式跳转)。
|
|
@@ -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
|
|
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
|
-
|
|
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.
|
|
@@ -40,7 +41,9 @@ Gate → user confirms index + optional chapters + mode
|
|
|
40
41
|
| L3 | `TODO` / `待补充` / `此处省略` / bare `TBD` | Concrete text or `[待 refine 澄清: <元素>]` with reason |
|
|
41
42
|
| L4 | `详见 design/tasks` without §/In/Page id | Cross-ref `§4.5 I2` / `Page·列表` / `P1` |
|
|
42
43
|
| L5 | Invent new table/interface/page ids not in index | Update index.yaml first, then write part |
|
|
43
|
-
| L6 | Skip §4.4 DDL/字段表/失败示例 because "same as design" | Minimum
|
|
44
|
+
| L6 | Skip §4.4 DDL/字段表/失败示例 because "same as design" | Minimum per G2–G6; **不变**仍须完整 §4.5 |
|
|
45
|
+
| L6b | L2 HTTP only +「内部 I7」stub; or L4 one-liner | **分层** L2/L3/L4 各 `In`; `api-guidance.md` §1 |
|
|
46
|
+
| L6c | RPC「暂定/如/实现时」 | **冻结**名 + proto 字段号; `api-guidance.md` §2–§3 |
|
|
44
47
|
| L7 | Skip IDE skills/rules scan for §4.6 | frontend-guidance.md §3 before Map |
|
|
45
48
|
| L8 | Paste skill/rule bodies verbatim | Readable Chinese + path in §4.6.1 table |
|
|
46
49
|
| L9 | Write `## 4.` or foreign `## N.` in parts | Parts use `###`/`####`/`#####` only; CLI injects `## 4` |
|
|
@@ -86,8 +89,12 @@ For each batch, **Read only**:
|
|
|
86
89
|
|
|
87
90
|
### §4.5 part minimum (per interface)
|
|
88
91
|
|
|
89
|
-
-
|
|
90
|
-
-
|
|
92
|
+
- Run **`api-guidance.md`** before batch
|
|
93
|
+
- **One `In` per contract surface** (L2 Worker HTTP / L3 RPC+http / L4 client RPC) — no B2-style collapse
|
|
94
|
+
- meta + fields + success req/resp + **failure example (G2)** + error table (**含不变**)
|
|
95
|
+
- **新增/改 HTTP binding**: `**Proto 草案**` block — frozen RPC name, field numbers, `google.api.http`, Gateway registration, Worker OpenAPI path
|
|
96
|
+
- HTTP examples for L2: **all** required work auth headers (not body-only)
|
|
97
|
+
- **Forbidden**: 暂定 / 如 XxxRpc / 实现时命名 / 内部经 I7 一行代替 L4 详设
|
|
91
98
|
|
|
92
99
|
### §4.6 part minimum (per page)
|
|
93
100
|
|
|
@@ -104,16 +111,21 @@ Only if user opted in AND `optional.s5/s7/s8: true` in index:
|
|
|
104
111
|
|
|
105
112
|
---
|
|
106
113
|
|
|
107
|
-
## 6. Stage
|
|
114
|
+
## 6. Stage 12e–12f — AI 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)**:
|
|
108
119
|
|
|
109
120
|
```bash
|
|
110
|
-
specflow approval
|
|
111
|
-
specflow approval assemble <change> --force
|
|
121
|
+
specflow approval finalize <change> [--bundle] [--workspace-root <root>]
|
|
112
122
|
```
|
|
113
123
|
|
|
114
|
-
- `
|
|
115
|
-
-
|
|
116
|
-
-
|
|
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`**.
|
|
117
129
|
|
|
118
130
|
---
|
|
119
131
|
|
package/skills/GUIDANCE_PACKS.md
CHANGED
|
@@ -24,9 +24,9 @@ Workflow 通过路由 `Read` 路径加载 guidance;禁止写成「invoke `/mys
|
|
|
24
24
|
| 主题 | `architecture` → §3;`database` → §4.4;`api` → §4.5;`frontend` → §4.6(有 UI;含 IDE skills/rules 落地扫描) |
|
|
25
25
|
| 上限 | 每主题约定文件最多 **3**(helper);前端专题合计约定+IDE skills/rules ≤ **5**(见 `frontend-guidance.md` §3) |
|
|
26
26
|
|
|
27
|
-
另:前端详设结构由 `prompts/approval/frontend-guidance.md`
|
|
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/`,
|
|
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(可选,优先于自动探测)
|