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,139 @@
1
+ # Writeback Protocol (canonical rules for intent-writeback)
2
+
3
+ The source of truth for `/intent-writeback`'s decisions and procedure. SKILL.md holds only the skeleton of the steps; decisions follow this file. "Canonical deliverables" means intent-tree.md / intent-compass.md / the files under `.intent/packets/` (the packet files and plan.md).
4
+
5
+ ## 1. Target identification (4-tier priority + fallback)
6
+
7
+ Identify exactly one target packet by first-match from the top. When the target is identified via a fallback (tier 3 or later), announce that fact (which tier identified it) in the user-facing output.
8
+
9
+ 1. **Packet name from the argument**: if a packet is specified by argument, use it as the target.
10
+ 2. **The latest row of export-log.md (canonical)**: use the packet name of the latest data row (= the last data row of the `| packet | exported_at | commit |` table) in `.intent/export-log.md`. In the steady state where export-log exists, the target is finalized here.
11
+ 3. **"## Source Packet" heading in the drafts (fallback)**: if export-log.md is absent or its latest row cannot be parsed, read the packet name from the "## Source Packet" heading in `.intent/cc-sdd/<packet-slug>/requirements.md`. Adopt that heading only when **exactly one** packet directory exists; if multiple exist, list the heading of each directory as candidates and go straight to 4. This tier is a relief for the transitional period where export-log is not yet established (e.g., right after the first export); in the steady state the target is finalized at 2.
12
+ 4. **Text-matching fallback (user confirmation required)**: raise candidates by text-matching the draft bodies against the packet names (frontmatter `name`) in index.md / the packet files under `active/`, then ask the user in natural language and wait for the answer. Never finalize the target without confirmation.
13
+
14
+ If the target still cannot be identified, present the situation (that it was not found and where you looked), ask the user to specify the write-back target packet, and stop.
15
+
16
+ **Directory identification rule (packet name → directory)**: the source of truth for identifying a directory from a packet name is "the `## Source Packet` heading in requirements.md inside the directory matches the packet name". Slug computation is a fast path for searching; even if the slug matches, do not identify the directory as that packet's when the heading does not match.
17
+
18
+ **Archive exception for target resolution**: if the resolved target packet's file is not under `active/` (a preceding supersede, completion already processed, etc.), refer to `archive/` **explicitly** and identify the file by matching the frontmatter `name` (the only explicit exception to the principle of "normally never read `archive/`"). Once identified, report to the user the fact that the packet is done / superseded. For a write-back to an archived packet that is not done, do not reflect into the target packet file; redirect the learnings to intent-tree.md / intent-compass.md / the successor packet (the packet file `superseded_by` points to).
19
+
20
+ ## 2. Learning extraction perspectives (5 kinds, tags 1:1)
21
+
22
+ Cross-check the target packet's definition (the target packet file), the cc-sdd drafts (including the Intent-derived constraints), and intent-compass.md against the implementation reality (the codebase, tests, and `.kiro/specs/`; all read-only), and extract learnings from the following 5 perspectives. Tags map 1:1 to the perspectives. When reading the implementation reality, also include in the grep cross-check scope the code modules (file names, module names) named by Decision Rules (intent-compass.md), and you may extract a divergence between a Rule's main text and the implementation as an `[invariant-violation]`.
23
+
24
+ | Tag | Perspective |
25
+ |------|------|
26
+ | `[decision]` | A new decision (a judgment made during implementation that is not written in the packet definition) |
27
+ | `[invariant-violation]` | A discovered invariant violation (a conflict between existing Invariants and the implementation reality) |
28
+ | `[implicit-behavior]` | Implicit behavior not written in the intent (reverse-extracted from the implementation) |
29
+ | `[deferred-resolved]` | A resolved Deferred |
30
+ | `[question]` | A new unresolved Question |
31
+
32
+ During learning extraction, cross-check against the **Revisit when** field of the Decision Rules in intent-compass.md, and on each learning line that matches a Revisit when condition, append a reference to the corresponding Decision (e.g. `[decision] <a new decision> (Revisit matched: <summary of the corresponding Decision's Context>)`). The note is free text within the learning line; the canonical deltas.md template (§9) is not changed.
33
+
34
+ ## 3. Two-stage protocol
35
+
36
+ **The scope of the constraint in this §3 is limited to the writeback phase (the stage of extracting learnings back from reality after implementation and returning them to the canonical deliverables).** The drafting skills run **before** implementation — `/intent-compass` (which directly Writes the compass's North Star / Anti-direction / Invariants / Decision Rules) and `/intent-packets` (which directly drafts packet files) — are out of scope of this constraint (their writing canonical directly is the normal, intended behavior). What this constraint forbids is "writing post-implementation learnings into the canonical deliverables directly, bypassing a delta", not pre-implementation drafting.
37
+
38
+ In the writeback phase, never editing the canonical deliverables directly is the backbone of this skill. Always go through the following two stages.
39
+
40
+ Note: once you enter the stage of "implementation is complete and you are returning learnings from that reality to the canonical deliverables", that is the entry to the writeback phase. Do not settle for writing Evidence directly into the packet file; go through this protocol (via a delta).
41
+
42
+ ### Stage 1: delta recording (canonical untouched)
43
+
44
+ - Record the extracted learnings into a **per-packet split file** `.intent/deltas/<packet-slug>.md` as a new entry (Status: pending) (CONTRACT "Split and archive convention for append-only records"; `<packet-slug>` is derived from the target packet name via the existing slug rule — no new numbering). Create the `deltas/` directory if absent. Do not touch the canonical deliverables at this stage at all. Move terminal (promoted/closed) past entries into `.intent/deltas/archive/<year>/` to keep the active surface thin (move all before folding the old file; migration is handled by this slice's migration step).
45
+ - Even if the user approves nothing, the entry remains as pending (automatic rewriting without approval is forbidden).
46
+
47
+ ### Stage 2: approval → per-item promotion
48
+
49
+ Vary the approval granularity by the kind of learning. Do not ask about everything one item at a time with equal weight (in practice most learnings are records of "the implementation already behaves this way" with no room for yes/no, so asking about every item uniformly turns approval into a ritual).
50
+
51
+ - **Gated items (explicit approval mandatory)**: the following two kinds affect the canonical criteria and invariants, so always ask the user about each item in natural language and wait for the answer.
52
+ - `[invariant-violation]` (a discovered invariant violation; the user decides the response policy such as "fix the code / keep it as a record only").
53
+ - **`[decision]` that changes Decision Rules (the compass ADR)** (those falling under the ADR promotion in §4: replacing or adding an existing Decision, including ones that match a Revisit when).
54
+ - **Default bulk promotion (L3-append kind)**: learnings other than the above (a `[decision]` / `[implicit-behavior]` / `[deferred-resolved]` that only appends to intent-tree.md L3, and `[question]` transcription into Open Questions) are presented with their reflection targets as a list, and **after asking the user to name any item they want to hold back, are promoted in bulk if none is named**. Do not ask for a per-item yes/no.
55
+ - On either path, "automatic rewriting without approval is forbidden" (the backbone of §3's opening) is preserved because every item is already recorded as a delta in Stage 1 and the user is given one chance to hold items back. Items the user holds back are treated as declined and given a §5 two-value tag.
56
+ - Reflect the approved or bulk-promoted items into the canonical deliverables, and record `Status: promoted (<promotion date>)` and the reflection targets in the delta entry.
57
+ - Finalizing the state: **approving one or more items and reflecting them into the canonical deliverables → `promoted`**. **Declining every item as "rejected" → `closed`**. Both are terminal states. If items remain undecided including on-hold ones, keep pending.
58
+
59
+ ## 4. ADR promotion rules (promotions that change Decision Rules)
60
+
61
+ A promotion that changes the criteria (Decision Rules) fully complies with the existing ADR form of intent-compass.md.
62
+
63
+ - **Add a new entry**: **Context** (the question and situation) / **Decision** (the option taken) / **Why** (the criteria) / **Alternatives considered** (a summary of the alternatives examined and why they were rejected) / **Consequences** (connection to Invariants and Anti-direction) / **Revisit when** (the conditions for revisiting; if they cannot be determined, explicitly record "undetermined"). **The Why field is mandatory** (never omit it).
64
+ - Put a **superseded note** on the old entry being replaced (append to the old entry that it is superseded, with a reference to its replacement).
65
+ - Move the old entry carrying the superseded note **with its 6 fields intact** (no replacement with a summary) into the retired Decision Rule's **per-rule file** `.intent/compass-archive/<rule-slug>.md` (CONTRACT "Split and archive convention for append-only records"; `<rule-slug>` is derived from the retired Decision Rule's identifier via the existing slug rule — no new numbering; re-superseding the same rule collects into the same file). Create the `compass-archive/` directory if absent. Do not delete the old entry (move only; the 6 fields stay byte-unchanged). Active Decision Rules entries stay directly written inside intent-compass.md as before (no pointer indirection to another file).
66
+ - **Do not introduce a custom Supersedes field** (do not create a dedicated field on the new entry side; the note goes on the old entry side).
67
+ - Old 4-field entries recorded before the introduction of the 6-field format (those without Alternatives considered / Revisit when) remain valid; do not treat the missing fields as an error, flag them, or rewrite them.
68
+
69
+ ## 5. Final updates of declined-item tags (writeback's responsibility)
70
+
71
+ - Always put one of the two tags on learnings that were not promoted: **rejected (no re-proposal)** | **on-hold (re-propose at the next writeback)**.
72
+ - On-hold items are re-proposed at the next writeback run. The finalizing operation of **reflecting the re-proposal result (promote / confirm rejection / keep on hold) into the tag of the corresponding declined item of the old entry is writeback's responsibility**. `/intent-improve` only nudges the user to deal with on-hold items and never performs the final tag update.
73
+
74
+ ## 6. Digesting [question]
75
+
76
+ - A `[question]` learning is considered digested once transcribed into the Open Questions of intent-tree.md.
77
+ - Record the transcription target (intent-tree.md Open Questions) as the reflection target in the promotion record.
78
+
79
+ ## 7. Completion as one sequence of operations (mark done, move to archive, regenerate index)
80
+
81
+ Once the write-back of the target packet is complete (after the delta's terminal state is finalized), perform the packet's completion as the following **fixed-order sequence of operations** (never leave a done packet lingering under `active/`).
82
+
83
+ 1. Fill in `state: done`, `closed_at` (completion date), and `spec_refs` in the frontmatter of the target packet file. `spec_refs` is the corresponding spec/feature name(s); raise candidates by cross-checking against the specs in progress under `.kiro/specs/` and finalize the entry with user confirmation.
84
+ 2. Move the packet file to `archive/<year of closed_at>/` (never delete; move only).
85
+ 3. Regenerate `index.md`: build the `| packet_id | name | state | summary |` table in ascending `packet_id` order from the frontmatter of all packet files under `active/` only (when `active/` is empty, the header-only table is the canonical form).
86
+
87
+ If a done packet remains under `active/` due to an interruption or the like, the consistency check of `/intent-status` reports it as a lingering violation.
88
+
89
+ ## 8. Presenting past entries (repeated write-backs)
90
+
91
+ - **Reading cross-reads in split form (CONTRACT "split / archive discipline for append-only records"; the same discipline as `intent-overview`'s `aggregate-sources.md` and `intent-status`'s decision-table footnote 10)**: when reading past entries of `deltas` / `export-log`, cross-read in the order the split form `.intent/<rec>/*.md` set (source of truth if present; natural-key ascending) → read-fallback to the old `.intent/<rec>.md` (the generated mirror) if absent. When the split form and the old single mirror coexist, treat **the split form as the source of truth** and do not double-count the mirror. archive (`.intent/<rec>/archive/`) is read as history (not mixed into the active tally). This reading is a path separate from writing (the split writes in §4), and the missed-writeback cross-check and the past-entry listing return the same result before and after the split (behavior-preserving).
92
+ - At startup, always present the list of past delta entries of the target packet (including declined items with the "on-hold" tag; collected via the split-form cross-read above).
93
+ - Writing back the same packet again (after re-export / re-implementation) appends a **new entry** without rewriting existing entries (history is preserved).
94
+ - The mechanical check for "does a corresponding delta exist" is valid **only for the first cycle**. From the second cycle on, the user decides whether a write-back is needed after being presented the list of past entries.
95
+ - Even after writeback completes, the target packet's drafts (`.intent/cc-sdd/<packet-slug>/`) are **never deleted** (they persist per packet). Enumerate missed write-backs by cross-checking all rows of export-log (split-form cross-read) × the surviving `.intent/cc-sdd/<packet-slug>/` drafts × deltas (split-form cross-read).
96
+
97
+ ## 9. Canonical deltas.md template (the source of truth)
98
+
99
+ The following is **the source of truth** of the canonical deltas.md template; the scaffold (the initial content of the distributed `.intent/deltas.md`) is its copy. When changing the heading structure, always change here first.
100
+
101
+ - In environments without `.intent/deltas.md` (existing users), create it anew from this template at the first run.
102
+ - **Never overwrite an existing deltas.md** (non-destructive). On existing files, only append entries and update Status and tags.
103
+
104
+ ```markdown
105
+ # Intent Deltas
106
+
107
+ > Recorded by `/intent-writeback`, referenced by `/intent-status` and `/intent-improve`. The canonical deliverables (intent-tree.md / intent-compass.md / the packet files and plan.md under `.intent/packets/`) are updated after the fact only through these deltas.
108
+
109
+ ## How this file operates
110
+
111
+ - Write-back is two-staged: `/intent-writeback` first records learnings here as a delta (it never edits the canonical deliverables directly), and only the items the user approves are promoted into the canonical deliverables.
112
+ - One write-back of one packet = one entry. Writing back the same packet again (after re-export / re-implementation) appends a new entry (history is preserved). The mechanical check for "does a corresponding delta exist" is valid only for the first cycle; from the second cycle on, the user decides whether a write-back is needed by reviewing the list of past entries.
113
+ - Draft retention (per-packet directories): the drafts under `.intent/cc-sdd/<packet-slug>/` persist per packet (untracked by Git, local-only). Completing a write-back does not delete the drafts. The export history is recorded in `.intent/export-log.md` (one row per export with packet name, datetime, and commit), and missed write-backs of previously exported packets are enumerated by cross-checking all rows of export-log.md × the surviving `.intent/cc-sdd/<packet-slug>/` drafts × this file.
114
+
115
+ ## State semantics
116
+
117
+ - `pending`: recorded, not yet promoted.
118
+ - `promoted` / `closed` are terminal states. Approving one or more items and reflecting them into the canonical deliverables → `promoted`; declining every item as "rejected" → `closed`.
119
+ - Declined items require one of the two tags: "rejected (no re-proposal) | on-hold (re-propose at the next writeback)". Only on-hold items become re-proposal targets at the next `/intent-writeback` run (and review targets for `/intent-improve`), and the final tag update (promote / confirm rejection / keep on hold) is done by `/intent-writeback`.
120
+ - A `[question]` learning is considered digested once transcribed into the Open Questions of intent-tree.md (record the transcription target in the promotion record's reflection target).
121
+
122
+ ## Delta: <packet-name> — <ISO 8601 date>
123
+
124
+ - Status: pending | promoted (<promotion date>) | closed (<close date>)
125
+ - Source: latest row of export-log.md | Source Packet in .intent/cc-sdd/<packet-slug>/ | specified by the user
126
+
127
+ ### Learnings
128
+
129
+ - [decision] <a new decision>
130
+ - [invariant-violation] <a discovered invariant violation>
131
+ - [implicit-behavior] <implicit behavior not written in the intent>
132
+ - [deferred-resolved] <a resolved Deferred>
133
+ - [question] <a new unresolved Question>
134
+
135
+ ### Promotion record (when promoted / closed)
136
+
137
+ - Reflected into: a new entry in intent-compass.md Decision Rules (with a superseded note on the old entry) / intent-tree.md L3 / the target packet file (under active/) / the Deferred section of plan.md (with a resolution note)
138
+ - Declined: <learnings not promoted> — rejected (no re-proposal) | on-hold (re-propose at the next writeback)
139
+ ```
@@ -0,0 +1,118 @@
1
+ # Intent Planning Workflow
2
+
3
+ This directory is a lightweight Intent Planning workflow for large refactors and architecture changes.
4
+
5
+ Intentionally, it is neither a CLI nor a full IDD state machine. It exists so that, before implementation, the human and Claude align on "the overall intent" and "a unified design policy" at good moments, and to prevent Claude from escaping into locally-optimal quick fixes. It complements the step just before cc-sdd creates a spec for an individual feature.
6
+
7
+ ## Purpose
8
+
9
+ Before implementation, clarify the following.
10
+
11
+ 1. Intent Tree (`intent-tree.md`)
12
+ 2. Intent Compass (`intent-compass.md`; superseded Decision Rules are moved into `compass-archive.md`)
13
+ 3. Packet Plan (`packets/` — the packet files under `active/` plus `plan.md` and `index.md`; 1 packet = 1 file, and completed packets move to `archive/`)
14
+ 4. cc-sdd requirements / design / tasks drafts (per-packet `cc-sdd/<slug>/` directories; local drafts untracked by Git, except the README)
15
+
16
+ ## Workflow
17
+
18
+ 1. Run `/intent-discover`
19
+ 2. Review `intent-tree.md` (the mode and the designer-questions delegation are also confirmed)
20
+ 3. Run `/intent-compass`
21
+ 4. Review `intent-compass.md`
22
+ 5. Run `/intent-packets`
23
+ 6. Review `packets/` (`plan.md` and the packet files under `active/`)
24
+ 7. Run `/intent-export-cc-sdd`
25
+ 8. Review the cc-sdd deliverables before proceeding to implementation
26
+
27
+ ## Lifecycle (keep growing the intent)
28
+
29
+ The workflow above is the "planning" phase. After export, the intent is not disposable; keep growing it through the following cycle.
30
+
31
+ - Plan: `/intent-discover` → `/intent-compass` → `/intent-packets` → `/intent-export-cc-sdd`
32
+ - Implement: implement with cc-sdd
33
+ - Maintain: `/intent-writeback` (feed learnings back per packet), and `/intent-improve` at milestones (re-align the whole)
34
+ - Anytime: `/intent-status` (where you are and the next move), `/intent-validate` (verification before export)
35
+
36
+ Learnings from `/intent-writeback` are recorded into `deltas.md` as deltas (the canonical deliverables are never edited directly), and `/intent-status` and `/intent-improve` refer to them.
37
+
38
+ ### When to use which skill
39
+
40
+ | Skill | Timing | Role |
41
+ |--------|-----------|------|
42
+ | `/intent-status` | Anytime (when unsure) | Recommend a summary of where you are plus exactly one "next move" (read-only) |
43
+ | `/intent-validate` | Before export (recommended) | Report contradictions, coverage gaps, and boundary inconsistencies across deliverables with severity (read-only) |
44
+ | `/intent-writeback` | After a packet's implementation is done | Record the learnings gained from the implementation into `deltas.md`, and promote only the approved items into the canonical deliverables |
45
+ | `/intent-improve` | At milestones (e.g. after implementing several packets) | Re-align `.intent/` with the implementation reality on the three axes of completeness / correctness / coherence |
46
+
47
+ For the four planning-phase skills (`/intent-discover`, `/intent-compass`, `/intent-packets`, `/intent-export-cc-sdd`), see "Workflow" above.
48
+
49
+ ## Mode (the Intent-working algorithm)
50
+
51
+ How to work out the Intent is switchable as a "mode". The selected mode is recorded in `mode.md`, and each command reads it to operate with a consistent strategy. Mode definitions live in `modes/`, and new modes can be added (see `modes/README.md`).
52
+
53
+ `mode.md` also records the designer-questions delegation (designer-questions: on / off) as an axis orthogonal to the mode. At the entry point, `/intent-discover` explains what the flow can ask on your behalf and confirms whether you want it. When on, the common additional confirmations (L1 measurement criteria, walking skeleton, screen rough) and the normative checks of `/intent-validate` become active, and the development purpose (purpose: poc / product) is also confirmed — when poc, the hypothesis / falsification criteria / GO-NO-GO confirmations are added. When off, the only increment is that single opt-in question.
54
+
55
+ ## Enforcement (writeback-miss checks, optional)
56
+
57
+ An optional layer that mechanically detects missed `/intent-writeback` runs. **The default is off**, and nothing changes unless you configure it. Switch it by directly editing the "Enforcement (user-managed)" section of `mode.md` (`off` = default, no checks / `remind` = warnings only / `gate` = stops export / push).
58
+
59
+ Two things are checked.
60
+
61
+ - **Neglected pending deltas (the main check)** — deltas recorded in `deltas.md` that remain unapproved and unpromoted
62
+ - **Staleness (experimental)** — the state where the number of commits changing anything outside `.intent/` since the last writeback (or export) exceeds the threshold (`enforcement-threshold`, default: 5). Unrelated commits are counted too, so false positives remain. Paths can be excluded from the count via `enforcement-exclude`. Starting with `remind` is recommended
63
+
64
+ The checks take effect in three places: before export in `/intent-export-cc-sdd`, as warnings in `/intent-status`, and in the pre-push hook placed by the installer's `--enforce`. All judgments are made by the read-only script `scripts/intent-check.mjs` (it never creates, modifies, or deletes files). Even when gate stops you, escape hatches remain: an explicit instruction to continue, or `git push --no-verify`. Enforcement only forces the execution of the procedure; it does not guarantee the correctness of what is written back.
65
+
66
+ ### Claude Code SessionStart hook (optional)
67
+
68
+ If you want writeback-miss warnings injected into the agent's context at session start, manually add the following to `.claude/settings.json` (intent-planner never writes this automatically).
69
+
70
+ ```json
71
+ {
72
+ "hooks": {
73
+ "SessionStart": [
74
+ {
75
+ "hooks": [
76
+ { "type": "command", "command": "node .intent/scripts/intent-check.mjs" }
77
+ ]
78
+ }
79
+ ]
80
+ }
81
+ }
82
+ ```
83
+
84
+ ### Caveats (known limitations)
85
+
86
+ - In nvm / volta environments, GUI git clients may not have node on their PATH; in that case the pre-push hook check is skipped (a one-line notice is printed to stderr)
87
+ - In environments using `core.hooksPath` (husky etc.), `.git/hooks` is never invoked, so the placed pre-push hook has no effect
88
+ - In environments where `.git` is a file, such as git worktrees and submodules, hook placement via `--enforce` fails
89
+ - To use enforcement in an environment set up with an older scaffold, manually add the Enforcement section to `mode.md` (copy the section from the latest template)
90
+
91
+ ## Drift-watch (drift monitoring, optional)
92
+
93
+ Another **optional cross-cutting layer** alongside enforcement. As implementation proceeds after the intent is set, the software tends to "stop being the software you intended" (architectural drift); this layer catches that by name before it drifts away completely. It is **not a mode** (a mode is exclusive — only one is active at a time; drift-watch is an independent `off` | `on` switch).
94
+
95
+ **The default is off**, and nothing changes unless you configure it. Switch it to `on` by directly editing the "Drift-watch (user-managed)" section of `mode.md`.
96
+
97
+ When on, `/intent-discover` runs a terrain diagnosis of the Intent Tree, and `/intent-export-cc-sdd` shows compass-matching warnings at the export waterline. **Both are warnings only and never stop you** (a separate concept from enforcement's `gate`; since false positives are assumed, there is no stopping value). Detections are recorded locally in `.intent/drift-log.md` (nothing is ever sent externally; it stays within `.intent/`).
98
+
99
+ The basis is `.intent/drift-patterns.md` (a catalog of drift patterns). The distributed seed is not exhaustive; the premise is that **you grow it by adding the drifts you actually hit in your own work** as patterns. Aggregation (the improvement report) adds no new command — it rides on the light summary in `/intent-status` and the pattern×outcome cross-tabulation in `/intent-improve`.
100
+
101
+ ## Rules for Agents
102
+
103
+ ### Planning Phase (when running intent-* skills)
104
+
105
+ - Do not change application code during the Intent Planning phase.
106
+ - Do not propose local refactors that do not support a parent intent.
107
+ - Each packet must always reference a parent intent.
108
+ - Each task must preserve the invariants.
109
+ - When intent is unclear, do not edit code; write it into Open Questions.
110
+ - Treat inferred intent as provisional until a human reviews it.
111
+
112
+ ### Implementation Phase (Agent Contract — for agents implementing packets)
113
+
114
+ 1. Treat Invariants as hard constraints.
115
+ 2. Treat Decision Rules as effective unless explicitly marked superseded.
116
+ 3. Do not produce an implementation that falls under an Anti-direction.
117
+ 4. When a packet contradicts the Compass, stop implementing and confirm with the human.
118
+ 5. When the code reality contradicts the intent, record it as a delta (`/intent-writeback`); do not silently rewrite the intent.
@@ -0,0 +1,28 @@
1
+ # cc-sdd Export Drafts
2
+
3
+ > `/intent-export-cc-sdd` writes per-packet drafts under this directory. Everything except this README is NOT tracked by Git (local-only). The readers are the user handing drafts to cc-sdd, plus `/intent-writeback`, `/intent-status`, and `/intent-validate`. The authority for the draft format is the export skill's rules (map-cc-sdd); no scaffold templates live here.
4
+
5
+ ## Structure
6
+
7
+ ```
8
+ .intent/cc-sdd/
9
+ ├── README.md # this note (tracked by Git)
10
+ └── <packet-slug>/ # generated per packet by /intent-export-cc-sdd (untracked)
11
+ ├── requirements.md
12
+ ├── design.md
13
+ └── tasks.md
14
+ ```
15
+
16
+ The directory name (slug) is derived deterministically from the packet name (see map-cc-sdd for the rule and collision handling).
17
+
18
+ ## Role of the 3 drafts
19
+
20
+ - **requirements.md** — the condensed Project Description passed to cc-sdd's `/kiro-spec-init`. Always includes the headings `## Source Packet` (exact transcription of the packet name), `## Parent Intent`, and `## Invariants`.
21
+ - **design.md** — oversight-prevention hints (bullets) for when cc-sdd generates the design. Not the main body.
22
+ - **tasks.md** — intent-derived constraints (parent intent / invariants / anti-direction) first, followed by check items for cc-sdd's tasks generation.
23
+
24
+ ## Git-untracked policy
25
+
26
+ - Drafts under the packet directories are local-only and not tracked by Git (only this README is tracked). By design, this prevents team merge conflicts and draft loss by overwriting.
27
+ - The history of exports lives in the Git-shared `.intent/export-log.md` (1 export = 1 line). That log is also the canonical source for resolving the "current packet".
28
+ - Drafts are not deleted after writeback; they remain available for cross-checking missed writebacks (export-log × remaining drafts × deltas.md).
@@ -0,0 +1,9 @@
1
+ # compass-archive/ (split form)
2
+
3
+ compass-archive is the record that retires superseded Decision Rules, so write it split into **per-superseded-rule files (rule-unit)** `compass-archive/<rule-slug>.md`. Re-superseding the same rule collects into the same file (the rule is the natural key).
4
+
5
+ - The `<rule-slug>` is derived from the retired Decision Rule's identifier via the existing slug rule (`intent-packets/rules/packet-format.md`). Do not use sequential numbering (a central counter like `0001`).
6
+ - Retirement happens when writeback / improve supersedes a Decision Rule. **Move the 6 fields (Context / Decision / Why / Alternatives considered / Consequences / Revisit when) + the successor reference verbatim (byte-unchanged)** — do not summarize or alter them (record content is immutable).
7
+ - Since this directory is itself the archive role, the `archive/` subdirectory is a further per-year refuge when needed.
8
+
9
+ > This README is a **restatement** of the rule. The single source of truth is CONTRACT.md "Split & archive discipline for append-only records". Consult CONTRACT for placement decisions.
@@ -0,0 +1,7 @@
1
+ # Compass Archive
2
+
3
+ > `/intent-writeback` and `/intent-improve` move Decision Rules entries that became superseded here, appending them at the end with all 6 fields intact. The reader is a human, consulting this only when needed. Existing lines are never modified.
4
+
5
+ Format example (append at the end in this exact 6-field form, with a superseded note + successor reference):
6
+
7
+ - **Context**: (the question and situation) / **Decision**: (the option taken) / **Why**: (the criteria) / **Alternatives considered**: (the alternatives considered and why rejected) / **Consequences**: (connection to Invariants and Anti-direction) / **Revisit when**: (the condition for revisiting) — superseded: (reference to the successor entry)
@@ -0,0 +1,32 @@
1
+ # Constraint Library (the constraint ledger you grow)
2
+
3
+ > A ledger for accumulating and reusing the constraints (Anti-direction / Invariant) you use repeatedly, inside this project's `.intent/`. When `/intent-compass` surfaces drafts, it lists the constraints you have accumulated here alongside the bundled `constraint-starters.md`. **Editing is done by a human; the skill only reads and never auto-modifies.** Writing an adopted constraint into this ledger is also done by a human (or with explicit human approval).
4
+
5
+ ## How to use this ledger
6
+
7
+ - **This is a file you grow.** As you repeat development in the same domain, constraints accumulate — "I always make this an Anti-direction / Invariant." Append them here and reuse them.
8
+ - **It stays within this project.** This ledger is placed only under this repo's `.intent/`, and is never shared across projects (so that even for work where assets cannot leave, constraints do not leak outside the project). Reinstalling or upgrading does not overwrite what you wrote here.
9
+ - **It is canonical (human-edited).** The surfacing skill references this ledger read-only and never rewrites it automatically.
10
+ - **This is a static document.** It never queries an external service or database when used.
11
+
12
+ ## Entry schema
13
+
14
+ Append constraints you use repeatedly with the schema below. Make `id` a unique kebab-case key.
15
+
16
+ ```markdown
17
+ ## id: <kebab-case identifier key>
18
+ - name: <short name>
19
+ - domain: <code | non-code>
20
+ - fits when: <for what kind of work or material you want this constraint to apply>
21
+ - constraint:
22
+ - Anti-direction: <the direction to avoid>
23
+ - Invariant: <the invariant to keep>
24
+ - origin: <where you learned this constraint / why it is one of your defaults (optional)>
25
+ ```
26
+
27
+ - Constraints accumulated here appear as candidates alongside the bundled catalog when `/intent-compass` surfaces drafts (surfacing stops at candidates; a human decides whether to adopt).
28
+ - The bundled `constraint-starters.md` (conventions the developers maintain and ship) and this `constraint-library.md` (constraints you grow) are separate files.
29
+
30
+ ---
31
+
32
+ <!-- Below this line, append your repeatedly-used constraints (following the entry schema above). -->
@@ -0,0 +1,58 @@
1
+ # Constraint Starters (catalog of constraint starting points)
2
+
3
+ > Read by `/intent-compass` (primary touchpoint) and `/intent-discover` (terrain diagnosis lane) as **draft candidates** when writing Anti-direction / Invariants. It is the source set for matching bundled domain conventions against your context to surface "this case is probably this." **Surfacing is a read-only draft; transcription into the compass happens manually after a human picks what to adopt** (the AI does not auto-transcribe). Constraints you personally reuse are grown in a separate file, `constraint-library.md`.
4
+
5
+ ## How to read this catalog
6
+
7
+ - **This is not exhaustive.** The conventions listed here are only a starting point (2 seeds, one each for code / non-code). Later surfacing only lists conventions that fit the context as **candidates**; you decide whether to adopt them.
8
+ - Each convention is identified by `id` (kebab-case). `domain` distinguishes code vs non-code, `fits when` describes "for what kind of work it helps," and `starter` holds the Anti-direction / Invariant candidates.
9
+ - **This is a supplement, not a replacement.** The compass's Anti-direction/Invariant derivation (impact list → Invariants, premortem → Anti-direction) stays as is; this only injects draft candidates ahead of it.
10
+ - **This is a static document.** It never queries an external service, online lookup, or database when used. It also makes no external call to "fetch the latest conventions." It stays within the bundled static content plus contextual completion in later slices.
11
+ - **This is a separate catalog from the existing drift catalog (drift-patterns) and context-cost catalog (context-cost-cues).** Because what it accumulates differs (reusable constraint conventions), it is a separate file, and it never touches the drift log's (drift-log) records or aggregation.
12
+
13
+ ## Provenance and accuracy discipline (quality of bundled conventions)
14
+
15
+ - **Every convention must carry a source (`source` field).** Record the basis (a primary-source URL, etc.) and the retrieval date; do not bundle conventions of unknown provenance. This is the guardrail against pushing wrong or stale conventions as "this case is probably this."
16
+ - **Accuracy review**: When adding or updating a convention, confirm the source exists and is still valid (do not attach guessed or fabricated sources).
17
+ - **Update policy**: When a source goes stale (recommendation changed, retracted, etc.), update the source or revisit the convention itself.
18
+ - **License**: When quoting from a source, respect the source's license and terms of use.
19
+
20
+ ## How to write a convention
21
+
22
+ Append a new convention with the schema below. Make `id` a unique kebab-case key. `source` is required (do not add a convention without a source).
23
+
24
+ ```markdown
25
+ ## id: <kebab-case identifier key>
26
+ - name: <short name>
27
+ - domain: <code | non-code>
28
+ - fits when: <for what kind of work or material this convention helps. A cue the compass/discover matches against context>
29
+ - starter:
30
+ - Anti-direction: <the anti-direction candidate to surface in that situation>
31
+ - Invariant: <the invariant candidate. If material-dependent, the compass concretizes it from context>
32
+ - source: <basis (primary-source URL, etc.) and retrieval date. Required>
33
+ ```
34
+
35
+ - `fits when` is written as a matching cue, not a strong rule of "if this matches it must be this convention" (false positives are assumed; candidates are narrowed, not pushed).
36
+ - `starter` is **not a confirmed value to drop straight into** the compass's Anti-direction/Invariants — it is a candidate a human picks.
37
+
38
+ ---
39
+
40
+ ## id: sql-injection-placeholder
41
+
42
+ - name: SQL injection prevention (always use placeholders)
43
+ - domain: code
44
+ - fits when: A web app or similar that builds SQL or queries a database using values that include user input. When you see queries being built by string concatenation.
45
+ - starter:
46
+ - Anti-direction: Do not embed user input into SQL by string concatenation. Do not execute a dynamically assembled query string as-is.
47
+ - Invariant: User-derived values must always be passed via placeholders (parameterized queries). Never concatenate values as part of SQL syntax.
48
+ - source: OWASP SQL Injection Prevention Cheat Sheet (https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html, retrieved 2026-06-21)
49
+
50
+ ## id: slide-deck-structure
51
+
52
+ - name: Presentation deck structure (claim first, one message per slide)
53
+ - domain: non-code
54
+ - fits when: Building a presentation deck, slides, or a proposal. When you see a tendency to cram in information or hold the conclusion until the end.
55
+ - starter:
56
+ - Anti-direction: Do not cram multiple claims onto one slide. Do not start from a list of facts with the conclusion hidden until the end.
57
+ - Invariant: Keep one slide = one message. Each slide leads with its claim (conclusion) and supports it with evidence.
58
+ - source: Barbara Minto "The Pyramid Principle" (conclusion-first, MECE structure) / Garr Reynolds "Presentation Zen" (one message per slide), retrieved 2026-06-21
@@ -0,0 +1,55 @@
1
+ # Context Cost Cues (catalog of context-eating situations)
2
+
3
+ > Read by `/intent-discover` and `/intent-improve` (when `drift-watch: on`). **These are cues to make you notice situations that eat context; they do not deny or correct you.** Installing many skills or loading full content can be a legitimate choice that improves accuracy. **Nothing is recorded to any log** (consumption is not measurable, and recording it would intrude on privacy such as your settings and skill setup). This is a file you grow by appending the types you actually hit in your own project.
4
+
5
+ ## How to read this catalog
6
+
7
+ - **This is not exhaustive.** The types listed here are only a starting point (4 seeds). The premise is that you append the context-eating situations you actually hit in your own project as types and grow this file over time.
8
+ - Each type is identified by its aggregation key (`id`). The more types you add, the wider the range over which you can notice "this might be eating context".
9
+ - **This is awareness, not a norm.** A type "matching" is not a confirmation of waste. Installing many skills or loading full content can be a deliberate, legitimate choice. When a type matches, it only **makes you notice** "this might be eating context", and leaves the judgment of waste-or-not to you. It does not say "fix it".
10
+ - **Nothing is recorded to any log.** Consumption cannot be measured, and what eats context legitimately differs per person, so recording it would intrude on privacy. The cue stays a read-only suggestion.
11
+
12
+ ## How to write a type
13
+
14
+ Append a new type with the schema below. Make `id` a unique kebab-case aggregation key.
15
+
16
+ ```markdown
17
+ ## id: <kebab-case aggregation key>
18
+ - name: <short name>
19
+ - symptom: <cue about the subject / how it is progressing; a weak cue discover or improve matches against the subject>
20
+ - If this is unintentional:
21
+ - Instead: <a light alternative to recall if it was working unintentionally (thin entry point / JIT pull / limited input); an optional choice, not a command>
22
+ ```
23
+
24
+ - Write `symptom` as a cue for matching, not as a strong decision condition meaning "if this matches it is definitely waste" (keeping it a weak cue avoids fixation).
25
+ - "If this is unintentional" is an **optional light alternative** to recall when this type is suspected. Do not use imperatives ("fix it", "stop it"), and do not deny a deliberate high-cost choice.
26
+
27
+ ---
28
+
29
+ ## id: full-compass-load
30
+
31
+ - name: Full compass load
32
+ - symptom: You may be reading the whole of intent-compass.md (the decision-criteria document) when you only need one point. A way of progressing where you load the entire document into context just to check a single Invariant / Decision Rule.
33
+ - If this is unintentional:
34
+ - Instead: there is a lighter alternative of pulling the needed Decision Rule / Invariant JIT by heading (reading only that section from a thin entry point). If you genuinely need the whole document, leave it as is.
35
+
36
+ ## id: whole-tree-read
37
+
38
+ - name: Whole intent-tree read
39
+ - symptom: You may be reading all of intent-tree.md every time when you only need one of L0–L3. A way of progressing where you load the entire tree into context when you only want to reference a specific outcome or capability.
40
+ - If this is unintentional:
41
+ - Instead: there is a lighter alternative of reading only the layer you need by name, rather than pasting the whole tree into a fixed-load context. If you need the full overview, leave it as is.
42
+
43
+ ## id: steering-bloat
44
+
45
+ - name: Fixed-load context bloat
46
+ - symptom: You may be bloating the fixed context that gets loaded every time with generated steering or reference documents. A way of progressing where the always-loaded set grows each time you add a responsibility, so context swells linearly.
47
+ - If this is unintentional:
48
+ - Instead: there is a lighter alternative of keeping the fixed load thin and offloading details to references, pulling them only when needed. If you are sure that context is always needed, leave it as is.
49
+
50
+ ## id: redundant-reread
51
+
52
+ - name: Redundant re-read
53
+ - symptom: You may be re-reading a file you just read or edited, even though its content has not changed. A way of progressing where you load the same content into context multiple times in a short interval.
54
+ - If this is unintentional:
55
+ - Instead: there is a lighter alternative of using what you just read/edited as is and skipping the re-read. If you want to confirm a possible change (e.g. from a concurrent edit), leave it as is.
@@ -0,0 +1,11 @@
1
+ # deltas/ (split-form active surface)
2
+
3
+ deltas is a **packet-derived** record, so write it split into **per-packet files** `deltas/<packet-slug>.md`. Different packets touch different files, so tail-append conflicts are eliminated by construction.
4
+
5
+ - Keep only the currently-referenced deltas here (the active surface), kept thin.
6
+ - Move terminal (no-longer-updated) entries into `deltas/archive/<year>/`.
7
+ - The `<packet-slug>` in the filename follows the existing packet slug rule (`intent-packets/rules/packet-format.md`). Do not use sequential numbering (a central counter like `0001`).
8
+
9
+ > This README is a **restatement** of the rule. The single source of truth is CONTRACT.md "Split & archive discipline for append-only records". Consult CONTRACT for placement decisions.
10
+
11
+ The existing single file `../deltas.md` may remain (it coexists with the new split form). Do not put real entries in the active surface; entries are generated in split form by writeback/discover.
File without changes
@@ -0,0 +1,34 @@
1
+ # Intent Deltas
2
+
3
+ > Recorded by `/intent-writeback`, referenced by `/intent-status` and `/intent-improve`. The canonical deliverables (intent-tree.md / intent-compass.md / the packet files and plan.md under `.intent/packets/`) are updated after the fact only through these deltas.
4
+
5
+ ## How this file operates
6
+
7
+ - Write-back is two-staged: `/intent-writeback` first records learnings here as a delta (it never edits the canonical deliverables directly), and only the items the user approves are promoted into the canonical deliverables.
8
+ - One write-back of one packet = one entry. Writing back the same packet again (after re-export / re-implementation) appends a new entry (history is preserved). The mechanical check for "does a corresponding delta exist" is valid only for the first cycle; from the second cycle on, the user decides whether a write-back is needed by reviewing the list of past entries.
9
+ - Draft retention (per-packet directories): the drafts under `.intent/cc-sdd/<packet-slug>/` persist per packet (untracked by Git, local-only). Completing a write-back does not delete the drafts. The export history is recorded in `.intent/export-log.md` (one row per export with packet name, datetime, and commit), and missed write-backs of previously exported packets are enumerated by cross-checking all rows of export-log.md × the surviving `.intent/cc-sdd/<packet-slug>/` drafts × this file.
10
+
11
+ ## State semantics
12
+
13
+ - `pending`: recorded, not yet promoted.
14
+ - `promoted` / `closed` are terminal states. Approving one or more items and reflecting them into the canonical deliverables → `promoted`; declining every item as "rejected" → `closed`.
15
+ - Declined items require one of the two tags: "rejected (no re-proposal) | on-hold (re-propose at the next writeback)". Only on-hold items become re-proposal targets at the next `/intent-writeback` run (and review targets for `/intent-improve`), and the final tag update (promote / confirm rejection / keep on hold) is done by `/intent-writeback`.
16
+ - A `[question]` learning is considered digested once transcribed into the Open Questions of intent-tree.md (record the transcription target in the promotion record's reflection target).
17
+
18
+ ## Delta: <packet-name> — <ISO 8601 date>
19
+
20
+ - Status: pending | promoted (<promotion date>) | closed (<close date>)
21
+ - Source: latest row of export-log.md | Source Packet in .intent/cc-sdd/<packet-slug>/ | specified by the user
22
+
23
+ ### Learnings
24
+
25
+ - [decision] <a new decision>
26
+ - [invariant-violation] <a discovered invariant violation>
27
+ - [implicit-behavior] <implicit behavior not written in the intent>
28
+ - [deferred-resolved] <a resolved Deferred>
29
+ - [question] <a new unresolved Question>
30
+
31
+ ### Promotion record (when promoted / closed)
32
+
33
+ - Reflected into: a new entry in intent-compass.md Decision Rules (with a superseded note on the old entry) / intent-tree.md L3 / the target packet file (under active/) / the Deferred section of plan.md (with a resolution note)
34
+ - Declined: <learnings not promoted> — rejected (no re-proposal) | on-hold (re-propose at the next writeback)
@@ -0,0 +1,11 @@
1
+ # drift-log/ (split-form active surface)
2
+
3
+ drift-log is an **event-derived** record, so write it split into **date+slug files** `drift-log/<date>-<slug>.md`. Different events touch different files, so tail-append conflicts are eliminated by construction.
4
+
5
+ - Keep only the currently-referenced events here (the active surface), kept thin.
6
+ - Move terminal (no-longer-updated) entries into `drift-log/archive/<year>/`.
7
+ - The `<slug>` in the filename follows the existing slug rule (`intent-packets/rules/packet-format.md`). Do not use sequential numbering (a central counter like `0001`).
8
+
9
+ > This README is a **restatement** of the rule. The single source of truth is CONTRACT.md "Split & archive discipline for append-only records". Consult CONTRACT for placement decisions.
10
+
11
+ The existing single file `../drift-log.md` may remain (it coexists with the new split form). The 9-key schema (record contents) is unchanged. Do not put real entries in the active surface; entries are generated in split form by the drift-record writer.
File without changes
@@ -0,0 +1,41 @@
1
+ # Drift Log
2
+
3
+ > The hooks of `/intent-discover`, `/intent-export-cc-sdd`, and `/intent-improve` append one entry per detected drift. The only writers are these three hooks; the readers are `/intent-status` (a light summary) and `/intent-improve` (a `pattern × outcome` cross-tabulation). When `drift-watch: off` (the default), nobody writes here.
4
+ >
5
+ > **How to read this**: read `missed=0` as "a suspicion of missing records," not as "evidence it worked." Keeping only the moments it worked (prevented / caught) in the tally is confirmation bias. This file is designed on the premise that the moments it did not work (missed / false-positive / not-applicable) are recorded just as evenly.
6
+
7
+ ## How this file operates
8
+
9
+ - **append-only**: entries are appended only. Never rewrite or delete a past entry (to avoid creating an asymmetry in the world-line anchor).
10
+ - **outcome is a draft / user-verdict is the verdict**: `outcome` is estimated and drafted by drift-watch. `user-verdict` is confirmed by the user (the same separation as canonical / inferred in the Intent Tree). Even if the user has not judged it, it stays `unjudged` and remains a target for recording and tallying.
11
+ - **world-line anchor (Layer 1)**: each entry carries `recorded_at` (the time it was recorded) and `commit` (the world-line it was recorded on) from the start. Adding them to past entries after the fact creates an asymmetry, so they are recorded from the start. Immutability is delegated to git, and this file is kept as a "projection of the present."
12
+ - **no validity period**: because drift is an event, not a state, it has no valid-time fields such as `valid_until`.
13
+
14
+ ## Entry format
15
+
16
+ Each entry carries the following 9 keys as a fixed-order Markdown list. The sample below, wrapped in `<!-- -->` (an HTML comment), is a fill-in template and is not included in real entries.
17
+
18
+ <!--
19
+ ### drift-log entry
20
+ - pattern: <a drift-patterns id | uncatalogued:<short name>>
21
+ - stage: <discover | export | improve>
22
+ - packet: <packet name | ->
23
+ - mechanism: <compass-anti-direction | compass-invariant | pattern-catalog | packet-scope-overflow | none>
24
+ - outcome: <prevented | caught | missed | false-positive | not-applicable>
25
+ - user-verdict: <valid | false-alarm | unjudged>
26
+ - recorded_at: <ISO 8601> # transaction time (the time it was recorded)
27
+ - commit: <short hash | -> # world-line anchor (Layer 1). - when unavailable
28
+ - note: <1-2 lines>
29
+ -->
30
+
31
+ ## The 5 outcome values (structural avoidance of confirmation bias)
32
+
33
+ The "worked" family and the "did not work" family are enumerated symmetrically. We do not physically create a "field that only records effective."
34
+
35
+ | Worked | Did not work |
36
+ |---|---|
37
+ | `prevented` (prevention succeeded at discover) | `missed` (could not prevent it, it got through) |
38
+ | `caught` (capture succeeded at export) | `false-positive` (it was a false alarm) |
39
+ | | `not-applicable` (not present in the terrain; a swing and a miss) |
40
+
41
+ Tallying assumes a `pattern × outcome` cross-tabulation. Read `missed=0` as "a suspicion of missing records," not as "it worked."