intent-planner 0.13.1

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 (334) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +225 -0
  3. package/README.md +225 -0
  4. package/bin/cli.mjs +289 -0
  5. package/package.json +46 -0
  6. package/src/install.mjs +527 -0
  7. package/templates/en/agents/claude/CLAUDE.md +62 -0
  8. package/templates/en/agents/codex/AGENTS.md +62 -0
  9. package/templates/en/agents/gemini/GEMINI.md +62 -0
  10. package/templates/en/claude/skills/CONTRACT.md +86 -0
  11. package/templates/en/claude/skills/intent-compass/SKILL.md +55 -0
  12. package/templates/en/claude/skills/intent-compass/rules/algo-qoc.md +62 -0
  13. package/templates/en/claude/skills/intent-compass/rules/constraint-surfacing.md +41 -0
  14. package/templates/en/claude/skills/intent-discover/SKILL.md +63 -0
  15. package/templates/en/claude/skills/intent-discover/rules/algo-drift-analysis.md +34 -0
  16. package/templates/en/claude/skills/intent-discover/rules/algo-gore-lite.md +35 -0
  17. package/templates/en/claude/skills/intent-discover/rules/algo-impact-analysis.md +37 -0
  18. package/templates/en/claude/skills/intent-discover/rules/algo-intent-recovery.md +39 -0
  19. package/templates/en/claude/skills/intent-discover/rules/designer-questions.md +78 -0
  20. package/templates/en/claude/skills/intent-discover/rules/drift-terrain.md +105 -0
  21. package/templates/en/claude/skills/intent-discover/rules/mode-selection.md +31 -0
  22. package/templates/en/claude/skills/intent-export-cc-sdd/SKILL.md +88 -0
  23. package/templates/en/claude/skills/intent-export-cc-sdd/rules/drift-export-check.md +75 -0
  24. package/templates/en/claude/skills/intent-export-cc-sdd/rules/export-questions.md +23 -0
  25. package/templates/en/claude/skills/intent-export-cc-sdd/rules/map-cc-sdd.md +62 -0
  26. package/templates/en/claude/skills/intent-export-openspec/SKILL.md +90 -0
  27. package/templates/en/claude/skills/intent-export-openspec/rules/drift-export-check.md +50 -0
  28. package/templates/en/claude/skills/intent-export-openspec/rules/export-questions.md +23 -0
  29. package/templates/en/claude/skills/intent-export-openspec/rules/map-openspec.md +75 -0
  30. package/templates/en/claude/skills/intent-from-spec/SKILL.md +60 -0
  31. package/templates/en/claude/skills/intent-from-spec/rules/extract-intent.md +56 -0
  32. package/templates/en/claude/skills/intent-from-spec/rules/gap-readout.md +54 -0
  33. package/templates/en/claude/skills/intent-from-spec/rules/load-bearing.md +48 -0
  34. package/templates/en/claude/skills/intent-from-spec/rules/omission-recap.md +42 -0
  35. package/templates/en/claude/skills/intent-improve/SKILL.md +70 -0
  36. package/templates/en/claude/skills/intent-improve/rules/improve-axes.md +121 -0
  37. package/templates/en/claude/skills/intent-overview/SKILL.md +63 -0
  38. package/templates/en/claude/skills/intent-overview/rules/aggregate-sources.md +61 -0
  39. package/templates/en/claude/skills/intent-overview/rules/gap-readout.md +54 -0
  40. package/templates/en/claude/skills/intent-overview/rules/mermaid-tree.md +78 -0
  41. package/templates/en/claude/skills/intent-overview/rules/progress-readout.md +119 -0
  42. package/templates/en/claude/skills/intent-packets/SKILL.md +97 -0
  43. package/templates/en/claude/skills/intent-packets/rules/algo-additive-slicing.md +55 -0
  44. package/templates/en/claude/skills/intent-packets/rules/algo-characterization-test.md +40 -0
  45. package/templates/en/claude/skills/intent-packets/rules/algo-example-mapping.md +47 -0
  46. package/templates/en/claude/skills/intent-packets/rules/algo-migration-slicing.md +47 -0
  47. package/templates/en/claude/skills/intent-packets/rules/decision-slots.md +88 -0
  48. package/templates/en/claude/skills/intent-packets/rules/export-route.md +54 -0
  49. package/templates/en/claude/skills/intent-packets/rules/first-packet.md +35 -0
  50. package/templates/en/claude/skills/intent-packets/rules/packet-format.md +207 -0
  51. package/templates/en/claude/skills/intent-packets/rules/walking-skeleton.md +35 -0
  52. package/templates/en/claude/skills/intent-release-note/SKILL.md +58 -0
  53. package/templates/en/claude/skills/intent-release-note/rules/format-changelog.md +40 -0
  54. package/templates/en/claude/skills/intent-release-note/rules/format-github-releases.md +41 -0
  55. package/templates/en/claude/skills/intent-release-note/rules/format-select.md +32 -0
  56. package/templates/en/claude/skills/intent-release-note/rules/source-scope.md +42 -0
  57. package/templates/en/claude/skills/intent-status/SKILL.md +171 -0
  58. package/templates/en/claude/skills/intent-status/rules/decision-table.md +47 -0
  59. package/templates/en/claude/skills/intent-to-spec/SKILL.md +68 -0
  60. package/templates/en/claude/skills/intent-to-spec/rules/fabrication-guard.md +41 -0
  61. package/templates/en/claude/skills/intent-to-spec/rules/format-integrated.md +42 -0
  62. package/templates/en/claude/skills/intent-to-spec/rules/format-nonprogram.md +45 -0
  63. package/templates/en/claude/skills/intent-to-spec/rules/format-upstream.md +41 -0
  64. package/templates/en/claude/skills/intent-to-spec/rules/source-scope.md +50 -0
  65. package/templates/en/claude/skills/intent-validate/SKILL.md +80 -0
  66. package/templates/en/claude/skills/intent-validate/rules/validate-checks.md +121 -0
  67. package/templates/en/claude/skills/intent-writeback/SKILL.md +71 -0
  68. package/templates/en/claude/skills/intent-writeback/rules/writeback-protocol.md +139 -0
  69. package/templates/en/codex/skills/CONTRACT.md +77 -0
  70. package/templates/en/codex/skills/intent-compass/SKILL.md +52 -0
  71. package/templates/en/codex/skills/intent-compass/rules/algo-qoc.md +62 -0
  72. package/templates/en/codex/skills/intent-compass/rules/constraint-surfacing.md +41 -0
  73. package/templates/en/codex/skills/intent-discover/SKILL.md +60 -0
  74. package/templates/en/codex/skills/intent-discover/rules/algo-drift-analysis.md +34 -0
  75. package/templates/en/codex/skills/intent-discover/rules/algo-gore-lite.md +35 -0
  76. package/templates/en/codex/skills/intent-discover/rules/algo-impact-analysis.md +37 -0
  77. package/templates/en/codex/skills/intent-discover/rules/algo-intent-recovery.md +39 -0
  78. package/templates/en/codex/skills/intent-discover/rules/designer-questions.md +78 -0
  79. package/templates/en/codex/skills/intent-discover/rules/drift-terrain.md +105 -0
  80. package/templates/en/codex/skills/intent-discover/rules/mode-selection.md +31 -0
  81. package/templates/en/codex/skills/intent-export-cc-sdd/SKILL.md +85 -0
  82. package/templates/en/codex/skills/intent-export-cc-sdd/rules/drift-export-check.md +75 -0
  83. package/templates/en/codex/skills/intent-export-cc-sdd/rules/export-questions.md +23 -0
  84. package/templates/en/codex/skills/intent-export-cc-sdd/rules/map-cc-sdd.md +62 -0
  85. package/templates/en/codex/skills/intent-export-openspec/SKILL.md +87 -0
  86. package/templates/en/codex/skills/intent-export-openspec/rules/drift-export-check.md +50 -0
  87. package/templates/en/codex/skills/intent-export-openspec/rules/export-questions.md +23 -0
  88. package/templates/en/codex/skills/intent-export-openspec/rules/map-openspec.md +75 -0
  89. package/templates/en/codex/skills/intent-from-spec/SKILL.md +58 -0
  90. package/templates/en/codex/skills/intent-from-spec/rules/extract-intent.md +56 -0
  91. package/templates/en/codex/skills/intent-from-spec/rules/gap-readout.md +54 -0
  92. package/templates/en/codex/skills/intent-from-spec/rules/load-bearing.md +48 -0
  93. package/templates/en/codex/skills/intent-from-spec/rules/omission-recap.md +42 -0
  94. package/templates/en/codex/skills/intent-improve/SKILL.md +67 -0
  95. package/templates/en/codex/skills/intent-improve/rules/improve-axes.md +121 -0
  96. package/templates/en/codex/skills/intent-overview/SKILL.md +61 -0
  97. package/templates/en/codex/skills/intent-overview/rules/aggregate-sources.md +61 -0
  98. package/templates/en/codex/skills/intent-overview/rules/gap-readout.md +54 -0
  99. package/templates/en/codex/skills/intent-overview/rules/mermaid-tree.md +78 -0
  100. package/templates/en/codex/skills/intent-overview/rules/progress-readout.md +119 -0
  101. package/templates/en/codex/skills/intent-packets/SKILL.md +94 -0
  102. package/templates/en/codex/skills/intent-packets/rules/algo-additive-slicing.md +55 -0
  103. package/templates/en/codex/skills/intent-packets/rules/algo-characterization-test.md +40 -0
  104. package/templates/en/codex/skills/intent-packets/rules/algo-example-mapping.md +47 -0
  105. package/templates/en/codex/skills/intent-packets/rules/algo-migration-slicing.md +47 -0
  106. package/templates/en/codex/skills/intent-packets/rules/decision-slots.md +88 -0
  107. package/templates/en/codex/skills/intent-packets/rules/export-route.md +54 -0
  108. package/templates/en/codex/skills/intent-packets/rules/first-packet.md +35 -0
  109. package/templates/en/codex/skills/intent-packets/rules/packet-format.md +207 -0
  110. package/templates/en/codex/skills/intent-packets/rules/walking-skeleton.md +35 -0
  111. package/templates/en/codex/skills/intent-release-note/SKILL.md +56 -0
  112. package/templates/en/codex/skills/intent-release-note/rules/format-changelog.md +40 -0
  113. package/templates/en/codex/skills/intent-release-note/rules/format-github-releases.md +41 -0
  114. package/templates/en/codex/skills/intent-release-note/rules/format-select.md +32 -0
  115. package/templates/en/codex/skills/intent-release-note/rules/source-scope.md +42 -0
  116. package/templates/en/codex/skills/intent-status/SKILL.md +169 -0
  117. package/templates/en/codex/skills/intent-status/rules/decision-table.md +47 -0
  118. package/templates/en/codex/skills/intent-to-spec/SKILL.md +66 -0
  119. package/templates/en/codex/skills/intent-to-spec/rules/fabrication-guard.md +41 -0
  120. package/templates/en/codex/skills/intent-to-spec/rules/format-integrated.md +42 -0
  121. package/templates/en/codex/skills/intent-to-spec/rules/format-nonprogram.md +45 -0
  122. package/templates/en/codex/skills/intent-to-spec/rules/format-upstream.md +41 -0
  123. package/templates/en/codex/skills/intent-to-spec/rules/source-scope.md +50 -0
  124. package/templates/en/codex/skills/intent-validate/SKILL.md +78 -0
  125. package/templates/en/codex/skills/intent-validate/rules/validate-checks.md +121 -0
  126. package/templates/en/codex/skills/intent-writeback/SKILL.md +68 -0
  127. package/templates/en/codex/skills/intent-writeback/rules/writeback-protocol.md +139 -0
  128. package/templates/en/intent/README.md +118 -0
  129. package/templates/en/intent/cc-sdd/README.md +28 -0
  130. package/templates/en/intent/compass-archive/README.md +9 -0
  131. package/templates/en/intent/compass-archive/archive/.gitkeep +0 -0
  132. package/templates/en/intent/compass-archive.md +7 -0
  133. package/templates/en/intent/constraint-library.md +32 -0
  134. package/templates/en/intent/constraint-starters.md +58 -0
  135. package/templates/en/intent/context-cost-cues.md +55 -0
  136. package/templates/en/intent/deltas/README.md +11 -0
  137. package/templates/en/intent/deltas/archive/.gitkeep +0 -0
  138. package/templates/en/intent/deltas.md +34 -0
  139. package/templates/en/intent/drift-log/README.md +11 -0
  140. package/templates/en/intent/drift-log/archive/.gitkeep +0 -0
  141. package/templates/en/intent/drift-log.md +41 -0
  142. package/templates/en/intent/drift-patterns.md +68 -0
  143. package/templates/en/intent/export-log/README.md +12 -0
  144. package/templates/en/intent/export-log/archive/.gitkeep +0 -0
  145. package/templates/en/intent/export-log.md +6 -0
  146. package/templates/en/intent/glossary.md +23 -0
  147. package/templates/en/intent/intent-compass.md +55 -0
  148. package/templates/en/intent/intent-tree.md +59 -0
  149. package/templates/en/intent/milestones/README.md +10 -0
  150. package/templates/en/intent/milestones/archive/.gitkeep +0 -0
  151. package/templates/en/intent/milestones.md +22 -0
  152. package/templates/en/intent/mode.local.md +23 -0
  153. package/templates/en/intent/mode.md +32 -0
  154. package/templates/en/intent/modes/README.md +28 -0
  155. package/templates/en/intent/modes/behavior-unknown.md +57 -0
  156. package/templates/en/intent/modes/feature-growth.md +57 -0
  157. package/templates/en/intent/modes/non-code.md +46 -0
  158. package/templates/en/intent/modes/refactor.md +56 -0
  159. package/templates/en/intent/modes/standard.md +50 -0
  160. package/templates/en/intent/nl-spec/README.md +18 -0
  161. package/templates/en/intent/openspec/proposal.md +15 -0
  162. package/templates/en/intent/openspec/spec-delta.md +25 -0
  163. package/templates/en/intent/overview/README.md +18 -0
  164. package/templates/en/intent/packets/README.md +29 -0
  165. package/templates/en/intent/packets/index.md +6 -0
  166. package/templates/en/intent/packets/plan.md +23 -0
  167. package/templates/en/intent/release-note/README.md +18 -0
  168. package/templates/en/intent/scripts/intent-check.mjs +786 -0
  169. package/templates/en/intent/scripts/pre-push +27 -0
  170. package/templates/en/intent/spec-ingest/README.md +18 -0
  171. package/templates/ja/agents/claude/CLAUDE.md +62 -0
  172. package/templates/ja/agents/codex/AGENTS.md +62 -0
  173. package/templates/ja/agents/gemini/GEMINI.md +62 -0
  174. package/templates/ja/claude/skills/CONTRACT.md +90 -0
  175. package/templates/ja/claude/skills/intent-compass/SKILL.md +55 -0
  176. package/templates/ja/claude/skills/intent-compass/rules/algo-qoc.md +62 -0
  177. package/templates/ja/claude/skills/intent-compass/rules/constraint-surfacing.md +41 -0
  178. package/templates/ja/claude/skills/intent-discover/SKILL.md +63 -0
  179. package/templates/ja/claude/skills/intent-discover/rules/algo-drift-analysis.md +34 -0
  180. package/templates/ja/claude/skills/intent-discover/rules/algo-gore-lite.md +35 -0
  181. package/templates/ja/claude/skills/intent-discover/rules/algo-impact-analysis.md +37 -0
  182. package/templates/ja/claude/skills/intent-discover/rules/algo-intent-recovery.md +39 -0
  183. package/templates/ja/claude/skills/intent-discover/rules/designer-questions.md +78 -0
  184. package/templates/ja/claude/skills/intent-discover/rules/drift-terrain.md +105 -0
  185. package/templates/ja/claude/skills/intent-discover/rules/mode-selection.md +31 -0
  186. package/templates/ja/claude/skills/intent-export-cc-sdd/SKILL.md +88 -0
  187. package/templates/ja/claude/skills/intent-export-cc-sdd/rules/drift-export-check.md +75 -0
  188. package/templates/ja/claude/skills/intent-export-cc-sdd/rules/export-questions.md +23 -0
  189. package/templates/ja/claude/skills/intent-export-cc-sdd/rules/map-cc-sdd.md +62 -0
  190. package/templates/ja/claude/skills/intent-export-openspec/SKILL.md +90 -0
  191. package/templates/ja/claude/skills/intent-export-openspec/rules/drift-export-check.md +50 -0
  192. package/templates/ja/claude/skills/intent-export-openspec/rules/export-questions.md +23 -0
  193. package/templates/ja/claude/skills/intent-export-openspec/rules/map-openspec.md +75 -0
  194. package/templates/ja/claude/skills/intent-from-spec/SKILL.md +60 -0
  195. package/templates/ja/claude/skills/intent-from-spec/rules/extract-intent.md +56 -0
  196. package/templates/ja/claude/skills/intent-from-spec/rules/gap-readout.md +54 -0
  197. package/templates/ja/claude/skills/intent-from-spec/rules/load-bearing.md +48 -0
  198. package/templates/ja/claude/skills/intent-from-spec/rules/omission-recap.md +42 -0
  199. package/templates/ja/claude/skills/intent-improve/SKILL.md +70 -0
  200. package/templates/ja/claude/skills/intent-improve/rules/improve-axes.md +121 -0
  201. package/templates/ja/claude/skills/intent-overview/SKILL.md +63 -0
  202. package/templates/ja/claude/skills/intent-overview/rules/aggregate-sources.md +61 -0
  203. package/templates/ja/claude/skills/intent-overview/rules/gap-readout.md +54 -0
  204. package/templates/ja/claude/skills/intent-overview/rules/mermaid-tree.md +78 -0
  205. package/templates/ja/claude/skills/intent-overview/rules/progress-readout.md +119 -0
  206. package/templates/ja/claude/skills/intent-packets/SKILL.md +97 -0
  207. package/templates/ja/claude/skills/intent-packets/rules/algo-additive-slicing.md +55 -0
  208. package/templates/ja/claude/skills/intent-packets/rules/algo-characterization-test.md +40 -0
  209. package/templates/ja/claude/skills/intent-packets/rules/algo-example-mapping.md +47 -0
  210. package/templates/ja/claude/skills/intent-packets/rules/algo-migration-slicing.md +47 -0
  211. package/templates/ja/claude/skills/intent-packets/rules/decision-slots.md +88 -0
  212. package/templates/ja/claude/skills/intent-packets/rules/export-route.md +54 -0
  213. package/templates/ja/claude/skills/intent-packets/rules/first-packet.md +35 -0
  214. package/templates/ja/claude/skills/intent-packets/rules/packet-format.md +207 -0
  215. package/templates/ja/claude/skills/intent-packets/rules/walking-skeleton.md +35 -0
  216. package/templates/ja/claude/skills/intent-release-note/SKILL.md +58 -0
  217. package/templates/ja/claude/skills/intent-release-note/rules/format-changelog.md +40 -0
  218. package/templates/ja/claude/skills/intent-release-note/rules/format-github-releases.md +41 -0
  219. package/templates/ja/claude/skills/intent-release-note/rules/format-select.md +32 -0
  220. package/templates/ja/claude/skills/intent-release-note/rules/source-scope.md +42 -0
  221. package/templates/ja/claude/skills/intent-status/SKILL.md +171 -0
  222. package/templates/ja/claude/skills/intent-status/rules/decision-table.md +47 -0
  223. package/templates/ja/claude/skills/intent-to-spec/SKILL.md +68 -0
  224. package/templates/ja/claude/skills/intent-to-spec/rules/fabrication-guard.md +41 -0
  225. package/templates/ja/claude/skills/intent-to-spec/rules/format-integrated.md +42 -0
  226. package/templates/ja/claude/skills/intent-to-spec/rules/format-nonprogram.md +45 -0
  227. package/templates/ja/claude/skills/intent-to-spec/rules/format-upstream.md +41 -0
  228. package/templates/ja/claude/skills/intent-to-spec/rules/source-scope.md +50 -0
  229. package/templates/ja/claude/skills/intent-validate/SKILL.md +80 -0
  230. package/templates/ja/claude/skills/intent-validate/rules/validate-checks.md +121 -0
  231. package/templates/ja/claude/skills/intent-writeback/SKILL.md +71 -0
  232. package/templates/ja/claude/skills/intent-writeback/rules/writeback-protocol.md +139 -0
  233. package/templates/ja/codex/skills/CONTRACT.md +81 -0
  234. package/templates/ja/codex/skills/intent-compass/SKILL.md +52 -0
  235. package/templates/ja/codex/skills/intent-compass/rules/algo-qoc.md +62 -0
  236. package/templates/ja/codex/skills/intent-compass/rules/constraint-surfacing.md +41 -0
  237. package/templates/ja/codex/skills/intent-discover/SKILL.md +60 -0
  238. package/templates/ja/codex/skills/intent-discover/rules/algo-drift-analysis.md +34 -0
  239. package/templates/ja/codex/skills/intent-discover/rules/algo-gore-lite.md +35 -0
  240. package/templates/ja/codex/skills/intent-discover/rules/algo-impact-analysis.md +37 -0
  241. package/templates/ja/codex/skills/intent-discover/rules/algo-intent-recovery.md +39 -0
  242. package/templates/ja/codex/skills/intent-discover/rules/designer-questions.md +78 -0
  243. package/templates/ja/codex/skills/intent-discover/rules/drift-terrain.md +105 -0
  244. package/templates/ja/codex/skills/intent-discover/rules/mode-selection.md +31 -0
  245. package/templates/ja/codex/skills/intent-export-cc-sdd/SKILL.md +85 -0
  246. package/templates/ja/codex/skills/intent-export-cc-sdd/rules/drift-export-check.md +75 -0
  247. package/templates/ja/codex/skills/intent-export-cc-sdd/rules/export-questions.md +23 -0
  248. package/templates/ja/codex/skills/intent-export-cc-sdd/rules/map-cc-sdd.md +62 -0
  249. package/templates/ja/codex/skills/intent-export-openspec/SKILL.md +87 -0
  250. package/templates/ja/codex/skills/intent-export-openspec/rules/drift-export-check.md +50 -0
  251. package/templates/ja/codex/skills/intent-export-openspec/rules/export-questions.md +23 -0
  252. package/templates/ja/codex/skills/intent-export-openspec/rules/map-openspec.md +75 -0
  253. package/templates/ja/codex/skills/intent-from-spec/SKILL.md +58 -0
  254. package/templates/ja/codex/skills/intent-from-spec/rules/extract-intent.md +56 -0
  255. package/templates/ja/codex/skills/intent-from-spec/rules/gap-readout.md +54 -0
  256. package/templates/ja/codex/skills/intent-from-spec/rules/load-bearing.md +48 -0
  257. package/templates/ja/codex/skills/intent-from-spec/rules/omission-recap.md +42 -0
  258. package/templates/ja/codex/skills/intent-improve/SKILL.md +67 -0
  259. package/templates/ja/codex/skills/intent-improve/rules/improve-axes.md +121 -0
  260. package/templates/ja/codex/skills/intent-overview/SKILL.md +61 -0
  261. package/templates/ja/codex/skills/intent-overview/rules/aggregate-sources.md +61 -0
  262. package/templates/ja/codex/skills/intent-overview/rules/gap-readout.md +54 -0
  263. package/templates/ja/codex/skills/intent-overview/rules/mermaid-tree.md +78 -0
  264. package/templates/ja/codex/skills/intent-overview/rules/progress-readout.md +119 -0
  265. package/templates/ja/codex/skills/intent-packets/SKILL.md +94 -0
  266. package/templates/ja/codex/skills/intent-packets/rules/algo-additive-slicing.md +55 -0
  267. package/templates/ja/codex/skills/intent-packets/rules/algo-characterization-test.md +40 -0
  268. package/templates/ja/codex/skills/intent-packets/rules/algo-example-mapping.md +47 -0
  269. package/templates/ja/codex/skills/intent-packets/rules/algo-migration-slicing.md +47 -0
  270. package/templates/ja/codex/skills/intent-packets/rules/decision-slots.md +88 -0
  271. package/templates/ja/codex/skills/intent-packets/rules/export-route.md +54 -0
  272. package/templates/ja/codex/skills/intent-packets/rules/first-packet.md +35 -0
  273. package/templates/ja/codex/skills/intent-packets/rules/packet-format.md +207 -0
  274. package/templates/ja/codex/skills/intent-packets/rules/walking-skeleton.md +35 -0
  275. package/templates/ja/codex/skills/intent-release-note/SKILL.md +56 -0
  276. package/templates/ja/codex/skills/intent-release-note/rules/format-changelog.md +40 -0
  277. package/templates/ja/codex/skills/intent-release-note/rules/format-github-releases.md +41 -0
  278. package/templates/ja/codex/skills/intent-release-note/rules/format-select.md +32 -0
  279. package/templates/ja/codex/skills/intent-release-note/rules/source-scope.md +42 -0
  280. package/templates/ja/codex/skills/intent-status/SKILL.md +169 -0
  281. package/templates/ja/codex/skills/intent-status/rules/decision-table.md +47 -0
  282. package/templates/ja/codex/skills/intent-to-spec/SKILL.md +66 -0
  283. package/templates/ja/codex/skills/intent-to-spec/rules/fabrication-guard.md +41 -0
  284. package/templates/ja/codex/skills/intent-to-spec/rules/format-integrated.md +42 -0
  285. package/templates/ja/codex/skills/intent-to-spec/rules/format-nonprogram.md +45 -0
  286. package/templates/ja/codex/skills/intent-to-spec/rules/format-upstream.md +41 -0
  287. package/templates/ja/codex/skills/intent-to-spec/rules/source-scope.md +50 -0
  288. package/templates/ja/codex/skills/intent-validate/SKILL.md +78 -0
  289. package/templates/ja/codex/skills/intent-validate/rules/validate-checks.md +121 -0
  290. package/templates/ja/codex/skills/intent-writeback/SKILL.md +68 -0
  291. package/templates/ja/codex/skills/intent-writeback/rules/writeback-protocol.md +139 -0
  292. package/templates/ja/intent/README.md +118 -0
  293. package/templates/ja/intent/cc-sdd/README.md +28 -0
  294. package/templates/ja/intent/compass-archive/README.md +9 -0
  295. package/templates/ja/intent/compass-archive/archive/.gitkeep +0 -0
  296. package/templates/ja/intent/compass-archive.md +7 -0
  297. package/templates/ja/intent/constraint-library.md +32 -0
  298. package/templates/ja/intent/constraint-starters.md +58 -0
  299. package/templates/ja/intent/context-cost-cues.md +55 -0
  300. package/templates/ja/intent/deltas/README.md +11 -0
  301. package/templates/ja/intent/deltas/archive/.gitkeep +0 -0
  302. package/templates/ja/intent/deltas.md +34 -0
  303. package/templates/ja/intent/drift-log/README.md +11 -0
  304. package/templates/ja/intent/drift-log/archive/.gitkeep +0 -0
  305. package/templates/ja/intent/drift-log.md +41 -0
  306. package/templates/ja/intent/drift-patterns.md +68 -0
  307. package/templates/ja/intent/export-log/README.md +12 -0
  308. package/templates/ja/intent/export-log/archive/.gitkeep +0 -0
  309. package/templates/ja/intent/export-log.md +6 -0
  310. package/templates/ja/intent/glossary.md +23 -0
  311. package/templates/ja/intent/intent-compass.md +55 -0
  312. package/templates/ja/intent/intent-tree.md +59 -0
  313. package/templates/ja/intent/milestones/README.md +10 -0
  314. package/templates/ja/intent/milestones/archive/.gitkeep +0 -0
  315. package/templates/ja/intent/milestones.md +22 -0
  316. package/templates/ja/intent/mode.local.md +23 -0
  317. package/templates/ja/intent/mode.md +32 -0
  318. package/templates/ja/intent/modes/README.md +28 -0
  319. package/templates/ja/intent/modes/behavior-unknown.md +57 -0
  320. package/templates/ja/intent/modes/feature-growth.md +57 -0
  321. package/templates/ja/intent/modes/non-code.md +46 -0
  322. package/templates/ja/intent/modes/refactor.md +56 -0
  323. package/templates/ja/intent/modes/standard.md +50 -0
  324. package/templates/ja/intent/nl-spec/README.md +18 -0
  325. package/templates/ja/intent/openspec/proposal.md +15 -0
  326. package/templates/ja/intent/openspec/spec-delta.md +25 -0
  327. package/templates/ja/intent/overview/README.md +18 -0
  328. package/templates/ja/intent/packets/README.md +29 -0
  329. package/templates/ja/intent/packets/index.md +6 -0
  330. package/templates/ja/intent/packets/plan.md +23 -0
  331. package/templates/ja/intent/release-note/README.md +18 -0
  332. package/templates/ja/intent/scripts/intent-check.mjs +786 -0
  333. package/templates/ja/intent/scripts/pre-push +27 -0
  334. package/templates/ja/intent/spec-ingest/README.md +18 -0
@@ -0,0 +1,31 @@
1
+ # Mode Selection
2
+
3
+ The logic for recommending the mode for working out the Intent based on the repository situation. Used at the start of `/intent-discover`. This is also an extension point (when you add a new mode, add its recommendation conditions here).
4
+
5
+ ## Procedure
6
+
7
+ 1. **Enumerate available modes**
8
+ - Glob for `.intent/modes/*.md`. Read each mode's "Applicable situations" section.
9
+
10
+ 2. **Lightly observe the repository situation**
11
+ - Presence/scale of existing code, presence of tests, richness of README/docs, presence of existing `.intent/` deliverables.
12
+ - Do not read deeply. Only the clues needed for a recommendation.
13
+
14
+ 3. **Recommend a mode**
15
+ - The bundled modes at present are the four: `standard` / `refactor` / `behavior-unknown` / `feature-growth`. Recommend based on the repository situation using these conditions:
16
+ - New / intent not yet articulated → `standard` (default)
17
+ - Large existing codebase / refactor target (large existing code, design drift) → `refactor` (intent-less / vibe-coded existing code also routes to refactor, with Intent Recovery in discover)
18
+ - Legacy with unknown behavior (no/few tests, lost specification) → `behavior-unknown`
19
+ - A **feature addition** to an existing system (extend / integrate / add-to style requests, behavior known, redesign is not the goal) → `feature-growth` (distinguishing: if you want to change the existing structure, use `refactor`; if you want to add onto the existing system, use `feature-growth`)
20
+ - When no condition clearly applies, recommend `standard`.
21
+
22
+ 4. **Confirm with the user**
23
+ - Present the recommended mode and the reason, and request confirmation/change via `AskUserQuestion`.
24
+ - **Whether there is one mode candidate or several, always run the recommend → confirm → record wiring**. This keeps the user experience unchanged as modes are added or removed.
25
+
26
+ 5. **Record the confirmed result**
27
+ - Write the confirmed mode to `.intent/mode.local.md` (the local canonical source for mode state; not tracked by git) (mode / selected / reason / definition). In legacy environments where `mode.local.md` does not exist, reads are handled by the backward-compatible fallback (`mode.local.md` → `mode.md` → standard). Enforcement / Drift-watch reads continue to reference `mode.md`.
28
+
29
+ ## Adding a new mode to the recommendation targets
30
+
31
+ When you create a new `.intent/modes/<name>.md`, add to the recommendation guidelines in step 3 above "under what repository situations to recommend <name>".
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: intent-export-cc-sdd
3
+ description: Convert one chosen packet into a condensed draft that can be handed to cc-sdd without wasting tokens. Does not intrude on cc-sdd's main generation. Can invoke /kiro-spec-init when instructed to proceed.
4
+ ---
5
+
6
+ # intent-export-cc-sdd Skill
7
+
8
+ ## Core Mission
9
+ - **Success Criteria**:
10
+ - One target packet is converted into a condensed cc-sdd Project Description + design/tasks hints
11
+ - The input is limited to the target packet file + the compass's project-universal Invariants/Anti-direction, and the full Tree/Compass is not transcribed into cc-sdd
12
+ - The tasks hints carry parent intent / invariant references, forming a propagation structure to impl
13
+ - The output is led by natural-language guidance, and `/kiro-spec-init` can be invoked when instructed to proceed
14
+ - No application code has been changed at all
15
+
16
+ ## Execution Steps
17
+
18
+ ### Step 1: Narrow down to one target packet
19
+ - Read `.intent/packets/index.md` and present the active packet candidates. If index.md is absent, build the candidate list directly from the frontmatter of the files under `.intent/packets/active/`, continue, and prompt regeneration of the index. If `.intent/packets/` itself is absent (or `active/` is empty), guide the user to "run `/intent-packets` first" and stop.
20
+ - If a packet is specified by argument, use it; otherwise narrow down to one from the candidates by priority or by asking the user in natural language and waiting for their answer, and read only the file of the confirmed target packet (under `.intent/packets/active/`) — do not bulk-read all packet files.
21
+ - **Draft guard**: when the confirmed target packet's `state` is draft, ask the user in natural language whether to "activate it and continue the export" and wait for their answer; once the user approves, update the frontmatter `state` to active and regenerate `index.md` before continuing (never export a draft as is without confirmation; this activation is the only canonical write the export makes).
22
+ - Read `.intent/mode.local.md` (falling back to `.intent/mode.md` if absent) for the mode state. If both are absent, continue with the standard default and announce it.
23
+
24
+ ### Step 1.5: Enforcement gate (writeback freshness check)
25
+ - From the `## Enforcement (user-managed)` section of the `.intent/mode.md` read in Step 1, check the value of `enforcement`. If it is off, missing, or an invalid value (including mode.md being absent), skip this check and continue to Step 2 as today.
26
+ - When it is remind or gate, run `node .intent/scripts/intent-check.mjs` (a read-only script; it creates, modifies, and deletes no files) and follow its stdout.
27
+ - **Interpretation rules for the verdict line**: the stop decision is governed solely by `block=` on the first stdout line (do not re-derive or reinterpret). Whether a warning is needed is decided by `result=stale` or `pending>0`. Even when `result=not-applicable`, use the value of `pending=` from the verdict line as is.
28
+ - When gate and `block=yes`: present the grounds (the pending packet names and the elapsed commit count / threshold; quote intent-check's human-readable lines from the second line onward verbatim), stop the export, and guide the user to run `/intent-writeback`. Then ask the user in natural language whether to "proceed with the export anyway" and wait for their answer; only when the user explicitly instructs to proceed, run the export with a warning attached (the escape hatch for false positives).
29
+ - When remind and a violation is detected (`result=stale` or `pending>0`): present the same grounds as a warning and continue without stopping.
30
+ - Only when intent-check itself cannot run (command execution unavailable, script absent, or exit 2): treat staleness as not-applicable, read `.intent/deltas.md` to check for pending Delta entries (those carrying `- Status: pending`), and enter the same branches above using that result as `pending`.
31
+
32
+ ### Step 1.6: Drift Check (drift-watch)
33
+ - Check the value of `drift-watch` in the `## Drift-watch (user-managed)` section of the `.intent/mode.md` read in Step 1. When it is not `on` (including off, unspecified, invalid value, missing section, or missing mode.md), do not perform this check; continue to Step 1.7 as today (byte-identical to current behavior).
34
+ - Only when it is `on`, read and apply `rules/drift-export-check.md`. The matching of the target packet's design/tasks hints × compass (North Star / Anti-direction / Invariants), the named presentation of conflicts, appending a `stage: export` entry to drift-log, and resolving the outcome by the user's verdict are all delegated to the rule's procedure (do not duplicate the procedure here).
35
+ - This check is **warn-only and does not stop the export** (only the Step 1.5 enforcement gate can stop; drift-watch never stops because it assumes false positives).
36
+ - Order and orthogonality of the three checkpoints: **enforcement (procedure, may stop, Step 1.5) → drift-watch (direction, never stops, Step 1.6) → Open Questions (deadline, never stops, Step 1.7)**. Their inspection targets are orthogonal (procedure / direction / deadline).
37
+
38
+ ### Step 1.7: Confirm unanswered Open Questions
39
+ - Read and apply `rules/export-questions.md`.
40
+
41
+ ### Step 1.8: Preflight check of the cc-sdd prerequisite (warn only — do not stop)
42
+ - Observe read-only whether the `.kiro/` directory exists (Read/Glob; do not push this onto a mechanical check such as `intent-check.mjs`).
43
+ - When `.kiro/` is **absent**: **warn** that cc-sdd (kiro) may not be set up. Guide: "The cc-sdd prerequisite (`.kiro/`) was not found. Set up cc-sdd, or — if a readable artifact is the goal — the format-axis projection (an exit to a readable Spec) is also available." (The choice of exit follows the exit decision lane in `rules/export-route.md`; this SKILL does not name other export/projection skills' commands.) **Do not stop the draft generation** (continue to Step 2 onward).
44
+ - When `.kiro/` **exists**: emit nothing and continue to Step 2 (as before — no warn).
45
+ - This check is **warn only — it does not stop the export** (only the Step 1.5 enforcement gate can stop; the preflight follows drift-watch's false-positive-tolerant stance and does not stop — it does not foreclose adding `.kiro/` later). The exit's appropriateness follows the convention in `rules/export-route.md` (the exit decision lane).
46
+
47
+ ### Step 2: Apply the mapping rules
48
+ - Read and apply `rules/map-cc-sdd.md`.
49
+ - The input is only the one target packet file (including the packet-specific invariants in Safety / Invariants) + the project-universal Invariants/Anti-direction of `.intent/intent-compass.md` (do not read the full Tree or other packets. Only when direction is needed, reference a summary of Tree L0–L1).
50
+
51
+ ### Step 3: Generate the draft
52
+ - Write the drafts under the per-packet directory `.intent/cc-sdd/<slug>/`. The slug derivation and collision handling follow the "Output layout" section of `rules/map-cc-sdd.md`.
53
+ - Write the condensed Project Description (the cc-sdd input body) into `.intent/cc-sdd/<slug>/requirements.md`.
54
+ - Write design hints (bullets) into `.intent/cc-sdd/<slug>/design.md`, and an "Intent-derived constraints" section + tasks check items into `.intent/cc-sdd/<slug>/tasks.md`.
55
+ - Do not complete the cc-sdd main body. Always leave parent intent and invariant references in the tasks hints.
56
+ - Once the drafts are generated, write the export record into a **per-packet split file** `.intent/export-log/<packet-slug>.md` (following CONTRACT "Split and archive convention for append-only records"). Derive `<packet-slug>` from the packet name via the existing slug rule (`intent-packets/rules/packet-format.md`) — do not create new/sequential numbering. The file holds the same table header as the scaffold (`| packet | exported_at | commit |`) plus the row `| <packet name> | <export datetime (ISO 8601 UTC)> | <commit hash> |` (append a row if the file exists; do not erase past rows). Obtain the commit hash by running `git rev-parse --short HEAD` (read-only); if it cannot be obtained, record `-`. Create the `.intent/export-log/` directory if absent.
57
+ - Then regenerate the old `.intent/export-log.md` as a **generated active mirror**: concatenate all data rows from `.intent/export-log/*.md` in `exported_at` ascending order and overwrite the mirror with the scaffold header + all rows (the split files are the source of truth; the mirror is derived, never hand-edited). This keeps single-file readers (status / validate / writeback / intent-check) from breaking. The mirror is folded in the later slice (wire) once reader cross-following is complete.
58
+
59
+ ### Step 4: Guide the handoff (natural-language led)
60
+ - The lead of the output is natural-language guidance: show the path of the target packet's `.intent/cc-sdd/<slug>/requirements.md` and confirm "may this be handed to cc-sdd as is" by asking the user in natural language and waiting for their answer.
61
+ - When the user instructs to proceed, read the body of the target packet's `.intent/cc-sdd/<slug>/requirements.md` and invoke `/kiro-spec-init` with that body as the argument (do not force the user to copy-paste).
62
+ - As a fallback, also include a newline-minimized copy block for `/kiro-spec-init` (not the lead).
63
+ - **Delegation goes only up to invoking `/kiro-spec-init`**. The subsequent requirements → design → tasks follow cc-sdd's 3-phase approval, waiting for the user's instruction to proceed at each phase. Do not push ahead automatically.
64
+ - **Make the return path explicit (the entry to the writeback phase)**: at the end of the guidance, add one line that once the cc-sdd implementation has gone around once (once learnings emerge from the reality of implementation), they are returned to the canonical deliverables via `/intent-writeback`. Do not settle for writing post-implementation learnings directly into the packet file as Evidence; always go through writeback (via a delta). This guidance makes the phase boundary explicit to the user: "pre-implementation drafting (compass/packets write canonical directly)" vs. "post-implementation extraction (writeback via a delta)".
65
+
66
+ ## Output Description
67
+ - Proposed update to the target packet's `.intent/cc-sdd/<slug>/{requirements, design, tasks}.md`
68
+ - One export-record row appended to `.intent/export-log.md`
69
+ - The target packet file's `state` update and the regeneration of `.intent/packets/index.md` when a draft was activated (omitted when none apply)
70
+ - Confirmation result for unanswered `[by export]` questions (the questions presented and the user's decision; omitted when none apply)
71
+ - Confirmation of whether it may be handed to cc-sdd (natural-language guidance; the lead)
72
+ - Copy block for `/kiro-spec-init` (fallback; secondary)
73
+ - Points to confirm before implementation
74
+ - Return-path guidance after the implementation goes around once (return to canonical via `/intent-writeback`; do not settle for writing Evidence directly into the packet)
75
+
76
+ ## Safety & Fallback
77
+ - If `.intent/packets/` is absent (or `active/` is empty), stop and guide the user to `/intent-packets`.
78
+ - The absence of index.md does not stop; build the candidates directly from the files under `active/`, continue, and prompt regeneration of the index.
79
+ - The only canonical write is the draft-guard activation (`state` update + `index.md` regeneration), and only with the user's approval. Never rewrite intent-tree / intent-compass / packet bodies.
80
+ - The absence of mode.md does not stop; continue with the standard default and announce it.
81
+ - The enforcement check is fail-open: even when intent-check cannot run, do not block the export. The export stops only when enforcement is gate and the verdict line says `block=yes`, or when the unrunnable fallback finds pending deltas under gate; even then the user's explicit instruction to proceed lets it run.
82
+ - The Open Questions check is a confirmation, not a stop; the user's explicit instruction to proceed lets the export run.
83
+ - Do not complete the main body of cc-sdd's requirements/design/tasks (drafts/hints only).
84
+ - Do not auto-invoke cc-sdd phases beyond `/kiro-spec-init`.
85
+ - Do not change application code (INV6. Invoking other skills is a concept distinct from INV6 and is allowed).
@@ -0,0 +1,75 @@
1
+ # Drift Export Check
2
+
3
+ The matching logic used at Step 1.6 of `/intent-export-cc-sdd`: the target packet's design/tasks hints against the compass. It runs only when `drift-watch: on` (off / absent / invalid values do nothing). It sits after the enforcement gate (Step 1.5, which may stop) and before the Open Questions check (Step 1.7, which does not stop), and warns—right before handoff to cc-sdd, the moment before going-back stops working—whether the packet has drifted from the compass's direction.
4
+
5
+ ## The basis of the matching is the compass
6
+
7
+ - **The basis of the matching is the North Star / Anti-direction / Invariants of `.intent/intent-compass.md`.** At the export stage the compass already exists, so here the basis is the compass, not the pattern catalog (`.intent/drift-patterns.md`) (the discover terrain diagnosis has neither compass nor packet yet, so it uses the pattern catalog as its basis. Export is its sibling stage, and the difference is that the basis is the compass).
8
+ - The export matching is **premised on false-positives**. "Hitting" a compass element is not a confirmation of drift. We build in from the start that a valid design may be wrongly caught (false-positive), and we record swings and misses too.
9
+ - **This matching is a direction checkpoint, and it does not stop.** Its inspection target is orthogonal to the enforcement gate (a procedure checkpoint that may stop). We never stop export over a drift detection (only the Step 1.5 enforcement gate may stop).
10
+
11
+ ## Procedure
12
+
13
+ 1. **Obtain the inputs**
14
+ - Take the target packet's **design/tasks hint generation content** (the body of the draft export is about to generate) as the input.
15
+ - Read the **North Star** / **Anti-direction** / **Invariants** (project-universal Invariants) of `.intent/intent-compass.md`.
16
+ - **When the compass is absent / unfilled**: skip the export matching and inform the user of that fact (do not stop / do not write to drift-log either). Do not run the remaining steps.
17
+
18
+ 2. **Match the design/tasks hints against the compass**
19
+ - Hold the design/tasks hints about to be generated against the compass's **Invariants** (do they breach a constraint that must not be broken?), **Anti-direction** (are they leaning toward a direction decided to be avoided?), and **North Star** (have they drifted from the final state?).
20
+ - This is a **semantic match**, not a mechanical decision. Premised on false-positives, pick it up if in doubt.
21
+
22
+ 3. **When there is a conflict**
23
+ - Present a **warning only** to the user—**do not stop export**. Name what was breached (which Invariant / Anti-direction / North Star) and which part of the design/tasks hints is off.
24
+ - Append one entry to `drift-log.md` (see the append procedure below). The values are:
25
+ - `pattern: <a matching drift-patterns id | uncatalogued:<short name> | ->`(an id if identifiable; `uncatalogued:<short name>` for an actual drift outside the catalog; `-` if undeterminable)
26
+ - `stage: export`
27
+ - `packet: <target packet name>`
28
+ - `mechanism: compass-anti-direction`(when an Anti-direction was breached)or `compass-invariant`(when an Invariant was breached; pick by which compass element was breached)
29
+ - `outcome: caught`(a **draft**. This is drift-watch's estimate; the verdict is decided by the user's `user-verdict` and the resolution below)
30
+ - `user-verdict: unjudged`
31
+ - `recorded_at: <ISO 8601>`
32
+ - `commit: <short hash | ->`
33
+ - `note: <1-2 lines>`(what was breached and what was warned about)
34
+ - If multiple places conflict, append one entry per conflict.
35
+
36
+ 4. **outcome is confirmed by the user's judgment (resolving the draft)**
37
+ - Step 3 only **drafts** `caught` for `outcome`; the final value is decided by the user's judgment:
38
+ - When the user heeds the warning and pulls the design back → `caught` (capture succeeded, the "worked" family)
39
+ - When the user ignores it and passes it through anyway → `missed` (could not prevent it, it got through, the "did not work" family)
40
+ - When the design was actually valid and it was a false alarm → `false-positive` (it was a false alarm, the "did not work" family)
41
+ - `user-verdict` backs the final value: `valid` if the point was sound / `false-alarm` if it was a false alarm / `unjudged` if not judged. Even if the user has not judged it, it stays `unjudged` and remains a target for recording and tallying.
42
+
43
+ ## The append procedure to drift-log
44
+
45
+ - **Write in split form (CONTRACT "Split and archive convention for append-only records")**: drift-log is event-origin, so instead of appending to the end of a single `drift-log.md`, write one entry to a **per-date+slug split file** `drift-log/<date>-<slug>.md`. `<date>` is the recorded_at date; `<slug>` is derived from the pattern (the event) via the existing slug rule (`intent-packets/rules/packet-format.md`) — do not create new/sequential numbering. Because a different event touches a different file, tail collisions disappear by construction. Never rewrite or delete an existing entry (**append-only**).
46
+ - **Always write all 9 keys in fixed order**: `pattern` → `stage` → `packet` → `mechanism` → `outcome` → `user-verdict` → `recorded_at` → `commit` → `note`. Do not write an entry that is missing even one of the 9 keys.
47
+ - **recorded_at**: write the recording time in ISO 8601 (transaction time).
48
+ - **commit**: write the result of `git rev-parse --short HEAD`. When it cannot be obtained (non-repository, git CLI absent, etc.), use `-` (fail-open; recording continues).
49
+ - **When the `drift-log/` directory is absent**: create the directory, then write the split file. An old single `drift-log.md`, if still present, can be read side-by-side by readers (migration is handled by this slice's migration step).
50
+ - Follow the sample in the "Entry format" section of `.intent/drift-log.md` (`### drift-log entry`) for the entry format.
51
+
52
+ ## Scope-overflow check (DR9 second defense · packet-scope-overflow)
53
+
54
+ A second check whose **grounds differ from** the compass check above. Whereas the compass check looks at "did this conflict with a universal compass Invariant", this one looks at "**is an implementation instruction arriving that exceeds the target packet's declared scope (`## Scope` / `## Non-scope`)**". When it does, it warns that the **packet-specific invariants** that newly become necessary in that new territory (authorization, data consistency, transaction boundaries, idempotency) are absent from the cc-sdd artifacts—recorded as drift. It runs only when `drift-watch: on`, and—like the compass check—**warns only, never stops, and assumes false positives**. It is also the instrument that measures whether the first defense (the convention-doc rule "go back to intent on scope overflow"—recall only) is working.
55
+
56
+ The check is performed at two points (user-confirmed 2026-06-20, "both"):
57
+
58
+ 1. **At the export waterline (this Step 1.6)**: check whether the draft about to be exported exceeds the target packet's `## Scope` and reaches into the `## Non-scope` side. If the draft itself departs from scope, it is caught at export time.
59
+ 2. **A light cue afterward (re-check at the implementation stage)**: when the **implementation instruction** the user issues after export exceeds the target packet's `## Scope` (e.g., a front-end-only packet being told to implement back-end / authorization / transaction boundaries), re-check lightly and name it. This is the entry point that prompts a return to "go back to intent" (raise a packet for the new territory with `/intent-packets` and re-export); it does not stop.
60
+
61
+ ### Input and discipline of the check
62
+
63
+ - **The input is only the implementation-instruction text and the packet's `## Scope` / `## Non-scope` declarations.** Do not read code diffs or implementation results (INV5/INV6 · DR14). It is a semantic check, not a mechanical decision.
64
+ - The grounds of the check are the **absence of packet-specific invariants**. Do not conflate its logic with the universal compass Invariant check (above). The fact that universal Invariants were transcribed at export does not cover the new territory's specific constraints (a different layer).
65
+ - **Abnormal case**: when the target packet is missing / `## Scope` is blank, skip the check and announce it (do not stop · do not write to drift-log).
66
+
67
+ ### When there is a scope overflow
68
+
69
+ - Present **only a warning** to the user—neither export nor implementation stops. Name what exceeds the packet scope (e.g., front-end), which new territory it reaches (e.g., back-end / authorization / transactions), and which packet-specific invariants (authorization, consistency, transaction boundaries, idempotency) are absent, and advise "raise a packet for the new territory with `/intent-packets` and re-export (go back to intent)".
70
+ - Append one entry to `drift-log.md` (same append procedure as above). The value differences are:
71
+ - `mechanism: packet-scope-overflow` (a second-defense origin distinct from the two compass values; separable in tallies)
72
+ - `pattern: uncatalogued:scope-overflow` (the id of a scope-creep type seed if the type catalog has one; otherwise `uncatalogued:scope-overflow`)
73
+ - `stage: export` (when caught at the waterline). When caught at the later implementation stage, use `stage: export` as well, as an extension of the export-origin check, and state "re-check at the implementation stage" in `note` (do not add a new stage value—keep the existing three-value `discover | export | improve` schema unchanged).
74
+ - The other keys (`packet` / `outcome: caught` draft / `user-verdict: unjudged` / `recorded_at` / `commit` / `note`) follow the same discipline as the compass check.
75
+ - The confirmation of `outcome` is the same as the compass check (`caught` if the user goes back to intent / `missed` if they push through ignoring it / `false-positive` if it was actually a valid extension and a false alarm).
@@ -0,0 +1,23 @@
1
+ # Export Questions Check
2
+
3
+ The procedure for confirming unanswered `[by export]` Open Questions before running the export. Used at Step 1.7 of `/intent-export-cc-sdd`. All dialogue is conducted as confirmation with the user (the means of confirmation follows the SKILL.md conventions).
4
+
5
+ ## Detection
6
+
7
+ - Read the Open Questions sections of `.intent/intent-tree.md` and `.intent/intent-compass.md`, and detect questions containing `[by export]`. A question remaining in the section is treated as unanswered.
8
+ - Detection targets only these two files. The canonical source of questions is the Open Questions sections of both files; the Deferred section of `.intent/packets/plan.md` is a record of intentional deferrals, not questions, and is therefore out of scope.
9
+ - **Do not reference the enforcement setting (the Enforcement section of `.intent/mode.md`)** (this operates independently of the Step 1.5 enforcement gate).
10
+
11
+ ## Procedure
12
+
13
+ 1. **When nothing is detected (including older scaffolds without the tag convention)**
14
+ - Present nothing and proceed to the next step (no behavior change).
15
+
16
+ 2. **When questions are detected**
17
+ - Present the list of detected questions.
18
+ - Confirm with the user whether to "answer them before exporting, or proceed as is".
19
+ - This is a confirmation, not a stop. When the user explicitly instructs to proceed, run the export.
20
+
21
+ ## Discipline
22
+
23
+ - Do not change code.
@@ -0,0 +1,62 @@
1
+ # Mapping: packet → cc-sdd
2
+
3
+ The rules for converting one chosen packet into a cc-sdd draft. Used by the `intent-export-cc-sdd` skill. This is one of the per-export-target mappings (for cc-sdd). To add another target (e.g. OpenSpec), add `rules/map-<target>.md` and create a corresponding `intent-export-<target>` skill (the seam).
4
+
5
+ ## Input scope (strict / information-source contract)
6
+
7
+ - Read only **the one target packet** and **the Invariants / Anti-direction of `.intent/intent-compass.md`**.
8
+ - **Do not read** the full Intent Tree or other packets. Only when the overall direction is needed, reference Tree L0–L1 **as a summary** in a pinpoint manner (no body transcription).
9
+ - This keeps the amount of information passed to cc-sdd to about 1 packet's worth (preventing token explosion).
10
+
11
+ ## Output (drafts of 3 files / do not create the main body)
12
+
13
+ Write the drafts under the per-packet directory `.intent/cc-sdd/<packet-slug>/` (slug derivation is in the next section, "Output layout").
14
+
15
+ ### `.intent/cc-sdd/<packet-slug>/requirements.md`
16
+ - The **Project Description body** (condensed text) fed into cc-sdd's `/kiro-spec-init`.
17
+ - What to include: (a) whose problem it is, (b) the current state, (c) what you want to change / In·Out scope / invariants to protect / parent intent.
18
+ - **Required headings (output contract)**: always include the three headings `## Source Packet`, `## Parent Intent`, and `## Invariants`. The value of `## Source Packet` is the **exact transcription** of the packet name (the anchor that identifies which packet this directory belongs to).
19
+ - The information source is limited to the target packet (Why/Scope/Expected Behavior/Safety) and the compass's Invariants.
20
+
21
+ ### `.intent/cc-sdd/<packet-slug>/design.md`
22
+ - **Hints to prevent oversights (bullets)** for when cc-sdd generates the design. Not the main body.
23
+ - Origin: the packet's Scope/Non-scope/Rollback + the compass's technical-constraint Invariants. Perspectives: responsibility boundaries, dependency direction, side effects, migration/rollback, risk, technical constraints (if the compass Invariants include technology-stack, infrastructure, or license constraints, transcribe them into the hints so that cc-sdd's design technology selection does not deviate from them).
24
+
25
+ ### `.intent/cc-sdd/<packet-slug>/tasks.md`
26
+ - Place an **"Intent-derived constraints" section** (a summary of parent intent / invariant / Anti-direction) at the top.
27
+ - After that, cc-sdd's tasks-generation check items (characterization test / migration slice / each task's invariant reference).
28
+ - Origin: the packet's Validation/Rollback + parent intent + the compass's Invariants/Anti-direction.
29
+
30
+ ## Output layout (slug rule and collision rule)
31
+
32
+ ### Slug rule (deterministic)
33
+
34
+ Derive the directory name (slug) from the packet name **deterministically** in the following order. The same packet name always yields the same slug.
35
+
36
+ 1. Apply NFC normalization.
37
+ 2. Trim leading/trailing whitespace.
38
+ 3. Lowercase ASCII uppercase letters.
39
+ 4. Replace whitespace and path-dangerous characters (`/ \ : * ? " < > |`) with `-`.
40
+ 5. Collapse consecutive `-` into one.
41
+ 6. Strip leading/trailing `-`.
42
+
43
+ - Non-ASCII characters (Japanese etc.) are preserved as-is.
44
+ - If the result is an empty string, use `unnamed-packet` as the slug and notify the user.
45
+
46
+ ### Collision rule
47
+
48
+ - A collision occurs only when the slug matches an existing directory AND that directory's requirements.md `## Source Packet` heading names a **different** packet. Assign a numbered alternative starting at `-2`, and notify the user of the packet-name → directory-name mapping. Never silently overwrite.
49
+ - If `## Source Packet` names the **same** packet, it is not a collision but a re-export: update the drafts in that same directory in place.
50
+
51
+ ## Propagation to impl (strategy X)
52
+
53
+ - Write the tasks hints at the granularity of "**invariant references tied to individual tasks**".
54
+ - Aim: that parent intent and invariants are **transcribed** into each task of the main `tasks.md` that cc-sdd generates. This lets an impl subagent that is invoked in a different session without reading `.intent/` still reference the invariants / Anti-direction via the cc-sdd deliverable (tasks.md).
55
+ - **Responsibility boundary**: intent-planner's responsibility goes only as far as "passing hints in a structure that is easy to transcribe". The actual transcription is left to cc-sdd's tasks generation (do not depend on cc-sdd's behavior). Complete transcription is **not a guarantee, but a probability maximized by structure**.
56
+
57
+ ## Invariants
58
+
59
+ - Do not complete **the main body** of cc-sdd's requirements/design/tasks (drafts/hints only).
60
+ - The tasks hints must always include references to parent intent and invariants.
61
+ - **Never write into another packet's directory** (write only under the target packet's slug directory).
62
+ - Do not intervene in cc-sdd's skills.
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: intent-export-openspec
3
+ description: Convert one chosen packet into a proposal draft + delta spec hints that can be handed to OpenSpec without wasting tokens. Does not intrude on OpenSpec's main generation. Can invoke /opsx:propose when instructed to proceed.
4
+ ---
5
+
6
+ # intent-export-openspec Skill
7
+
8
+ ## Core Mission
9
+ - **Success Criteria**:
10
+ - One target packet is converted into an OpenSpec proposal draft (Why/What Changes/Impact) + delta spec hints
11
+ - The input is limited to the target packet file + the compass's project-universal Invariants/Anti-direction, and the full Tree/Compass is not transcribed into OpenSpec
12
+ - The delta hints carry parent intent / invariant references, forming a propagation structure to impl
13
+ - The output is led by natural-language guidance, and `/opsx:propose` can be invoked when instructed to proceed
14
+ - The output is confined to `.intent/openspec/` and does not touch `.intent/cc-sdd/`
15
+ - No application code has been changed at all
16
+
17
+ ## Execution Steps
18
+
19
+ ### Step 1: Narrow down to one target packet
20
+ - Read `.intent/packets/index.md` and present the active packet candidates. If index.md is absent, build the candidate list directly from the frontmatter of the files under `.intent/packets/active/`, continue, and prompt regeneration of the index. If `.intent/packets/` itself is absent (or `active/` is empty), guide the user to "run `/intent-packets` first" and stop.
21
+ - If a packet is specified by argument, use it; otherwise narrow down to one from the candidates by priority or by asking the user in natural language and waiting for their answer, and read only the file of the confirmed target packet (under `.intent/packets/active/`) — do not bulk-read all packet files.
22
+ - **Draft guard**: when the confirmed target packet's `state` is draft, ask the user in natural language whether to "activate it and continue the export" and wait for their answer; once the user approves, update the frontmatter `state` to active and regenerate `index.md` before continuing (never export a draft as is without confirmation; this activation is the only canonical write the export makes).
23
+ - Read `.intent/mode.local.md` (falling back to `.intent/mode.md` if absent) for the mode state. If both are absent, continue with the standard default and announce it.
24
+
25
+ ### Step 1.5: Enforcement gate (writeback freshness check)
26
+ - From the `## Enforcement (user-managed)` section of the `.intent/mode.md` read in Step 1, check the value of `enforcement`. If it is off, missing, or an invalid value (including mode.md being absent), skip this check and continue to Step 1.6 as today.
27
+ - When it is remind or gate, run `node .intent/scripts/intent-check.mjs` (a read-only script; it creates, modifies, and deletes no files) and follow its stdout.
28
+ - **Interpretation rules for the verdict line**: the stop decision is governed solely by `block=` on the first stdout line (do not re-derive or reinterpret). Whether a warning is needed is decided by `result=stale` or `pending>0`. Even when `result=not-applicable`, use the value of `pending=` from the verdict line as is.
29
+ - When gate and `block=yes`: present the grounds (the pending packet names and the elapsed commit count / threshold; quote intent-check's human-readable lines from the second line onward verbatim), stop the export, and guide the user to run `/intent-writeback`. Then ask the user in natural language whether to "proceed with the export anyway" and wait for their answer; only when the user explicitly instructs to proceed, run the export with a warning attached (the escape hatch for false positives).
30
+ - When remind and a violation is detected (`result=stale` or `pending>0`): present the same grounds as a warning and continue without stopping.
31
+ - Only when intent-check itself cannot run (command execution unavailable, script absent, or exit 2): treat staleness as not-applicable, read `.intent/deltas.md` to check for pending Delta entries (those carrying `- Status: pending`), and enter the same branches above using that result as `pending`.
32
+
33
+ ### Step 1.6: Drift Check (drift-watch)
34
+ - Check the value of `drift-watch` in the `## Drift-watch (user-managed)` section of the `.intent/mode.md` read in Step 1. When it is not `on` (including off, unspecified, invalid value, missing section, or missing mode.md), do not perform this check; continue to Step 1.7 as today (byte-identical to current behavior).
35
+ - Only when it is `on`, read and apply `rules/drift-export-check.md`. The matching of the target packet's proposal/delta hints × compass (North Star / Anti-direction / Invariants), the named presentation of conflicts, appending a `stage: export` entry to drift-log, and resolving the outcome by the user's verdict are all delegated to the rule's procedure (do not duplicate the procedure here).
36
+ - This check is **warn-only and does not stop the export** (only the Step 1.5 enforcement gate can stop; drift-watch never stops because it assumes false positives).
37
+ - Order and orthogonality of the three checkpoints: **enforcement (procedure, may stop, Step 1.5) → drift-watch (direction, never stops, Step 1.6) → Open Questions (deadline, never stops, Step 1.7)**. Their inspection targets are orthogonal (procedure / direction / deadline).
38
+
39
+ ### Step 1.7: Confirm unanswered Open Questions
40
+ - Read and apply `rules/export-questions.md`.
41
+
42
+ ### Step 1.8: Preflight check of the OpenSpec prerequisite (warn only — do not stop)
43
+ - Observe read-only whether the **`openspec/` directory at the repository root** (the OpenSpec tool's marker) exists (Read/Glob; do not push this onto a mechanical check such as `intent-check.mjs`). It is **distinct from `.intent/openspec/` (this skill's own draft output directory)**; do not mistake the output directory for the prerequisite marker.
44
+ - When the repository-root `openspec/` is **absent**: **warn** that OpenSpec may not be set up. Guide: "The OpenSpec prerequisite (the `openspec/` directory at the repository root) was not found. Set up OpenSpec, or — if a readable artifact is the goal — the format-axis projection (an exit to a readable Spec) is also available." (The choice of exit follows the exit decision lane in `rules/export-route.md`; this SKILL does not name other export/projection skills' commands.) **Do not stop the draft generation** (continue to Step 2 onward).
45
+ - When the repository-root `openspec/` **exists**: emit nothing and continue to Step 2 (as before — no warn).
46
+ - This check is **warn only — it does not stop the export** (only the Step 1.5 enforcement gate can stop; the preflight follows drift-watch's false-positive-tolerant stance and does not stop — it does not foreclose adding `openspec/` later). Because OpenSpec's entry contract `/opsx:propose` cannot be observed read-only, the repository-root `openspec/` is used as a proxy marker for it being set up.
47
+
48
+ ### Step 2: Apply the mapping rules
49
+ - Read and apply `rules/map-openspec.md`.
50
+ - The input is only the one target packet file (including the packet-specific invariants in Safety / Invariants) + the project-universal Invariants/Anti-direction of `.intent/intent-compass.md` (do not read the full Tree or other packets. Only when direction is needed, reference a summary of Tree L0–L1).
51
+
52
+ ### Step 3: Generate the draft
53
+ - Write the drafts under the per-packet directory `.intent/openspec/<slug>/`. The slug derivation and collision handling follow the "Output layout" section of `rules/map-openspec.md`. Continuing to export multiple packets never overwrites another packet's directory.
54
+ - Write the proposal draft (`## Why` / `## What Changes` / `## Impact`) into `.intent/openspec/<slug>/proposal.md`, shaped so the minimal and always-valid "change description" text for `/opsx:propose` can be derived from its opening.
55
+ - Write the delta spec hint skeleton into `.intent/openspec/<slug>/spec-delta.md` (`## ADDED Requirements` by default + conditional `## MODIFIED Requirements` / `## REMOVED Requirements`, with the `### Requirement: <name>` / `#### Scenario: <name>` skeleton).
56
+ - Do not complete the OpenSpec main body. Keep the delta to a hint skeleton; the reconciliation and completion are delegated to OpenSpec (from `/opsx:propose` onward) (INV4). Always leave parent intent and invariant references in the proposal/delta.
57
+ - Once the drafts are generated, write the export record into a **per-packet split file** `.intent/export-log/<packet-slug>.md` (following CONTRACT "Split and archive convention for append-only records"; since both cc-sdd and openspec write to each packet's file under the same split convention, the old tail-append collision on "the single log shared across export targets" disappears structurally). Derive `<packet-slug>` from the packet name via the existing slug rule (`intent-packets/rules/packet-format.md`) — do not create new/sequential numbering. The file holds the same table header as the scaffold (`| packet | exported_at | commit |`) plus the row `| <packet name> | <export datetime (ISO 8601 UTC)> | <commit hash> |` (append a row if the file exists; do not erase past rows). Obtain the commit hash by running `git rev-parse --short HEAD` (read-only); if it cannot be obtained, record `-`. Create the `.intent/export-log/` directory if absent.
58
+ - Then regenerate the old `.intent/export-log.md` as a **generated active mirror**: concatenate all data rows from `.intent/export-log/*.md` in `exported_at` ascending order and overwrite the mirror with the scaffold header + all rows (the split files are the source of truth; the mirror is derived, never hand-edited). This keeps single-file readers (status / validate / writeback / intent-check) from breaking. The mirror is folded in the later slice (wire) once reader cross-following is complete.
59
+
60
+ ### Step 4: Guide the handoff (natural-language led)
61
+ - The lead of the output is natural-language guidance: show the paths of the target packet's `.intent/openspec/<slug>/proposal.md` and `spec-delta.md` and confirm "may this be handed to OpenSpec as is" by asking the user in natural language and waiting for their answer.
62
+ - When the user instructs to proceed, read the minimal change description from the target packet's `.intent/openspec/<slug>/proposal.md` and invoke `/opsx:propose` with that as the argument (do not force the user to copy-paste).
63
+ - As a fallback, also include a copyable change-description block for `/opsx:propose` (not the lead).
64
+ - **Delegation goes only up to invoking `/opsx:propose`**. The subsequent apply / sync / archive workflows follow OpenSpec, and we do not push ahead automatically.
65
+ - **Make the return path explicit (the entry to the writeback phase)**: at the end of the guidance, add one line that once the OpenSpec implementation has gone around once (once learnings emerge from the reality of implementation), they are returned to the canonical deliverables via `/intent-writeback`. Do not settle for writing post-implementation learnings directly into the packet file as Evidence; always go through writeback (via a delta). This guidance makes the phase boundary explicit to the user: "pre-implementation drafting (compass/packets write canonical directly)" vs. "post-implementation extraction (writeback via a delta)".
66
+
67
+ ## Output Description
68
+ - The target packet's `.intent/openspec/<slug>/{proposal, spec-delta}.md` drafts (the `/opsx:propose` input proposal + delta hint skeleton)
69
+ - One export-record row appended to `.intent/export-log.md`
70
+ - The target packet file's `state` update and the regeneration of `.intent/packets/index.md` when a draft was activated (omitted when none apply)
71
+ - Confirmation result for unanswered `[by export]` questions (the questions presented and the user's decision; omitted when none apply)
72
+ - Confirmation of whether it may be handed to OpenSpec (natural-language guidance; the lead)
73
+ - Copy block for `/opsx:propose` (fallback; secondary)
74
+ - Points to confirm before implementation
75
+ - Return-path guidance after the implementation goes around once (return to canonical via `/intent-writeback`; do not settle for writing Evidence directly into the packet)
76
+
77
+ ## Safety & Fallback
78
+ - If `.intent/packets/` is absent (or `active/` is empty), stop and guide the user to `/intent-packets`.
79
+ - The absence of index.md does not stop; build the candidates directly from the files under `active/`, continue, and prompt regeneration of the index.
80
+ - The only canonical write is the draft-guard activation (`state` update + `index.md` regeneration), and only with the user's approval. Never rewrite intent-tree / intent-compass / packet bodies.
81
+ - The absence of mode.md does not stop; continue with the standard default and announce it.
82
+ - The enforcement check is fail-open: even when intent-check cannot run, do not block the export. The export stops only when enforcement is gate and the verdict line says `block=yes`, or when the unrunnable fallback finds pending deltas under gate; even then the user's explicit instruction to proceed lets it run.
83
+ - The Open Questions check is a confirmation, not a stop; the user's explicit instruction to proceed lets the export run.
84
+ - Do not complete the main body of OpenSpec's proposal / delta spec (drafts/hint skeleton only).
85
+ - Do not auto-invoke the OpenSpec workflow beyond `/opsx:propose` (apply / sync / archive, etc.).
86
+ - Confine the output to `.intent/openspec/` and do not write into `.intent/cc-sdd/`.
87
+ - Do not change application code (INV6. Invoking other skills is a concept distinct from INV6 and is allowed).
@@ -0,0 +1,50 @@
1
+ # Drift Export Check
2
+
3
+ The matching logic used at Step 1.6 of `/intent-export-openspec`: the target packet's design/tasks hints against the compass. It runs only when `drift-watch: on` (off / absent / invalid values do nothing). It sits after the enforcement gate (Step 1.5, which may stop) and before the Open Questions check (Step 1.7, which does not stop), and warns—right before handoff to OpenSpec, the moment before going-back stops working—whether the packet has drifted from the compass's direction.
4
+
5
+ ## The basis of the matching is the compass
6
+
7
+ - **The basis of the matching is the North Star / Anti-direction / Invariants of `.intent/intent-compass.md`.** At the export stage the compass already exists, so here the basis is the compass, not the pattern catalog (`.intent/drift-patterns.md`) (the discover terrain diagnosis has neither compass nor packet yet, so it uses the pattern catalog as its basis. Export is its sibling stage, and the difference is that the basis is the compass).
8
+ - The export matching is **premised on false-positives**. "Hitting" a compass element is not a confirmation of drift. We build in from the start that a valid design may be wrongly caught (false-positive), and we record swings and misses too.
9
+ - **This matching is a direction checkpoint, and it does not stop.** Its inspection target is orthogonal to the enforcement gate (a procedure checkpoint that may stop). We never stop export over a drift detection (only the Step 1.5 enforcement gate may stop).
10
+
11
+ ## Procedure
12
+
13
+ 1. **Obtain the inputs**
14
+ - Take the target packet's **design/tasks hint generation content** (the body of the draft export is about to generate) as the input.
15
+ - Read the **North Star** / **Anti-direction** / **Invariants** (project-universal Invariants) of `.intent/intent-compass.md`.
16
+ - **When the compass is absent / unfilled**: skip the export matching and inform the user of that fact (do not stop / do not write to drift-log either). Do not run the remaining steps.
17
+
18
+ 2. **Match the design/tasks hints against the compass**
19
+ - Hold the design/tasks hints about to be generated against the compass's **Invariants** (do they breach a constraint that must not be broken?), **Anti-direction** (are they leaning toward a direction decided to be avoided?), and **North Star** (have they drifted from the final state?).
20
+ - This is a **semantic match**, not a mechanical decision. Premised on false-positives, pick it up if in doubt.
21
+
22
+ 3. **When there is a conflict**
23
+ - Present a **warning only** to the user—**do not stop export**. Name what was breached (which Invariant / Anti-direction / North Star) and which part of the design/tasks hints is off.
24
+ - Append one entry to `drift-log.md` (see the append procedure below). The values are:
25
+ - `pattern: <a matching drift-patterns id | uncatalogued:<short name> | ->`(an id if identifiable; `uncatalogued:<short name>` for an actual drift outside the catalog; `-` if undeterminable)
26
+ - `stage: export`
27
+ - `packet: <target packet name>`
28
+ - `mechanism: compass-anti-direction`(when an Anti-direction was breached)or `compass-invariant`(when an Invariant was breached; pick by which compass element was breached)
29
+ - `outcome: caught`(a **draft**. This is drift-watch's estimate; the verdict is decided by the user's `user-verdict` and the resolution below)
30
+ - `user-verdict: unjudged`
31
+ - `recorded_at: <ISO 8601>`
32
+ - `commit: <short hash | ->`
33
+ - `note: <1-2 lines>`(what was breached and what was warned about)
34
+ - If multiple places conflict, append one entry per conflict.
35
+
36
+ 4. **outcome is confirmed by the user's judgment (resolving the draft)**
37
+ - Step 3 only **drafts** `caught` for `outcome`; the final value is decided by the user's judgment:
38
+ - When the user heeds the warning and pulls the design back → `caught` (capture succeeded, the "worked" family)
39
+ - When the user ignores it and passes it through anyway → `missed` (could not prevent it, it got through, the "did not work" family)
40
+ - When the design was actually valid and it was a false alarm → `false-positive` (it was a false alarm, the "did not work" family)
41
+ - `user-verdict` backs the final value: `valid` if the point was sound / `false-alarm` if it was a false alarm / `unjudged` if not judged. Even if the user has not judged it, it stays `unjudged` and remains a target for recording and tallying.
42
+
43
+ ## The append procedure to drift-log
44
+
45
+ - **Write in split form (CONTRACT "Split and archive convention for append-only records")**: drift-log is event-origin, so instead of appending to the end of a single `drift-log.md`, write one entry to a **per-date+slug split file** `drift-log/<date>-<slug>.md`. `<date>` is the recorded_at date; `<slug>` is derived from the pattern (the event) via the existing slug rule (`intent-packets/rules/packet-format.md`) — do not create new/sequential numbering. Because a different event touches a different file, tail collisions disappear by construction. Never rewrite or delete an existing entry (**append-only**).
46
+ - **Always write all 9 keys in fixed order**: `pattern` → `stage` → `packet` → `mechanism` → `outcome` → `user-verdict` → `recorded_at` → `commit` → `note`. Do not write an entry that is missing even one of the 9 keys.
47
+ - **recorded_at**: write the recording time in ISO 8601 (transaction time).
48
+ - **commit**: write the result of `git rev-parse --short HEAD`. When it cannot be obtained (non-repository, git CLI absent, etc.), use `-` (fail-open; recording continues).
49
+ - **When the `drift-log/` directory is absent**: create the directory, then write the split file. An old single `drift-log.md`, if still present, can be read side-by-side by readers (migration is handled by this slice's migration step).
50
+ - Follow the sample in the "Entry format" section of `.intent/drift-log.md` (`### drift-log entry`) for the entry format.
@@ -0,0 +1,23 @@
1
+ # Export Questions Check
2
+
3
+ The procedure for confirming unanswered `[by export]` Open Questions before running the export. Used at Step 1.7 of `/intent-export-openspec`. All dialogue is conducted as confirmation with the user (the means of confirmation follows the SKILL.md conventions).
4
+
5
+ ## Detection
6
+
7
+ - Read the Open Questions sections of `.intent/intent-tree.md` and `.intent/intent-compass.md`, and detect questions containing `[by export]`. A question remaining in the section is treated as unanswered.
8
+ - Detection targets only these two files. The canonical source of questions is the Open Questions sections of both files; the Deferred section of `.intent/packets/plan.md` is a record of intentional deferrals, not questions, and is therefore out of scope.
9
+ - **Do not reference the enforcement setting (the Enforcement section of `.intent/mode.md`)** (this operates independently of the Step 1.5 enforcement gate).
10
+
11
+ ## Procedure
12
+
13
+ 1. **When nothing is detected (including older scaffolds without the tag convention)**
14
+ - Present nothing and proceed to the next step (no behavior change).
15
+
16
+ 2. **When questions are detected**
17
+ - Present the list of detected questions.
18
+ - Confirm with the user whether to "answer them before exporting, or proceed as is".
19
+ - This is a confirmation, not a stop. When the user explicitly instructs to proceed, run the export.
20
+
21
+ ## Discipline
22
+
23
+ - Do not change code.
@@ -0,0 +1,75 @@
1
+ # Mapping: packet → OpenSpec
2
+
3
+ The rules for converting one chosen packet into an OpenSpec proposal draft + delta spec hint. Used by the `intent-export-openspec` skill. This is one of the per-export-target mappings (for OpenSpec). To add another target (e.g. cc-sdd), add `rules/map-<target>.md` and create a corresponding `intent-export-<target>` skill (the seam). Do not change `map-cc-sdd`.
4
+
5
+ ## Input scope (strict / information-source contract)
6
+
7
+ - Read only **the one target packet** and **the Invariants / Anti-direction of `.intent/intent-compass.md`**.
8
+ - **Do not read** the full Intent Tree or other packets. Only when the overall direction is needed, reference Tree L0–L1 **as a summary** in a pinpoint manner (no body transcription).
9
+ - This keeps the amount of information passed to OpenSpec to about 1 packet's worth (preventing token explosion).
10
+ - **Do not quote/transcribe other packets or the Intent Tree body** into the deliverables (proposal / delta). Limit sources to the target packet and the compass.
11
+
12
+ ## Output (drafts of 2 files / do not create the main body)
13
+
14
+ Write the drafts under the per-packet directory `.intent/openspec/<packet-slug>/` (slug derivation is in the next section, "Output layout"). Align **one-directionally** with OpenSpec's entry contract (`/opsx:propose <natural-language change description>`, the proposal's Why/What Changes/Impact, the delta spec's ADDED/MODIFIED/REMOVED + `### Requirement:` / `#### Scenario:`). Do not depend on OpenSpec's internal implementation.
15
+
16
+ ### `.intent/openspec/<packet-slug>/proposal.md`
17
+
18
+ The **proposal draft** fed into OpenSpec's `/opsx:propose`. Always include the three headings.
19
+
20
+ - `## Why` — Transcribe the packet's intent / Why and state the **parent intent** (the higher-level aim this packet serves). Describe why this change is needed now.
21
+ - `## What Changes` — List the packet's deliverables / Scope as **bullets**. State the compass's **Anti-direction** within this section **as out-of-scope (what not to do)**.
22
+ - `## Impact` — The specs / contracts this change affects and the constraints to protect. Transcribe the compass's **Invariants**, listing the affected scope (contracts / capabilities touched) alongside the invariants.
23
+ - **primary output**: Write it so that a **minimal and always-valid change description** that can be fed into `/opsx:propose` is derivable from the top of the proposal (the structured proposal is added value on top of that).
24
+ - Limit the information source to the target packet (Why/Scope/Expected Behavior/Safety) and the compass's Invariants / Anti-direction.
25
+
26
+ ### `.intent/openspec/<packet-slug>/spec-delta.md`
27
+
28
+ A **hint skeleton** for OpenSpec's delta spec (not the main body).
29
+
30
+ - Map the packet's acceptance criteria / Expected Behavior onto the skeleton of `### Requirement: <name>` (**normative SHALL / MUST statements**) and `#### Scenario: <name>` (**GIVEN / WHEN / THEN**).
31
+ - **Seed the heading syntax accurately** (`### Requirement:` / `#### Scenario:`) to guide toward a structure that passes OpenSpec's validate.
32
+ - Follow the dispatch rule in the next section, "Delta dispatch".
33
+ - Do not complete the main body. Reconciliation and completion are left to OpenSpec (from `/opsx:propose` onward) (INV4).
34
+
35
+ ## Delta dispatch (ADDED / MODIFIED / REMOVED)
36
+
37
+ - **Default**: Place all of the packet's acceptance criteria under `## ADDED Requirements`.
38
+ - **Conditional**: Only when the packet's **Scope** or the compass's **Anti-direction** **explicitly references a change/removal** of an existing capability or behavior, place a hint of "**the name of the capability changed + the direction of change**" under `## MODIFIED Requirements` / `## REMOVED Requirements`.
39
+ - MODIFIED / REMOVED stay as identification hints for the change target; reconciliation with the existing spec and finalization are left to OpenSpec. If there is no explicit reference, do not place MODIFIED / REMOVED.
40
+
41
+ ## Output layout (slug rule and collision rule)
42
+
43
+ ### Slug rule (deterministic)
44
+
45
+ Derive the directory name (slug) from the packet name **deterministically** in the following order. The same packet name always yields the same slug. This rule is **identical** to the slug rule in `packet-format.md` and `map-cc-sdd` (aligning output-path derivation across export targets).
46
+
47
+ 1. Apply NFC normalization.
48
+ 2. Trim leading/trailing whitespace.
49
+ 3. Lowercase ASCII uppercase letters.
50
+ 4. Replace whitespace and path-dangerous characters (`/ \ : * ? " < > |`) with `-`.
51
+ 5. Collapse consecutive `-` into one.
52
+ 6. Strip leading/trailing `-`.
53
+
54
+ - Non-ASCII characters (Japanese etc.) are preserved as-is.
55
+ - If the result is an empty string, use `unnamed-packet` as the slug and notify the user.
56
+
57
+ ### Collision rule
58
+
59
+ - A collision occurs only when the slug matches an existing directory AND that directory's proposal.md points to a **different** packet name. Assign a numbered alternative starting at `-2`, and notify the user of the packet-name → directory-name mapping. Never silently overwrite.
60
+ - If it points to the **same** packet name, it is not a collision but a re-export: update the drafts in that same directory in place.
61
+
62
+ ## Intent propagation (carry it into the deliverables OpenSpec generates)
63
+
64
+ - State the **parent intent** in the proposal's `## Why` and the **invariants** in `## Impact`, passing them in a structure that is easy to take into the deliverables (spec / design / tasks) OpenSpec generates.
65
+ - Render the compass's **Invariants** into OpenSpec's **normative statements (SHALL / MUST)** and the constraints of `## Impact`. When an invariant is relevant to a delta's `### Requirement:`, seed that constraint as a normative statement there too.
66
+ - Aim: that parent intent and invariants keep working even at the stage of moving from an OpenSpec change to implementation, so that local-optimum prevention does not evaporate via OpenSpec either.
67
+ - **Responsibility boundary**: intent-planner's responsibility goes only as far as "propagating parent intent / invariants **through the structure of what is passed alone**". Do not intervene in OpenSpec's internal implementation. The actual incorporation is left to OpenSpec (do not depend on OpenSpec's behavior). Complete incorporation is **not a guarantee, but a probability maximized by structure**.
68
+
69
+ ## Invariants
70
+
71
+ - Do not complete **the main body** of OpenSpec's proposal / delta spec (drafts / hint skeleton only). Completing the delta is left to `/opsx:propose` onward (INV4).
72
+ - The proposal's `## Why` / `## Impact` must always include references to parent intent and invariants.
73
+ - Do not quote/transcribe other packets or the Intent Tree body into the deliverables (limit sources to the target packet + compass).
74
+ - **Never write into another packet's directory** (write only under the target packet's slug directory).
75
+ - Do not intervene in OpenSpec's skills / internal implementation. Confine output to `.intent/openspec/` and do not touch `.intent/cc-sdd/`.