@namewta/speculo 0.8.7 → 0.8.8

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 (35) hide show
  1. package/dist/src/structured.js +8 -4
  2. package/dist/src/structured.js.map +1 -1
  3. package/package.json +1 -1
  4. package/template/canonical/canonical-specdev-goal-plan.md +53 -6
  5. package/template/canonical/canonical-specdev-grill-with-docs.md +8 -2
  6. package/template/canonical/canonical-specdev-orchestrate-implementation.md +2784 -0
  7. package/template/canonical/canonical-specdev-spec.md +10 -2
  8. package/template/canonical/canonical-specdev-tickets.md +45 -3
  9. package/template/canonical/canonical-specdev-wayfinder.md +4 -4
  10. package/template/workflows/specdev/A-archive-and-consolidate/A-archive-and-consolidate.md +1 -1
  11. package/template/workflows/specdev/I-implement/I-implement.md +10 -5
  12. package/template/workflows/specdev/I-implement/execution-preflight.md +2 -0
  13. package/template/workflows/specdev/O-orchestrate-implementation/O-orchestrate-implementation.md +129 -0
  14. package/template/workflows/specdev/O-orchestrate-implementation/conflict-and-drift.md +18 -0
  15. package/template/workflows/specdev/O-orchestrate-implementation/execution-loop.md +30 -0
  16. package/template/workflows/specdev/O-orchestrate-implementation/implementation-evidence-template.md +39 -0
  17. package/template/workflows/specdev/O-orchestrate-implementation/implementation-map-template.md +50 -0
  18. package/template/workflows/specdev/O-orchestrate-implementation/implementation-plan-template.md +61 -0
  19. package/template/workflows/specdev/O-orchestrate-implementation/input-readiness.md +25 -0
  20. package/template/workflows/specdev/O-orchestrate-implementation/super-dag.md +27 -0
  21. package/template/workflows/specdev/README.md +17 -10
  22. package/template/workflows/specdev/W-wayfinder/W-wayfinder.md +1 -1
  23. package/template/workflows/specdev/W-wayfinder/local-tracker-contract.md +3 -4
  24. package/template/workflows/specdev/common/README.md +4 -1
  25. package/template/workflows/specdev/common/rules/artifact-contract.md +6 -2
  26. package/template/workflows/specdev/common/rules/change-completion.md +3 -0
  27. package/template/workflows/specdev/common/rules/deviation-control.md +2 -0
  28. package/template/workflows/specdev/common/rules/evidence-and-verification.md +2 -0
  29. package/template/workflows/specdev/common/rules/parent-implementation-orchestration.md +27 -0
  30. package/template/workflows/specdev/common/rules/path-ownership.md +3 -1
  31. package/template/workflows/specdev/common/schemas/implementation-map.schema.json +40 -0
  32. package/template/workflows/specdev/common/schemas/implementation-plan.schema.json +44 -0
  33. package/template/workflows/specdev/common/skills/subagent-delivery/SKILL.md +5 -3
  34. package/template/workflows/specdev/common/tools/README.md +2 -2
  35. package/template/workflows/specdev/common/tools/validate-specdev.mjs +484 -1
@@ -365,6 +365,9 @@ SpecDev 通过分层工件避免同一决策被多个模型反复重做。每个
365
365
  | Ticket | `specdev/changes/{change}/ticket/NN-<ticket-name>.md` | 单一垂直切片的行为、决策、范围、路径所有权、执行路线和验证证据 | 跨 Ticket 里程碑治理 |
366
366
  | Tickets Map | `specdev/changes/{change}/tickets-map.md` | 依赖 DAG、合同覆盖、Ready 投影、并行候选和路径冲突 | 单 Ticket 的完整实现契约 |
367
367
  | Goal Plan | `specdev/changes/{change}/goal-plan.md` | 跨 Ticket 调度、Gate、共享所有权、迁移顺序、集成和偏差治理 | 复制 Ticket 全文 |
368
+ | Implementation Map | `specdev/changes/{change}/implementation-map.md` | Ready 成员、组合 Ticket inventory、跨 change dependency/serialization 与 revision | 创建或改写子 Spec、Ticket 或实现细节 |
369
+ | Implementation Plan | `specdev/changes/{change}/implementation-plan.md` | 父 Lead、全局 workspace/实现上限、frontier/Wave/locks/integration queue 和可恢复进度投影 | 改写子 change 权威或伪造完成 |
370
+ | Implementation Orchestration Evidence | `specdev/changes/{change}/evidence/implementation-orchestration.md` | 成员完成、组合 Ticket 顺序/锁、repository integration、整体验证、漂移和残余风险 | 新产品/架构决定或单 Ticket Evidence 替代品 |
368
371
  | Evidence | `specdev/changes/{change}/evidence/T-NN.md` | 实际修改、命令、结果、验收映射、偏差、风险和提交引用 | 新的产品或架构决策 |
369
372
  | 代码审查 | `specdev/changes/{change}/reviews/CR-###.md` | 固定点、标准轴和规范轴 finding | 实施修复或合并两轴排名 |
370
373
  | UI 设计包 | `specdev/changes/{change}/prototypes/{design-id}/design-system.md`、`specdev/changes/{change}/prototypes/{design-id}/comparison/` 与 `specdev/changes/{change}/prototypes/{design-id}/final/` | 项目 UI 证据、功能风格候选、逐层用户决定、设计 token、交互合同和可运行 HTML/CSS/JS 投影 | 生产 UI 实现或替用户确认高影响偏好 |
@@ -388,8 +391,9 @@ Change CONTEXT/ADR 是 active change 内的执行权威,不是 workflow 级永
388
391
  4. 当前外部行为权威:`specdev/changes/{change}/spec.md`;
389
392
  5. 当前 Ticket 契约:`specdev/changes/{change}/ticket/NN-<ticket-name>.md`;
390
393
  6. 当前跨 Ticket 编排:`specdev/changes/{change}/goal-plan.md`;
391
- 7. 当前代码与运行事实;
392
- 8. 旧计划、旧日志和未经确认的推断。
394
+ 7. 若当前 change 属于父实现 change,父 Implementation Map 对组合 Ticket dependency/serialization 具有权威,父 Implementation Plan 拥有全局 workspace、frontier 与 integration queue;
395
+ 8. 当前代码与运行事实;
396
+ 9. 旧计划、旧日志和未经确认的推断。
393
397
 
394
398
  当前 change 决定与永久知识冲突时,必须在 LOG/ADR 中显式说明替代关系;它只约束当前 change,直到 A 决定是否提升并更新永久版本。
395
399
 
@@ -534,6 +538,8 @@ required Ticket Done 必须有 source commit、通过 candidate、父分支 resu
534
538
 
535
539
  Direct Spec Evidence 至少包含:用户批准与轻量合同、Lead、实施前/最终 checkpoint、实际路径、定向/回归/E2E 命令及环境、验收映射、未运行项、偏差、残余风险和提交授权状态。
536
540
 
541
+ 父实现 change 的 Implementation Orchestration Evidence 不能替代子 Evidence。它至少记录最终 Map revision、全部成员最终状态和子证据指针、dependency/serialization 实际顺序、跨 change 合同检查、aggregate 命令/环境/结果、stale candidate 处理、偏差和残余风险。任何成员未 completed 或整体验证未通过时不得形成父完成证据。
542
+
537
543
  </evidence-and-verification>
538
544
 
539
545
  <deviation-control>
@@ -561,6 +567,7 @@ Direct Spec Evidence 至少包含:用户批准与轻量合同、Lead、实施
561
567
  - 发现新的安全、数据、兼容、性能或迁移风险;
562
568
  - 依赖、合同或外部参考权威已变化;
563
569
  - 实际行为将与 Spec 或 ADR 不一致。
570
+ - 父 Implementation Map 的成员、组合 Ticket、dependency、serialization 或 revision 已与子状态、路径或 Git 事实不一致。
564
571
 
565
572
  ## 3. 偏差记录
566
573
 
@@ -581,6 +588,7 @@ Direct Spec Evidence 至少包含:用户批准与轻量合同、Lead、实施
581
588
  - 未批准的 ticket、spec、architecture 或 release 偏差不得继续实现。
582
589
  - 不得通过扩大 `writable_paths`、删除测试、降低断言或把风险改写成“已知限制”来绕过停止。
583
590
  - 偏差影响并行执行、source checkpoint 或 candidate 集成时,Lead 必须暂停受影响 Wave,重新计算路径所有权、依赖、Gate 与父分支顺序;任何 subagent 都不能自行改写上层合同。
591
+ - 偏差跨越多个成员时,父 Lead 先递增 Implementation Map revision,再重算 Implementation Plan;旧派单和 candidate 全部标记 stale。
584
592
 
585
593
  </deviation-control>
586
594
 
@@ -652,6 +652,9 @@ SpecDev 通过分层工件避免同一决策被多个模型反复重做。每个
652
652
  | Ticket | `specdev/changes/{change}/ticket/NN-<ticket-name>.md` | 单一垂直切片的行为、决策、范围、路径所有权、执行路线和验证证据 | 跨 Ticket 里程碑治理 |
653
653
  | Tickets Map | `specdev/changes/{change}/tickets-map.md` | 依赖 DAG、合同覆盖、Ready 投影、并行候选和路径冲突 | 单 Ticket 的完整实现契约 |
654
654
  | Goal Plan | `specdev/changes/{change}/goal-plan.md` | 跨 Ticket 调度、Gate、共享所有权、迁移顺序、集成和偏差治理 | 复制 Ticket 全文 |
655
+ | Implementation Map | `specdev/changes/{change}/implementation-map.md` | Ready 成员、组合 Ticket inventory、跨 change dependency/serialization 与 revision | 创建或改写子 Spec、Ticket 或实现细节 |
656
+ | Implementation Plan | `specdev/changes/{change}/implementation-plan.md` | 父 Lead、全局 workspace/实现上限、frontier/Wave/locks/integration queue 和可恢复进度投影 | 改写子 change 权威或伪造完成 |
657
+ | Implementation Orchestration Evidence | `specdev/changes/{change}/evidence/implementation-orchestration.md` | 成员完成、组合 Ticket 顺序/锁、repository integration、整体验证、漂移和残余风险 | 新产品/架构决定或单 Ticket Evidence 替代品 |
655
658
  | Evidence | `specdev/changes/{change}/evidence/T-NN.md` | 实际修改、命令、结果、验收映射、偏差、风险和提交引用 | 新的产品或架构决策 |
656
659
  | 代码审查 | `specdev/changes/{change}/reviews/CR-###.md` | 固定点、标准轴和规范轴 finding | 实施修复或合并两轴排名 |
657
660
  | UI 设计包 | `specdev/changes/{change}/prototypes/{design-id}/design-system.md`、`specdev/changes/{change}/prototypes/{design-id}/comparison/` 与 `specdev/changes/{change}/prototypes/{design-id}/final/` | 项目 UI 证据、功能风格候选、逐层用户决定、设计 token、交互合同和可运行 HTML/CSS/JS 投影 | 生产 UI 实现或替用户确认高影响偏好 |
@@ -675,8 +678,9 @@ Change CONTEXT/ADR 是 active change 内的执行权威,不是 workflow 级永
675
678
  4. 当前外部行为权威:`specdev/changes/{change}/spec.md`;
676
679
  5. 当前 Ticket 契约:`specdev/changes/{change}/ticket/NN-<ticket-name>.md`;
677
680
  6. 当前跨 Ticket 编排:`specdev/changes/{change}/goal-plan.md`;
678
- 7. 当前代码与运行事实;
679
- 8. 旧计划、旧日志和未经确认的推断。
681
+ 7. 若当前 change 属于父实现 change,父 Implementation Map 对组合 Ticket dependency/serialization 具有权威,父 Implementation Plan 拥有全局 workspace、frontier 与 integration queue;
682
+ 8. 当前代码与运行事实;
683
+ 9. 旧计划、旧日志和未经确认的推断。
680
684
 
681
685
  当前 change 决定与永久知识冲突时,必须在 LOG/ADR 中显式说明替代关系;它只约束当前 change,直到 A 决定是否提升并更新永久版本。
682
686
 
@@ -801,7 +805,9 @@ workspace/implementation owner 可以是 Lead 或动态 implementation subagent
801
805
 
802
806
  required 模式 implementation subagent 上限取 Goal Plan、config 和平台能力共同约束,Lead 不计入。current 模式保持单 writer 串行安全不变量,Ticket 严格串行。review/research/test-observation agent 不设置 SpecDev 数字上限,但 Lead 必须避免重复工作与可变环境争用。
803
807
 
804
- **完成标准**:每个项目写入映射到唯一 Ticket、owner 和来源 worktree;shared 与父分支写入 owner 唯一。
808
+ change 属于父 Implementation Map 时,再取父 Implementation Plan 的全局 implementation subagent 上限与 workspace 策略;该上限跨全部成员合计。无 dependency 的组合 Ready Tickets 若 writable/shared paths 重叠,也必须在父 Map 建立 serialization。相同 repository/ref 的 parent integration 严格串行;一次父 HEAD 推进会使其他成员旧 candidate 失效。
809
+
810
+ **完成标准**:每个项目写入映射到唯一 change、Ticket、owner 和来源 worktree;shared 与父分支写入 owner 唯一。
805
811
 
806
812
  </path-ownership>
807
813
 
@@ -859,6 +865,8 @@ required Ticket Done 必须有 source commit、通过 candidate、父分支 resu
859
865
 
860
866
  Direct Spec Evidence 至少包含:用户批准与轻量合同、Lead、实施前/最终 checkpoint、实际路径、定向/回归/E2E 命令及环境、验收映射、未运行项、偏差、残余风险和提交授权状态。
861
867
 
868
+ 父实现 change 的 Implementation Orchestration Evidence 不能替代子 Evidence。它至少记录最终 Map revision、全部成员最终状态和子证据指针、dependency/serialization 实际顺序、跨 change 合同检查、aggregate 命令/环境/结果、stale candidate 处理、偏差和残余风险。任何成员未 completed 或整体验证未通过时不得形成父完成证据。
869
+
862
870
  </evidence-and-verification>
863
871
 
864
872
  <deviation-control>
@@ -886,6 +894,7 @@ Direct Spec Evidence 至少包含:用户批准与轻量合同、Lead、实施
886
894
  - 发现新的安全、数据、兼容、性能或迁移风险;
887
895
  - 依赖、合同或外部参考权威已变化;
888
896
  - 实际行为将与 Spec 或 ADR 不一致。
897
+ - 父 Implementation Map 的成员、组合 Ticket、dependency、serialization 或 revision 已与子状态、路径或 Git 事实不一致。
889
898
 
890
899
  ## 3. 偏差记录
891
900
 
@@ -906,9 +915,42 @@ Direct Spec Evidence 至少包含:用户批准与轻量合同、Lead、实施
906
915
  - 未批准的 ticket、spec、architecture 或 release 偏差不得继续实现。
907
916
  - 不得通过扩大 `writable_paths`、删除测试、降低断言或把风险改写成“已知限制”来绕过停止。
908
917
  - 偏差影响并行执行、source checkpoint 或 candidate 集成时,Lead 必须暂停受影响 Wave,重新计算路径所有权、依赖、Gate 与父分支顺序;任何 subagent 都不能自行改写上层合同。
918
+ - 偏差跨越多个成员时,父 Lead 先递增 Implementation Map revision,再重算 Implementation Plan;旧派单和 candidate 全部标记 stale。
909
919
 
910
920
  </deviation-control>
911
921
 
922
+ <parent-implementation-orchestration>
923
+
924
+ # Parent Implementation Orchestration
925
+
926
+ 本规则只约束 Ready Spec/Tickets 之后的跨 change 实现,供 O-orchestrate-implementation、I-implement 与 A-archive-and-consolidate 读取。
927
+
928
+ ## 输入边界
929
+
930
+ 父实现 change 只能在所有成员通过 Ready Spec/Tickets 输入门后创建。父 Work 不调用或代行 Triage、Grill、Wayfinder、Spec、Tickets 或普通 Goal Plan;输入不足时不留下父状态或父工件。
931
+
932
+ ## 权威边界
933
+
934
+ - 父 Implementation Map:成员、组合 Ticket inventory、跨 change dependency/serialization 与 revision 的唯一权威投影。
935
+ - 父 Implementation Plan:Lead、全局 workspace 策略、implementation agent/integration attempt 上限、frontier、Wave、locks 和 integration queue 的唯一权威。
936
+ - 子 change:自己的 Spec、Ticket、内部 Goal Gate、workspace、Git、Evidence 和完成状态的唯一权威。
937
+
938
+ 父工件不得复制完整子合同。子权威变化时停止旧派单、递增父 Map revision 并重算父 Plan;不能从旧父投影覆盖子工件。
939
+
940
+ ## 唯一所有权
941
+
942
+ 一个 active/blocked 子 change 最多属于一个未完成父实现 change。v1 不支持父实现 change 嵌套。父 Lead 是父工件、全部 SpecDev 状态写入、E2E、repository/ref integration queue 和父分支推进的唯一 owner;implementation agent 只写授权项目 workspace。
943
+
944
+ ## I-implement 调用
945
+
946
+ 父 Plan 可以替代缺失的子 Goal Plan 提供 workspace/integration 策略和全局执行边界。子 Goal Plan 存在时继续拥有子 change 内 Gate,但不得与父策略冲突。I-implement 完成或阻塞一个组合 Ticket 后返回父 O Work,不要求用户重新激活 change。
947
+
948
+ ## 归档与完成
949
+
950
+ 未完成父实现 change 的成员不得归档。成员满足普通 change completion 时可以先 completed,但不自动归档。父 change 只有全部成员 completed、Map/Plan completed、aggregate Evidence 完整且无 active dispatch/candidate/lock 后才能 completed;完成或归档均不自动级联。
951
+
952
+ </parent-implementation-orchestration>
953
+
912
954
  <research>
913
955
 
914
956
  # SpecDev Research
@@ -36,7 +36,7 @@ Wayfinder 默认进行**规划**:每个 Ticket 解决一个决策,当地图
36
36
  - 地图:`specdev/changes/{change}/wayfinder-map.md`
37
37
  - 子 Tickets:`specdev/changes/{change}/investigation/`
38
38
  - solution comments:`specdev/changes/{change}/investigation/comments/`
39
- - assignment registry:`specdev/status.json` 的 `claimed_investigations`
39
+ - assignment registry:`specdev/changes/{change}/.status.json` 的 `claimed_investigations`
40
40
 
41
41
  每次绘制或遍历前加载 下方 `<local-tracker-contract>` 标签。Ticket 和地图模板:
42
42
 
@@ -211,7 +211,7 @@ status: active
211
211
  | 子 issue | `specdev/changes/{change}/investigation/{investigation-id}.md` |
212
212
  | label | Ticket frontmatter 的 `wayfinder:research|prototype|grilling|task` |
213
213
  | 阻塞关系 | Ticket frontmatter 的 `blocked_by` |
214
- | assignment | `specdev/status.json` 当前 change 的 `claimed_investigations` |
214
+ | assignment | `specdev/changes/{change}/.status.json` 的 `claimed_investigations` |
215
215
  | solution comment | `specdev/changes/{change}/investigation/comments/{investigation-id}/NN-solution.md` |
216
216
  | 关闭 issue | Ticket frontmatter 的 `status: closed` 与 `resolution` |
217
217
 
@@ -227,9 +227,9 @@ status: active
227
227
 
228
228
  ## 原子领取
229
229
 
230
- 开始任何工作前,重读全局状态并原子写入 `id`、`owner`、可选 `session` 和 `claimed_at`。已领取则选择下一前沿 Ticket。写回结果前再次重读;完成、释放或取消时删除 claim。
230
+ 开始任何工作前,重读当前 change 状态并原子写入 `id`、`owner`、可选 `session` 和 `claimed_at`。已领取则选择下一前沿 Ticket。写回结果前再次重读;完成、释放或取消时删除 claim。
231
231
 
232
- Ticket 文件不重复保存 assignee,地图不重复保存 claim。全局 assignment registry 是领取的单一事实源。
232
+ Ticket 文件不重复保存 assignee,地图不重复保存 claim。change assignment registry 是领取的单一事实源。
233
233
 
234
234
  ## 解决方案评论
235
235
 
@@ -23,7 +23,7 @@ A 是 SpecDev 的归档 wrapper:它拥有模式选择、SpecDev 完成门和
23
23
  ## Archive 模式
24
24
 
25
25
  1. 读取全局/change 状态、Ticket、Map、Goal Plan、Evidence、ADR、CONTEXT、LOG、triage 和项目验证事实。
26
- 2. 加载 `<Path>{roots.workflows}/specdev/common/rules/change-completion.md</Path>`,确认 `change_status: completed`、完成 owner 已写入时间和证据、无 blocker/deviation
26
+ 2. 加载 `<Path>{roots.workflows}/specdev/common/rules/change-completion.md</Path>` 与 `<Path>{roots.workflows}/specdev/common/rules/parent-implementation-orchestration.md</Path>`,确认 `change_status: completed`、完成 owner 已写入时间和证据、无 blocker/deviation;若该 change 是未完成父实现 change 的成员则停止,若其自身是父实现 change 则还需所有成员与 aggregate Evidence 完成。
27
27
  3. 检查 `<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>` 的 `external_action`:`pending-close` 或 `close-failed` 返回 `<Path>{roots.workflows}/specdev/T-triage/T-triage.md</Path>`;只有 `closed | waived | not-applicable` 继续。
28
28
  4. 调用 `<Path>{roots.skills}/archive-and-consolidate/SKILL.md</Path>` 的 `archive-single + dry-run`,传入已解析 workflow/state/changes/archive/knowledge roots。展示完整移动、提升和清理计划。
29
29
  5. 只有用户明确批准该计划后调用 `confirmed`。移动、知识写入和清理均使用计划内路径;计划后出现 drift 时停止。
@@ -11,13 +11,15 @@ keywords: [实现, TDD, Lead, subagent, worktree, current workspace, direct-pare
11
11
 
12
12
  > 激活本 Work 后,先读取 `<Path>{roots.workflows}/specdev/README.md</Path>`,再执行本入口。
13
13
 
14
- 本 work 保留模块设计检查、design-it-twice、TDD 红绿循环、双轴审查和证据治理。Ticket 模式按 Goal Plan 的 `ticket_workspace_policy` 选择 current workspace 串行直接父分支或独立 worktree candidate-merge;Lead 根据实际情况自行实现或动态派单。
14
+ 本 work 保留模块设计检查、design-it-twice、TDD 红绿循环、双轴审查和证据治理。Ticket 模式按子 Goal Plan 或父 Implementation Plan 的 `ticket_workspace_policy` 选择 current workspace 串行直接父分支或独立 worktree candidate-merge;Lead 根据实际情况自行实现或动态派单。
15
+
16
+ 若当前 change 是未完成父 Implementation Map 的成员,必须读取 `<Path>{roots.workflows}/specdev/common/rules/parent-implementation-orchestration.md</Path>`、父 Map 与父 Plan。父 Plan 提供跨 change dependency/serialization、全局 workspace 策略、组合派单标识、implementation agent cap 和 integration queue;子 Goal Plan 只能增加子内 Gate,不能放宽或冲突。
15
17
 
16
18
  ## 执行模式
17
19
 
18
20
  ### Ticket 模式(默认)
19
21
 
20
- 读取 Ready Ticket、Tickets Map 和可选 Goal Plan。存在 Goal Plan 时使用其中的 Lead workspace 策略;没有 Goal Plan 时,当前主会话作为该 Ticket 的 Lead,并按 Direct Spec 规则执行,不推断 worktree 策略。`required` 模式每个 Ticket 建立独立 worktree;`current` 模式所有 Ticket 严格串行,使用当前分支和当前 workspace。
22
+ 读取 Ready Ticket、Tickets Map、可选子 Goal Plan 和可选父 Implementation Plan。存在父 Plan 时使用其 Lead、workspace/integration 策略和全局门,即使子 Goal Plan 不存在也可以执行;两者都存在时必须策略一致。没有父 Plan 时沿用子 Goal Plan;两者都不存在时,当前主会话作为该 Ticket 的 Lead,并按 Direct Spec 规则执行,不推断 worktree 策略。`required` 模式每个 Ticket 建立独立 worktree;`current` 模式所有受同一计划约束的 Ticket 严格串行,使用当前分支和当前 workspace。
21
23
 
22
24
  ### Direct Spec 模式
23
25
 
@@ -30,7 +32,7 @@ keywords: [实现, TDD, Lead, subagent, worktree, current workspace, direct-pare
30
32
  - 当前 Spec:`<Path>{roots.state}/specdev/changes/{change}/spec.md</Path>`
31
33
  - 项目配置:`<Path>{roots.state}/specdev/config.json</Path>`
32
34
 
33
- Ticket 模式还必须读取当前 Ticket `<Path>{roots.state}/specdev/changes/{change}/ticket/{ticket-file}.md</Path>` 与 `<Path>{roots.state}/specdev/changes/{change}/tickets-map.md</Path>`;存在 `<Path>{roots.state}/specdev/changes/{change}/goal-plan.md</Path>` 时必须读取。Direct Spec 模式必须读取用户对轻量执行合同和直接实现的明确批准。
35
+ Ticket 模式还必须读取当前 Ticket `<Path>{roots.state}/specdev/changes/{change}/ticket/{ticket-file}.md</Path>` 与 `<Path>{roots.state}/specdev/changes/{change}/tickets-map.md</Path>`;存在 `<Path>{roots.state}/specdev/changes/{change}/goal-plan.md</Path>` 时必须读取。若当前 change 被父 Implementation Map 声明,还必须读取该父 change 的 Map/Plan。Direct Spec 模式必须读取用户对轻量执行合同和直接实现的明确批准。
34
36
 
35
37
  按存在情况读取:
36
38
 
@@ -54,7 +56,7 @@ Git 已处于 merge/rebase 冲突时,先加载 `<Path>{roots.workflows}/specde
54
56
  Ticket 模式:
55
57
 
56
58
  1. 验证 Ready、依赖 Evidence、Spec/ADR/Goal Plan、一致性、路径 owner 和验证接缝;
57
- 2. 确认 Goal Plan schema v6(若存在)、Lead、动态 implementation/integration 上限与授权;
59
+ 2. 确认子 Goal Plan schema v6(若存在)与父 Implementation Plan schema v1(若存在)、唯一 Lead、workspace 策略、动态 implementation/integration 上限与授权;
58
60
  3. `required` 模式以 `purpose=ticket, operation=create|restore` 调用 `<Path>{roots.workflows}/specdev/common/skills/dev-worktree/SKILL.md</Path>`;`current` 模式读取当前 branch、HEAD、dirty 状态并确认没有其他 Ticket implementation writer;
59
61
  4. Lead 把 Ticket 设为 `in_progress`;`required` 模式将 change worktree 记录设为 `active`,`current` 模式建立 current workspace 执行记录;
60
62
  5. 当前代码使合同失效时停止并返回对应上游 owner。
@@ -67,7 +69,8 @@ Direct Spec 模式验证用户批准、轻量合同和 current workspace 唯一
67
69
 
68
70
  Ticket 模式下,Lead 根据 Ticket 独立性、路径冲突、上下文、风险和平台能力决定。派单时以 `operation=dispatch` 调用 `<Path>{roots.workflows}/specdev/common/skills/subagent-delivery/SKILL.md</Path>`。`current` 模式仍可派遣一个 implementation subagent 写当前 workspace,但必须等待其返回、Lead 验收并形成 commit 后才进入下一个 Ticket;`required` 模式 implementation subagent 绑定独立 Ticket worktree。Direct Spec 模式由 Lead 作为 current workspace 唯一写入 owner,不派遣 implementation subagent 写入。
69
71
 
70
- - implementation subagent 同时取 Goal Plan/config/平台能力的共同上限;current 模式保持单 writer 串行安全不变量;Lead 不计入;
72
+ - implementation subagent 同时取适用子 Goal Plan、父 Implementation Plan、config 和平台能力的共同上限;current 模式保持单 writer 串行安全不变量;Lead 不计入;
73
+ - 父实现编排存在时,派单与返回都使用 `<member-change>::<ticket-id>`,并占用父 Plan 的 task/serialization/integration slot;
71
74
  - review/research/test-observation agent 不设置 SpecDev 数字上限,但保持只读;
72
75
  - implementation Packet 按策略绑定唯一 Ticket workspace 或 current workspace、checkpoint、路径、非 E2E 检查与 commit 返回;
73
76
  - subagent 不写 SpecDev 工件、Evidence、父分支或 E2E 结果;
@@ -146,6 +149,8 @@ Ticket 正常状态:`ready → in_progress → review → done`。`required`
146
149
 
147
150
  按存在和当前模式同步 Ticket、Tickets Map、Goal Plan、`<Path>{roots.state}/specdev/changes/{change}/.status.json</Path>` 和全局状态;Direct Spec 不创建缺失的 Ticket/Map/Goal Plan。最后一个计划内 Ticket 完成后,Goal Plan 的 Lead 按 change completion 关闭;无 Goal Plan 的当前 I owner 承担同一门禁。需要远程 reconcile 时返回 T-triage,否则进入 Archive。
148
151
 
152
+ 当前 change 属于未完成父实现 change 时,单个组合 Ticket 的子状态与 Evidence 验证完成后必须自动返回 `<Path>{roots.workflows}/specdev/O-orchestrate-implementation/O-orchestrate-implementation.md</Path>`,由父 Lead 重读全部成员并继续下一 frontier;不得要求用户逐个重新激活,不得直接归档子 change,也不得从本 Work 实现另一个成员。
153
+
149
154
  运行:
150
155
 
151
156
  ```bash
@@ -14,6 +14,7 @@
14
14
  - [ ] current 模式 source 检查在 current workspace 且不宣称 E2E;required 模式 source 检查明确为非 E2E,required E2E 有 parent-candidate 场景与预期。
15
15
  - [ ] 验证命令/环境可用,关键静默失败风险有受控反向验证。
16
16
  - [ ] Deep Ticket 批准点已满足。
17
+ - [ ] 若属于父 Implementation Map:父 revision 与 Plan source revision 一致,组合 Ticket 在 tasks/frontier 中,dependency Gate 已满足,serialization lock 可用,派单未重复,workspace 策略一致,全部成员 active implementation 数未超过父上限。
17
18
 
18
19
  ## Direct Spec 硬检查
19
20
 
@@ -36,3 +37,4 @@
36
37
  - **delivery-unverified**:候选、provider 声明或附件不能独立核对;保持 unverified。
37
38
  - **e2e-owner-invalid**:required 模式 E2E 被安排在 source worktree,或任一模式不是 Lead owner;停止并修 Ticket/Goal Plan。
38
39
  - **direct-parent-invalid**:current 模式的 Ticket commit、父 HEAD、验证或 Evidence 不一致;保留最后可信 commit 并阻塞当前 Ticket。
40
+ - **parent-plan-stale**:父 Implementation Map revision、成员 Ticket、serialization、workspace 策略、全局实现配额或 repository/ref 已变化;停止当前派单并返回 O-orchestrate-implementation 重算。
@@ -0,0 +1,129 @@
1
+ ---
2
+ id: specdev/orchestrate-implementation
3
+ type: workflow-entry
4
+ workflow: specdev
5
+ name: 编排实现
6
+ description: 将两个或以上已完成 Ready Spec 与 Ready Tickets 的 change 编译为跨 change implementation super-DAG,并由单一 Lead 在一个会话中持续调度实现、验证和集成。
7
+ keywords: [实现编排, 父 change, super-DAG, Ticket, Lead, agent team, worktree, 冲突]
8
+ ---
9
+
10
+ # 编排实现
11
+
12
+ > 激活本 Work 后,先读取 `<Path>{roots.workflows}/specdev/README.md</Path>`,再执行本入口。
13
+
14
+ 本 Work 只编排实现。它不创建或补写子 change 的 Triage、Grill、Wayfinder、Spec、Ticket 或普通 Goal Plan。父 change 创建前,每个输入 change 都必须已有 Ready Spec、Tickets Map 和决策完备的 Ready Tickets;缺一项就停止并报告具体缺口。
15
+
16
+ 父 change 将所有子 Ticket 投影为 `<member-change>::<ticket-id>` 组合节点,以跨 change implementation super-DAG、全局 workspace 策略、serialization、agent 配额和 integration queue 持续驱动 I-implement。子 Spec/Ticket/Evidence/Git 继续是行为与实现权威,父工件只拥有跨 change 实现编排。
17
+
18
+ 父 change 的主产物是 `<Path>{roots.state}/specdev/changes/{change}/implementation-map.md</Path>` 与 `<Path>{roots.state}/specdev/changes/{change}/implementation-plan.md</Path>`;整体验证写入 `<Path>{roots.state}/specdev/changes/{change}/evidence/implementation-orchestration.md</Path>`。
19
+
20
+ ## 激活输入
21
+
22
+ 创建模式必须获得至少两个用户明确指定的 change。恢复模式由用户指定父 change,或从 active change 中唯一满足 `current_work=specdev/orchestrate-implementation` 且存在父实现产物者确定。
23
+
24
+ 创建父 change 前必须读取并验证:
25
+
26
+ - `<Path>{roots.state}/specdev/status.json</Path>` 与 `<Path>{roots.state}/specdev/config.json</Path>`;
27
+ - 每个成员的 `<Path>{roots.state}/specdev/changes/{member-change}/.status.json</Path>`;
28
+ - 每个成员的 `<Path>{roots.state}/specdev/changes/{member-change}/spec.md</Path>`;
29
+ - 每个成员的 `<Path>{roots.state}/specdev/changes/{member-change}/tickets-map.md</Path>`;
30
+ - 每个成员的 `<Path>{roots.state}/specdev/changes/{member-change}/ticket/</Path>`;
31
+ - 存在时读取子 Goal Plan、ADR、CONTEXT、LOG、Diagnosis 与 Evidence;
32
+ - 当前 repository、branch、HEAD、dirty 状态、项目 Agent 指令与可用验证命令。
33
+
34
+ 加载 `<Path>{roots.workflows}/specdev/O-orchestrate-implementation/input-readiness.md</Path>` 和 `<Path>{roots.workflows}/specdev/common/rules/parent-implementation-orchestration.md</Path>`。任何成员未实现就绪、已归档、等于父 change、属于另一个未完成父实现 change,或本身是父实现 change 时,不创建父 change。
35
+
36
+ ## 流程
37
+
38
+ ### 1. 先验证全部子 Change,再创建父 Change
39
+
40
+ 对每个成员穷尽检查 Ready Spec、Tickets Map、Ticket frontmatter、合同覆盖、内部 DAG、路径所有权、验证矩阵和高影响未知项。部分 Ticket 可以已经 done/cancelled;其余待实现 Ticket 必须 `ready: true` 且处于可执行状态。全部 Ticket 已终态的成员只作为 satisfied baseline,不占执行 frontier。
41
+
42
+ 只有所有成员通过输入门后,才从 change status 模板创建普通父 change,在全局 `active` 添加仅含 `change` 的索引,把父 `current_work` 设置为 `specdev/orchestrate-implementation`,再写父 Map/Plan。任何预检失败都不得留下半创建父 change。
43
+
44
+ **完成标准**:父创建是 all-or-nothing;输入成员不少于两个;没有用父 Work 修补任何上游工件。
45
+
46
+ ### 2. 编译 Implementation Super-DAG
47
+
48
+ 加载 `<Path>{roots.workflows}/specdev/O-orchestrate-implementation/super-dag.md</Path>` 与 `<Path>{roots.workflows}/specdev/O-orchestrate-implementation/conflict-and-drift.md</Path>`。
49
+
50
+ 1. 将每个子 Ticket 映射为唯一组合节点;
51
+ 2. 将所有子 Ticket `blocked_by` 精确提升为组合 dependency;
52
+ 3. 只为真实合同/产物前置关系增加跨 change dependency;
53
+ 4. 为无语义依赖但不能并发的 Ticket 增加无方向 serialization pair;
54
+ 5. 比较所有待实现 Ticket 的 writable/shared paths、公共合同、repository/ref 和迁移资源;
55
+ 6. 检测循环、缺失节点、重复边、无 owner overlap 和子图漂移。
56
+
57
+ 使用 `<Path>{roots.workflows}/specdev/O-orchestrate-implementation/implementation-map-template.md</Path>` 写父 Map。Map 是子 Ticket 图的可重算投影;子 Ticket 变化时先重读权威,再递增 Map revision。
58
+
59
+ **完成标准**:父 Map 的 members/tasks/internal edges 与全部子工件精确一致;跨 change 边有来源;DAG 无环;每个并行冲突已依赖化、串行化或阻塞。
60
+
61
+ ### 3. 一次决定全局执行策略
62
+
63
+ 只询问一次是否开启 Ticket worktree,默认不开启,并把选择写入父 Plan:
64
+
65
+ - `current/direct-parent`:全部成员的待实现 Ticket 全局严格串行,只允许一个 current workspace implementation writer;
66
+ - `required/candidate-merge`:依赖满足且无 serialization/path/resource 冲突的 Tickets 可跨 change 并行,每个 Ticket 使用自己的 source worktree。
67
+
68
+ 从 config 读取 implementation agent 与 integration attempt 上限,父 Plan 可以降低但不能提高。Lead 不计入实现 agent 数;review/research/test-observation agents 只读且不受该数字限制。同一 repository/ref 的 integration 永远串行。
69
+
70
+ 使用 `<Path>{roots.workflows}/specdev/O-orchestrate-implementation/implementation-plan-template.md</Path>` 写父 Plan。已有子 Goal Plan 只提供子 change 内的额外 Gate/约束;其 workspace 策略与父 Plan 冲突时阻塞,不能覆盖父级全局选择。
71
+
72
+ Implementation Plan 固定使用 `orchestration: lead-directed`,并显式持久化 `implementation_agent_limit`、`integration_attempt_limit`、workspace/integration 策略和唯一 Lead;恢复时不得从会话记忆重建这些值。
73
+
74
+ **完成标准**:Lead、workspace/integration 策略、全局 agent 上限、frontier、Wave、serialization owner 和 integration queue 可从父 Plan 恢复。
75
+
76
+ ### 4. 在一个会话中持续执行
77
+
78
+ 加载 `<Path>{roots.workflows}/specdev/O-orchestrate-implementation/execution-loop.md</Path>`。父 Lead 自动循环,不要求用户逐个激活子 change:
79
+
80
+ 1. 重读父 Map/Plan、所有子 Ticket/status 和 Git;
81
+ 2. 计算依赖满足、lock 可用且配额允许的 ready frontier;
82
+ 3. current 模式选择一个 Ticket,required 模式选择一组互不冲突的 Tickets;
83
+ 4. 将子 `current_work` 设置为 `specdev/implement`,按组合 ID 调用 I-implement;
84
+ 5. implementation agent 仅写授权 workspace,Lead 验收 commit/diff/验证/Evidence;
85
+ 6. 按 repository/ref queue 串行完成 direct-parent 或 candidate integration;
86
+ 7. 先原子提交子 Ticket/change 状态,再更新父 Plan 投影;
87
+ 8. 父 HEAD、Map revision 或子合同变化后使旧 dispatch/candidate stale,并重新 preflight;
88
+ 9. 仍有 frontier 时立即进入下一轮,否则完成或持久化 blocker。
89
+
90
+ I-implement 是实际实现 owner;父 Work 不复制 TDD、代码审查、Evidence 或 worktree 逻辑。用户只在合同冲突、高影响偏差、缺失授权、不可逆动作或无合法 frontier 时被打断。
91
+
92
+ **完成标准**:单次父激活可以连续完成多个子 Ticket;没有第二个 SpecDev 状态 writer、超限 agent、并发 parent integration 或绕过子 I-implement 完成门。
93
+
94
+ ### 5. 关闭子 Changes 与父 Change
95
+
96
+ 一个成员的全部计划内 Ticket done/cancelled 且其 Goal/Evidence/Git 门通过时,父 Lead 按 change completion 关闭该子 change;不等待其他成员才关闭,也不自动归档。
97
+
98
+ 全部成员 completed 后,Lead 运行跨 change aggregate test/typecheck/lint/build 与适用 E2E,核对跨 change 合同、依赖顺序、共享路径、迁移/恢复和最终 Git checkpoint,并使用 `<Path>{roots.workflows}/specdev/O-orchestrate-implementation/implementation-evidence-template.md</Path>` 写整体验证。
99
+
100
+ 只有父 Map/Plan completed、全部成员 completed、无 blocker/deviation/active dispatch/candidate/lock 且整体验证通过时,才清空父 `current_work`、去重加入 `specdev/orchestrate-implementation` 到 `works_run` 并关闭父 change。归档、push、PR、remote merge、deploy 和生产迁移保持独立授权。
101
+
102
+ 运行:
103
+
104
+ ```bash
105
+ node <Path>{roots.workflows}/specdev/common/tools/validate-specdev.mjs</Path> \
106
+ --stage orchestrate-implementation \
107
+ <Path>{roots.state}/specdev/changes/{change}</Path>
108
+ ```
109
+
110
+ ## 完成标准
111
+
112
+ - 父 change 只接受 Spec/Tickets 已 Ready 的成员;
113
+ - Implementation Map/Plan 可恢复完整组合 DAG、全局策略、frontier 和 integration queue;
114
+ - 子工件保持权威,父投影与子 Ticket 精确一致;
115
+ - current 全局串行,required 只并行无冲突 Ticket,全部实现受父级 agent cap 约束;
116
+ - I-implement 自动回到父循环,全部子 change 和父 change completed;
117
+ - aggregate Evidence 与 validator 通过;
118
+ - 无未经授权的归档、远程 Git、部署或生产副作用。
119
+
120
+ ## 子文件引用
121
+
122
+ - 输入就绪门:`<Path>{roots.workflows}/specdev/O-orchestrate-implementation/input-readiness.md</Path>`
123
+ - Super-DAG:`<Path>{roots.workflows}/specdev/O-orchestrate-implementation/super-dag.md</Path>`
124
+ - 执行循环:`<Path>{roots.workflows}/specdev/O-orchestrate-implementation/execution-loop.md</Path>`
125
+ - 冲突与漂移:`<Path>{roots.workflows}/specdev/O-orchestrate-implementation/conflict-and-drift.md</Path>`
126
+ - Map 模板:`<Path>{roots.workflows}/specdev/O-orchestrate-implementation/implementation-map-template.md</Path>`
127
+ - Plan 模板:`<Path>{roots.workflows}/specdev/O-orchestrate-implementation/implementation-plan-template.md</Path>`
128
+ - Evidence 模板:`<Path>{roots.workflows}/specdev/O-orchestrate-implementation/implementation-evidence-template.md</Path>`
129
+ - 共享规则:`<Path>{roots.workflows}/specdev/common/rules/parent-implementation-orchestration.md</Path>`
@@ -0,0 +1,18 @@
1
+ # Implementation Conflict and Drift
2
+
3
+ ## 冲突分类
4
+
5
+ 1. **真实依赖**:加入 dependency,前置 Ticket 完成前不启动后置 Ticket。
6
+ 2. **资源冲突**:加入 serialization,记录唯一 owner 与释放条件,不改变产品语义。
7
+ 3. **合同冲突**:行为、公共接口、数据、安全、范围或验收不一致;阻塞父 Plan,返回子 ADR/Spec/用户 owner。
8
+ 4. **基线漂移**:Ticket、Map revision、branch、HEAD、workspace 或 candidate 变化;废弃旧 dispatch/candidate,基于最新事实重新 preflight。
9
+
10
+ ## 路径与共享合同
11
+
12
+ 比较所有非终态 Ticket 的 writable/shared paths。无传递 dependency 的 overlap 必须有父 serialization;若两边 Ticket 的路径 owner 自身不合法,先阻塞并返回原 Ticket owner,父 Map 不能替它补 owner。
13
+
14
+ 同一共享 API/schema/锁文件/迁移索引即使路径预测不重叠,也必须根据实际消费者和集成事实决定 dependency 或 serialization。
15
+
16
+ ## 集成冲突
17
+
18
+ 同一 repository/ref 的 direct-parent/candidate integration 严格串行。一次父 HEAD 推进后,其他 candidate 全部 stale;必须在最新父状态重新组合并重跑要求的 full suite/E2E。需要新行为或上层决定的 merge conflict 立即停止。
@@ -0,0 +1,30 @@
1
+ # Continuous Implementation Loop
2
+
3
+ ## 每轮固定顺序
4
+
5
+ 1. 重读父 status、Map、Plan、成员 status/Tickets 和 repository;
6
+ 2. 校验 Map revision、Plan source revision、Lead epoch、授权、active dispatch、workspace 与 integration queue;
7
+ 3. 重建 super-DAG 并计算 ready frontier;
8
+ 4. 根据 current/required 策略选择本轮节点;
9
+ 5. 为每个节点形成不可变 Dispatch Packet,task ID 使用组合身份;
10
+ 6. 调用 I-implement 完成设计检查、TDD、commit、双轴审查、验证和 Evidence;
11
+ 7. Lead 独立验收返回事实并按 repository/ref 串行集成;
12
+ 8. 先写子 Ticket/Map/Evidence/change status,再写父 Plan 进度;
13
+ 9. 重读实际 Git 和全部受影响工件,运行 validator;
14
+ 10. 有 frontier 则继续,无 frontier 则完成或持久化 blocker。
15
+
16
+ ## 唯一写入者
17
+
18
+ 父 Lead 是全部 SpecDev 工件、E2E、integration queue 和父分支推进的唯一 owner。Implementation agent 在 current 模式写唯一当前 workspace,或在 required 模式写绑定 Ticket 的 source worktree;不得写父/子状态、Evidence、其他成员或父分支。
19
+
20
+ ## 自动继续边界
21
+
22
+ 子 Ticket 正常完成、candidate stale 后可机械重建、已批准的局部实现修正和下一 frontier 选择不再次询问用户。以下情况停止:
23
+
24
+ - 高影响合同、范围、架构、数据、安全、迁移或验收需要新决定;
25
+ - implementation commit、integration 或不可逆动作缺少授权;
26
+ - dependency/serialization/path owner 无法由权威事实裁决;
27
+ - 连续集成尝试达到父 Plan 上限;
28
+ - 无合法 frontier 但仍有非终态 Ticket。
29
+
30
+ 停止时父 Plan 保存最后 accepted 节点、active/stale dispatch、Git checkpoint、blocker、owner、下一合法动作和恢复重读清单。
@@ -0,0 +1,39 @@
1
+ # Implementation Orchestration Evidence
2
+
3
+ ## 1. Parent Plan and Final Revision
4
+
5
+ - Parent change:
6
+ - Final Implementation Map revision:
7
+ - Workspace/integration strategy:
8
+ - Lead and epoch:
9
+
10
+ ## 2. Member and Ticket Completion
11
+
12
+ | Change | Composite Tickets | Final status | Child Evidence | Final Git result |
13
+ |---|---|---|---|---|
14
+
15
+ ## 3. Dependency and Serialization Audit
16
+
17
+ | Edge or pair | Required order/lock | Observed execution | Evidence |
18
+ |---|---|---|---|
19
+
20
+ ## 4. Repository Integration Audit
21
+
22
+ | Repository/ref | Ordered results | Stale candidates | Final checkpoint | Evidence |
23
+ |---|---|---|---|---|
24
+
25
+ ## 5. Aggregate Verification
26
+
27
+ | Command/check | Environment | Exit/result | Evidence |
28
+ |---|---|---|---|
29
+
30
+ ## 6. Contract, Drift and Deviation Audit
31
+
32
+ - Cross-change contracts:
33
+ - Map/child drift disposition:
34
+ - Deviations/blockers:
35
+
36
+ ## 7. Residual Risk and Boundary
37
+
38
+ - Residual risk:
39
+ - Not performed: archive, push, PR, remote merge, deploy, production migration unless separately authorized.
@@ -0,0 +1,50 @@
1
+ ---
2
+ schema_version: 1
3
+ artifact: implementation-map
4
+ change: <YYYY-MM-DD-parent-topic>
5
+ status: ready
6
+ revision: 1
7
+ members: [<child-change-a>, <child-change-b>]
8
+ tasks: [<child-change-a>::T-01, <child-change-b>::T-01]
9
+ dependencies: []
10
+ serializations: []
11
+ ---
12
+
13
+ # Implementation Map: <Outcome>
14
+
15
+ ## 1. Members and Source Authority
16
+
17
+ | Change | Spec | Tickets Map | Change status | Role |
18
+ |---|---|---|---|---|
19
+ | `<child-change-a>` | ready | ready | active | delivery |
20
+ | `<child-change-b>` | ready | ready | active | delivery |
21
+
22
+ ## 2. Composite Ticket Inventory
23
+
24
+ | Composite ID | Child Ticket | Status | Ready | Writable/shared summary | Contracts |
25
+ |---|---|---|---|---|---|
26
+ | `<child-change-a>::T-01` | T-01 | ready | yes | pending | pending |
27
+ | `<child-change-b>::T-01` | T-01 | ready | yes | pending | pending |
28
+
29
+ ## 3. Implementation Super-DAG
30
+
31
+ | Edge | Kind | Source and reason | Start Gate | Evidence |
32
+ |---|---|---|---|---|
33
+ | none | none | independent until proven otherwise | n/a | n/a |
34
+
35
+ ## 4. Conflict and Serialization
36
+
37
+ | Pair | Resource or overlap | Owner | Release condition |
38
+ |---|---|---|---|
39
+ | none | none observed | n/a | n/a |
40
+
41
+ ## 5. Contract and Path Coverage
42
+
43
+ | Contract/shared surface | Producer task | Consumer tasks | Ordering/lock | Verification |
44
+ |---|---|---|---|---|
45
+
46
+ ## 6. Revision Log
47
+
48
+ | Revision | Source change | Affected tasks/edges | Reason |
49
+ |---|---|---|---|
50
+ | 1 | initial Ready inputs | all | parent creation |
@@ -0,0 +1,61 @@
1
+ ---
2
+ schema_version: 1
3
+ artifact: implementation-plan
4
+ change: <YYYY-MM-DD-parent-topic>
5
+ status: ready
6
+ source_map_revision: 1
7
+ orchestration: lead-directed
8
+ lead: <owner-or-session-locator>
9
+ implementation_agent_limit: 3
10
+ integration_attempt_limit: 3
11
+ ticket_workspace_policy: current
12
+ integration_gate: direct-parent
13
+ ready_for_execution: true
14
+ ---
15
+
16
+ # Implementation Plan: <Outcome>
17
+
18
+ ## 1. Outcome and Authority
19
+
20
+ - Outcome: <aggregate implementation outcome>
21
+ - Lead: <recoverable owner/session locator>
22
+ - False completion: <what must not be called done>
23
+ - Authority: child Spec/Tickets for behavior and implementation; parent Map/Plan for cross-change execution only.
24
+
25
+ ## 2. Ready Frontier and Waves
26
+
27
+ | Wave | Composite tasks | Dependency Gate | Serialization/resource Gate | Status |
28
+ |---|---|---|---|---|
29
+ | 1 | pending | dependencies satisfied | locks available | ready |
30
+
31
+ ## 3. Workspace and Dispatch Contract
32
+
33
+ - Ticket workspace policy: current / required.
34
+ - Dispatch IDs use `<member-change>::<ticket-id>`.
35
+ - The implementation agent limit is global across all members; the Lead is not counted.
36
+ - Read-only review/research/test-observation agents do not consume the implementation limit.
37
+
38
+ ## 4. Repository Integration Queue
39
+
40
+ | Repository/ref | Ordered composite tasks | Current parent checkpoint | Active candidate | Owner |
41
+ |---|---|---|---|---|
42
+ | current repository/current ref | pending | pending-read | none | Lead |
43
+
44
+ ## 5. Gates and Aggregate Verification
45
+
46
+ | Gate | Required tasks | Verification | Evidence | Status |
47
+ |---|---|---|---|---|
48
+ | child completion | all child Tickets | child completion contract | child Evidence | pending |
49
+ | aggregate | all members completed | full suite and applicable E2E | parent Evidence | pending |
50
+
51
+ ## 6. Conflict, Drift and Recovery
52
+
53
+ - Re-read Map revision, Lead epoch, child Tickets, Git HEAD, active dispatches and locks before every action.
54
+ - Any parent advance makes older candidates stale and requires reconstruction.
55
+ - On pause, persist last accepted task, stale candidates, blockers, next legal task and required reads.
56
+
57
+ ## 7. Progress and Decisions
58
+
59
+ | Time | Composite task | Dispatch/result | Child Evidence | Parent checkpoint | Next recomputation |
60
+ |---|---|---|---|---|---|
61
+ | pending | none | not started | none | pending-read | compute frontier |
@@ -0,0 +1,25 @@
1
+ # Implementation Input Readiness
2
+
3
+ ## 创建前硬门
4
+
5
+ 对每个用户指定成员穷尽检查:
6
+
7
+ 1. change 位于 active namespace,状态不是 archived,且没有另一个未完成父实现 owner;
8
+ 2. Ready Spec 使用当前 schema,`status: ready` 且 `ready_for_tickets: true`;
9
+ 3. Tickets Map 使用当前 schema,状态为 ready、in_progress 或 completed;
10
+ 4. Ticket 目录非空,Ticket ID/文件名唯一,全部内部 dependency 可解析且无环;
11
+ 5. 每个非终态 Ticket 决策完备、`ready: true`、路径/验证/验收完整,状态为 ready;
12
+ 6. done Ticket 有 Evidence 与完成 workspace 记录,cancelled Ticket 有权威理由;
13
+ 7. Spec 合同全部 covered 或有用户批准的 deferred;
14
+ 8. 没有未裁决的行为、接口、数据、兼容、安全、范围、迁移或验收问题;
15
+ 9. 当前代码与 Ticket 的入口、路径和验证接缝没有已知漂移。
16
+
17
+ 任一成员失败时,返回按 change 分组的缺口和真正 owning Work,不创建父目录、全局 active entry、Map 或 Plan。父 Work 不调用这些 owning Works。
18
+
19
+ ## 恢复状态
20
+
21
+ 父 change 创建后,Ticket 可以进入 in_progress、review、done、cancelled,或因执行事实进入 blocked/deviated。blocked/deviated 必须让父 Plan 同步为 blocked 并记录恢复 owner;这不是放宽创建前 Ready 门。
22
+
23
+ ## 已完成成员
24
+
25
+ 全部 Ticket 已 done/cancelled 且 change 已 completed 的成员可以作为 satisfied baseline,参与 dependency 判断但不进入 frontier或占用 agent 配额。用户只选择已完成成员且没有待实现 Ticket 时停止,因为不存在实现编排目标。