create-yss-spec 2.1.3 → 2.1.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 (296) 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/high-fidelity-html-prototype/SKILL.md +16 -12
  5. package/template/.agents/skills/product-design-prototype/SKILL.md +6 -2
  6. package/template/.agents/skills/prototype-review/SKILL.md +6 -2
  7. package/template/.agents/skills/wireframe-prototype/SKILL.md +5 -1
  8. package/template/.agents/skills/yss-api-integration/SKILL.md +25 -7
  9. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  10. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  11. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  12. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  13. package/template/.agents/skills/yss-design-system/SKILL.md +6 -5
  14. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  15. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +13 -17
  16. package/template/.agents/skills/yss-openapi-governance/SKILL.md +89 -114
  17. package/template/.agents/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  18. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +13 -7
  19. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  20. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  21. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +77 -30
  22. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  23. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +8 -0
  24. package/template/.agents/skills/yss-prototype-stage/SKILL.md +40 -0
  25. package/template/.agents/skills/yss-router/SKILL.md +2 -2
  26. package/template/.agents/skills/yss-router/references/router-contract.yaml +9 -8
  27. package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +4 -1
  28. package/template/.agents/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  29. package/template/.claude/skills/code-review/SKILL.md +38 -10
  30. package/template/.claude/skills/high-fidelity-html-prototype/SKILL.md +16 -12
  31. package/template/.claude/skills/product-design-prototype/SKILL.md +6 -2
  32. package/template/.claude/skills/prototype-review/SKILL.md +6 -2
  33. package/template/.claude/skills/wireframe-prototype/SKILL.md +5 -1
  34. package/template/.claude/skills/yss-api-integration/SKILL.md +25 -7
  35. package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  36. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  37. package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  38. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  39. package/template/.claude/skills/yss-design-system/SKILL.md +6 -5
  40. package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  41. package/template/.claude/skills/yss-openapi-draft-review/SKILL.md +13 -17
  42. package/template/.claude/skills/yss-openapi-governance/SKILL.md +89 -114
  43. package/template/.claude/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  44. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +13 -7
  45. package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  46. package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  47. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +77 -30
  48. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  49. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +8 -0
  50. package/template/.claude/skills/yss-prototype-stage/SKILL.md +40 -0
  51. package/template/.claude/skills/yss-router/SKILL.md +2 -2
  52. package/template/.claude/skills/yss-router/references/router-contract.yaml +9 -8
  53. package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +4 -1
  54. package/template/.claude/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  55. package/template/.codex/skills/code-review/SKILL.md +38 -10
  56. package/template/.codex/skills/high-fidelity-html-prototype/SKILL.md +16 -12
  57. package/template/.codex/skills/product-design-prototype/SKILL.md +6 -2
  58. package/template/.codex/skills/prototype-review/SKILL.md +6 -2
  59. package/template/.codex/skills/wireframe-prototype/SKILL.md +5 -1
  60. package/template/.codex/skills/yss-api-integration/SKILL.md +25 -7
  61. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  62. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  63. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  64. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  65. package/template/.codex/skills/yss-design-system/SKILL.md +6 -5
  66. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  67. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +13 -17
  68. package/template/.codex/skills/yss-openapi-governance/SKILL.md +89 -114
  69. package/template/.codex/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  70. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +13 -7
  71. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  72. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  73. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +77 -30
  74. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  75. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +8 -0
  76. package/template/.codex/skills/yss-prototype-stage/SKILL.md +40 -0
  77. package/template/.codex/skills/yss-router/SKILL.md +2 -2
  78. package/template/.codex/skills/yss-router/references/router-contract.yaml +9 -8
  79. package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +4 -1
  80. package/template/.codex/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  81. package/template/.hermes/skills/code-review/SKILL.md +38 -10
  82. package/template/.hermes/skills/high-fidelity-html-prototype/SKILL.md +16 -12
  83. package/template/.hermes/skills/product-design-prototype/SKILL.md +6 -2
  84. package/template/.hermes/skills/prototype-review/SKILL.md +6 -2
  85. package/template/.hermes/skills/wireframe-prototype/SKILL.md +5 -1
  86. package/template/.hermes/skills/yss-api-integration/SKILL.md +25 -7
  87. package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  88. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  89. package/template/.hermes/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  90. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  91. package/template/.hermes/skills/yss-design-system/SKILL.md +6 -5
  92. package/template/.hermes/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  93. package/template/.hermes/skills/yss-openapi-draft-review/SKILL.md +13 -17
  94. package/template/.hermes/skills/yss-openapi-governance/SKILL.md +89 -114
  95. package/template/.hermes/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  96. package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +13 -7
  97. package/template/.hermes/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  98. package/template/.hermes/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  99. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +77 -30
  100. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  101. package/template/.hermes/skills/yss-product-lifecycle/references/state-model.md +8 -0
  102. package/template/.hermes/skills/yss-prototype-stage/SKILL.md +40 -0
  103. package/template/.hermes/skills/yss-router/SKILL.md +2 -2
  104. package/template/.hermes/skills/yss-router/references/router-contract.yaml +9 -8
  105. package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +4 -1
  106. package/template/.hermes/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  107. package/template/.pi/skills/code-review/SKILL.md +38 -10
  108. package/template/.pi/skills/high-fidelity-html-prototype/SKILL.md +16 -12
  109. package/template/.pi/skills/product-design-prototype/SKILL.md +6 -2
  110. package/template/.pi/skills/prototype-review/SKILL.md +6 -2
  111. package/template/.pi/skills/wireframe-prototype/SKILL.md +5 -1
  112. package/template/.pi/skills/yss-api-integration/SKILL.md +25 -7
  113. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  114. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  115. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  116. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  117. package/template/.pi/skills/yss-design-system/SKILL.md +6 -5
  118. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  119. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +13 -17
  120. package/template/.pi/skills/yss-openapi-governance/SKILL.md +89 -114
  121. package/template/.pi/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  122. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +13 -7
  123. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  124. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  125. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +77 -30
  126. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  127. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +8 -0
  128. package/template/.pi/skills/yss-prototype-stage/SKILL.md +40 -0
  129. package/template/.pi/skills/yss-router/SKILL.md +2 -2
  130. package/template/.pi/skills/yss-router/references/router-contract.yaml +9 -8
  131. package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +4 -1
  132. package/template/.pi/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  133. package/template/.qoder/skills/code-review/SKILL.md +38 -10
  134. package/template/.qoder/skills/high-fidelity-html-prototype/SKILL.md +16 -12
  135. package/template/.qoder/skills/product-design-prototype/SKILL.md +6 -2
  136. package/template/.qoder/skills/prototype-review/SKILL.md +6 -2
  137. package/template/.qoder/skills/wireframe-prototype/SKILL.md +5 -1
  138. package/template/.qoder/skills/yss-api-integration/SKILL.md +25 -7
  139. package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  140. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  141. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  142. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  143. package/template/.qoder/skills/yss-design-system/SKILL.md +6 -5
  144. package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  145. package/template/.qoder/skills/yss-openapi-draft-review/SKILL.md +13 -17
  146. package/template/.qoder/skills/yss-openapi-governance/SKILL.md +89 -114
  147. package/template/.qoder/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  148. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +13 -7
  149. package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  150. package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  151. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +77 -30
  152. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  153. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +8 -0
  154. package/template/.qoder/skills/yss-prototype-stage/SKILL.md +40 -0
  155. package/template/.qoder/skills/yss-router/SKILL.md +2 -2
  156. package/template/.qoder/skills/yss-router/references/router-contract.yaml +9 -8
  157. package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +4 -1
  158. package/template/.qoder/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  159. package/template/.trae/skills/code-review/SKILL.md +38 -10
  160. package/template/.trae/skills/high-fidelity-html-prototype/SKILL.md +16 -12
  161. package/template/.trae/skills/product-design-prototype/SKILL.md +6 -2
  162. package/template/.trae/skills/prototype-review/SKILL.md +6 -2
  163. package/template/.trae/skills/wireframe-prototype/SKILL.md +5 -1
  164. package/template/.trae/skills/yss-api-integration/SKILL.md +25 -7
  165. package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +3 -17
  166. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +0 -30
  167. package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  168. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +1 -21
  169. package/template/.trae/skills/yss-design-system/SKILL.md +6 -5
  170. package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +12 -6
  171. package/template/.trae/skills/yss-openapi-draft-review/SKILL.md +13 -17
  172. package/template/.trae/skills/yss-openapi-governance/SKILL.md +89 -114
  173. package/template/.trae/skills/yss-openapi-governance/agents/openai.yaml +2 -2
  174. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +13 -7
  175. package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  176. package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +8 -2
  177. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +77 -30
  178. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +7 -2
  179. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +8 -0
  180. package/template/.trae/skills/yss-prototype-stage/SKILL.md +40 -0
  181. package/template/.trae/skills/yss-router/SKILL.md +2 -2
  182. package/template/.trae/skills/yss-router/references/router-contract.yaml +9 -8
  183. package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +4 -1
  184. package/template/.trae/skills/yss-router/references/yss-skill-execution-result.md +2 -1
  185. package/template/AGENTS.md +7 -5
  186. package/template/CONTEXT.md +15 -1
  187. package/template/README.md +2 -1
  188. package/template/__yss_dotfile__.gitignore +4 -0
  189. package/template/docs/adr/0001-product-design-prototype-entrypoint.md +1 -1
  190. package/template/docs/adr/0003-machine-readable-lifecycle-registry.md +5 -0
  191. package/template/docs/adr/0004-split-lifecycle-and-router-registry-domains.md +5 -0
  192. package/template/docs/adr/0005-cross-repository-ecosystem-release-manifest.md +5 -0
  193. package/template/docs/adr/0006-stable-lifecycle-ids-and-generated-structure.md +5 -0
  194. package/template/docs/adr/0007-separate-skill-routing-registry-from-integrity-lock.md +5 -0
  195. package/template/docs/agents/issue-tracker.md +1 -0
  196. package/template/docs/api/templates/openapi-draft-review-checklist.md +8 -6
  197. package/template/docs/api/templates/openapi-freeze-record-template.md +8 -2
  198. package/template/docs/api/templates/openapi-json-export-record-template.md +60 -0
  199. package/template/docs/architecture/templates/architecture-review-checklist.md +6 -19
  200. package/template/docs/architecture/templates/functional-architecture-template.md +4 -4
  201. package/template/docs/architecture/templates/system-overview-design-template.md +10 -5
  202. package/template/docs/architecture/templates/tech-design-template.md +4 -11
  203. package/template/docs/design/README.md +4 -2
  204. package/template/docs/design/design.md +4 -0
  205. package/template/docs/design/templates/interaction-spec-template.md +3 -3
  206. package/template/docs/design/templates/prototype-confirmation-template.md +9 -6
  207. package/template/docs/design/templates/prototype-evidence-template.yaml +46 -0
  208. package/template/docs/design/templates/prototype-review-checklist.md +4 -4
  209. package/template/docs/discovery/templates/discovery-template.md +0 -1
  210. package/template/docs/implementation/create-yss-spec-repository-mode-contract.md +2 -2
  211. package/template/docs/process/harness-process-tailoring.md +2 -0
  212. package/template/docs/process/harness-work-unit-map.md +14 -10
  213. package/template/docs/process/lifecycle-artifact-map.md +84 -39
  214. package/template/docs/process/lifecycle-registry-baseline.json +70 -0
  215. package/template/docs/process/lifecycle-registry.yaml +289 -0
  216. package/template/docs/process/schemas/lifecycle-registry.schema.json +35 -0
  217. package/template/docs/reviews/lifecycle-registry-phase0-1-red-green-2026-08-17.md +61 -0
  218. package/template/docs/reviews/matt-yss-p0-ticket-review-git-red-green-2026-08-17.md +91 -0
  219. package/template/docs/reviews/openapi-skill-primary-source-research-2026-08-16.md +76 -0
  220. package/template/docs/reviews/openapi-yaml-first-independent-review-2026-08-16.md +121 -0
  221. package/template/docs/reviews/openapi-yaml-first-pressure-scenarios-2026-08-16.md +191 -0
  222. package/template/docs/reviews/openapi-yaml-first-red-green-2026-08-16.md +76 -0
  223. package/template/docs/reviews/openapi-yaml-json-output-independent-review-2026-08-16.md +30 -0
  224. package/template/docs/reviews/openapi-yaml-json-output-scope-red-green-2026-08-16.md +154 -0
  225. package/template/docs/reviews/research-create-yss-spec-refresh-2026-08-16.md +164 -0
  226. package/template/docs/reviews/security-permission-lifecycle-simplification-red-green-2026-08-16.md +43 -0
  227. package/template/docs/reviews/template-release-review-remediation-red-green-2026-08-17.md +41 -0
  228. package/template/docs/templates/agent-brief-template.md +2 -2
  229. package/template/docs/templates/build-architecture-checklist-template.md +3 -4
  230. package/template/docs/templates/implementation-repo-registry-template.md +0 -2
  231. package/template/docs/templates/implementation-routing-template.md +6 -6
  232. package/template/docs/templates/openapi-spec-template.yaml +0 -6
  233. package/template/docs/templates/review-report-template.md +2 -1
  234. package/template/docs/templates/spec-delta-template.md +1 -1
  235. package/template/docs/templates/spec-template.md +0 -1
  236. package/template/docs/templates/vertical-slice-ticket-template.md +2 -2
  237. 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
  238. 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
  239. 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
  240. 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
  241. package/template/scripts/generate-lifecycle-artifacts +26 -0
  242. package/template/scripts/lifecycle-registry.rb +194 -0
  243. package/template/scripts/sync-skills +1 -0
  244. package/template/scripts/test-export-yss-skills.rb +10 -6
  245. package/template/scripts/test-lifecycle-registry.rb +74 -0
  246. package/template/scripts/update-skill-lock +1 -0
  247. package/template/scripts/verify-governance-release +39 -0
  248. package/template/scripts/verify-lifecycle-registry +67 -0
  249. package/template/scripts/verify-lifecycle-scenarios +193 -23
  250. package/template/scripts/verify-matt-yss-integration-scenarios +297 -1
  251. package/template/scripts/verify-openapi-json-handoff-scenarios +270 -0
  252. package/template/scripts/verify-openapi-yaml-first-scenarios +120 -0
  253. package/template/scripts/verify-prototype-backend-scaffold-scenarios +26 -4
  254. package/template/scripts/verify-template +27 -3
  255. package/template/scripts/verify-yss-router-scenarios +51 -14
  256. package/template/skills-lock.json +25 -25
  257. package/template/wiki/raw/skills-lock.json +0 -15
  258. package/template/wiki/wiki/OpenAPI/345/245/221/347/272/246.md +1 -1
  259. 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
  260. package/template/yss-public-skills.json +5 -5
  261. package/template.snapshot.json +4 -4
  262. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  263. package/template/.agents/skills/yss-openapi/SKILL.md +0 -116
  264. package/template/.agents/skills/yss-openapi/agents/openai.yaml +0 -4
  265. package/template/.agents/skills/yss-openapi/img.png +0 -0
  266. package/template/.agents/skills/yss-openapi/img_1.png +0 -0
  267. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  268. package/template/.claude/skills/yss-openapi/SKILL.md +0 -116
  269. package/template/.claude/skills/yss-openapi/agents/openai.yaml +0 -4
  270. package/template/.claude/skills/yss-openapi/img.png +0 -0
  271. package/template/.claude/skills/yss-openapi/img_1.png +0 -0
  272. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  273. package/template/.codex/skills/yss-openapi/SKILL.md +0 -116
  274. package/template/.codex/skills/yss-openapi/agents/openai.yaml +0 -4
  275. package/template/.codex/skills/yss-openapi/img.png +0 -0
  276. package/template/.codex/skills/yss-openapi/img_1.png +0 -0
  277. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  278. package/template/.hermes/skills/yss-openapi/SKILL.md +0 -116
  279. package/template/.hermes/skills/yss-openapi/agents/openai.yaml +0 -4
  280. package/template/.hermes/skills/yss-openapi/img.png +0 -0
  281. package/template/.hermes/skills/yss-openapi/img_1.png +0 -0
  282. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  283. package/template/.pi/skills/yss-openapi/SKILL.md +0 -116
  284. package/template/.pi/skills/yss-openapi/agents/openai.yaml +0 -4
  285. package/template/.pi/skills/yss-openapi/img.png +0 -0
  286. package/template/.pi/skills/yss-openapi/img_1.png +0 -0
  287. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  288. package/template/.qoder/skills/yss-openapi/SKILL.md +0 -116
  289. package/template/.qoder/skills/yss-openapi/agents/openai.yaml +0 -4
  290. package/template/.qoder/skills/yss-openapi/img.png +0 -0
  291. package/template/.qoder/skills/yss-openapi/img_1.png +0 -0
  292. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/smart-doc.json.template +0 -17
  293. package/template/.trae/skills/yss-openapi/SKILL.md +0 -116
  294. package/template/.trae/skills/yss-openapi/agents/openai.yaml +0 -4
  295. package/template/.trae/skills/yss-openapi/img.png +0 -0
  296. package/template/.trae/skills/yss-openapi/img_1.png +0 -0
@@ -18,10 +18,28 @@ description: Guide AI to correctly use Orval-generated API clients in Vue 3 micr
18
18
 
19
19
  1. **契约状态已明确**:
20
20
  - 已有生成客户端:可以直接集成。
21
- - 新增或变更 API:必须先在 `docs/.scratch/<feature>/api/<feature>.yaml` 形成 OpenAPI Draft,经工程基线 / 架构 / Spec Delta 设计和设计审查后 Freeze,再进入生成和集成。
22
- - 如果接口尚未冻结或生成函数不存在,先回到 `yss-product-lifecycle` / `yss-openapi`,不要手写临时路径、DTO 或响应结构。
23
- 2. **API 已生成**:运行 `pnpm generate:api` 生成最新 API
24
- 3. **了解 OpenAPI**:查看 `openapi/openapi.json` 了解接口定义
21
+ - 新增或变更 API:必须先在 `docs/.scratch/<feature>/api/<feature>.yaml` 形成 OpenAPI Draft,经工程基线 / 架构 / Spec Delta 设计和设计审查后 Freeze。冻结的 OpenAPI YAML 是唯一权威,JSON 仅为它的受控派生物。
22
+ - 如果接口尚未冻结、JSON 派生记录缺失或生成函数不存在,先回到 `yss-product-lifecycle` / `yss-openapi-governance`,不要手写临时路径、DTO 或响应结构。
23
+ 2. **API 已生成**:在目标前端实现仓库中,按其既有的手动代码生成命令(例如 `pnpm generate:api`)刷新 API;本 Harness 不配置、不执行该命令,也不把它加入 CI。
24
+ 3. **了解 OpenAPI**:查看 Freeze 记录、JSON 派生记录和 `openapi/openapi.json` 了解接口定义;不得把 JSON 或生成 TypeScript 当成可手改的源文件。
25
+
26
+ ## 契约输入与生成链
27
+
28
+ 客户端重新生成只能走下列受控链路:
29
+
30
+ ```text
31
+ 冻结的 OpenAPI YAML
32
+ → 锁定的 redocly bundle 生成 openapi.json
33
+ → 原样物化到目标前端
34
+ → 既有前端代码生成流程(由目标项目手动执行)
35
+ → 类型检查与调用方验证
36
+ ```
37
+
38
+ 1. 读取 `yss-openapi-governance` 产出的 OpenAPI Freeze 记录和 `docs/.scratch/<feature>/api/<feature>-json-export.md`;确认 YAML SHA-256、JSON SHA-256、Redocly CLI 版本、lockfile 引用和 JSON 校验均通过。治理 JSON 的唯一产物路径是 `docs/.scratch/<feature>/api/<feature>.json`。
39
+ 2. JSON 导出由 `yss-openapi-governance` 负责。`api-integration` 只接受该 skill 留下的派生记录;记录中的锁定 `redocly bundle` 命令是治理导出证据,不是前端集成任意重跑的入口。
40
+ 3. **受控交接**:若前端实现仓库需要本地输入,批准的 Cross-repo 子合同或项目脚本只能将上述治理 JSON 原样物化为 `<frontend>/openapi/openapi.json`;物化后的 SHA-256 必须与派生记录一致。禁止从 URL、Draft YAML、后端运行时或任意本地文件临时替换输入。
41
+ 4. `api-integration` 只核对 JSON 派生记录、交接路径和 SHA-256,并把原始 JSON 交给既有前端代码生成流程;本 Harness 不读取或修改目标前端的生成器配置,不在此仓库执行生成,也不建立生成 CI 门禁。若 JSON SHA 与派生记录不一致,停止交接并回到治理流程。
42
+ 5. 目标前端项目在需要时手动运行其既有生成命令、类型检查和受影响组件 / API 测试;将实际命令、结果、生成输入 SHA 和偏离写入 `YSS Skill Execution Result`。
25
43
 
26
44
  ## 📁 API 文件结构
27
45
 
@@ -329,7 +347,7 @@ const handleSubmit = async (payload: SubmitCmd) => {
329
347
  request.post("/api/v1/todo/guess", payload as any);
330
348
  ```
331
349
 
332
- ✅ **正确做法**:确认 OpenAPI Draft/Freeze 状态;冻结后用 `yss-openapi` 刷新生成客户端,再从 `@/api/generated/api` 和 `@/api/generated/model` 导入。
350
+ ✅ **正确做法**:确认 OpenAPI Draft/Freeze 状态;Freeze 后先由 `yss-openapi-governance` 从 YAML 生成并记录 JSON,再运行 `pnpm generate:api`,最后从 `@/api/generated/api` 和 `@/api/generated/model` 导入。
333
351
 
334
352
  ### ❌ 错误 3:缺少错误处理
335
353
 
@@ -386,7 +404,7 @@ const fetchData = async () => {
386
404
  pnpm generate:api
387
405
  ```
388
406
 
389
- 生成前应确认 `docs/.scratch/<feature>/api/<feature>.yaml` 中的 OpenAPI Draft 已完成设计审查并 Freeze;生成动作本身优先交给 `yss-openapi`。
407
+ 生成前应确认 `docs/.scratch/<feature>/api/<feature>.yaml` 中的 OpenAPI Draft 已完成设计审查并 Freeze,且 `yss-openapi-governance` 已用锁定的 `redocly bundle` 留下对应 JSON 派生记录;随后才运行 `pnpm generate:api`。
390
408
 
391
409
  2. **封装业务逻辑到 Hook**:
392
410
  - 将 API 调用封装在 `hooks/use{Name}Api.ts`
@@ -404,6 +422,6 @@ const fetchData = async () => {
404
422
 
405
423
  ## 阶段 7 合同
406
424
 
407
- - 只消费已冻结的 OpenAPI 生成客户端和批准后的 `Slice Implementation Contract`;实现中的半成品 backend 不得作为稳定 source of truth。
425
+ - 只消费冻结的 OpenAPI YAML 派生出的 JSON、生成客户端和批准后的 `Slice Implementation Contract`;实现中的半成品 backend 不得作为稳定 source of truth。
408
426
  - 客户端重新生成属于 `controlled-generation`;页面请求状态、错误处理、权限和用户交互属于 `behavior-tdd`。
409
427
  - 必须按统一 `YSS Skill Execution Result` 返回生成客户端引用、调用文件、组件/API 测试、实际 pnpm 验证结果、偏离和 `new_impacts`;发现缺失路径或 schema 变化时暂停并回生命周期。
@@ -26,7 +26,7 @@ description: 用于生成完整的 YSS DDD 多模块后端脚手架。当用户
26
26
  1. 确认项目名、基础包名、输出目录、数据库类型。
27
27
  Harness 内输出目录必须是 `apps/backend/` 容器,生成器再以 `project_name` 创建 `apps/backend/<project>/`;禁止使用 `app/backend/`、`app/frontend/` 或把 `apps/backend/` 之外的容器根当作后端项目根。
28
28
  2. 运行 `scripts/generate_scaffold.py` 生成骨架。
29
- 3. 检查生成的模块名、POM、配置文件、Smart Doc 配置和包路径。
29
+ 3. 检查生成的模块名、POM、基础配置文件和包路径。
30
30
  4. 由生命周期受控工作单元在生成项目根目录实际执行 `./mvnw validate`、`./mvnw test` 和 `./mvnw package`;生成器打印的下一步命令不构成验证证据。
31
31
  5. 如需继续细化,再追加其他 YSS skill 补全领域、仓储和 Web。
32
32
 
@@ -57,7 +57,6 @@ python3 scripts/generate_scaffold.py \
57
57
  - `*-adapter`
58
58
  - `*-bootstrap`
59
59
  - 基础配置、机械模板、构建脚本
60
- - `bootstrap/src/main/resources/smart-doc.json` 基础配置
61
60
 
62
61
  ## 使用约束
63
62
 
@@ -70,8 +69,8 @@ python3 scripts/generate_scaffold.py \
70
69
  - 生成后要检查依赖关系是否仍符合分层约束。
71
70
  - 生成后必须继续使用 `yss-backend-scaffold-parent` 校验工程基线,再按垂直切片加载 `yss-domain`、`yss-repository`、`yss-web-controller` 等局部技能。
72
71
  - 当前脚手架第一阶段仅支持经过验证的 `mysql`;未提供完整模板和验证的数据库类型不得伪装成已支持。
73
- - 生成后的后端工程必须使用项目根目录 `./mvnw ...` 执行构建、测试、运行、OpenAPI 生成和 CI 验证;不得在 README、实施记录、Ticket、Review 或 Release 中默认写裸 `mvn ...`。既有仓库确实无法使用 wrapper 时,必须记录受控例外。
74
- - 原型确认后,`scaffold_status=required` 才能进入本 skill;本 skill 的生成边界是工程结构、POM、配置、Wrapper、Smart Doc 和机械模板,不是业务实现。
72
+ - 生成后的后端工程必须使用项目根目录 `./mvnw ...` 执行构建、测试、运行和 CI 验证;不得在 README、实施记录、Ticket、Review 或 Release 中默认写裸 `mvn ...`。既有仓库确实无法使用 wrapper 时,必须记录受控例外。
73
+ - 原型确认后,`scaffold_status=required` 才能进入本 skill;本 skill 的生成边界是工程结构、POM、配置、Wrapper 和机械模板,不是业务实现。
75
74
  - 脚手架合同必须携带 `contract_id`、`contract_version`、Router draft 引用、生命周期批准引用、持久化引用、当前版本、允许写路径、预期证据文件和验证命令;字段缺失或版本过期时阻断。
76
75
  - 运行生成器必须传入 `--contract-file`;生成器会校验合同 `status=approved`、`current_version`、`primary_skill`、`controlled-generation` 和固定三条验证命令,不接受仅凭任意字符串引用的放行。
77
76
  - 生成项目必须写入非业务元数据清单 `.yss/scaffold-generation.json`,回勾合同 ID、版本、批准引用、生成输入、受控模式和固定验证命令;清单缺失时不得交给后续 Router。
@@ -81,19 +80,6 @@ python3 scripts/generate_scaffold.py \
81
80
  - `.mvn/settings.xml` 只能通过 `${env.MAVEN_REPO_USERNAME}` 和 `${env.MAVEN_REPO_PASSWORD}` 读取 Maven 仓库凭据;内部仓库构建前由 CI 或本地安全环境注入变量,禁止把 Maven 仓库用户名、明文密码或 Maven 加密密码写入 skill、模板或生成工程。
82
81
  - 涉及 API 契约时,先确认 `docs/.scratch/<feature>/api/<feature>.yaml` 中的 OpenAPI Draft / Freeze 状态;不要用脚手架生成结果反向替代产品契约设计。
83
82
 
84
- ## Smart Doc 配置参考
85
-
86
- 脚手架只生成不包含环境地址、Torna token 和业务项目名称的基础 `smart-doc.json`。参考真实项目配置时,仅提炼通用生成行为:
87
-
88
- - `allInOne: true`:生成单一 OpenAPI 文档。
89
- - `outPath: "target/openapi"`:生成文件输出到构建产物目录。
90
- - `packageFilters: "<base_package>.*"`:按 Smart Doc 的正则语义扫描当前服务的 Controller 包。
91
- - `componentType: "NORMAL"`:使用稳定的类名作为 schema 组件名。
92
- - `inlineEnum: true`、`recursionLimit: 7`:保持枚举展开和递归深度策略。
93
- - `requestExample`、`responseExample`、`createDebugPage` 默认关闭,避免把环境或示例数据带入契约产物。
94
-
95
- `serverUrl`、`debugEnvUrl`、`openUrl`、`appToken`、`revisionLogs` 属于具体环境或项目治理配置,必须在实现仓库中按实际契约补充,不能写入通用脚手架模板。
96
-
97
83
  ## 按需读取
98
84
 
99
85
  - 主脚本:`scripts/generate_scaffold.py`
@@ -45,36 +45,6 @@
45
45
  <groupId>org.springframework.boot</groupId>
46
46
  <artifactId>spring-boot-maven-plugin</artifactId>
47
47
  </plugin>
48
- <plugin>
49
- <artifactId>smart-doc-maven-plugin</artifactId>
50
- <version>yss-4.0.0</version>
51
- <configuration>
52
- <configFile>src/main/resources/smart-doc.json</configFile>
53
- <includes>
54
- <!-- 如果配置了includes的情况下, 使用了jpa的分页需要include所使用的源码包 -->
55
- <include>com.yss.cloud:yss-component-dto</include>
56
- <include>com.yss.datamiddle:datamiddle-component-exception</include>
57
- <include>com.yss.datamiddle:datamiddle-component-cache-starter</include>
58
- <include>com.yss.datamiddle:valuation-outsourced-client</include>
59
- <include>com.yss.cloud:yss-component-dir-client</include>
60
- <include>com.yss.cloud:yss-component-dir</include>
61
- <include>com.yss.cloud:yss-component-dir-common</include>
62
- <include>com.yss.datamiddle:{{project_name}}-domain</include>
63
- <include>com.yss.datamiddle:{{project_name}}-infrastructure</include>
64
- <include>com.yss.datamiddle:{{project_name}}-domain</include>
65
- </includes>
66
- <projectName>${project.description}</projectName>
67
- </configuration>
68
- <groupId>com.github.shalousun</groupId>
69
- <dependencies>
70
- <!-- 显式添加 commons-codec 依赖 -->
71
- <dependency>
72
- <groupId>commons-codec</groupId>
73
- <artifactId>commons-codec</artifactId>
74
- <version>1.15</version> <!-- 或与项目一致的版本 -->
75
- </dependency>
76
- </dependencies>
77
- </plugin>
78
48
  </plugins>
79
49
  </build>
80
50
  </project>
@@ -119,7 +119,7 @@ description: "YSS 服务的后端开发脚手架框架和技术指南。在开
119
119
  - Infrastructure 是否只实现 Gateway / Repository,并隔离 PO、Mapper、SQL、外部系统客户端。
120
120
  - Web / Adapter 是否只做协议适配、鉴权上下文、参数校验、DTO/VO 转换和响应包装。
121
121
  - Application 是否承载用例编排、事务边界和跨聚合协调,不把领域规则下沉到 Controller 或 Mapper。
122
- - OpenAPI Draft / Freeze、ADR、测试 seam 和安全红线是否已经明确。
122
+ - OpenAPI Draft / Freeze、ADR、测试 seam 和已批准的架构约束是否已经明确。
123
123
 
124
124
  ## 5. 常用命令
125
125
 
@@ -321,9 +321,6 @@ class ScaffoldGenerator:
321
321
  required_files = [
322
322
  self.project_root / "pom.xml",
323
323
  self.project_root / f"{self.project_name}-bootstrap" / "pom.xml",
324
- self.project_root
325
- / f"{self.project_name}-bootstrap"
326
- / "src/main/resources/smart-doc.json",
327
324
  self.project_root / "mvnw",
328
325
  self.project_root / ".yss/scaffold-generation.json",
329
326
  ]
@@ -331,9 +328,7 @@ class ScaffoldGenerator:
331
328
  if missing:
332
329
  raise FileNotFoundError(f"生成产物缺失: {', '.join(missing)}")
333
330
 
334
- smart_doc_path = required_files[2]
335
- json.loads(smart_doc_path.read_text(encoding="utf-8"))
336
- manifest = json.loads(required_files[4].read_text(encoding="utf-8"))
331
+ manifest = json.loads(required_files[3].read_text(encoding="utf-8"))
337
332
  if (
338
333
  manifest.get("contract_id") != self.contract_id
339
334
  or manifest.get("contract_version") != self.contract_version
@@ -343,14 +338,6 @@ class ScaffoldGenerator:
343
338
  != ["./mvnw validate", "./mvnw test", "./mvnw package"]
344
339
  ):
345
340
  raise ValueError("脚手架生成元数据清单与当前批准合同或固定验证命令不一致")
346
- bootstrap_pom = required_files[1].read_text(encoding="utf-8")
347
- plugin_versions = re.findall(
348
- r"<artifactId>smart-doc-maven-plugin</artifactId>\s*<version>([^<]+)</version>",
349
- bootstrap_pom,
350
- )
351
- if plugin_versions != ["yss-4.0.0"]:
352
- raise ValueError("smart-doc-maven-plugin 必须且只能使用 yss-4.0.0")
353
-
354
341
  binary_suffixes = {".class", ".db", ".jar", ".png", ".jpg", ".jpeg", ".gif"}
355
342
  for path in self.project_root.rglob("*"):
356
343
  if not path.is_file() or path.suffix in binary_suffixes:
@@ -452,17 +439,10 @@ class ScaffoldGenerator:
452
439
  / f"{self.project_name}-bootstrap"
453
440
  / "src/main/resources/logback-spring.xml",
454
441
  ),
455
- (
456
- self.config_template_dir / "smart-doc.json.template",
457
- self.project_root
458
- / f"{self.project_name}-bootstrap"
459
- / "src/main/resources/smart-doc.json",
460
- ),
461
442
  ]
462
443
  self._render_and_write_templates(config_templates)
463
444
  print(" ✓ application.yml")
464
445
  print(" ✓ logback-spring.xml")
465
- print(" ✓ smart-doc.json")
466
446
 
467
447
  def _generate_database_scripts(self):
468
448
  """只保留数据库目录布局,不生成业务表或初始化数据。"""
@@ -13,6 +13,7 @@ description: Use when YSS 产品设计系统与 Ant Design 企业级 UI 风格
13
13
  - 项目 token 快照:`docs/design/tokens/theme.json`、`docs/design/tokens/tokens.default.json`、`docs/design/tokens/tokens.dark.json`、`docs/design/tokens/tokens.compact.json`、`docs/design/tokens/variables.css`、`docs/design/tokens/variables.dark.css`。
14
14
  - 本技能执行清单:`references/design-system.md`,用于 Agent 执行和评审,不替代 `docs/design/design.md`。
15
15
  - 历史输入包:`/Users/zhudaoming/Downloads/Product-Design-System`,只用于追溯首次引入来源,不作为后续工程依赖。
16
+ - 原型阶段合同:`yss-prototype-stage`,用于统一跨 Agent 的原型资产、AntD 事实和浏览器验证证据。
16
17
 
17
18
  如果只需要快速判断,先读本文件。若要写 UI 规范、实现页面、评审设计或调整 token,必须读项目内 `docs/design/design.md`;若要执行评审或实现检查,再读 `references/design-system.md`。
18
19
 
@@ -21,7 +22,7 @@ description: Use when YSS 产品设计系统与 Ant Design 企业级 UI 风格
21
22
  1. 先判断任务阶段:设计系统引入 / 产品设计 / 原型评审 / 前端实现 / UI 改造 / 主题 token 落地。
22
23
  2. 读取已有资产:`docs/design/design.md`、相关 Spec、交互说明、状态矩阵、OpenAPI Draft、现有页面代码。
23
24
  3. 按设计系统基线约束输出或修改产物:颜色、排版、间距、圆角、动效、组件、状态、响应式。
24
- 4. 若是产品设计阶段,配合 `product-design-prototype` 产出页面、流程、状态矩阵和 OpenAPI 反推清单。
25
+ 4. 若是产品设计阶段,先使用 `yss-prototype-stage`;Codex 以 `product-design:index` 为主入口,其他 Agent 必须交付等价合同资产和证据。
25
26
  5. 若是前端实现阶段,配合 `yss-ui`、`yss-components`、`yss-formily`、`yss-page-module-development`,但本技能负责风格与体验一致性门禁。
26
27
  6. 若发现现有设计系统文档不足,先更新 `docs/design/design.md`,再让实现或评审引用该文档。
27
28
 
@@ -76,15 +77,15 @@ description: Use when YSS 产品设计系统与 Ant Design 企业级 UI 风格
76
77
 
77
78
  | 场景 | 配合技能 |
78
79
  | --- | --- |
79
- | Spec 后做页面 / 原型 / 交互说明 | `product-design-prototype` |
80
+ | Spec 后做页面 / 原型 / 交互说明 | `yss-prototype-stage` → `product-design:index` |
80
81
  | 低保真原型进入高保真前评审 | `prototype-review` |
81
- | 低保真评审通过后的高保真 HTML 原型 | `high-fidelity-html-prototype` |
82
- | 低保真线框或流程图 | `wireframe-prototype` / `excalidraw-diagram-generator` |
82
+ | 低保真评审通过后的高保真 HTML 原型 | `yss-prototype-stage`;`high-fidelity-html-prototype` 仅兼容入口 |
83
+ | 低保真线框或流程图 | `product-design:index` 或 `wireframe-prototype` 兼容入口 / `excalidraw-diagram-generator` |
83
84
  | 前端页面实现 | `yss-ui` / `yss-page-module-development` |
84
85
  | 表单 schema | `yss-formily` |
85
86
  | YTable / YTree / 高度自适应 | `yss-components` / `yss-use-table-height` / `yss-use-tree-height` |
86
87
  | Ant Design v6 组件 / token / demo 查询 | 官方 `@ant-design/cli` / `https://ant.design/docs/react/for-agents` |
87
- | API 契约 / 接入 | `api-integration` / `yss-openapi` |
88
+ | API 契约 / 接入 | `yss-openapi-governance` / `api-integration` |
88
89
 
89
90
  ## 更新设计系统
90
91
 
@@ -21,7 +21,9 @@ branch: template
21
21
  - `app_name`:应用名。
22
22
  - `microapp_name`:微应用注册名。
23
23
  - `base_route`:基础路由。
24
- - `openapi_source`:OpenAPI 文件、URL 或 Harness spec 路径。
24
+ - OpenAPI Freeze 记录:已批准的冻结 YAML 版本和引用。
25
+ - OpenAPI JSON 派生记录:`docs/.scratch/<feature>/api/<feature>-json-export.md`,包含 YAML / JSON SHA-256、Redocly CLI 版本和 lockfile 引用。
26
+ - 冻结 JSON 产物:`docs/.scratch/<feature>/api/<feature>.json`;这是唯一允许交给既有前端代码生成流程的上游产物。
25
27
  - `target_git_url` 或 `output_dir`:目标实现仓库或本地输出目录。
26
28
  - `package_manager`:默认 pnpm。
27
29
  - `init_git`:是否初始化 Git;默认必须用户明确确认。
@@ -33,9 +35,10 @@ branch: template
33
35
  3. 只读检查模板分支是否可访问:`git ls-remote --heads <repo> template`。
34
36
  4. 需要生成工程时,克隆或复制模板到用户确认的目标位置;不得默认写入 Harness 仓库。
35
37
  5. 替换应用名、微应用名、路由、`micro-config.json`、环境变量和 README 中的模板占位。
36
- 6. 配置 OpenAPI source,并准备 Orval 生成命令。
37
- 7. 记录验证命令:`pnpm install`、`pnpm lint:check`、`pnpm type-check`、`pnpm build`、`pnpm generate:api`。
38
- 8. 按 `docs/templates/implementation-repo-registry-template.md` 回写前端实现仓库登记。
38
+ 6. 核验 OpenAPI Freeze 记录和 OpenAPI JSON 派生记录;通过批准的 Cross-repo 子合同或项目脚本,将记录中的 JSON 原样物化到 `<frontend>/openapi/openapi.json`,并再次核对 SHA-256。
39
+ 7. 保持模板既有的前端代码生成配置不变;本 Harness 只将 SHA-256 一致的 JSON 原样交给既有前端代码生成流程,不修改该配置、不在此仓库执行生成,也不设置生成 CI 门禁。目标前端项目在需要时手动运行其既有命令。
40
+ 8. 记录目标前端项目的 install / lint / type-check / build 命令,以及既有客户端生成命令(如有);生成命令仅作为目标项目的手动验证项。
41
+ 9. 按 `docs/templates/implementation-repo-registry-template.md` 回写前端实现仓库登记。
39
42
 
40
43
  ## Expected Template Shape
41
44
 
@@ -55,7 +58,9 @@ packages/package.json
55
58
 
56
59
  - 不直接创建远端 Git 项目,除非用户明确要求。
57
60
  - 不推送、不创建 MR / PR,除非用户明确要求。
58
- - 不绕过 OpenAPI Draft / Freeze;API client 生成必须有可追溯 OpenAPI source。
61
+ - 不绕过 OpenAPI Draft / Freeze;API client 只消费与 OpenAPI JSON 派生记录 SHA-256 一致的冻结 JSON。
62
+ - 不接受任意 URL、未冻结 YAML、后端运行时输出或手工 JSON 作为既有前端代码生成流程的输入。
63
+ - 不修改模板既有的代码生成配置,也不把客户端生成加入 CI。
59
64
  - 不得把 `apps/frontend/` 容器根登记为项目根;Harness 内每个前端项目必须有独立的 `apps/frontend/<project>/` 路径。
60
65
  - 不把模板示例页面当作业务功能交付。
61
66
  - 生成后仍需使用 `yss-page-module-development`、`yss-components`、`api-integration` 等专项 skill 实现业务页面。
@@ -65,6 +70,7 @@ packages/package.json
65
70
  - 前端工程生成位置或目标仓库信息。
66
71
  - 模板来源和 commit / branch 证据。
67
72
  - 替换参数清单。
68
- - install / lint / type-check / build / generate:api 命令。
73
+ - install / lint / type-check / build 命令,以及目标前端项目既有的手动客户端生成命令(如有)。
74
+ - OpenAPI Freeze 记录、OpenAPI JSON 派生记录、JSON SHA-256 和 `openapi/openapi.json` 物化证据。
69
75
  - Harness 实现仓库登记草案。
70
76
  - 未覆盖项和 `TODO-HUMAN-REVIEW`。
@@ -1,34 +1,33 @@
1
1
  ---
2
2
  name: yss-openapi-draft-review
3
- description: Use when reviewing a `docs/.scratch/<feature>/api/` OpenAPI Draft before Engineering Baseline, YSS DDD Review, architecture/Spec Delta design, OpenAPI Freeze, vertical slicing, frontend/backend implementation, or when checking P0 requirement coverage, page action to endpoint mapping, YSS response wrappers, errors, permissions, pagination, optimistic locking, security red lines, and contract test seams.
3
+ description: Use when reviewing a `docs/.scratch/<feature>/api/` OpenAPI Draft before Engineering Baseline, YSS DDD Review, architecture/Spec Delta design, OpenAPI Freeze, vertical slicing, frontend/backend implementation, or when checking P0 requirement coverage, page action to endpoint mapping, YSS response wrappers, errors, pagination, optimistic locking, and contract test seams.
4
4
  ---
5
5
 
6
6
  # YSS OpenAPI Draft Review
7
7
 
8
- Use this skill after OpenAPI Draft creation and before Engineering Baseline / YSS DDD Review. It is a fail-closed contract review skill for design-time OpenAPI files under `docs/.scratch/<feature>/api/`; it is not the smart-doc / Orval generation workflow.
8
+ Use this skill after OpenAPI Draft creation and before Engineering Baseline / YSS DDD Review. It is a fail-closed contract review skill for design-time OpenAPI files under `docs/.scratch/<feature>/api/`; it does not bundle JSON or generate Orval clients.
9
9
 
10
10
  ## Required Inputs
11
11
 
12
- - OpenAPI Draft under `docs/.scratch/<feature>/api/<feature>.yaml`.
12
+ - OpenAPI Draft under `docs/.scratch/<feature>/api/<feature>.yaml`,作为唯一权威的单一 OAS 3.1 YAML document;生命周期元数据和 Freeze 决策位于相邻 Markdown 记录。
13
13
  - Calibrated Spec.
14
14
  - Interaction spec / prototype review when UI exists.
15
15
  - YSS engineering baseline rules, especially `SingleResult<T>`, `MultiResult<T>`, and `PageResult<T>`.
16
16
 
17
17
  ## Review Flow
18
18
 
19
- 1. Consume fresh automated evidence for YAML parsing, `$ref`, path parameters, and lint. Generate it once with the Draft or when the Draft changes; do not manually repeat unchanged structural checks.
20
- 2. Build a P0 traceability matrix from Spec functional requirements and interaction actions to OpenAPI paths, schemas, errors, and contract tests.
21
- 3. Check page action coverage: every action has `actionKey`, endpoint or explicit non-goal, permission behavior, state transition, idempotency/concurrency rule, and error codes.
19
+ 1. Consume fresh automated evidence for YAML parsing, single-document OAS 3.1 shape, `$ref`, path parameters, and lint. Generate it once with the Draft or when the Draft changes; do not manually repeat unchanged structural checks.
20
+ 2. Build a P0 traceability matrix from Spec functional requirements and interaction actions to OpenAPI paths, schemas, errors, and contract tests. Each UI action must map to a stable `operationId` and `x-yss-action-key` or an equivalent traceability entry.
21
+ 3. Check page action coverage: every action has `actionKey`, endpoint or explicit non-goal, state transition, idempotency/concurrency rule, and error codes. When the Spec explicitly changes authentication or authorization behavior, trace that behavior through the same matrix.
22
22
  4. Check object lifecycle coverage: manage/maintain/configure/create/update/archive/retry/cancel/publish/export/create-draft semantics have endpoints or explicit scope downgrades.
23
23
  5. Check YSS API baseline: REST shape, `SingleResult<T>` for single objects, `MultiResult<T>` for non-page lists, `PageResult<T>` for pagination, and stable DTO/schema names.
24
- 6. Check error and permission contracts: field-level errors, model-level errors, 403 no-data leakage, disabled reasons, gate failures, and conflict responses.
25
- 7. Check security red lines: authentication/authorization, SQL/DDL draft boundaries, downloads, audit/logging, sensitive field handling, and human-review items.
26
- 8. Output a persistent review artifact under `docs/.scratch/<feature>/architecture/` or update the existing one.
24
+ 6. Check error contracts: field-level errors, model-level errors, disabled reasons, gate failures, and conflict responses. When the Spec explicitly changes authentication or authorization behavior, include its `401` / `403` and resource-filtering semantics here.
25
+ 7. Output a persistent review artifact under `docs/.scratch/<feature>/architecture/` or update the existing one.
27
26
 
28
27
  ## Automation Boundary
29
28
 
30
- - Automated checks own YAML syntax, `$ref` resolution, path-parameter consistency, OpenAPI lint, and stable machine-checkable style rules.
31
- - Human or independent semantic review owns P0 traceability, page-action coverage, permission and error behavior, concurrency/idempotency, security red lines, scope downgrades, and contract-test seams.
29
+ - Automated checks own YAML single-document syntax, `$ref` resolution, path-parameter consistency, OpenAPI lint, and stable machine-checkable style rules.
30
+ - Human or independent semantic review owns P0 traceability, page-action coverage, error behavior, concurrency/idempotency, scope downgrades, contract-test seams, and any explicitly specified authentication or authorization behavior.
32
31
  - Fresh passing automation evidence may be referenced by the semantic review; copying the same findings into a second checklist is unnecessary.
33
32
  - Re-run structural automation only when the Draft, ruleset, or referenced schema changes.
34
33
 
@@ -40,8 +39,8 @@ Block if any of these are true:
40
39
  - A UI action has no endpoint/non-goal mapping.
41
40
  - A configurable rule or gate lacks a source, owner, fixed/default decision, or API representation.
42
41
  - Pagination does not align with YSS `PageResult<T>` or documented exception.
43
- - Draft has no contract test seam for import, mapping coverage, validation, review, publish, export, permission, and optimistic locking.
44
- - Security red lines are unmarked or the Draft exposes execution endpoints for SQL/DDL migration.
42
+ - Draft has no contract test seam for import, mapping coverage, validation, review, publish, export, and optimistic locking.
43
+ - YAML contains lifecycle frontmatter / root metadata, or the proposed JSON client input is not explicitly deferred until Freeze and governance export.
45
44
 
46
45
  ## Output Contract
47
46
 
@@ -61,14 +60,11 @@ Block if any of these are true:
61
60
  ### YSS Baseline
62
61
  - <response wrappers, DDD boundary implications, implementation feasibility>
63
62
 
64
- ### Security Review
65
- - <red lines and human-review items>
66
-
67
63
  ### Contract Test Checklist
68
64
  - <minimum contract tests before OpenAPI Freeze>
69
65
 
70
66
  ### Next Action
71
- - <return to OpenAPI Draft / enter Engineering Baseline / architecture design>
67
+ - <return to OpenAPI Draft / enter Engineering Baseline / architecture design / request YAML-to-JSON export after Freeze>
72
68
  ```
73
69
 
74
70
  Prefer `docs/api/templates/openapi-draft-review-checklist.md` when a tabular checklist is useful.
@@ -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
  ```