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
@@ -0,0 +1,259 @@
1
+ {
2
+ "type": "object",
3
+ "additionalProperties": false,
4
+ "required": [
5
+ "schema_version",
6
+ "feature_id",
7
+ "checkpoint_ref",
8
+ "entry_stage",
9
+ "entry",
10
+ "items"
11
+ ],
12
+ "properties": {
13
+ "schema_version": {
14
+ "const": 1
15
+ },
16
+ "feature_id": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "checkpoint_ref": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "entry_stage": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "entry": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": [
32
+ "kind",
33
+ "ref"
34
+ ],
35
+ "properties": {
36
+ "kind": {
37
+ "enum": [
38
+ "parent-ticket",
39
+ "checkpoint"
40
+ ]
41
+ },
42
+ "ref": {
43
+ "type": "string",
44
+ "minLength": 1
45
+ }
46
+ }
47
+ },
48
+ "items": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "id",
55
+ "kind",
56
+ "title",
57
+ "stage",
58
+ "work_unit",
59
+ "owner",
60
+ "scope",
61
+ "acceptance",
62
+ "dependencies",
63
+ "source_refs",
64
+ "progress",
65
+ "split_reasons",
66
+ "completion"
67
+ ],
68
+ "properties": {
69
+ "id": {
70
+ "type": "string",
71
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
72
+ },
73
+ "kind": {
74
+ "const": "stage-work-item"
75
+ },
76
+ "title": {
77
+ "type": "string",
78
+ "minLength": 1
79
+ },
80
+ "stage": {
81
+ "type": "string",
82
+ "minLength": 1
83
+ },
84
+ "work_unit": {
85
+ "type": "string",
86
+ "minLength": 1
87
+ },
88
+ "owner": {
89
+ "type": "string",
90
+ "minLength": 1
91
+ },
92
+ "scope": {
93
+ "type": "string",
94
+ "minLength": 1
95
+ },
96
+ "acceptance": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "minItems": 1,
103
+ "uniqueItems": true
104
+ },
105
+ "dependencies": {
106
+ "type": "array",
107
+ "items": {
108
+ "type": "string",
109
+ "minLength": 1
110
+ },
111
+ "uniqueItems": true
112
+ },
113
+ "source_refs": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": [
119
+ "ref",
120
+ "digest"
121
+ ],
122
+ "properties": {
123
+ "ref": {
124
+ "type": "string",
125
+ "minLength": 1
126
+ },
127
+ "digest": {
128
+ "type": "string",
129
+ "pattern": "^sha256:[0-9a-f]{64}$"
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "progress": {
135
+ "enum": [
136
+ "pending",
137
+ "running",
138
+ "blocked",
139
+ "completed",
140
+ "cancelled"
141
+ ]
142
+ },
143
+ "split_reasons": {
144
+ "type": "array",
145
+ "items": {
146
+ "enum": [
147
+ "different-owner",
148
+ "independent-acceptance",
149
+ "blocks-other-work",
150
+ "cross-stage-deferral"
151
+ ]
152
+ },
153
+ "uniqueItems": true
154
+ },
155
+ "completion": {
156
+ "type": "array",
157
+ "items": {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": [
161
+ "criterion",
162
+ "evidence_refs"
163
+ ],
164
+ "properties": {
165
+ "criterion": {
166
+ "type": "string",
167
+ "minLength": 1
168
+ },
169
+ "evidence_refs": {
170
+ "type": "array",
171
+ "items": {
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "ref",
176
+ "digest"
177
+ ],
178
+ "properties": {
179
+ "ref": {
180
+ "type": "string",
181
+ "minLength": 1
182
+ },
183
+ "digest": {
184
+ "type": "string",
185
+ "pattern": "^sha256:[0-9a-f]{64}$"
186
+ }
187
+ }
188
+ },
189
+ "minItems": 1
190
+ }
191
+ }
192
+ }
193
+ },
194
+ "definition_ref": {
195
+ "type": "string",
196
+ "minLength": 1
197
+ },
198
+ "definition_digest": {
199
+ "type": "string",
200
+ "pattern": "^sha256:[0-9a-f]{64}$"
201
+ },
202
+ "recheck_required": {
203
+ "type": "boolean"
204
+ },
205
+ "cancellation_reason": {
206
+ "type": "string",
207
+ "minLength": 1
208
+ },
209
+ "deferred": {
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "required": [
213
+ "owner",
214
+ "resolve_by",
215
+ "receiver",
216
+ "verification_plan",
217
+ "decision_ref",
218
+ "risk",
219
+ "follow_up_ref"
220
+ ],
221
+ "properties": {
222
+ "owner": {
223
+ "type": "string",
224
+ "minLength": 1
225
+ },
226
+ "resolve_by": {
227
+ "type": "string",
228
+ "format": "date-time"
229
+ },
230
+ "receiver": {
231
+ "type": "string",
232
+ "minLength": 1
233
+ },
234
+ "verification_plan": {
235
+ "type": "string",
236
+ "minLength": 1
237
+ },
238
+ "decision_ref": {
239
+ "type": "string",
240
+ "minLength": 1
241
+ },
242
+ "risk": {
243
+ "type": "string",
244
+ "minLength": 1
245
+ },
246
+ "follow_up_ref": {
247
+ "type": "string",
248
+ "minLength": 1
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
254
+ }
255
+ },
256
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
257
+ "$id": "https://yss.dev/schemas/stage-tracking.schema.json",
258
+ "title": "阶段工作追踪 v1"
259
+ }
@@ -0,0 +1,62 @@
1
+ # Plan / Spec / Design 阶段工作追踪
2
+
3
+ 本合同由主 tracker 与生命周期编排器消费。阶段、注册工作单元及父 Ticket 创建时点以生命周期注册表为准;工作项结构以 `schemas/stage-tracking.schema.json` 为准。
4
+
5
+ ## 启用与职责
6
+
7
+ `docs/agents/issue-tracker.md` 的 `tracker.lifecycle_tracking_version: 1` 表示项目已启用。新初始化默认启用;attach / sync 保留已有配置,未声明的旧项目不自动启用。只读检查不修改项目;旧项目先 plan 再显式 apply。模板源只维护机制,不在模板根生成产品工作项。
8
+
9
+ 完整研发从 Plan(或接入的最近可信阶段)建立唯一父 Ticket。Design 继续使用 checkpoint / map,不创建工程父 Ticket。Backend / Frontend 只消费已交接资产,不因本协议取得 Plan、Spec 或产品设计的编写权限。Dev 消费主模板的同一协议。
10
+
11
+ checkpoint 的 `stage_tracking` 是阶段工作项当前进度的唯一机器状态源。父 Ticket、map、远程镜像只引用它。业务 Ticket 与工程切片仍由现有 tracker 管理;本协议不替代 Ticket 五态、业务批准、工作单元结果或实现合同。
12
+
13
+ ## 工作项
14
+
15
+ 同一负责人可连续完成的小工作以内联项记录。不同负责人、独立验收、阻塞其他工作或跨阶段延期时创建 `work-items/<id>.md`,类型为 `stage-work-item`。`issues/` 继续承载各 profile 的业务 Ticket / 实现切片。
16
+
17
+ 工作项包含 ID、标题、阶段、注册工作单元、负责人、范围、验收条件、依赖、源资产摘要、进度和验收证据;独立说明文件不保存 `Status` 或进度。相同 ID 恢复时复用;同 ID 不同定义返回冲突。每项 `source_refs` 绑定实际消费的输入;`completion` 逐条将验收条件关联到可读取且当前的证据摘要,不能以文件存在代替验收。
18
+
19
+ 进度为 `pending / running / blocked / completed / cancelled`。取消要有理由;延期保留未完成进度,并记录风险、负责人、解决时点、接收方、后续引用、验证计划和既有决定引用。延期不绕过原有门禁或风险接受规则。完成要求所有依赖已完成、逐条验收有证据且来源未漂移。阶段工作项不得出现 `ready-for-agent`,也不能绑定为 Slice 的实现 Ticket。
20
+
21
+ ## 推进与恢复
22
+
23
+ 1. 正式写入阶段资产前,先建立 checkpoint 与当前工作项;缺负责人 / 范围 / 验收时保留缺口,不推断历史完成。
24
+ 2. 进入当前阶段前检查 `scripts/stage-tracking check`;恢复时同样执行。阻塞、责任变化、资产批准和阶段退出必须回写,普通编辑仍集中记录。
25
+ 3. `Workflow Execution Result.checkpoint_ref` 引用当前持久 checkpoint。流转验证读取真实 checkpoint,拒绝仅在结果中自述追踪已完成。
26
+ 4. 上游或验收证据摘要变化时,用 `plan --refresh` 生成受影响项回到 pending / recheck_required 的差异,再 apply;旧摘要与证据原样保留。复验后由主控更新源摘要及验收映射,清除 recheck_required。
27
+ 5. 流转要求当前工作单元的必需项完成或按原规则延期;跨阶段检查当前阶段。无依赖工作可继续,延期并不使依赖它的工作可执行。
28
+ 6. 完成工作项只代表其验收通过,不能替代 Spec、Design 或工程合同批准。
29
+
30
+ ## 公共命令
31
+
32
+ ```sh
33
+ scripts/stage-tracking check --root <项目> --checkpoint docs/.scratch/<feature>/checkpoint.yaml
34
+ scripts/stage-tracking plan --root <项目> --checkpoint docs/.scratch/<feature>/checkpoint.yaml --items <工作项数组.yaml> > <plan.json>
35
+ scripts/stage-tracking apply --root <项目> --plan <plan.json>
36
+ scripts/stage-tracking plan --root <项目> --checkpoint docs/.scratch/<feature>/checkpoint.yaml --refresh > <refresh-plan.json>
37
+ ```
38
+
39
+ check / plan 不写项目。首次 checkpoint 不存在时,plan 从本项目 checkpoint 模板形成草稿。没有明确工作项时输出 gaps,apply 拒绝。items 只登记 pending 项,不把历史产物推断为完成,也不覆盖已有同 ID 项。
40
+
41
+ apply 复验项目身份、计划摘要、全部观察文件及源证据摘要,备份后写入。写入失败恢复本次已写内容;若检测到后续并发修改,保留文件并报告恢复冲突。备份和失败清单保存在功能包 verification/stage-tracking-migrations 内;不得删除后续执行证据。相同成功计划再次应用返回 unchanged。
42
+
43
+ 远程 tracker 不可用时,父票保留 publication: pending 和 pending_publication_to;本工具不访问远程平台。下游正式化业务票 / 切片时关联本阶段资产与工作项引用,不将已完成设计工作项改写为开发切片。
44
+
45
+ 首次登记的工作项数组示例(路径、负责人、范围与验收按真实任务填写):
46
+
47
+ ```yaml
48
+ - id: clarify-scope
49
+ title: 明确本轮范围
50
+ stage: stage.plan
51
+ work_unit: work-unit.plan-requirements
52
+ owner: 当前需求负责人
53
+ scope: 明确本轮包含与排除的业务行为
54
+ acceptance:
55
+ - 范围及至少一个边界例子可供审阅
56
+ dependencies: []
57
+ source_refs:
58
+ - docs/.scratch/example/plan/input.md
59
+ split_reasons: []
60
+ ```
61
+
62
+ 不同负责人和被其他项依赖的工作会自动拆分;独立验收使用 `split_reasons: [independent-acceptance]`。登记只创建 pending 项,不能把输入文件当成已通过的验收证据。启用项目缺少 checkpoint 时,check 返回非零退出码;先审阅并应用登记计划,再进入阶段写入。
@@ -106,3 +106,11 @@ scripts/strategic-feedback verify-adjudication --root <消费者项目根> <adju
106
106
  `gate.strategic-design-handoff-approved` 不要求新的用户回复,也不把旧决定改写为交接决定。产品经理形成完整交接包后,由需求经理独立复核来源批准新鲜度、完整包摘要、风险与范围,并以 Fresh Verification 关闭交接门禁。缺少独立复核、来源批准过期、摘要漂移或验证失败均阻断 finalize。
107
107
 
108
108
  历史包中的 `strategic-decision-reuse-v1`、`decision_reuse_ref` 和旧门禁批准保持可读,供离线 `verify/import` 复核当时证据。它们不能关闭当前聚合门禁;任何修改、重发或继续流转都必须先完成战略门禁迁移并重新批准。
109
+
110
+ ## 插件接收入口与目标路由
111
+
112
+ `yss-product-design` 在战略 profile 内完成设计与 Handoff v5 交付,`yss-backend-delivery` 通过 `project-import-design` 调用目标项目的 `scripts/strategic-consumer-entry --root <目标根> --bundle <交付目录或ZIP>`。入口先验证源包与后端路线,再执行既有 import;返回收据和目标工程设计入口,固定 `ready_for_agent: false`。恢复以 `--receipt <项目内收据路径>` 重新验证,查询不导入文件。
113
+
114
+ 源 `work-unit.technical-design` 保留不变,目标主控 `consumer_entry_routes` 持有精确映射;`plan-to-backend` 和完整主模板进入 `work-unit.technical-analysis`,专职后端进入自己的 `work-unit.technical-design`。目标工作单元不存在或超出 profile/职责范围时阻断。后端插件的 scope 只选择 backend-technical-design;源包保留完整前端、协调路线,不宣称已接管或完成。
115
+
116
+ 正式交付目录导入生成 Receipt v3;现有运输 package.zip 按已有协议生成 v2 收据,源包、批准、逻辑摘要仍须完整校验,不能补造 source-delivery-record。消费校验、反馈裁决和 Slice Contract 的实现门禁保持不变。
@@ -92,6 +92,8 @@ npx create-yss-harness-frontend@latest init --target-dir ./frontend-project --pr
92
92
 
93
93
  完整演练见[设备借用贯穿案例](设备借用贯穿案例.md),后端技术设计见[技术设计用户指南](技术设计用户指南.md)。
94
94
 
95
+ 已有 Spec、设计、冻结接口或后端交付包时,按[阶段接入与产物复用使用手册](阶段接入与产物复用使用手册.md)从最近可信阶段继续。手册提供可复制指令、前端接收操作、命令及阻塞处理,帮助复用有效上游资产并补齐当前阶段缺口。
96
+
95
97
  ## 接管、同步与恢复
96
98
 
97
99
  综合 CLI 示例:
@@ -5,6 +5,7 @@
5
5
  1. [YSS 用户手册](用户手册.md):四个现行家族的选型、CLI、确认、同步和恢复。
6
6
  2. [设备借用贯穿案例](设备借用贯穿案例.md):战略、后端、前端与统一验收的完整练习。
7
7
  3. [技术设计用户指南](技术设计用户指南.md):批准战略或 Spec 如何进入 DDD / layered-mvc 技术设计和实现合同。
8
+ 4. [阶段接入与产物复用使用手册](阶段接入与产物复用使用手册.md):从已有产物继续,含后端交付后前端接收、准备、开发及恢复步骤。
8
9
 
9
10
  ## 按职责进入子项目
10
11
 
@@ -0,0 +1,243 @@
1
+ # 阶段接入与产物复用使用手册
2
+
3
+ 已有需求、设计、冻结接口或交付包时,可以让 `yss-product-lifecycle` 核验这些产物,从最近可信阶段继续。有效的上游成果可以复用;缺失或过期的部分按依赖补齐,不需要默认从 Plan 重做。
4
+
5
+ 本手册面向项目负责人、后端交付人员和前端开发人员,重点演示“后端已交付,前端接着开发”。本文是现行规则的操作说明,不新增阶段或批准入口;规则以[生命周期注册表](../process/lifecycle-registry.yaml)、[流程裁剪规则](../process/harness-process-tailoring.md)和[前后端交付合同](../process/frontend-backend-delivery.md)为准。
6
+
7
+ ## 1. 先确认在哪个项目操作
8
+
9
+ 在承载实际业务的 `project-instance` 中开始,读取本地 `yss-project.yaml`、`AGENTS.md`、根 `CONTEXT.md` 和适用 profile。当前主模板仓库是 `template-source`,用于维护流程和手册,不能在这里生成真实业务 Spec、切片或实现合同。
10
+
11
+ | 你所在的项目 | 可以接着做什么 |
12
+ |---|---|
13
+ | 综合项目实例 | 由 `yss-product-lifecycle` 核验上游,继续设计、工程契约、Ticket、实现或验证 |
14
+ | 专职前端项目实例 | 按本地主控入口联合接收战略和后端交付,继续前端工程设计、实现与验收 |
15
+ | 专职后端项目实例 | 消费批准的上游资产,完成后端技术设计、实现与交付 |
16
+ | 尚未初始化或接管的代码仓 | 先按[用户手册](用户手册.md)初始化或接管,并登记实现仓库 |
17
+
18
+ 专职项目使用本地已安装的技能与职责规则;不要从主模板复制一个主控 Skill 来替换本地入口。治理仓与代码仓可以分离,代码写入已登记的实现仓及允许路径。
19
+
20
+ ## 2. 最快开始:给 Agent 一段完整指令
21
+
22
+ 把下面尖括号中的内容替换为真实信息。没有的资料写“缺失”,不知道的状态写“待核验”,不必为了开始咨询先填写整套合同。
23
+
24
+ ```text
25
+ 使用 yss-product-lifecycle,从已有产物接入本功能。
26
+
27
+ 目标:<本次希望完成的业务行为>
28
+ 治理项目根:<project-instance 的绝对路径>
29
+ 目标实现仓:<代码仓绝对路径或现有登记引用>
30
+ 已有产物:<Spec、设计、交付包、合同等路径>
31
+ 批准与验证证据:<可读取引用;没有则写缺失>
32
+ 父 Ticket / 切片 / checkpoint:<现有引用;没有则说明>
33
+ 希望开始的位置:<前端接收、工程设计、实现或验证>
34
+ 本次范围:<功能、页面、切片及不包含的内容>
35
+
36
+ 先只读判断最近可信阶段,给出可以复用的资产、阻塞项和下一工作单元。
37
+ 核验上游版本、批准范围及当前证据,不把文件存在视为阶段通过。
38
+ 暂不写文件或代码。
39
+ ```
40
+
41
+ 如果已决定推进,可以把最后一句替换为:
42
+
43
+ ```text
44
+ 完成核验后,在本次范围内继续可执行的工作单元,只补齐缺失项。
45
+ 优先核验并延续已有授权;遇到实质变化、必要输入缺失或适用人工决定时,
46
+ 展示当前资产、差异与下一动作。满足 ready-for-agent 后才实现代码。
47
+ ```
48
+
49
+ 自然语言即可表达入口意图,不要求记忆模式关键字。`route` 表示只读路由,`audit` 表示只读审计,`orchestrate` 表示有界推进,`resume` 表示重建状态后恢复。模式语义见[主控编排说明](../../.agents/skills/yss-product-lifecycle/references/orchestration.md)。指定“从实现开始”只是期望入口,最终仍由当前证据决定。
50
+
51
+ ## 3. 根据手里的产物选择入口
52
+
53
+ | 已有材料 | 可以请求的下一动作 | 进入下一步前重点核验 |
54
+ |---|---|---|
55
+ | 已批准 Plan / 战略输入 | 继续 Spec | 当前范围、关键未决项、Plan → Spec 入口审阅及真实批准 |
56
+ | 已批准 Spec | 继续产品设计或适用工程分析 | 验收标准、影响面、上游新鲜度;有产品设计影响时完成对应设计 |
57
+ | 已批准页面方案或原型 | 继续工程契约与实现准备 | 页面、状态、权限体验与 Spec 一致;适用技术和接口契约完整 |
58
+ | 冻结接口及工程设计 | 继续 Ticket 与合同准备 | 工程批准、实现仓接入、切片范围及相关 UI 输入 |
59
+ | 完整后端交付包 | 从前端联合接收开始 | 战略与后端版本、目标词汇、UI 基线、场景映射和实际服务条件 |
60
+ | 当前、已批准的前端 Slice Contract | 恢复前端实现 | Ticket、实现计划、依赖、写入范围、适用检查与完整就绪计算 |
61
+ | 已实现代码及当前合同 | 继续审查与验证 | 实际改动与批准范围一致、当前验证证据;已有代码不能补作批准证明 |
62
+
63
+ 这些是常见入口,不是凭材料名称自动流转的对照表。上游资产需要同时满足内容、审查、批准和新鲜度要求。某项确实未命中时,按现行规则记录有原因和证据的 `not-applicable`;某项适用但未完成时,保留阻塞。
64
+
65
+ ## 4. 后端交付后,前端如何继续
66
+
67
+ ### 4.1 后端准备什么
68
+
69
+ 请后端提供由正式工具导出的 Backend Delivery 目录或 ZIP,以及目标环境和必要的访问条件。交付包应绑定当前窄业务切片、战略快照、规则和场景、冻结 OpenAPI、后端 Slice Contract、批准引用、构建部署身份与验证证据。包内不放运行时凭据。
70
+
71
+ 后端可以使用以下指令:
72
+
73
+ ```text
74
+ 请为切片 <slice-id> 准备后端交付,供前端接收。
75
+ 复用当前批准的战略基线、冻结接口和后端 Slice Contract。
76
+ 核验构建、部署、测试数据和成功/失败场景证据,按现有协议准备交付描述。
77
+ 从正式 backend-delivery 入口导出目录包及 ZIP,并报告导出路径、版本和摘要。
78
+ 缺少源批准、部署身份或预检清单时列出缺口,不伪造记录。
79
+ ```
80
+
81
+ 只有 Swagger 链接、源码或接口截图时,先做缺口分析。它们不能单独证明业务范围、UI 输入和当前批准已齐备。
82
+
83
+ ### 4.2 前端接收并复用上游
84
+
85
+ 在前端治理项目中发送;综合项目明确调用 `yss-product-lifecycle`,专职项目按本地主控入口执行:
86
+
87
+ ```text
88
+ 请从前端联合接收入口继续。
89
+ 后端交付包:<目录或 ZIP 的绝对路径>
90
+ 前端治理根:<project-instance 绝对路径>
91
+ 前端实现仓:<登记引用或绝对路径>
92
+ 本次切片:<slice-id 与业务范围>
93
+
94
+ 先验证交付包,再通过正式工具导入,复用包中的战略、Spec 和冻结接口。
95
+ 核对目标根 CONTEXT.md、适用 UI 基线、规则和成功/失败场景映射,
96
+ 完成战略预检及最终联合接收;有后端依赖时验证当前服务身份。
97
+ 保留已有有效的前端设计,列出缺失项与责任方。
98
+ 接收通过后继续前端实现计划、Ticket 和 Slice Contract 准备,
99
+ 完成适用批准和 ready-for-agent 计算后再进入实现。
100
+ ```
101
+
102
+ 后端导入会把其绑定的战略快照通过现有工具导入 `docs/handoffs/`,并保存后端包于 `docs/backend-deliveries/<delivery-id>/<version>/`。不需要前端把后端设计重新写一遍,但需要完成目标仓词汇对账和自己的场景承接。
103
+
104
+ 导入产生草案,不会自动批准前端资产。已有预检和设计草案应保留;同身份、同版本、不同内容的包会被拒绝。
105
+
106
+ ### 4.3 判断当前能做到哪一步
107
+
108
+ | 当前结果 | 可以继续 | 尚不能据此认定 |
109
+ |---|---|---|
110
+ | 后端包 `verified` | 导入并准备目标仓接收 | 服务当前可用、前端可以编码 |
111
+ | 前端战略预检通过 | 起草前端工程设计与实现计划 | 前端实现已经获准 |
112
+ | 最终接收返回 `inputs-verified` | 准备、补齐前端实现资产 | `ready-for-agent`;工具此时仍返回 `ready_for_agent: false` |
113
+ | 当前前端合同获准且完整就绪计算通过 | 在批准切片及路径内实现 | 合并、推送或发布获准 |
114
+ | 前端实现及验证完成 | 按流程进行交付验收 | 整个业务切片已经验收或已经发布 |
115
+
116
+ 前端自己的实现准备包括适用的工程与 UI 输入、已校验的 `frontend_implementation_plan`、实现仓接入、正式垂直切片 Ticket 和当前持久化 Slice Implementation Contract。后端 Slice Contract 仅证明后端对应范围,不能代替前端合同。规则见[实现接入](../process/implementation-repo-integration.md)和[前端实现证据模板](../process/templates/frontend-implementation-plan-template.yaml)。
117
+
118
+ ### 4.4 后端还没交付时,前端能做什么
119
+
120
+ 战略输入已齐备时,可以先完成 Frontend Strategic Preflight,并起草工程设计和实现计划。有 Backend/API/Data 依赖的最终接收仍等待对应后端交付;这条路线中的正式编码仍需当前合同获准。
121
+
122
+ 真正的 UI-only 工作可以按影响面使用有证据的 `backend-not-applicable`。不能因为后端暂时没交付,就把实际后端依赖标为不适用。
123
+
124
+ ## 5. 需要手动操作时的命令
125
+
126
+ 以下命令供交付维护人员和 Agent 使用。普通用户可以直接使用第 2、4 节的指令,让 Agent 操作并报告结果。命令中的 `scripts/` 来自当前已安装相应工具的治理项目;不要在未核对 profile 和工具版本时混用其他项目的脚本。
127
+
128
+ 尖括号表示需替换的参数,不要原样粘贴执行。`--source-root`、`--target-root`、`--root` 指向治理项目根;交付描述、预检和接收记录中的引用按各自协议相对该治理根解析。新建后端交付输出目录必须尚不存在。
129
+
130
+ ### 后端导出
131
+
132
+ 在后端治理项目准备好真实交付描述后运行:
133
+
134
+ ```sh
135
+ scripts/backend-delivery export \
136
+ --source-root <后端治理根绝对路径> \
137
+ --delivery <相对后端治理根的交付描述路径> \
138
+ --output <新的交付输出目录绝对路径> \
139
+ --zip
140
+ ```
141
+
142
+ **既有后端工程身份为 v2 时,必须增加 `--preflight-input <预检清单绝对路径>`。**清单使用 `delivery_kind: backend-delivery`,绑定本次源交付描述和当前摘要;准备方法见[只读交付预检](../process/delivery-preflight.md)。预检失败时按返回的 `recovery` 补证,再从正常导出入口重试。
143
+
144
+ ### 验包与导入
145
+
146
+ 在前端治理项目运行:
147
+
148
+ ```sh
149
+ scripts/backend-delivery verify --bundle <交付目录或ZIP绝对路径>
150
+
151
+ scripts/backend-delivery import \
152
+ --bundle <交付目录或ZIP绝对路径> \
153
+ --target-root <前端治理根绝对路径>
154
+ ```
155
+
156
+ 验包成功输出 `result: verified`,并明确 `live_service_checked: false`。记下导入命令返回的真实收据和草案路径;不要自行推测文件名或把草案状态直接改成已批准。
157
+
158
+ 如果当前只有战略包,可先独立验证和导入:
159
+
160
+ ```sh
161
+ scripts/strategic-handoff verify --bundle <战略交付目录或包绝对路径>
162
+ scripts/strategic-handoff import \
163
+ --bundle <战略交付目录或包绝对路径> \
164
+ --target-root <前端治理根绝对路径>
165
+ ```
166
+
167
+ 后端包已经带入同一战略版本时,无需重复做手工导入。版本兼容按[前后端交付合同](../process/frontend-backend-delivery.md)处理,不通过修改 schema 版本来绕过检查。
168
+
169
+ ### 校验前端接收
170
+
171
+ 先让主控根据真实资产补齐正式 Context Reconciliation、UI 基线和场景承接,完成预检草案:
172
+
173
+ ```sh
174
+ scripts/verify-frontend-strategic-preflight \
175
+ --root <前端治理根绝对路径> \
176
+ <相对前端治理根的预检记录路径>
177
+ ```
178
+
179
+ 最终接收记录完成核对后,按协议记录 `status: accepted`,再实际运行:
180
+
181
+ ```sh
182
+ scripts/verify-frontend-delivery \
183
+ --root <前端治理根绝对路径> \
184
+ --slice <slice-id> \
185
+ <相对前端治理根的接收记录路径>
186
+ ```
187
+
188
+ 最后一项检查会复验输入、场景映射和适用的真实服务身份。`accepted` 字段本身不等于通过。部署不可达、身份不符或证据过期时先处理阻塞;离线验包不能替代这一步。成功后仍需编译、批准前端合同并计算就绪,不能把返回值手改为 `true`。
189
+
190
+ ### 只读查看主控规则
191
+
192
+ 综合项目可以查询实现入口的确定性合同投影:
193
+
194
+ ```sh
195
+ scripts/query-lifecycle-context \
196
+ --mode route \
197
+ --work-unit work-unit.slice-implementation \
198
+ --include modes
199
+ ```
200
+
201
+ 此命令只展示规则与路由,不读取业务资产来代替完整就绪判定,也不会批准或执行实现。可用阶段、工作单元和查询键以本地注册表及工具支持为准。
202
+
203
+ ## 6. 已有合同或中断后如何恢复
204
+
205
+ 已有完整前端合同,可以直接提出恢复请求:
206
+
207
+ ```text
208
+ 使用 yss-product-lifecycle 恢复切片 <slice-id>。
209
+ checkpoint:<路径>
210
+ 前端 Slice Contract:<路径>
211
+ 接收记录:<路径>
212
+ 目标实现仓:<登记引用>
213
+
214
+ 重新核验当前合同批准、上游摘要、接收绑定、Ticket、实现计划和允许路径。
215
+ 前提仍满足时,从第一个未完成且未阻塞的工作单元继续。
216
+ 复用未变化的有效资产,不重做已完成的需求和设计;
217
+ 发现过期或新影响时,只回到受影响的资产与工作单元处理。
218
+ ```
219
+
220
+ 新会话、新机器或新目录不会使旧结论自动有效。恢复必须能读取原始资产与证据;相关输入变化后,先更新接收和依赖合同,再恢复。不同切片使用各自交付身份,避免不相关工作相互阻塞。
221
+
222
+ ## 7. 常见阻塞怎么处理
223
+
224
+ | 现象 | 应采取的动作 |
225
+ |---|---|
226
+ | 当前仓是 `template-source` | 切换到真实项目实例;不要手改身份字段把模板源伪装成产品仓 |
227
+ | 只有接口文档,没有战略或业务验收 | 请来源方补交业务规则、范围和批准依据,先完成缺口分析 |
228
+ | 交付包导入成功,但仍不能编码 | 查看接收检查、前端计划、Ticket、合同批准和就绪缺口 |
229
+ | 目标词汇与源包冲突 | 完成目标根 `CONTEXT.md` 对账;业务规则冲突回交来源方 |
230
+ | UI 基线缺失或不匹配 | 补适用产品设计;既有 UI 基线仅按其限定条件使用,截图不能自行成为批准 |
231
+ | `preflight-required` | 按只读交付预检合同准备当前源资产清单,并传入 `--preflight-input` |
232
+ | API、包摘要或部署身份不一致 | 核对交付版本,向后端补取同一基线的冻结接口、部署与证据 |
233
+ | 导入了新的同身份后端版本 | 重新接收当前版本,更新绑定并重编译受影响的合同 |
234
+ | 合同出现 `stale`、`drift` 或 `new_impacts` | 停止依赖旧合同的实现,回到受影响的设计、接收或合同编译环节 |
235
+ | 工具缺失、profile 或 schema 不支持 | 按[用户手册](用户手册.md)核对实例固定版本与同步路径,保留现有资料,不混拷脚本或静默降级 |
236
+
237
+ ## 8. 如何判断这次接入已达到目标
238
+
239
+ 要求主控用当前资产报告:复用了哪些上游内容、从哪个工作单元接入、哪些缺口已补齐、还剩哪些阻塞,以及下一动作。需要编码时,必须明确报告目标切片、当前前端合同和 `ready-for-agent` 结论;需要交付时,另提供实际测试、还原验证及独立审查结果。
240
+
241
+ 前端验证使用登记的 `pnpm` 命令,并按适用范围记录截图或视觉回归、状态交互、console warning 和实际退出码。前端完成与整个业务切片完成分别判断;最终业务验收需绑定同一战略、API、后端部署和前端版本。Git 提交、推送、合并与发布仍各自遵守授权边界。
242
+
243
+ 进一步阅读:[完整用户手册](用户手册.md)、[设备借用贯穿案例](设备借用贯穿案例.md)、[技术设计用户指南](技术设计用户指南.md)、[前后端交付合同](../process/frontend-backend-delivery.md)。
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import {parseArgs} from 'node:util';
5
+ import {parseSliceYaml} from './lib/slice-contract.mjs';
6
+ import {hash,safe,write} from './lib/strategic-handoff-io.mjs';
7
+ import {prepareApiContractDecision,migrateApiContractDecision} from './lib/api-contract-decision.mjs';
8
+ import {stringify} from './vendor/yaml.mjs';
9
+ try{
10
+ const{values,positionals}=parseArgs({allowPositionals:true,options:{root:{type:'string',default:process.cwd()},output:{type:'string'},version:{type:'string'}}});
11
+ const[command,ref]=positionals;if(positionals.length!==2||!['prepare','migrate'].includes(command)||!values.output)throw Error('用法: api-contract-decision prepare|migrate <输入> --output <新路径> [--root <目录>] [--version v2]');
12
+ const root=path.resolve(values.root),bytes=fs.readFileSync(safe(root,ref)),input=parseSliceYaml(bytes);
13
+ const result=command==='prepare'?prepareApiContractDecision(input,{root}):migrateApiContractDecision({ref,version:input.decision_version,impact:input.impact,digest:hash(bytes)},{root,version:values.version});
14
+ write(root,values.output,stringify(result));
15
+ console.log(JSON.stringify({result:'draft',ref:values.output,digest:hash(fs.readFileSync(safe(root,values.output))),approval_inherited:false,next:'按现有差异与授权延续协议完成生命周期批准'}));
16
+ }catch(error){console.error(error.message);process.exitCode=1;}
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { parseArgs } from 'node:util';
5
+ import { parseSliceYaml, selectSliceWorkUnit } from './lib/slice-contract.mjs';
6
+ import { inspectSliceContract } from './lib/slice-execution-preflight.mjs';
7
+ import { inspectMaintenanceCandidate } from './lib/maintenance-candidate.mjs';
8
+ import { compileStandardsCoverage, coverageFile } from './lib/backend-standards-coverage.mjs';
9
+ import { validateBackendReview } from './lib/backend-review.mjs';
10
+ try {
11
+ const {values}=parseArgs({options:{input:{type:'string'},root:{type:'string'},verify:{type:'boolean'}},strict:true});
12
+ if(!values.input)throw Error('usage: scripts/backend-standards-coverage --input <review-state.json|yaml> [--root <governance-root>] [--verify]');
13
+ const root=path.resolve(values.root||'.'),state=parseSliceYaml(fs.readFileSync(path.resolve(values.input),'utf8'));
14
+ if(values.verify)console.log(JSON.stringify(validateBackendReview(state,{root}),null,2));
15
+ else {
16
+ const input=state.review_input;if(!input)throw Error('review_input required');
17
+ const projectRoot=path.resolve(root,input.project_root||'.');let contract=null,comparison_ref=null;
18
+ if(input.scope_kind==='change') {
19
+ const loaded=inspectSliceContract(input.slice_contract_ref,{root,approval_ref:input.approval_ref,work_unit_id:input.work_unit_id});
20
+ if(!loaded.report.execution_allowed)throw Error(loaded.report.blockers.join('; '));
21
+ contract=selectSliceWorkUnit(loaded.contract,input.work_unit_id);
22
+ comparison_ref=input.review_mode==='worktree'?inspectMaintenanceCandidate({manifestPath:coverageFile(projectRoot,input.candidate_snapshot_ref)}).manifest.merge_base:input.review_base_ref;
23
+ }
24
+ console.log(JSON.stringify(compileStandardsCoverage({root,projectRoot,contract,scope_kind:input.scope_kind,baseline_binding:input.baseline_binding,comparison_ref,actual_skills:input.actual_skill_impacts||[],responsibility_evidence:input.responsibility_evidence||[]}),null,2));
25
+ }
26
+ } catch(error){console.error(error.message);process.exitCode=1;}