create-yss-spec 1.1.3 → 2.0.0

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 (574) hide show
  1. package/README.md +20 -2
  2. package/package.json +13 -2
  3. package/src/cli.js +367 -51
  4. package/template/.agents/skills/ask-matt/SKILL.md +8 -4
  5. package/template/.agents/skills/ask-matt/agents/openai.yaml +5 -0
  6. package/template/.agents/skills/code-review/SKILL.md +4 -4
  7. package/template/.agents/skills/code-review/agents/openai.yaml +3 -0
  8. package/template/.agents/skills/codebase-design/agents/openai.yaml +3 -0
  9. package/template/.agents/skills/competitive-intelligence/SKILL.md +5 -5
  10. package/template/.agents/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  11. package/template/.agents/skills/domain-modeling/agents/openai.yaml +3 -0
  12. package/template/.agents/skills/excalidraw-diagram-generator/SKILL.md +4 -4
  13. package/template/.agents/skills/grill-me/SKILL.md +7 -0
  14. package/template/.agents/skills/grill-me/agents/openai.yaml +5 -0
  15. package/template/.agents/skills/grill-with-docs/agents/openai.yaml +5 -0
  16. package/template/.agents/skills/grilling/SKILL.md +12 -0
  17. package/template/.agents/skills/grilling/agents/openai.yaml +3 -0
  18. package/template/.agents/skills/handoff/SKILL.md +16 -0
  19. package/template/.agents/skills/handoff/agents/openai.yaml +5 -0
  20. package/template/.agents/skills/high-fidelity-html-prototype/SKILL.md +6 -6
  21. package/template/.agents/skills/high-fidelity-html-prototype/agents/openai.yaml +5 -0
  22. package/template/.agents/skills/implement/SKILL.md +2 -2
  23. package/template/.agents/skills/implement/agents/openai.yaml +5 -0
  24. package/template/.agents/skills/improve-codebase-architecture/SKILL.md +6 -1
  25. package/template/.agents/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
  26. package/template/.agents/skills/lombok/SKILL.md +345 -0
  27. package/template/.agents/skills/mapstruct/SKILL.md +328 -0
  28. package/template/.agents/skills/prototype/LOGIC.md +3 -3
  29. package/template/.agents/skills/prototype/SKILL.md +2 -6
  30. package/template/.agents/skills/prototype/UI.md +4 -4
  31. package/template/.agents/skills/prototype/agents/openai.yaml +3 -0
  32. package/template/.agents/skills/research/agents/openai.yaml +3 -0
  33. package/template/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
  34. package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +21 -32
  35. package/template/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
  36. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
  37. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
  38. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
  39. package/template/.agents/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
  40. package/template/.agents/skills/tdd/agents/openai.yaml +3 -0
  41. package/template/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
  42. package/template/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  43. package/template/.agents/skills/teach/MISSION-FORMAT.md +31 -0
  44. package/template/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
  45. package/template/.agents/skills/teach/SKILL.md +140 -0
  46. package/template/.agents/skills/teach/agents/openai.yaml +5 -0
  47. package/template/.agents/skills/to-spec/SKILL.md +58 -0
  48. package/template/.agents/skills/to-spec/agents/openai.yaml +5 -0
  49. package/template/.agents/skills/to-tickets/SKILL.md +62 -0
  50. package/template/.agents/skills/to-tickets/agents/openai.yaml +5 -0
  51. package/template/.agents/skills/triage/SKILL.md +4 -4
  52. package/template/.agents/skills/triage/agents/openai.yaml +5 -0
  53. package/template/.agents/skills/wayfinder/SKILL.md +128 -0
  54. package/template/.agents/skills/wayfinder/agents/openai.yaml +5 -0
  55. package/template/.agents/skills/web-design-engineer/SKILL.md +2 -2
  56. package/template/.agents/skills/writing-great-skills/GLOSSARY.md +201 -0
  57. package/template/.agents/skills/writing-great-skills/SKILL.md +83 -0
  58. package/template/.agents/skills/writing-great-skills/agents/openai.yaml +5 -0
  59. package/template/.agents/skills/yss-cache/SKILL.md +44 -0
  60. package/template/.agents/skills/yss-cache/agents/openai.yaml +5 -0
  61. package/template/.agents/skills/yss-cache/references/annotations.md +39 -0
  62. package/template/.agents/skills/yss-cache/references/architecture.md +25 -0
  63. package/template/.agents/skills/yss-cache/references/configuration.md +34 -0
  64. package/template/.agents/skills/yss-cache/references/redis-fallback.md +23 -0
  65. package/template/.agents/skills/yss-cache/references/redis-topology.md +62 -0
  66. package/template/.agents/skills/yss-cache/references/serialization.md +17 -0
  67. package/template/.agents/skills/yss-cache/references/source-index.md +64 -0
  68. package/template/.agents/skills/yss-cache/references/troubleshooting.md +33 -0
  69. package/template/.agents/skills/yss-cache/references/verification.md +34 -0
  70. package/template/.agents/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
  71. package/template/.agents/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
  72. package/template/.agents/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
  73. package/template/.claude/skills/ask-matt/SKILL.md +8 -4
  74. package/template/.claude/skills/ask-matt/agents/openai.yaml +5 -0
  75. package/template/.claude/skills/code-review/SKILL.md +4 -4
  76. package/template/.claude/skills/code-review/agents/openai.yaml +3 -0
  77. package/template/.claude/skills/codebase-design/agents/openai.yaml +3 -0
  78. package/template/.claude/skills/competitive-intelligence/SKILL.md +5 -5
  79. package/template/.claude/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  80. package/template/.claude/skills/domain-modeling/agents/openai.yaml +3 -0
  81. package/template/.claude/skills/excalidraw-diagram-generator/SKILL.md +37 -16
  82. package/template/.claude/skills/excalidraw-diagram-generator/scripts/add-arrow.py +18 -18
  83. package/template/.claude/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +46 -47
  84. package/template/.claude/skills/grill-me/SKILL.md +7 -0
  85. package/template/.claude/skills/grill-me/agents/openai.yaml +5 -0
  86. package/template/.claude/skills/grill-with-docs/agents/openai.yaml +5 -0
  87. package/template/.claude/skills/grilling/SKILL.md +12 -0
  88. package/template/.claude/skills/grilling/agents/openai.yaml +3 -0
  89. package/template/.claude/skills/handoff/SKILL.md +16 -0
  90. package/template/.claude/skills/handoff/agents/openai.yaml +5 -0
  91. package/template/.claude/skills/implement/SKILL.md +2 -2
  92. package/template/.claude/skills/implement/agents/openai.yaml +5 -0
  93. package/template/.claude/skills/improve-codebase-architecture/SKILL.md +6 -1
  94. package/template/.claude/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
  95. package/template/.claude/skills/prototype/LOGIC.md +3 -3
  96. package/template/.claude/skills/prototype/SKILL.md +2 -6
  97. package/template/.claude/skills/prototype/UI.md +4 -4
  98. package/template/.claude/skills/prototype/agents/openai.yaml +3 -0
  99. package/template/.claude/skills/research/agents/openai.yaml +3 -0
  100. package/template/.claude/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
  101. package/template/.claude/skills/setup-matt-pocock-skills/SKILL.md +21 -32
  102. package/template/.claude/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
  103. package/template/.claude/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
  104. package/template/.claude/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
  105. package/template/.claude/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
  106. package/template/.claude/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
  107. package/template/.claude/skills/tdd/agents/openai.yaml +3 -0
  108. package/template/.claude/skills/teach/GLOSSARY-FORMAT.md +35 -0
  109. package/template/.claude/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  110. package/template/.claude/skills/teach/MISSION-FORMAT.md +31 -0
  111. package/template/.claude/skills/teach/RESOURCES-FORMAT.md +32 -0
  112. package/template/.claude/skills/teach/SKILL.md +140 -0
  113. package/template/.claude/skills/teach/agents/openai.yaml +5 -0
  114. package/template/.claude/skills/to-spec/SKILL.md +58 -0
  115. package/template/.claude/skills/to-spec/agents/openai.yaml +5 -0
  116. package/template/.claude/skills/to-tickets/SKILL.md +62 -0
  117. package/template/.claude/skills/to-tickets/agents/openai.yaml +5 -0
  118. package/template/.claude/skills/triage/SKILL.md +4 -4
  119. package/template/.claude/skills/triage/agents/openai.yaml +5 -0
  120. package/template/.claude/skills/wayfinder/SKILL.md +128 -0
  121. package/template/.claude/skills/wayfinder/agents/openai.yaml +5 -0
  122. package/template/.claude/skills/web-design-engineer/SKILL.md +2 -2
  123. package/template/.claude/skills/writing-great-skills/GLOSSARY.md +201 -0
  124. package/template/.claude/skills/writing-great-skills/SKILL.md +83 -0
  125. package/template/.claude/skills/writing-great-skills/agents/openai.yaml +5 -0
  126. package/template/.claude/skills/yss-cache/SKILL.md +44 -0
  127. package/template/.claude/skills/yss-cache/agents/openai.yaml +5 -0
  128. package/template/.claude/skills/yss-cache/references/annotations.md +39 -0
  129. package/template/.claude/skills/yss-cache/references/architecture.md +25 -0
  130. package/template/.claude/skills/yss-cache/references/configuration.md +34 -0
  131. package/template/.claude/skills/yss-cache/references/redis-fallback.md +23 -0
  132. package/template/.claude/skills/yss-cache/references/redis-topology.md +62 -0
  133. package/template/.claude/skills/yss-cache/references/serialization.md +17 -0
  134. package/template/.claude/skills/yss-cache/references/source-index.md +64 -0
  135. package/template/.claude/skills/yss-cache/references/troubleshooting.md +33 -0
  136. package/template/.claude/skills/yss-cache/references/verification.md +34 -0
  137. package/template/.claude/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
  138. package/template/.claude/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
  139. package/template/.claude/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
  140. package/template/.codex/config.toml +3 -0
  141. package/template/.codex/skills/ask-matt/SKILL.md +8 -4
  142. package/template/.codex/skills/ask-matt/agents/openai.yaml +5 -0
  143. package/template/.codex/skills/code-review/SKILL.md +4 -4
  144. package/template/.codex/skills/code-review/agents/openai.yaml +3 -0
  145. package/template/.codex/skills/code-review-process/references/automation-and-standards.md +1 -1
  146. package/template/.codex/skills/codebase-design/agents/openai.yaml +3 -0
  147. package/template/.codex/skills/competitive-intelligence/SKILL.md +5 -5
  148. package/template/.codex/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  149. package/template/.codex/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  150. package/template/.codex/skills/domain-modeling/agents/openai.yaml +3 -0
  151. package/template/.codex/skills/grill-with-docs/agents/openai.yaml +5 -0
  152. package/template/.codex/skills/handoff/SKILL.md +16 -0
  153. package/template/.codex/skills/handoff/agents/openai.yaml +5 -0
  154. package/template/.codex/skills/high-fidelity-html-prototype/SKILL.md +6 -6
  155. package/template/.codex/skills/implement/SKILL.md +2 -2
  156. package/template/.codex/skills/implement/agents/openai.yaml +5 -0
  157. package/template/.codex/skills/improve-codebase-architecture/SKILL.md +6 -1
  158. package/template/.codex/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
  159. package/template/.codex/skills/product-design-prototype/SKILL.md +14 -10
  160. package/template/.codex/skills/product-design-prototype/agents/openai.yaml +1 -1
  161. package/template/.codex/skills/prototype/LOGIC.md +3 -3
  162. package/template/.codex/skills/prototype/SKILL.md +2 -6
  163. package/template/.codex/skills/prototype/UI.md +4 -4
  164. package/template/.codex/skills/prototype/agents/openai.yaml +3 -0
  165. package/template/.codex/skills/prototype-review/SKILL.md +6 -6
  166. package/template/.codex/skills/prototype-review/agents/openai.yaml +2 -2
  167. package/template/.codex/skills/research/agents/openai.yaml +3 -0
  168. package/template/.codex/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
  169. package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +21 -32
  170. package/template/.codex/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
  171. package/template/.codex/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
  172. package/template/.codex/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
  173. package/template/.codex/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
  174. package/template/.codex/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
  175. package/template/.codex/skills/tdd/agents/openai.yaml +3 -0
  176. package/template/.codex/skills/to-spec/SKILL.md +58 -0
  177. package/template/.codex/skills/to-spec/agents/openai.yaml +5 -0
  178. package/template/.codex/skills/to-tickets/SKILL.md +62 -0
  179. package/template/.codex/skills/to-tickets/agents/openai.yaml +5 -0
  180. package/template/.codex/skills/triage/SKILL.md +4 -4
  181. package/template/.codex/skills/triage/agents/openai.yaml +5 -0
  182. package/template/.codex/skills/wayfinder/SKILL.md +128 -0
  183. package/template/.codex/skills/wayfinder/agents/openai.yaml +5 -0
  184. package/template/.codex/skills/writing-great-skills/GLOSSARY.md +201 -0
  185. package/template/.codex/skills/writing-great-skills/SKILL.md +83 -0
  186. package/template/.codex/skills/writing-great-skills/agents/openai.yaml +5 -0
  187. package/template/.codex/skills/yss-api-integration/SKILL.md +1 -1
  188. package/template/.codex/skills/yss-cache/SKILL.md +29 -58
  189. package/template/.codex/skills/yss-cache/agents/openai.yaml +2 -2
  190. package/template/.codex/skills/yss-cache/references/annotations.md +39 -0
  191. package/template/.codex/skills/yss-cache/references/architecture.md +25 -0
  192. package/template/.codex/skills/yss-cache/references/configuration.md +34 -0
  193. package/template/.codex/skills/yss-cache/references/redis-fallback.md +23 -0
  194. package/template/.codex/skills/yss-cache/references/redis-topology.md +62 -0
  195. package/template/.codex/skills/yss-cache/references/serialization.md +17 -0
  196. package/template/.codex/skills/yss-cache/references/source-index.md +1 -1
  197. package/template/.codex/skills/yss-cache/references/troubleshooting.md +33 -0
  198. package/template/.codex/skills/yss-cache/references/verification.md +34 -0
  199. package/template/.codex/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
  200. package/template/.codex/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
  201. package/template/.codex/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
  202. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +1 -0
  203. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -2
  204. package/template/.codex/skills/yss-design-system/SKILL.md +9 -2
  205. package/template/.codex/skills/yss-design-system/references/design-system.md +12 -0
  206. package/template/.codex/skills/yss-domain-modeling/SKILL.md +3 -3
  207. package/template/.codex/skills/yss-domain-modeling/agents/openai.yaml +1 -1
  208. package/template/.codex/skills/yss-domain-modeling/references/modeling-workflow.md +2 -2
  209. package/template/.codex/skills/yss-filerunner/SKILL.md +1 -1
  210. package/template/.codex/skills/yss-openapi/SKILL.md +35 -47
  211. package/template/.codex/skills/yss-openapi/img.png +0 -0
  212. package/template/.codex/skills/yss-openapi/img_1.png +0 -0
  213. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +3 -3
  214. package/template/.codex/skills/yss-openapi-governance/SKILL.md +4 -4
  215. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +57 -34
  216. package/template/.codex/skills/yss-product-lifecycle/references/artifact-checklist.md +23 -21
  217. package/template/.codex/skills/yss-product-lifecycle/references/stage-routing.md +15 -15
  218. package/template/.codex/skills/yss-product-lifecycle/references/yss-skill-routing.md +13 -8
  219. package/template/.codex/skills/yss-repository/SKILL.md +11 -3
  220. package/template/.codex/skills/yss-router/SKILL.md +2 -3
  221. package/template/.codex/skills/yss-router/references/boundaries.md +0 -1
  222. package/template/.codex/skills/yss-source-index/references/source-map-config.md +0 -1
  223. package/template/.codex/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -3
  224. package/template/.codex/skills/yss-web-controller/SKILL.md +9 -3
  225. package/template/.hermes/skills/ask-matt/SKILL.md +8 -4
  226. package/template/.hermes/skills/ask-matt/agents/openai.yaml +5 -0
  227. package/template/.hermes/skills/code-review/SKILL.md +4 -4
  228. package/template/.hermes/skills/code-review/agents/openai.yaml +3 -0
  229. package/template/.hermes/skills/codebase-design/agents/openai.yaml +3 -0
  230. package/template/.hermes/skills/competitive-intelligence/SKILL.md +5 -5
  231. package/template/.hermes/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  232. package/template/.hermes/skills/domain-modeling/agents/openai.yaml +3 -0
  233. package/template/.hermes/skills/excalidraw-diagram-generator/SKILL.md +37 -16
  234. package/template/.hermes/skills/excalidraw-diagram-generator/scripts/add-arrow.py +18 -18
  235. package/template/.hermes/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +46 -47
  236. package/template/.hermes/skills/grill-me/SKILL.md +7 -0
  237. package/template/.hermes/skills/grill-me/agents/openai.yaml +5 -0
  238. package/template/.hermes/skills/grill-with-docs/agents/openai.yaml +5 -0
  239. package/template/.hermes/skills/grilling/SKILL.md +12 -0
  240. package/template/.hermes/skills/grilling/agents/openai.yaml +3 -0
  241. package/template/.hermes/skills/handoff/SKILL.md +16 -0
  242. package/template/.hermes/skills/handoff/agents/openai.yaml +5 -0
  243. package/template/.hermes/skills/implement/SKILL.md +2 -2
  244. package/template/.hermes/skills/implement/agents/openai.yaml +5 -0
  245. package/template/.hermes/skills/improve-codebase-architecture/SKILL.md +6 -1
  246. package/template/.hermes/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
  247. package/template/.hermes/skills/prototype/LOGIC.md +3 -3
  248. package/template/.hermes/skills/prototype/SKILL.md +2 -6
  249. package/template/.hermes/skills/prototype/UI.md +4 -4
  250. package/template/.hermes/skills/prototype/agents/openai.yaml +3 -0
  251. package/template/.hermes/skills/research/agents/openai.yaml +3 -0
  252. package/template/.hermes/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
  253. package/template/.hermes/skills/setup-matt-pocock-skills/SKILL.md +21 -32
  254. package/template/.hermes/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
  255. package/template/.hermes/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
  256. package/template/.hermes/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
  257. package/template/.hermes/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
  258. package/template/.hermes/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
  259. package/template/.hermes/skills/tdd/agents/openai.yaml +3 -0
  260. package/template/.hermes/skills/teach/GLOSSARY-FORMAT.md +35 -0
  261. package/template/.hermes/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  262. package/template/.hermes/skills/teach/MISSION-FORMAT.md +31 -0
  263. package/template/.hermes/skills/teach/RESOURCES-FORMAT.md +32 -0
  264. package/template/.hermes/skills/teach/SKILL.md +140 -0
  265. package/template/.hermes/skills/teach/agents/openai.yaml +5 -0
  266. package/template/.hermes/skills/to-spec/SKILL.md +58 -0
  267. package/template/.hermes/skills/to-spec/agents/openai.yaml +5 -0
  268. package/template/.hermes/skills/to-tickets/SKILL.md +62 -0
  269. package/template/.hermes/skills/to-tickets/agents/openai.yaml +5 -0
  270. package/template/.hermes/skills/triage/SKILL.md +4 -4
  271. package/template/.hermes/skills/triage/agents/openai.yaml +5 -0
  272. package/template/.hermes/skills/wayfinder/SKILL.md +128 -0
  273. package/template/.hermes/skills/wayfinder/agents/openai.yaml +5 -0
  274. package/template/.hermes/skills/web-design-engineer/SKILL.md +2 -2
  275. package/template/.hermes/skills/writing-great-skills/GLOSSARY.md +201 -0
  276. package/template/.hermes/skills/writing-great-skills/SKILL.md +83 -0
  277. package/template/.hermes/skills/writing-great-skills/agents/openai.yaml +5 -0
  278. package/template/.hermes/skills/yss-cache/SKILL.md +44 -0
  279. package/template/.hermes/skills/yss-cache/agents/openai.yaml +5 -0
  280. package/template/.hermes/skills/yss-cache/references/annotations.md +39 -0
  281. package/template/.hermes/skills/yss-cache/references/architecture.md +25 -0
  282. package/template/.hermes/skills/yss-cache/references/configuration.md +34 -0
  283. package/template/.hermes/skills/yss-cache/references/redis-fallback.md +23 -0
  284. package/template/.hermes/skills/yss-cache/references/redis-topology.md +62 -0
  285. package/template/.hermes/skills/yss-cache/references/serialization.md +17 -0
  286. package/template/.hermes/skills/yss-cache/references/source-index.md +64 -0
  287. package/template/.hermes/skills/yss-cache/references/troubleshooting.md +33 -0
  288. package/template/.hermes/skills/yss-cache/references/verification.md +34 -0
  289. package/template/.hermes/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
  290. package/template/.hermes/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
  291. package/template/.hermes/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
  292. package/template/.obsidian/app.json +3 -0
  293. package/template/.obsidian/appearance.json +5 -0
  294. package/template/.obsidian/community-plugins.json +4 -0
  295. package/template/.obsidian/core-plugins.json +33 -0
  296. package/template/.obsidian/graph.json +22 -0
  297. package/template/.obsidian/plugins/obsidian-excalidraw-plugin/data.json +1085 -0
  298. package/template/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +30 -0
  299. package/template/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
  300. package/template/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
  301. package/template/.obsidian/plugins/obsidian-git/main.js +415 -0
  302. package/template/.obsidian/plugins/obsidian-git/manifest.json +10 -0
  303. package/template/.obsidian/plugins/obsidian-git/styles.css +705 -0
  304. package/template/.obsidian/workspace.json +222 -0
  305. package/template/.pi/skills/ask-matt/SKILL.md +8 -4
  306. package/template/.pi/skills/ask-matt/agents/openai.yaml +5 -0
  307. package/template/.pi/skills/code-review/SKILL.md +4 -4
  308. package/template/.pi/skills/code-review/agents/openai.yaml +3 -0
  309. package/template/.pi/skills/codebase-design/agents/openai.yaml +3 -0
  310. package/template/.pi/skills/competitive-intelligence/SKILL.md +5 -5
  311. package/template/.pi/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  312. package/template/.pi/skills/domain-modeling/agents/openai.yaml +3 -0
  313. package/template/.pi/skills/excalidraw-diagram-generator/SKILL.md +37 -16
  314. package/template/.pi/skills/excalidraw-diagram-generator/scripts/add-arrow.py +18 -18
  315. package/template/.pi/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +46 -47
  316. package/template/.pi/skills/grill-me/SKILL.md +7 -0
  317. package/template/.pi/skills/grill-me/agents/openai.yaml +5 -0
  318. package/template/.pi/skills/grill-with-docs/agents/openai.yaml +5 -0
  319. package/template/.pi/skills/grilling/SKILL.md +12 -0
  320. package/template/.pi/skills/grilling/agents/openai.yaml +3 -0
  321. package/template/.pi/skills/handoff/SKILL.md +16 -0
  322. package/template/.pi/skills/handoff/agents/openai.yaml +5 -0
  323. package/template/.pi/skills/implement/SKILL.md +2 -2
  324. package/template/.pi/skills/implement/agents/openai.yaml +5 -0
  325. package/template/.pi/skills/improve-codebase-architecture/SKILL.md +6 -1
  326. package/template/.pi/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
  327. package/template/.pi/skills/prototype/LOGIC.md +3 -3
  328. package/template/.pi/skills/prototype/SKILL.md +2 -6
  329. package/template/.pi/skills/prototype/UI.md +4 -4
  330. package/template/.pi/skills/prototype/agents/openai.yaml +3 -0
  331. package/template/.pi/skills/research/agents/openai.yaml +3 -0
  332. package/template/.pi/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
  333. package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +21 -32
  334. package/template/.pi/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
  335. package/template/.pi/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
  336. package/template/.pi/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
  337. package/template/.pi/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
  338. package/template/.pi/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
  339. package/template/.pi/skills/tdd/agents/openai.yaml +3 -0
  340. package/template/.pi/skills/teach/GLOSSARY-FORMAT.md +35 -0
  341. package/template/.pi/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  342. package/template/.pi/skills/teach/MISSION-FORMAT.md +31 -0
  343. package/template/.pi/skills/teach/RESOURCES-FORMAT.md +32 -0
  344. package/template/.pi/skills/teach/SKILL.md +140 -0
  345. package/template/.pi/skills/teach/agents/openai.yaml +5 -0
  346. package/template/.pi/skills/to-spec/SKILL.md +58 -0
  347. package/template/.pi/skills/to-spec/agents/openai.yaml +5 -0
  348. package/template/.pi/skills/to-tickets/SKILL.md +62 -0
  349. package/template/.pi/skills/to-tickets/agents/openai.yaml +5 -0
  350. package/template/.pi/skills/triage/SKILL.md +4 -4
  351. package/template/.pi/skills/triage/agents/openai.yaml +5 -0
  352. package/template/.pi/skills/wayfinder/SKILL.md +128 -0
  353. package/template/.pi/skills/wayfinder/agents/openai.yaml +5 -0
  354. package/template/.pi/skills/web-design-engineer/SKILL.md +2 -2
  355. package/template/.pi/skills/writing-great-skills/GLOSSARY.md +201 -0
  356. package/template/.pi/skills/writing-great-skills/SKILL.md +83 -0
  357. package/template/.pi/skills/writing-great-skills/agents/openai.yaml +5 -0
  358. package/template/.pi/skills/yss-cache/SKILL.md +44 -0
  359. package/template/.pi/skills/yss-cache/agents/openai.yaml +5 -0
  360. package/template/.pi/skills/yss-cache/references/annotations.md +39 -0
  361. package/template/.pi/skills/yss-cache/references/architecture.md +25 -0
  362. package/template/.pi/skills/yss-cache/references/configuration.md +34 -0
  363. package/template/.pi/skills/yss-cache/references/redis-fallback.md +23 -0
  364. package/template/.pi/skills/yss-cache/references/redis-topology.md +62 -0
  365. package/template/.pi/skills/yss-cache/references/serialization.md +17 -0
  366. package/template/.pi/skills/yss-cache/references/source-index.md +64 -0
  367. package/template/.pi/skills/yss-cache/references/troubleshooting.md +33 -0
  368. package/template/.pi/skills/yss-cache/references/verification.md +34 -0
  369. package/template/.pi/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
  370. package/template/.pi/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
  371. package/template/.pi/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
  372. package/template/.trae/skills/ask-matt/SKILL.md +8 -4
  373. package/template/.trae/skills/ask-matt/agents/openai.yaml +5 -0
  374. package/template/.trae/skills/code-review/SKILL.md +4 -4
  375. package/template/.trae/skills/code-review/agents/openai.yaml +3 -0
  376. package/template/.trae/skills/codebase-design/agents/openai.yaml +3 -0
  377. package/template/.trae/skills/competitive-intelligence/SKILL.md +5 -5
  378. package/template/.trae/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  379. package/template/.trae/skills/domain-modeling/agents/openai.yaml +3 -0
  380. package/template/.trae/skills/excalidraw-diagram-generator/SKILL.md +37 -16
  381. package/template/.trae/skills/excalidraw-diagram-generator/scripts/add-arrow.py +18 -18
  382. package/template/.trae/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +46 -47
  383. package/template/.trae/skills/grill-me/SKILL.md +7 -0
  384. package/template/.trae/skills/grill-me/agents/openai.yaml +5 -0
  385. package/template/.trae/skills/grill-with-docs/agents/openai.yaml +5 -0
  386. package/template/.trae/skills/grilling/SKILL.md +12 -0
  387. package/template/.trae/skills/grilling/agents/openai.yaml +3 -0
  388. package/template/.trae/skills/handoff/SKILL.md +16 -0
  389. package/template/.trae/skills/handoff/agents/openai.yaml +5 -0
  390. package/template/.trae/skills/implement/SKILL.md +2 -2
  391. package/template/.trae/skills/implement/agents/openai.yaml +5 -0
  392. package/template/.trae/skills/improve-codebase-architecture/SKILL.md +6 -1
  393. package/template/.trae/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
  394. package/template/.trae/skills/prototype/LOGIC.md +3 -3
  395. package/template/.trae/skills/prototype/SKILL.md +2 -6
  396. package/template/.trae/skills/prototype/UI.md +4 -4
  397. package/template/.trae/skills/prototype/agents/openai.yaml +3 -0
  398. package/template/.trae/skills/research/agents/openai.yaml +3 -0
  399. package/template/.trae/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
  400. package/template/.trae/skills/setup-matt-pocock-skills/SKILL.md +21 -32
  401. package/template/.trae/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
  402. package/template/.trae/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
  403. package/template/.trae/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
  404. package/template/.trae/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
  405. package/template/.trae/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
  406. package/template/.trae/skills/tdd/agents/openai.yaml +3 -0
  407. package/template/.trae/skills/teach/GLOSSARY-FORMAT.md +35 -0
  408. package/template/.trae/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  409. package/template/.trae/skills/teach/MISSION-FORMAT.md +31 -0
  410. package/template/.trae/skills/teach/RESOURCES-FORMAT.md +32 -0
  411. package/template/.trae/skills/teach/SKILL.md +140 -0
  412. package/template/.trae/skills/teach/agents/openai.yaml +5 -0
  413. package/template/.trae/skills/to-spec/SKILL.md +58 -0
  414. package/template/.trae/skills/to-spec/agents/openai.yaml +5 -0
  415. package/template/.trae/skills/to-tickets/SKILL.md +62 -0
  416. package/template/.trae/skills/to-tickets/agents/openai.yaml +5 -0
  417. package/template/.trae/skills/triage/SKILL.md +4 -4
  418. package/template/.trae/skills/triage/agents/openai.yaml +5 -0
  419. package/template/.trae/skills/wayfinder/SKILL.md +128 -0
  420. package/template/.trae/skills/wayfinder/agents/openai.yaml +5 -0
  421. package/template/.trae/skills/web-design-engineer/SKILL.md +2 -2
  422. package/template/.trae/skills/writing-great-skills/GLOSSARY.md +201 -0
  423. package/template/.trae/skills/writing-great-skills/SKILL.md +83 -0
  424. package/template/.trae/skills/writing-great-skills/agents/openai.yaml +5 -0
  425. package/template/.trae/skills/yss-cache/SKILL.md +44 -0
  426. package/template/.trae/skills/yss-cache/agents/openai.yaml +5 -0
  427. package/template/.trae/skills/yss-cache/references/annotations.md +39 -0
  428. package/template/.trae/skills/yss-cache/references/architecture.md +25 -0
  429. package/template/.trae/skills/yss-cache/references/configuration.md +34 -0
  430. package/template/.trae/skills/yss-cache/references/redis-fallback.md +23 -0
  431. package/template/.trae/skills/yss-cache/references/redis-topology.md +62 -0
  432. package/template/.trae/skills/yss-cache/references/serialization.md +17 -0
  433. package/template/.trae/skills/yss-cache/references/source-index.md +64 -0
  434. package/template/.trae/skills/yss-cache/references/troubleshooting.md +33 -0
  435. package/template/.trae/skills/yss-cache/references/verification.md +34 -0
  436. package/template/.trae/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
  437. package/template/.trae/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
  438. package/template/.trae/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
  439. package/template/AGENTS.md +89 -250
  440. package/template/CONTEXT.md +24 -11
  441. package/template/README.md +31 -45
  442. package/template/docs/adr/{adr-product-design-prototype-entrypoint.md → 0001-product-design-prototype-entrypoint.md} +3 -3
  443. package/template/docs/adr/0002-yss-project-repository-mode.md +3 -0
  444. package/template/docs/agents/README.md +4 -5
  445. package/template/docs/agents/domain.md +13 -15
  446. package/template/docs/agents/gitlab-workflow-skills.md +5 -5
  447. package/template/docs/agents/issue-tracker.md +15 -14
  448. package/template/docs/agents/skills-maintenance.md +44 -109
  449. package/template/docs/agents/triage-labels.md +10 -12
  450. package/template/docs/api/templates/openapi-draft-review-checklist.md +4 -4
  451. package/template/docs/api/templates/openapi-freeze-record-template.md +5 -5
  452. package/template/docs/architecture/README.md +4 -4
  453. package/template/docs/architecture/templates/architecture-review-checklist.md +4 -4
  454. package/template/docs/architecture/templates/business-architecture-template.md +7 -7
  455. package/template/docs/architecture/templates/data-architecture-template.md +4 -4
  456. package/template/docs/architecture/templates/engineering-baseline-review-template.md +4 -3
  457. package/template/docs/architecture/templates/functional-architecture-template.md +7 -7
  458. package/template/docs/architecture/templates/system-overview-design-template.md +5 -6
  459. package/template/docs/architecture/templates/tech-design-template.md +2 -2
  460. package/template/docs/design/README.md +8 -8
  461. package/template/docs/design/design.md +10 -1
  462. package/template/docs/design/diagrams/README.md +1 -1
  463. package/template/docs/design/templates/interaction-spec-template.md +6 -6
  464. package/template/docs/design/templates/product-overview-design-template.md +8 -8
  465. package/template/docs/design/templates/prototype-confirmation-template.md +4 -4
  466. package/template/docs/design/templates/prototype-review-checklist.md +5 -5
  467. package/template/docs/design/templates/state-matrix-template.md +1 -1
  468. package/template/docs/discovery/IDEATION.md +2 -2
  469. package/template/docs/discovery/README.md +4 -4
  470. package/template/docs/discovery/templates/competitive-analysis-template.md +4 -4
  471. package/template/docs/discovery/templates/discovery-template.md +8 -8
  472. package/template/docs/implementation/create-yss-spec-repository-mode-contract.md +59 -0
  473. package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +49 -30
  474. package/template/docs/process/harness-automation-candidates.md +10 -13
  475. package/template/docs/process/harness-executive-blueprint.md +11 -11
  476. package/template/docs/process/harness-optimization-backlog.md +6 -6
  477. package/template/docs/process/harness-pilot-retro-metrics.md +8 -8
  478. package/template/docs/process/harness-pilot-selection.md +8 -8
  479. package/template/docs/process/harness-process-tailoring.md +35 -16
  480. package/template/docs/process/harness-work-unit-map.md +9 -9
  481. package/template/docs/process/implementation-repo-integration.md +25 -11
  482. package/template/docs/process/lifecycle-artifact-map.md +66 -40
  483. package/template/docs/process/product-prototype-workflow.md +10 -10
  484. package/template/docs/process/skill-governance.md +12 -4
  485. package/template/docs/process/subagent-collaboration-validation.md +53 -0
  486. package/template/docs/process/subagent-collaboration.md +111 -0
  487. package/template/docs/process/template-governance-grilling-record.md +38 -0
  488. package/template/docs/process/template-governance-skill-validation.md +44 -0
  489. package/template/docs/process/templates/stage-checkpoint-template.md +42 -7
  490. package/template/docs/releases/next-major-template-governance.md +32 -0
  491. package/template/docs/requirements/README.md +11 -11
  492. package/template/docs/{adr/template.md → templates/adr-template.md} +2 -2
  493. package/template/docs/templates/agent-brief-template.md +5 -5
  494. package/template/docs/templates/build-architecture-checklist-template.md +41 -11
  495. package/template/docs/templates/implementation-repo-registry-template.md +8 -3
  496. package/template/docs/templates/implementation-routing-template.md +85 -19
  497. package/template/docs/templates/requirement-freeze-template.md +8 -8
  498. package/template/docs/templates/review-report-template.md +50 -0
  499. package/template/docs/templates/spec-delta-template.md +5 -5
  500. package/template/docs/templates/{prd-template.md → spec-template.md} +19 -9
  501. package/template/docs/templates/subagent-task-package-template.md +93 -0
  502. package/template/docs/templates/verification-record-template.md +2 -2
  503. package/template/docs/templates/vertical-slice-ticket-template.md +88 -0
  504. package/template/docs/user-guide/README.md +2 -2
  505. package/template/docs/user-guide/create-yss-spec-cli-guide.md +27 -209
  506. package/template/docs/user-guide/excalidraw-diagram-generator-guide.md +8 -8
  507. package/template/docs/user-guide/grill-with-docs-best-practices.md +16 -16
  508. package/template/docs/user-guide/grill-with-docs-guide.md +19 -19
  509. package/template/docs/user-guide/lifecycle-best-practices.md +40 -40
  510. package/template/docs/user-guide/product-lifecycle-workflow.md +31 -31
  511. package/template/docs/user-guide/product-rd-lifecycle-best-practices.md +121 -121
  512. package/template/docs/user-guide/spec-ticket-migration-guide.md +35 -0
  513. package/template/scripts/sync-skills +126 -0
  514. package/template/scripts/update-skill-lock +202 -0
  515. package/template/scripts/verify-lifecycle-scenarios +136 -0
  516. package/template/scripts/verify-template +148 -155
  517. package/template/skills-lock.json +1068 -65
  518. package/template/yss-project.yaml +2 -0
  519. package/template.manifest.json +3 -16
  520. package/template/.agent/skills/ask-matt/SKILL.md +0 -74
  521. package/template/.agent/skills/code-review/SKILL.md +0 -89
  522. package/template/.agent/skills/codebase-design/DEEPENING.md +0 -37
  523. package/template/.agent/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
  524. package/template/.agent/skills/codebase-design/SKILL.md +0 -114
  525. package/template/.agent/skills/competitive-intelligence/SKILL.md +0 -94
  526. package/template/.agent/skills/diagnosing-bugs/SKILL.md +0 -134
  527. package/template/.agent/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -41
  528. package/template/.agent/skills/domain-modeling/ADR-FORMAT.md +0 -47
  529. package/template/.agent/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
  530. package/template/.agent/skills/domain-modeling/SKILL.md +0 -74
  531. package/template/.agent/skills/grill-with-docs/SKILL.md +0 -7
  532. package/template/.agent/skills/implement/SKILL.md +0 -15
  533. package/template/.agent/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
  534. package/template/.agent/skills/improve-codebase-architecture/SKILL.md +0 -66
  535. package/template/.agent/skills/prototype/LOGIC.md +0 -79
  536. package/template/.agent/skills/prototype/SKILL.md +0 -30
  537. package/template/.agent/skills/prototype/UI.md +0 -112
  538. package/template/.agent/skills/research/SKILL.md +0 -12
  539. package/template/.agent/skills/resolving-merge-conflicts/SKILL.md +0 -14
  540. package/template/.agent/skills/setup-matt-pocock-skills/SKILL.md +0 -127
  541. package/template/.agent/skills/setup-matt-pocock-skills/domain.md +0 -51
  542. package/template/.agent/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
  543. package/template/.agent/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
  544. package/template/.agent/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
  545. package/template/.agent/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
  546. package/template/.agent/skills/tdd/SKILL.md +0 -36
  547. package/template/.agent/skills/tdd/mocking.md +0 -59
  548. package/template/.agent/skills/tdd/tests.md +0 -77
  549. package/template/.agent/skills/to-issues/SKILL.md +0 -84
  550. package/template/.agent/skills/to-prd/SKILL.md +0 -75
  551. package/template/.agent/skills/triage/AGENT-BRIEF.md +0 -207
  552. package/template/.agent/skills/triage/OUT-OF-SCOPE.md +0 -105
  553. package/template/.agent/skills/triage/SKILL.md +0 -112
  554. package/template/.agents/skills/to-issues/SKILL.md +0 -84
  555. package/template/.agents/skills/to-prd/SKILL.md +0 -75
  556. package/template/.claude/skills/to-issues/SKILL.md +0 -84
  557. package/template/.claude/skills/to-prd/SKILL.md +0 -75
  558. package/template/.codex/skills/to-issues/SKILL.md +0 -84
  559. package/template/.codex/skills/to-prd/SKILL.md +0 -75
  560. package/template/.codex/skills/yss-anti-scheduler/SKILL.md +0 -53
  561. package/template/.codex/skills/yss-anti-scheduler/agents/openai.yaml +0 -4
  562. package/template/.codex/skills/yss-anti-scheduler/references/source-index.md +0 -157
  563. package/template/.codex/skills/yss-cache/assets/ClearCache.java +0 -34
  564. package/template/.codex/skills/yss-cache/assets/QueryCache.java +0 -36
  565. package/template/.codex/skills/yss-cache/assets/UpdateCache.java +0 -34
  566. package/template/.codex/skills/yss-cache/references/README.md +0 -5
  567. package/template/.hermes/skills/to-issues/SKILL.md +0 -84
  568. package/template/.hermes/skills/to-prd/SKILL.md +0 -75
  569. package/template/.pi/skills/to-issues/SKILL.md +0 -84
  570. package/template/.pi/skills/to-prd/SKILL.md +0 -75
  571. package/template/.trae/skills/to-issues/SKILL.md +0 -84
  572. package/template/.trae/skills/to-prd/SKILL.md +0 -75
  573. package/template/docs/templates/vertical-slice-issue-template.md +0 -61
  574. /package/template/docs/requirements/{issues → tickets}/.gitkeep +0 -0
package/README.md CHANGED
@@ -27,6 +27,10 @@ npx create-yss-spec@latest
27
27
  - `sync` 子命令
28
28
  - 基于 `.yss-template.json` 的模板版本基线
29
29
  - 已有模板实例仓库的受管模板资产同步
30
+ - 初始化时将 `yss-project.yaml` 从 `template-source` 改写为 `project-instance`
31
+ - 升级时迁移 Spec / Ticket 路径并删除 `to-prd`、`to-issues` 旧 skill
32
+ - 旧、新资产内容冲突或清单 schema / mode 非法时 fail closed
33
+ - 保留模板的共享 skill 投影;生成实例可在尚未 `git init` 时运行模板校验
30
34
 
31
35
  ## 同步已有模板实例仓库
32
36
 
@@ -48,10 +52,14 @@ npx create-yss-spec@latest sync --dry-run
48
52
  - 默认只更新未被本地修改的受管模板文件
49
53
  - 对本地已修改文件只提示和跳过,不自动覆盖
50
54
  - 对模板已删除文件只报告,不自动删除
55
+ - 对已知的 Spec / Ticket 旧路径执行一次性迁移
56
+ - 迁移目标已存在且内容不一致时停止,不静默覆盖
51
57
 
52
58
  ## 开发验证
53
59
 
54
- 在仓库根目录执行:
60
+ CLI 源码和研发记录由本仓库独立维护。首次测试会从
61
+ [`iloveZzz/yss-spec-project-template`](https://github.com/iloveZzz/yss-spec-project-template)
62
+ 同步受管模板快照:
55
63
 
56
64
  ```bash
57
65
  npm test
@@ -60,6 +68,16 @@ npm test
60
68
  发布前可检查打包结果:
61
69
 
62
70
  ```bash
63
- cd packages/create-yss-spec
64
71
  npm pack --dry-run
65
72
  ```
73
+
74
+ ## 研发记录
75
+
76
+ - [初始化 CLI Discovery](docs/discovery/yss-spec-cli-init-discovery.md)
77
+ - [模板同步 Discovery](docs/discovery/yss-spec-cli-template-sync-discovery.md)
78
+ - [初始化 CLI PRD](docs/requirements/yss-spec-cli-init-prd.md)
79
+ - [模板同步 PRD](docs/requirements/yss-spec-cli-template-sync-prd.md)
80
+ - [垂直切片](docs/requirements/issues/)
81
+ - [`yss-project.yaml` 跨仓库实现记录](docs/implementation/yss-project-repository-mode-contract.md)
82
+ - [实施路由与 Build Architecture Checklist](docs/implementation/)
83
+ - [完整中文使用手册](docs/user-guide/create-yss-spec-cli-guide.md)
package/package.json CHANGED
@@ -1,7 +1,15 @@
1
1
  {
2
2
  "name": "create-yss-spec",
3
- "version": "1.1.3",
3
+ "version": "2.0.0",
4
4
  "description": "Initialize a YSS spec project template repository",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/iloveZzz/create-yss-spec.git"
8
+ },
9
+ "homepage": "https://github.com/iloveZzz/create-yss-spec#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/iloveZzz/create-yss-spec/issues"
12
+ },
5
13
  "files": [
6
14
  "bin",
7
15
  "src",
@@ -12,6 +20,9 @@
12
20
  "create-yss-spec": "./bin/create-yss-spec.js"
13
21
  },
14
22
  "scripts": {
15
- "prepack": "node ../../scripts/sync-cli-template.js"
23
+ "sync-template": "node scripts/sync-template.js",
24
+ "pretest": "npm run sync-template",
25
+ "test": "node --test tests/*.test.js",
26
+ "prepack": "npm run sync-template"
16
27
  }
17
28
  }
package/src/cli.js CHANGED
@@ -9,18 +9,9 @@ const PACKAGE_MANIFEST = JSON.parse(
9
9
  fs.readFileSync(path.join(PACKAGE_ROOT, "package.json"), "utf8"),
10
10
  );
11
11
  const BUNDLED_TEMPLATE_ROOT = path.join(PACKAGE_ROOT, "template");
12
- const REPO_TEMPLATE_ROOT = path.resolve(PACKAGE_ROOT, "../..");
13
- const REPO_MANIFEST_PATH = path.join(REPO_TEMPLATE_ROOT, "template.manifest.json");
14
12
  const BUNDLED_MANIFEST_PATH = path.join(PACKAGE_ROOT, "template.manifest.json");
15
- const IS_REPO_DEVELOPMENT =
16
- fs.existsSync(path.join(REPO_TEMPLATE_ROOT, "AGENTS.md")) &&
17
- fs.existsSync(REPO_MANIFEST_PATH);
18
- const TEMPLATE_ROOT = IS_REPO_DEVELOPMENT
19
- ? REPO_TEMPLATE_ROOT
20
- : BUNDLED_TEMPLATE_ROOT;
21
- const TEMPLATE_MANIFEST_PATH = IS_REPO_DEVELOPMENT
22
- ? REPO_MANIFEST_PATH
23
- : BUNDLED_MANIFEST_PATH;
13
+ const TEMPLATE_ROOT = BUNDLED_TEMPLATE_ROOT;
14
+ const TEMPLATE_MANIFEST_PATH = BUNDLED_MANIFEST_PATH;
24
15
  const TEMPLATE_MANIFEST_TEXT = fs.readFileSync(TEMPLATE_MANIFEST_PATH, "utf8");
25
16
  const TEMPLATE_MANIFEST = JSON.parse(TEMPLATE_MANIFEST_TEXT);
26
17
  const ROOT_EXCLUDED_ENTRIES = new Set(TEMPLATE_MANIFEST.excludeRootEntries);
@@ -29,60 +20,96 @@ const EXCLUDED_RELATIVE_PATHS = new Set(TEMPLATE_MANIFEST.excludePaths);
29
20
  const RENDERED_RELATIVE_PATHS = new Set(TEMPLATE_MANIFEST.renderPaths);
30
21
  const EXAMPLE_DOC_PATHS = new Set(TEMPLATE_MANIFEST.exampleDocPaths);
31
22
  const TEMPLATE_METADATA_FILENAME = ".yss-template.json";
23
+ const PROJECT_INSTANCE_MANIFEST =
24
+ "schema_version: 1\nrepository_mode: project-instance\n";
32
25
  const TEMPLATE_MANIFEST_VERSION = sha256(TEMPLATE_MANIFEST_TEXT);
33
- const REPO_TRACKED_STATE = IS_REPO_DEVELOPMENT
34
- ? loadRepoTrackedState(REPO_TEMPLATE_ROOT)
35
- : null;
26
+ const REPO_TRACKED_STATE = null;
36
27
 
37
28
  function sha256(value) {
38
29
  return crypto.createHash("sha256").update(value).digest("hex");
39
30
  }
40
31
 
41
- function nowIsoString() {
42
- return new Date().toISOString();
32
+ function symlinkHash(linkTarget) {
33
+ return sha256(`symlink:${linkTarget}`);
43
34
  }
44
35
 
45
- function getTemplateSource() {
46
- return IS_REPO_DEVELOPMENT
47
- ? "repo-development"
48
- : `npm:${PACKAGE_MANIFEST.name}@${PACKAGE_MANIFEST.version}`;
36
+ function managedPathHash(filePath) {
37
+ const stat = fs.lstatSync(filePath);
38
+ if (stat.isSymbolicLink()) {
39
+ return symlinkHash(fs.readlinkSync(filePath));
40
+ }
41
+ return sha256(fs.readFileSync(filePath));
49
42
  }
50
43
 
51
- function loadRepoTrackedState(repoRoot) {
52
- const result = spawnSync("git", ["ls-files"], {
53
- cwd: repoRoot,
54
- encoding: "utf8",
55
- });
56
-
57
- if (result.status !== 0) {
58
- return null;
44
+ function assertSafeTemplateSymlink(relativePath, linkTarget) {
45
+ const resolvedRelativeTarget = path.posix.normalize(
46
+ path.posix.join(path.posix.dirname(relativePath), linkTarget),
47
+ );
48
+ if (
49
+ path.isAbsolute(linkTarget) ||
50
+ resolvedRelativeTarget === ".." ||
51
+ resolvedRelativeTarget.startsWith("../")
52
+ ) {
53
+ throw new Error(`模板包含越界符号链接:${relativePath} -> ${linkTarget}`);
59
54
  }
55
+ }
60
56
 
61
- const files = new Set();
62
- const directories = new Set();
57
+ function nowIsoString() {
58
+ return new Date().toISOString();
59
+ }
63
60
 
64
- for (const entry of result.stdout.split(/\r?\n/)) {
65
- if (!entry) {
61
+ function parseProjectManifest(content, label) {
62
+ const values = {};
63
+ for (const rawLine of content.split(/\r?\n/)) {
64
+ const line = rawLine.trim();
65
+ if (!line || line.startsWith("#")) {
66
66
  continue;
67
67
  }
68
68
 
69
- const normalizedEntry = entry.split(path.sep).join("/");
70
- files.add(normalizedEntry);
69
+ const match = line.match(/^([a-z_]+):\s*([^\s#]+)\s*$/);
70
+ if (!match) {
71
+ throw new Error(`${label}包含无法识别的内容:${rawLine}`);
72
+ }
73
+ const [, key, value] = match;
74
+ if (key !== "schema_version" && key !== "repository_mode") {
75
+ throw new Error(`${label}包含未知字段:${key}`);
76
+ }
77
+ if (Object.hasOwn(values, key)) {
78
+ throw new Error(`${label}包含重复字段:${key}`);
79
+ }
80
+ values[key] = value;
81
+ }
82
+
83
+ return values;
84
+ }
71
85
 
72
- const segments = normalizedEntry.split("/");
73
- segments.pop();
86
+ function readBundledProjectManifest() {
87
+ const manifestPath = path.join(TEMPLATE_ROOT, "yss-project.yaml");
88
+ if (!fs.existsSync(manifestPath)) {
89
+ throw new Error("模板缺少 yss-project.yaml");
90
+ }
74
91
 
75
- let current = "";
76
- for (const segment of segments) {
77
- current = current ? `${current}/${segment}` : segment;
78
- directories.add(current);
79
- }
92
+ const values = parseProjectManifest(
93
+ fs.readFileSync(manifestPath, "utf8"),
94
+ "模板 yss-project.yaml ",
95
+ );
96
+
97
+ if (values.schema_version !== "1") {
98
+ throw new Error(
99
+ `不支持的 yss-project.yaml schema_version:${values.schema_version || "缺失"}`,
100
+ );
101
+ }
102
+ if (values.repository_mode !== "template-source") {
103
+ throw new Error(
104
+ `模板 yss-project.yaml 的 repository_mode 必须为 template-source,实际为 ${values.repository_mode || "缺失"}`,
105
+ );
80
106
  }
81
107
 
82
- return {
83
- files,
84
- directories,
85
- };
108
+ return values;
109
+ }
110
+
111
+ function getTemplateSource() {
112
+ return `npm:${PACKAGE_MANIFEST.name}@${PACKAGE_MANIFEST.version}`;
86
113
  }
87
114
 
88
115
  function parseArgs(argv) {
@@ -256,6 +283,10 @@ function shouldSkipRepoDevelopmentPath(relativePath, isDirectory) {
256
283
  }
257
284
 
258
285
  function renderTemplateFile(relativePath, content, variables) {
286
+ if (relativePath === "yss-project.yaml") {
287
+ return PROJECT_INSTANCE_MANIFEST;
288
+ }
289
+
259
290
  if (relativePath === "AGENTS.md") {
260
291
  return content
261
292
  .replace(/(\*\*项目名称:\*\*\s*)\[填写\]/, `$1${variables.projectName}`)
@@ -282,13 +313,17 @@ function collectManagedFileHashes(operations) {
282
313
  const managedFiles = {};
283
314
 
284
315
  for (const operation of operations) {
285
- if (operation.type !== "copy" && operation.type !== "render") {
316
+ if (
317
+ operation.type !== "copy" &&
318
+ operation.type !== "render" &&
319
+ operation.type !== "symlink"
320
+ ) {
286
321
  continue;
287
322
  }
288
323
 
289
324
  managedFiles[operation.relativePath] = {
290
325
  type: operation.type,
291
- contentHash: sha256(fs.readFileSync(operation.targetPath)),
326
+ contentHash: managedPathHash(operation.targetPath),
292
327
  };
293
328
  }
294
329
 
@@ -361,6 +396,19 @@ function buildCopyPlan(sourceDir, targetDir, variables, relativeDir = "") {
361
396
  continue;
362
397
  }
363
398
 
399
+ if (entry.isSymbolicLink()) {
400
+ const linkTarget = fs.readlinkSync(sourcePath);
401
+ assertSafeTemplateSymlink(relativePath, linkTarget);
402
+ operations.push({
403
+ type: "symlink",
404
+ relativePath,
405
+ sourcePath,
406
+ targetPath,
407
+ linkTarget,
408
+ });
409
+ continue;
410
+ }
411
+
364
412
  if (!entry.isFile()) {
365
413
  continue;
366
414
  }
@@ -451,6 +499,13 @@ function executePlan(operations, variables) {
451
499
  continue;
452
500
  }
453
501
 
502
+ if (operation.type === "symlink") {
503
+ fs.mkdirSync(path.dirname(operation.targetPath), { recursive: true });
504
+ fs.rmSync(operation.targetPath, { recursive: true, force: true });
505
+ fs.symlinkSync(operation.linkTarget, operation.targetPath);
506
+ continue;
507
+ }
508
+
454
509
  fs.mkdirSync(path.dirname(operation.targetPath), { recursive: true });
455
510
  fs.copyFileSync(operation.sourcePath, operation.targetPath);
456
511
  }
@@ -482,6 +537,241 @@ function loadTemplateMetadata(targetDir) {
482
537
  };
483
538
  }
484
539
 
540
+ function assertSupportedTargetRepositoryMode(targetDir) {
541
+ const manifestPath = path.join(targetDir, "yss-project.yaml");
542
+ if (!fs.existsSync(manifestPath)) {
543
+ return;
544
+ }
545
+
546
+ const content = fs.readFileSync(manifestPath, "utf8");
547
+ const values = parseProjectManifest(content, "目标 yss-project.yaml ");
548
+ if (values.schema_version !== "1") {
549
+ throw new Error(
550
+ `不支持的目标 yss-project.yaml schema_version:${values.schema_version || "缺失"}`,
551
+ );
552
+ }
553
+
554
+ const repositoryMode = values.repository_mode;
555
+ if (
556
+ repositoryMode !== "template-source" &&
557
+ repositoryMode !== "project-instance"
558
+ ) {
559
+ throw new Error(
560
+ `不支持的目标 yss-project.yaml repository_mode:${repositoryMode || "缺失"}`,
561
+ );
562
+ }
563
+ }
564
+
565
+ function collectFilesRecursively(rootDir, relativeDir = "") {
566
+ if (!fs.existsSync(rootDir)) {
567
+ return [];
568
+ }
569
+
570
+ const files = [];
571
+ for (const entry of fs.readdirSync(rootDir, { withFileTypes: true })) {
572
+ const relativePath = relativeDir
573
+ ? path.posix.join(relativeDir, entry.name)
574
+ : entry.name;
575
+ const absolutePath = path.join(rootDir, entry.name);
576
+ if (entry.isDirectory()) {
577
+ files.push(...collectFilesRecursively(absolutePath, relativePath));
578
+ } else if (entry.isFile()) {
579
+ files.push(relativePath);
580
+ }
581
+ }
582
+ return files;
583
+ }
584
+
585
+ function buildLegacyMigrationPlan(targetDir) {
586
+ const moves = [];
587
+ const removeFiles = [];
588
+ const removeDirectories = [];
589
+ const conflicts = [];
590
+ const targetManifestPath = path.join(targetDir, "yss-project.yaml");
591
+ const rewriteProjectManifest =
592
+ fs.existsSync(targetManifestPath) &&
593
+ fs.readFileSync(targetManifestPath, "utf8") !== PROJECT_INSTANCE_MANIFEST;
594
+ const addMove = (legacyPath, nextPath) => {
595
+ const sourcePath = path.join(targetDir, legacyPath);
596
+ const targetPath = path.join(targetDir, nextPath);
597
+ if (!fs.existsSync(sourcePath)) {
598
+ return;
599
+ }
600
+ if (!fs.existsSync(targetPath)) {
601
+ moves.push({ legacyPath, nextPath, sourcePath, targetPath });
602
+ return;
603
+ }
604
+
605
+ const sourceHash = sha256(fs.readFileSync(sourcePath));
606
+ const targetHash = sha256(fs.readFileSync(targetPath));
607
+ if (sourceHash === targetHash) {
608
+ removeFiles.push({ legacyPath, sourcePath });
609
+ } else {
610
+ conflicts.push({ legacyPath, nextPath });
611
+ }
612
+ };
613
+
614
+ addMove(
615
+ "docs/templates/prd-template.md",
616
+ "docs/templates/spec-template.md",
617
+ );
618
+ addMove(
619
+ "docs/templates/vertical-slice-issue-template.md",
620
+ "docs/templates/vertical-slice-ticket-template.md",
621
+ );
622
+
623
+ const legacyIssuesDir = path.join(targetDir, "docs/requirements/issues");
624
+ for (const relativePath of collectFilesRecursively(legacyIssuesDir)) {
625
+ addMove(
626
+ path.posix.join("docs/requirements/issues", relativePath),
627
+ path.posix.join("docs/requirements/tickets", relativePath),
628
+ );
629
+ }
630
+ if (fs.existsSync(legacyIssuesDir)) {
631
+ removeDirectories.push("docs/requirements/issues");
632
+ }
633
+
634
+ const requirementsDir = path.join(targetDir, "docs/requirements");
635
+ if (fs.existsSync(requirementsDir)) {
636
+ for (const entry of fs.readdirSync(requirementsDir, { withFileTypes: true })) {
637
+ if (entry.isFile() && entry.name.endsWith("-prd.md")) {
638
+ addMove(
639
+ path.posix.join("docs/requirements", entry.name),
640
+ path.posix.join(
641
+ "docs/requirements",
642
+ entry.name.replace(/-prd\.md$/, "-spec.md"),
643
+ ),
644
+ );
645
+ }
646
+ }
647
+ }
648
+
649
+ for (const agentRoot of [
650
+ ".agents",
651
+ ".claude",
652
+ ".codex",
653
+ ".hermes",
654
+ ".pi",
655
+ ".trae",
656
+ ".codebuddy",
657
+ ".qoder",
658
+ ".qwen",
659
+ ]) {
660
+ for (const skillName of ["to-prd", "to-issues"]) {
661
+ const relativePath = `${agentRoot}/skills/${skillName}`;
662
+ if (fs.existsSync(path.join(targetDir, relativePath))) {
663
+ removeDirectories.push(relativePath);
664
+ }
665
+ }
666
+ }
667
+
668
+ return {
669
+ moves,
670
+ removeFiles,
671
+ removeDirectories,
672
+ conflicts,
673
+ rewriteProjectManifest,
674
+ };
675
+ }
676
+
677
+ function assertNoLegacyMigrationConflicts(migrationPlan) {
678
+ if (migrationPlan.conflicts.length === 0) {
679
+ return;
680
+ }
681
+
682
+ const details = migrationPlan.conflicts
683
+ .map(
684
+ ({ legacyPath, nextPath }) =>
685
+ `- ${legacyPath} -> ${nextPath}`,
686
+ )
687
+ .join("\n");
688
+ throw new Error(`检测到旧、新资产内容冲突,未执行任何写入:\n${details}`);
689
+ }
690
+
691
+ function updateManagedFilesForMigration(metadata, migrationPlan) {
692
+ const managedFiles = metadata.managedFiles || {};
693
+ for (const operation of migrationPlan.moves) {
694
+ if (managedFiles[operation.legacyPath] && !managedFiles[operation.nextPath]) {
695
+ managedFiles[operation.nextPath] = managedFiles[operation.legacyPath];
696
+ }
697
+ delete managedFiles[operation.legacyPath];
698
+ }
699
+ for (const operation of migrationPlan.removeFiles) {
700
+ delete managedFiles[operation.legacyPath];
701
+ }
702
+
703
+ for (const relativeDir of migrationPlan.removeDirectories) {
704
+ for (const relativePath of Object.keys(managedFiles)) {
705
+ if (
706
+ relativePath === relativeDir ||
707
+ relativePath.startsWith(`${relativeDir}/`)
708
+ ) {
709
+ delete managedFiles[relativePath];
710
+ }
711
+ }
712
+ }
713
+ if (migrationPlan.rewriteProjectManifest) {
714
+ managedFiles["yss-project.yaml"] = {
715
+ type: "render",
716
+ contentHash: sha256(PROJECT_INSTANCE_MANIFEST),
717
+ };
718
+ }
719
+ metadata.managedFiles = managedFiles;
720
+ }
721
+
722
+ function applyLegacyMigration(targetDir, metadata, migrationPlan) {
723
+ for (const operation of migrationPlan.moves) {
724
+ fs.mkdirSync(path.dirname(operation.targetPath), { recursive: true });
725
+ fs.renameSync(operation.sourcePath, operation.targetPath);
726
+ }
727
+
728
+ for (const operation of migrationPlan.removeFiles) {
729
+ fs.rmSync(operation.sourcePath, { force: true });
730
+ }
731
+
732
+ for (const relativeDir of migrationPlan.removeDirectories) {
733
+ fs.rmSync(path.join(targetDir, relativeDir), {
734
+ recursive: true,
735
+ force: true,
736
+ });
737
+ }
738
+
739
+ if (migrationPlan.rewriteProjectManifest) {
740
+ fs.writeFileSync(
741
+ path.join(targetDir, "yss-project.yaml"),
742
+ PROJECT_INSTANCE_MANIFEST,
743
+ "utf8",
744
+ );
745
+ }
746
+
747
+ updateManagedFilesForMigration(metadata, migrationPlan);
748
+ }
749
+
750
+ function printLegacyMigration(migrationPlan, dryRun) {
751
+ if (
752
+ migrationPlan.moves.length === 0 &&
753
+ migrationPlan.removeFiles.length === 0 &&
754
+ migrationPlan.removeDirectories.length === 0 &&
755
+ !migrationPlan.rewriteProjectManifest
756
+ ) {
757
+ return;
758
+ }
759
+
760
+ console.log(dryRun ? "旧版迁移 dry-run 预览" : "旧版迁移完成");
761
+ for (const operation of migrationPlan.moves) {
762
+ console.log(`migrate: ${operation.legacyPath} -> ${operation.nextPath}`);
763
+ }
764
+ for (const operation of migrationPlan.removeFiles) {
765
+ console.log(`remove-duplicate: ${operation.legacyPath}`);
766
+ }
767
+ for (const relativeDir of migrationPlan.removeDirectories) {
768
+ console.log(`remove-obsolete: ${relativeDir}`);
769
+ }
770
+ if (migrationPlan.rewriteProjectManifest) {
771
+ console.log("rewrite: yss-project.yaml -> project-instance");
772
+ }
773
+ }
774
+
485
775
  function buildSyncVariables(metadata) {
486
776
  const variables = metadata.variables || {};
487
777
 
@@ -501,7 +791,10 @@ function buildDesiredManagedOperations(targetDir, metadata) {
501
791
  const variables = buildSyncVariables(metadata);
502
792
 
503
793
  return buildCopyPlan(TEMPLATE_ROOT, targetDir, variables).filter(
504
- (operation) => operation.type === "copy" || operation.type === "render",
794
+ (operation) =>
795
+ operation.type === "copy" ||
796
+ operation.type === "render" ||
797
+ operation.type === "symlink",
505
798
  );
506
799
  }
507
800
 
@@ -522,6 +815,14 @@ function buildDesiredManagedFile(operation, metadata) {
522
815
  };
523
816
  }
524
817
 
818
+
819
+ if (operation.type === "symlink") {
820
+ return {
821
+ ...operation,
822
+ desiredHash: symlinkHash(operation.linkTarget),
823
+ };
824
+ }
825
+
525
826
  return {
526
827
  ...operation,
527
828
  desiredHash: sha256(fs.readFileSync(operation.sourcePath)),
@@ -552,7 +853,7 @@ function classifySyncPlan(targetDir, metadata) {
552
853
  continue;
553
854
  }
554
855
 
555
- const currentHash = sha256(fs.readFileSync(operation.targetPath));
856
+ const currentHash = managedPathHash(operation.targetPath);
556
857
  if (currentHash === operation.desiredHash) {
557
858
  unchanged.push(operation);
558
859
  } else {
@@ -569,7 +870,7 @@ function classifySyncPlan(targetDir, metadata) {
569
870
  continue;
570
871
  }
571
872
 
572
- const currentHash = sha256(fs.readFileSync(operation.targetPath));
873
+ const currentHash = managedPathHash(operation.targetPath);
573
874
  if (currentHash !== existingRecord.contentHash) {
574
875
  skipped.push({
575
876
  ...operation,
@@ -632,6 +933,12 @@ function applyManagedFileOperation(operation) {
632
933
  return;
633
934
  }
634
935
 
936
+ if (operation.type === "symlink") {
937
+ fs.rmSync(operation.targetPath, { recursive: true, force: true });
938
+ fs.symlinkSync(operation.linkTarget, operation.targetPath);
939
+ return;
940
+ }
941
+
635
942
  fs.copyFileSync(operation.sourcePath, operation.targetPath);
636
943
  }
637
944
 
@@ -653,7 +960,7 @@ function syncTemplateInstance(targetDir, metadata, dryRun) {
653
960
  continue;
654
961
  }
655
962
 
656
- const currentHash = sha256(fs.readFileSync(operation.targetPath));
963
+ const currentHash = managedPathHash(operation.targetPath);
657
964
  if (currentHash !== operation.desiredHash) {
658
965
  continue;
659
966
  }
@@ -706,6 +1013,7 @@ function syncTemplateInstance(targetDir, metadata, dryRun) {
706
1013
  }
707
1014
 
708
1015
  async function runInit(argv = []) {
1016
+ readBundledProjectManifest();
709
1017
  const promptedOptions = await promptForMissingOptions(parseArgs(argv));
710
1018
  assertRequiredOptions(promptedOptions);
711
1019
 
@@ -743,9 +1051,17 @@ async function runInit(argv = []) {
743
1051
  }
744
1052
 
745
1053
  function runSync(argv = []) {
1054
+ readBundledProjectManifest();
746
1055
  const options = parseArgs(argv);
747
1056
  const targetDir = normalizeTargetDir(options.targetDir || ".");
748
1057
  const { metadata } = loadTemplateMetadata(targetDir);
1058
+ assertSupportedTargetRepositoryMode(targetDir);
1059
+ const migrationPlan = buildLegacyMigrationPlan(targetDir);
1060
+ assertNoLegacyMigrationConflicts(migrationPlan);
1061
+ if (!options.dryRun) {
1062
+ applyLegacyMigration(targetDir, metadata, migrationPlan);
1063
+ }
1064
+ printLegacyMigration(migrationPlan, Boolean(options.dryRun));
749
1065
  syncTemplateInstance(targetDir, metadata, Boolean(options.dryRun));
750
1066
  }
751
1067
 
@@ -20,16 +20,16 @@ The route most work travels. You have an idea and want it built.
20
20
  - **`/prototype`** to answer the question with throwaway code,
21
21
  - **`/handoff`** back what you learned, and reference it from the original idea thread.
22
22
  3. **Branch — is this a multi-session build?**
23
- - **Yes** → **`/to-prd`** (turn the thread into a PRD) → **`/to-issues`** (split the PRD into independently-grabbable issues). Because the issues are independent, **clear context between each one**: start a fresh session per issue and kick off **`/implement`** by passing it the PRD and the single issue to work on.
23
+ - **Yes** → **`/to-spec`** (turn the thread into a spec), then **`/to-tickets`** to split it into tracer-bullet tickets, each declaring its **blocking edges**. On a local tracker that's one file per ticket under `.scratch/<feature>/tickets/`, worked blockers-first by hand; on a real tracker the edges become native blocking links, so any ticket whose blockers are done can be grabbed — kick off **`/implement`** per ticket, **clearing context between each one**.
24
24
  - **No** → **`/implement`** right here, in the same context window.
25
25
 
26
26
  Either way, **`/implement`** builds each issue by driving **`/tdd`** internally — one red-green slice at a time — then closes out by running **`/code-review`**, a two-axis review (Standards + Spec) of the diff, before committing. Reach for **`/tdd`** on its own when you just want to build a concrete behaviour test-first without a full spec, and **`/code-review`** on its own whenever you want to review a branch or PR against a fixed point.
27
27
 
28
28
  ### Context hygiene
29
29
 
30
- Keep steps 1–3 in **one unbroken context window** — don't compact or clear until after `/to-issues` — so the grilling, PRD, and issues all build on the same thinking. Each `/implement` then starts fresh, working from the issue.
30
+ Keep steps 1–3 in **one unbroken context window** — don't compact or clear until after `/to-tickets` — so the grilling, spec, and tickets all build on the same thinking. Each `/implement` then starts fresh, working from the ticket.
31
31
 
32
- The limit on this is the **[smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone)**: the window (~120k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before `/to-issues`, don't push on degraded — `/handoff` and continue in a fresh thread.
32
+ The limit on this is the **[smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone)**: the window (~120k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before `/to-tickets`, don't push on degraded — `/handoff` and continue in a fresh thread.
33
33
 
34
34
  ## On-ramps
35
35
 
@@ -37,10 +37,14 @@ A starting situation that generates work, then merges onto the main flow.
37
37
 
38
38
  - **Bugs and requests piling up** → **`/triage`**. It moves issues through triage roles and produces agent-ready issues, which **`/implement`** later picks up.
39
39
 
40
- Triage is only for issues **you didn't create** — bug reports, incoming feature requests, anything that arrives raw. Issues that `/to-issues` produced are already agent-ready, so **don't triage them**.
40
+ Triage is only for issues **you didn't create** — bug reports, incoming feature requests, anything that arrives raw. Tickets that `/to-tickets` produced are already agent-ready, so **don't triage them**.
41
41
 
42
42
  - **Something's broken** → **`/diagnosing-bugs`**. For the hard ones: the bug that resists a first glance, the intermittent flake, the regression that crept in between two known-good states. It refuses to theorise until it has a **tight feedback loop** — one command that already goes red on *this* bug — then fixes with a regression test. Its post-mortem hands off to **`/improve-codebase-architecture`** when the real finding is that there's no good seam to lock the bug down.
43
43
 
44
+ - **A huge, foggy effort — a greenfield project or a huge feature build, too big for one session** → **`/wayfinder`**, the most cognitively demanding flow here. When the way from here to the destination isn't visible yet, it charts a **shared map** of **decision tickets** on the issue tracker and resolves them one at a time — producing **decisions, not deliverables** — until the fog is pushed back and the way is clear. Where **`/grill-with-docs`** sharpens an idea you can hold in one session, wayfinder is for the idea you can't — and it's slower and denser, so save it for exactly that, never a well-scoped feature.
45
+
46
+ When the map clears, **it hands off, it doesn't build**: merge onto the main flow at **`/to-spec`**, which collapses the map's linked decisions into a buildable plan, then `/to-tickets` and `/implement` as usual. Looping the map straight into `/implement` skips that collapse and throws the linked detail away — go straight to `/implement` only when the effort turned out genuinely small.
47
+
44
48
  ## Codebase health
45
49
 
46
50
  Not feature work — upkeep.
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Ask Matt"
3
+ short_description: "Find the right skill or workflow"
4
+ policy:
5
+ allow_implicit_invocation: false