create-yss-spec 2.1.2 → 2.1.4

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 (253) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/template/.agents/skills/code-review/SKILL.md +38 -10
  4. package/template/.agents/skills/yss-api-integration/SKILL.md +25 -7
  5. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  6. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  7. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  8. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  9. package/template/.agents/skills/yss-design-system/SKILL.md +1 -1
  10. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  11. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +13 -17
  12. package/template/.agents/skills/yss-openapi-governance/SKILL.md +89 -114
  13. package/template/.agents/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  14. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +11 -5
  15. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  16. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  17. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +75 -28
  18. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  19. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +8 -0
  20. package/template/.agents/skills/yss-router/SKILL.md +2 -2
  21. package/template/.agents/skills/yss-router/references/router-contract.yaml +4 -6
  22. package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +1 -1
  23. package/template/.agents/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  24. package/template/.claude/skills/code-review/SKILL.md +38 -10
  25. package/template/.claude/skills/yss-api-integration/SKILL.md +25 -7
  26. package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  27. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  28. package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  29. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  30. package/template/.claude/skills/yss-design-system/SKILL.md +1 -1
  31. package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  32. package/template/.claude/skills/yss-openapi-draft-review/SKILL.md +13 -17
  33. package/template/.claude/skills/yss-openapi-governance/SKILL.md +89 -114
  34. package/template/.claude/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  35. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +11 -5
  36. package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  37. package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  38. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +75 -28
  39. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  40. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +8 -0
  41. package/template/.claude/skills/yss-router/SKILL.md +2 -2
  42. package/template/.claude/skills/yss-router/references/router-contract.yaml +4 -6
  43. package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +1 -1
  44. package/template/.claude/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  45. package/template/.codex/skills/code-review/SKILL.md +38 -10
  46. package/template/.codex/skills/yss-api-integration/SKILL.md +25 -7
  47. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  48. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  49. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  50. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  51. package/template/.codex/skills/yss-design-system/SKILL.md +1 -1
  52. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  53. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +13 -17
  54. package/template/.codex/skills/yss-openapi-governance/SKILL.md +89 -114
  55. package/template/.codex/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  56. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +11 -5
  57. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  58. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  59. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +75 -28
  60. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  61. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +8 -0
  62. package/template/.codex/skills/yss-router/SKILL.md +2 -2
  63. package/template/.codex/skills/yss-router/references/router-contract.yaml +4 -6
  64. package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +1 -1
  65. package/template/.codex/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  66. package/template/.hermes/skills/code-review/SKILL.md +38 -10
  67. package/template/.hermes/skills/yss-api-integration/SKILL.md +25 -7
  68. package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  69. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  70. package/template/.hermes/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  71. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  72. package/template/.hermes/skills/yss-design-system/SKILL.md +1 -1
  73. package/template/.hermes/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  74. package/template/.hermes/skills/yss-openapi-draft-review/SKILL.md +13 -17
  75. package/template/.hermes/skills/yss-openapi-governance/SKILL.md +89 -114
  76. package/template/.hermes/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  77. package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +11 -5
  78. package/template/.hermes/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  79. package/template/.hermes/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  80. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +75 -28
  81. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  82. package/template/.hermes/skills/yss-product-lifecycle/references/state-model.md +8 -0
  83. package/template/.hermes/skills/yss-router/SKILL.md +2 -2
  84. package/template/.hermes/skills/yss-router/references/router-contract.yaml +4 -6
  85. package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +1 -1
  86. package/template/.hermes/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  87. package/template/.pi/skills/code-review/SKILL.md +38 -10
  88. package/template/.pi/skills/yss-api-integration/SKILL.md +25 -7
  89. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  90. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  91. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  92. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  93. package/template/.pi/skills/yss-design-system/SKILL.md +1 -1
  94. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  95. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +13 -17
  96. package/template/.pi/skills/yss-openapi-governance/SKILL.md +89 -114
  97. package/template/.pi/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  98. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +11 -5
  99. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  100. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  101. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +75 -28
  102. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  103. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +8 -0
  104. package/template/.pi/skills/yss-router/SKILL.md +2 -2
  105. package/template/.pi/skills/yss-router/references/router-contract.yaml +4 -6
  106. package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +1 -1
  107. package/template/.pi/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  108. package/template/.qoder/skills/code-review/SKILL.md +38 -10
  109. package/template/.qoder/skills/yss-api-integration/SKILL.md +25 -7
  110. package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  111. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  112. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  113. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  114. package/template/.qoder/skills/yss-design-system/SKILL.md +1 -1
  115. package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  116. package/template/.qoder/skills/yss-openapi-draft-review/SKILL.md +13 -17
  117. package/template/.qoder/skills/yss-openapi-governance/SKILL.md +89 -114
  118. package/template/.qoder/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  119. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +11 -5
  120. package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  121. package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  122. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +75 -28
  123. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  124. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +8 -0
  125. package/template/.qoder/skills/yss-router/SKILL.md +2 -2
  126. package/template/.qoder/skills/yss-router/references/router-contract.yaml +4 -6
  127. package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +1 -1
  128. package/template/.qoder/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  129. package/template/.trae/skills/code-review/SKILL.md +38 -10
  130. package/template/.trae/skills/yss-api-integration/SKILL.md +25 -7
  131. package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  132. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  133. package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  134. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  135. package/template/.trae/skills/yss-design-system/SKILL.md +1 -1
  136. package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  137. package/template/.trae/skills/yss-openapi-draft-review/SKILL.md +13 -17
  138. package/template/.trae/skills/yss-openapi-governance/SKILL.md +89 -114
  139. package/template/.trae/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  140. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +11 -5
  141. package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  142. package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  143. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +75 -28
  144. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  145. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +8 -0
  146. package/template/.trae/skills/yss-router/SKILL.md +2 -2
  147. package/template/.trae/skills/yss-router/references/router-contract.yaml +4 -6
  148. package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +1 -1
  149. package/template/.trae/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  150. package/template/AGENTS.md +6 -4
  151. package/template/CONTEXT.md +15 -1
  152. package/template/README.md +2 -1
  153. package/template/__yss_dotfile__.gitignore +4 -0
  154. package/template/docs/adr/0003-machine-readable-lifecycle-registry.md +5 -0
  155. package/template/docs/adr/0004-split-lifecycle-and-router-registry-domains.md +5 -0
  156. package/template/docs/adr/0005-cross-repository-ecosystem-release-manifest.md +5 -0
  157. package/template/docs/adr/0006-stable-lifecycle-ids-and-generated-structure.md +5 -0
  158. package/template/docs/adr/0007-separate-skill-routing-registry-from-integrity-lock.md +5 -0
  159. package/template/docs/agents/issue-tracker.md +1 -0
  160. package/template/docs/api/templates/openapi-draft-review-checklist.md +8 -6
  161. package/template/docs/api/templates/openapi-freeze-record-template.md +8 -2
  162. package/template/docs/api/templates/openapi-json-export-record-template.md +60 -0
  163. package/template/docs/architecture/templates/architecture-review-checklist.md +6 -19
  164. package/template/docs/architecture/templates/functional-architecture-template.md +4 -4
  165. package/template/docs/architecture/templates/system-overview-design-template.md +10 -5
  166. package/template/docs/architecture/templates/tech-design-template.md +4 -11
  167. package/template/docs/discovery/templates/discovery-template.md +0 -1
  168. package/template/docs/implementation/create-yss-spec-repository-mode-contract.md +2 -2
  169. package/template/docs/process/harness-process-tailoring.md +2 -0
  170. package/template/docs/process/harness-work-unit-map.md +14 -10
  171. package/template/docs/process/lifecycle-artifact-map.md +75 -39
  172. package/template/docs/process/lifecycle-registry-baseline.json +61 -0
  173. package/template/docs/process/lifecycle-registry.yaml +255 -0
  174. package/template/docs/process/schemas/lifecycle-registry.schema.json +35 -0
  175. package/template/docs/reviews/lifecycle-registry-phase0-1-red-green-2026-08-17.md +61 -0
  176. package/template/docs/reviews/matt-yss-p0-ticket-review-git-red-green-2026-08-17.md +91 -0
  177. package/template/docs/reviews/openapi-skill-primary-source-research-2026-08-16.md +76 -0
  178. package/template/docs/reviews/openapi-yaml-first-independent-review-2026-08-16.md +121 -0
  179. package/template/docs/reviews/openapi-yaml-first-pressure-scenarios-2026-08-16.md +191 -0
  180. package/template/docs/reviews/openapi-yaml-first-red-green-2026-08-16.md +76 -0
  181. package/template/docs/reviews/openapi-yaml-json-output-independent-review-2026-08-16.md +30 -0
  182. package/template/docs/reviews/openapi-yaml-json-output-scope-red-green-2026-08-16.md +154 -0
  183. package/template/docs/reviews/research-create-yss-spec-refresh-2026-08-16.md +164 -0
  184. package/template/docs/reviews/security-permission-lifecycle-simplification-red-green-2026-08-16.md +43 -0
  185. package/template/docs/reviews/template-release-review-remediation-red-green-2026-08-17.md +41 -0
  186. package/template/docs/templates/agent-brief-template.md +2 -2
  187. package/template/docs/templates/build-architecture-checklist-template.md +3 -4
  188. package/template/docs/templates/implementation-repo-registry-template.md +0 -2
  189. package/template/docs/templates/implementation-routing-template.md +6 -6
  190. package/template/docs/templates/openapi-spec-template.yaml +0 -6
  191. package/template/docs/templates/review-report-template.md +2 -1
  192. package/template/docs/templates/spec-delta-template.md +1 -1
  193. package/template/docs/templates/spec-template.md +0 -1
  194. package/template/docs/templates/vertical-slice-ticket-template.md +2 -2
  195. package/template/docs/user-guide//344/272/247/345/223/201/347/224/237/345/221/275/345/221/250/346/234/237/345/267/245/344/275/234/346/265/201.md +6 -6
  196. package/template/docs/user-guide//344/272/247/345/223/201/347/240/224/345/217/221/345/205/250/347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +3 -3
  197. package/template/docs/user-guide//345/244/226/351/203/250/345/221/275/344/273/244/350/241/214/345/267/245/345/205/267/345/256/236/350/267/265/346/214/207/345/215/227.md +1 -1
  198. package/template/docs/user-guide//347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +1 -1
  199. package/template/scripts/generate-lifecycle-artifacts +26 -0
  200. package/template/scripts/lifecycle-registry.rb +194 -0
  201. package/template/scripts/sync-skills +1 -0
  202. package/template/scripts/test-export-yss-skills.rb +8 -6
  203. package/template/scripts/test-lifecycle-registry.rb +74 -0
  204. package/template/scripts/update-skill-lock +1 -0
  205. package/template/scripts/verify-governance-release +39 -0
  206. package/template/scripts/verify-lifecycle-registry +67 -0
  207. package/template/scripts/verify-lifecycle-scenarios +114 -17
  208. package/template/scripts/verify-matt-yss-integration-scenarios +297 -1
  209. package/template/scripts/verify-openapi-json-handoff-scenarios +270 -0
  210. package/template/scripts/verify-openapi-yaml-first-scenarios +120 -0
  211. package/template/scripts/verify-template +37 -5
  212. package/template/scripts/verify-yss-router-scenarios +42 -14
  213. package/template/skills-lock.json +9 -24
  214. package/template/wiki/raw/skills-lock.json +0 -15
  215. package/template/wiki/wiki/OpenAPI/345/245/221/347/272/246.md +1 -1
  216. package/template/wiki/wiki/YSS/345/267/245/347/250/213/346/212/200/350/203/275/344/275/223/347/263/273.md +1 -1
  217. package/template/yss-public-skills.json +3 -5
  218. package/template.snapshot.json +4 -4
  219. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  220. package/template/.agents/skills/yss-openapi/SKILL.md +0 -116
  221. package/template/.agents/skills/yss-openapi/agents/openai.yaml +0 -4
  222. package/template/.agents/skills/yss-openapi/img.png +0 -0
  223. package/template/.agents/skills/yss-openapi/img_1.png +0 -0
  224. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  225. package/template/.claude/skills/yss-openapi/SKILL.md +0 -116
  226. package/template/.claude/skills/yss-openapi/agents/openai.yaml +0 -4
  227. package/template/.claude/skills/yss-openapi/img.png +0 -0
  228. package/template/.claude/skills/yss-openapi/img_1.png +0 -0
  229. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  230. package/template/.codex/skills/yss-openapi/SKILL.md +0 -116
  231. package/template/.codex/skills/yss-openapi/agents/openai.yaml +0 -4
  232. package/template/.codex/skills/yss-openapi/img.png +0 -0
  233. package/template/.codex/skills/yss-openapi/img_1.png +0 -0
  234. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  235. package/template/.hermes/skills/yss-openapi/SKILL.md +0 -116
  236. package/template/.hermes/skills/yss-openapi/agents/openai.yaml +0 -4
  237. package/template/.hermes/skills/yss-openapi/img.png +0 -0
  238. package/template/.hermes/skills/yss-openapi/img_1.png +0 -0
  239. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  240. package/template/.pi/skills/yss-openapi/SKILL.md +0 -116
  241. package/template/.pi/skills/yss-openapi/agents/openai.yaml +0 -4
  242. package/template/.pi/skills/yss-openapi/img.png +0 -0
  243. package/template/.pi/skills/yss-openapi/img_1.png +0 -0
  244. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  245. package/template/.qoder/skills/yss-openapi/SKILL.md +0 -116
  246. package/template/.qoder/skills/yss-openapi/agents/openai.yaml +0 -4
  247. package/template/.qoder/skills/yss-openapi/img.png +0 -0
  248. package/template/.qoder/skills/yss-openapi/img_1.png +0 -0
  249. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  250. package/template/.trae/skills/yss-openapi/SKILL.md +0 -116
  251. package/template/.trae/skills/yss-openapi/agents/openai.yaml +0 -4
  252. package/template/.trae/skills/yss-openapi/img.png +0 -0
  253. package/template/.trae/skills/yss-openapi/img_1.png +0 -0
@@ -1,145 +1,120 @@
1
1
  ---
2
2
  name: yss-openapi-governance
3
- description: Use when Govern and lint YSS OpenAPI design-time contracts with Spectral or Redocly CLI before OpenAPI Freeze. Use when creating or maintaining organization-level OpenAPI style rules, validating `docs/.scratch/<feature>/api/<feature>.yaml`, defining API naming/error/pagination/permission conventions, adding contract-test checklist rules, or checking generated smart-doc output against YSS API governance. Do not use for smart-doc or Orval generation; use yss-openapi for that implementation workflow.
3
+ description: Use when creating, governing, linting, freezing, or exporting YSS OpenAPI 3.1 design-time contracts. The frozen YAML is the only authority; this skill produces the reviewed JSON derivative consumed by frontend client generation.
4
4
  ---
5
5
 
6
6
  # YSS OpenAPI Governance
7
7
 
8
- Use this skill to make OpenAPI contracts consistent, lintable, and reviewable before implementation. This is the ruleset and governance layer for `docs/.scratch/<feature>/api/<feature>.yaml`; it is not the smart-doc / Orval generation workflow.
8
+ 本 skill 负责 YSS OpenAPI 的 **YAML-first** 工作流:
9
9
 
10
- ## Boundary
10
+ ```text
11
+ Spec / 设计输入 → OpenAPI YAML Draft → 审查与 Freeze → JSON 派生物 → 下游既有前端代码生成流程
12
+ ```
11
13
 
12
- Use `yss-openapi-governance` for:
14
+ `docs/.scratch/<feature>/api/<feature>.yaml` 是唯一权威的 OpenAPI 3.1 契约。JSON 只能由冻结后的 YAML 可复现地产生,用于前端代码生成或分发;不得手写、不得反向覆盖 YAML、不得把运行时代码当成设计契约来源。
13
15
 
14
- - Defining or applying reusable OpenAPI style rules.
15
- - Running Spectral or Redocly CLI against `docs/.scratch/<feature>/api/<feature>.yaml`.
16
- - Checking YSS response wrappers, error contracts, pagination, permissions, security red lines, and contract-test seams.
17
- - Comparing generated `openapi.json` against frozen design rules when backend code is already implemented.
18
- - Writing or updating governance notes under `docs/.scratch/<feature>/api/`, `docs/.scratch/<feature>/architecture/`, or the active Spec Delta design.
16
+ ## 边界与职责
19
17
 
20
- Use other skills for:
18
+ 使用 `yss-openapi-governance`:
21
19
 
22
- - `yss-openapi`: generate `target/openapi/openapi.json` from implemented controllers/DTOs and refresh Orval clients.
23
- - `yss-openapi-draft-review`: perform fail-closed semantic review against Spec, prototype, page actions, P0 coverage, and architecture readiness.
24
- - `docs/.scratch/<feature>/spec-delta/` and `to-tickets`: formalize behavior changes and implementation tickets after the contract is frozen.
20
+ - 基于冻结前的 Spec、产品设计、架构约束创建或更新 `docs/.scratch/<feature>/api/<feature>.yaml`。
21
+ - 保证 YAML 是单一 YAML document、根节点为 `openapi: 3.1.0`,且不把 `pipeline`、`stage`、`status`、`owner` 等生命周期元数据写入 OpenAPI 根节点。
22
+ - 运行受项目 lockfile 约束的 lint / bundle,检查 `$ref`、operationId、响应包装、错误、分页、幂等和契约测试 seam;只有 Spec 明确改变认证或授权行为时才检查对应契约。
23
+ - 在 OpenAPI Freeze 后,用锁定的 Redocly CLI 将 YAML bundle 为 JSON,并记录可重现证据。
24
+ - 维护治理记录、Freeze 记录和 JSON 派生记录。
25
+ - Spec Delta 影响存在时,在 `docs/.scratch/<feature>/spec-delta/` 记录与冻结 YAML 的关系;没有影响时明确记录 `not-applicable`。
25
26
 
26
- ## Preferred Tooling
27
+ 不使用本 skill 来替代:
27
28
 
28
- Prefer Spectral when the repo needs a portable, custom OpenAPI ruleset:
29
+ - `yss-openapi-draft-review`:独立、fail-closed 的语义评审与 P0 追踪。
30
+ - `api-integration`:消费已派生的 JSON,并在目标前端实现仓库中接入既有客户端生成流程。
31
+ - `to-tickets`:在 Freeze 后正式化垂直切片。
29
32
 
30
- ```bash
31
- npx --yes @stoplight/spectral-cli lint -r .spectral.yaml docs/.scratch/<feature>/api/<feature>.yaml
32
- ```
33
+ ## 受控工具链
33
34
 
34
- Prefer Redocly CLI when the repo already uses Redocly for lint, bundle, docs, or CI:
35
+ 在持有冻结 YAML 与派生记录的项目工作区中,将 `@redocly/cli` 固定在 `devDependencies` 并提交对应的 pnpm lockfile。使用项目脚本或下列等价命令;不得使用浮动 `npx --yes`、全局安装或未记录版本的转换器。
35
36
 
36
37
  ```bash
37
- npx --yes @redocly/cli lint docs/.scratch/<feature>/api/<feature>.yaml
38
+ pnpm exec redocly lint docs/.scratch/<feature>/api/<feature>.yaml
39
+
40
+ pnpm exec redocly bundle \
41
+ docs/.scratch/<feature>/api/<feature>.yaml \
42
+ --output docs/.scratch/<feature>/api/<feature>.json \
43
+ --ext json \
44
+ --component-renaming-conflicts-severity=error \
45
+ --metafile docs/.scratch/<feature>/api/<feature>.bundle-metafile.json
38
46
  ```
39
47
 
40
- If neither tool is configured, do not invent project policy silently. Create or propose a minimal config and mark it as draft until reviewed. Use Spectral as the default baseline for custom YSS rules because its YAML rulesets are easy to version and extend.
41
-
42
- ## Governance Flow
43
-
44
- 1. Locate contract inputs.
45
- - Check `docs/.scratch/<feature>/api/<feature>.yaml` first.
46
- - If only generated contracts exist, inspect `*/target/openapi/openapi.json` or frontend `openapi/openapi.json` as implemented evidence, not as design authority.
47
- - Confirm whether the task is pre-freeze design governance or post-implementation conformance checking.
48
-
49
- 2. Detect existing lint configuration.
50
- - Look for `.spectral.yaml`, `.spectral.yml`, `redocly.yaml`, `redocly.yml`, `package.json` scripts, or CI jobs.
51
- - Reuse the existing toolchain and scripts when present.
52
- - If both Spectral and Redocly exist, run the repo's documented CI path first, then targeted local lint.
53
-
54
- 3. Validate baseline OpenAPI correctness.
55
- - Parse YAML/JSON successfully.
56
- - Check OpenAPI version, `$ref` resolution, duplicate `operationId`, path parameter coverage, unused schemas, and invalid examples.
57
- - Bundle or dereference only when needed for tooling; keep source files maintainable.
58
-
59
- 4. Apply YSS API governance rules.
60
- - Paths are versioned under `/api/v1/` unless a documented exception exists.
61
- - Operations use stable `operationId` values suitable for Orval/client generation.
62
- - Single-object responses use `SingleResult<T>`.
63
- - Non-page list responses use `MultiResult<T>`.
64
- - Page responses use `PageResult<T>` and expose the project's standard page request/response fields.
65
- - Error responses include a consistent envelope, machine-readable code, human-readable message, and field/model-level validation shape where applicable.
66
- - Permission failures avoid data leakage; 403/disabled-action behavior is explicit.
67
- - Mutating operations define idempotency, optimistic locking, or conflict semantics when repeated submission or concurrent edits are possible.
68
- - Download, upload, export, import, audit, sensitive data, SQL, DDL, authentication, authorization, and encryption surfaces are marked for human/security review when they touch AGENTS.md safety red lines.
69
- - Contract-test seams are named for each P0 workflow and critical error path.
70
-
71
- 5. Produce governance output.
72
- - For quick checks, report lint command, pass/fail result, and blocking findings with file paths.
73
- - For durable decisions, write or update a Chinese governance artifact under `docs/.scratch/<feature>/api/` or `docs/.scratch/<feature>/architecture/`.
74
- - For active Spec Delta work, reference `docs/.scratch/<feature>/spec-delta/` and keep rules aligned with the related design, task, and spec artifacts.
75
-
76
- ## Minimal Spectral Baseline
77
-
78
- When the repo lacks a ruleset and the user asks to add one, start with a small `.spectral.yaml` that extends the OpenAPI baseline and encodes only stable YSS rules. Keep controversial product semantics in review checklists until the team agrees.
79
-
80
- ```yaml
81
- extends:
82
- - spectral:oas
83
-
84
- rules:
85
- yss-paths-versioned:
86
- description: YSS API paths should be versioned under /api/v1.
87
- message: "Path '{{property}}' should start with /api/v1/ or document an exception."
88
- severity: warn
89
- given: "$.paths[*]~"
90
- then:
91
- function: pattern
92
- functionOptions:
93
- match: "^/api/v1/"
94
-
95
- yss-operation-id-required:
96
- description: Operation IDs must be stable for generated clients and contract tests.
97
- severity: error
98
- given: "$.paths[*][*]"
99
- then:
100
- field: operationId
101
- function: truthy
102
-
103
- yss-tags-required:
104
- description: Operations should be grouped by bounded context or module.
105
- severity: warn
106
- given: "$.paths[*][*]"
107
- then:
108
- field: tags
109
- function: truthy
110
- ```
48
+ 默认 bundle 保留内部 `$ref`,不要为图省事加入 `--dereferenced`;递归模型或循环引用需要保留其可表示的 `$ref` 结构。若项目将命令包装为 `pnpm openapi:bundle`,该脚本必须实际执行上述 `redocly bundle` 语义,并在记录中写明脚本和已锁定的包版本。
111
49
 
112
- Do not overfit Spectral rules when human review is better. For example, "uses `SingleResult<T>` correctly" may require schema convention inspection and YSS context; encode it only if the repo has stable wrapper schema names.
50
+ `$ref` 默认只允许引用本 feature API 目录内的相对文件;禁止远程 URL、绝对路径以及越出该目录的路径遍历。需要共享组件或例外时,先在治理 / 架构记录中列出允许位置、所有者与 Freeze 影响,再执行 bundle。
113
51
 
114
- ## Blocking Rules
52
+ ## 治理流程
115
53
 
116
- Block OpenAPI Freeze if any of these are true:
54
+ 1. **建立或读取 YAML Draft**
55
+ - 读取 Spec、产品设计 / 状态矩阵、架构约束和既有 Freeze 记录。
56
+ - 在 `docs/.scratch/<feature>/api/<feature>.yaml` 创建或更新单一 OAS 3.1 文档;生命周期状态写入相邻 Markdown 记录,不写入 YAML 前置元数据。
57
+ - 所有操作使用稳定、可生成客户端的 `operationId`;页面动作可通过 `x-yss-action-key` 或同路径的追踪矩阵关联。
117
58
 
118
- - The contract cannot be parsed or linted with the repo's configured tool.
119
- - A public operation lacks `operationId`, response schema, or error contract.
120
- - Pagination, list, or single-object response wrappers contradict YSS baseline without a documented exception.
121
- - Permission, validation, conflict, import/export, upload/download, or sensitive-data behavior is ambiguous.
122
- - A safety-red-line area is implemented as final contract without `TODO-HUMAN-REVIEW` or equivalent review record.
123
- - Contract tests cannot be identified for P0 flows and critical error paths.
59
+ 2. **运行结构与治理校验**
60
+ - 先执行项目锁定的 `pnpm exec redocly lint` 或等价 CI 脚本。
61
+ - 检查 YAML 可解析、`$ref` 可解析、路径参数完整、operationId 唯一、examples 合法、schema 命名稳定。
62
+ - 检查 `/api/v1/` 版本策略(或记录例外)、`SingleResult<T>` / `MultiResult<T>` / `PageResult<T>`、统一错误结构、分页、幂等 / 乐观锁和契约测试 seam。Spec 明确改变认证或授权行为时,把对应 `401` / `403`、资源过滤和错误语义作为普通 API 行为检查。
124
63
 
125
- ## Output Contract
64
+ 3. **独立 Draft Review 与 Freeze**
65
+ - 将 fresh lint 证据交给 `yss-openapi-draft-review`;阻断项未关闭前,YAML 仍是 review-only Draft,不得生成生产客户端。
66
+ - Freeze 记录必须引用 YAML 路径、Git ref(如适用)和 YAML SHA-256。冻结后 API 行为变更必须先回到 YAML Draft 与审查。
126
67
 
127
- ```markdown
128
- ### Governance Result
129
- <Pass / Blocked / Draft Rules Proposed>
68
+ 4. **从冻结 YAML 派生 JSON**
69
+ - 使用上面的锁定 `redocly bundle` 命令生成 `docs/.scratch/<feature>/api/<feature>.json`,JSON 不纳入人工编辑面。
70
+ - 对输出 JSON 重新执行解析 / lint(按项目工具链),确认 bundle 未产生组件重名冲突或无法解析的引用。
71
+ - 写入 `docs/.scratch/<feature>/api/<feature>-json-export.md`,可从 `docs/api/templates/openapi-json-export-record-template.md` 创建。
72
+ - 记录 YAML SHA-256、JSON SHA-256、OAS 版本、Redocly CLI 版本与 lockfile 引用、完整命令、metafile、`$ref` 例外以及结果。
73
+
74
+ 5. **交给下游前端**
75
+ - 仅当 Freeze、JSON 派生记录和 JSON 校验均通过时,才把派生 JSON 交给 `api-integration` 与目标前端实现仓库。
76
+ - JSON 的治理产物固定为 `docs/.scratch/<feature>/api/<feature>.json`。跨仓库时只能由批准的 Cross-repo 子合同或项目脚本将同一字节内容物化为 `<frontend>/openapi/openapi.json`,并记录两端相同的 SHA-256 与交接路径。
77
+ - 本模板不读取、修改或验证目标前端项目的客户端生成配置,不执行客户端生成,也不把生成动作加入 CI;目标前端项目在需要时手动运行其既有代码生成命令。
78
+ - 接口调整回写 YAML,而不是编辑 JSON 或生成的 TypeScript。
130
79
 
131
- ### Tooling
132
- - <Spectral/Redocly command used or proposed>
80
+ ## 阻断规则
133
81
 
134
- ### Blocking Findings
135
- - <file:line grounded finding>
82
+ 阻断 OpenAPI Freeze 或 JSON 导出,若:
136
83
 
137
- ### Rule Changes
138
- - <ruleset/config changes made or proposed>
84
+ - YAML 不是单一 OAS 3.1 document,或其根节点混入生命周期元数据。
85
+ - YAML / `$ref` / lint 不通过,operationId 不稳定或不唯一,或路径参数、schema、examples 无法解析。
86
+ - P0 操作缺请求、响应、错误、并发 / 幂等规则或可验证 seam;Spec 明确的认证或授权行为没有契约表示。
87
+ - `$ref` 超出允许范围,或转换器版本、lockfile、命令、输入 YAML 无法识别。
88
+ - Freeze 记录、YAML SHA-256、JSON SHA-256、JSON 解析 / lint 证据缺失。
89
+ - JSON 被手工编辑,或生成结果试图反向成为 YAML 的权威来源。
139
90
 
140
- ### YSS Contract Checks
141
- - <response wrappers, errors, pagination, permissions, security red lines, contract tests>
91
+ ## 输出契约
142
92
 
143
- ### Next Action
144
- - <fix draft / run yss-openapi-draft-review / enter OpenAPI Freeze / compare generated contract>
93
+ ```markdown
94
+ ### Governance Result
95
+ <Draft / Approved for Freeze / Blocked / JSON Exported>
96
+
97
+ ### YAML Authority
98
+ - YAML: <docs/.scratch/<feature>/api/<feature>.yaml>
99
+ - OAS: 3.1.0
100
+ - YAML SHA-256: <sha256>
101
+ - Freeze record: <path / ref>
102
+
103
+ ### Validation
104
+ - Lint command and result: <locked pnpm command / result>
105
+ - `$ref` policy / approved exceptions: <details>
106
+ - Blocking findings: <file:line grounded finding>
107
+
108
+ ### JSON Derivative
109
+ - JSON: <docs/.scratch/<feature>/api/<feature>.json>
110
+ - JSON SHA-256: <sha256>
111
+ - Redocly CLI / lockfile: <version and lock reference>
112
+ - Bundle command and metafile: <command / path>
113
+ - JSON validation result: <pass / blocked>
114
+
115
+ ### Downstream Handoff
116
+ - Canonical JSON / frontend materialization SHA-256: <same sha / blocked>
117
+ - Frontend materialization path: <frontend/openapi/openapi.json / blocked>
118
+ - Existing frontend code generation: <manual command in target repository / blocked reason>
119
+ - Template boundary: <no frontend configuration, code-generation execution, or CI change>
145
120
  ```
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "YSS OpenAPI Governance"
3
- short_description: "Lint and govern YSS OpenAPI drafts"
4
- default_prompt: "Use $yss-openapi-governance to lint and govern a YSS OpenAPI draft before freeze."
3
+ short_description: "Govern YAML-first OpenAPI and export frozen JSON"
4
+ default_prompt: "Use $yss-openapi-governance to govern an OpenAPI YAML Draft, freeze it, and export its reviewed JSON derivative."
@@ -12,7 +12,7 @@ YSS 产品研发的全生命周期主控编排器。它决定阶段、条件门
12
12
  1. 读取根目录 `yss-project.yaml`;非法或缺失时停止并进入迁移检查。
13
13
  2. 读取 `CONTEXT.md`、相关 ADR、父 Ticket/checkpoint、当前资产与 tracker 配置。
14
14
  3. `template-source` 只走模板维护流程;不得生成具体产品 Spec、原型、OpenAPI 或切片 Ticket。
15
- 4. `project-instance` 以 `docs/process/lifecycle-artifact-map.md` 和 `docs/process/harness-process-tailoring.md` 为阶段、门禁和裁剪事实来源。
15
+ 4. `project-instance` 以 `docs/process/lifecycle-registry.yaml`、由其派生的 `docs/process/lifecycle-artifact-map.md` 和 `docs/process/harness-process-tailoring.md` 为阶段、门禁和裁剪事实来源。
16
16
 
17
17
  YSS 仓库以本 skill 为直接入口,不机械嵌套调用 `ask-matt`。`ask-matt` 仅在用户显式调用时作为 Matt 通用导航,且不得修改 Matt skills。
18
18
 
@@ -29,7 +29,8 @@ YSS 仓库以本 skill 为直接入口,不机械嵌套调用 `ask-matt`。`ask
29
29
 
30
30
  ## 核心规则
31
31
 
32
- - 保留 8 个主阶段;21 个门禁全部按影响面条件强制。命中项必须达到 `approved`,未命中项记录 `not-applicable` 和原因。
32
+ - 保留生命周期注册表定义的主阶段;其中条件门禁全部按影响面强制。命中项必须达到 `approved`,未命中项记录 `not-applicable` 和原因;产物、工作单元和证据不得被统称为门禁。
33
+ - 安全 / 权限不设独立生命周期资料、专属门禁或 `not-applicable` 记录。只有需求或冻结资产明确要求改变认证、授权、租户隔离、敏感数据或合规行为时,才把该行为写入普通 Spec、API、架构、验收和测试 seam,并仅按实际 UI、API、Backend、Data、High-risk 影响触发既有门禁;普通 action 注册、沿用认证中间件、未变化的 `401` / `403`、一般字段、SQL / DDL / 迁移和上传 / 下载本身不触发安全 / 权限流程。
33
34
  - 有效 `yss-project.yaml` 存在时,`ask-matt` 和 `setup-matt-pocock-skills` 只能作为子流程;最终入口、仓库身份和模式裁决归本编排器。
34
35
  - `template-source` 命中产品 flow 时必须返回 `blocked`(`template-source-product-artifact-forbidden`),不得继续到产品资产或 Ticket 生成。
35
36
  - 文件存在不等于就绪。按内容、审查结论和上游新鲜度评估资产。
@@ -37,14 +38,17 @@ YSS 仓库以本 skill 为直接入口,不机械嵌套调用 `ask-matt`。`ask
37
38
  - 上游变化按依赖图精准传播 `stale`;不要无条件重跑完整阶段。
38
39
  - Matt 五态保持原义。只有解除阻塞、门禁通过且可直接实现的垂直切片才能使用 `ready-for-agent`。
39
40
  - YSS active 调用 `to-spec` 时,必须把 Matt 独立 flow 的 `ready-for-agent` 发布提示归一化为 Spec `ready-for-human`;不得把 Spec 初稿当作可直接实现的 Ticket。
41
+ - YSS active 调用 `to-tickets` 时,新建垂直切片统一写为 `ready-for-human`;只有本编排器复算完整 `ready-for-agent` 公式后才能提升,Matt 的通用默认标签不得提前覆盖生命周期状态。
40
42
  - `orchestrate`/`resume` 连续执行安全工作单元,直到人工门禁、真实阻塞、新授权、实现/发布裁决或专项失败。
41
- - 进入实现后继续主控,通过 `yss-router`、`implement`、`tdd` 和 YSS 专项 skills 执行;独立审查和 fresh verification 后才能作完成判断。
43
+ - 进入实现后继续主控,通过 `yss-router`、`implement`、`tdd` 和 YSS 专项 skills 执行;独立审查和 fresh verification 后才能作完成判断。只有工作单元真实触碰当前用户、审计、加密或明确的权限业务行为时,才增加 `yss-userinfo`、`yss-audit-log`、`yss-security-algorithm` 等专项依赖。
42
44
  - 原型确认 → 后端脚手架:当 YSS 高保真原型已经完成 Prototype Review、AntD CLI 校验和用户确认,且 backend `scaffold_status=required` 时,先完成工程基线,由 `yss-router` 编译脚手架受控生成工作单元合同,经生命周期编排器批准并持久化后,才使用 `yss-ddd-scaffold-generator` 生成后端骨架;随后由 `yss-backend-scaffold-parent` 校验并重新进入 `yss-router`,不得先写业务代码。
43
45
  - 所有后续生成的后端代码都必须消费生命周期批准、已持久化且版本当前的 Slice Implementation Contract,绑定最小 YSS skill 闭包、允许写路径、证据文件和 YSS Skill Execution Result;没有这些证据时必须阻断。
44
46
  - Harness 内承载运行时代码时,项目路径策略固定为 `apps/backend/<project>/` 和 `apps/frontend/<project>/`;`apps/backend/`、`apps/frontend/` 仅是项目容器,`app/backend/`、`app/frontend/` 及其子路径禁止生成。外部实现仓库不强制使用该目录,但必须登记真实项目根路径并写入合同。
45
47
  - Setup readiness 每个任务只评估一次并在本轮缓存;只有 tracker、主远端、真实标签或配置变化时重查。
46
48
  - Ticket tracker 支持 `local-markdown`、GitHub 和 GitLab;模板默认 `local-markdown`,以 `docs/.scratch/<feature>/` 完整功能包为主载体。Git remote 只代表代码托管,不能覆盖已持久化的 tracker 选择;Local 主 tracker 不要求远程 Ticket。根 `.scratch/` 与 `docs/requirements/tickets/` 只作为旧路径迁移来源。
47
49
  - 小改动和中等变更允许同一独立执行者完成 Review 与 fresh verification;该执行者不得是实现者。新模块、高风险或职责冲突时拆分 Reviewer 与 Verifier。
50
+ - 进入 `code-review` 前必须持久化或明确传入 `review_mode`、`review_base_ref`、`candidate_snapshot_ref`、`candidate_digest` 和完整候选引用;`worktree` 模式必须一次捕获 committed、staged、unstaged、untracked,并让两个 Reviewer 消费同一快照,不能用只看 `HEAD` 或实时变化的 diff 宣称已审查。候选 manifest 和 `yss-worktree-candidate-v1` 不可变摘要流以 `orchestration-contract.yaml.review_input` 为唯一机器契约。
51
+ - 实现授权不包含 Git 授权。只有用户分别明确给出值为 `true` 的 `commit_authorized` / `push_authorized`、非空 scope 和对应 `*_authorization_ref` 时才执行动作;缺失时只记录 checkpoint 判断,不得把 `implement`、`orchestrate`、当前分支或负责人要求解释成隐含授权。
48
52
  - 连续自动推进期间累积 Ticket/Git 证据,在人工暂停、handoff、进入实现、合并或发布边界集中 checkpoint;不为每个连续经过的概念阶段重复写同类记录。
49
53
  - 跨线程、仓库、原型分支或上下文边界时使用 `handoff` 或等价记录。
50
54
  - 在 Matt 阶段边界(phase boundary)先按 `Continue → /clear → /handoff → subagent → /compact` 判断上下文动作;只在 checkpoint 记录可选 `phase_boundary` 证据,不新增生命周期状态。
@@ -62,15 +66,17 @@ YSS 仓库以本 skill 为直接入口,不机械嵌套调用 `ask-matt`。`ask
62
66
  - `yss-ddd-scaffold-generator` 必须读取已持久化的结构化脚手架合同 JSON,并校验 `status=approved`、当前版本、主 skill、`controlled-generation` 和固定验证命令;只传任意字符串引用不得放行。
63
67
  - 生成项目必须包含 `.yss/scaffold-generation.json`,回勾实际使用的合同 ID、版本、Router draft 引用、生命周期批准引用、持久化引用、生成输入、受控模式和固定验证命令;元数据清单缺失或过期时阻断后续 Router。
64
68
  - 三条 `./mvnw` 命令必须由受控工作单元真实执行,并记录每条命令的 `exit_code`、`duration_ms`、stdout/stderr 引用和执行时间;生成器打印的命令、输出目录存在或“生成成功”都不构成验证证据。
65
- - 脚手架只生成多模块工程结构、POM、配置、Wrapper、Smart Doc 和经验证的机械模板;不得生成或承载领域规则、状态机、权限、事务、复杂查询、错误映射或用户可见业务行为。
69
+ - 脚手架只生成多模块工程结构、POM、配置、Wrapper 和经验证的机械模板;不得生成或承载领域规则、状态机、权限、事务、复杂查询、错误映射或用户可见业务行为。
66
70
  - 该生命周期脚手架工作单元必须关闭 `--with-example`,不得把 User CRUD 或业务字段伪装成样板;目标目录非空时 `--force` 默认阻断,只有覆盖范围、备份、回滚点和明确批准全部进入合同后才能另行审查。
67
71
  - `scaffold_status=existing` 或 `initialized` 时不重复全量生成,但仍须完成 `yss-backend-scaffold-parent` 基线证据、Wrapper 校验和 `yss-router` 合同重编译。
68
72
  - 脚手架完成不等于实现仓库接入、架构放行、契约批准或 `ready-for-agent`。后续每一个 Agent / generator 写入的后端代码都必须绑定批准合同和对应 YSS skill;业务行为只能使用 `behavior-tdd`,机械生成才可使用 `controlled-generation`。
69
73
 
70
74
  | 压力诱因 | 统一裁决 |
71
75
  |---|---|
76
+ | “普通 action、SQL / DDL 或下载也要补安全姿态吗” | 不补。没有明确的安全 / 权限行为需求时只按实际 API、Data 或工程影响推进;明确改变相关行为时也只复用普通产物和门禁。 |
77
+ | “延期项先不写责任人和目标版本,之后再补” | 阻断 `seam-deferred`;必须写风险、责任人、后续 Ticket、验证计划和目标版本 / 发布日期。 |
72
78
  | “脚手架本来就是 YSS,先生成代码再补合同” | 先阻断;Router draft 不能批准合同或替代生命周期放行。 |
73
- | “`./mvnw validate` 已通过,直接继续最省时间” | 只证明工程基线可验证,不证明业务、权限、事务或契约已获批;三条实际命令的结果还必须进入 Execution Result。 |
79
+ | “`./mvnw validate` 已通过,直接继续最省时间” | 只证明工程基线可验证,不证明业务、事务或契约已获批;三条实际命令的结果还必须进入 Execution Result。 |
74
80
  | “后续代码也是生成物,不需要重新路由” | 只要写入业务代码,就必须重新消费当前 Slice Implementation Contract 和 YSS skill 闭包。 |
75
81
  | “发布窗口快结束了,可以把业务字段放进脚手架” | 时间、上级要求、已有产出和演示压力都不能放宽禁止模式;必须拆为 `behavior-tdd` 工作单元。 |
76
82
 
@@ -16,7 +16,7 @@ Implementation → Independent Review → Fresh Verification → Release
16
16
 
17
17
  ## 传播算法
18
18
 
19
- 1. 分类变化:文案、UI 状态、权限、API schema、状态机、数据模型、服务边界、NFR、部署、安全。
19
+ 1. 分类变化:文案、UI 状态、API schema、状态机、数据模型、服务边界、NFR、部署。
20
20
  2. 只遍历与变化类型相关的边。
21
21
  3. 受影响下游先标记 `stale`;不要删除或立即重建。
22
22
  4. 移除相关切片的 `ready-for-agent`,直到必要门禁重新为 `approved/not-applicable`。
@@ -27,6 +27,6 @@ Implementation → Independent Review → Fresh Verification → Release
27
27
 
28
28
  每个 `stale` 节点必须记录 `stale_by`、影响类型、证据引用和重新批准条件。重新批准 direct 节点后,逐个重新核验 transitive 节点;只有其全部受影响上游恢复为 `approved/not-applicable` 且本节点重新验证通过,才能移除 `stale`。
29
29
 
30
- 权限/状态机变化通常影响 Spec/Spec Delta、页面权限状态、OpenAPI security/errors、Design Review、Ticket 验收和测试映射;不会自动使竞品情报或完整业务架构失效。
30
+ 明确写入需求的认证、授权、租户隔离、敏感数据或合规行为变化不使用独立影响类型;按它实际改变的 UI 状态、API schema、状态机、数据模型或服务边界传播。普通 action 注册、SQL / DDL / 迁移和上传 / 下载只使用既有技术影响类型,不增加安全 / 权限传播。
31
31
 
32
32
  OpenAPI Freeze 后发生上游变化时,不得仅因父 Ticket 仍写阶段 6 就继续实现。先做影响分析,再精准更新相关资产和门禁。
@@ -20,7 +20,7 @@ Matt skills 决定如何工作;YSS 生命周期决定是否允许推进;YSS
20
20
  | 技术事实 | `research` | 一手资料回填 Spec/OpenAPI/架构/ADR |
21
21
  | runnable 问题 | `prototype` | 生成单文件可分享 HTML,保留 `prototype/<name>` 分支作为主来源;必须 source/return handoff 和结论回填,不得替代阶段 4 的低保真评审、Ant Design v6 高保真 HTML、AntD CLI 证据和用户确认 |
22
22
  | Spec 综合 | `to-spec` | 初稿进入 `ready-for-human`,不得直接实现 |
23
- | 切片 | `to-tickets` | 仅在冻结/无影响记录后拆垂直切片 |
23
+ | 切片 | `to-tickets` | 仅在冻结/无影响记录后拆垂直切片;初始角色为 `ready-for-human` |
24
24
  | 实现 | `implement`、`tdd` | `yss-router` 编译 Slice Implementation Contract 草案;本编排器核验并持久化后才执行,专项 Execution Result 返回后再次核验 |
25
25
  | Bug | `diagnosing-bugs`、`tdd` | 先建立红色反馈;高风险影响升级上游门禁 |
26
26
  | 审查 | `code-review` | 唯一默认代码审查入口;审查者独立,结合 Spec、仓库治理规则和 YSS 标准 |
@@ -61,9 +61,15 @@ Router 状态映射为:`draft → completed`、`blocked → blocked`、`ready-
61
61
  | Matt flow | 进入条件 | 生命周期结果 |
62
62
  |---|---|---|
63
63
  | `to-spec` | `grill-with-docs` 已满足退出条件,且不存在未回流的 runnable blocker;用户问题、MVP/非目标、成功标准、测试 seam 和术语审查均有证据 | Spec 初稿为 `ready-for-human`,不等于批准 |
64
- | `to-tickets` | OpenAPI Freeze 或 `no-api-impact` 记录、必要门禁、垂直切片范围和阻塞边均已明确 | 只能生成垂直切片 Ticket |
64
+ | `to-tickets` | OpenAPI Freeze 或 `no-api-impact` 记录、必要门禁、垂直切片范围和阻塞边均已明确 | 只能生成垂直切片 Ticket;YSS active 的 `to-tickets` 初始统一为 `ready-for-human` |
65
65
  | `implement` | `ready-for-agent` 公式、Contract 已批准/持久化/版本一致、Build Architecture Checklist、实现仓库/分支/CI/验证命令/回滚点,以及后端 Contract(适用时)均满足 | 单会话实现同样适用,不得绕过门禁 |
66
66
 
67
+ ## Review 候选与 Git 授权
68
+
69
+ YSS 调用 `code-review` 前必须形成 review input,至少包含 `review_mode`、`review_base_ref`、`implementation_candidate_ref`、`candidate_snapshot_ref`、`candidate_digest`、`spec_ref`、`ticket_ref`、`slice_contract_ref`、`build_architecture_checklist_ref` 和 `yss_execution_result_refs`,并满足 `orchestration-contract.yaml.review_input.manifest_required_by_mode`。`committed` 审查 merge-base 到不可变 `HEAD`;`worktree` 一次捕获 merge-base 到 working tree 的 committed、staged、unstaged 和 untracked 内容,使用 `yss-worktree-candidate-v1` 规定的 raw path、uint64 big-endian 长度、tracked/untracked record 和不支持条目阻断规则计算 SHA-256,让两个 Reviewer 消费同一不可变快照,并在返回和完成 checkpoint 复核摘要未变化。缺少输入、候选为空或摘要变化时返回 `blocked`,不能缩小审查范围或合并不同候选的结论。
70
+
71
+ Matt `implement` 的通用提交指令不构成 YSS Git 授权。只有用户明确给出 `commit_authorized` 为 `true`、非空 `commit_scope` 和 `commit_authorization_ref` 时才能 commit;只有明确给出 `push_authorized` 为 `true`、非空 `push_scope` 和 `push_authorization_ref` 时才能 push。缺少任一字段时保持工作区不变,只输出 checkpoint 判断;不得把 `orchestrate`、实现授权、当前分支、测试通过或负责人要求解释为隐含授权。
72
+
67
73
  ## Setup readiness
68
74
 
69
75
  编排器先做幂等 readiness 检查,再决定是否调用 `setup-matt-pocock-skills`。检查结果只能是:
@@ -68,10 +68,84 @@ flow_preconditions:
68
68
  to-tickets:
69
69
  required: [openapi_freeze_or_no_api_impact, required_gates_satisfied, vertical_slice_scope, blocking_edges]
70
70
  output: vertical-slice-tickets
71
+ output_role: ready-for-human
71
72
  implement:
72
73
  required: [ready_for_agent, slice_contract_approved, slice_contract_persisted, slice_contract_current_version, build_architecture_checklist, implementation_repo, implementation_branch, ci, verification_commands, rollback_point, backend_slice_contract_if_applicable, backend_scaffold_policy_satisfied]
73
74
  applies_to_single_session: true
74
75
 
76
+ ticket_role_transition:
77
+ yss_active:
78
+ to_tickets_initial_role: ready-for-human
79
+ promotion_owner: yss-product-lifecycle
80
+ promoted_role: ready-for-agent
81
+ promotion_requires: ready_for_agent
82
+
83
+ review_input:
84
+ schema_version: 1
85
+ required: [review_mode, review_base_ref, implementation_candidate_ref, candidate_snapshot_ref, candidate_digest, spec_ref, ticket_ref, slice_contract_ref, build_architecture_checklist_ref, yss_execution_result_refs]
86
+ nullable: [spec_ref]
87
+ modes: [committed, worktree]
88
+ committed:
89
+ candidate_ref: HEAD
90
+ diff_scope: merge-base-to-head
91
+ worktree:
92
+ candidate_ref: working-tree
93
+ diff_scope: merge-base-to-working-tree
94
+ required_coverage: [committed, staged, unstaged, untracked]
95
+ tracked_diff_command: git diff --no-ext-diff --binary --full-index <merge-base>
96
+ untracked_inventory_command: git ls-files -z --others --exclude-standard
97
+ untracked_files_encoding: nul-delimited-raw-path-bytes
98
+ untracked_diff_command: git diff --no-index --no-ext-diff --binary --full-index -- /dev/null <path>
99
+ capture_once: true
100
+ verify_unchanged_after_review: true
101
+ manifest_required_by_mode:
102
+ committed: [merge_base, tracked_diff_command, commit_list_command]
103
+ worktree: [merge_base, tracked_diff_command, untracked_inventory_command, untracked_diff_command, untracked_files, commit_list_command]
104
+ snapshot:
105
+ immutable: true
106
+ protocol: yss-worktree-candidate-v1
107
+ digest_algorithm: sha256
108
+ digest_framing: length-prefixed-path-and-bytes
109
+ path_order: bytewise
110
+ path_encoding: raw-bytes
111
+ length_encoding: uint64-big-endian
112
+ header_ascii: YSS-WORKTREE-CANDIDATE-V1
113
+ terminator_byte: "0x00"
114
+ tracked_record:
115
+ type_byte: "0x54"
116
+ fields: [type_byte, uint64be_content_length, binary_diff_bytes]
117
+ source: tracked_diff_command_stdout
118
+ untracked_record:
119
+ type_byte: "0x55"
120
+ fields: [type_byte, uint64be_path_length, raw_path_bytes, uint32be_file_mode, entry_kind_byte, uint64be_content_length, content_bytes]
121
+ order: bytewise-raw-path
122
+ entry_kinds: {regular: "0x52", symlink: "0x4c"}
123
+ regular_content_source: file_bytes
124
+ symlink_content_source: link_target_bytes
125
+ unsupported_entry_action: blocked
126
+ snapshot_artifact:
127
+ identity: candidate_digest
128
+ required: [candidate-manifest.yaml, tracked.diff, untracked/]
129
+ access: immutable-read-only
130
+ on_digest_change: blocked
131
+ completion_requires_current_digest: true
132
+
133
+ git_authorization:
134
+ commit:
135
+ requires_explicit_user_authorization: true
136
+ required: [commit_authorized, commit_scope, commit_authorization_ref]
137
+ authorized_value: true
138
+ non_empty: [commit_scope, commit_authorization_ref]
139
+ unauthorized_action: checkpoint-only
140
+ push:
141
+ requires_explicit_user_authorization: true
142
+ required: [push_authorized, push_scope, push_authorization_ref]
143
+ authorized_value: true
144
+ non_empty: [push_scope, push_authorization_ref]
145
+ unauthorized_action: checkpoint-only
146
+
147
+ seam_deferred_required: [risk, owner, follow_up_ticket, verification_plan, target_version_or_release_date]
148
+
75
149
  backend_scaffold:
76
150
  applies_when: [backend_impact]
77
151
  scaffold_statuses: [existing, required, initialized]
@@ -115,7 +189,7 @@ scaffold_work_unit_policy:
115
189
  scope: pre_business_code_generation
116
190
  required: [approved_scaffold_contract, primary_yss_skill, allowed_write_paths, expected_evidence_files, verification_commands]
117
191
  controlled_generation:
118
- allowed_for: [project_scaffold, pom, mechanical_config, wrapper, smart_doc_baseline]
192
+ allowed_for: [project_scaffold, pom, mechanical_config, wrapper]
119
193
  forbidden_when: [business_behavior, business_fields, business_state, permission, transaction, complex_query, error_mapping, business_example_crud]
120
194
  on_violation: blocked
121
195
 
@@ -195,19 +269,6 @@ impact_propagation:
195
269
  - {kind: artifact, name: openapi-draft, level: transitive, when: api_impact}
196
270
  - {kind: gate, name: openapi-freeze, level: transitive, when: api_impact}
197
271
  - {kind: artifact, name: vertical-slice-tickets, level: transitive, when: always}
198
- permission:
199
- targets:
200
- - {kind: artifact, name: spec, level: direct, when: always}
201
- - {kind: artifact, name: spec-delta, level: direct, when: existing_frozen_baseline}
202
- - {kind: artifact, name: product-design, level: direct, when: ui_impact}
203
- - {kind: gate, name: requirement-freeze, level: direct, when: always}
204
- - {kind: artifact, name: openapi-draft, level: transitive, when: api_impact}
205
- - {kind: gate, name: draft-review, level: transitive, when: api_impact}
206
- - {kind: gate, name: design-review, level: transitive, when: always}
207
- - {kind: gate, name: openapi-freeze, level: transitive, when: api_impact}
208
- - {kind: artifact, name: vertical-slice-tickets, level: transitive, when: always}
209
- - {kind: artifact, name: implementation-contract, level: transitive, when: always}
210
- - {kind: artifact, name: test-mapping, level: transitive, when: always}
211
272
  api-schema:
212
273
  targets:
213
274
  - {kind: artifact, name: spec, level: direct, when: always}
@@ -263,20 +324,6 @@ impact_propagation:
263
324
  - {kind: artifact, name: rollback-plan, level: direct, when: always}
264
325
  - {kind: gate, name: design-review, level: transitive, when: always}
265
326
  - {kind: artifact, name: release-plan, level: transitive, when: always}
266
- security:
267
- targets:
268
- - {kind: artifact, name: spec, level: direct, when: always}
269
- - {kind: artifact, name: spec-delta, level: direct, when: existing_frozen_baseline}
270
- - {kind: artifact, name: product-design, level: direct, when: ui_impact}
271
- - {kind: artifact, name: system-architecture, level: direct, when: always}
272
- - {kind: artifact, name: data-architecture, level: direct, when: data_impact}
273
- - {kind: gate, name: requirement-freeze, level: direct, when: always}
274
- - {kind: gate, name: architecture-review, level: direct, when: always}
275
- - {kind: artifact, name: openapi-draft, level: transitive, when: api_impact}
276
- - {kind: gate, name: openapi-freeze, level: transitive, when: api_impact}
277
- - {kind: artifact, name: vertical-slice-tickets, level: transitive, when: always}
278
- - {kind: artifact, name: release-plan, level: transitive, when: always}
279
-
280
327
  prototype_return_evidence:
281
328
  required: [prototype_mode, source_handoff, prototype_asset_or_run, conclusion, updated_authoritative_asset, remaining_questions, return_handoff]
282
329
  allowed_modes: [matt_logic, yss_high_fidelity]
@@ -52,20 +52,25 @@ tracker 选择和冲突按 `docs/agents/issue-tracker.md` 裁决:已持久化
52
52
  ## Matt flow 进入条件
53
53
 
54
54
  - `to-spec` 只能在 `grill-with-docs` 退出条件满足且没有未回流 runnable blocker 时进入;产物默认为 `ready-for-human`。
55
- - `to-tickets` 只能在 OpenAPI Freeze 或无 API 影响记录完成后进入,并且只能生成垂直切片 Ticket。
55
+ - `to-tickets` 只能在 OpenAPI Freeze 或无 API 影响记录完成后进入,并且只能生成垂直切片 Ticket;YSS active 下初始角色统一为 `ready-for-human`,不得沿用 Matt 的通用 `ready-for-agent` 默认值。
56
56
  - `implement` 无论是多会话还是单会话,都必须满足 `ready-for-agent` 公式、批准并持久化的 Slice Implementation Contract 和 Build Architecture Checklist。
57
57
  - `implement` 遇到 backend `scaffold_status=required` 时,还必须满足原型确认后的脚手架策略:脚手架 Execution Result、`yss-backend-scaffold-parent` 基线、Wrapper 验证和 Router 合同重编译均已回写;否则停在工程基线,不得写业务代码。
58
58
  - Matt Result 出现 `drift`、`new_impacts`、`stale_candidates`、`violation`、`missing_evidence`、空 `evidence_refs` 或缺少必需字段时暂停当前工作单元。
59
59
 
60
60
  ## 审查与验证
61
61
 
62
+ - 调用 `code-review` 前先固定 review input:`review_mode`、`review_base_ref`、`implementation_candidate_ref`、`candidate_snapshot_ref`、`candidate_digest`、Spec/Ticket、Slice Implementation Contract、Build Architecture Checklist 和 YSS Skill Execution Result 引用。`committed` 模式审查不可变 `HEAD`;`worktree` 模式一次捕获 committed、staged、unstaged 和 untracked 内容。必须按 `orchestration-contract.yaml.review_input` 的 manifest 按模式必填字段及 `yss-worktree-candidate-v1` 字节流(raw path、uint64 big-endian 长度、tracked/untracked record)计算 SHA-256,两个 Reviewer 必须消费同一不可变快照。返回后或完成 checkpoint 摘要变化时返回 `blocked`,由编排器决定重新审查。候选为空、漏项或 fixed point 不可解析时阻断。
62
63
  - 小改动和中等变更可由同一独立执行者完成 `code-review` 与 fresh verification,并在同一报告中分别记录 findings、命令、结果和残余风险。
63
64
  - 该执行者必须独立于实现者;新模块、高风险变更、职责冲突或需双人控制时,Reviewer 与 Verifier 分开。
64
65
  - `code-review` 是唯一默认代码审查 skill。GitLab、CI、Sonar、Alibaba Java 等治理事实作为仓库规则或专项检查输入,不再叠加第二个通用审查 skill。
65
66
 
67
+ ## Git 授权
68
+
69
+ 实现授权、`orchestrate`/`resume` 的有界写入、当前分支和 Git checkpoint 都不蕴含 commit 或 push 授权。执行 commit 前必须同时取得 `commit_authorized=true`、非空 `commit_scope` 和 `commit_authorization_ref`;执行 push 前必须同时取得 `push_authorized=true`、非空 `push_scope` 和 `push_authorization_ref`。任一缺失时只记录 checkpoint 判断并保持 Git 状态不变;负责人要求、时间压力、测试通过或“本地 commit 可逆”都不能补足用户授权。
70
+
66
71
  ## 必须暂停
67
72
 
68
- - Spec baseline、需求冻结、原型确认、OpenAPI Freeze、Architecture Review 或安全红线等待人工裁决。
73
+ - Spec baseline、需求冻结、原型确认、OpenAPI Freeze 或 Architecture Review 等普通门禁等待人工裁决。
69
74
  - 需要目标仓库、外部凭据、发布窗口或其他新授权。
70
75
  - 状态与证据冲突且无法可靠重建。
71
76
  - 专项 skill 失败或返回不可验收结果。
@@ -50,6 +50,14 @@ AND 所有后续生成代码均绑定主 YSS skill、依赖闭包、允许写路
50
50
 
51
51
  父 Ticket、Spec、设计、原型、OpenAPI Draft、wayfinder map 和 decision ticket 不得使用 `ready-for-agent`。
52
52
 
53
+ YSS active 调用 `to-tickets` 时,垂直切片初始角色固定为 `ready-for-human`。只有 `yss-product-lifecycle` 复算上述公式全部为真后,才能把它提升为 `ready-for-agent`;Matt `to-tickets` 的独立默认值不参与该裁决。
54
+
55
+ ## Review 与 Git 授权状态
56
+
57
+ 进入代码审查时保存 `review_mode`、`review_base_ref`、`implementation_candidate_ref`、`candidate_snapshot_ref`、`candidate_digest` 及 Spec、Ticket、合同、Checklist、YSS Execution Result 引用。`worktree` 候选必须一次捕获 committed、staged、unstaged 和 untracked 文件;manifest 的按模式必填字段以及 `yss-worktree-candidate-v1`(raw path、uint64 big-endian 长度、tracked/untracked record、symlink 和不支持条目)以 `orchestration-contract.yaml.review_input` 为唯一执行定义。两个 Reviewer 消费同一不可变快照;返回后或完成 checkpoint 摘要变化则返回 `blocked` 并重新审查。不新增生命周期状态,只把该清单作为审查证据。
58
+
59
+ Git 动作分别保存 `commit_authorized`、`commit_scope`、`commit_authorization_ref`、`push_authorized`、`push_scope`、`push_authorization_ref`。只有授权值严格为 `true`、范围和用户授权引用均非空时才执行相应动作;缺失授权时保持工作区不变并记录 checkpoint 判断。
60
+
53
61
  ## 状态块
54
62
 
55
63
  状态块位于主 tracker 的功能父 Ticket;Local Markdown 使用 `docs/.scratch/<feature>/parent-ticket.md`,远程 tracker 使用 Issue 并在本地功能包保留引用。平台不可用时才位于 stage checkpoint。只保存索引、状态、引用和因果关系:
@@ -30,7 +30,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
30
30
  - API 变化必须回到生命周期 Draft/Review/Freeze;半成品 backend 不得冒充稳定 source of truth。
31
31
  - 后端端到端切片必须包含 Application;对象/POJO 影响按契约自动补 `mapstruct`、`lombok`、`alibaba-java-code-style`。
32
32
  - Harness 内实现路径必须落在 `apps/backend/<project>/` 或 `apps/frontend/<project>/` 的具体项目目录;`apps/backend/`、`apps/frontend/` 只能作为容器,`app/backend/`、`app/frontend/` 及其子路径一律阻断。外部实现仓库使用其登记的真实项目根路径。
33
- - 当前用户、审计事件、普通技术日志、请求校验、错误映射或加解密命中时,必须按 `router-contract.yaml` 的 `component_impact_routing` 补齐长尾 skill;不能只在 `boundaries.md` 中提及。
33
+ - 当前用户、审计事件、普通技术日志、请求校验、错误映射或加解密命中时,必须按 `router-contract.yaml` 的 `component_impact_routing` 补齐长尾 skill;不能只在 `boundaries.md` 中提及。仅复用已经验证的平台认证 / 授权能力不算 component impact,不自动增加权限专项 skill。
34
34
  - 业务行为使用 `behavior-tdd`;只有机械脚手架/生成物可用 `controlled-generation`,并记录例外和验证。
35
35
  - 原型确认后若 backend `scaffold_status=required`,先由本 Router 按 `scaffold_contract_schema` 编译 `yss-ddd-scaffold-generator` 的 `controlled-generation` 工作单元合同 draft;合同必须带 `contract_id`、`contract_version`、Router draft、生命周期批准、持久化引用、允许写路径、预期证据和验证命令。经生命周期编排器批准并持久化后才能运行生成器,再由受控工作单元实际执行固定的 `./mvnw validate`、`./mvnw test`、`./mvnw package` 并记录逐条结果,随后加载 `yss-backend-scaffold-parent` 并重新编译业务合同;脚手架不承载业务行为。
36
36
  - 脚手架合同在 Router 阶段只能是 `draft` / `ready-for-lifecycle-review` / `blocked`;只有生命周期编排器可以把已持久化脚手架合同标记为 `approved`。脚手架合同只覆盖业务代码前的工程骨架工作单元;生成、基线校验和 Router 重编译完成后,它不能替代脚手架后的 Slice Implementation Contract。
@@ -42,7 +42,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
42
42
 
43
43
  - 切片基线路由:生成完整合同和技能闭包。
44
44
  - 工作单元增量路由:绑定一个行为、主/辅 skills、TDD 模式、路径和证据。
45
- - 完整重路由:API/schema、权限、状态机、数据模型、仓库、写路径、skill、测试 seam 或架构约束发生实质变化时触发。
45
+ - 完整重路由:API/schema、状态机、数据模型、仓库、写路径、skill、测试 seam 或架构约束发生实质变化时触发。实现中出现未冻结的新行为(包括明确的权限业务行为)统一写入 `new_impacts`,由生命周期按普通影响面重新分诊。
46
46
 
47
47
  ## 输出
48
48
 
@@ -33,7 +33,7 @@ routing_input_required:
33
33
  - lifecycle
34
34
  - implementation
35
35
  - acceptance
36
- impact_flags_required: [ui_impact, api_impact, no_api_impact, data_impact, backend_impact, cross_repo]
36
+ impact_flags_required: [ui_impact, api_impact, no_api_impact, data_impact, backend_impact, cross_repo, existing_frozen_baseline]
37
37
  exclusive_flags:
38
38
  - [api_impact, no_api_impact]
39
39
 
@@ -91,7 +91,7 @@ scaffold_contract_schema:
91
91
  work_unit:
92
92
  required: [id, behavior, primary_skill, supporting_skills, tdd_mode, allowed_write_paths, expected_evidence, verification_commands, controlled_generation]
93
93
  generation_boundary:
94
- allowed_for: [project_scaffold, pom, mechanical_config, wrapper, smart_doc_baseline]
94
+ allowed_for: [project_scaffold, pom, mechanical_config, wrapper]
95
95
  forbidden_when: [business_behavior, business_fields, business_state, permission, transaction, complex_query, error_mapping, business_example_crud]
96
96
  verification:
97
97
  commands: ["./mvnw validate", "./mvnw test", "./mvnw package"]
@@ -147,7 +147,7 @@ dependency_closure:
147
147
  when_form: [yss-formily]
148
148
  when_api: [api-integration]
149
149
  api-integration:
150
- when_regeneration: [yss-openapi]
150
+ when_regeneration: [yss-openapi-governance]
151
151
 
152
152
  component_impact_values:
153
153
  - current-user-context
@@ -191,7 +191,6 @@ full_reroute_triggers:
191
191
  - scaffold-baseline-drift
192
192
  - api-schema-impact
193
193
  - database-schema-impact
194
- - permission-impact
195
194
  - state-machine-impact
196
195
  - data-model-impact
197
196
  - new-write-path
@@ -209,7 +208,6 @@ reroute_destinations:
209
208
  scaffold-baseline-drift: stage7-scaffold-revalidation
210
209
  api-schema-impact: system-data-architecture-and-contract-review
211
210
  database-schema-impact: data-architecture-and-migration-review
212
- permission-impact: spec-product-design-and-contract-review
213
211
  state-machine-impact: spec-system-data-and-contract-review
214
212
  data-model-impact: data-architecture-and-contract-review
215
213
  new-write-path: stage7-contract-recompile
@@ -242,7 +240,7 @@ execution_result_required:
242
240
  - deviations
243
241
  - new_impacts
244
242
  - not_applicable_reason
245
- seam_deferred_required: [risk, owner, follow_up_ticket, verification_plan]
243
+ seam_deferred_required: [risk, owner, follow_up_ticket, verification_plan, target_version_or_release_date]
246
244
  deviation_required: [rule, reason, approval_ref]
247
245
  not_applicable_required: [item, reason]
248
246
  unavailable_skill_required: [skill, provider, fallback, resolution]