create-yss-spec 3.4.7 → 3.4.9

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 (454) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +5 -5
  4. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +2 -2
  5. package/template/.agents/skills/archify/SKILL.md +2 -19
  6. package/template/.agents/skills/archify/references/geometry-and-routing.md +20 -0
  7. package/template/.agents/skills/code-review/SKILL.md +3 -33
  8. package/template/.agents/skills/code-review/references/candidate-capture.md +33 -0
  9. package/template/.agents/skills/code-review/references/yss-review-standards.md +20 -0
  10. package/template/.agents/skills/codebase-design/SKILL.md +2 -2
  11. package/template/.agents/skills/competitive-intelligence/SKILL.md +1 -1
  12. package/template/.agents/skills/diagnosing-bugs/SKILL.md +6 -2
  13. package/template/.agents/skills/formily-foundation/SKILL.md +1 -1
  14. package/template/.agents/skills/formily-step-flow/SKILL.md +3 -2
  15. package/template/.agents/skills/frontend-commit/SKILL.md +6 -6
  16. package/template/.agents/skills/grilling/SKILL.md +2 -2
  17. package/template/.agents/skills/implement/SKILL.md +1 -1
  18. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +3 -3
  19. package/template/.agents/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  20. package/template/.agents/skills/improve-codebase-architecture/SKILL.md +10 -6
  21. package/template/.agents/skills/java-backend-commit/SKILL.md +5 -5
  22. package/template/.agents/skills/llm-wiki/SKILL.md +1 -1
  23. package/template/.agents/skills/lombok/SKILL.md +1 -1
  24. package/template/.agents/skills/mapstruct/SKILL.md +3 -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-application/references/application-layer-guide.md +7 -0
  40. package/template/.agents/skills/yss-audit-log/SKILL.md +3 -1
  41. package/template/.agents/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  42. package/template/.agents/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  43. package/template/.agents/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  44. package/template/.agents/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  45. package/template/.agents/skills/yss-backend-spec-review/SKILL.md +44 -0
  46. package/template/.agents/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  47. package/template/.agents/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  48. package/template/.agents/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  49. package/template/.agents/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  50. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +7 -34
  51. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  52. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  53. package/template/.agents/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  54. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  55. package/template/.agents/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  56. package/template/.agents/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  57. package/template/.agents/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  58. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  59. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  60. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  61. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  62. package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
  63. package/template/.agents/skills/yss-domain/SKILL.md +17 -5
  64. package/template/.agents/skills/yss-domain/references/domain-layer-guide.md +10 -3
  65. package/template/.agents/skills/yss-domain/references/existing-project.md +5 -0
  66. package/template/.agents/skills/yss-dto/SKILL.md +13 -10
  67. package/template/.agents/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  68. package/template/.agents/skills/yss-exception/SKILL.md +2 -2
  69. package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +12 -12
  70. package/template/.agents/skills/yss-hook/SKILL.md +8 -44
  71. package/template/.agents/skills/yss-hook/references/use-request.md +42 -0
  72. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  73. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  74. package/template/.agents/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  75. package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  76. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  77. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  78. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  79. package/template/.agents/skills/yss-mybatis/SKILL.md +14 -0
  80. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
  81. package/template/.agents/skills/yss-openapi-governance/SKILL.md +1 -32
  82. package/template/.agents/skills/yss-openapi-governance/references/governance-output.md +34 -0
  83. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +1 -1
  84. package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -5
  85. package/template/.agents/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  86. package/template/.agents/skills/yss-repository/SKILL.md +13 -1
  87. package/template/.agents/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  88. package/template/.agents/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  89. package/template/.agents/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  90. package/template/.agents/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  91. package/template/.agents/skills/yss-stage-decision/SKILL.md +1 -1
  92. package/template/.agents/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  93. package/template/.agents/skills/yss-tactical-design/SKILL.md +1 -3
  94. package/template/.agents/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  95. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  96. package/template/.agents/skills/yss-validation/SKILL.md +1 -1
  97. package/template/.agents/skills/yss-web-controller/SKILL.md +16 -7
  98. package/template/.agents/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  99. package/template/.agents/skills/ytable-usage/SKILL.md +2 -2
  100. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +2 -2
  101. package/template/.codex/skills/archify/SKILL.md +2 -19
  102. package/template/.codex/skills/archify/references/geometry-and-routing.md +20 -0
  103. package/template/.codex/skills/code-review/SKILL.md +3 -33
  104. package/template/.codex/skills/code-review/references/candidate-capture.md +33 -0
  105. package/template/.codex/skills/code-review/references/yss-review-standards.md +20 -0
  106. package/template/.codex/skills/codebase-design/SKILL.md +2 -2
  107. package/template/.codex/skills/competitive-intelligence/SKILL.md +1 -1
  108. package/template/.codex/skills/data-analytics/mcp/server.cjs +2 -1
  109. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +9 -32
  110. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/references/quality-checks.md +29 -0
  111. package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
  112. package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +4 -4
  113. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/SKILL.md +12 -22
  114. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/cli.py +5 -10
  115. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/plan.py +47 -49
  116. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/tests/test_delivery_plan.py +45 -0
  117. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/SKILL.md +4 -5
  118. package/template/.codex/skills/data-analytics/skills/build-report/report-to-pdf/SKILL.md +1 -1
  119. package/template/.codex/skills/data-analytics/skills/build-report/specifications/mcp-app-report.md +1 -1
  120. package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
  121. package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
  122. package/template/.codex/skills/data-analytics/skills/index/SKILL.md +4 -4
  123. package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
  124. package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +2 -2
  125. package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
  126. package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
  127. package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
  128. package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +4 -4
  129. package/template/.codex/skills/data-analytics/skills/user-context/SKILL.md +16 -14
  130. package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/automation-config.md +1 -1
  131. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding-examples.md +1 -1
  132. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding.md +7 -7
  133. package/template/.codex/skills/data-analytics/skills/user-context/references/source-category-runtime.md +7 -7
  134. package/template/.codex/skills/data-analytics/skills/user-context/scripts/data_analytics_preflight.py +4 -2
  135. package/template/.codex/skills/data-analytics/skills/user-context/scripts/validate_user_context_preflight.py +5 -5
  136. package/template/.codex/skills/data-analytics/skills/user-context/tests/test_state_helpers.py +3 -3
  137. package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +7 -71
  138. package/template/.codex/skills/data-analytics/skills/validate-data/references/validation-methods.md +70 -0
  139. package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +4 -4
  140. package/template/.codex/skills/data-analytics/src/analytics-app/App.tsx +1 -1
  141. package/template/.codex/skills/data-analytics/src/analytics-app-core.md +1 -1
  142. package/template/.codex/skills/diagnosing-bugs/SKILL.md +6 -2
  143. package/template/.codex/skills/formily-foundation/SKILL.md +1 -1
  144. package/template/.codex/skills/formily-step-flow/SKILL.md +3 -2
  145. package/template/.codex/skills/frontend-commit/SKILL.md +6 -6
  146. package/template/.codex/skills/grilling/SKILL.md +2 -2
  147. package/template/.codex/skills/implement/SKILL.md +1 -1
  148. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +3 -3
  149. package/template/.codex/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  150. package/template/.codex/skills/improve-codebase-architecture/SKILL.md +10 -6
  151. package/template/.codex/skills/java-backend-commit/SKILL.md +5 -5
  152. package/template/.codex/skills/llm-wiki/SKILL.md +1 -1
  153. package/template/.codex/skills/lombok/SKILL.md +1 -1
  154. package/template/.codex/skills/mapstruct/SKILL.md +3 -1
  155. package/template/.codex/skills/product-design/references/critical-overrides.md +3 -4
  156. package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
  157. package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
  158. package/template/.codex/skills/product-design/skills/get-context/SKILL.md +2 -1
  159. package/template/.codex/skills/product-design/skills/ideate/SKILL.md +2 -50
  160. package/template/.codex/skills/product-design/skills/ideate/references/image-prompt-patterns.md +51 -0
  161. package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +6 -6
  162. package/template/.codex/skills/product-design/skills/index/SKILL.md +2 -2
  163. package/template/.codex/skills/product-design/skills/prototype/SKILL.md +6 -6
  164. package/template/.codex/skills/product-design/skills/url-to-code/SKILL.md +1 -1
  165. package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
  166. package/template/.codex/skills/prototype/SKILL.md +1 -1
  167. package/template/.codex/skills/prototype-review/SKILL.md +1 -1
  168. package/template/.codex/skills/resolving-merge-conflicts/SKILL.md +2 -2
  169. package/template/.codex/skills/tdd/SKILL.md +1 -1
  170. package/template/.codex/skills/to-questionnaire/SKILL.md +4 -2
  171. package/template/.codex/skills/to-spec/SKILL.md +3 -3
  172. package/template/.codex/skills/to-tickets/SKILL.md +7 -7
  173. package/template/.codex/skills/using-git-worktrees/SKILL.md +13 -11
  174. package/template/.codex/skills/wait-what/SKILL.md +1 -1
  175. package/template/.codex/skills/wayfinder/SKILL.md +4 -2
  176. package/template/.codex/skills/writing-for-agents/SKILL.md +9 -73
  177. package/template/.codex/skills/writing-for-agents/references/writing-principles.md +76 -0
  178. package/template/.codex/skills/yss-api-integration/SKILL.md +2 -2
  179. package/template/.codex/skills/yss-application/SKILL.md +12 -0
  180. package/template/.codex/skills/yss-application/references/application-layer-guide.md +7 -0
  181. package/template/.codex/skills/yss-audit-log/SKILL.md +3 -1
  182. package/template/.codex/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  183. package/template/.codex/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  184. package/template/.codex/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  185. package/template/.codex/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  186. package/template/.codex/skills/yss-backend-spec-review/SKILL.md +44 -0
  187. package/template/.codex/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  188. package/template/.codex/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  189. package/template/.codex/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  190. package/template/.codex/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  191. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +7 -34
  192. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  193. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  194. package/template/.codex/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  195. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  196. package/template/.codex/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  197. package/template/.codex/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  198. package/template/.codex/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  199. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  200. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  201. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  202. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  203. package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
  204. package/template/.codex/skills/yss-domain/SKILL.md +17 -5
  205. package/template/.codex/skills/yss-domain/references/domain-layer-guide.md +10 -3
  206. package/template/.codex/skills/yss-domain/references/existing-project.md +5 -0
  207. package/template/.codex/skills/yss-dto/SKILL.md +13 -10
  208. package/template/.codex/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  209. package/template/.codex/skills/yss-exception/SKILL.md +2 -2
  210. package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +12 -12
  211. package/template/.codex/skills/yss-hook/SKILL.md +8 -44
  212. package/template/.codex/skills/yss-hook/references/use-request.md +42 -0
  213. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  214. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  215. package/template/.codex/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  216. package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  217. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  218. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  219. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  220. package/template/.codex/skills/yss-mybatis/SKILL.md +14 -0
  221. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
  222. package/template/.codex/skills/yss-openapi-governance/SKILL.md +1 -32
  223. package/template/.codex/skills/yss-openapi-governance/references/governance-output.md +34 -0
  224. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +1 -1
  225. package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -5
  226. package/template/.codex/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  227. package/template/.codex/skills/yss-repository/SKILL.md +13 -1
  228. package/template/.codex/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  229. package/template/.codex/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  230. package/template/.codex/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  231. package/template/.codex/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  232. package/template/.codex/skills/yss-stage-decision/SKILL.md +1 -1
  233. package/template/.codex/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  234. package/template/.codex/skills/yss-tactical-design/SKILL.md +1 -3
  235. package/template/.codex/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  236. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  237. package/template/.codex/skills/yss-validation/SKILL.md +1 -1
  238. package/template/.codex/skills/yss-web-controller/SKILL.md +16 -7
  239. package/template/.codex/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  240. package/template/.codex/skills/ytable-usage/SKILL.md +2 -2
  241. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +2 -2
  242. package/template/.cursor/skills/archify/SKILL.md +2 -19
  243. package/template/.cursor/skills/archify/references/geometry-and-routing.md +20 -0
  244. package/template/.cursor/skills/code-review/SKILL.md +3 -33
  245. package/template/.cursor/skills/code-review/references/candidate-capture.md +33 -0
  246. package/template/.cursor/skills/code-review/references/yss-review-standards.md +20 -0
  247. package/template/.cursor/skills/codebase-design/SKILL.md +2 -2
  248. package/template/.cursor/skills/competitive-intelligence/SKILL.md +1 -1
  249. package/template/.cursor/skills/diagnosing-bugs/SKILL.md +6 -2
  250. package/template/.cursor/skills/formily-foundation/SKILL.md +1 -1
  251. package/template/.cursor/skills/formily-step-flow/SKILL.md +3 -2
  252. package/template/.cursor/skills/frontend-commit/SKILL.md +6 -6
  253. package/template/.cursor/skills/grilling/SKILL.md +2 -2
  254. package/template/.cursor/skills/implement/SKILL.md +1 -1
  255. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +3 -3
  256. package/template/.cursor/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  257. package/template/.cursor/skills/improve-codebase-architecture/SKILL.md +10 -6
  258. package/template/.cursor/skills/java-backend-commit/SKILL.md +5 -5
  259. package/template/.cursor/skills/llm-wiki/SKILL.md +1 -1
  260. package/template/.cursor/skills/lombok/SKILL.md +1 -1
  261. package/template/.cursor/skills/mapstruct/SKILL.md +3 -1
  262. package/template/.cursor/skills/prototype/SKILL.md +1 -1
  263. package/template/.cursor/skills/prototype-review/SKILL.md +1 -1
  264. package/template/.cursor/skills/resolving-merge-conflicts/SKILL.md +2 -2
  265. package/template/.cursor/skills/tdd/SKILL.md +1 -1
  266. package/template/.cursor/skills/to-questionnaire/SKILL.md +4 -2
  267. package/template/.cursor/skills/to-spec/SKILL.md +3 -3
  268. package/template/.cursor/skills/to-tickets/SKILL.md +7 -7
  269. package/template/.cursor/skills/using-git-worktrees/SKILL.md +13 -11
  270. package/template/.cursor/skills/wait-what/SKILL.md +1 -1
  271. package/template/.cursor/skills/wayfinder/SKILL.md +4 -2
  272. package/template/.cursor/skills/writing-for-agents/SKILL.md +9 -73
  273. package/template/.cursor/skills/writing-for-agents/references/writing-principles.md +76 -0
  274. package/template/.cursor/skills/yss-api-integration/SKILL.md +2 -2
  275. package/template/.cursor/skills/yss-application/SKILL.md +12 -0
  276. package/template/.cursor/skills/yss-application/references/application-layer-guide.md +7 -0
  277. package/template/.cursor/skills/yss-audit-log/SKILL.md +3 -1
  278. package/template/.cursor/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  279. package/template/.cursor/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  280. package/template/.cursor/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  281. package/template/.cursor/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  282. package/template/.cursor/skills/yss-backend-spec-review/SKILL.md +44 -0
  283. package/template/.cursor/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  284. package/template/.cursor/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  285. package/template/.cursor/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  286. package/template/.cursor/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  287. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +7 -34
  288. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  289. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  290. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  291. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  292. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  293. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  294. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  295. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  296. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  297. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  298. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  299. package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
  300. package/template/.cursor/skills/yss-domain/SKILL.md +17 -5
  301. package/template/.cursor/skills/yss-domain/references/domain-layer-guide.md +10 -3
  302. package/template/.cursor/skills/yss-domain/references/existing-project.md +5 -0
  303. package/template/.cursor/skills/yss-dto/SKILL.md +13 -10
  304. package/template/.cursor/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  305. package/template/.cursor/skills/yss-exception/SKILL.md +2 -2
  306. package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +12 -12
  307. package/template/.cursor/skills/yss-hook/SKILL.md +8 -44
  308. package/template/.cursor/skills/yss-hook/references/use-request.md +42 -0
  309. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  310. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  311. package/template/.cursor/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  312. package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  313. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  314. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  315. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  316. package/template/.cursor/skills/yss-mybatis/SKILL.md +14 -0
  317. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
  318. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +1 -32
  319. package/template/.cursor/skills/yss-openapi-governance/references/governance-output.md +34 -0
  320. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +1 -1
  321. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -5
  322. package/template/.cursor/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  323. package/template/.cursor/skills/yss-repository/SKILL.md +13 -1
  324. package/template/.cursor/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  325. package/template/.cursor/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  326. package/template/.cursor/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  327. package/template/.cursor/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  328. package/template/.cursor/skills/yss-stage-decision/SKILL.md +1 -1
  329. package/template/.cursor/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  330. package/template/.cursor/skills/yss-tactical-design/SKILL.md +1 -3
  331. package/template/.cursor/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  332. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  333. package/template/.cursor/skills/yss-validation/SKILL.md +1 -1
  334. package/template/.cursor/skills/yss-web-controller/SKILL.md +16 -7
  335. package/template/.cursor/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  336. package/template/.cursor/skills/ytable-usage/SKILL.md +2 -2
  337. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +2 -2
  338. package/template/.pi/skills/archify/SKILL.md +2 -19
  339. package/template/.pi/skills/archify/references/geometry-and-routing.md +20 -0
  340. package/template/.pi/skills/code-review/SKILL.md +3 -33
  341. package/template/.pi/skills/code-review/references/candidate-capture.md +33 -0
  342. package/template/.pi/skills/code-review/references/yss-review-standards.md +20 -0
  343. package/template/.pi/skills/codebase-design/SKILL.md +2 -2
  344. package/template/.pi/skills/competitive-intelligence/SKILL.md +1 -1
  345. package/template/.pi/skills/diagnosing-bugs/SKILL.md +6 -2
  346. package/template/.pi/skills/formily-foundation/SKILL.md +1 -1
  347. package/template/.pi/skills/formily-step-flow/SKILL.md +3 -2
  348. package/template/.pi/skills/frontend-commit/SKILL.md +6 -6
  349. package/template/.pi/skills/grilling/SKILL.md +2 -2
  350. package/template/.pi/skills/implement/SKILL.md +1 -1
  351. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +3 -3
  352. package/template/.pi/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  353. package/template/.pi/skills/improve-codebase-architecture/SKILL.md +10 -6
  354. package/template/.pi/skills/java-backend-commit/SKILL.md +5 -5
  355. package/template/.pi/skills/llm-wiki/SKILL.md +1 -1
  356. package/template/.pi/skills/lombok/SKILL.md +1 -1
  357. package/template/.pi/skills/mapstruct/SKILL.md +3 -1
  358. package/template/.pi/skills/prototype/SKILL.md +1 -1
  359. package/template/.pi/skills/prototype-review/SKILL.md +1 -1
  360. package/template/.pi/skills/resolving-merge-conflicts/SKILL.md +2 -2
  361. package/template/.pi/skills/tdd/SKILL.md +1 -1
  362. package/template/.pi/skills/to-questionnaire/SKILL.md +4 -2
  363. package/template/.pi/skills/to-spec/SKILL.md +3 -3
  364. package/template/.pi/skills/to-tickets/SKILL.md +7 -7
  365. package/template/.pi/skills/using-git-worktrees/SKILL.md +13 -11
  366. package/template/.pi/skills/wait-what/SKILL.md +1 -1
  367. package/template/.pi/skills/wayfinder/SKILL.md +4 -2
  368. package/template/.pi/skills/writing-for-agents/SKILL.md +9 -73
  369. package/template/.pi/skills/writing-for-agents/references/writing-principles.md +76 -0
  370. package/template/.pi/skills/yss-api-integration/SKILL.md +2 -2
  371. package/template/.pi/skills/yss-application/SKILL.md +12 -0
  372. package/template/.pi/skills/yss-application/references/application-layer-guide.md +7 -0
  373. package/template/.pi/skills/yss-audit-log/SKILL.md +3 -1
  374. package/template/.pi/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  375. package/template/.pi/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  376. package/template/.pi/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  377. package/template/.pi/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  378. package/template/.pi/skills/yss-backend-spec-review/SKILL.md +44 -0
  379. package/template/.pi/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  380. package/template/.pi/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  381. package/template/.pi/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  382. package/template/.pi/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  383. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +7 -34
  384. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  385. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  386. package/template/.pi/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  387. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  388. package/template/.pi/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  389. package/template/.pi/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  390. package/template/.pi/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  391. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  392. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  393. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  394. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  395. package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
  396. package/template/.pi/skills/yss-domain/SKILL.md +17 -5
  397. package/template/.pi/skills/yss-domain/references/domain-layer-guide.md +10 -3
  398. package/template/.pi/skills/yss-domain/references/existing-project.md +5 -0
  399. package/template/.pi/skills/yss-dto/SKILL.md +13 -10
  400. package/template/.pi/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  401. package/template/.pi/skills/yss-exception/SKILL.md +2 -2
  402. package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +12 -12
  403. package/template/.pi/skills/yss-hook/SKILL.md +8 -44
  404. package/template/.pi/skills/yss-hook/references/use-request.md +42 -0
  405. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  406. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  407. package/template/.pi/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  408. package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  409. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  410. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  411. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  412. package/template/.pi/skills/yss-mybatis/SKILL.md +14 -0
  413. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
  414. package/template/.pi/skills/yss-openapi-governance/SKILL.md +1 -32
  415. package/template/.pi/skills/yss-openapi-governance/references/governance-output.md +34 -0
  416. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +1 -1
  417. package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -5
  418. package/template/.pi/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  419. package/template/.pi/skills/yss-repository/SKILL.md +13 -1
  420. package/template/.pi/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  421. package/template/.pi/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  422. package/template/.pi/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  423. package/template/.pi/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  424. package/template/.pi/skills/yss-stage-decision/SKILL.md +1 -1
  425. package/template/.pi/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  426. package/template/.pi/skills/yss-tactical-design/SKILL.md +1 -3
  427. package/template/.pi/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  428. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  429. package/template/.pi/skills/yss-validation/SKILL.md +1 -1
  430. package/template/.pi/skills/yss-web-controller/SKILL.md +16 -7
  431. package/template/.pi/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  432. package/template/.pi/skills/ytable-usage/SKILL.md +2 -2
  433. package/template/docs/agents/yss-skill-registry.yaml +13 -0
  434. package/template/docs/engineering/backend-platforms.md +14 -0
  435. package/template/docs/process/schemas/digital-human-task-package.schema.json +713 -100
  436. package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +41 -0
  437. package/template/scripts/backend-standards-coverage +26 -0
  438. package/template/scripts/lib/backend-platform-provenance.mjs +1 -1
  439. package/template/scripts/lib/backend-platform-verification.mjs +2 -2
  440. package/template/scripts/lib/backend-platform.mjs +62 -0
  441. package/template/scripts/lib/backend-review.mjs +140 -0
  442. package/template/scripts/lib/backend-standards-coverage.mjs +237 -0
  443. package/template/scripts/lib/first-slice-artifacts.mjs +47 -0
  444. package/template/scripts/lib/first-slice-tests.mjs +24 -0
  445. package/template/scripts/lib/lifecycle-transition.mjs +9 -0
  446. package/template/scripts/lib/maintenance-candidate.mjs +160 -0
  447. package/template/scripts/lib/profile-skill-sync.mjs +46 -5
  448. package/template/scripts/lib/slice-execution-preflight.mjs +43 -0
  449. package/template/scripts/slice-contract +7 -3
  450. package/template/scripts/verify-backend-platform-matrix +8 -2
  451. package/template/skills-lock.json +77 -63
  452. package/template/yss-public-skills.json +4 -2
  453. package/template.manifest.json +0 -1
  454. package/template.snapshot.json +5 -5
@@ -6,7 +6,7 @@ description: "实现或排查 MapStruct DTO、PO、Domain 映射及 Lombok 集
6
6
 
7
7
  ## YSS 阶段 7 执行结果
8
8
 
9
- - Java、依赖与处理器版本来自工程基线,不从下面通用示例推断。三个新后端 Profile 为 Java 8;MVC 的 wire/internal 转换在 server,core/service 不依赖 client,Repository 不依赖上层 DTO。采用 Spring Bean 和构造器注入,显式映射或忽略字段;禁止通过全局 IGNORE 掩盖合同字段遗漏。
9
+ - Java、依赖与处理器版本来自工程基线,不从下面通用示例推断。Java 语法、API、处理器与测试工具均消费批准的精确平台配置;MVC 的 wire/internal 转换在 server,core/service 不依赖 client,Repository 不依赖上层 DTO。采用 Spring Bean 和构造器注入,显式映射或忽略字段;禁止通过全局 IGNORE 掩盖合同字段遗漏。
10
10
  - 消费批准后的 Slice Contract/work unit,只为合同中的 DTO/VO/PO/Domain 转换生成 Mapper/Convertor。
11
11
  - 受控生成必须记录 source/target、忽略字段、更新语义、Lombok processor 配置和 mapper 行为测试。
12
12
  - 按 `yss-implementation-contract-compiler` 的统一 Execution Result 返回生成/源文件、测试和实际验证;未映射字段、反射/BeanUtils 退化或越界路径返回 `violation`。
@@ -26,3 +26,5 @@ description: "实现或排查 MapStruct DTO、PO、Domain 映射及 Lombok 集
26
26
  按变更验证字段覆盖、null、更新和边界值;处理器调整需实际编译。不要把所有参考示例当作必跑清单。
27
27
 
28
28
  查第三方行为时使用 `yss-research`,来源为 [MapStruct 官方文档](https://mapstruct.org/documentation/stable/reference/html/);不假定某个 MCP 工具已安装。
29
+
30
+ 聚合重建使用领域工厂或有测试的显式映射方法;MapStruct 只承担机械映射,不得为处理器增加破坏不变量的 setter。该方式不豁免字段覆盖、null 语义和往返一致性验证。
@@ -23,4 +23,4 @@ The two branches produce very different artifacts — getting this wrong wastes
23
23
  3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE — wipe me" name.
24
24
  4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast.
25
25
  5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
26
- 6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too — the verdict and the question it settled — in the issue or a commit. The main branch keeps only the validated decision.
26
+ 6. **Capture the evidence.** Save the prototype and the question, inputs, observed result and limitations in the authorized local output location. Return validated decisions to the current design owner. Production implementation still requires its approved contract; Git commit/push and tracker publication each require applicable authorization. An experiment does not authorize those actions.
@@ -19,7 +19,7 @@ Run this independent gate only when UI changes affect a primary user flow, navig
19
19
  - `docs/.scratch/<feature>/design/<feature>-interaction-spec.md` or prototype link.
20
20
  - State matrix, preferably based on `docs/design/templates/state-matrix-template.md`.
21
21
  - Existing OpenAPI Draft only if the review is checking alignment; do not require OpenAPI before product design.
22
- - `docs/.scratch/<feature>/verification/prototype-evidence.yaml` may be created as a pending schema v3 record, but档位构建与浏览器验证属于后续 `check.prototype-verified`。
22
+ - `docs/.scratch/<feature>/verification/prototype-evidence.yaml` may be created as a pending Prototype Evidence schema v4 record from `docs/design/templates/prototype-evidence-template.yaml`, but档位构建与浏览器验证属于后续 `check.prototype-verified`。
23
23
 
24
24
  ## Review Gates
25
25
 
@@ -7,8 +7,8 @@ description: "Use when you need to resolve an in-progress git merge/rebase confl
7
7
 
8
8
  2. **Find the primary sources** for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.
9
9
 
10
- 3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. Always resolve; never `--abort`.
10
+ 3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. If the intents cannot be reconciled safely, report the conflicting decision. Abort only when the user has authorized it; do not discard work to hide a conflict.
11
11
 
12
12
  4. Discover the project's **automated checks** and run them — typically typecheck, then tests, then format. Fix anything the merge broke.
13
13
 
14
- 5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
14
+ 5. **Return the resolved files and verification.** Preserve the initial index and unrelated dirty files. Stage only the explicitly authorized conflict paths, never the entire working tree. Commit, or continue a merge/rebase when that creates commits, only with current authorization covering that action; otherwise leave the resolution ready for review and report the next command.
@@ -35,4 +35,4 @@ When the shape of that interface is itself in question — how deep the module i
35
35
 
36
36
  - **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.
37
37
  - **One slice at a time.** One seam, one test, one minimal implementation per cycle.
38
- - **Refactoring is not part of the loop.** It belongs to the review stage (see the `code-review` skill), not the red → green implementation cycle.
38
+ - **Refactoring follows evidence.** The implementer performs necessary in-scope refactoring with green behavior tests. The independent Reviewer reads and reports findings; it does not edit the implementation or review its own changes. The implementer fixes findings, then returns the changed candidate for fresh review.
@@ -8,9 +8,11 @@ Turn something the user can't answer alone into a **questionnaire** — a Markdo
8
8
 
9
9
  **Grill the send, not the subject.** Interview the user only about the _send_, which they can always answer: who it goes to, and what they need back. The questions in the document then target the **gap** between what the recipient knows and what the user needs.
10
10
 
11
- 1. **Who is it going to?** Ask, in one exchange, the recipient's role, expertise, and relationship to the user. This fixes the questionnaire's tone and how much context it must carry. Done when you know who the recipient is and what they know that the user doesn't.
11
+ Reuse the recipient, purpose and constraints already provided. Ask only for missing information that changes the questionnaire; when both are known, draft directly.
12
12
 
13
- 2. **What do you need back?** Ask, in one exchange, the specific decisions or facts the user can't resolve alone and needs from this person. Done when you have a concrete list of what the user must walk away able to do or decide.
13
+ 1. **Who is it going to?** If missing, ask for the recipient's role, expertise, and relationship to the user. This fixes the questionnaire's tone and how much context it must carry. Done when you know who the recipient is and what they know that the user doesn't.
14
+
15
+ 2. **What do you need back?** If missing, ask for the specific decisions or facts the user can't resolve alone and needs from this person. Done when you have a concrete list of what the user must walk away able to do or decide.
14
16
 
15
17
  3. **Write the questionnaire.** Draft questions aimed at the gap from steps 1–2, following the Document structure below. Write it to `to-questionnaire-<slug>.md` in the current directory (slug from the topic) and report the path. Done when the file exists and every item the user named in step 2 is covered by a question.
16
18
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: to-spec
3
- description: Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
3
+ description: 显式将已确认讨论综合为 Spec 草稿;经主控预检后按配置持久化并回交验收。
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
- This skill takes the current conversation context and codebase understanding and produces a spec. Do NOT interview the user — just synthesize what you already know.
7
+ This explicit compatibility entry synthesizes confirmed context into a Spec draft. Before formal writes, the active lifecycle orchestrator checks repository identity, Plan → Spec entry evidence, allowed paths and current decisions. Template-source maintenance creates no product Spec. Reuse confirmed inputs and seams; ask only for a material missing decision. Return the draft to the orchestrator for validation and acceptance without approving it.
8
8
 
9
9
  If the issue tracker or triage label vocabulary is missing, tell the user to run `/setup-matt-pocock-skills`; do not invoke another user-invoked skill yourself.
10
10
 
@@ -14,7 +14,7 @@ If the issue tracker or triage label vocabulary is missing, tell the user to run
14
14
 
15
15
  2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better - the ideal number is one.
16
16
 
17
- Check with the user that these seams match their expectations.
17
+ Reuse already confirmed seams; ask only when a seam is new or materially changed.
18
18
 
19
19
  3. Write the spec using the template below, then publish it to the project issue tracker. Apply the `ready-for-human` triage label. Spec drafts need a human baseline approval before they are `approved`, and before implementation tickets may become `ready-for-agent`. Do not label the Spec itself `ready-for-agent`.
20
20
 
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
 
7
7
  # To Tickets
8
8
 
9
- Break a plan, spec, or conversation into a set of **tickets** — tracer-bullet vertical slices, each declaring the tickets that **block** it.
9
+ Break an explicitly requested, confirmed plan or Spec into tracer-bullet Ticket drafts. Before any formal write, return to the active lifecycle orchestrator for repository identity, current inputs, allowed paths and applicable gates. Template-source maintenance does not create product Tickets. The explicit entry may write its prepared artifacts only within that preflight contract and returns them to the orchestrator for validation and acceptance; it cannot approve a Slice Contract or decide readiness.
10
10
 
11
11
  If the issue tracker or triage label vocabulary is missing, tell the user to run `/setup-matt-pocock-skills`; do not invoke another user-invoked skill yourself.
12
12
 
@@ -35,7 +35,7 @@ Break the work into **tracer bullet** tickets.
35
35
 
36
36
  </vertical-slice-rules>
37
37
 
38
- Give each ticket its **blocking edges** — the other tickets that must complete before it can start. A ticket with no blockers can start immediately.
38
+ Give each ticket its **blocking edges** — the other tickets that must complete before it can start. A ticket with no dependency edges still needs a current approved Slice Contract and all applicable implementation gates before it can start.
39
39
 
40
40
  **Wide refactors are the exception to vertical slicing.** A **wide refactor** is one mechanical change — rename a column, retype a shared symbol — whose **blast radius** fans across the whole codebase, so a single edit breaks thousands of call sites at once and no vertical slice can land green. Don't force it into a tracer bullet; sequence it as **expand–contract**. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in a ticket blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify ticket — green is promised only there.
41
41
 
@@ -53,14 +53,14 @@ Ask the user:
53
53
  - Are the blocking edges correct — does each ticket only depend on tickets that genuinely gate it?
54
54
  - Should any tickets be merged or split further?
55
55
 
56
- Iterate until the user approves the breakdown.
56
+ Reuse an existing approval that covers this same breakdown. Ask only about unresolved scope, granularity or dependency decisions; return accepted drafts and evidence to the orchestrator.
57
57
 
58
58
  ### 5. Publish the tickets to the configured tracker
59
59
 
60
60
  Publish the approved tickets. **How** depends on the tracker `/setup-matt-pocock-skills` configured — the tickets are the same either way, only the shape of the blocking edges changes:
61
61
 
62
62
  - **Local files** → write one file per ticket under `docs/.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01` in dependency order (blockers first). Each file's "Blocked by" lists the numbers/titles it depends on. Use the per-ticket file template below — one ticket per file, never a single combined file.
63
- - **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking / sub-issue relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. Apply the `ready-for-agent` triage label unless instructed otherwise — the tickets are agent-grabbable by construction.
63
+ - **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking / sub-issue relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. Keep drafts `ready-for-human`. Only the orchestrator may mark a narrow slice `ready-for-agent` after checking its current approved contract and applicable gates. Publishing to a remote tracker requires explicit authorization for that action.
64
64
 
65
65
  Work the **frontier**: any ticket whose blockers are all done. For a purely linear chain that means top to bottom.
66
66
 
@@ -72,9 +72,9 @@ Do NOT close or modify any parent issue.
72
72
 
73
73
  **What to build:** the end-to-end behaviour this ticket makes work, from the user's perspective — not a layer-by-layer implementation list.
74
74
 
75
- **Blocked by:** the numbers/titles of the tickets that gate this one, or "None — can start immediately".
75
+ **Blocked by:** the numbers/titles of the tickets that gate this one, or "None — readiness still requires contract and gate verification".
76
76
 
77
- **Status:** ready-for-agent
77
+ **Status:** ready-for-human
78
78
 
79
79
  - [ ] Acceptance criterion 1
80
80
  - [ ] Acceptance criterion 2
@@ -98,7 +98,7 @@ The end-to-end behaviour this ticket makes work, from the user's perspective —
98
98
 
99
99
  ## Blocked by
100
100
 
101
- - A reference to each blocking ticket, or "None — can start immediately".
101
+ - A reference to each blocking ticket, or "None — readiness still requires contract and gate verification".
102
102
 
103
103
  </issue-template>
104
104
 
@@ -83,7 +83,7 @@ Follow this priority order. Explicit user preference always beats observed files
83
83
  git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
84
84
  ```
85
85
 
86
- **If NOT ignored:** Add to .gitignore, commit the change, then proceed.
86
+ **If NOT ignored:** Add the chosen directory to .gitignore within the authorized setup scope, verify it is ignored, then proceed. Leave that edit uncommitted unless Git commit authorization already covers it.
87
87
 
88
88
  **Why critical:** Prevents accidentally committing worktree contents to repository.
89
89
 
@@ -97,15 +97,17 @@ git worktree add "$path" -b "$BRANCH_NAME"
97
97
  cd "$path"
98
98
  ```
99
99
 
100
- **Sandbox fallback:** If `git worktree add` fails with a permission error (sandbox denial), tell the user the sandbox blocked worktree creation and you're working in the current directory instead. Then run setup and baseline tests in place.
100
+ **Isolation failure:** If worktree creation is blocked, report the actual error and preserve the current checkout. Use another already authorized isolated location when available; ask only if proceeding would change the requested isolation boundary. Do not silently begin implementation in the original checkout.
101
101
 
102
102
  ## Step 2: Project Setup
103
103
 
104
104
  Auto-detect and run appropriate setup:
105
105
 
106
106
  ```bash
107
- # Node.js
108
- if [ -f package.json ]; then npm install; fi
107
+ # Node.js: inspect packageManager, lockfile and project instructions first.
108
+ # In a pnpm project, use the recorded version and frozen lockfile:
109
+ # pnpm install --frozen-lockfile
110
+ # Use npm/yarn only when the repository actually declares them.
109
111
 
110
112
  # Rust
111
113
  if [ -f Cargo.toml ]; then cargo build; fi
@@ -124,10 +126,10 @@ Run tests to ensure workspace starts clean:
124
126
 
125
127
  ```bash
126
128
  # Use project-appropriate command
127
- npm test / cargo test / pytest / go test ./...
129
+ pnpm test / cargo test / pytest / go test ./... # select the declared project runner
128
130
  ```
129
131
 
130
- **If tests fail:** Report failures, ask whether to proceed or investigate.
132
+ **If tests fail:** Record the existing failure and investigate within the authorized scope. Ask only if a new decision or access is needed; do not label the baseline clean.
131
133
 
132
134
  **If tests pass:** Report ready.
133
135
 
@@ -151,9 +153,9 @@ Ready to implement <feature-name>
151
153
  | `worktrees/` exists | Use it (verify ignored) |
152
154
  | Both exist | Use `.worktrees/` |
153
155
  | Neither exists | Check instruction file, then default `.worktrees/` |
154
- | Directory not ignored | Add to .gitignore + commit |
155
- | Permission error on create | Sandbox fallback, work in place |
156
- | Tests fail during baseline | Report failures + ask |
156
+ | Directory not ignored | Add to .gitignore; commit only when authorized |
157
+ | Permission error on create | Report failure; preserve the requested isolation boundary |
158
+ | Tests fail during baseline | Record failures; continue authorized diagnosis |
157
159
  | No package.json/Cargo.toml | Skip dependency install |
158
160
 
159
161
  ## Common Mistakes
@@ -181,7 +183,7 @@ Ready to implement <feature-name>
181
183
  ### Proceeding with failing tests
182
184
 
183
185
  - **Problem:** Can't distinguish new bugs from pre-existing issues
184
- - **Fix:** Report failures, get explicit permission to proceed
186
+ - **Fix:** Distinguish baseline failures from new defects; ask only for a missing decision
185
187
 
186
188
  ## Red Flags
187
189
 
@@ -191,7 +193,7 @@ Ready to implement <feature-name>
191
193
  - Skip Step 1a by jumping straight to Step 1b's git commands
192
194
  - Create worktree without verifying it's ignored (project-local)
193
195
  - Skip baseline test verification
194
- - Proceed with failing tests without asking
196
+ - Claim a clean baseline when checks failed
195
197
 
196
198
  **Always:**
197
199
  - Run Step 0 detection first
@@ -4,4 +4,4 @@ description: "Stop. That last message did not land: re-pitch it."
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
- Wait, I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from the repository-root `CONTEXT.md`. When the repository has multiple bounded contexts, resolve the term by its `<ContextId>/<EnglishIdentifier>` reference and the `适用限界上下文` column in that single glossary.
7
+ 用用户当前使用的语言,补足刚才说明所缺的背景并重新解释。保持简明、具体,复用仓库根目录唯一 `CONTEXT.md` 的词汇;跨业务责任区按 `<ContextId>/<EnglishIdentifier>` 定位。只改表达,不启动完整生命周期或重建上下文。
@@ -20,6 +20,8 @@ Every map and ticket is an issue, so it has a **name** — its title. In everyth
20
20
 
21
21
  The map is a single issue on this repo's issue tracker, labelled `wayfinder:map` — the canonical artifact. Its tickets are child issues of the map.
22
22
 
23
+ Return the decision map to the active orchestrator for formal asset/state acceptance. Explicit invocation does not authorize remote publication or Git commits; preserve those action boundaries.
24
+
23
25
  The map is an **index**, not a store. It lists the decisions made and points at the tickets that hold their detail; a decision lives in exactly one place — its ticket — so the map never restates it, only gists it and links.
24
26
 
25
27
  **Where the map, its child tickets, blocking, and frontier queries physically live is tracker-specific.** The issue tracker should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`. Consult the tracker doc's "Wayfinding operations" section for how _this_ repo expresses them. If no tracker has been provided, default to the local-markdown tracker.
@@ -54,7 +56,7 @@ The whole map at low resolution, loaded once per session. Open tickets are **not
54
56
 
55
57
  ### Tickets
56
58
 
57
- Each ticket is a **child issue** of the map; the tracker's issue id is its identity. Its body is the question, sized to one 100K token agent session:
59
+ Each ticket is a **child issue** of the map; the tracker's issue id is its identity. Its body is the question, bounded by a coherent decision and the current runtime/context capacity:
58
60
 
59
61
  ```markdown
60
62
  ## Question
@@ -102,7 +104,7 @@ Ruling something out of scope is a scoping act, not a step on the route. When a
102
104
 
103
105
  ## Invocation
104
106
 
105
- Two modes. Either way, **never resolve more than one ticket per session** — with the exception of research tickets.
107
+ Two modes. Keep each decision traceable and stop at a real dependency, decision or context boundary; related small tickets may share a session when their evidence remains clear.
106
108
 
107
109
  ### Chart the map
108
110
 
@@ -3,79 +3,15 @@ name: writing-for-agents
3
3
  description: Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
4
4
  ---
5
5
 
6
- Reference for writing any document an agent consumes — a skill, an `AGENTS.md` / `CLAUDE.md`, a doc reached by a pointer. The packaging differs; the writing does not: the same levers make each one predictable — the agent taking the same _process_ every run, not producing the same output.
6
+ # Writing for Agents
7
7
 
8
- When the document you're writing is a skill, read [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md) for frontmatter, invocation choice, and router skills.
8
+ Write instructions that help an Agent make the right decision in the intended task. Preserve the host repository's authority, user authorization and existing conventions.
9
9
 
10
- ## Context pointers
10
+ - Put the distinguishing trigger first. Separate source facts, mandatory boundaries and optional methods.
11
+ - Keep necessary inputs, branch choices, fragile invariants, stopping conditions and completion evidence visible.
12
+ - Link conditional detail at its decision point. Explain when to load it; do not make every task load every reference.
13
+ - Prefer outcomes and criteria for flexible work. Use exact steps for genuinely fragile operations, not arbitrary counts or a desired writing length.
14
+ - Remove duplicated generic advice only when the remaining instruction preserves the real decision boundary.
15
+ - Verify changed triggers and behavior with representative requests, neighboring non-triggers and applicable authorization counterexamples; structural checks do not prove Agent behavior.
11
16
 
12
- A **context pointer** is a reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. A skill's description is one; a line in `AGENTS.md` naming a doc is the same object. The pointer's _wording_, not its target, decides when the agent reaches the material — and how reliably. A must-have target behind a weakly worded pointer is a variance bug: sharpen the wording first, and inline the material only if sharpening fails.
13
-
14
- A pointer does two jobs — state what the material is, and list the **branches** that should trigger reaching it (a branch is a distinct case the document handles, so different runs take different paths through it). Every word of an always-loaded pointer costs on every turn, so it earns even harder pruning than the body:
15
-
16
- - **Front-load the leading word** — the pointer is where it does its triggering work.
17
- - **One trigger per branch.** Synonyms that rename a single branch are one branch written twice; collapse them and keep only genuinely distinct branches.
18
- - **Cut identity the body already carries.**
19
-
20
- ## The two loads
21
-
22
- Every document and pointer you add spends one of two budgets:
23
-
24
- - **Context load** — the cost of always-loaded material on the agent's window: an `AGENTS.md` line, a skill description, anything sitting in context every turn, spending tokens and attention whether or not it fires.
25
- - **Cognitive load** — the cost on the human: which documents exist and when to reach for each. The human is the index. Not a cost to minimise — it is the price of human agency; spend it where human judgement matters, remove it where it does not.
26
-
27
- Material reached only through a pointer escapes context load at the price of the pointer's own line; material with no pointer at all rides entirely on cognitive load.
28
-
29
- ## Information hierarchy
30
-
31
- A document is built from two content types — **steps** (the ordered actions the agent performs) and **reference** (definitions, rules, facts consulted on demand) — that mix freely: all steps (a recipe), all reference (a review's rules, this skill), or both. The core decision is where each piece sits on the **information hierarchy**, a ladder ranked by how immediately the agent needs the material:
32
-
33
- 1. **In-file step** — the primary tier: what the agent does, in order.
34
- 2. **In-file reference** — consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell.
35
- 3. **Disclosed reference** — pushed out into a separate file, reached by a context pointer, loaded only when the pointer fires. Spans a sibling file in the same folder through fully external reference that lives anywhere and any document can point at.
36
-
37
- Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
38
-
39
- **Progressive disclosure** is the move down the ladder — out of the main file and behind a pointer — so the top stays legible. Not primarily a token optimisation: it is how the hierarchy is protected. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. When a document has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip — a variance lever, not just a legibility one.
40
-
41
- **Co-location** is the within-file companion: where the ladder decides _how far down_ a piece sits, co-location decides _what sits beside it_ once there. Keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it. The test: the document should read like documentation written for the agent — grouped material reads that way; scattered material does not. (Distinct from duplication: that repeats one meaning in two places; scattering fragments one meaning across many.)
42
-
43
- **Sprawl** is the failure mode here: a document simply too long, even when every line is live and unique. Attention thins across the excess, and every extra line is one more to keep relevant. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.
44
-
45
- ## Steps and completion criteria
46
-
47
- Every step ends on a **completion criterion** — the condition that tells the agent the work is done. Two properties make it a lever:
48
-
49
- - **Clarity** — can the agent tell done from not-done? A vague bound ("understanding reached") invites **premature completion**: ending the step before it is genuinely done, attention slipping to _being done_. The visible steps still ahead — the **post-completion steps** — supply the pull; the criterion's clarity is the resistance. Defend in order: **sharpen the bound first** (local and cheap); only if it is irreducibly fuzzy _and_ you observe the rush, hide the later steps by splitting the sequence — and hiding only works across a real context boundary (a hand-off or a subagent dispatch; an inline call leaves the later steps in context and clears nothing).
50
- - **Demand** — how much it requires. "Every modified model accounted for" forces thorough work where "produce a change list" does not. Demand drives **legwork** — the digging the agent does within the work, latent in the wording rather than written as its own step — and it is not step-bound: "every rule applied" binds a body of flat reference just as "every step done" binds a sequence, which is how an all-reference document still carries an exhaustiveness bar.
51
-
52
- The strongest criteria are both checkable and exhaustive.
53
-
54
- ## When to split
55
-
56
- Splitting one document into two spends one of the two loads, so split only when the cut earns it:
57
-
58
- - **By sequence** — split a run of steps where the post-completion steps tempt the agent to rush the one in front of it. Keeping them out of view drives more legwork on the current task. Beware the reverse: merging sequences exposes each step's later steps to what follows, inviting premature completion.
59
- - **By invocation** — skill-specific: see [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md).
60
-
61
- ## Leading words
62
-
63
- A **leading word** is a compact concept already living in the model's pretraining that the agent thinks with while running the document (_lesson_, _fog of war_, _tracer bullets_). Repeated as a token, never as a sentence, it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds. Coining your own works if you define it clearly, but a made-up word recruits no priors — you pay in definition tokens what a pretrained word gives free; reach for an existing word first.
64
-
65
- It anchors twice. In the body, _execution_: the agent reaches for the same behaviour every time the word appears, and inside flat reference it focuses attention on a class of thing to look for. In a pointer, _invocation_: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the material and reaches it more reliably.
66
-
67
- Hunt for opportunities to refactor with leading words. A triad spelled out at three sites, a pointer spending a sentence to gesture at one idea — each is a passage begging to collapse into a single token:
68
-
69
- - "fast, deterministic, low-overhead" → _tight_ (a _tight_ loop).
70
- - "a loop you believe in" → _red_ — a fuzzy gate becomes a binary observable state (the loop goes _red_ on the bug, or it doesn't).
71
-
72
- You win twice: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every document is carrying restatements that leading words retire — go find them.
73
-
74
- **Negation** is the failure mode beside this lever: steering by prohibition drags the forbidden behaviour into context and makes it _more_ available, not less. _Don't think of an elephant_, and the elephant is all there is; the negation is a weak modifier the strongly-activated concept overruns, so the ban half-reads as an instruction to do the thing. Prompt the **positive** — state the target behaviour ("write one-line comments") so the banned one is never spoken. A prohibition earns its place only as a hard guardrail you cannot phrase positively; even then, pair it with the positive target so attention lands on what to do.
75
-
76
- ## Pruning
77
-
78
- - Keep each meaning in a **single source of truth**: one authoritative place, so changing the behaviour is a one-place edit. **Duplication** — the same meaning in more than one place — costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank. (The accidental inverse of a leading word, which repeats a token on purpose, never the meaning.)
79
- - The **environment** is a source of truth too — `package.json` scripts, config files, the directory layout, `--help` output — and a document that restates it is a **cache**: a copy of a lookup, earning its load only when the lookup is expensive. Cache what the agent cannot find by looking: the unwritten convention, the reason behind a choice, the gotcha no config confesses. Leave the one-file, one-command lookups to the environment, where they cannot go stale.
80
- - Check every line for **relevance**: does it still bear on what the document does? A line loses relevance by never bearing on the task (mere exposition, or a branch that should be disclosed) or by going stale as the behaviour or world it describes changes. Shorter documents are easier to keep relevant. Without a pruning discipline the default fate is **sediment**: stale layers that settle because adding feels safe and removing feels risky, until you must core down through them to find what is still live.
81
- - Hunt **no-ops** sentence by sentence: an instruction the model already obeys by default pays load to say nothing. The test — does it change behaviour versus the default? — is model-relative, not reader-relative: two people disagreeing about a no-op disagree about the default, and settle it by running the document, not by debate. When a sentence fails, delete the whole sentence rather than trim words from it. The test also grades leading words: a word too weak to beat the default (_be thorough_ when the agent is already thorough-ish) is a no-op, and the fix is a stronger word (_relentless_), not a different technique.
17
+ When editing skill metadata or invocation policy, read [skill mechanics](SKILL-MECHANICS.md). When deciding how to split a long document or repair an unreliable context pointer, read [writing principles and examples](references/writing-principles.md). These references do not impose a uniform writing length or override project governance.
@@ -0,0 +1,76 @@
1
+ Reference for writing any document an agent consumes — a skill, an `AGENTS.md` / `CLAUDE.md`, a doc reached by a pointer. The packaging differs; the writing does not: the same levers make each one predictable — the agent taking the same _process_ every run, not producing the same output.
2
+
3
+ When the document you're writing is a skill, read [`SKILL-MECHANICS.md`](../SKILL-MECHANICS.md) for frontmatter, invocation choice, and router skills.
4
+
5
+ ## Context pointers
6
+
7
+ A **context pointer** is a reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. A skill's description is one; a line in `AGENTS.md` naming a doc is the same object. The pointer's _wording_, not its target, decides when the agent reaches the material — and how reliably. A must-have target behind a weakly worded pointer is a variance bug: sharpen the wording first, and inline the material only if sharpening fails.
8
+
9
+ A pointer does two jobs — state what the material is, and list the **branches** that should trigger reaching it (a branch is a distinct case the document handles, so different runs take different paths through it). Every word of an always-loaded pointer costs on every turn, so it earns even harder pruning than the body:
10
+
11
+ - **Front-load the leading word** — the pointer is where it does its triggering work.
12
+ - **One trigger per branch.** Synonyms that rename a single branch are one branch written twice; collapse them and keep only genuinely distinct branches.
13
+ - **Cut identity the body already carries.**
14
+
15
+ ## The two loads
16
+
17
+ Every document and pointer you add spends one of two budgets:
18
+
19
+ - **Context load** — the cost of always-loaded material on the agent's window: an `AGENTS.md` line, a skill description, anything sitting in context every turn, spending tokens and attention whether or not it fires.
20
+ - **Cognitive load** — the cost on the human: which documents exist and when to reach for each. The human is the index. Not a cost to minimise — it is the price of human agency; spend it where human judgement matters, remove it where it does not.
21
+
22
+ Material reached only through a pointer escapes context load at the price of the pointer's own line; material with no pointer at all rides entirely on cognitive load.
23
+
24
+ ## Information hierarchy
25
+
26
+ A document is built from two content types — **steps** (the ordered actions the agent performs) and **reference** (definitions, rules, facts consulted on demand) — that mix freely: all steps (a recipe), all reference (a review's rules, this skill), or both. The core decision is where each piece sits on the **information hierarchy**, a ladder ranked by how immediately the agent needs the material:
27
+
28
+ 1. **In-file step** — the primary tier: what the agent does, in order.
29
+ 2. **In-file reference** — consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell.
30
+ 3. **Disclosed reference** — pushed out into a separate file, reached by a context pointer, loaded only when the pointer fires. Spans a sibling file in the same folder through fully external reference that lives anywhere and any document can point at.
31
+
32
+ Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
33
+
34
+ **Progressive disclosure** is the move down the ladder — out of the main file and behind a pointer — so the top stays legible. Not primarily a token optimisation: it is how the hierarchy is protected. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. When a document has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip — a variance lever, not just a legibility one.
35
+
36
+ **Co-location** is the within-file companion: where the ladder decides _how far down_ a piece sits, co-location decides _what sits beside it_ once there. Keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it. The test: the document should read like documentation written for the agent — grouped material reads that way; scattered material does not. (Distinct from duplication: that repeats one meaning in two places; scattering fragments one meaning across many.)
37
+
38
+ **Sprawl** is the failure mode here: a document simply too long, even when every line is live and unique. Attention thins across the excess, and every extra line is one more to keep relevant. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.
39
+
40
+ ## Steps and completion criteria
41
+
42
+ Every step ends on a **completion criterion** — the condition that tells the agent the work is done. Two properties make it a lever:
43
+
44
+ - **Clarity** — can the agent tell done from not-done? A vague bound ("understanding reached") invites **premature completion**: ending the step before it is genuinely done, attention slipping to _being done_. The visible steps still ahead — the **post-completion steps** — supply the pull; the criterion's clarity is the resistance. Defend in order: **sharpen the bound first** (local and cheap); only if it is irreducibly fuzzy _and_ you observe the rush, hide the later steps by splitting the sequence — and hiding only works across a real context boundary (a hand-off or a subagent dispatch; an inline call leaves the later steps in context and clears nothing).
45
+ - **Demand** — how much it requires. "Every modified model accounted for" forces thorough work where "produce a change list" does not. Demand drives **legwork** — the digging the agent does within the work, latent in the wording rather than written as its own step — and it is not step-bound: "every rule applied" binds a body of flat reference just as "every step done" binds a sequence, which is how an all-reference document still carries an exhaustiveness bar.
46
+
47
+ The strongest criteria are both checkable and exhaustive.
48
+
49
+ ## When to split
50
+
51
+ Splitting one document into two spends one of the two loads, so split only when the cut earns it:
52
+
53
+ - **By sequence** — split a run of steps where the post-completion steps tempt the agent to rush the one in front of it. Keeping them out of view drives more legwork on the current task. Beware the reverse: merging sequences exposes each step's later steps to what follows, inviting premature completion.
54
+ - **By invocation** — skill-specific: see [`SKILL-MECHANICS.md`](../SKILL-MECHANICS.md).
55
+
56
+ ## Leading words
57
+
58
+ A **leading word** is a compact concept already living in the model's pretraining that the agent thinks with while running the document (_lesson_, _fog of war_, _tracer bullets_). Repeated as a token, never as a sentence, it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds. Coining your own works if you define it clearly, but a made-up word recruits no priors — you pay in definition tokens what a pretrained word gives free; reach for an existing word first.
59
+
60
+ It anchors twice. In the body, _execution_: the agent reaches for the same behaviour every time the word appears, and inside flat reference it focuses attention on a class of thing to look for. In a pointer, _invocation_: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the material and reaches it more reliably.
61
+
62
+ Hunt for opportunities to refactor with leading words. A triad spelled out at three sites, a pointer spending a sentence to gesture at one idea — each is a passage begging to collapse into a single token:
63
+
64
+ - "fast, deterministic, low-overhead" → _tight_ (a _tight_ loop).
65
+ - "a loop you believe in" → _red_ — a fuzzy gate becomes a binary observable state (the loop goes _red_ on the bug, or it doesn't).
66
+
67
+ You win twice: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every document is carrying restatements that leading words retire — go find them.
68
+
69
+ **Negation** is the failure mode beside this lever: steering by prohibition drags the forbidden behaviour into context and makes it _more_ available, not less. _Don't think of an elephant_, and the elephant is all there is; the negation is a weak modifier the strongly-activated concept overruns, so the ban half-reads as an instruction to do the thing. Prompt the **positive** — state the target behaviour ("write one-line comments") so the banned one is never spoken. A prohibition earns its place only as a hard guardrail you cannot phrase positively; even then, pair it with the positive target so attention lands on what to do.
70
+
71
+ ## Pruning
72
+
73
+ - Keep each meaning in a **single source of truth**: one authoritative place, so changing the behaviour is a one-place edit. **Duplication** — the same meaning in more than one place — costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank. (The accidental inverse of a leading word, which repeats a token on purpose, never the meaning.)
74
+ - The **environment** is a source of truth too — `package.json` scripts, config files, the directory layout, `--help` output — and a document that restates it is a **cache**: a copy of a lookup, earning its load only when the lookup is expensive. Cache what the agent cannot find by looking: the unwritten convention, the reason behind a choice, the gotcha no config confesses. Leave the one-file, one-command lookups to the environment, where they cannot go stale.
75
+ - Check every line for **relevance**: does it still bear on what the document does? A line loses relevance by never bearing on the task (mere exposition, or a branch that should be disclosed) or by going stale as the behaviour or world it describes changes. Shorter documents are easier to keep relevant. Without a pruning discipline the default fate is **sediment**: stale layers that settle because adding feels safe and removing feels risky, until you must core down through them to find what is still live.
76
+ - Hunt **no-ops** sentence by sentence: an instruction the model already obeys by default pays load to say nothing. The test — does it change behaviour versus the default? — is model-relative, not reader-relative: two people disagreeing about a no-op disagree about the default, and settle it by running the document, not by debate. When a sentence fails, delete the whole sentence rather than trim words from it. The test also grades leading words: a word too weak to beat the default (_be thorough_ when the agent is already thorough-ish) is a no-op, and the fix is a stronger word (_relentless_), not a different technique.
@@ -43,7 +43,7 @@ description: "在 Vue3 YSS UI 中对接 Orval API;核验生成方法、mutator
43
43
  1. 读取 `yss-openapi-governance` 产出的 OpenAPI Freeze 记录和 `docs/.scratch/<feature>/api/<feature>-json-export.md`;确认 YAML SHA-256、JSON SHA-256、Redocly CLI 版本、lockfile 引用和 JSON 校验均通过。治理 JSON 的唯一产物路径是 `docs/.scratch/<feature>/api/<feature>.json`。
44
44
  2. JSON 导出由 `yss-openapi-governance` 负责。`api-integration` 只接受该 skill 留下的派生记录;记录中的锁定 `redocly bundle` 命令是治理导出证据,不是前端集成任意重跑的入口。
45
45
  3. **受控交接**:若前端实现仓库需要本地输入,批准的 Cross-repo 子合同或项目脚本只能将上述治理 JSON 原样物化为 `<frontend>/openapi/openapi.json`;物化后的 SHA-256 必须与派生记录一致。禁止从 URL、Draft YAML、后端运行时或任意本地文件临时替换输入。
46
- 4. `api-integration` 只核对 JSON 派生记录、交接路径和 SHA-256,并把原始 JSON 交给既有前端代码生成流程;本 Harness 不读取或修改目标前端的生成器配置,不在此仓库执行生成,也不建立生成 CI 门禁。若 JSON SHA 与派生记录不一致,停止交接并回到治理流程。
46
+ 4. `api-integration` 只核对 JSON 派生记录、交接路径和 SHA-256,并把原始 JSON 交给既有前端代码生成流程;本 Harness 可只读核对目标前端的生成器配置与真实导出,但不修改该配置,不在此仓库执行生成,也不建立生成 CI 门禁。若 JSON SHA 与派生记录不一致,停止交接并回到治理流程。
47
47
  5. 目标前端项目在需要时手动运行其既有生成命令、类型检查和受影响组件 / API 测试;将实际命令、结果、生成输入 SHA 和偏离写入 `YSS Skill Execution Result`。
48
48
 
49
49
  ## 真实 mutator 响应契约
@@ -174,7 +174,7 @@ await pageQualityRule(query, { signal: controller.signal, timeout: 120000 });
174
174
 
175
175
  ## 失败兜底策略
176
176
 
177
- - 生成导出与 skill 示例不同时,以生成文件为准并更新生成脚本,禁止绕过类型检查猜名调用。
177
+ - 生成导出与 skill 示例不同时,以生成文件为准;仅在已授权的生成链维护范围内更新生成脚本,禁止绕过类型检查猜名调用。
178
178
  - 接口字段不稳定时,在 Hook API 边界做最小映射,不把兼容逻辑散落到模板。
179
179
  - HTTP 200 Blob 业务错误时,先修复后端状态码或 mutator 统一解析,禁止在业务 Hook 重复实现。
180
180
 
@@ -29,7 +29,11 @@ Application 层用例编排 skill。负责协调 Domain 与 Gateway,定义事
29
29
 
30
30
  1. 按 `architecture_identity.architecture_profile` 选择且只选择对应 Profile reference;Profile 未登记、与 Manifest 不一致或成熟度不满足当前任务时返回 `blocked`。
31
31
  2. `target-domain-model` 才执行 Domain Service / Gateway、跨聚合编排和下述 DDD 产物规则;`layered-mvc-service` 与 `mvc-data-analysis-v1` 分别按其 service/core Profile 承载用例、规则和事务,不加载 DDD Gateway。
32
+ <a id="application.use-case"></a>
33
+ <!-- yss-rule {"id":"application.use-case","when":"application","level":"mandatory","evidence":"code-and-verification"} -->
32
34
  3. 确认 Use Case、Application/service/core 边界与事务边界已在批准合同中写明。
35
+ <a id="application.mapping"></a>
36
+ <!-- yss-rule {"id":"application.mapping","when":"application","level":"mandatory","evidence":"code-and-verification"} -->
33
37
  4. Web DTO 到内部 Command/Result 的转换归 Web 边界,持久化转换归 Repository/Infrastructure;用例层确有独立模型转换时才加载 `mapstruct`,并统一 Spring Bean 与构造器注入。
34
38
  5. DDD 的详细包结构、注解、示例和旧架构阻断边界见 `references/application-layer-guide.md`;MVC 不读取该 guide。
35
39
 
@@ -53,10 +57,18 @@ Application 层用例编排 skill。负责协调 Domain 与 Gateway,定义事
53
57
  ## 阶段 7 合同
54
58
 
55
59
  - 只消费批准后的 `Slice Implementation Contract` 和当前 `work_unit`。
60
+ <a id="application.behavior-tests"></a>
61
+ <!-- yss-rule {"id":"application.behavior-tests","when":"application","level":"mandatory","evidence":"code-and-verification"} -->
56
62
  - AppService 骨架可 `controlled-generation`;用例编排、事务、幂等、权限和失败行为必须 `behavior-tdd`。
57
63
  - 按 `yss-implementation-contract-compiler/references/yss-skill-execution-result.md` 返回统一 `YSS Skill Execution Result`。
64
+ <a id="application.impacts"></a>
65
+ <!-- yss-rule {"id":"application.impacts","when":"application","level":"mandatory","evidence":"code-and-verification"} -->
58
66
  - 发现新 API、权限、状态机或跨上下文影响时填入 `new_impacts` 并暂停。
59
67
 
60
68
  ## 按需读取
61
69
 
62
70
  - 分层开发规范:`references/application-layer-guide.md`
71
+
72
+ ## 既有工程与条件适用
73
+
74
+ 只读审计不要求先补批准 Slice;业务 Spec 缺失须记录。整改消费批准 Slice、已确认行为 seam 与登记的 Application/service/core 映射,不要求生成 Manifest。事务、幂等、提交后副作用按实际用例评估;未命中不创建空事务、空端口或空恢复实现。DDD 的领域规则归 Domain,MVC 规则允许留在已登记 service/core。
@@ -85,3 +85,10 @@ public interface QualityTemplateApplicationConvertor {
85
85
  ## 8. 旧架构边界
86
86
 
87
87
  检测到 AppService 接收 client Cmd、返回 client VO、调用返回 VO 的 Domain Gateway 或位于 `core/service` 时,返回 `unsupported`,不得由新 scaffold 或本指南自动改写。旧项目继续按原工程维护;现代化改造必须单独立项、先评估再逐切片迁移。
88
+
89
+ ## 事务与外部副作用
90
+
91
+ - 合同标明需要原子提交的数据库写入及所属用例;事务从 Application 公共代理 seam 进入。无需原子写入的查询或纯计算不强制增加事务注解。
92
+ - Repository 参与既有事务,不另行决定业务提交边界。多表聚合保存的回滚测试从用例入口注入中途失败,不能只验证单个 Mapper。
93
+ - Redis、邮件、HTTP 调用不因数据库事务自动获得原子性。按批准合同选择提交后缓存失效、可重试事件或 outbox;需要持久重试时不能只依赖内存事件。
94
+ - 幂等键、重复请求结果、重试范围及失败恢复来自合同;不在技能中默认引入分布式事务或通用重试。测试覆盖回滚不发布、提交后失败及重复消费。
@@ -19,7 +19,7 @@ description: "接入或排查 YSS AuditLog 的 SpEL 摘要、异步发布、订
19
19
  2. 涉及真实类名、配置项、订阅器或排障时,先读 `references/source-index.md`,再定位源码或文档。
20
20
  3. 优先检查项目里是否已有注解、配置项和订阅器实现,再决定改法。
21
21
  4. 只给出与当前问题直接相关的接入点:注解、配置、切面链路、`CurrentUserProvider` 和订阅器扩展。
22
- 5. 需要看实现细节时,再读取 `assets/` 下源码,不要先讲整套组件原理。
22
+ 5. 实现细节以所选平台线的当前源码为准。`assets/` 是 Boot 2 / Java 8 历史快照,仅在旧工程比对或迁移诊断时读取;不能作为 Boot 3 的实现模板或 freshness 证据。
23
23
 
24
24
  ## 源码索引
25
25
 
@@ -62,6 +62,8 @@ description: "接入或排查 YSS AuditLog 的 SpEL 摘要、异步发布、订
62
62
 
63
63
  ## 按需读取
64
64
 
65
+ 以下 `assets/*.java` 均为 `boot2-java8` 历史资料,含 javax 与旧中文 SpEL key。Boot 3 使用其平台索引定位当前 jakarta / args / result 源码;不要修改历史资料来冒充新平台源码。
66
+
65
67
  - 源码索引:`references/source-index.md`
66
68
  - 审计切面与 SpEL 解析:`assets/AuditLogAspect.java`
67
69
  - 异步发布链路:`assets/YssAuditPublishService.java`
@@ -1,3 +1,4 @@
1
+ // Historical boot2-java8 reference only; not a boot3-java17 implementation template.
1
2
  package com.yss.cloud.audit.configuration;
2
3
 
3
4
  import cn.hutool.jwt.JWT;
@@ -1,3 +1,4 @@
1
+ // Historical boot2-java8 reference only; not a boot3-java17 implementation template.
1
2
  /*
2
3
  * Licensed to the Apache Software Foundation (ASF) under one or more
3
4
  * contributor license agreements. See the NOTICE file distributed with
@@ -1,3 +1,4 @@
1
+ // Historical boot2-java8 reference only; not a boot3-java17 implementation template.
1
2
  package com.yss.cloud.audit.subscriber.impl;
2
3
 
3
4
  import com.yss.cloud.audit.subscriber.YssAuditSubscriber;
@@ -1,3 +1,4 @@
1
+ // Historical boot2-java8 reference only; not a boot3-java17 implementation template.
1
2
  package com.yss.cloud.audit.subscriber;
2
3
 
3
4
  import com.yss.cloud.audit.configuration.AuditConfigurationProperties;