create-yss-spec 3.1.3 → 3.2.0

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 (206) hide show
  1. package/README.md +5 -1
  2. package/package.json +1 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
  4. package/template/.agents/skills/yss-domain/SKILL.md +3 -3
  5. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  6. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  7. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +10 -2
  8. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +8 -1
  9. package/template/.agents/skills/yss-mvc-design/SKILL.md +16 -0
  10. package/template/.agents/skills/yss-mvc-design/agents/openai.yaml +4 -0
  11. package/template/.agents/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  12. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +2 -2
  13. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  14. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  15. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  16. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
  17. package/template/.agents/skills/yss-tactical-design/SKILL.md +2 -2
  18. package/template/.agents/skills/yss-tactical-design/references/output-template.md +2 -0
  19. package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  20. package/template/.agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  21. package/template/.agents/skills/yss-technical-design/SKILL.md +31 -0
  22. package/template/.agents/skills/yss-technical-design/agents/openai.yaml +4 -0
  23. package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  24. package/template/.agents/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  25. package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  26. package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  27. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  28. package/template/.agents/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  29. package/template/.agents/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  30. package/template/.claude/skills/yss-domain/SKILL.md +3 -3
  31. package/template/.claude/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  32. package/template/.claude/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  33. package/template/.claude/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +10 -2
  34. package/template/.claude/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +8 -1
  35. package/template/.claude/skills/yss-mvc-design/SKILL.md +16 -0
  36. package/template/.claude/skills/yss-mvc-design/agents/openai.yaml +4 -0
  37. package/template/.claude/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  38. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +2 -2
  39. package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  40. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  41. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  42. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +1 -1
  43. package/template/.claude/skills/yss-tactical-design/SKILL.md +2 -2
  44. package/template/.claude/skills/yss-tactical-design/references/output-template.md +2 -0
  45. package/template/.claude/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  46. package/template/.claude/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  47. package/template/.claude/skills/yss-technical-design/SKILL.md +31 -0
  48. package/template/.claude/skills/yss-technical-design/agents/openai.yaml +4 -0
  49. package/template/.claude/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  50. package/template/.claude/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  51. package/template/.claude/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  52. package/template/.claude/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  53. package/template/.claude/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  54. package/template/.claude/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  55. package/template/.claude/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  56. package/template/.codex/skills/yss-domain/SKILL.md +3 -3
  57. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  58. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  59. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +10 -2
  60. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +8 -1
  61. package/template/.codex/skills/yss-mvc-design/SKILL.md +16 -0
  62. package/template/.codex/skills/yss-mvc-design/agents/openai.yaml +4 -0
  63. package/template/.codex/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  64. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +2 -2
  65. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  66. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  67. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  68. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
  69. package/template/.codex/skills/yss-tactical-design/SKILL.md +2 -2
  70. package/template/.codex/skills/yss-tactical-design/references/output-template.md +2 -0
  71. package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  72. package/template/.codex/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  73. package/template/.codex/skills/yss-technical-design/SKILL.md +31 -0
  74. package/template/.codex/skills/yss-technical-design/agents/openai.yaml +4 -0
  75. package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  76. package/template/.codex/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  77. package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  78. package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  79. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  80. package/template/.codex/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  81. package/template/.codex/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  82. package/template/.cursor/skills/yss-domain/SKILL.md +3 -3
  83. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  84. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  85. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +10 -2
  86. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +8 -1
  87. package/template/.cursor/skills/yss-mvc-design/SKILL.md +16 -0
  88. package/template/.cursor/skills/yss-mvc-design/agents/openai.yaml +4 -0
  89. package/template/.cursor/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  90. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +2 -2
  91. package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  92. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  93. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  94. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
  95. package/template/.cursor/skills/yss-tactical-design/SKILL.md +2 -2
  96. package/template/.cursor/skills/yss-tactical-design/references/output-template.md +2 -0
  97. package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  98. package/template/.cursor/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  99. package/template/.cursor/skills/yss-technical-design/SKILL.md +31 -0
  100. package/template/.cursor/skills/yss-technical-design/agents/openai.yaml +4 -0
  101. package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  102. package/template/.cursor/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  103. package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  104. package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  105. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  106. package/template/.cursor/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  107. package/template/.cursor/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  108. package/template/.pi/skills/yss-domain/SKILL.md +3 -3
  109. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  110. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  111. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +10 -2
  112. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +8 -1
  113. package/template/.pi/skills/yss-mvc-design/SKILL.md +16 -0
  114. package/template/.pi/skills/yss-mvc-design/agents/openai.yaml +4 -0
  115. package/template/.pi/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  116. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +2 -2
  117. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  118. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  119. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  120. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
  121. package/template/.pi/skills/yss-tactical-design/SKILL.md +2 -2
  122. package/template/.pi/skills/yss-tactical-design/references/output-template.md +2 -0
  123. package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  124. package/template/.pi/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  125. package/template/.pi/skills/yss-technical-design/SKILL.md +31 -0
  126. package/template/.pi/skills/yss-technical-design/agents/openai.yaml +4 -0
  127. package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  128. package/template/.pi/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  129. package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  130. package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  131. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  132. package/template/.pi/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  133. package/template/.pi/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  134. package/template/.qoder/skills/yss-domain/SKILL.md +3 -3
  135. package/template/.qoder/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  136. package/template/.qoder/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  137. package/template/.qoder/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +10 -2
  138. package/template/.qoder/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +8 -1
  139. package/template/.qoder/skills/yss-mvc-design/SKILL.md +16 -0
  140. package/template/.qoder/skills/yss-mvc-design/agents/openai.yaml +4 -0
  141. package/template/.qoder/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  142. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +2 -2
  143. package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  144. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  145. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  146. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +1 -1
  147. package/template/.qoder/skills/yss-tactical-design/SKILL.md +2 -2
  148. package/template/.qoder/skills/yss-tactical-design/references/output-template.md +2 -0
  149. package/template/.qoder/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  150. package/template/.qoder/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  151. package/template/.qoder/skills/yss-technical-design/SKILL.md +31 -0
  152. package/template/.qoder/skills/yss-technical-design/agents/openai.yaml +4 -0
  153. package/template/.qoder/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  154. package/template/.qoder/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  155. package/template/.qoder/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  156. package/template/.qoder/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  157. package/template/.qoder/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  158. package/template/.qoder/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  159. package/template/.qoder/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  160. package/template/.trae/skills/yss-domain/SKILL.md +3 -3
  161. package/template/.trae/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  162. package/template/.trae/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  163. package/template/.trae/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +10 -2
  164. package/template/.trae/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +8 -1
  165. package/template/.trae/skills/yss-mvc-design/SKILL.md +16 -0
  166. package/template/.trae/skills/yss-mvc-design/agents/openai.yaml +4 -0
  167. package/template/.trae/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  168. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +2 -2
  169. package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  170. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  171. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  172. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +1 -1
  173. package/template/.trae/skills/yss-tactical-design/SKILL.md +2 -2
  174. package/template/.trae/skills/yss-tactical-design/references/output-template.md +2 -0
  175. package/template/.trae/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  176. package/template/.trae/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  177. package/template/.trae/skills/yss-technical-design/SKILL.md +31 -0
  178. package/template/.trae/skills/yss-technical-design/agents/openai.yaml +4 -0
  179. package/template/.trae/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  180. package/template/.trae/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  181. package/template/.trae/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  182. package/template/.trae/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  183. package/template/.trae/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  184. package/template/.trae/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  185. package/template/.trae/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  186. package/template/CONTEXT.md +2 -1
  187. package/template/docs/agents/digital-human-roles.yaml +2 -2
  188. package/template/docs/agents/yss-skill-registry.yaml +20 -1
  189. package/template/docs/architecture/templates/architecture-review-checklist.md +1 -1
  190. package/template/docs/architecture/templates/system-overview-design-template.md +15 -4
  191. package/template/docs/process/lifecycle-artifact-map.md +2 -0
  192. package/template/docs/process/lifecycle-registry-baseline.json +3 -1
  193. package/template/docs/process/lifecycle-registry.yaml +9 -2
  194. package/template/docs/process/schemas/strategic-design-handoff.schema.json +77 -4
  195. package/template/docs/process/strategic-handoff-package.md +4 -2
  196. package/template/docs/process/template-verification-profiles.yaml +14 -0
  197. package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +7 -6
  198. package/template/scripts/fixtures/strategic-handoff/fixture.mjs +3 -2
  199. package/template/scripts/lib/implementation-contract-compiler.mjs +8 -1
  200. package/template/scripts/lib/strategic-handoff-consumption.mjs +4 -4
  201. package/template/scripts/lib/strategic-handoff-design-targets.mjs +15 -0
  202. package/template/scripts/lib/technical-design-boundary.mjs +23 -0
  203. package/template/scripts/sync-strategic-handoff-tools +3 -2
  204. package/template/scripts/verify-strategic-handoff-package-scenarios +7 -1
  205. package/template/skills-lock.json +41 -11
  206. package/template.snapshot.json +4 -4
package/README.md CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  用于初始化、接管已有项目并持续同步 `yss-spec-project-template` 研发管理资产的 npm CLI。
4
4
 
5
- 源码候选版本:`3.1.2`。当前固定模板为 `yss-spec-project-template@017925706a981aec9eadefd470232bb531acd4d6`;CLI 运行时不会拉取模板仓库。`npm create yss-spec@latest` 获取的是实际已发布 npm 包,发布版本请以 `npm view create-yss-spec version` 为准。
5
+ 源码候选版本:`3.2.0`。当前固定模板为 `yss-spec-project-template@0347a5f6d100791cf012ef0f4ae3e148eece644a`;CLI 运行时不会拉取模板仓库。`npm create yss-spec@latest` 获取的是实际已发布 npm 包,发布版本请以 `npm view create-yss-spec version` 为准。
6
+
7
+ ## 本版模板能力
8
+
9
+ 技术设计统一通过 `yss-technical-design` 进入,按已确认架构调用 DDD `yss-tactical-design` 或传统 MVC `yss-mvc-design`。新合同使用 v2,旧 DDD 合同显式兼容读取;初始化和同步会分发对应技能、Schema 与校验工具。版本升级只完成 GitHub 源码交付,npm 发布状态仍以 registry 为准。
6
10
 
7
11
  ## 快速开始
8
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-yss-spec",
3
- "version": "3.1.3",
3
+ "version": "3.2.0",
4
4
  "description": "Initialize a YSS spec project template repository",
5
5
  "main": "src/api/index.js",
6
6
  "repository": {
@@ -3,7 +3,7 @@
3
3
  "source": "iloveZzz/yss-harness-design-agent",
4
4
  "source_type": "git-submodule",
5
5
  "source_root": ".agents/skills",
6
- "source_revision": "5c1c98225bb181c7c1add8972c1e44b866205f76",
6
+ "source_revision": "8a67e0f5a56aa5085d18c2b42bb540c8f36c2fab",
7
7
  "adaptation_ref": "docs/agents/strategic-design-skills-integration.md",
8
8
  "skills": [
9
9
  {
@@ -5,7 +5,7 @@ description: 用于构建或重构 YSS 领域层代码。当用户要求设计
5
5
 
6
6
  # yss-domain
7
7
 
8
- 这是一个领域实现 skill。核心目标是消费已批准的战术模型,将领域行为落实为代码;战术模型的设计与批准由 `yss-tactical-design` 和 `yss-product-lifecycle` 负责。
8
+ 这是一个领域实现 skill。核心目标是消费已批准的战术模型,将领域行为落实为代码;`yss-technical-design` 组织 DDD 分支,由 `yss-tactical-design` 设计、`yss-product-lifecycle` 维护批准。
9
9
 
10
10
  本 skill 在新脚手架链路只支持 `domain-driven` / `target-domain-model`。`layered-mvc-service` 与 `mvc-data-analysis-v1` 是独立 MVC Profile,不是失败的 DDD 工程;它们不加载本 skill,也不生成 Domain Gateway。既有旧架构不在本链路内迁移。
11
11
 
@@ -23,7 +23,7 @@ description: 用于构建或重构 YSS 领域层代码。当用户要求设计
23
23
 
24
24
  ## 工作方式
25
25
 
26
- 1. 先读取批准且版本当前的 tactical-design contract 和 Slice Implementation Contract。
26
+ 1. 先读取批准且版本当前的 Technical Design Contract 的 DDD `design` 分支和 Slice Implementation Contract;旧 v1 tactical-design contract 只按 DDD 显式兼容读取。
27
27
  2. 数据库字段只做补充,不直接决定领域对象结构。
28
28
  3. 按合同实现领域行为、状态机、不变量和 Gateway 边界。
29
29
  4. 规则不清晰或模型需要扩展时,返回 `new_impacts` / `drift` 并停止,不要静默猜测。
@@ -64,7 +64,7 @@ description: 用于构建或重构 YSS 领域层代码。当用户要求设计
64
64
  ## 阶段 7 合同
65
65
 
66
66
  - 只消费生命周期已批准的 `Slice Implementation Contract` 和当前 `work_unit`;不得扩大 `allowed_write_paths`。
67
- - `Slice Implementation Contract` 必须引用批准且版本当前的 `tactical_design_ref`;不得在实现阶段重新批准或替换聚合、不变量和一致性策略。
67
+ - `Slice Implementation Contract` 必须引用批准且版本当前的 `technical_design` 绑定(旧 DDD 显式兼容 `tactical_design_ref`);不得在实现阶段重新批准或替换聚合、不变量和一致性策略。
68
68
  - 领域规则、状态机和不变量必须使用 `behavior-tdd`,先形成失败测试,再实现最小行为。
69
69
  - 完成后按 `yss-implementation-contract-compiler/references/yss-skill-execution-result.md` 返回统一 `YSS Skill Execution Result`:changed files、领域/测试证据、实际验证结果、偏离和新增影响。
70
70
  - 发现新 API、权限、状态机、数据模型或架构影响时填入 `new_impacts` 并暂停,不得静默扩张切片。
@@ -33,7 +33,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
33
33
  - `required_capabilities` 与 `required_skills` 必须同时冻结;Registry 或编译器摘要变化后合同立即 `stale`,重新编译后仍须交生命周期重新批准。
34
34
  - UI 影响缺少正式原型确认、批准且 digest 当前的 Visual Baseline manifest 或当前切片 `case_id` 时,不得路由页面实现。模型必须先读 manifest 与语义引用,再查看对应 PNG;禁止目录 glob 和图片独立猜义。
35
35
  - Repository/数据模型影响缺少数据架构时,不得路由持久化实现。
36
- - 领域影响缺少批准且版本当前的 tactical-design contract 时,不得路由 Domain 实现;无领域影响必须记录 `not-applicable`。
36
+ - 后端技术设计由 `yss-technical-design` 先行组织。消费批准且版本当前的 Technical Design Contract,核对其架构与工程基线一致;DDD 才消费聚合、Gateway 等战术字段并路由 `yss-domain`,MVC 消费用例、分层、规则和事务设计并按 Profile 路由。旧 v1 战术合同只按 DDD 显式兼容读取。无相关影响记录带原因的 `not-applicable`。
37
37
  - API 变化必须回到生命周期 Draft/Review/Freeze;半成品 backend 不得冒充稳定 source of truth。
38
38
  - 后端端到端切片必须包含 Application;对象/POJO 影响按契约自动补 `mapstruct`、`lombok`、`alibaba-java-code-style`。
39
39
  - Harness 内实现路径必须落在 `apps/backend/<project>/` 或 `apps/frontend/<project>/` 的具体项目目录;`apps/backend/`、`apps/frontend/` 只能作为容器,`app/backend/`、`app/frontend/` 及其子路径一律阻断。外部实现仓库使用其登记的真实项目根路径。`git-submodule` 使用 `implementation_path_policy: git-submodule-harness-apps`,空 gitlink、detached HEAD 或 `--force` 覆盖挂载点不得脚手架;`inspectWorkingTreeScope.writable` 必须为显式布尔值。
@@ -60,4 +60,4 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
60
60
 
61
61
  跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
62
62
 
63
- 战术合同必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
63
+ 来自战略交接包的技术设计合同(DDD / MVC)必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
@@ -18,6 +18,8 @@
18
18
 
19
19
  | Capability | Primary skill | Task modes |
20
20
  | --- | --- | --- |
21
+ | `architecture.technical-design` | `yss-technical-design` | `guidance`, `integration`, `review-input` |
22
+ | `architecture.mvc-design` | `yss-mvc-design` | `guidance`, `integration`, `review-input` |
21
23
  | `layer.mvc-service` | `yss-application` | `guidance`, `integration`, `slice-implementation`, `troubleshooting`, `review-input` |
22
24
  | `layer.mvc-persistence` | `yss-repository` | `guidance`, `integration`, `slice-implementation`, `troubleshooting`, `review-input` |
23
25
  | `layer.mvc-web` | `yss-web-controller` | `guidance`, `integration`, `slice-implementation`, `troubleshooting`, `review-input` |
@@ -112,6 +114,9 @@
112
114
  | `yss-domain` | `domain-modeling` | `coordination-only` | — |
113
115
  | `yss-domain` | `yss-tactical-design` | `context-conditional` | `tactical-domain` |
114
116
  | `yss-domain` | `lombok` | `context-conditional` | `pojo` |
117
+ | `yss-technical-design` | `yss-tactical-design` | `coordination-only` | `domain-driven` |
118
+ | `yss-technical-design` | `yss-mvc-design` | `coordination-only` | `layered-mvc` |
119
+ | `yss-mvc-design` | `yss-openapi-draft-review` | `review-only` | `api-impact` |
115
120
  | `yss-tactical-design` | `domain-modeling` | `coordination-only` | — |
116
121
  | `yss-tactical-design` | `yss-openapi-draft-review` | `review-only` | `api-impact` |
117
122
  | `yss-tactical-design` | `yss-repository` | `component-dependency` | `data-impact` |
@@ -83,7 +83,7 @@ exclusive_flags:
83
83
 
84
84
  slice_contract_required:
85
85
  root: [schema_version, contract_id, contract_version, slice_id, status, lifecycle_refs, readiness, resolution, common, frontend, backend, contract, cross_repo, work_units]
86
- lifecycle_refs: [spec, ticket, requirement_freeze, low_fidelity_review, prototype_review, prototype_profile_decision, prototype_deliverable, prototype_deliverable_verification, visual_baseline, prototype_confirmation, openapi_freeze_or_no_impact, architecture_review, data_architecture, tactical_design, engineering_baseline, build_architecture_checklist, implementation_repository, frontend_repository, backend_repository, maven_wrapper]
86
+ lifecycle_refs: [spec, ticket, requirement_freeze, low_fidelity_review, prototype_review, prototype_profile_decision, prototype_deliverable, prototype_deliverable_verification, visual_baseline, prototype_confirmation, openapi_freeze_or_no_impact, architecture_review, data_architecture, technical_design, tactical_design, engineering_baseline, build_architecture_checklist, implementation_repository, frontend_repository, backend_repository, maven_wrapper]
87
87
  readiness: [blockers, stale_inputs, not_applicable]
88
88
  resolution: [required_capabilities, required_skills, recipe_ids, conditions, reason_chains, registry_digest, compiler_contract_digest, compiled_at, freshness]
89
89
  common: [impacted_areas, implementation_path_policy, project_roots, required_capabilities, required_skills, optional_skills, unavailable_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands, human_review_points, full_reroute_triggers, quality_baseline_ref, context_plan, doubt_driven_review]
@@ -109,6 +109,7 @@ lifecycle_ref_by_readiness:
109
109
  openapi_freeze: openapi_freeze_or_no_impact
110
110
  no_api_impact_record: openapi_freeze_or_no_impact
111
111
  data_architecture: data_architecture
112
+ technical_design: technical_design
112
113
  tactical_design: tactical_design
113
114
  engineering_baseline: engineering_baseline
114
115
  backend_repository: backend_repository
@@ -233,7 +234,14 @@ applicable_subcontract_nonempty:
233
234
  backend:
234
235
  scalar: [application_boundary, transaction_boundary, persistence_strategy]
235
236
  array: [affected_layers, required_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands]
237
+ conditional_technical_design:
238
+ when: backend-technical-design-impact
239
+ binding: resolution.technical_design
240
+ scalar: [ref, version, digest]
241
+ architecture_match: resolution.architecture_identity.architecture_family
242
+ verification: node .agents/skills/yss-technical-design/scripts/validate-technical-design.mjs <contract> --root <target> --slice <slice-id>
236
243
  conditional_tactical_ddd:
244
+ architecture_family: domain-driven
237
245
  when: [aggregate-impact, state-machine-impact, invariant-impact, consistency-impact, domain-event-impact, gateway-boundary-impact, persistence-mapping-impact]
238
246
  scalar: [tactical_design_ref, tactical_design_version, gateway_boundary_ref]
239
247
  array: [aggregate_refs, invariant_refs, state_behavior_refs, domain_test_seams, application_test_seams]
@@ -366,7 +374,7 @@ unavailable_skill_required: [skill, provider, fallback, resolution]
366
374
  strategic_handoff_consumption:
367
375
  when: upstream-source-is-imported-strategic-handoff
368
376
  required: [import_receipt_ref, bundle_digest, context_reconciliation_ref, rows]
369
- verification: scripts/verify-strategic-handoff-consumption --root <target> --slice <slice-id> <approved-tactical-contract>
377
+ verification: scripts/verify-strategic-handoff-consumption --root <target> --slice <slice-id> <approved-technical-design-contract>
370
378
  require_actual_exit_code: 0
371
379
  stale_policy: latest-imported-source-digest-and-dependent-slices
372
380
  unknown_dependency: block-all
@@ -28,7 +28,8 @@ slice_contract:
28
28
  architecture_review:
29
29
  data_architecture:
30
30
  engineering_baseline:
31
- tactical_design:
31
+ technical_design: # 阅读引用;与 resolution.technical_design.ref 指向同一文件
32
+ tactical_design: # 旧 DDD 引用兼容
32
33
  build_architecture_checklist:
33
34
  implementation_repository:
34
35
  frontend_repository:
@@ -41,6 +42,10 @@ slice_contract:
41
42
  - item:
42
43
  reason:
43
44
  resolution:
45
+ technical_design: # 有技术设计影响时由编译器绑定,DDD / MVC 共用
46
+ ref:
47
+ version:
48
+ digest: # 已持久化合同原始字节摘要
44
49
  required_capabilities: []
45
50
  required_skills: []
46
51
  recipe_ids: []
@@ -201,3 +206,5 @@ work_unit:
201
206
  `work_units` 中的前端、后端和测试任务是切片级子任务,不是新的生命周期阶段。每个子任务必须引用独立任务包;任务包只能消费同一份已批准且版本当前的 Slice Contract。`workflow_status` 追踪执行过程,不能替代生命周期状态;`contract_id`、`contract_version` 或 resolution digest 不一致时必须阻断并回到实现合同编译器。
202
207
 
203
208
  一个切片可以组合多个窄 Recipe,但只计算一次闭包。Recipe 只能引用 capability;合同同时冻结 `required_capabilities`、`required_skills`、完整原因链和 Registry/Compiler digest。任一 digest 或 Visual Baseline 版本 / digest 改变时,当前合同标记 `stale`,重新编译后仍须由 `yss-product-lifecycle` 再批准。UI 切片只消费 `visual_baseline_case_ids` 指定的图片,并先读取 manifest 与语义引用,禁止按目录 glob 猜测图片含义。
209
+
210
+ 技术设计编译绑定使用 `technical_design: {ref, version, digest}` 与 `slice_id`,校验器规则见 `yss-technical-design/references/technical-design-contract.md`。`backend.tactical_ddd` 仅适用于 `domain-driven`;MVC 消费共同技术设计绑定与 `design` 的用例、规则、事务和测试 seam,不填聚合或 Gateway 字段。
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: yss-mvc-design
3
+ description: 为已确认 layered-mvc 的 YSS 项目设计分层职责、用例、业务规则、事务和持久化映射,不生成代码。
4
+ ---
5
+
6
+ # YSS MVC 技术设计
7
+
8
+ 由 `yss-technical-design` 在 `layered-mvc` 分支调用,输入和批准边界由通用技术设计合同持有。既有工程按已登记 Profile 设计,不重选架构。
9
+
10
+ 必须说明模块职责与依赖方向、用例流程、业务规则、状态转换、事务边界、失败回滚、幂等与并发、持久化映射、外部集成与公开测试 seam。无状态流转或外部集成时记录有原因的不适用,不硬造对象。
11
+
12
+ 分层边界消费 `docs/agents/backend-architecture-profiles.md`:Controller 处理 HTTP 边界;service/core 承载用例、规则与事务;Repository 负责持久化;适用时 Adapter 承接外部集成。不得为 MVC 加载 `yss-domain` 或生成 DDD Gateway。
13
+
14
+ 输出 Technical Design Contract 的 `design` 分支,结构见 `references/mvc-design.schema.json`。业务规则和关键场景必须关联具体用例与测试 seam;关键场景覆盖成功和失败。与 DDD 使用同一承接和审查要求,不能因采用 MVC 省略规则、一致性或测试设计。
15
+
16
+ 由通用入口校验整个合同并回交生命周期独立审查。本技能不自行批准、不创建 Ticket、不设置 `ready-for-agent`,不生成 Java、SQL 或生产 API。实现由编译器按批准的架构 Profile 和最小技能闭包路由。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "YSS MVC 技术设计"
3
+ short_description: "设计 MVC 用例、分层、事务和测试边界"
4
+ default_prompt: "基于当前批准输入和已确认架构,设计 MVC 用例、分层、事务和测试边界,返回待生命周期审查的结果。"
@@ -0,0 +1,315 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "module_catalog": {
5
+ "type": "array",
6
+ "minItems": 1,
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "module_id": {
11
+ "type": "string",
12
+ "minLength": 1
13
+ },
14
+ "responsibility": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "layer": {
19
+ "enum": [
20
+ "server",
21
+ "service",
22
+ "core",
23
+ "repository",
24
+ "adapter",
25
+ "client",
26
+ "feign-client"
27
+ ]
28
+ },
29
+ "depends_on": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "uniqueItems": true
36
+ }
37
+ },
38
+ "required": [
39
+ "module_id",
40
+ "responsibility",
41
+ "layer",
42
+ "depends_on"
43
+ ],
44
+ "additionalProperties": false
45
+ }
46
+ },
47
+ "use_case_catalog": {
48
+ "type": "array",
49
+ "minItems": 1,
50
+ "items": {
51
+ "type": "object",
52
+ "properties": {
53
+ "use_case_id": {
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "module_ref": {
58
+ "type": "string",
59
+ "minLength": 1
60
+ },
61
+ "flow": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ },
67
+ "uniqueItems": true,
68
+ "minItems": 1
69
+ },
70
+ "rule_refs": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string",
74
+ "minLength": 1
75
+ },
76
+ "uniqueItems": true,
77
+ "minItems": 1
78
+ },
79
+ "failure_handling": {
80
+ "type": "string",
81
+ "minLength": 1
82
+ }
83
+ },
84
+ "required": [
85
+ "use_case_id",
86
+ "module_ref",
87
+ "flow",
88
+ "rule_refs",
89
+ "failure_handling"
90
+ ],
91
+ "additionalProperties": false
92
+ }
93
+ },
94
+ "rule_catalog": {
95
+ "type": "array",
96
+ "minItems": 1,
97
+ "items": {
98
+ "type": "object",
99
+ "properties": {
100
+ "rule_id": {
101
+ "type": "string",
102
+ "minLength": 1
103
+ },
104
+ "statement": {
105
+ "type": "string",
106
+ "minLength": 1
107
+ },
108
+ "use_case_refs": {
109
+ "type": "array",
110
+ "items": {
111
+ "type": "string",
112
+ "minLength": 1
113
+ },
114
+ "uniqueItems": true,
115
+ "minItems": 1
116
+ }
117
+ },
118
+ "required": [
119
+ "rule_id",
120
+ "statement",
121
+ "use_case_refs"
122
+ ],
123
+ "additionalProperties": false
124
+ }
125
+ },
126
+ "state_transition_catalog": {
127
+ "type": "array",
128
+ "minItems": 0,
129
+ "items": {
130
+ "type": "object",
131
+ "properties": {
132
+ "transition_id": {
133
+ "type": "string",
134
+ "minLength": 1
135
+ },
136
+ "use_case_ref": {
137
+ "type": "string",
138
+ "minLength": 1
139
+ },
140
+ "from": {
141
+ "type": "string",
142
+ "minLength": 1
143
+ },
144
+ "to": {
145
+ "type": "string",
146
+ "minLength": 1
147
+ },
148
+ "guard": {
149
+ "type": "string",
150
+ "minLength": 1
151
+ }
152
+ },
153
+ "required": [
154
+ "transition_id",
155
+ "use_case_ref",
156
+ "from",
157
+ "to",
158
+ "guard"
159
+ ],
160
+ "additionalProperties": false
161
+ }
162
+ },
163
+ "state_not_applicable_reason": {
164
+ "type": "string"
165
+ },
166
+ "consistency_policy": {
167
+ "type": "object",
168
+ "properties": {
169
+ "transaction_boundary": {
170
+ "type": "string",
171
+ "minLength": 1
172
+ },
173
+ "rollback": {
174
+ "type": "string",
175
+ "minLength": 1
176
+ },
177
+ "concurrency": {
178
+ "type": "string",
179
+ "minLength": 1
180
+ },
181
+ "idempotency": {
182
+ "type": "string",
183
+ "minLength": 1
184
+ }
185
+ },
186
+ "required": [
187
+ "transaction_boundary",
188
+ "rollback",
189
+ "concurrency",
190
+ "idempotency"
191
+ ],
192
+ "additionalProperties": false
193
+ },
194
+ "persistence_mapping": {
195
+ "type": "array",
196
+ "minItems": 1,
197
+ "items": {
198
+ "type": "object",
199
+ "properties": {
200
+ "mapping_id": {
201
+ "type": "string",
202
+ "minLength": 1
203
+ },
204
+ "use_case_ref": {
205
+ "type": "string",
206
+ "minLength": 1
207
+ },
208
+ "repository_ref": {
209
+ "type": "string",
210
+ "minLength": 1
211
+ },
212
+ "storage_model": {
213
+ "type": "string",
214
+ "minLength": 1
215
+ },
216
+ "notes": {
217
+ "type": "string",
218
+ "minLength": 1
219
+ }
220
+ },
221
+ "required": [
222
+ "mapping_id",
223
+ "use_case_ref",
224
+ "repository_ref",
225
+ "storage_model",
226
+ "notes"
227
+ ],
228
+ "additionalProperties": false
229
+ }
230
+ },
231
+ "integration_catalog": {
232
+ "type": "array",
233
+ "minItems": 0,
234
+ "items": {
235
+ "type": "object",
236
+ "properties": {
237
+ "integration_id": {
238
+ "type": "string",
239
+ "minLength": 1
240
+ },
241
+ "adapter_ref": {
242
+ "type": "string",
243
+ "minLength": 1
244
+ },
245
+ "capability": {
246
+ "type": "string",
247
+ "minLength": 1
248
+ },
249
+ "failure_handling": {
250
+ "type": "string",
251
+ "minLength": 1
252
+ }
253
+ },
254
+ "required": [
255
+ "integration_id",
256
+ "adapter_ref",
257
+ "capability",
258
+ "failure_handling"
259
+ ],
260
+ "additionalProperties": false
261
+ }
262
+ },
263
+ "integration_not_applicable_reason": {
264
+ "type": "string"
265
+ },
266
+ "test_seams": {
267
+ "type": "array",
268
+ "minItems": 1,
269
+ "items": {
270
+ "type": "object",
271
+ "properties": {
272
+ "seam_id": {
273
+ "type": "string",
274
+ "minLength": 1
275
+ },
276
+ "kind": {
277
+ "type": "string",
278
+ "minLength": 1
279
+ },
280
+ "subject_ref": {
281
+ "type": "string",
282
+ "minLength": 1
283
+ },
284
+ "assertion": {
285
+ "type": "string",
286
+ "minLength": 1
287
+ }
288
+ },
289
+ "required": [
290
+ "seam_id",
291
+ "kind",
292
+ "subject_ref",
293
+ "assertion"
294
+ ],
295
+ "additionalProperties": false
296
+ }
297
+ }
298
+ },
299
+ "required": [
300
+ "module_catalog",
301
+ "use_case_catalog",
302
+ "rule_catalog",
303
+ "state_transition_catalog",
304
+ "state_not_applicable_reason",
305
+ "consistency_policy",
306
+ "persistence_mapping",
307
+ "integration_catalog",
308
+ "integration_not_applicable_reason",
309
+ "test_seams"
310
+ ],
311
+ "additionalProperties": false,
312
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
313
+ "$id": "https://yss.dev/schemas/mvc-design-v1.json",
314
+ "title": "YSS MVC 技术设计内容"
315
+ }
@@ -36,7 +36,7 @@ Matt 的 `grill-with-docs`、`to-spec`、`to-tickets`、`implement` 等保留为
36
36
  | Discovery `stage.discovery` | 机会与目标、业务故事、用户/MVP/非目标/成功标准、测试 seam;需要时补充业务边界与规则设计和方案决策包 | `work-unit.discovery-opportunity` + `work-unit.discovery-requirements` + `work-unit.domain-strategy-design` + `work-unit.stage-decision`;市场/竞品事实用 `competitive-intelligence`,技术/标准事实用 `yss-research:technical-evidence`,业务边界与方案决策证据用 `yss-research:strategy-evidence`;需求澄清用 `grilling`,业务词汇和责任区梳理用 `domain-modeling` / `yss-stage-decision`;`grill-with-docs` 为兼容入口 | 未决事实已由 `yss-research` 核验或 handoff;业务板块、责任区、统一业务词汇、协作关系和不可违反规则可审查;方案决策包完成必要批准;`gate.domain-strategy-approved`、`gate.stage-decision-package-approved` |
37
37
  | Spec / 功能架构 `stage.spec-architecture` | Spec、产品总体设计、功能架构;必要时 Spec Delta | 原生 `work-unit.spec-synthesis`;`to-spec` 为兼容入口 | 初稿先为 `ready-for-human`;只有 Spec baseline 会签批准后资产才为 `approved` 并进入下游 |
38
38
  | 产品设计 `stage.product-design` | 交互说明、低保真、状态矩阵、H1/H2 原型交付物、评审记录 | `work-unit.prototype-design`;`yss-prototype-stage` 先消费 `yss-design-system`、低保真与独立 `prototype-review`,再按风险选择 H1 静态视觉或 H2 可运行流程;H2 默认调用 `yss-antdv-next-design`,显式 `react-antd-6` 兼容路线才调用 `yss-antd-design`,原型阶段禁止调用 `yss-ui` | `gate.prototype-reviewed`、`gate.prototype-verified`、`gate.user-confirmation` 均有 schema v3 证据;真实组件待验事项已交接到前端实现计划 |
39
- | 系统 / 数据架构与工程契约 `stage.system-data-engineering` | OpenAPI Draft/Freeze、数据架构、工程基线、架构审查;按领域影响执行 Tactical DDD Check | `work-unit.technical-analysis`;`yss-implementation-contract-compiler` + `yss-openapi-governance` / `yss-openapi-draft-review`、`codebase-design`、`implementation-repo-onboarding`、`yss-tactical-design`;用户或合同明确要求架构可视化时条件追加 `archify` | API/架构契约冻结;无 API 影响有明确记录;战术模型无未解释冲突;脚手架策略满足;Archify 图只作派生审查证据;`gate.openapi-draft-reviewed`、`gate.design-reviewed`、`gate.openapi-frozen`、`gate.engineering-baseline-accepted`、`gate.architecture-reviewed` |
39
+ | 系统 / 数据架构与工程契约 `stage.system-data-engineering` | OpenAPI Draft/Freeze、数据架构、工程基线、架构审查;按已确认架构执行 DDD / MVC 技术设计 | `work-unit.technical-analysis`;`yss-technical-design` + `yss-implementation-contract-compiler`、 `yss-openapi-governance` / `yss-openapi-draft-review`、`codebase-design`、`implementation-repo-onboarding`;分支调用 `yss-tactical-design` / `yss-mvc-design`;用户或合同明确要求架构可视化时条件追加 `archify` | API/架构契约冻结;无 API 影响有明确记录;战术模型无未解释冲突;脚手架策略满足;Archify 图只作派生审查证据;`gate.openapi-draft-reviewed`、`gate.design-reviewed`、`gate.openapi-frozen`、`gate.engineering-baseline-accepted`、`gate.architecture-reviewed` |
40
40
  | Ticket 正式化 `stage.ticket-formalization` | 功能父 Ticket、垂直切片、Slice Implementation Contract | 原生 `work-unit.ticket-decomposition`;`yss-implementation-contract-compiler`;`to-tickets` 为兼容入口;生命周期复算 | 依赖、验收、测试 seam 可执行;合同已批准、持久化且为当前版本;`gate.slice-contract-approved`、`gate.slice-ready-for-agent` |
41
41
  | 垂直切片实现 `stage.vertical-slice-implementation` | 前端/后端代码、TDD 证据、YSS Skill Execution Result | 原生 `work-unit.slice-implementation`;`yss-implementation-contract-compiler` + `tdd`;前端按 `yss-ui` + `yss-ui-business-page-generation`,后端按 实现合同编译器 最小闭包;`implement` 为兼容入口 | 仅接收已完成 Ticket 正式化、已绑定垂直切片且 `ready-for-agent` 公式通过的输入;只写允许路径;业务行为用 `tdd` 的 `behavior-tdd` 模式;UI 影响必须有还原计划 |
42
42
  | 验证 / 发布 / 复盘 `stage.verification-release-retrospective` | 不可变候选快照、review 结论、fresh verification、发布 / 回滚证据、复盘记录 | `work-unit.frontend-implementation-verification` + `work-unit.code-review` + `work-unit.release-and-retrospective`;`code-review` 独立于实现者,Standards 消费合同 `required_skills` 与 YSS / Alibaba 专项检查输入;UI 影响追加 `yss-ui` + `yss-design-system` 的 UI fidelity 轴;发布 / 复盘由生命周期持有 | findings 已按合同分流处理(修复后全轴复审或 stale 回 实现合同编译器);同一候选快照通过全部审查轴、专项覆盖与验证;UI 影响追加 `gate.frontend-implementation-verified`;`gate.release-ready` 仍须生物人 |
@@ -75,4 +75,4 @@ Agent 先问清六件事:谁遇到什么问题并想得到什么结果;事
75
75
 
76
76
  跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
77
77
 
78
- 战术合同必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
78
+ 来自战略交接包的技术设计合同(DDD / MVC)必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
@@ -8,8 +8,8 @@ Root CONTEXT.md + current work-unit changes → Context Reconciliation → appro
8
8
  Spec + Product Overview → Product Design / Requirement Freeze
9
9
  Spec + Product Overview → API Impact / OpenAPI Draft
10
10
  Spec + Product Overview → System / Data Architecture
11
- System / Data Architecture + domain impact → Tactical DDD Check / tactical-design contract
12
- Tactical DDD contract → Architecture Review / Engineering Baseline / Slice Implementation Contract
11
+ System / Data Architecture + confirmed project architecture → Technical Design Contract (DDD / MVC)
12
+ Technical Design Contract → Architecture Review / Engineering Baseline → Slice Implementation Contract draft
13
13
  API impact = yes: Requirement Freeze + Design Review + Draft Review → OpenAPI Freeze
14
14
  API impact = no: API Impact Assessment approved → No-API-Impact record;Draft/Freeze gates = not-applicable
15
15
  Frozen Contract → Vertical Slice Tickets
@@ -274,15 +274,20 @@ work_unit_routes:
274
274
  not_applicable_reason: no_ui_or_product_design_impact
275
275
  work-unit.technical-analysis:
276
276
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
277
- primary_skill: yss-implementation-contract-compiler
278
- supporting_skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding, yss-tactical-design]
279
- skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding, yss-tactical-design, yss-implementation-contract-compiler]
280
- tactical_ddd:
281
- applies_when: [aggregate-impact, state-machine-impact, invariant-impact, consistency-impact, domain-event-impact, gateway-boundary-impact, persistence-mapping-impact]
282
- not_applicable_reason: no_tactical_ddd_impact
283
- default_artifact: system-overview-design.tactical-ddd-check
284
- standalone_artifact: artifact.tactical-design
285
- review_evidence: evidence.tactical-design-review
277
+ primary_skill: yss-technical-design
278
+ supporting_skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding, yss-implementation-contract-compiler]
279
+ skills: [yss-technical-design, yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding, yss-implementation-contract-compiler]
280
+ technical_design:
281
+ applies_when: backend_technical_design_impact
282
+ architecture_source: confirmed-project-architecture-before-branch-design
283
+ branches:
284
+ domain-driven: yss-tactical-design
285
+ layered-mvc: yss-mvc-design
286
+ not_applicable_reason: no_backend_technical_design_impact
287
+ artifact: artifact.technical-design
288
+ review_evidence: evidence.technical-design-review
289
+ legacy_ddd_artifact: artifact.tactical-design
290
+ legacy_ddd_review_evidence: evidence.tactical-design-review
286
291
  statuses: [draft, ready-for-human, approved, blocked, stale, drift, new_impacts, not-applicable]
287
292
  approved_by: yss-product-lifecycle
288
293
  forbidden: [self-approval, ready-for-agent, production-code-generation]
@@ -53,7 +53,7 @@ tracker 选择和冲突按 `docs/agents/issue-tracker.md` 裁决:已持久化
53
53
 
54
54
  ## Matt flow 进入条件
55
55
 
56
- - `work-unit.technical-analysis` 命中聚合、状态机、不变量、一致性、Domain Event、Gateway 或持久化映射影响时,先调度 `yss-tactical-design` 完成 Tactical DDD Check;默认嵌入系统概要设计 / 数据架构,复杂场景才生成 `artifact.tactical-design`。无领域影响记录 `not-applicable`。该 skill 只返回设计合同和验证结果,批准仍由生命周期编排器维护,发现 `stale`、`drift` 或 `new_impacts` 时不得继续 Ticket 正式化。
56
+ - `work-unit.technical-analysis` 由 `yss-technical-design` 组织后端技术设计,先按项目确认架构,再调用 DDD `yss-tactical-design` 或传统 MVC `yss-mvc-design`。状态、规则、一致性、持久化影响本身不意味着选择 DDD。无后端技术设计影响记录带原因的 `not-applicable`,其他 API / 前端技术分析继续各自路由。新合同使用 `artifact.technical-design`,通过 `evidence.technical-design-review` 回交现有架构审查;旧 DDD 稳定 ID 只读兼容。批准仍由生命周期维护,编译器消费批准且当前的设计起草实现合同;`stale`、`drift` 或 `new_impacts` 时不得继续 Ticket 正式化。
57
57
 
58
58
  - `work-unit.discovery-requirements` 实际调用 `grilling` 和 `domain-modeling`;`work-unit.discovery-opportunity` 按事实类型路由 `competitive-intelligence` 或 `yss-research`。`yss-research:quick` 只用于探索;外部证据进入领域战略、阶段决策或其他生命周期批准输入前必须升级为 `evidence-audited`。生命周期原生工作单元默认负责 Spec、Ticket 和实现资产;`to-spec`、`to-tickets`、`implement` 仅保留为显式兼容入口,结果必须回交生命周期验收。
59
59
  - 原生 `work-unit.ticket-decomposition` 只能在 OpenAPI Freeze 或无 API 影响记录后创建垂直切片,初始 Ticket 状态统一为 `ready-for-human`;生命周期复算完整公式后才能提升 `ready-for-agent`。该工作单元必须返回 `ticket_decomposition_result_ref` 和垂直切片引用,并作为实现的必经前置证据。
@@ -39,7 +39,7 @@ phase_boundary:
39
39
  ```text
40
40
  required gates ∈ {approved, not-applicable}
41
41
  AND 关键决定及当前切片实施范围已有可追溯、当前且未撤回的真实用户批准
42
- AND related artifacts 不含 stale(若命中领域影响,`artifact.tactical-design` 或嵌入式 Tactical DDD Check 引用必须为当前版本)
42
+ AND related artifacts 不含 stale(若命中技术设计影响,`artifact.technical-design` 必须已批准且版本当前、架构一致;旧 DDD 合同仅按显式兼容入口消费)
43
43
  AND blocking edges 全部关闭
44
44
  AND implementation repo/branch/CI/test/rollback 已明确
45
45
  AND `work-unit.ticket-decomposition` 已返回 `completed`,且其 `ticket_decomposition_result_ref` 证据可读取
@@ -9,7 +9,7 @@ description: 在 YSS 技术分析阶段将批准的战略领域输入细化为
9
9
 
10
10
  ## 适用边界
11
11
 
12
- - 由 `yss-product-lifecycle` 在 `work-unit.technical-analysis` 中按领域影响条件调度。
12
+ - 由 `yss-technical-design` 在已确认 `domain-driven` 的技术设计分支中调用;传统 MVC 使用 `yss-mvc-design`,不得按状态或一致性影响单独推断为 DDD。
13
13
  - 输入必须是版本当前的 Spec、功能架构、战略 DDD、状态矩阵、OpenAPI Draft / Freeze、ADR 和工程约束。若输入来自 Strategic Design Handoff,必须先用 `scripts/verify-strategic-context-import` 验证 schema v3 `source_context_snapshot` / `context_delta` 已对账到目标仓根 `CONTEXT.md`,Visual Baseline Bundle 可读取且 digest 当前,并且目标侧 `context_reconciliation` 有效;未完成时不得开始战术建模。
14
14
  - 默认将结果写入系统概要设计 / 数据架构中的 Tactical DDD Check;聚合、状态机、一致性或持久化映射复杂到无法清楚表达时,才升级为独立战术设计文档。
15
15
  - 没有聚合、状态、不变量、一致性或领域边界影响时返回 `not-applicable` 及原因,不生成空设计。
@@ -22,7 +22,7 @@ description: 在 YSS 技术分析阶段将批准的战略领域输入细化为
22
22
 
23
23
  ## 输出与状态
24
24
 
25
- 输出结构化 tactical-design contract、验证结果、评审引用和影响标记;来自 Strategic Design Handoff 时保留 `strategic_context_import_ref` 与 `context_reconciliation_ref`。状态使用 `draft`、`ready-for-human`、`approved`、`blocked`、`stale`、`drift`、`new_impacts`。
25
+ 新产物输出 Technical Design Contract schema v2 的 DDD `design` 分支(沿用 v1 DDD 内容结构);旧独立 tactical-design contract schema v1 仅显式兼容读取,不自动迁移或批准。输出验证结果、评审引用和影响标记;来自 Strategic Design Handoff 时保留 `strategic_context_import_ref` 与 `context_reconciliation_ref`。状态使用 `draft`、`ready-for-human`、`approved`、`blocked`、`stale`、`drift`、`new_impacts`。
26
26
 
27
27
  当用户或当前技术分析 / 架构评审合同明确要求聚合关系、状态转换、调用链、数据流或 Before/After 图示时,追加使用 `archify`。图必须从当前 Spec、ADR、OpenAPI、Tactical Design Contract 和代码证据派生,保存成 `*.archify.json`、`*.html` 与 `*.receipt.json` 配对资产;它是审查证据,不是新的事实源或批准门禁。没有明确图示要求时,不把 `archify` 加入 `required_skills`。
28
28
 
@@ -5,6 +5,8 @@ owner: ai
5
5
 
6
6
  # <功能名称> Tactical DDD Design
7
7
 
8
+ 仅用于已确认 domain-driven 分支的阅读视图;引用 Technical Design Contract v2 的 design,不复制共同输入与审批状态。MVC 使用 yss-mvc-design。
9
+
8
10
  ## 上游引用
9
11
 
10
12
  | 资产 | ref | version / digest | 状态 |