create-yss-spec 2.2.3 → 2.2.5

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 (341) hide show
  1. package/README.md +17 -1
  2. package/package.json +1 -1
  3. package/src/cli.js +15 -1
  4. package/src/self-update.js +277 -0
  5. package/template/.agents/skills/yss-domain/SKILL.md +5 -4
  6. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +15 -14
  7. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
  8. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  9. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
  10. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +6 -3
  11. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +7 -2
  12. package/template/.agents/skills/yss-router/SKILL.md +4 -2
  13. package/template/.agents/skills/yss-router/references/router-contract.yaml +18 -3
  14. package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +58 -1
  15. package/template/.agents/skills/yss-stage-decision/SKILL.md +50 -0
  16. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
  17. package/template/.agents/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
  18. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
  19. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
  20. package/template/.agents/skills/yss-stage-decision/references/validation-rules.md +18 -0
  21. package/template/.agents/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
  22. package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
  23. package/template/.agents/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
  24. package/template/.agents/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
  25. package/template/.agents/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
  26. package/template/.agents/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
  27. package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
  28. package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
  29. package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
  30. package/template/.agents/skills/yss-tactical-design/SKILL.md +33 -0
  31. package/template/.agents/skills/yss-tactical-design/agents/openai.yaml +4 -0
  32. package/template/.agents/skills/yss-tactical-design/references/output-template.md +28 -0
  33. package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
  34. package/template/.agents/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
  35. package/template/.agents/skills/yss-tactical-design/references/validation-rules.md +13 -0
  36. package/template/.agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
  37. package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
  38. package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
  39. package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
  40. package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
  41. package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
  42. package/template/.agents/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
  43. package/template/.agents/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
  44. package/template/.claude/skills/yss-domain/SKILL.md +5 -4
  45. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +15 -14
  46. package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
  47. package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  48. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
  49. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +6 -3
  50. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +7 -2
  51. package/template/.claude/skills/yss-router/SKILL.md +4 -2
  52. package/template/.claude/skills/yss-router/references/router-contract.yaml +18 -3
  53. package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +58 -1
  54. package/template/.claude/skills/yss-stage-decision/SKILL.md +50 -0
  55. package/template/.claude/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
  56. package/template/.claude/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
  57. package/template/.claude/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
  58. package/template/.claude/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
  59. package/template/.claude/skills/yss-stage-decision/references/validation-rules.md +18 -0
  60. package/template/.claude/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
  61. package/template/.claude/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
  62. package/template/.claude/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
  63. package/template/.claude/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
  64. package/template/.claude/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
  65. package/template/.claude/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
  66. package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
  67. package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
  68. package/template/.claude/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
  69. package/template/.claude/skills/yss-tactical-design/SKILL.md +33 -0
  70. package/template/.claude/skills/yss-tactical-design/agents/openai.yaml +4 -0
  71. package/template/.claude/skills/yss-tactical-design/references/output-template.md +28 -0
  72. package/template/.claude/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
  73. package/template/.claude/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
  74. package/template/.claude/skills/yss-tactical-design/references/validation-rules.md +13 -0
  75. package/template/.claude/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
  76. package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
  77. package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
  78. package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
  79. package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
  80. package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
  81. package/template/.claude/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
  82. package/template/.claude/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
  83. package/template/.codex/skills/yss-domain/SKILL.md +5 -4
  84. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +15 -14
  85. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
  86. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  87. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
  88. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +6 -3
  89. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +7 -2
  90. package/template/.codex/skills/yss-router/SKILL.md +4 -2
  91. package/template/.codex/skills/yss-router/references/router-contract.yaml +18 -3
  92. package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +58 -1
  93. package/template/.codex/skills/yss-stage-decision/SKILL.md +50 -0
  94. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
  95. package/template/.codex/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
  96. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
  97. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
  98. package/template/.codex/skills/yss-stage-decision/references/validation-rules.md +18 -0
  99. package/template/.codex/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
  100. package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
  101. package/template/.codex/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
  102. package/template/.codex/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
  103. package/template/.codex/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
  104. package/template/.codex/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
  105. package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
  106. package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
  107. package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
  108. package/template/.codex/skills/yss-tactical-design/SKILL.md +33 -0
  109. package/template/.codex/skills/yss-tactical-design/agents/openai.yaml +4 -0
  110. package/template/.codex/skills/yss-tactical-design/references/output-template.md +28 -0
  111. package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
  112. package/template/.codex/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
  113. package/template/.codex/skills/yss-tactical-design/references/validation-rules.md +13 -0
  114. package/template/.codex/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
  115. package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
  116. package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
  117. package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
  118. package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
  119. package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
  120. package/template/.codex/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
  121. package/template/.codex/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
  122. package/template/.cursor/skills/yss-domain/SKILL.md +5 -4
  123. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +15 -14
  124. package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
  125. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  126. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
  127. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +6 -3
  128. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +7 -2
  129. package/template/.cursor/skills/yss-router/SKILL.md +4 -2
  130. package/template/.cursor/skills/yss-router/references/router-contract.yaml +18 -3
  131. package/template/.cursor/skills/yss-router/references/slice-implementation-contract.md +58 -1
  132. package/template/.cursor/skills/yss-stage-decision/SKILL.md +50 -0
  133. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
  134. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
  135. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
  136. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
  137. package/template/.cursor/skills/yss-stage-decision/references/validation-rules.md +18 -0
  138. package/template/.cursor/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
  139. package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
  140. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
  141. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
  142. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
  143. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
  144. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
  145. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
  146. package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
  147. package/template/.cursor/skills/yss-tactical-design/SKILL.md +33 -0
  148. package/template/.cursor/skills/yss-tactical-design/agents/openai.yaml +4 -0
  149. package/template/.cursor/skills/yss-tactical-design/references/output-template.md +28 -0
  150. package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
  151. package/template/.cursor/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
  152. package/template/.cursor/skills/yss-tactical-design/references/validation-rules.md +13 -0
  153. package/template/.cursor/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
  154. package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
  155. package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
  156. package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
  157. package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
  158. package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
  159. package/template/.cursor/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
  160. package/template/.cursor/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
  161. package/template/.hermes/skills/yss-domain/SKILL.md +5 -4
  162. package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +15 -14
  163. package/template/.hermes/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
  164. package/template/.hermes/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  165. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
  166. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +6 -3
  167. package/template/.hermes/skills/yss-product-lifecycle/references/state-model.md +7 -2
  168. package/template/.hermes/skills/yss-router/SKILL.md +4 -2
  169. package/template/.hermes/skills/yss-router/references/router-contract.yaml +18 -3
  170. package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +58 -1
  171. package/template/.hermes/skills/yss-stage-decision/SKILL.md +50 -0
  172. package/template/.hermes/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
  173. package/template/.hermes/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
  174. package/template/.hermes/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
  175. package/template/.hermes/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
  176. package/template/.hermes/skills/yss-stage-decision/references/validation-rules.md +18 -0
  177. package/template/.hermes/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
  178. package/template/.hermes/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
  179. package/template/.hermes/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
  180. package/template/.hermes/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
  181. package/template/.hermes/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
  182. package/template/.hermes/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
  183. package/template/.hermes/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
  184. package/template/.hermes/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
  185. package/template/.hermes/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
  186. package/template/.hermes/skills/yss-tactical-design/SKILL.md +33 -0
  187. package/template/.hermes/skills/yss-tactical-design/agents/openai.yaml +4 -0
  188. package/template/.hermes/skills/yss-tactical-design/references/output-template.md +28 -0
  189. package/template/.hermes/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
  190. package/template/.hermes/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
  191. package/template/.hermes/skills/yss-tactical-design/references/validation-rules.md +13 -0
  192. package/template/.hermes/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
  193. package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
  194. package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
  195. package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
  196. package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
  197. package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
  198. package/template/.hermes/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
  199. package/template/.hermes/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
  200. package/template/.pi/skills/yss-domain/SKILL.md +5 -4
  201. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +15 -14
  202. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
  203. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  204. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
  205. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +6 -3
  206. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +7 -2
  207. package/template/.pi/skills/yss-router/SKILL.md +4 -2
  208. package/template/.pi/skills/yss-router/references/router-contract.yaml +18 -3
  209. package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +58 -1
  210. package/template/.pi/skills/yss-stage-decision/SKILL.md +50 -0
  211. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
  212. package/template/.pi/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
  213. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
  214. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
  215. package/template/.pi/skills/yss-stage-decision/references/validation-rules.md +18 -0
  216. package/template/.pi/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
  217. package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
  218. package/template/.pi/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
  219. package/template/.pi/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
  220. package/template/.pi/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
  221. package/template/.pi/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
  222. package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
  223. package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
  224. package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
  225. package/template/.pi/skills/yss-tactical-design/SKILL.md +33 -0
  226. package/template/.pi/skills/yss-tactical-design/agents/openai.yaml +4 -0
  227. package/template/.pi/skills/yss-tactical-design/references/output-template.md +28 -0
  228. package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
  229. package/template/.pi/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
  230. package/template/.pi/skills/yss-tactical-design/references/validation-rules.md +13 -0
  231. package/template/.pi/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
  232. package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
  233. package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
  234. package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
  235. package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
  236. package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
  237. package/template/.pi/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
  238. package/template/.pi/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
  239. package/template/.qoder/skills/yss-domain/SKILL.md +5 -4
  240. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +15 -14
  241. package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
  242. package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  243. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
  244. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +6 -3
  245. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +7 -2
  246. package/template/.qoder/skills/yss-router/SKILL.md +4 -2
  247. package/template/.qoder/skills/yss-router/references/router-contract.yaml +18 -3
  248. package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +58 -1
  249. package/template/.qoder/skills/yss-stage-decision/SKILL.md +50 -0
  250. package/template/.qoder/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
  251. package/template/.qoder/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
  252. package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
  253. package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
  254. package/template/.qoder/skills/yss-stage-decision/references/validation-rules.md +18 -0
  255. package/template/.qoder/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
  256. package/template/.qoder/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
  257. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
  258. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
  259. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
  260. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
  261. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
  262. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
  263. package/template/.qoder/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
  264. package/template/.qoder/skills/yss-tactical-design/SKILL.md +33 -0
  265. package/template/.qoder/skills/yss-tactical-design/agents/openai.yaml +4 -0
  266. package/template/.qoder/skills/yss-tactical-design/references/output-template.md +28 -0
  267. package/template/.qoder/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
  268. package/template/.qoder/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
  269. package/template/.qoder/skills/yss-tactical-design/references/validation-rules.md +13 -0
  270. package/template/.qoder/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
  271. package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
  272. package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
  273. package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
  274. package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
  275. package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
  276. package/template/.qoder/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
  277. package/template/.qoder/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
  278. package/template/.trae/skills/yss-domain/SKILL.md +5 -4
  279. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +15 -14
  280. package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
  281. package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  282. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
  283. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +6 -3
  284. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +7 -2
  285. package/template/.trae/skills/yss-router/SKILL.md +4 -2
  286. package/template/.trae/skills/yss-router/references/router-contract.yaml +18 -3
  287. package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +58 -1
  288. package/template/.trae/skills/yss-stage-decision/SKILL.md +50 -0
  289. package/template/.trae/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
  290. package/template/.trae/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
  291. package/template/.trae/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
  292. package/template/.trae/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
  293. package/template/.trae/skills/yss-stage-decision/references/validation-rules.md +18 -0
  294. package/template/.trae/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
  295. package/template/.trae/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
  296. package/template/.trae/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
  297. package/template/.trae/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
  298. package/template/.trae/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
  299. package/template/.trae/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
  300. package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
  301. package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
  302. package/template/.trae/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
  303. package/template/.trae/skills/yss-tactical-design/SKILL.md +33 -0
  304. package/template/.trae/skills/yss-tactical-design/agents/openai.yaml +4 -0
  305. package/template/.trae/skills/yss-tactical-design/references/output-template.md +28 -0
  306. package/template/.trae/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
  307. package/template/.trae/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
  308. package/template/.trae/skills/yss-tactical-design/references/validation-rules.md +13 -0
  309. package/template/.trae/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
  310. package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
  311. package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
  312. package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
  313. package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
  314. package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
  315. package/template/.trae/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
  316. package/template/.trae/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
  317. package/template/AGENTS.md +22 -5
  318. package/template/CONTEXT.md +1 -1
  319. package/template/docs/agents/README.md +1 -1
  320. package/template/docs/agents/digital-human-roles.md +2 -2
  321. package/template/docs/agents/digital-human-roles.yaml +7 -1
  322. package/template/docs/agents/yss-skill-registry.yaml +12 -0
  323. package/template/docs/architecture/templates/system-overview-design-template.md +1 -0
  324. package/template/docs/process/lifecycle-artifact-map.md +8 -0
  325. package/template/docs/process/lifecycle-registry-baseline.json +11 -1
  326. package/template/docs/process/lifecycle-registry.yaml +46 -2
  327. package/template/docs/process/schemas/digital-human-task-package.schema.json +107 -0
  328. package/template/docs/process/schemas/subagent-task-package.schema.json +6 -0
  329. package/template/docs/process/subagent-collaboration.md +2 -2
  330. package/template/docs/templates/subagent-task-package-template.md +39 -1
  331. package/template/scripts/lib/lifecycle-transition.mjs +259 -0
  332. package/template/scripts/lib/scenario-checks.mjs +96 -2
  333. package/template/scripts/lib/task-package.mjs +214 -0
  334. package/template/scripts/verify-digital-human-task-package +14 -0
  335. package/template/scripts/verify-digital-human-task-package-scenarios +8 -0
  336. package/template/scripts/verify-lifecycle-transition-scenarios +105 -0
  337. package/template/scripts/verify-subagent-task-package +8 -0
  338. package/template/scripts/verify-subagent-task-package-scenarios +196 -0
  339. package/template/scripts/verify-template +13 -2
  340. package/template/skills-lock.json +36 -4
  341. package/template.snapshot.json +4 -4
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/env node
2
+ import assert from "node:assert/strict";
3
+ import { validateImplementationEntry, validateNextRoute, validateTicketFormalization } from "./lib/lifecycle-transition.mjs";
4
+
5
+ const exists = (ref) => [
6
+ "docs/process/lifecycle-registry.yaml",
7
+ "docs/.scratch/demo/issues/01-valid-slice.md",
8
+ "docs/.scratch/demo/evidence/ticket-decomposition-result.yaml",
9
+ ].includes(ref);
10
+ const decompositionResult = `result_schema: workflow-execution-result-v1\nwork_unit: work-unit.ticket-decomposition\nresult: completed\nevidence_refs:\n - docs/.scratch/demo/evidence/ticket-decomposition-result.yaml\n`;
11
+ const read = (ref) => ref === "docs/.scratch/demo/evidence/ticket-decomposition-result.yaml" ? decompositionResult : "";
12
+ const options = { exists, read };
13
+
14
+ const validTicketState = {
15
+ predecessor_work_unit: "work-unit.ticket-decomposition",
16
+ tracker_kind: "local-markdown",
17
+ ticket_decomposition_result_ref: "docs/.scratch/demo/evidence/ticket-decomposition-result.yaml",
18
+ vertical_slice_ticket_ref: "docs/.scratch/demo/issues/01-valid-slice.md",
19
+ vertical_slice_ticket_role: "ready-for-agent",
20
+ vertical_slice_ticket_kind: "vertical-slice-ticket",
21
+ ticket_decomposition_result: {
22
+ result: "completed",
23
+ evidence_refs: ["docs/.scratch/demo/evidence/ticket-decomposition-result.yaml"],
24
+ },
25
+ vertical_slice_ticket: {
26
+ ref: "docs/.scratch/demo/issues/01-valid-slice.md",
27
+ kind: "vertical-slice-ticket",
28
+ role: "ready-for-agent",
29
+ },
30
+ slice_contract: {
31
+ ticket_ref: "docs/.scratch/demo/issues/01-valid-slice.md",
32
+ status: "approved",
33
+ persisted: true,
34
+ current_version: true,
35
+ },
36
+ };
37
+
38
+ const valid = validateTicketFormalization(validTicketState, options);
39
+ assert.equal(valid.result, "allowed");
40
+
41
+ const implementation = validateImplementationEntry({
42
+ ...validTicketState,
43
+ ready_for_agent: true,
44
+ }, options);
45
+ assert.equal(implementation.result, "allowed");
46
+
47
+ const cases = [
48
+ ["missing decomposition result ref", { ...validTicketState, ticket_decomposition_result_ref: undefined }, "ticket-decomposition-result-ref-missing"],
49
+ ["missing slice ref", { ...validTicketState, vertical_slice_ticket_ref: undefined }, "vertical-slice-ticket-ref-missing"],
50
+ ["missing slice role", { ...validTicketState, vertical_slice_ticket_role: undefined }, "vertical-slice-ticket-role-missing"],
51
+ ["missing slice kind", { ...validTicketState, vertical_slice_ticket_kind: undefined }, "vertical-slice-ticket-kind-missing"],
52
+ ["missing vertical slice", { ...validTicketState, vertical_slice_ticket: undefined }, "vertical-slice-ticket-required"],
53
+ ["parent ticket reference", { ...validTicketState, vertical_slice_ticket: { ref: "docs/.scratch/demo/parent-ticket.md", kind: "parent-ticket", role: "ready-for-agent" } }, "parent-ticket-forbidden"],
54
+ ["human-ready slice", { ...validTicketState, vertical_slice_ticket: { ...validTicketState.vertical_slice_ticket, role: "ready-for-human" } }, "ticket-not-ready-for-agent"],
55
+ ["uncompleted decomposition", { ...validTicketState, ticket_decomposition_result: { result: "blocked", evidence_refs: [] } }, "ticket-decomposition-incomplete"],
56
+ ["needs-human decomposition", { ...validTicketState, ticket_decomposition_result: { result: "needs-human", evidence_refs: [] } }, "ticket-decomposition-incomplete"],
57
+ ["unreadable decomposition evidence", { ...validTicketState, ticket_decomposition_result: { ...validTicketState.ticket_decomposition_result, evidence_refs: ["docs/.scratch/demo/missing-evidence.md"] } }, "ticket-formalization-evidence-missing"],
58
+ ["wrong slice kind", { ...validTicketState, vertical_slice_ticket: { ...validTicketState.vertical_slice_ticket, kind: "parent-ticket" }, vertical_slice_ticket_kind: "parent-ticket" }, "parent-ticket-forbidden"],
59
+ ["unapproved contract", { ...validTicketState, slice_contract: { ...validTicketState.slice_contract, status: "draft" } }, "slice-contract-not-approved"],
60
+ ["unpersisted contract", { ...validTicketState, slice_contract: { ...validTicketState.slice_contract, persisted: false } }, "slice-contract-not-persisted"],
61
+ ["stale formalization", { ...validTicketState, stale: true }, "ticket-formalization-stale"],
62
+ ["wrong implementation predecessor", { ...validTicketState, predecessor_work_unit: "work-unit.spec-synthesis" }, "invalid-implementation-predecessor"],
63
+ ["contract bound to another ticket", { ...validTicketState, slice_contract: { ...validTicketState.slice_contract, ticket_ref: "docs/.scratch/demo/issues/02-other.md" } }, "slice-contract-ticket-mismatch"],
64
+ ["unreadable slice", { ...validTicketState, vertical_slice_ticket: { ...validTicketState.vertical_slice_ticket, ref: "docs/.scratch/demo/issues/03-missing.md" } }, "vertical-slice-ticket-unreadable"],
65
+ ];
66
+
67
+ for (const [name, state, signal] of cases) {
68
+ const result = validateImplementationEntry(state, options);
69
+ assert.equal(result.result, "blocked", name);
70
+ assert.ok(result.blocking_signals.includes(signal), `${name}: missing ${signal}`);
71
+ }
72
+
73
+ const parentOnly = validateTicketFormalization({
74
+ ...validTicketState,
75
+ vertical_slice_ticket: { ref: "docs/.scratch/demo/parent-ticket.md", kind: "parent-ticket", role: "ready-for-human" },
76
+ }, options);
77
+ assert.equal(parentOnly.result, "blocked");
78
+
79
+ assert.equal(validateNextRoute("work-unit.ticket-decomposition", "work-unit.slice-implementation").result, "allowed");
80
+ for (const current of ["work-unit.spec-synthesis", "work-unit.prototype-design", "work-unit.technical-analysis"]) {
81
+ const result = validateNextRoute(current, "work-unit.slice-implementation");
82
+ assert.equal(result.result, "blocked", current);
83
+ assert.ok(result.blocking_signals.includes("ticket-formalization-required"), current);
84
+ }
85
+ assert.equal(validateNextRoute("work-unit.spec-synthesis", "work-unit.ticket-decomposition").result, "allowed");
86
+ assert.equal(validateNextRoute("work-unit.intensity-aware-verification", "work-unit.intensity-aware-review").result, "allowed");
87
+ assert.equal(validateNextRoute("work-unit.release-and-rollback", null).result, "allowed");
88
+ const arbitraryReadable = validateTicketFormalization({
89
+ ...validTicketState,
90
+ ticket_decomposition_result_ref: "docs/process/lifecycle-registry.yaml",
91
+ ticket_decomposition_result: { result: "completed", evidence_refs: ["docs/process/lifecycle-registry.yaml"] },
92
+ }, options);
93
+ assert.equal(arbitraryReadable.result, "blocked");
94
+ assert.ok(arbitraryReadable.blocking_signals.includes("ticket-decomposition-incomplete"));
95
+ assert.equal(validateTicketFormalization({
96
+ ...validTicketState,
97
+ tracker_kind: "github",
98
+ ticket_decomposition_result_ref: "https://github.com/example/project/issues/1",
99
+ ticket_decomposition_result: { result: "completed", evidence_refs: ["https://github.com/example/project/issues/1"] },
100
+ vertical_slice_ticket_ref: "https://github.com/example/project/issues/1",
101
+ vertical_slice_ticket: { ref: "https://github.com/example/project/issues/1", kind: "vertical-slice-ticket", role: "ready-for-agent" },
102
+ slice_contract: { ...validTicketState.slice_contract, ticket_ref: "https://github.com/example/project/issues/1" },
103
+ }, { ...options, exists: (ref) => ref === "https://github.com/example/project/issues/1", read: (ref) => ref === "https://github.com/example/project/issues/1" ? decompositionResult.replace("docs/.scratch/demo/evidence/ticket-decomposition-result.yaml", "https://github.com/example/project/issues/1") : "" }).result, "allowed");
104
+
105
+ process.stdout.write("生命周期转换压力场景验证通过\n");
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
7
+ const result = spawnSync(process.execPath, [path.join(root, "scripts/verify-digital-human-task-package"), ...process.argv.slice(2)], { stdio: "inherit" });
8
+ process.exitCode = result.status ?? 1;
@@ -0,0 +1,196 @@
1
+ #!/usr/bin/env node
2
+ import assert from "node:assert/strict";
3
+ import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
4
+ import path from "node:path";
5
+ import { spawnSync } from "node:child_process";
6
+ import { ROOT } from "./lib/lifecycle-registry.mjs";
7
+ import { generateTaskPackageDefaults, validateTaskPackage, validateTaskPackageSet } from "./lib/task-package.mjs";
8
+
9
+ const contractRef = ".template-source/evidence/.task-package-slice-contract.json";
10
+ const contractFile = path.join(ROOT, contractRef);
11
+ const templateSourceRoot = path.join(ROOT, ".template-source");
12
+ const templateSourceExisted = existsSync(templateSourceRoot);
13
+ const evidenceRef = ".template-source/evidence/.task-package-evidence.json";
14
+ const evidenceFile = path.join(ROOT, evidenceRef);
15
+ const maintenanceRef = ".template-source/evidence/.task-package-maintenance.json";
16
+ const contract = {
17
+ schema_version: 1,
18
+ contract_id: "slice-todo",
19
+ contract_version: 2,
20
+ slice_id: "todo",
21
+ status: "approved",
22
+ lifecycle_refs: {},
23
+ readiness: {},
24
+ work_units: [
25
+ { id: "work-unit.slice-frontend", role_id: "role.frontend-engineer", runtime_id: "runtime.skill-projection", task_package_ref: "work-unit.slice-frontend", contract_id: "slice-todo", contract_version: 2, allowed_write_paths: ["apps/frontend/todo/"] },
26
+ { id: "work-unit.slice-backend", role_id: "role.backend-engineer", runtime_id: "runtime.skill-projection", task_package_ref: "work-unit.slice-backend", contract_id: "slice-todo", contract_version: 2, allowed_write_paths: ["apps/backend/todo/"] }
27
+ ]
28
+ };
29
+ const maintenance = {
30
+ schema_version: 1,
31
+ intensity: "L2",
32
+ classification_reason: "场景测试维护合同",
33
+ triggers: [],
34
+ changed_assets: ["scenario-fixture"],
35
+ verification_evidence: [
36
+ { kind: "counterexample", command: "scenario", result: "pass" },
37
+ { kind: "fresh-verification", command: "scenario", result: "pass" },
38
+ { kind: "focused-independent-review", command: "scenario", result: "pass" }
39
+ ],
40
+ review_mode: "focused-independent",
41
+ escalation: "none"
42
+ };
43
+
44
+ function writeFixtures() {
45
+ mkdirSync(path.dirname(contractFile), { recursive: true });
46
+ writeFileSync(contractFile, JSON.stringify(contract));
47
+ writeFileSync(evidenceFile, JSON.stringify({ ok: true }));
48
+ writeFileSync(path.join(ROOT, maintenanceRef), JSON.stringify(maintenance));
49
+ }
50
+
51
+ function packageBase(roleId, taskId, workUnitId, kind, contractFields, stageId) {
52
+ writeFixtures();
53
+ return generateTaskPackageDefaults(roleId, {
54
+ task_id: taskId,
55
+ work_unit_id: workUnitId,
56
+ actor_id: `${roleId}.instance-1`,
57
+ ...(stageId ? { stage_id: stageId } : {}),
58
+ runtime_id: "runtime.skill-projection",
59
+ execution_state: "Worker",
60
+ workflow_status: "not-started",
61
+ contract: { kind, contract_id: `${kind}-${taskId}`, contract_version: 1, status: "issued", contract_ref: "docs/process/lifecycle-registry.yaml", ...contractFields },
62
+ inputs: ["CONTEXT.md"],
63
+ objective: "执行有界生命周期工作单元",
64
+ allowed_write_paths: ["docs/.scratch/"],
65
+ forbidden_actions: ["不得越过主控门禁"],
66
+ expected_outputs: ["结构化工作结果"],
67
+ expected_evidence_files: [evidenceRef],
68
+ verification_commands: ["scripts/verify-template"],
69
+ verification_results: [],
70
+ downstream_consumers: ["role.lifecycle-orchestrator"],
71
+ convergence: { parent_work_unit: workUnitId, convergence_ref: "checkpoint:test", conflict_escalation: "返回主控" }
72
+ });
73
+ }
74
+
75
+ function lifecyclePackage() {
76
+ return packageBase("role.requirements-manager", "task-discovery", "work-unit.discovery-opportunity", "lifecycle-work-unit", { lifecycle_ref: "docs/process/lifecycle-registry.yaml", artifact_refs: ["artifact.discovery-record"] , gate_refs: [] , contract_id: "lifecycle-discovery", contract_version: 1 }, "stage.discovery");
77
+ }
78
+
79
+ function lifecycleStagePackage(roleId, taskId, workUnitId, stageId) {
80
+ return packageBase(roleId, taskId, workUnitId, "lifecycle-work-unit", { lifecycle_ref: "docs/process/lifecycle-registry.yaml", contract_id: `lifecycle-${taskId}`, contract_version: 1 }, stageId);
81
+ }
82
+
83
+ function templatePackage() {
84
+ return packageBase("role.lifecycle-orchestrator", "task-maintenance", "work-unit.intensity-aware-verification", "template-maintenance", { maintenance_ref: maintenanceRef, contract_id: "template-maintenance", contract_version: 1 });
85
+ }
86
+
87
+ function slicePackage(roleId, taskId, workUnitId, writePath) {
88
+ writeFixtures();
89
+ return generateTaskPackageDefaults(roleId, {
90
+ task_id: taskId,
91
+ work_unit_id: workUnitId,
92
+ actor_id: `${roleId}.instance-1`,
93
+ stage_id: "stage.vertical-slice-implementation",
94
+ runtime_id: "runtime.skill-projection",
95
+ execution_state: "Worker",
96
+ workflow_status: "not-started",
97
+ contract: { kind: "slice-implementation", contract_id: contract.contract_id, contract_version: contract.contract_version, status: "issued", contract_ref: contractRef, slice_contract_ref: contractRef },
98
+ inputs: ["CONTEXT.md"],
99
+ objective: "实现 Todo 垂直切片",
100
+ allowed_write_paths: [writePath],
101
+ forbidden_actions: ["不得修改合同"],
102
+ expected_outputs: ["实现代码", "测试证据"],
103
+ expected_evidence_files: [evidenceRef],
104
+ verification_commands: ["scripts/verify-template"],
105
+ verification_results: [],
106
+ downstream_consumers: ["role.test-engineer"],
107
+ convergence: { parent_work_unit: "work-unit.slice-implementation", convergence_ref: "checkpoint:todo", conflict_escalation: "返回主控" }
108
+ });
109
+ }
110
+
111
+ function completedResult(pkg, overrides = {}) {
112
+ return {
113
+ result_schema: "workflow-execution-result-v1",
114
+ work_unit: pkg.work_unit_id,
115
+ workflow_reference: `workflow:${pkg.task_id}`,
116
+ result: "completed",
117
+ skill: "yss-product-lifecycle",
118
+ changed_files: [],
119
+ evidence_refs: [evidenceRef],
120
+ deferred_seams: [],
121
+ drift: [],
122
+ violation: [],
123
+ new_impacts: [],
124
+ stale_candidates: [],
125
+ next_route: "work-unit.spec-synthesis",
126
+ blocking_signals: [],
127
+ ...overrides
128
+ };
129
+ }
130
+
131
+ function mustFail(mutator, pattern, label, factory = () => lifecyclePackage()) {
132
+ const value = factory();
133
+ mutator(value);
134
+ assert.throws(() => validateTaskPackage(value), pattern, label);
135
+ }
136
+
137
+ try {
138
+ const discovery = lifecyclePackage();
139
+ const spec = lifecycleStagePackage("role.requirements-manager", "task-spec", "work-unit.spec-synthesis", "stage.spec-architecture");
140
+ const prototype = lifecycleStagePackage("role.product-manager", "task-prototype", "work-unit.prototype-design", "stage.product-design");
141
+ const technical = lifecycleStagePackage("role.backend-engineer", "task-technical", "work-unit.technical-analysis", "stage.system-data-engineering");
142
+ const tickets = lifecycleStagePackage("role.project-manager", "task-tickets", "work-unit.ticket-decomposition", "stage.ticket-formalization");
143
+ const review = lifecycleStagePackage("role.test-engineer", "task-review", "work-unit.code-review", "stage.verification-release-retrospective");
144
+ review.execution_state = "Reviewer";
145
+ review.review_context = { implementation_actor_id: "role.frontend-engineer.instance-1" };
146
+ const maintenance = templatePackage();
147
+ const frontend = slicePackage("role.frontend-engineer", "task-frontend", "work-unit.slice-frontend", "apps/frontend/todo/");
148
+ const backend = slicePackage("role.backend-engineer", "task-backend", "work-unit.slice-backend", "apps/backend/todo/");
149
+ [discovery, spec, prototype, technical, tickets, review].forEach((pkg) => validateTaskPackage(pkg));
150
+ validateTaskPackage(maintenance);
151
+ validateTaskPackage(frontend);
152
+ validateTaskPackage(backend);
153
+ validateTaskPackageSet([frontend, backend]);
154
+
155
+ const completedDiscovery = lifecyclePackage();
156
+ completedDiscovery.workflow_status = "resolved";
157
+ completedDiscovery.verification_results = [{ command: "scripts/verify-template", exit_code: 0, executed_at: "now", evidence_ref: evidenceRef }];
158
+ completedDiscovery.result = completedResult(completedDiscovery);
159
+ validateTaskPackage(completedDiscovery);
160
+
161
+ const validFile = path.join(ROOT, ".template-source/evidence/.task-package-valid.json");
162
+ writeFileSync(validFile, JSON.stringify(discovery));
163
+ for (const cli of ["scripts/verify-digital-human-task-package", "scripts/verify-subagent-task-package"]) {
164
+ const result = spawnSync(process.execPath, [path.join(ROOT, cli), validFile], { encoding: "utf8" });
165
+ assert.equal(result.status, 0, result.stderr);
166
+ }
167
+ rmSync(validFile, { force: true });
168
+
169
+ mustFail((value) => { value.contract.kind = "unknown"; }, /未知 contract.kind|not one of/, "unknown-contract-kind");
170
+ mustFail((value) => { value.contract.slice_contract_ref = contractRef; }, /不得携带专项合同引用/, "lifecycle-slice-ref");
171
+ mustFail((value) => { delete value.contract.lifecycle_ref; }, /lifecycle_ref/, "lifecycle-missing-ref");
172
+ mustFail((value) => { value.contract.kind = "slice-implementation"; delete value.contract.slice_contract_ref; }, /slice_contract_ref/, "slice-missing-ref");
173
+ mustFail((value) => { value.contract.kind = "template-maintenance"; delete value.contract.maintenance_ref; }, /maintenance_ref/, "maintenance-missing-ref");
174
+ mustFail((value) => { value.work_unit_id = "work-unit.intensity-aware-review"; value.contract.kind = "lifecycle-work-unit"; value.contract.lifecycle_ref = "docs/process/lifecycle-registry.yaml"; }, /template-source.*template-maintenance/, "template-source-lifecycle-kind");
175
+ mustFail((value) => { value.work_unit_id = "work-unit.slice-implementation"; value.stage_id = "stage.vertical-slice-implementation"; value.contract.kind = "lifecycle-work-unit"; value.contract.lifecycle_ref = "docs/process/lifecycle-registry.yaml"; }, /不得冒充垂直切片/, "implementation-lifecycle-kind", () => lifecycleStagePackage("role.frontend-engineer", "task-illegal-implementation", "work-unit.slice-implementation", "stage.vertical-slice-implementation"));
176
+ mustFail((value) => { value.convergence.parent_work_unit = "work-unit.code-review"; }, /必须汇合到 work-unit.slice-implementation/, "slice-wrong-parent", () => slicePackage("role.frontend-engineer", "task-slice-parent", "work-unit.slice-frontend", "apps/frontend/todo/"));
177
+ mustFail((value) => { value.contract.status = "stale"; }, /stale 任务包必须暂停/, "stale-not-paused");
178
+ mustFail((value) => { value.runtime_id = "runtime.unknown"; }, /未知 runtime_id/, "unknown-runtime");
179
+ mustFail((value) => { value.skill_source.core_skills = ["forbidden-skill"]; }, /core_skills 必须与角色注册表完全一致/, "skill-source-mismatch");
180
+ mustFail((value) => { value.stage_id = "stage.product-design"; }, /未覆盖 stage_id/, "role-stage-mismatch");
181
+ mustFail((value) => { value.result = { result: "blocked", changed_files: ["docs/../secret.txt"] }; }, /超出 allowed_write_paths|越出仓库/, "write-path-traversal");
182
+ mustFail((value) => { value.execution_state = "Reviewer"; value.review_context = { implementation_actor_id: value.actor_id }; }, /不同 actor_id/, "reviewer-implementer-conflict");
183
+ mustFail((value) => { value.workflow_status = "resolved"; value.verification_results = [{ command: "scripts/verify-template", exit_code: 0, executed_at: "now", evidence_ref: evidenceRef }]; value.result = completedResult(value, { new_impacts: ["api-change"] }); }, /new_impacts 必须为空/, "completed-new-impact");
184
+ mustFail((value) => { value.workflow_status = "resolved"; value.verification_commands = ["scripts/verify-template", "pnpm test"]; value.verification_results = [{ command: "scripts/verify-template", exit_code: 0, executed_at: "now", evidence_ref: evidenceRef }]; value.result = completedResult(value); }, /覆盖全部 verification_commands/, "verification-command-gap");
185
+ mustFail((value) => { value.workflow_status = "resolved"; value.result = completedResult(value, { evidence_refs: [".template-source/evidence/.missing.json"] }); value.verification_results = [{ command: "scripts/verify-template", exit_code: 0, executed_at: "now", evidence_ref: evidenceRef }]; }, /不可读/, "unreadable-evidence");
186
+ mustFail((value) => { value.workflow_status = "resolved"; value.verification_results = [{ command: "scripts/verify-template", exit_code: 0, executed_at: "now", evidence_ref: evidenceRef }]; }, /Workflow Execution Result/, "resolved-without-result");
187
+ mustFail((value) => { value.workflow_status = "resolved"; value.result = { result: "blocked" }; value.verification_results = [{ command: "scripts/verify-template", exit_code: 0, executed_at: "now", evidence_ref: evidenceRef }]; }, /Workflow Execution Result/, "resolved-blocked-result");
188
+ mustFail((value) => { value.workflow_status = "resolved"; value.verification_results = [{ command: "scripts/verify-template", exit_code: 0, executed_at: "now", evidence_ref: evidenceRef }]; value.result = completedResult(value); value.expected_evidence_files = [".template-source/evidence/.missing.json"]; }, /expected_evidence_files.*不可读/, "missing-expected-evidence");
189
+
190
+ process.stdout.write("数字人全生命周期任务包压力场景验证通过\n");
191
+ } finally {
192
+ rmSync(contractFile, { force: true });
193
+ rmSync(evidenceFile, { force: true });
194
+ rmSync(path.join(ROOT, maintenanceRef), { force: true });
195
+ if (!templateSourceExisted) rmSync(templateSourceRoot, { recursive: true, force: true });
196
+ }
@@ -5,7 +5,7 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
5
  cd "$ROOT_DIR"
6
6
  node -e 'const [major]=process.versions.node.split(".").map(Number); if (major < 22 || major >= 27) { console.error("模板工具需要 Node >=22 <27"); process.exit(1); }'
7
7
 
8
- required_files=(yss-project.yaml AGENTS.md CONTEXT.md skills-lock.json docs/agents/yss-skill-registry.yaml docs/agents/digital-human-roles.yaml docs/process/lifecycle-registry.yaml docs/process/lifecycle-registry-baseline.json docs/process/maintenance-intensity.yaml docs/process/schemas/lifecycle-checkpoint.schema.json docs/process/schemas/frontend-implementation-evidence.schema.json docs/process/templates/lifecycle-checkpoint-template.yaml docs/process/templates/frontend-implementation-plan-template.yaml docs/process/templates/frontend-implementation-verification-template.yaml scripts/repository-mode scripts/implementation-path-policy scripts/repository-scope-policy scripts/sync-skills scripts/update-skill-lock scripts/generate-lifecycle-artifacts scripts/verify-lifecycle-registry scripts/verify-lifecycle-checkpoint scripts/verify-frontend-implementation-evidence scripts/verify-maintenance-checkpoint scripts/verify-maintenance-intensity-scenarios scripts/verify-skill-registry scripts/verify-skill-governance scripts/verify-yss-dto-openapi-profile scripts/verify-yss-dto-openapi-scenarios scripts/verify-digital-human-roles scripts/verify-digital-human-roles-scenarios scripts/verify-approval-record scripts/export-yss-skills)
8
+ required_files=(yss-project.yaml AGENTS.md CONTEXT.md skills-lock.json docs/agents/yss-skill-registry.yaml docs/agents/digital-human-roles.yaml docs/process/lifecycle-registry.yaml docs/process/lifecycle-registry-baseline.json docs/process/maintenance-intensity.yaml docs/process/schemas/lifecycle-checkpoint.schema.json docs/process/schemas/frontend-implementation-evidence.schema.json docs/process/schemas/digital-human-task-package.schema.json docs/process/schemas/subagent-task-package.schema.json docs/process/templates/lifecycle-checkpoint-template.yaml docs/process/templates/frontend-implementation-plan-template.yaml docs/process/templates/frontend-implementation-verification-template.yaml docs/templates/subagent-task-package-template.md .agents/skills/yss-tactical-design/SKILL.md .agents/skills/yss-tactical-design/agents/openai.yaml .agents/skills/yss-tactical-design/references/tactical-design-contract.md .agents/skills/yss-tactical-design/references/tactical-design.schema.json .agents/skills/yss-tactical-design/references/validation-rules.md .agents/skills/yss-tactical-design/references/output-template.md .agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs .agents/skills/yss-tactical-design/tests/run-scenarios.mjs scripts/repository-mode scripts/implementation-path-policy scripts/repository-scope-policy scripts/sync-skills scripts/update-skill-lock scripts/generate-lifecycle-artifacts scripts/verify-lifecycle-registry scripts/verify-lifecycle-checkpoint scripts/verify-frontend-implementation-evidence scripts/lib/task-package.mjs scripts/verify-digital-human-task-package scripts/verify-digital-human-task-package-scenarios scripts/verify-subagent-task-package scripts/verify-subagent-task-package-scenarios scripts/verify-lifecycle-transition-scenarios scripts/verify-maintenance-checkpoint scripts/verify-maintenance-intensity-scenarios scripts/verify-skill-registry scripts/verify-skill-governance scripts/verify-yss-dto-openapi-profile scripts/verify-yss-dto-openapi-scenarios scripts/verify-digital-human-roles scripts/verify-digital-human-roles-scenarios scripts/verify-approval-record scripts/export-yss-skills)
9
9
  for required in "${required_files[@]}"; do test -f "$required" || { echo "缺少模板必需文件: $required" >&2; exit 1; }; done
10
10
 
11
11
  repository_mode="$(scripts/repository-mode)"
@@ -20,6 +20,9 @@ scripts/sync-skills --check
20
20
  scripts/update-skill-lock --check
21
21
  scripts/verify-skill-registry
22
22
  scripts/verify-skill-governance
23
+ node --check .agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs
24
+ node --check .agents/skills/yss-tactical-design/tests/run-scenarios.mjs
25
+ node .agents/skills/yss-tactical-design/tests/run-scenarios.mjs
23
26
  scripts/verify-yss-dto-openapi-profile
24
27
  scripts/verify-yss-dto-openapi-scenarios
25
28
  scripts/verify-digital-human-roles
@@ -29,7 +32,15 @@ scripts/verify-lifecycle-registry
29
32
  scripts/verify-lifecycle-checkpoint docs/process/templates/lifecycle-checkpoint-template.yaml
30
33
  scripts/verify-frontend-implementation-evidence --allow-template docs/process/templates/frontend-implementation-plan-template.yaml
31
34
  scripts/verify-frontend-implementation-evidence --allow-template docs/process/templates/frontend-implementation-verification-template.yaml
35
+ scripts/verify-subagent-task-package-scenarios
36
+ scripts/verify-digital-human-task-package-scenarios
37
+ if [[ "$repository_mode" == "template-source" ]]; then
38
+ scripts/verify-digital-human-task-package .template-source/evidence/maintenance/digital-human-task-package-review-task.yaml
39
+ scripts/verify-digital-human-task-package .template-source/evidence/maintenance/lifecycle-ticket-transition-review-task-package.yaml
40
+ scripts/verify-maintenance-checkpoint .template-source/evidence/maintenance/yss-tactical-design-l3-checkpoint-2026-08-27.yaml
41
+ fi
32
42
  scripts/verify-lifecycle-scenarios
43
+ scripts/verify-lifecycle-transition-scenarios
33
44
  scripts/verify-maintenance-intensity-scenarios
34
45
  scripts/verify-governance-release
35
46
  scripts/verify-implementation-path-scenarios
@@ -42,7 +53,7 @@ scripts/verify-yss-ui-scenarios
42
53
  scripts/verify-openapi-yaml-first-scenarios
43
54
  scripts/verify-openapi-json-handoff-scenarios
44
55
 
45
- for entry in scripts/sync-skills scripts/update-skill-lock scripts/generate-lifecycle-artifacts scripts/verify-lifecycle-registry scripts/verify-lifecycle-checkpoint scripts/verify-frontend-implementation-evidence scripts/verify-maintenance-checkpoint scripts/verify-maintenance-intensity-scenarios scripts/verify-skill-registry scripts/verify-skill-governance scripts/verify-yss-dto-openapi-profile scripts/verify-yss-dto-openapi-scenarios scripts/verify-digital-human-roles scripts/verify-digital-human-roles-scenarios scripts/verify-approval-record scripts/verify-lifecycle-scenarios scripts/verify-matt-yss-integration-scenarios scripts/verify-prototype-backend-scaffold-scenarios scripts/verify-yss-router-scenarios scripts/verify-openapi-yaml-first-scenarios scripts/verify-openapi-json-handoff-scenarios scripts/verify-repository-scope-scenarios scripts/export-yss-skills; do node --check "$entry"; done
56
+ for entry in scripts/sync-skills scripts/update-skill-lock scripts/generate-lifecycle-artifacts scripts/verify-lifecycle-registry scripts/verify-lifecycle-checkpoint scripts/verify-frontend-implementation-evidence scripts/lib/task-package.mjs scripts/verify-digital-human-task-package scripts/verify-digital-human-task-package-scenarios scripts/verify-subagent-task-package scripts/verify-subagent-task-package-scenarios scripts/verify-maintenance-checkpoint scripts/verify-maintenance-intensity-scenarios scripts/verify-skill-registry scripts/verify-skill-governance scripts/verify-yss-dto-openapi-profile scripts/verify-yss-dto-openapi-scenarios scripts/verify-digital-human-roles scripts/verify-digital-human-roles-scenarios scripts/verify-approval-record scripts/lib/lifecycle-transition.mjs scripts/verify-lifecycle-scenarios scripts/verify-lifecycle-transition-scenarios scripts/verify-matt-yss-integration-scenarios scripts/verify-prototype-backend-scaffold-scenarios scripts/verify-yss-router-scenarios scripts/verify-openapi-yaml-first-scenarios scripts/verify-openapi-json-handoff-scenarios scripts/verify-repository-scope-scenarios scripts/export-yss-skills; do node --check "$entry"; done
46
57
 
47
58
  legacy_runtime="ru""by"
48
59
  script_roots=(scripts)
@@ -439,7 +439,7 @@
439
439
  "source": "project",
440
440
  "sourceType": "local",
441
441
  "skillPath": ".agents/skills/llm-wiki/SKILL.md",
442
- "effectiveHash": "39fbba419001c5701dc11b6c535f47916da1471cb808412e09f6ddb0485eb3e9",
442
+ "effectiveHash": "b9c7b0bda7e1ea77126d612392faafc999d032f6b75ee8b24d6cf4fada8dd6c5",
443
443
  "targets": [
444
444
  ".agents/skills",
445
445
  ".claude/skills",
@@ -1190,7 +1190,7 @@
1190
1190
  "source": "project",
1191
1191
  "sourceType": "local",
1192
1192
  "skillPath": ".agents/skills/yss-domain/SKILL.md",
1193
- "effectiveHash": "3254ddfca94e1ecca34d43521e781c466d76511c358618b4ad381697987f7bc0",
1193
+ "effectiveHash": "6a4e88ad17cfc143e18e547f89ae7d3d91b59a9131feff1aa8eea0bb8a8b602b",
1194
1194
  "targets": [
1195
1195
  ".agents/skills",
1196
1196
  ".claude/skills",
@@ -1398,7 +1398,7 @@
1398
1398
  "source": "project",
1399
1399
  "sourceType": "local",
1400
1400
  "skillPath": ".agents/skills/yss-product-lifecycle/SKILL.md",
1401
- "effectiveHash": "4c2f7c8d008397e0bfe134461e1e5ea7eadbbe91c18966bce68ae506b7166569",
1401
+ "effectiveHash": "3fb1982be078859996beb35caf5ca2fcf7bc3caa59ba1fbf9cb219aabaa35983",
1402
1402
  "targets": [
1403
1403
  ".agents/skills",
1404
1404
  ".claude/skills",
@@ -1462,7 +1462,7 @@
1462
1462
  "source": "project",
1463
1463
  "sourceType": "local",
1464
1464
  "skillPath": ".agents/skills/yss-router/SKILL.md",
1465
- "effectiveHash": "a43355c7d8a1a5016d75af084328a4cfbb758aa5bf022b644d215c0e868b5bfa",
1465
+ "effectiveHash": "29792bb3938257a12e1f4a175808fceeebfb3318116c6c09621c05d5137cb61d",
1466
1466
  "targets": [
1467
1467
  ".agents/skills",
1468
1468
  ".claude/skills",
@@ -1506,6 +1506,38 @@
1506
1506
  ".trae/skills"
1507
1507
  ]
1508
1508
  },
1509
+ "yss-stage-decision": {
1510
+ "source": "project",
1511
+ "sourceType": "local",
1512
+ "skillPath": ".agents/skills/yss-stage-decision/SKILL.md",
1513
+ "effectiveHash": "ee846c58ba39f4ce76d94db609f7690f3e79518af54478d7b97780febc8eade3",
1514
+ "targets": [
1515
+ ".agents/skills",
1516
+ ".claude/skills",
1517
+ ".codex/skills",
1518
+ ".cursor/skills",
1519
+ ".hermes/skills",
1520
+ ".pi/skills",
1521
+ ".qoder/skills",
1522
+ ".trae/skills"
1523
+ ]
1524
+ },
1525
+ "yss-tactical-design": {
1526
+ "source": "project",
1527
+ "sourceType": "local",
1528
+ "skillPath": ".agents/skills/yss-tactical-design/SKILL.md",
1529
+ "effectiveHash": "c9ad1856974b18af0fd250ee6ad541fcd8cdaab2ad32880488a757094e130ce6",
1530
+ "targets": [
1531
+ ".agents/skills",
1532
+ ".claude/skills",
1533
+ ".codex/skills",
1534
+ ".cursor/skills",
1535
+ ".hermes/skills",
1536
+ ".pi/skills",
1537
+ ".qoder/skills",
1538
+ ".trae/skills"
1539
+ ]
1540
+ },
1509
1541
  "yss-ui": {
1510
1542
  "source": "project",
1511
1543
  "sourceType": "local",
@@ -3,8 +3,8 @@
3
3
  "templateName": "yss-spec-project-template",
4
4
  "templateSource": "github:iloveZzz/yss-spec-project-template",
5
5
  "templateRepository": "https://github.com/iloveZzz/yss-spec-project-template.git",
6
- "requestedRef": "030d8062634018880a3422fd55065d8d8e61e41e",
7
- "templateCommit": "030d8062634018880a3422fd55065d8d8e61e41e",
6
+ "requestedRef": "0c325d4f578481b1aa90c1897c0f986f040ea62b",
7
+ "templateCommit": "0c325d4f578481b1aa90c1897c0f986f040ea62b",
8
8
  "manifestHash": "10d161eb3f0e426aeefad5d0b9e6c5522d8a4dbacb9edf6ed64285dcb40b1a65",
9
9
  "encodedPaths": {
10
10
  ".codex/skills/data-analytics/.gitignore": ".codex/skills/data-analytics/__yss_dotfile__.gitignore",
@@ -12,6 +12,6 @@
12
12
  ".codex/skills/product-design/templates/prototype/.npmrc": ".codex/skills/product-design/templates/prototype/__yss_dotfile__.npmrc",
13
13
  ".gitignore": "__yss_dotfile__.gitignore"
14
14
  },
15
- "snapshotHash": "be94c1d18bbfdbf58971964288ecc5ec2fc3607e80537cb46b667d645df74006",
16
- "generatedAt": "2026-08-26T10:05:21.409Z"
15
+ "snapshotHash": "8b64857b0d8ae008b2aab86ae8ca7cff614e381e919b771cdbc68705d862c259",
16
+ "generatedAt": "2026-08-27T14:52:12.899Z"
17
17
  }