create-yss-spec 3.4.8 → 3.4.10

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 (459) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/template/attach-planner.js +5 -0
  4. package/src/template/sync-planner.js +5 -0
  5. package/template/.agents/skills/.strategic-design-skills-manifest.json +5 -5
  6. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +2 -2
  7. package/template/.agents/skills/archify/SKILL.md +2 -19
  8. package/template/.agents/skills/archify/references/geometry-and-routing.md +20 -0
  9. package/template/.agents/skills/code-review/SKILL.md +3 -33
  10. package/template/.agents/skills/code-review/references/candidate-capture.md +33 -0
  11. package/template/.agents/skills/code-review/references/yss-review-standards.md +3 -5
  12. package/template/.agents/skills/codebase-design/SKILL.md +2 -2
  13. package/template/.agents/skills/competitive-intelligence/SKILL.md +1 -1
  14. package/template/.agents/skills/diagnosing-bugs/SKILL.md +6 -2
  15. package/template/.agents/skills/formily-foundation/SKILL.md +1 -1
  16. package/template/.agents/skills/formily-step-flow/SKILL.md +3 -2
  17. package/template/.agents/skills/frontend-commit/SKILL.md +6 -6
  18. package/template/.agents/skills/grilling/SKILL.md +2 -2
  19. package/template/.agents/skills/implement/SKILL.md +1 -1
  20. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +3 -3
  21. package/template/.agents/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  22. package/template/.agents/skills/improve-codebase-architecture/SKILL.md +10 -6
  23. package/template/.agents/skills/java-backend-commit/SKILL.md +5 -5
  24. package/template/.agents/skills/llm-wiki/SKILL.md +1 -1
  25. package/template/.agents/skills/prototype/SKILL.md +1 -1
  26. package/template/.agents/skills/prototype-review/SKILL.md +1 -1
  27. package/template/.agents/skills/resolving-merge-conflicts/SKILL.md +2 -2
  28. package/template/.agents/skills/tdd/SKILL.md +1 -1
  29. package/template/.agents/skills/to-questionnaire/SKILL.md +4 -2
  30. package/template/.agents/skills/to-spec/SKILL.md +3 -3
  31. package/template/.agents/skills/to-tickets/SKILL.md +7 -7
  32. package/template/.agents/skills/using-git-worktrees/SKILL.md +13 -11
  33. package/template/.agents/skills/wait-what/SKILL.md +1 -1
  34. package/template/.agents/skills/wayfinder/SKILL.md +4 -2
  35. package/template/.agents/skills/writing-for-agents/SKILL.md +9 -73
  36. package/template/.agents/skills/writing-for-agents/references/writing-principles.md +76 -0
  37. package/template/.agents/skills/yss-api-integration/SKILL.md +2 -2
  38. package/template/.agents/skills/yss-application/SKILL.md +12 -0
  39. package/template/.agents/skills/yss-audit-log/SKILL.md +3 -1
  40. package/template/.agents/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  41. package/template/.agents/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  42. package/template/.agents/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  43. package/template/.agents/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  44. package/template/.agents/skills/yss-backend-spec-review/SKILL.md +6 -0
  45. package/template/.agents/skills/yss-backend-spec-review/references/check-inputs.md +2 -2
  46. package/template/.agents/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  47. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +5 -34
  48. package/template/.agents/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  49. package/template/.agents/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  50. package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
  51. package/template/.agents/skills/yss-domain/SKILL.md +17 -5
  52. package/template/.agents/skills/yss-domain/references/domain-layer-guide.md +2 -2
  53. package/template/.agents/skills/yss-domain/references/existing-project.md +5 -0
  54. package/template/.agents/skills/yss-dto/SKILL.md +13 -10
  55. package/template/.agents/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  56. package/template/.agents/skills/yss-exception/SKILL.md +2 -2
  57. package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +12 -12
  58. package/template/.agents/skills/yss-hook/SKILL.md +8 -44
  59. package/template/.agents/skills/yss-hook/references/use-request.md +42 -0
  60. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +3 -5
  61. package/template/.agents/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  62. package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  63. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  64. package/template/.agents/skills/yss-mybatis/SKILL.md +10 -0
  65. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +3 -1
  66. package/template/.agents/skills/yss-openapi-governance/SKILL.md +5 -32
  67. package/template/.agents/skills/yss-openapi-governance/references/governance-output.md +34 -0
  68. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +12 -6
  69. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +63 -1
  70. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  71. package/template/.agents/skills/yss-prototype-stage/SKILL.md +3 -5
  72. package/template/.agents/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  73. package/template/.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
  74. package/template/.agents/skills/yss-repository/SKILL.md +13 -1
  75. package/template/.agents/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  76. package/template/.agents/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  77. package/template/.agents/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  78. package/template/.agents/skills/yss-stage-decision/SKILL.md +3 -1
  79. package/template/.agents/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  80. package/template/.agents/skills/yss-tactical-design/SKILL.md +3 -3
  81. package/template/.agents/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  82. package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
  83. package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
  84. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
  85. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  86. package/template/.agents/skills/yss-validation/SKILL.md +1 -1
  87. package/template/.agents/skills/yss-web-controller/SKILL.md +16 -7
  88. package/template/.agents/skills/ytable-usage/SKILL.md +2 -2
  89. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +2 -2
  90. package/template/.codex/skills/archify/SKILL.md +2 -19
  91. package/template/.codex/skills/archify/references/geometry-and-routing.md +20 -0
  92. package/template/.codex/skills/code-review/SKILL.md +3 -33
  93. package/template/.codex/skills/code-review/references/candidate-capture.md +33 -0
  94. package/template/.codex/skills/code-review/references/yss-review-standards.md +3 -5
  95. package/template/.codex/skills/codebase-design/SKILL.md +2 -2
  96. package/template/.codex/skills/competitive-intelligence/SKILL.md +1 -1
  97. package/template/.codex/skills/data-analytics/mcp/server.cjs +2 -1
  98. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +9 -32
  99. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/references/quality-checks.md +29 -0
  100. package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
  101. package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +4 -4
  102. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/SKILL.md +12 -22
  103. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/cli.py +5 -10
  104. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/plan.py +47 -49
  105. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/tests/test_delivery_plan.py +45 -0
  106. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/SKILL.md +4 -5
  107. package/template/.codex/skills/data-analytics/skills/build-report/report-to-pdf/SKILL.md +1 -1
  108. package/template/.codex/skills/data-analytics/skills/build-report/specifications/mcp-app-report.md +1 -1
  109. package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
  110. package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
  111. package/template/.codex/skills/data-analytics/skills/index/SKILL.md +4 -4
  112. package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
  113. package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +2 -2
  114. package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
  115. package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
  116. package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
  117. package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +4 -4
  118. package/template/.codex/skills/data-analytics/skills/user-context/SKILL.md +16 -14
  119. package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/automation-config.md +1 -1
  120. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding-examples.md +1 -1
  121. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding.md +7 -7
  122. package/template/.codex/skills/data-analytics/skills/user-context/references/source-category-runtime.md +7 -7
  123. package/template/.codex/skills/data-analytics/skills/user-context/scripts/data_analytics_preflight.py +4 -2
  124. package/template/.codex/skills/data-analytics/skills/user-context/scripts/validate_user_context_preflight.py +5 -5
  125. package/template/.codex/skills/data-analytics/skills/user-context/tests/test_state_helpers.py +3 -3
  126. package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +7 -71
  127. package/template/.codex/skills/data-analytics/skills/validate-data/references/validation-methods.md +70 -0
  128. package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +4 -4
  129. package/template/.codex/skills/data-analytics/src/analytics-app/App.tsx +1 -1
  130. package/template/.codex/skills/data-analytics/src/analytics-app-core.md +1 -1
  131. package/template/.codex/skills/diagnosing-bugs/SKILL.md +6 -2
  132. package/template/.codex/skills/formily-foundation/SKILL.md +1 -1
  133. package/template/.codex/skills/formily-step-flow/SKILL.md +3 -2
  134. package/template/.codex/skills/frontend-commit/SKILL.md +6 -6
  135. package/template/.codex/skills/grilling/SKILL.md +2 -2
  136. package/template/.codex/skills/implement/SKILL.md +1 -1
  137. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +3 -3
  138. package/template/.codex/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  139. package/template/.codex/skills/improve-codebase-architecture/SKILL.md +10 -6
  140. package/template/.codex/skills/java-backend-commit/SKILL.md +5 -5
  141. package/template/.codex/skills/llm-wiki/SKILL.md +1 -1
  142. package/template/.codex/skills/product-design/references/critical-overrides.md +3 -4
  143. package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
  144. package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
  145. package/template/.codex/skills/product-design/skills/get-context/SKILL.md +2 -1
  146. package/template/.codex/skills/product-design/skills/ideate/SKILL.md +2 -50
  147. package/template/.codex/skills/product-design/skills/ideate/references/image-prompt-patterns.md +51 -0
  148. package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +6 -6
  149. package/template/.codex/skills/product-design/skills/index/SKILL.md +2 -2
  150. package/template/.codex/skills/product-design/skills/prototype/SKILL.md +6 -6
  151. package/template/.codex/skills/product-design/skills/url-to-code/SKILL.md +1 -1
  152. package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
  153. package/template/.codex/skills/prototype/SKILL.md +1 -1
  154. package/template/.codex/skills/prototype-review/SKILL.md +1 -1
  155. package/template/.codex/skills/resolving-merge-conflicts/SKILL.md +2 -2
  156. package/template/.codex/skills/tdd/SKILL.md +1 -1
  157. package/template/.codex/skills/to-questionnaire/SKILL.md +4 -2
  158. package/template/.codex/skills/to-spec/SKILL.md +3 -3
  159. package/template/.codex/skills/to-tickets/SKILL.md +7 -7
  160. package/template/.codex/skills/using-git-worktrees/SKILL.md +13 -11
  161. package/template/.codex/skills/wait-what/SKILL.md +1 -1
  162. package/template/.codex/skills/wayfinder/SKILL.md +4 -2
  163. package/template/.codex/skills/writing-for-agents/SKILL.md +9 -73
  164. package/template/.codex/skills/writing-for-agents/references/writing-principles.md +76 -0
  165. package/template/.codex/skills/yss-api-integration/SKILL.md +2 -2
  166. package/template/.codex/skills/yss-application/SKILL.md +12 -0
  167. package/template/.codex/skills/yss-audit-log/SKILL.md +3 -1
  168. package/template/.codex/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  169. package/template/.codex/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  170. package/template/.codex/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  171. package/template/.codex/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  172. package/template/.codex/skills/yss-backend-spec-review/SKILL.md +6 -0
  173. package/template/.codex/skills/yss-backend-spec-review/references/check-inputs.md +2 -2
  174. package/template/.codex/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  175. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +5 -34
  176. package/template/.codex/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  177. package/template/.codex/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  178. package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
  179. package/template/.codex/skills/yss-domain/SKILL.md +17 -5
  180. package/template/.codex/skills/yss-domain/references/domain-layer-guide.md +2 -2
  181. package/template/.codex/skills/yss-domain/references/existing-project.md +5 -0
  182. package/template/.codex/skills/yss-dto/SKILL.md +13 -10
  183. package/template/.codex/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  184. package/template/.codex/skills/yss-exception/SKILL.md +2 -2
  185. package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +12 -12
  186. package/template/.codex/skills/yss-hook/SKILL.md +8 -44
  187. package/template/.codex/skills/yss-hook/references/use-request.md +42 -0
  188. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +3 -5
  189. package/template/.codex/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  190. package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  191. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  192. package/template/.codex/skills/yss-mybatis/SKILL.md +10 -0
  193. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +3 -1
  194. package/template/.codex/skills/yss-openapi-governance/SKILL.md +5 -32
  195. package/template/.codex/skills/yss-openapi-governance/references/governance-output.md +34 -0
  196. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +12 -6
  197. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +63 -1
  198. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  199. package/template/.codex/skills/yss-prototype-stage/SKILL.md +3 -5
  200. package/template/.codex/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  201. package/template/.codex/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
  202. package/template/.codex/skills/yss-repository/SKILL.md +13 -1
  203. package/template/.codex/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  204. package/template/.codex/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  205. package/template/.codex/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  206. package/template/.codex/skills/yss-stage-decision/SKILL.md +3 -1
  207. package/template/.codex/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  208. package/template/.codex/skills/yss-tactical-design/SKILL.md +3 -3
  209. package/template/.codex/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  210. package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
  211. package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
  212. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
  213. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  214. package/template/.codex/skills/yss-validation/SKILL.md +1 -1
  215. package/template/.codex/skills/yss-web-controller/SKILL.md +16 -7
  216. package/template/.codex/skills/ytable-usage/SKILL.md +2 -2
  217. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +2 -2
  218. package/template/.cursor/skills/archify/SKILL.md +2 -19
  219. package/template/.cursor/skills/archify/references/geometry-and-routing.md +20 -0
  220. package/template/.cursor/skills/code-review/SKILL.md +3 -33
  221. package/template/.cursor/skills/code-review/references/candidate-capture.md +33 -0
  222. package/template/.cursor/skills/code-review/references/yss-review-standards.md +3 -5
  223. package/template/.cursor/skills/codebase-design/SKILL.md +2 -2
  224. package/template/.cursor/skills/competitive-intelligence/SKILL.md +1 -1
  225. package/template/.cursor/skills/diagnosing-bugs/SKILL.md +6 -2
  226. package/template/.cursor/skills/formily-foundation/SKILL.md +1 -1
  227. package/template/.cursor/skills/formily-step-flow/SKILL.md +3 -2
  228. package/template/.cursor/skills/frontend-commit/SKILL.md +6 -6
  229. package/template/.cursor/skills/grilling/SKILL.md +2 -2
  230. package/template/.cursor/skills/implement/SKILL.md +1 -1
  231. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +3 -3
  232. package/template/.cursor/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  233. package/template/.cursor/skills/improve-codebase-architecture/SKILL.md +10 -6
  234. package/template/.cursor/skills/java-backend-commit/SKILL.md +5 -5
  235. package/template/.cursor/skills/llm-wiki/SKILL.md +1 -1
  236. package/template/.cursor/skills/prototype/SKILL.md +1 -1
  237. package/template/.cursor/skills/prototype-review/SKILL.md +1 -1
  238. package/template/.cursor/skills/resolving-merge-conflicts/SKILL.md +2 -2
  239. package/template/.cursor/skills/tdd/SKILL.md +1 -1
  240. package/template/.cursor/skills/to-questionnaire/SKILL.md +4 -2
  241. package/template/.cursor/skills/to-spec/SKILL.md +3 -3
  242. package/template/.cursor/skills/to-tickets/SKILL.md +7 -7
  243. package/template/.cursor/skills/using-git-worktrees/SKILL.md +13 -11
  244. package/template/.cursor/skills/wait-what/SKILL.md +1 -1
  245. package/template/.cursor/skills/wayfinder/SKILL.md +4 -2
  246. package/template/.cursor/skills/writing-for-agents/SKILL.md +9 -73
  247. package/template/.cursor/skills/writing-for-agents/references/writing-principles.md +76 -0
  248. package/template/.cursor/skills/yss-api-integration/SKILL.md +2 -2
  249. package/template/.cursor/skills/yss-application/SKILL.md +12 -0
  250. package/template/.cursor/skills/yss-audit-log/SKILL.md +3 -1
  251. package/template/.cursor/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  252. package/template/.cursor/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  253. package/template/.cursor/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  254. package/template/.cursor/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  255. package/template/.cursor/skills/yss-backend-spec-review/SKILL.md +6 -0
  256. package/template/.cursor/skills/yss-backend-spec-review/references/check-inputs.md +2 -2
  257. package/template/.cursor/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  258. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +5 -34
  259. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  260. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  261. package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
  262. package/template/.cursor/skills/yss-domain/SKILL.md +17 -5
  263. package/template/.cursor/skills/yss-domain/references/domain-layer-guide.md +2 -2
  264. package/template/.cursor/skills/yss-domain/references/existing-project.md +5 -0
  265. package/template/.cursor/skills/yss-dto/SKILL.md +13 -10
  266. package/template/.cursor/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  267. package/template/.cursor/skills/yss-exception/SKILL.md +2 -2
  268. package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +12 -12
  269. package/template/.cursor/skills/yss-hook/SKILL.md +8 -44
  270. package/template/.cursor/skills/yss-hook/references/use-request.md +42 -0
  271. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +3 -5
  272. package/template/.cursor/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  273. package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  274. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  275. package/template/.cursor/skills/yss-mybatis/SKILL.md +10 -0
  276. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +3 -1
  277. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +5 -32
  278. package/template/.cursor/skills/yss-openapi-governance/references/governance-output.md +34 -0
  279. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +12 -6
  280. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +63 -1
  281. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  282. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +3 -5
  283. package/template/.cursor/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  284. package/template/.cursor/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
  285. package/template/.cursor/skills/yss-repository/SKILL.md +13 -1
  286. package/template/.cursor/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  287. package/template/.cursor/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  288. package/template/.cursor/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  289. package/template/.cursor/skills/yss-stage-decision/SKILL.md +3 -1
  290. package/template/.cursor/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  291. package/template/.cursor/skills/yss-tactical-design/SKILL.md +3 -3
  292. package/template/.cursor/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  293. package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
  294. package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
  295. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
  296. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  297. package/template/.cursor/skills/yss-validation/SKILL.md +1 -1
  298. package/template/.cursor/skills/yss-web-controller/SKILL.md +16 -7
  299. package/template/.cursor/skills/ytable-usage/SKILL.md +2 -2
  300. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +2 -2
  301. package/template/.pi/skills/archify/SKILL.md +2 -19
  302. package/template/.pi/skills/archify/references/geometry-and-routing.md +20 -0
  303. package/template/.pi/skills/code-review/SKILL.md +3 -33
  304. package/template/.pi/skills/code-review/references/candidate-capture.md +33 -0
  305. package/template/.pi/skills/code-review/references/yss-review-standards.md +3 -5
  306. package/template/.pi/skills/codebase-design/SKILL.md +2 -2
  307. package/template/.pi/skills/competitive-intelligence/SKILL.md +1 -1
  308. package/template/.pi/skills/diagnosing-bugs/SKILL.md +6 -2
  309. package/template/.pi/skills/formily-foundation/SKILL.md +1 -1
  310. package/template/.pi/skills/formily-step-flow/SKILL.md +3 -2
  311. package/template/.pi/skills/frontend-commit/SKILL.md +6 -6
  312. package/template/.pi/skills/grilling/SKILL.md +2 -2
  313. package/template/.pi/skills/implement/SKILL.md +1 -1
  314. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +3 -3
  315. package/template/.pi/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  316. package/template/.pi/skills/improve-codebase-architecture/SKILL.md +10 -6
  317. package/template/.pi/skills/java-backend-commit/SKILL.md +5 -5
  318. package/template/.pi/skills/llm-wiki/SKILL.md +1 -1
  319. package/template/.pi/skills/prototype/SKILL.md +1 -1
  320. package/template/.pi/skills/prototype-review/SKILL.md +1 -1
  321. package/template/.pi/skills/resolving-merge-conflicts/SKILL.md +2 -2
  322. package/template/.pi/skills/tdd/SKILL.md +1 -1
  323. package/template/.pi/skills/to-questionnaire/SKILL.md +4 -2
  324. package/template/.pi/skills/to-spec/SKILL.md +3 -3
  325. package/template/.pi/skills/to-tickets/SKILL.md +7 -7
  326. package/template/.pi/skills/using-git-worktrees/SKILL.md +13 -11
  327. package/template/.pi/skills/wait-what/SKILL.md +1 -1
  328. package/template/.pi/skills/wayfinder/SKILL.md +4 -2
  329. package/template/.pi/skills/writing-for-agents/SKILL.md +9 -73
  330. package/template/.pi/skills/writing-for-agents/references/writing-principles.md +76 -0
  331. package/template/.pi/skills/yss-api-integration/SKILL.md +2 -2
  332. package/template/.pi/skills/yss-application/SKILL.md +12 -0
  333. package/template/.pi/skills/yss-audit-log/SKILL.md +3 -1
  334. package/template/.pi/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  335. package/template/.pi/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  336. package/template/.pi/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  337. package/template/.pi/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  338. package/template/.pi/skills/yss-backend-spec-review/SKILL.md +6 -0
  339. package/template/.pi/skills/yss-backend-spec-review/references/check-inputs.md +2 -2
  340. package/template/.pi/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  341. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +5 -34
  342. package/template/.pi/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  343. package/template/.pi/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  344. package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
  345. package/template/.pi/skills/yss-domain/SKILL.md +17 -5
  346. package/template/.pi/skills/yss-domain/references/domain-layer-guide.md +2 -2
  347. package/template/.pi/skills/yss-domain/references/existing-project.md +5 -0
  348. package/template/.pi/skills/yss-dto/SKILL.md +13 -10
  349. package/template/.pi/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  350. package/template/.pi/skills/yss-exception/SKILL.md +2 -2
  351. package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +12 -12
  352. package/template/.pi/skills/yss-hook/SKILL.md +8 -44
  353. package/template/.pi/skills/yss-hook/references/use-request.md +42 -0
  354. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +3 -5
  355. package/template/.pi/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  356. package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  357. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  358. package/template/.pi/skills/yss-mybatis/SKILL.md +10 -0
  359. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +3 -1
  360. package/template/.pi/skills/yss-openapi-governance/SKILL.md +5 -32
  361. package/template/.pi/skills/yss-openapi-governance/references/governance-output.md +34 -0
  362. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +12 -6
  363. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +63 -1
  364. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  365. package/template/.pi/skills/yss-prototype-stage/SKILL.md +3 -5
  366. package/template/.pi/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  367. package/template/.pi/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
  368. package/template/.pi/skills/yss-repository/SKILL.md +13 -1
  369. package/template/.pi/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  370. package/template/.pi/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  371. package/template/.pi/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  372. package/template/.pi/skills/yss-stage-decision/SKILL.md +3 -1
  373. package/template/.pi/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  374. package/template/.pi/skills/yss-tactical-design/SKILL.md +3 -3
  375. package/template/.pi/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  376. package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
  377. package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
  378. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
  379. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  380. package/template/.pi/skills/yss-validation/SKILL.md +1 -1
  381. package/template/.pi/skills/yss-web-controller/SKILL.md +16 -7
  382. package/template/.pi/skills/ytable-usage/SKILL.md +2 -2
  383. package/template/AGENTS.md +2 -0
  384. package/template/CONTEXT.md +2 -1
  385. package/template/README.md +1 -0
  386. package/template/docs/agents/issue-tracker.md +7 -0
  387. package/template/docs/process/contract-reading.md +46 -0
  388. package/template/docs/process/lifecycle-artifact-map.md +2 -2
  389. package/template/docs/process/lifecycle-registry-baseline.json +2 -1
  390. package/template/docs/process/lifecycle-registry.yaml +10 -4
  391. package/template/docs/process/schemas/api-contract-decision-v2.schema.json +198 -0
  392. package/template/docs/process/schemas/digital-human-task-package.schema.json +68 -4
  393. package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +259 -0
  394. package/template/docs/process/schemas/stage-tracking.schema.json +259 -0
  395. package/template/docs/process/stage-tracking.md +62 -0
  396. package/template/docs/process/strategic-handoff-package.md +8 -0
  397. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +2 -0
  398. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +1 -0
  399. package/template/docs/user-guide//351/230/266/346/256/265/346/216/245/345/205/245/344/270/216/344/272/247/347/211/251/345/244/215/347/224/250/344/275/277/347/224/250/346/211/213/345/206/214.md +243 -0
  400. package/template/scripts/api-contract-decision +16 -0
  401. package/template/scripts/backend-standards-coverage +26 -0
  402. package/template/scripts/complete-backend-delivery +17 -0
  403. package/template/scripts/contract +13 -0
  404. package/template/scripts/dispatch-slice-task +13 -0
  405. package/template/scripts/lib/api-contract-decision.mjs +45 -4
  406. package/template/scripts/lib/approval-record.mjs +1 -1
  407. package/template/scripts/lib/approved-execution-context.mjs +35 -7
  408. package/template/scripts/lib/backend-architecture.mjs +2 -2
  409. package/template/scripts/lib/backend-delivery-terminal.mjs +51 -0
  410. package/template/scripts/lib/backend-platform-provenance.mjs +1 -1
  411. package/template/scripts/lib/backend-platform.mjs +1 -1
  412. package/template/scripts/lib/backend-review.mjs +58 -20
  413. package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
  414. package/template/scripts/lib/backend-standards-coverage.mjs +237 -0
  415. package/template/scripts/lib/context-contract.mjs +1 -1
  416. package/template/scripts/lib/context-reconciliation.mjs +1 -1
  417. package/template/scripts/lib/contract-source.mjs +22 -0
  418. package/template/scripts/lib/contract-views.mjs +109 -0
  419. package/template/scripts/lib/delivery-preflight.mjs +3 -2
  420. package/template/scripts/lib/digital-human-roles.mjs +1 -1
  421. package/template/scripts/lib/existing-backend-architecture.mjs +4 -3
  422. package/template/scripts/lib/existing-ui-baseline.mjs +4 -2
  423. package/template/scripts/lib/first-slice-artifacts.mjs +1 -1
  424. package/template/scripts/lib/frontend-delivery-boundary.mjs +1 -1
  425. package/template/scripts/lib/frontend-delivery.mjs +1 -1
  426. package/template/scripts/lib/harness-execution-scope.mjs +15 -1
  427. package/template/scripts/lib/implementation-contract-compiler.mjs +4 -4
  428. package/template/scripts/lib/json-schema.mjs +19 -4
  429. package/template/scripts/lib/lifecycle-context-query.mjs +5 -1
  430. package/template/scripts/lib/lifecycle-controls.mjs +1 -1
  431. package/template/scripts/lib/lifecycle-execution-scope.mjs +92 -0
  432. package/template/scripts/lib/lifecycle-registry.mjs +2 -1
  433. package/template/scripts/lib/lifecycle-transition.mjs +25 -4
  434. package/template/scripts/lib/openapi-draft-validation.mjs +2 -1
  435. package/template/scripts/lib/profile-skill-sync.mjs +46 -5
  436. package/template/scripts/lib/skill-registry.mjs +1 -1
  437. package/template/scripts/lib/slice-contract-preparation.mjs +16 -14
  438. package/template/scripts/lib/slice-contract-views.mjs +1 -1
  439. package/template/scripts/lib/slice-contract.mjs +18 -3
  440. package/template/scripts/lib/slice-execution-preflight.mjs +7 -3
  441. package/template/scripts/lib/slice-repositories.mjs +1 -1
  442. package/template/scripts/lib/slice-task-package.mjs +3 -2
  443. package/template/scripts/lib/stage-tracking-migration.mjs +176 -0
  444. package/template/scripts/lib/stage-tracking.mjs +184 -0
  445. package/template/scripts/lib/strategic-handoff-consumption.mjs +5 -4
  446. package/template/scripts/lib/strategic-handoff-io.mjs +5 -2
  447. package/template/scripts/lib/strategic-handoff-routing.mjs +31 -0
  448. package/template/scripts/lib/strategic-handoff.mjs +4 -2
  449. package/template/scripts/lib/task-package.mjs +2 -0
  450. package/template/scripts/lib/technical-design-boundary.mjs +4 -2
  451. package/template/scripts/lib/ui-baseline.mjs +1 -1
  452. package/template/scripts/lib/user-decision.mjs +1 -1
  453. package/template/scripts/lib/validation-phase.mjs +72 -0
  454. package/template/scripts/stage-tracking +25 -0
  455. package/template/scripts/strategic-consumer-entry +47 -0
  456. package/template/scripts/verify-context-reconciliation +4 -3
  457. package/template/scripts/verify-lifecycle-checkpoint +10 -0
  458. package/template/skills-lock.json +65 -63
  459. package/template.snapshot.json +4 -4
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
2
2
  import { access, readFile, readdir } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import test from "node:test";
5
+ import { parseDocument } from "../../../../scripts/vendor/yaml.mjs";
5
6
  import { fileURLToPath } from "node:url";
6
7
 
7
8
  const repositorySkillRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
@@ -15,7 +16,8 @@ async function text(target) {
15
16
  test("repository router exposes exactly the registered profile entry points", async () => {
16
17
  const profilesRoot = path.join(repositorySkillRoot, "references/profiles");
17
18
  const profiles = (await readdir(profilesRoot)).filter((name) => name.endsWith(".md")).sort();
18
- assert.deepEqual(profiles, ["layered-mvc-service.md", "mvc-data-analysis-v1.md", "target-domain-model.md"]);
19
+ const registry = parseDocument(await text(path.join(projectRoot, "docs/agents/yss-skill-registry.yaml"))).toJS();
20
+ assert.deepEqual(profiles, [...Object.keys(registry.architecture_profiles), ...Object.keys(registry.existing_project_profiles)].map(id => `${id}.md`).sort());
19
21
 
20
22
  const skill = await text(path.join(repositorySkillRoot, "SKILL.md"));
21
23
  for (const profile of profiles) assert.match(skill, new RegExp(`references/profiles/${profile.replace(".md", "")}`));
@@ -5,6 +5,8 @@ description: 编排 Plan 到 Spec 入口的方案决策与业务边界、协作
5
5
 
6
6
  # YSS Stage Decision
7
7
 
8
+ 已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
9
+
8
10
  `yss-stage-decision` 是由生命周期主控调度的上游决策技能,负责把需求、产品、商务输入和业务边界与规则设计结果整理成可审查、可版本化、可被下游消费的方案决策包。它不替代生命周期主控,也不生成产品代码、原型、OpenAPI 或垂直切片 Ticket。
9
11
 
10
12
  文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
@@ -69,4 +71,4 @@ Plan 的目标与退出条件由 `docs/process/lifecycle-registry.yaml` 持有
69
71
 
70
72
  ## 战略交接快照包
71
73
 
72
- 跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
74
+ 跨仓交付或恢复时读取 [战略交接合同](references/strategic-handoff-routing.md)。只接受当前可核验包与承接结果;用户决定、版本失效和批准边界仍由主控持有。
@@ -0,0 +1,3 @@
1
+ ## 战略交接快照包
2
+
3
+ 跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
@@ -5,6 +5,8 @@ description: 在 YSS 技术分析阶段将批准的战略领域输入细化为
5
5
 
6
6
  # yss-tactical-design
7
7
 
8
+ 已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
9
+
8
10
  本 skill 负责 DDD 战术设计,不新增生命周期主阶段,也不替代 `yss-stage-decision` 或 `yss-domain`。
9
11
 
10
12
  ## 适用边界
@@ -36,9 +38,7 @@ description: 在 YSS 技术分析阶段将批准的战略领域输入细化为
36
38
 
37
39
  ## 战略交接快照包
38
40
 
39
- 跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
40
-
41
- 战术合同必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
41
+ 仅在输入来自战略交接包时,读取 [战略承接核验](references/strategic-handoff-routing.md),绑定收据、摘要和逐规则承接;源变化或未知依赖阻断并回交主控。
42
42
 
43
43
  ## 后端脚手架平台承接
44
44
 
@@ -0,0 +1,5 @@
1
+ ## 战略交接快照包
2
+
3
+ 跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
4
+
5
+ 战术合同必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
@@ -5,6 +5,8 @@ description: 在 YSS 技术分析中统一承接需求与战略输入,按已
5
5
 
6
6
  # YSS 技术设计
7
7
 
8
+ 已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
9
+
8
10
  由 `yss-product-lifecycle` 调度,负责 `work-unit.technical-analysis` 的技术设计,不另起生命周期、不生成生产代码。生命周期维护批准和状态;`yss-implementation-contract-compiler` 消费批准且当前的设计,起草实现合同。
9
11
 
10
12
  文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
@@ -1,5 +1,5 @@
1
1
  import path from 'node:path';
2
- import {readFileSync} from 'node:fs';
2
+ import {readFileSync} from '../../../../scripts/lib/validation-phase.mjs';
3
3
  import {ensure,read,safe,hash} from '../../../../scripts/lib/strategic-handoff-io.mjs';
4
4
  const beneath=(ref,scope)=>ref===scope||ref.startsWith(`${scope}/`);
5
5
  export function validateEngineeringDesign(data,{root}) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { readFileSync } from 'node:fs';
2
+ import { readFileSync, withValidationPhase, validationDependencies } from '../../../../scripts/lib/validation-phase.mjs';
3
3
  import { validateEngineeringDesign } from './engineering-design.mjs';
4
4
  import { createApprovedExecutionContext, assertApprovedExecutionContext } from '../../../../scripts/lib/approved-execution-context.mjs';
5
5
  import { verifyArchitectureEvidence } from '../../../../scripts/lib/backend-architecture.mjs';
@@ -42,8 +42,8 @@ function validateMvc(design) {
42
42
  if (!design.integration_catalog.length) ensure(text(design.integration_not_applicable_reason), '无外部集成必须说明原因');
43
43
  }
44
44
 
45
- export function verifyArchitecture(data, root, {execution,sliceRef}={}) {
46
- if(execution)assertApprovedExecutionContext(execution,{root,technicalDesign:data,sliceId:sliceRef});
45
+ export function verifyArchitecture(data, root, {execution,sliceRef,readOnly=false}={}) {
46
+ if(execution)assertApprovedExecutionContext(execution,{root,technicalDesign:data,sliceId:sliceRef,readOnly});
47
47
  const binding = data.architecture;
48
48
  const file = safe(root, binding.decision_ref);
49
49
  ensure(hash(readFileSync(file)) === binding.decision_digest, '架构来源摘要漂移');
@@ -63,7 +63,7 @@ export function verifyArchitecture(data, root, {execution,sliceRef}={}) {
63
63
  ensure(!['stale','blocked'].includes(record.status) && !['stale','blocked'].includes(entry.status), '工程登记已失效');
64
64
  if (entry.architecture_identity?.schema_version === 2) {
65
65
  ensure(entry.architecture_evidence?.engineering_baseline && entry.architecture_evidence?.manifest, '既有工程登记缺少原始工程证据引用');
66
- verifyArchitectureEvidence(entry.architecture_identity, { ...entry.architecture_evidence, repository_registration: { ref: binding.decision_ref, digest: binding.decision_digest } }, { root, execution });
66
+ verifyArchitectureEvidence(entry.architecture_identity, { ...entry.architecture_evidence, repository_registration: { ref: binding.decision_ref, digest: binding.decision_digest } }, { root, execution, readOnly });
67
67
  }
68
68
  }
69
69
  }
@@ -111,7 +111,7 @@ export async function validateTechnicalDesign(data, { root = process.cwd(), slic
111
111
  ensure(data.digest === technicalDigest(data), '技术设计合同摘要不匹配');
112
112
  ensure(!['stale','blocked','drift','new_impacts'].includes(data.status), '设计状态不可消费');
113
113
  if (sliceRef) ensure(data.status === 'approved', '切片只能消费 approved 设计');
114
- verifyArchitecture(data, root, {execution,sliceRef});
114
+ verifyArchitecture(data, root, {execution,sliceRef,readOnly});
115
115
  ensure(data.inputs.some(item => item.kind === 'context' && item.ref === 'CONTEXT.md') && data.inputs.some(item => item.kind === 'spec'), '共同输入缺少根 CONTEXT.md 或 Spec');
116
116
  for (const input of data.inputs) ensure(hash(readFileSync(safe(root, input.ref))) === input.digest, `输入摘要漂移: ${input.ref}`);
117
117
  for (const ref of data.evidence_refs) safe(root, ref);
@@ -135,12 +135,15 @@ export async function validateTechnicalDesign(data, { root = process.cwd(), slic
135
135
  }
136
136
 
137
137
  async function main() {
138
- const { values, positionals } = parseArgs({ allowPositionals: true, options: { root: { type: 'string', default: process.cwd() }, slice: { type: 'string' }, 'legacy-ddd': { type: 'boolean', default: false }, 'read-only': {type:'boolean',default:false}, 'work-unit': {type:'string'}, 'approved-slice': {type:'string'}, 'approved-slice-digest': {type:'string'}, 'approved-slice-approval': {type:'string'} } });
138
+ const { values, positionals } = parseArgs({ allowPositionals: true, options: { root: { type: 'string', default: process.cwd() }, slice: { type: 'string' }, 'legacy-ddd': { type: 'boolean', default: false }, 'read-only': {type:'boolean',default:false}, 'validation-dependencies': {type:'boolean',default:false}, 'work-unit': {type:'string'}, 'approved-slice': {type:'string'}, 'approved-slice-digest': {type:'string'}, 'approved-slice-approval': {type:'string'} } });
139
139
  ensure(positionals.length === 1, '用法: validate-technical-design.mjs <合同> --root <项目根> [--slice <ID>] [--legacy-ddd]');
140
140
  const approvedOptions=['approved-slice','approved-slice-digest','approved-slice-approval'];
141
141
  ensure(!approvedOptions.some(key=>values[key])||approvedOptions.every(key=>values[key]),'执行增量必须完整给出持久化 Slice、字节摘要及本地批准引用');
142
- const execution=values['approved-slice']?createApprovedExecutionContext({ref:values['approved-slice'],digest:values['approved-slice-digest'],approval_ref:values['approved-slice-approval']},{root:values.root,work_unit_id:values['work-unit']}):undefined;
142
+ const output=await withValidationPhase({root:values.root,purpose:'technical-design',slice_id:values.slice,work_unit_id:values['work-unit'],readOnly:values['read-only']},async()=>{
143
+ const execution=values['approved-slice']?createApprovedExecutionContext({ref:values['approved-slice'],digest:values['approved-slice-digest'],approval_ref:values['approved-slice-approval']},{root:values.root,work_unit_id:values['work-unit'],readOnly:values['read-only']}):undefined;
143
144
  const result = await validateTechnicalDesign(read(path.resolve(positionals[0])), { root: values.root, sliceRef: values.slice, legacyDdd: values['legacy-ddd'], readOnly:values['read-only'], execution });
144
- process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
145
+ return values['validation-dependencies']?{...result,validation_dependencies:validationDependencies()}:result;
146
+ });
147
+ process.stdout.write(`${JSON.stringify(output, null, 2)}\n`);
145
148
  }
146
149
  if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) main().catch(error => { process.stderr.write(`${JSON.stringify({ result: 'blocked', errors: [error.message] })}\n`); process.exitCode = 1; });
@@ -18,7 +18,9 @@ description: "生成或改造完整 YSS UI CRUD、列表、表单、详情或左
18
18
  - 只写文档、提交信息或发版流程,不生成业务页面代码。
19
19
  - 用户明确要求不用 YSS UI 组件库。
20
20
 
21
- ## 必读参考
21
+ ## 按影响读取参考
22
+
23
+ 先读组件来源与当前实现合同;仅加载当前页面实际使用的组件、Hook、Utils 与交付验证资料,不预读所有专项技能。
22
24
 
23
25
  - 组件来源速查:`./references/component-map.md`
24
26
  - Hooks 速查:`./references/hooks-map.md`
@@ -56,7 +58,7 @@ description: "生成或改造完整 YSS UI CRUD、列表、表单、详情或左
56
58
  - 新增/导入/批量操作等主操作直接放入 `#toolbar-right` 插槽;**无需配置 `:toolbar-config="{ custom: true }"`**,避免无端展示列设置图标;**仅在业务明确需要列设置时才传入 `:toolbar-config="{ custom: true }"`**。
57
59
  - 删除确认默认使用 `YTable actionConfig.buttons[].isConfirm` 按钮项或 AntDV `Popconfirm` 气泡确认,禁止默认使用居中 `Modal.confirm`。
58
60
  - 样式抽离到 `style.less`,在 SFC 中使用 `<style scoped lang="less">@import './style.less';</style>`。
59
- - `index.vue` 原则上不超过 150 行;状态、API、副作用和处理方法进入 `hooks/`,列定义和静态配置进入 `constant.ts`。
61
+ - `index.vue` 按职责保持可读;状态或副作用使视图难以理解时拆分,不以固定行数作为验收门禁;状态、API、副作用和处理方法进入 `hooks/`,列定义和静态配置进入 `constant.ts`。
60
62
  - 页面目录默认使用 `index.vue + constant.ts + style.less + hooks/`;只有存在多个私有视图或大量独立类型时才增加 `components/` 和 `type.ts`。`index.vue` 只做 Hook 组合、视图编排和事件转发。
61
63
  - 列表查询只维护一份 `currentParams`;查询、重置、树节点切换均回到第一页,翻页保留筛选条件,批量操作成功后清空选中态。组件 API 服从 `ytable-usage` / `ytree-usage`,请求和竞态服从 `yss-hook`。
62
64
  - Modal/Drawer 表单的 `open/mode/currentId/formModel/submitting`、回填、提交和关闭收敛在同一业务 Hook。新增/编辑数据在打开容器前准备,容器关闭时销毁并清理;默认依赖响应式 `mode`/model,不用动态 `:key` 强制重挂载。
@@ -84,7 +86,7 @@ src/views/{module-name}/
84
86
 
85
87
  ## 生成流程
86
88
 
87
- 1. 读取本 skill 的三个 reference,并按上述文档检索顺序核对真实 API 与导出,禁止根据旧示例猜测。
89
+ 1. 读取组件来源速查;页面使用 Hook 或 Utils 时才追加相应 reference。按上述文档检索顺序核对真实 API 与导出,禁止根据旧示例猜测。
88
90
  2. 读取 `theme-token-usage`,检查项目真实主题变量与运行时同步链路。
89
91
  3. 若有截图或旧项目路径,先读取已批准且 digest 当前的 Visual Baseline manifest 和 `frontend_implementation_plan`,按 `case_id` 提取布局、状态、交互、响应式与控件类型验收项;缺失或摘要漂移时返回 `blocked`,不得凭目录或截图猜测。
90
92
  4. 按需求类型加载细分 skill:列表读 `ytable-usage` 与 `yss-hook`;表单读 `yss-formily`;编辑表格读 `yedit-table-usage`;树读 `ytree-usage`;导出下载读 `file-export-download`。
@@ -20,7 +20,7 @@ Read `references/source-index.md` as a path-hint index whenever the task depends
20
20
  ## Workflow
21
21
 
22
22
  1. Identify whether the task is JSR-303 annotation validation or an expression/EL parser request.
23
- 2. Read `references/source-index.md`; for JSR-303 behavior, read `yss-component-validation-jsr303/readme.md` first.
23
+ 2. Select the approved platform index and inspect the actual POM, validation message resources, consuming Controller annotations and matching exception Advice. The current module README is empty; do not treat reading it as prerequisite evidence.
24
24
  3. 当前组件仓不存在历史 `yss-component-validation-engine-parent`;表达式、LiteFlow EL 或 `ExpressParserFactory` 请求返回 `blocked`,先确认真实组件来源和生命周期影响,不以旧索引或通用知识生成实现。
25
25
  4. Keep validation failures mapped to the service/API error contract used by the local project.
26
26
  5. 消费工程基线选择 javax/jakarta,不自行升级 Java/Boot。MVC 输入校验放在 server/client,业务不变量由 service/core 验证;不生成 DDD Domain。HTTP 失败形态由 server 的合同测试验证。
@@ -11,7 +11,7 @@ description: "按冻结合同与稳定 Application 接口生成或重构 YSS Con
11
11
 
12
12
  以下 Application / Domain Gateway / Infrastructure / Web module 叙述仅适用于 target-domain-model;MVC 的 service/core/repository/server/client 所有权由所选 Profile 引用定义。
13
13
 
14
- 这是一个 Web 适配层生成型 skill。优先复用脚本 `scripts/generate_controller.mjs` 和模板,不手写重复 CRUD。
14
+ 本 Skill 同时支持只读审计、既有整改和新建 CRUD 生成。审计读取实际入口和现有契约,缺证据只记录缺口;整改消费批准 Slice、冻结 API/no-impact 与稳定用例 seam;仅新建 CRUD 才要求 Web generation contract、metadata 并调用 initialize-only 生成器。
15
15
 
16
16
  ## 何时使用
17
17
 
@@ -19,12 +19,13 @@ description: "按冻结合同与稳定 Application 接口生成或重构 YSS Con
19
19
  - 用户要根据冻结 OpenAPI 字段合同、metadata 和稳定 Application 接口生成 Request / Response / Controller / WebConvertor。
20
20
  - 用户要求统一 Web Adapter 风格、返回值和接口路径。
21
21
 
22
- ## 不适用
22
+ 手工认证、回调、Cookie、下载或流式接口适用本 Skill,但不强制使用 CRUD 脚本或 metadata。
23
23
 
24
- - 用户只是要新增一个手写复杂接口,不一定要用脚本。
25
- - 用户还没有稳定的 Application Service、冻结 OpenAPI 或 metadata,先回 实现合同编译器 补 `yss-application` / `yss-domain` 和相应合同输入。
24
+ ## 实施前置与审计边界
26
25
 
27
- ## 优先流程
26
+ - 只读审计可以记录用例 seam 或契约缺失。既有整改缺少批准 Slice、稳定用例 seam 或接口契约时,回实现合同编译器补齐;仅新建 CRUD 生成要求 metadata,不因缺 metadata 拒绝既有代码审计或手工接口整改。
27
+
28
+ ## 新建 CRUD 生成流程
28
29
 
29
30
  1. 先确认冻结 OpenAPI、批准且版本当前的 Web generation contract schema v2、Application Service 接口、metadata、基础包、模块名、领域 segment 和 web 落盘目录;合同必须绑定 Slice `contract_id` / `contract_version` / `slice_id`、`yss-dto` wire profile 引用与 digest、允许写路径、证据与验证命令。
30
31
  2. 加载并遵守 `yss-dto` 与 `yss-validation`;错误映射影响命中时再加载 `yss-exception`。
@@ -61,13 +62,19 @@ node scripts/generate_controller.mjs \
61
62
 
62
63
  ## 约束
63
64
 
65
+ <a id="web.use-case"></a>
66
+ <!-- yss-rule {"id":"web.use-case","when":"web","level":"mandatory","evidence":"code-and-verification"} -->
64
67
  - 生成代码只依赖既有 Application Service;读写操作都禁止绕过 Application。复杂查询经 Application Query Port 接入 Infrastructure。
68
+ <a id="web.wire"></a>
69
+ <!-- yss-rule {"id":"web.wire","when":"wire","level":"mandatory","evidence":"code-and-verification"} -->
65
70
  - 返回包装类、分页默认值、允许字段与 `PageResult.of(...)` 参数语义必须消费合同绑定的 `yss-dto/references/openapi-wire-profile.yaml`;Web skill 不复制或自行维护第二套协议。
66
71
  - DTO / VO / CMD / Query 默认用 Lombok 处理 getter/setter、constructor、builder 和日志样板;不要在 Controller 内部类或非约定包临时定义主要 DTO / VO。
67
72
  - `WebConvertor` 使用 `@Mapper(componentModel = "spring")` 和构造器注入;禁止静态 `INSTANCE`、在 Controller / Application 中大段手写字段赋值、使用 `BeanUtils.copyProperties` 或反射式通用拷贝。
73
+ <a id="web.pagination"></a>
74
+ <!-- yss-rule {"id":"web.pagination","when":"pagination","level":"mandatory","evidence":"code-and-verification"} -->
68
75
  - HTTP Request 不继承会暴露内部协作字段的 `PageQuery`;只生成冻结 OpenAPI allowlist 字段,禁止把 `offset`、`needTotalCount`、`tempTotalCount` 变成客户端输入。
69
76
  - `fields.<table>.pagination` 必须显式列出 `yss-dto` wire profile 允许暴露的字段子集;模板不得无条件生成字段或自行定义默认值。
70
- - 先跑脚本,再按项目规范做少量手调。
77
+ - 仅新建 CRUD 先跑脚本;既有整改和手工协议适配不重跑初始化生成器。
71
78
  - Validation namespace 参数必须来自批准的精确平台配置和当前工程基线,不得按记忆或 Boot 大版本自行选择。
72
79
  - 若用户只是要改单个 Controller,先看现有代码,不要盲覆盖整个目录。
73
80
  - 脚本是 initialize-only;写入前先规划全部目标并校验 `allowed_write_paths`,任一目标已存在或传入 `--force` 时整体返回 `unsupported`。落盘使用排他创建和失败回滚,不得留下部分文件;旧项目迁移不属于该生成器。
@@ -85,8 +92,10 @@ node scripts/generate_controller.mjs \
85
92
 
86
93
  ## 阶段 7 合同
87
94
 
88
- - 只消费已批准且当前的 schema v2 Web generation contract 和冻结 OpenAPI/no-impact record;schema v1 为 `unsupported`,不得自动升级,也不得用 Controller 或半成品 backend 反向定义产品契约。
95
+ - 所有写入消费批准且当前的 Slice 与冻结 OpenAPI/no-impact record;只有新建 CRUD 生成还要求 schema v2 Web generation contract。生成合同 v1 为 `unsupported`,不得自动升级;不得用 Controller 反向定义产品契约。
89
96
  - DTO/VO/WebConvertor 机械骨架可用 `controlled-generation`;权限、错误映射、校验语义和接口行为必须使用 `behavior-tdd`。
97
+ <a id="web.write-scope"></a>
98
+ <!-- yss-rule {"id":"web.write-scope","when":"change","level":"mandatory","evidence":"code-and-verification"} -->
90
99
  - 写入必须位于合同 `allowed_write_paths`,并提供 Controller、DTO/VO、WebConvertor、契约/API 测试和实际验证结果。
91
100
  - 按统一 `YSS Skill Execution Result` 返回偏离与新增影响;出现新 API/schema、权限或响应包装变化时暂停并回到 实现合同编译器/生命周期。
92
101
 
@@ -216,7 +216,7 @@ onMounted(loadList);
216
216
  2. **行唯一键**:必须显式指定 `:row-config="{ keyField: 'id', useKey: true }"`(`keyField` 与业务主键如 `userCode` 对齐)。
217
217
  3. **受控双向绑定**:推荐优先使用 `v-model:selected-row-keys="selectedRowKeys"` 或 `v-model:selected-rows="selectedRows"`,或者统一监听 `@selection-change`。
218
218
  4. **批量操作按钮**:放在 `#toolbar-right`,并配置 `:disabled="selectedRowKeys.length === 0"`。
219
- 5. **清空选中态**:批量操作成功后,直接重置 `selectedRowKeys.value = []` 或调用 `tableRef.value.clearSelection()`。
219
+ 5. **清空选中态**:批量操作成功后,清空实际受控的 `selectedRowKeys` / `selectedRows`,并在存在表格内部选择缓存时调用已核验的 `tableRef.value.clearSelection()`。受控状态与组件可见勾选必须一致;不能只清其中一层。
220
220
 
221
221
  ```vue
222
222
  <YTable
@@ -244,7 +244,7 @@ onMounted(loadList);
244
244
 
245
245
  - [ ] 分页状态和 `page-change` 参数均使用 `current/pageSize`,未使用 `currentPage`;`filter-change` 与 YTable 真实 API 一致。
246
246
  - [ ] 多选列已配置 `type: 'checkbox'`,已设置 `:row-config="{ keyField: 'xxx', useKey: true }"`,批量按钮绑定了 `selectedRowKeys.length === 0` 禁用。
247
- - [ ] 批量操作成功后已重置 `selectedRowKeys` 并调用 `tableRef.clearSelection()`。
247
+ - [ ] 批量成功后,所有实际受控选择字段与表格可见勾选均已清空;内部缓存存在时已通过 `clearSelection()` 清除。
248
248
  - [ ] 未使用虚构 `request/searchParams/row-key` Props,也未把 `refresh()` 当成远程请求。
249
249
  - [ ] 工具栏、字典翻译、操作确认与高度偏移均与实际开关一致。
250
250
  - [ ] 查询、重置、翻页、刷新和导出复用同一份 `currentParams`;查询/重置回到第一页,批量成功后清空选中态。
@@ -42,6 +42,8 @@
42
42
 
43
43
  ## 6. Ticket 与状态
44
44
 
45
+ - Plan / Spec / Design 按 `docs/process/stage-tracking.md` 从阶段入口登记工作、按需拆分并在恢复 / 流转时验证;工作项进度不替代 Ticket 五态和阶段批准。
46
+
45
47
  - 每个功能先建父 Ticket,汇总阶段资产、审查、阻塞和证据。
46
48
  - Spec、设计、原型、OpenAPI Draft 和待冻结资产使用 `ready-for-human`;只有门禁通过、阻塞清除且可直接实现的垂直切片才能使用 `ready-for-agent`。
47
49
  - 按 `docs/agents/issue-tracker.md` 持久化主 tracker,不从 Git remote 推断;平台不可用时生成待发布草案。五态见 `docs/agents/triage-labels.md`。
@@ -39,8 +39,9 @@ context_schema_version: 1
39
39
  | 技能投影 | 从权威共享技能生成、供特定 Agent root 加载的同步副本。 | — | 投影不是独立维护的技能源,不应在各 Agent root 中分别修改。 |
40
40
  | Spec | 记录用户问题、解决方案、用户故事、关键决策、验收标准和测试 seam 的产品研发规格。 | — | 新资产统一使用 Spec;旧规格称谓只在迁移记录中保留。 |
41
41
  | Spec Delta | 记录相对于既有冻结 Spec 基线的 `ADDED / MODIFIED / REMOVED` 行为、验收场景和测试映射。 | — | 不用于全新产品或全新模块,也不替代完整 Spec、OpenAPI 或架构资产。 |
42
+ | 阶段工作项 | Plan、Spec、Design 中有明确负责人、验收和证据的工作记录;当前进度由 checkpoint.stage_tracking 持有,按需独立落盘。 | — | 不等同于业务 Ticket 或可实现垂直切片,不授予 ready-for-agent。 |
42
43
  | Ticket | 在追踪平台上承载功能生命周期或可实现工作单元的通用追踪对象。 | — | GitHub Issues / GitLab Issues 是具体平台对象名称;领域资产统一称为 Ticket。 |
43
- | 功能父 Ticket | 汇总一个功能从 Spec 到契约冻结的阶段状态、资产链接、审查结论和阻塞项的 Ticket。 | — | 不作为 Agent 直接实现的垂直切片。 |
44
+ | 功能父 Ticket | 汇总一个功能从 Plan 或最近可信接入阶段到契约冻结的阶段状态、资产链接、审查结论和阻塞项的 Ticket。 | — | 不作为 Agent 直接实现的垂直切片。 |
44
45
  | 垂直切片 Ticket | 契约冻结后生成的可独立验证实现单元,记录范围、阻塞关系、验收标准和验证证据。 | — | 只有通过必要门禁并具备直接实现条件时才能标记 `ready-for-agent`。 |
45
46
  | `ready-for-human` | 表示 Spec、设计、契约草案或其他资产仍需会签(指定数字人或生物人)。 | — | 此状态不表示可以直接进入实现;也不等于某个数字人角色。 |
46
47
  | `ready-for-agent` | 表示垂直切片已通过必要门禁并具备直接实现条件的流程状态。 | — | 不得用于 Spec 初稿、原型、OpenAPI Draft 或其他未冻结资产。 |
@@ -102,6 +102,7 @@ scripts/verify-template-fast
102
102
  |------|------|
103
103
  | [AGENTS.md](./AGENTS.md) | 全局 AI 指令 + 工程基线入口 + Agent 协作 |
104
104
  | [docs/user-guide/用户手册.md](./docs/user-guide/用户手册.md) | 从首次只读检查到需求、开发、审查、发布和 CLI 操作的统一用户手册 |
105
+ | [阶段接入与产物复用使用手册](./docs/user-guide/阶段接入与产物复用使用手册.md) | 复用上游资产,从指定入口继续;含后端交付后前端开发操作 |
105
106
  | [docs/process/PDCA-SCRUM.md](./docs/process/PDCA-SCRUM.md) | PDCA × Scrum × AI |
106
107
  | [docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md](./docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md) | Matt Pocock Engineering Skills 集成与使用 |
107
108
  | [docs/process/lifecycle-registry.yaml](./docs/process/lifecycle-registry.yaml) | 生命周期结构事实源:主阶段、门禁、产物、工作单元、证据与稳定 ID |
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  tracker:
3
+ lifecycle_tracking_version: 1
3
4
  platform: local-markdown
4
5
  root: docs/.scratch
5
6
  legacy_roots:
@@ -135,3 +136,9 @@ Ticket 是默认 triage surface。MR / PR 是否纳入 triage 取决于当前平
135
136
  - Local Markdown:读取引用的 `docs/.scratch/<feature>/...` 文件;旧路径引用必须先经过迁移检查。
136
137
  - GitLab:使用 `glab issue view <iid> --comments`。
137
138
  - GitHub:使用 `gh issue view <number> --comments`。
139
+
140
+ ## 阶段工作追踪
141
+
142
+ 新初始化默认启用 `tracker.lifecycle_tracking_version: 1`。已有项目的 attach / sync 保留原配置;缺省保持旧模式,按 [阶段工作追踪](../process/stage-tracking.md) 执行 check → plan → apply。
143
+
144
+ Plan / Spec / Design 的小工作记录在 checkpoint.stage_tracking;独立工作项使用 `work-items/<id>.md`,不占用业务票 / 实现切片的 `issues/`。执行进度只由 checkpoint 保存,父票和 map 引用;阶段工作项不得设置 `ready-for-agent`。
@@ -0,0 +1,46 @@
1
+ # 合同阅读、准备与显式迁移
2
+
3
+ 本文件描述工具入口;阶段、批准和执行门禁仍由 `docs/process/lifecycle-registry.yaml` 及资产所有者定义。YAML 是权威文件,视图不能编辑、批准合同或授予执行权限。
4
+
5
+ ```sh
6
+ scripts/contract view <资产> --kind <类型> [--profile review|task|full] [--unit <ID>] [--json]
7
+ scripts/contract diff <旧资产> <新资产> --kind <类型> [--json]
8
+ ```
9
+
10
+ 默认 `review` 展示目标、非目标、验收、取舍、风险及未决事项,隐藏机器摘要明细,不附带折叠完整 JSON。`task` 保留适用工作单元、执行目录、写边界、Skill、验证、证据和未分类约束;Slice 必须明确 `--unit`。`full` 读取完整权威内容与绑定。三种视图均显示权威身份、版本、完整 SHA-256 和检查范围。批准有效性未核验;执行仍使用原预检和派发入口。来源未提供风险或取舍时明确标记缺口,不推断为无风险。
11
+
12
+ | 类型 | 资产组 | 阅读后的权威处理入口 |
13
+ |---|---|---|
14
+ | `plan`、`spec` | Plan、Spec 范围、用户决定 | 生命周期和用户决定校验 |
15
+ | `product-design`、`prototype-confirmation`、`visual-baseline` | 产品设计、确认、视觉基线 | 产品设计所有者校验 |
16
+ | `technical-design` | 技术设计 | 技术设计校验与生命周期批准 |
17
+ | `api-decision`、`data-decision` | API / 数据决定 | 对应决定校验、工程契约批准 |
18
+ | `scaffold`、`scaffold-decision` | 脚手架合同、架构选择 | 脚手架所有者及原始用户决定 |
19
+ | `slice` | Slice 与工作单元 | `scripts/slice-contract inspect`、原批准与派发 |
20
+ | `handoff`、`backend-delivery`、`frontend-acceptance` | 战略交接、后端交付、前端接收 | 对应包 / 交付 / 接收验证器 |
21
+ | `approval`、`user-decision`、`context-reconciliation` | 会签、原始回复、Context 对账 | 原批准 / 用户决定 / Context 校验 |
22
+
23
+ 通用适配器保留未知字段,只做可读取、适用 schema 和可识别来源绑定核对;不支持结构核验的类型会明确标记。专用资产所有者的业务校验并未被通用视图替代。Markdown 正文完整保留。API v2 审查结果从绑定的实际记录展示。摘要字段变化、数组顺序和纯字节变化均在 diff 中保留,不据此自动认定批准可沿用。
24
+
25
+ ## 准备机器字段
26
+
27
+ Slice 继续使用 `scripts/slice-contract prepare`。来源的原始字节摘要、版本、别名、Skill 闭包和验证映射由现有准备器生成。共用的 `scripts/lib/contract-source.mjs` 只读取明确选择的来源;冲突报告保留 supplied / observed 和恢复动作,不根据目录猜测授权。其他资产继续使用各自的生成器,不新增项目人员要维护的表单。
28
+
29
+ API 决定的新结构使用独立 v2 schema,v1 schema 和读取兼容保留:
30
+
31
+ ```sh
32
+ scripts/api-contract-decision prepare <来源选择.yaml> --output <新草案.yaml>
33
+ scripts/api-contract-decision migrate <已批准v1.yaml> --version v2 --output <新候选.yaml>
34
+ ```
35
+
36
+ 准备输入包括决定 ID / 版本、影响、评估引用、证据和业务原因;有 API 影响时再给 `openapi.id/ref/version`、`validation_record.ref`、`draft_review.ref` 和 `freeze.version/frozen_at`。摘要自动生成;来源明确但缺失时报告缺口。准备器不能产生批准状态。新路径以排他方式写入;已存在路径不能覆盖。
37
+
38
+ v2 的 `openapi` 是唯一 Draft 绑定,`draft_review` 只存 `ref/digest`,Freeze 只保存版本和时间;实际结果、阻断项与 Draft 来源从真实审查记录读取。v1/v2 在消费时归一,外部永远绑定原文件 SHA-256。迁移先验证完整 v1,旧审查额外证据合并到顶层,旧文件与旧批准保持原字节。新候选按既有差异及授权延续协议处理,不继承批准。
39
+
40
+ ## 验证阶段与回退
41
+
42
+ 预检、准备、派发各自建立私有验证阶段。阶段绑定根目录、用途、切片、工作单元、只读状态;只在本次操作内共享输入和纯校验结果。原始输入不可变,返回给调用者的是独立副本。相同 schema、输入和格式选项复用;外部 `$ref` 未追踪的校验不享受结果复用。Python 引擎、同步 API 和技术设计 Node 边界保留。
43
+
44
+ 成功返回前复核所有登记原字节、目录枚举及不存在项。技术设计子进程自行验证批准,再返回依赖清单;父进程合并读取集合,读取矛盾、遗漏报告或异常均阻断。此清单不是批准上下文。品牌上下文不能序列化、跨仓或从只读升级;在阶段中生成的上下文结束后失效。调用者可传入 `AbortSignal`,已收到的撤回事件须中止当前操作;下一次边界始终重新读取当前批准和回复。未接入读取追踪的消费者保留原检查,不共享结果。
45
+
46
+ P1 可回用原 `slice-contract` 阅读入口;P2 可回退阶段调用与本次改动的读取适配,恢复完整重复检查;P3 可停止创建 v2,但已生成 v2 的读取能力必须保留。回退后重新验证当前来源和批准,不恢复历史通过状态。
@@ -14,7 +14,7 @@
14
14
  | `stage.spec-architecture` | Spec / 功能架构 | 固化解决方案和功能边界。 | Spec 基线和功能边界可审查。 |
15
15
  | `stage.product-design` | 产品设计 | 在存在产品设计影响时校准页面流和状态。 | 命中的设计门禁通过;未命中项记录 not-applicable 及原因。 |
16
16
  | `stage.system-data-engineering` | 系统 / 数据架构与工程契约 | 固化系统、数据、工程基线和 API 契约。 | 新建后端已由用户确认 DDD / MVC 与精确 Spring Boot 版本,既有工程已核验并复用登记值;受影响工程契约冻结或记录无 API 影响;required 脚手架证据齐全。 |
17
- | `stage.ticket-formalization` | Ticket 正式化 | 将冻结范围拆为可追踪的父 Ticket 和垂直切片。 | 工作单元窄、依赖清晰、验收和测试 seam 可执行。 |
17
+ | `stage.ticket-formalization` | Ticket 正式化 | 在既有功能追踪入口下,将冻结范围正式化为垂直切片。 | 工作单元窄、依赖清晰、验收和测试 seam 可执行。 |
18
18
  | `stage.vertical-slice-implementation` | 垂直切片实现 | 以批准合同驱动 TDD 实现和跨仓库协作。 | 允许写路径、禁止模式、证据和验证命令全部满足。 |
19
19
  | `stage.verification-release-retrospective` | 验证 / 发布 / 复盘 | 完成 fresh verification、发布和回顾。 | 所有命中门禁通过,人工审查点已完成,checkpoint 可追溯。 |
20
20
 
@@ -82,7 +82,7 @@
82
82
  | `artifact.implementation-repository-preparation-result` | 实现仓库准备结果 | `stage.system-data-engineering` | 后端或前端交付面进入 Ticket 正式化。 |
83
83
  | `artifact.tactical-design` | DDD 战术设计 | `stage.system-data-engineering` | 聚合边界、状态机、一致性或持久化映射复杂到无法在系统概要设计的 Tactical DDD Check 中清楚表达。 |
84
84
  | `artifact.spec-delta` | Spec Delta | `stage.spec-architecture` | 已有冻结 Spec 的高风险行为变化。 |
85
- | `artifact.parent-ticket` | 功能父 Ticket | `stage.ticket-formalization` | 每个进入追踪的功能。 |
85
+ | `artifact.parent-ticket` | 功能父 Ticket | `stage.plan` | 每个功能首次进入 Plan 或最近可信接入阶段时建立,正式化时复用;Design profile 不创建工程父 Ticket。 |
86
86
  | `artifact.vertical-slice-ticket` | 垂直切片 Ticket | `stage.ticket-formalization` | 进入实现前。 |
87
87
  | `artifact.slice-implementation-contract` | Slice Implementation Contract | `stage.ticket-formalization` | Agent 进入实现。 |
88
88
  | `artifact.frontend-implementation-plan` | 前端实现还原计划 | `stage.ticket-formalization` | UI 影响切片提升 ready-for-agent 前。 |
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "registry_id": "yss.lifecycle",
4
- "semantic_sha256": "38afc53efe827596c036133c826acd818c8dab85fab0f430d62a60cf62005196",
4
+ "semantic_sha256": "09490c2a354d5452d52522cc36e04cec044faf62cb3c80c90bf95cd07963f0fb",
5
5
  "published_ids": [
6
6
  "artifact.architecture-review",
7
7
  "artifact.data-architecture",
@@ -104,6 +104,7 @@
104
104
  "stage.verification-release-retrospective",
105
105
  "stage.vertical-slice-implementation",
106
106
  "work-unit.attach-sync-integration",
107
+ "work-unit.backend-delivery",
107
108
  "work-unit.code-review",
108
109
  "work-unit.discovery-opportunity",
109
110
  "work-unit.discovery-requirements",
@@ -62,7 +62,7 @@ stages:
62
62
  exit_criteria: 新建后端已由用户确认 DDD / MVC 与精确 Spring Boot 版本,既有工程已核验并复用登记值;受影响工程契约冻结或记录无 API 影响;required 脚手架证据齐全。
63
63
  - id: stage.ticket-formalization
64
64
  name: Ticket 正式化
65
- goal: 将冻结范围拆为可追踪的父 Ticket 和垂直切片。
65
+ goal: 在既有功能追踪入口下,将冻结范围正式化为垂直切片。
66
66
  exit_criteria: 工作单元窄、依赖清晰、验收和测试 seam 可执行。
67
67
  - id: stage.vertical-slice-implementation
68
68
  name: 垂直切片实现
@@ -309,8 +309,8 @@ artifacts:
309
309
  trigger: 已有冻结 Spec 的高风险行为变化。
310
310
  - id: artifact.parent-ticket
311
311
  name: 功能父 Ticket
312
- stage: stage.ticket-formalization
313
- trigger: 每个进入追踪的功能。
312
+ stage: stage.plan
313
+ trigger: 每个功能首次进入 Plan 或最近可信接入阶段时建立,正式化时复用;Design profile 不创建工程父 Ticket。
314
314
  - id: artifact.vertical-slice-ticket
315
315
  name: 垂直切片 Ticket
316
316
  stage: stage.ticket-formalization
@@ -445,7 +445,7 @@ work_units:
445
445
  name: 垂直切片 Ticket 正式化
446
446
  scope: project-instance
447
447
  input: 冻结 Spec、设计、契约和阻塞关系。
448
- output: 功能父 Ticket、垂直切片和批准的 Slice Implementation Contract。
448
+ output: 更新既有功能父 Ticket 的关联、形成垂直切片和批准的 Slice Implementation Contract。
449
449
  completion: 切片可独立验证;生命周期复算后才能 ready-for-agent。
450
450
  - id: work-unit.slice-implementation
451
451
  name: 垂直切片实现
@@ -465,6 +465,12 @@ work_units:
465
465
  input: 不可变候选快照、Spec、Ticket、合同和执行结果。
466
466
  output: Standards、Spec、UI fidelity 三轴 Review 与 fresh verification。
467
467
  completion: findings 已处理;修复后重新捕获候选并全量复审。
468
+ - id: work-unit.backend-delivery
469
+ name: 后端职责交付终点
470
+ scope: project-instance
471
+ input: plan-to-backend 职责范围、当前 Slice 批准与独立代码审查、Backend Delivery 源文件及正式导出包。
472
+ output: 绑定当前源、独立审查和正式包的后端终点记录及下游前端待办。
473
+ completion: 完整复验源文件与正式包;仅后端可交付,不能宣布全业务完成或自动发布。
468
474
  - id: work-unit.release-and-retrospective
469
475
  name: 发布与复盘
470
476
  scope: project-instance