@isaacriehm/cairn-core 0.6.0 → 0.7.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 (431) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/align-undo/undo.js +2 -2
  3. package/dist/align-undo/undo.js.map +1 -1
  4. package/dist/attention/bulk-accept.js +104 -55
  5. package/dist/attention/bulk-accept.js.map +1 -1
  6. package/dist/attention/dedup.js +23 -10
  7. package/dist/attention/dedup.js.map +1 -1
  8. package/dist/attention/restore.js +2 -2
  9. package/dist/attention/restore.js.map +1 -1
  10. package/dist/attention/scoring.js +1 -1
  11. package/dist/attention/scoring.js.map +1 -1
  12. package/dist/attention/serve/api.d.ts +1 -0
  13. package/dist/attention/serve/api.js +130 -77
  14. package/dist/attention/serve/api.js.map +1 -1
  15. package/dist/attention/serve/index.d.ts +1 -0
  16. package/dist/attention/serve/index.js +21 -7
  17. package/dist/attention/serve/index.js.map +1 -1
  18. package/dist/attention/source-strip.js +41 -46
  19. package/dist/attention/source-strip.js.map +1 -1
  20. package/dist/claude/cache.d.ts +10 -19
  21. package/dist/claude/cache.js +0 -0
  22. package/dist/claude/cache.js.map +1 -1
  23. package/dist/claude/runner.d.ts +4 -6
  24. package/dist/claude/runner.js +242 -203
  25. package/dist/claude/runner.js.map +1 -1
  26. package/dist/claude/types.d.ts +5 -5
  27. package/dist/context/handoff-builder.d.ts +28 -4
  28. package/dist/context/handoff-builder.js +75 -157
  29. package/dist/context/handoff-builder.js.map +1 -1
  30. package/dist/context/spec-delta.js +61 -9
  31. package/dist/context/spec-delta.js.map +1 -1
  32. package/dist/context/task-summary.js +5 -1
  33. package/dist/context/task-summary.js.map +1 -1
  34. package/dist/decision-capture/id.js +1 -1
  35. package/dist/decision-capture/id.js.map +1 -1
  36. package/dist/doctor/index.d.ts +9 -11
  37. package/dist/doctor/index.js +118 -175
  38. package/dist/doctor/index.js.map +1 -1
  39. package/dist/drain/drain.d.ts +1 -1
  40. package/dist/drain/drain.js +16 -16
  41. package/dist/drain/drain.js.map +1 -1
  42. package/dist/drain/index.d.ts +1 -1
  43. package/dist/drain/index.js +1 -1
  44. package/dist/events/reader.d.ts +9 -10
  45. package/dist/events/reader.js +46 -57
  46. package/dist/events/reader.js.map +1 -1
  47. package/dist/events/writer.js +1 -1
  48. package/dist/events/writer.js.map +1 -1
  49. package/dist/fix-align/index.d.ts +1 -1
  50. package/dist/fix-align/index.js +1 -1
  51. package/dist/fix-align/run.d.ts +1 -1
  52. package/dist/fix-align/run.js +4 -3
  53. package/dist/fix-align/run.js.map +1 -1
  54. package/dist/fix-align/sentinel.d.ts +1 -2
  55. package/dist/fix-align/sentinel.js +3 -4
  56. package/dist/fix-align/sentinel.js.map +1 -1
  57. package/dist/gc/apply.js +1 -1
  58. package/dist/gc/apply.js.map +1 -1
  59. package/dist/gc/attested-commits.d.ts +19 -0
  60. package/dist/gc/attested-commits.js +48 -0
  61. package/dist/gc/attested-commits.js.map +1 -0
  62. package/dist/gc/canary.d.ts +11 -21
  63. package/dist/gc/canary.js +18 -24
  64. package/dist/gc/canary.js.map +1 -1
  65. package/dist/gc/citation-integrity.d.ts +11 -14
  66. package/dist/gc/citation-integrity.js +124 -125
  67. package/dist/gc/citation-integrity.js.map +1 -1
  68. package/dist/gc/classify.d.ts +1 -1
  69. package/dist/gc/classify.js +2 -2
  70. package/dist/gc/classify.js.map +1 -1
  71. package/dist/gc/completion-integrity.d.ts +6 -7
  72. package/dist/gc/completion-integrity.js +45 -53
  73. package/dist/gc/completion-integrity.js.map +1 -1
  74. package/dist/gc/doc-gardening.js +1 -9
  75. package/dist/gc/doc-gardening.js.map +1 -1
  76. package/dist/gc/frontmatter.js +2 -2
  77. package/dist/gc/frontmatter.js.map +1 -1
  78. package/dist/gc/index.d.ts +7 -6
  79. package/dist/gc/index.js +3 -2
  80. package/dist/gc/index.js.map +1 -1
  81. package/dist/gc/quality-update.d.ts +6 -10
  82. package/dist/gc/quality-update.js +12 -15
  83. package/dist/gc/quality-update.js.map +1 -1
  84. package/dist/gc/scope-coverage.js +1 -1
  85. package/dist/gc/scope-coverage.js.map +1 -1
  86. package/dist/gc/stub-hits.d.ts +7 -25
  87. package/dist/gc/stub-hits.js +14 -40
  88. package/dist/gc/stub-hits.js.map +1 -1
  89. package/dist/gc/sweep.js +15 -6
  90. package/dist/gc/sweep.js.map +1 -1
  91. package/dist/gc/types.d.ts +5 -5
  92. package/dist/gc/types.js +2 -2
  93. package/dist/gc/walk-source.js +8 -28
  94. package/dist/gc/walk-source.js.map +1 -1
  95. package/dist/hooks/defer.d.ts +9 -20
  96. package/dist/hooks/defer.js +10 -27
  97. package/dist/hooks/defer.js.map +1 -1
  98. package/dist/hooks/post-tool-use/allowlist-reader.d.ts +2 -1
  99. package/dist/hooks/post-tool-use/allowlist-reader.js +49 -34
  100. package/dist/hooks/post-tool-use/allowlist-reader.js.map +1 -1
  101. package/dist/hooks/post-tool-use/index.d.ts +3 -4
  102. package/dist/hooks/post-tool-use/index.js +3 -3
  103. package/dist/hooks/post-tool-use/index.js.map +1 -1
  104. package/dist/hooks/post-tool-use/legend-builder.d.ts +11 -2
  105. package/dist/hooks/post-tool-use/legend-builder.js +27 -2
  106. package/dist/hooks/post-tool-use/legend-builder.js.map +1 -1
  107. package/dist/hooks/post-tool-use/post-write.d.ts +8 -0
  108. package/dist/hooks/post-tool-use/post-write.js +112 -0
  109. package/dist/hooks/post-tool-use/post-write.js.map +1 -0
  110. package/dist/hooks/post-tool-use/read-enricher.d.ts +10 -5
  111. package/dist/hooks/post-tool-use/read-enricher.js +114 -149
  112. package/dist/hooks/post-tool-use/read-enricher.js.map +1 -1
  113. package/dist/hooks/post-tool-use/sot-align.d.ts +12 -0
  114. package/dist/hooks/post-tool-use/sot-align.js +73 -49
  115. package/dist/hooks/post-tool-use/sot-align.js.map +1 -1
  116. package/dist/hooks/post-tool-use/write-guardian.d.ts +40 -8
  117. package/dist/hooks/post-tool-use/write-guardian.js +202 -254
  118. package/dist/hooks/post-tool-use/write-guardian.js.map +1 -1
  119. package/dist/hooks/pre-commit/sot-align-precommit.js +2 -2
  120. package/dist/hooks/pre-commit/sot-align-precommit.js.map +1 -1
  121. package/dist/hooks/runners/index.d.ts +2 -2
  122. package/dist/hooks/runners/index.js +1 -1
  123. package/dist/hooks/runners/index.js.map +1 -1
  124. package/dist/hooks/runners/payload.d.ts +34 -19
  125. package/dist/hooks/runners/payload.js +47 -44
  126. package/dist/hooks/runners/payload.js.map +1 -1
  127. package/dist/hooks/runners/session-end.js +12 -11
  128. package/dist/hooks/runners/session-end.js.map +1 -1
  129. package/dist/hooks/runners/session-start.d.ts +4 -2
  130. package/dist/hooks/runners/session-start.js +88 -261
  131. package/dist/hooks/runners/session-start.js.map +1 -1
  132. package/dist/hooks/runners/stop.js +27 -8
  133. package/dist/hooks/runners/stop.js.map +1 -1
  134. package/dist/hooks/runners/user-prompt-submit.js +7 -1
  135. package/dist/hooks/runners/user-prompt-submit.js.map +1 -1
  136. package/dist/hooks/sot-align-common.d.ts +1 -2
  137. package/dist/hooks/sot-align-common.js +2 -2
  138. package/dist/hooks/sot-align-common.js.map +1 -1
  139. package/dist/index.d.ts +1 -1
  140. package/dist/index.js +12 -3
  141. package/dist/index.js.map +1 -1
  142. package/dist/init/baseline-audit.d.ts +14 -58
  143. package/dist/init/baseline-audit.js +92 -320
  144. package/dist/init/baseline-audit.js.map +1 -1
  145. package/dist/init/brand-derive.d.ts +11 -15
  146. package/dist/init/brand-derive.js +21 -46
  147. package/dist/init/brand-derive.js.map +1 -1
  148. package/dist/init/brand-setup.d.ts +1 -1
  149. package/dist/init/brand-setup.js +1 -1
  150. package/dist/init/detect.d.ts +25 -6
  151. package/dist/init/detect.js +107 -136
  152. package/dist/init/detect.js.map +1 -1
  153. package/dist/init/index.d.ts +4 -4
  154. package/dist/init/index.js +2 -2
  155. package/dist/init/index.js.map +1 -1
  156. package/dist/init/ingest-docs.d.ts +83 -23
  157. package/dist/init/ingest-docs.js +648 -136
  158. package/dist/init/ingest-docs.js.map +1 -1
  159. package/dist/init/init.d.ts +29 -20
  160. package/dist/init/init.js +132 -290
  161. package/dist/init/init.js.map +1 -1
  162. package/dist/init/mapper-merge.js +1 -1
  163. package/dist/init/mapper-merge.js.map +1 -1
  164. package/dist/init/mapper-parallel.d.ts +1 -1
  165. package/dist/init/mapper-parallel.js +10 -1
  166. package/dist/init/mapper-parallel.js.map +1 -1
  167. package/dist/init/mapper.js +1 -1
  168. package/dist/init/mapper.js.map +1 -1
  169. package/dist/init/multi-dev/install.d.ts +5 -5
  170. package/dist/init/multi-dev/install.js +4 -4
  171. package/dist/init/overlay.js +1 -0
  172. package/dist/init/overlay.js.map +1 -1
  173. package/dist/init/phases/1-detect.js +1 -1
  174. package/dist/init/phases/1-detect.js.map +1 -1
  175. package/dist/init/phases/{7c-rules-merge.d.ts → 10-rules-merge.d.ts} +2 -2
  176. package/dist/init/phases/{7c-rules-merge.js → 10-rules-merge.js} +6 -12
  177. package/dist/init/phases/10-rules-merge.js.map +1 -0
  178. package/dist/init/phases/11-baseline.d.ts +7 -0
  179. package/dist/init/phases/{8-baseline.js → 11-baseline.js} +5 -9
  180. package/dist/init/phases/11-baseline.js.map +1 -0
  181. package/dist/init/phases/12-strip.d.ts +10 -0
  182. package/dist/init/phases/{10-strip.js → 12-strip.js} +10 -14
  183. package/dist/init/phases/12-strip.js.map +1 -0
  184. package/dist/init/phases/{12-multidev.d.ts → 13-multidev.d.ts} +2 -2
  185. package/dist/init/phases/{12-multidev.js → 13-multidev.js} +4 -4
  186. package/dist/init/phases/{12-multidev.js.map → 13-multidev.js.map} +1 -1
  187. package/dist/init/phases/3-mapper.d.ts +1 -1
  188. package/dist/init/phases/3-mapper.js +2 -2
  189. package/dist/init/phases/3-mapper.js.map +1 -1
  190. package/dist/init/phases/{3b-seed.d.ts → 4-seed.d.ts} +2 -2
  191. package/dist/init/phases/{3b-seed.js → 4-seed.js} +7 -7
  192. package/dist/init/phases/4-seed.js.map +1 -0
  193. package/dist/init/phases/{4-pilot.d.ts → 5-pilot.d.ts} +2 -2
  194. package/dist/init/phases/{4-pilot.js → 5-pilot.js} +9 -9
  195. package/dist/init/phases/{4-pilot.js.map → 5-pilot.js.map} +1 -1
  196. package/dist/init/phases/{5-brand.d.ts → 6-brand.d.ts} +2 -7
  197. package/dist/init/phases/{5-brand.js → 6-brand.js} +6 -14
  198. package/dist/init/phases/6-brand.js.map +1 -0
  199. package/dist/init/phases/{5b-topic-index.d.ts → 7-topic-index.d.ts} +2 -11
  200. package/dist/init/phases/{5b-topic-index.js → 7-topic-index.js} +9 -18
  201. package/dist/init/phases/7-topic-index.js.map +1 -0
  202. package/dist/init/phases/8-docs-ingest.d.ts +10 -0
  203. package/dist/init/phases/{6-docs-ingest.js → 8-docs-ingest.js} +12 -14
  204. package/dist/init/phases/8-docs-ingest.js.map +1 -0
  205. package/dist/init/phases/9-source-comments.d.ts +6 -0
  206. package/dist/init/phases/{7b-source-comments.js → 9-source-comments.js} +7 -26
  207. package/dist/init/phases/9-source-comments.js.map +1 -0
  208. package/dist/init/phases/index.d.ts +12 -12
  209. package/dist/init/phases/index.js +11 -11
  210. package/dist/init/phases/index.js.map +1 -1
  211. package/dist/init/phases/{parallel-678.d.ts → parallel-8910.d.ts} +7 -8
  212. package/dist/init/phases/{parallel-678.js → parallel-8910.js} +34 -46
  213. package/dist/init/phases/parallel-8910.js.map +1 -0
  214. package/dist/init/phases/source-comments-output-io.d.ts +3 -3
  215. package/dist/init/phases/source-comments-output-io.js +3 -3
  216. package/dist/init/phases/types.d.ts +1 -1
  217. package/dist/init/phases/types.js +10 -10
  218. package/dist/init/phases/types.js.map +1 -1
  219. package/dist/init/rules-merge/discover.d.ts +2 -2
  220. package/dist/init/rules-merge/discover.js +28 -43
  221. package/dist/init/rules-merge/discover.js.map +1 -1
  222. package/dist/init/rules-merge/ingest.d.ts +6 -6
  223. package/dist/init/rules-merge/ingest.js +9 -10
  224. package/dist/init/rules-merge/ingest.js.map +1 -1
  225. package/dist/init/rules-merge/keep-markers.d.ts +1 -1
  226. package/dist/init/rules-merge/keep-markers.js +1 -1
  227. package/dist/init/rules-merge/regenerate.d.ts +3 -3
  228. package/dist/init/rules-merge/regenerate.js +3 -3
  229. package/dist/init/seed.js +17 -24
  230. package/dist/init/seed.js.map +1 -1
  231. package/dist/init/sot-emit.d.ts +48 -8
  232. package/dist/init/sot-emit.js +88 -10
  233. package/dist/init/sot-emit.js.map +1 -1
  234. package/dist/init/source-comments/classify.d.ts +2 -2
  235. package/dist/init/source-comments/classify.js +9 -1
  236. package/dist/init/source-comments/classify.js.map +1 -1
  237. package/dist/init/source-comments/index.d.ts +1 -1
  238. package/dist/init/source-comments/index.js.map +1 -1
  239. package/dist/init/source-comments/ingest.d.ts +2 -2
  240. package/dist/init/source-comments/ingest.js +110 -12
  241. package/dist/init/source-comments/ingest.js.map +1 -1
  242. package/dist/init/source-comments/strip-replace.js +3 -2
  243. package/dist/init/source-comments/strip-replace.js.map +1 -1
  244. package/dist/init/source-comments/walker.d.ts +3 -26
  245. package/dist/init/source-comments/walker.js +18 -30
  246. package/dist/init/source-comments/walker.js.map +1 -1
  247. package/dist/init/topic-index/index.d.ts +15 -1
  248. package/dist/init/topic-index/index.js +84 -5
  249. package/dist/init/topic-index/index.js.map +1 -1
  250. package/dist/init/topic-index/judge.d.ts +5 -9
  251. package/dist/init/topic-index/judge.js +25 -17
  252. package/dist/init/topic-index/judge.js.map +1 -1
  253. package/dist/init/topic-index/resolve.d.ts +23 -3
  254. package/dist/init/topic-index/resolve.js +102 -16
  255. package/dist/init/topic-index/resolve.js.map +1 -1
  256. package/dist/init/topic-index/walk.d.ts +36 -4
  257. package/dist/init/topic-index/walk.js +78 -12
  258. package/dist/init/topic-index/walk.js.map +1 -1
  259. package/dist/lock.js +4 -1
  260. package/dist/lock.js.map +1 -1
  261. package/dist/logger.js +3 -0
  262. package/dist/logger.js.map +1 -1
  263. package/dist/mcp/history/summarizer.js +6 -1
  264. package/dist/mcp/history/summarizer.js.map +1 -1
  265. package/dist/mcp/history/walker.js +1 -1
  266. package/dist/mcp/history/walker.js.map +1 -1
  267. package/dist/mcp/path-allowlist.js +1 -1
  268. package/dist/mcp/path-allowlist.js.map +1 -1
  269. package/dist/mcp/schemas.d.ts +47 -21
  270. package/dist/mcp/schemas.js +38 -9
  271. package/dist/mcp/schemas.js.map +1 -1
  272. package/dist/mcp/server.js +10 -0
  273. package/dist/mcp/server.js.map +1 -1
  274. package/dist/mcp/tools/archive.js +1 -1
  275. package/dist/mcp/tools/archive.js.map +1 -1
  276. package/dist/mcp/tools/attention-wait.js +12 -2
  277. package/dist/mcp/tools/attention-wait.js.map +1 -1
  278. package/dist/mcp/tools/bulk-accept-attention.js +29 -30
  279. package/dist/mcp/tools/bulk-accept-attention.js.map +1 -1
  280. package/dist/mcp/tools/canonical-for-topic.js +37 -15
  281. package/dist/mcp/tools/canonical-for-topic.js.map +1 -1
  282. package/dist/mcp/tools/decision-get.js +2 -2
  283. package/dist/mcp/tools/decision-get.js.map +1 -1
  284. package/dist/mcp/tools/decisions-for-symbol.js +2 -2
  285. package/dist/mcp/tools/decisions-for-symbol.js.map +1 -1
  286. package/dist/mcp/tools/get-full.js +1 -1
  287. package/dist/mcp/tools/get-full.js.map +1 -1
  288. package/dist/mcp/tools/ground-get.js +1 -1
  289. package/dist/mcp/tools/ground-get.js.map +1 -1
  290. package/dist/mcp/tools/in-scope.d.ts +8 -0
  291. package/dist/mcp/tools/in-scope.js +125 -0
  292. package/dist/mcp/tools/in-scope.js.map +1 -0
  293. package/dist/mcp/tools/index.js +11 -6
  294. package/dist/mcp/tools/index.js.map +1 -1
  295. package/dist/mcp/tools/init-phases.d.ts +3 -2
  296. package/dist/mcp/tools/init-phases.js +125 -124
  297. package/dist/mcp/tools/init-phases.js.map +1 -1
  298. package/dist/mcp/tools/invariant-get.js +2 -2
  299. package/dist/mcp/tools/invariant-get.js.map +1 -1
  300. package/dist/mcp/tools/record-decision.d.ts +4 -3
  301. package/dist/mcp/tools/record-decision.js +111 -36
  302. package/dist/mcp/tools/record-decision.js.map +1 -1
  303. package/dist/mcp/tools/reject-candidate.d.ts +24 -0
  304. package/dist/mcp/tools/reject-candidate.js +71 -0
  305. package/dist/mcp/tools/reject-candidate.js.map +1 -0
  306. package/dist/mcp/tools/resolve-attention.d.ts +5 -18
  307. package/dist/mcp/tools/resolve-attention.js +58 -158
  308. package/dist/mcp/tools/resolve-attention.js.map +1 -1
  309. package/dist/mcp/tools/search-candidates.d.ts +20 -0
  310. package/dist/mcp/tools/search-candidates.js +93 -0
  311. package/dist/mcp/tools/search-candidates.js.map +1 -0
  312. package/dist/mcp/tools/search.js +5 -4
  313. package/dist/mcp/tools/search.js.map +1 -1
  314. package/dist/mcp/tools/supersedes-chain.js +2 -2
  315. package/dist/mcp/tools/supersedes-chain.js.map +1 -1
  316. package/dist/mcp/tools/task-create.d.ts +1 -0
  317. package/dist/mcp/tools/task-create.js +2 -0
  318. package/dist/mcp/tools/task-create.js.map +1 -1
  319. package/dist/mcp/tools/timeline.js +1 -1
  320. package/dist/mcp/tools/timeline.js.map +1 -1
  321. package/dist/mcp/tools/types.d.ts +1 -0
  322. package/dist/mcp/tools/types.js +9 -1
  323. package/dist/mcp/tools/types.js.map +1 -1
  324. package/dist/sensors/attestation.d.ts +1 -1
  325. package/dist/sensors/attestation.js +2 -2
  326. package/dist/sensors/attestation.js.map +1 -1
  327. package/dist/sensors/catalog.d.ts +26 -28
  328. package/dist/sensors/catalog.js +79 -81
  329. package/dist/sensors/catalog.js.map +1 -1
  330. package/dist/sensors/decisions.d.ts +1 -1
  331. package/dist/sensors/decisions.js +15 -14
  332. package/dist/sensors/decisions.js.map +1 -1
  333. package/dist/sensors/diff.js +46 -22
  334. package/dist/sensors/diff.js.map +1 -1
  335. package/dist/sensors/runner.d.ts +2 -2
  336. package/dist/sensors/runner.js +3 -3
  337. package/dist/sensors/shell.d.ts +4 -0
  338. package/dist/sensors/shell.js +16 -0
  339. package/dist/sensors/shell.js.map +1 -0
  340. package/dist/sensors/structural.d.ts +3 -2
  341. package/dist/sensors/structural.js +3 -11
  342. package/dist/sensors/structural.js.map +1 -1
  343. package/dist/sensors/stub-catalog.d.ts +2 -1
  344. package/dist/sensors/stub-catalog.js +2 -9
  345. package/dist/sensors/stub-catalog.js.map +1 -1
  346. package/dist/sensors/types.d.ts +3 -4
  347. package/dist/sensors/types.js +1 -2
  348. package/dist/sensors/types.js.map +1 -1
  349. package/dist/session-start/build.js +1 -1
  350. package/dist/session-start/build.js.map +1 -1
  351. package/dist/status-line/event-queue.js +1 -1
  352. package/dist/status-line/index.d.ts +1 -1
  353. package/package.json +3 -2
  354. package/templates/.cairn/config/sensors.yaml +8 -8
  355. package/templates/attention-ui/app.js +101 -39
  356. package/dist/fs.d.ts +0 -5
  357. package/dist/fs.js +0 -11
  358. package/dist/fs.js.map +0 -1
  359. package/dist/ground/alignment-pending.d.ts +0 -28
  360. package/dist/ground/alignment-pending.js +0 -83
  361. package/dist/ground/alignment-pending.js.map +0 -1
  362. package/dist/ground/anchor-map.d.ts +0 -14
  363. package/dist/ground/anchor-map.js +0 -56
  364. package/dist/ground/anchor-map.js.map +0 -1
  365. package/dist/ground/drift.d.ts +0 -8
  366. package/dist/ground/drift.js +0 -23
  367. package/dist/ground/drift.js.map +0 -1
  368. package/dist/ground/frontmatter.d.ts +0 -32
  369. package/dist/ground/frontmatter.js +0 -77
  370. package/dist/ground/frontmatter.js.map +0 -1
  371. package/dist/ground/glob.d.ts +0 -10
  372. package/dist/ground/glob.js +0 -46
  373. package/dist/ground/glob.js.map +0 -1
  374. package/dist/ground/index.d.ts +0 -23
  375. package/dist/ground/index.js +0 -17
  376. package/dist/ground/index.js.map +0 -1
  377. package/dist/ground/ledgers.d.ts +0 -14
  378. package/dist/ground/ledgers.js +0 -105
  379. package/dist/ground/ledgers.js.map +0 -1
  380. package/dist/ground/manifest.d.ts +0 -10
  381. package/dist/ground/manifest.js +0 -84
  382. package/dist/ground/manifest.js.map +0 -1
  383. package/dist/ground/paths.d.ts +0 -41
  384. package/dist/ground/paths.js +0 -103
  385. package/dist/ground/paths.js.map +0 -1
  386. package/dist/ground/quality-grades.d.ts +0 -11
  387. package/dist/ground/quality-grades.js +0 -100
  388. package/dist/ground/quality-grades.js.map +0 -1
  389. package/dist/ground/schemas.d.ts +0 -502
  390. package/dist/ground/schemas.js +0 -318
  391. package/dist/ground/schemas.js.map +0 -1
  392. package/dist/ground/scope-index.d.ts +0 -96
  393. package/dist/ground/scope-index.js +0 -290
  394. package/dist/ground/scope-index.js.map +0 -1
  395. package/dist/ground/slug.d.ts +0 -60
  396. package/dist/ground/slug.js +0 -103
  397. package/dist/ground/slug.js.map +0 -1
  398. package/dist/ground/sot-bindings.d.ts +0 -14
  399. package/dist/ground/sot-bindings.js +0 -79
  400. package/dist/ground/sot-bindings.js.map +0 -1
  401. package/dist/ground/sot-cache.d.ts +0 -18
  402. package/dist/ground/sot-cache.js +0 -62
  403. package/dist/ground/sot-cache.js.map +0 -1
  404. package/dist/ground/topic-index.d.ts +0 -27
  405. package/dist/ground/topic-index.js +0 -82
  406. package/dist/ground/topic-index.js.map +0 -1
  407. package/dist/ground/walk.d.ts +0 -7
  408. package/dist/ground/walk.js +0 -53
  409. package/dist/ground/walk.js.map +0 -1
  410. package/dist/hooks/post-tool-use/ledger-cache.d.ts +0 -40
  411. package/dist/hooks/post-tool-use/ledger-cache.js +0 -290
  412. package/dist/hooks/post-tool-use/ledger-cache.js.map +0 -1
  413. package/dist/init/phases/10-strip.d.ts +0 -11
  414. package/dist/init/phases/10-strip.js.map +0 -1
  415. package/dist/init/phases/3b-seed.js.map +0 -1
  416. package/dist/init/phases/5-brand.js.map +0 -1
  417. package/dist/init/phases/5b-topic-index.js.map +0 -1
  418. package/dist/init/phases/6-docs-ingest.d.ts +0 -10
  419. package/dist/init/phases/6-docs-ingest.js.map +0 -1
  420. package/dist/init/phases/7b-source-comments.d.ts +0 -15
  421. package/dist/init/phases/7b-source-comments.js.map +0 -1
  422. package/dist/init/phases/7c-rules-merge.js.map +0 -1
  423. package/dist/init/phases/8-baseline.d.ts +0 -10
  424. package/dist/init/phases/8-baseline.js.map +0 -1
  425. package/dist/init/phases/parallel-678.js.map +0 -1
  426. package/dist/mcp/tools/decisions-in-scope.d.ts +0 -7
  427. package/dist/mcp/tools/decisions-in-scope.js +0 -66
  428. package/dist/mcp/tools/decisions-in-scope.js.map +0 -1
  429. package/dist/mcp/tools/invariants-in-scope.d.ts +0 -7
  430. package/dist/mcp/tools/invariants-in-scope.js +0 -81
  431. package/dist/mcp/tools/invariants-in-scope.js.map +0 -1
@@ -1,27 +0,0 @@
1
- import { TopicIndex, type TopicIndexEntry } from "./schemas.js";
2
- /**
3
- * Topic-index is the ground-state file that maps content-fingerprint
4
- * slugs to the DECs they belong to. Phase 5b builds it before any
5
- * extractor runs so phases 6 / 7b / 7c can dedup-by-topic instead of
6
- * emitting one DEC per source. Layer A's PostToolUse hook reads it on
7
- * every Write to know whether a freshly typed prose block is the first
8
- * sighting of its content or a repeat of an existing topic.
9
- */
10
- export declare function emptyTopicIndex(): TopicIndex;
11
- export declare function readTopicIndex(repoRoot: string): TopicIndex;
12
- export declare function writeTopicIndex(repoRoot: string, index: TopicIndex): string;
13
- /**
14
- * Insert or replace a topic entry. Returns the updated index.
15
- */
16
- export declare function setTopic(index: TopicIndex, slug: string, entry: TopicIndexEntry): TopicIndex;
17
- /**
18
- * Look up a topic by slug. Returns null if absent.
19
- */
20
- export declare function getTopic(index: TopicIndex, slug: string): TopicIndexEntry | null;
21
- /**
22
- * Clear `dec_id` from any topic entry that references this DEC. Used
23
- * by `cairn attention undo` for tier3-creation reversal so the topic
24
- * stays in the index (next phase 5b walk can re-emit the topic) but
25
- * no longer points at the now-deleted DEC.
26
- */
27
- export declare function clearDecFromTopicIndex(index: TopicIndex, decId: string): TopicIndex;
@@ -1,82 +0,0 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { writeFileSafe } from "../fs.js";
3
- import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
4
- import { logger } from "../logger.js";
5
- import { topicIndexPath } from "./paths.js";
6
- import { TopicIndex } from "./schemas.js";
7
- const log = logger("ground.topic-index");
8
- /**
9
- * Topic-index is the ground-state file that maps content-fingerprint
10
- * slugs to the DECs they belong to. Phase 5b builds it before any
11
- * extractor runs so phases 6 / 7b / 7c can dedup-by-topic instead of
12
- * emitting one DEC per source. Layer A's PostToolUse hook reads it on
13
- * every Write to know whether a freshly typed prose block is the first
14
- * sighting of its content or a repeat of an existing topic.
15
- */
16
- export function emptyTopicIndex() {
17
- return { version: 1, generated: new Date().toISOString(), topics: {} };
18
- }
19
- export function readTopicIndex(repoRoot) {
20
- const path = topicIndexPath(repoRoot);
21
- if (!existsSync(path))
22
- return emptyTopicIndex();
23
- try {
24
- const raw = readFileSync(path, "utf8");
25
- const parsed = TopicIndex.safeParse(parseYaml(raw));
26
- if (!parsed.success) {
27
- log.warn({ path, error: parsed.error.message }, "topic-index invalid; treating as empty");
28
- return emptyTopicIndex();
29
- }
30
- return parsed.data;
31
- }
32
- catch (err) {
33
- log.warn({ path, err }, "topic-index read failed; treating as empty");
34
- return emptyTopicIndex();
35
- }
36
- }
37
- export function writeTopicIndex(repoRoot, index) {
38
- const path = topicIndexPath(repoRoot);
39
- const next = { ...index, generated: new Date().toISOString() };
40
- writeFileSafe(path, stringifyYaml(next));
41
- log.debug({ path, topics: Object.keys(next.topics).length }, "wrote topic-index");
42
- return path;
43
- }
44
- /**
45
- * Insert or replace a topic entry. Returns the updated index.
46
- */
47
- export function setTopic(index, slug, entry) {
48
- return {
49
- ...index,
50
- topics: { ...index.topics, [slug]: entry },
51
- };
52
- }
53
- /**
54
- * Look up a topic by slug. Returns null if absent.
55
- */
56
- export function getTopic(index, slug) {
57
- return index.topics[slug] ?? null;
58
- }
59
- /**
60
- * Clear `dec_id` from any topic entry that references this DEC. Used
61
- * by `cairn attention undo` for tier3-creation reversal so the topic
62
- * stays in the index (next phase 5b walk can re-emit the topic) but
63
- * no longer points at the now-deleted DEC.
64
- */
65
- export function clearDecFromTopicIndex(index, decId) {
66
- let mutated = false;
67
- const topics = {};
68
- for (const [slug, entry] of Object.entries(index.topics)) {
69
- if (entry.dec_id === decId) {
70
- const { dec_id: _omitted, ...rest } = entry;
71
- topics[slug] = rest;
72
- mutated = true;
73
- }
74
- else {
75
- topics[slug] = entry;
76
- }
77
- }
78
- if (!mutated)
79
- return index;
80
- return { ...index, topics };
81
- }
82
- //# sourceMappingURL=topic-index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"topic-index.js","sourceRoot":"","sources":["../../src/ground/topic-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAC;AAEhE,MAAM,GAAG,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAEzC;;;;;;;GAOG;AAEH,MAAM,UAAU,eAAe;IAC7B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,MAAM,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,eAAe,EAAE,CAAC;IAChD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CA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AAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAiB,EAAE,IAAY;IACtD,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AACpC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAAiB,EACjB,KAAa;IAEb,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,MAAM,GAAoC,EAAE,CAAC;IACnD,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACzD,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;YAC3B,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YACpB,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IACD,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Walks the repo from root and returns every file (relative to root) that
3
- * matches CANONICAL_GLOBS and is not excluded by CANONICAL_EXCLUDES.
4
- *
5
- * Skips heavyweight noise dirs (.git, node_modules, dist, etc.) eagerly.
6
- */
7
- export declare function walkCanonical(repoRoot: string): string[];
@@ -1,53 +0,0 @@
1
- import { readdirSync } from "node:fs";
2
- import { relative, resolve } from "node:path";
3
- import { CANONICAL_EXCLUDES, CANONICAL_GLOBS } from "./paths.js";
4
- import { matchAnyGlob } from "./glob.js";
5
- const SKIP_DIRS = new Set([
6
- ".git",
7
- "node_modules",
8
- ".pnpm-store",
9
- "dist",
10
- ".next",
11
- ".turbo",
12
- ".cache",
13
- ".archive",
14
- ]);
15
- /**
16
- * Walks the repo from root and returns every file (relative to root) that
17
- * matches CANONICAL_GLOBS and is not excluded by CANONICAL_EXCLUDES.
18
- *
19
- * Skips heavyweight noise dirs (.git, node_modules, dist, etc.) eagerly.
20
- */
21
- export function walkCanonical(repoRoot) {
22
- const out = [];
23
- const stack = [repoRoot];
24
- while (stack.length > 0) {
25
- const dir = stack.pop();
26
- if (dir === undefined)
27
- break;
28
- let entries;
29
- try {
30
- entries = readdirSync(dir, { withFileTypes: true, encoding: "utf8" });
31
- }
32
- catch {
33
- continue;
34
- }
35
- for (const entry of entries) {
36
- const abs = resolve(dir, entry.name);
37
- if (entry.isDirectory()) {
38
- if (SKIP_DIRS.has(entry.name))
39
- continue;
40
- stack.push(abs);
41
- }
42
- else if (entry.isFile()) {
43
- const rel = relative(repoRoot, abs).replace(/\\/g, "/");
44
- if (matchAnyGlob(rel, CANONICAL_GLOBS) && !matchAnyGlob(rel, CANONICAL_EXCLUDES)) {
45
- out.push(rel);
46
- }
47
- }
48
- }
49
- }
50
- out.sort();
51
- return out;
52
- }
53
- //# sourceMappingURL=walk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"walk.js","sourceRoot":"","sources":["../../src/ground/walk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACxB,MAAM;IACN,cAAc;IACd,aAAa;IACb,MAAM;IACN,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,UAAU;CACX,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,aAAa,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2
- * Per-process LRU cache (max 1 entry) for the invariants ledger and
3
- * task-status lookups consumed by the read-enricher hook. All disk
4
- * reads here are best-effort: any failure returns null/not_found so
5
- * the hook stays a no-op.
6
- */
7
- import { type ScopeIndexEntry } from "../../ground/scope-index.js";
8
- export type { ScopeIndexEntry } from "../../ground/scope-index.js";
9
- export interface LedgerSnapshot {
10
- invariantsByid: Map<string, {
11
- title: string;
12
- status: string;
13
- superseded_by?: string;
14
- }>;
15
- }
16
- export interface DecisionsLedgerSnapshot {
17
- decisionsByid: Map<string, {
18
- title: string;
19
- status: string;
20
- superseded_by?: string;
21
- }>;
22
- }
23
- export interface TaskLookupResult {
24
- found: "active" | "done" | "not_found";
25
- title?: string;
26
- }
27
- export declare function getInvariantsLedger(repoRoot: string): LedgerSnapshot | null;
28
- export declare function getDecisionsLedger(repoRoot: string): DecisionsLedgerSnapshot | null;
29
- export declare function lookupTask(repoRoot: string, taskId: string): TaskLookupResult;
30
- /**
31
- * Cached scope-index reader. Content-keyed (sha256 of first 512 bytes) so
32
- * back-to-back hook invocations in the same process don't re-parse the file
33
- * AND so concurrent ledger writes that happen within the same mtime tick
34
- * are not silently masked by a stale cache hit (Gap 6 in BUILD_REPORT).
35
- *
36
- * Returns null when the file is missing, when no entry matches the path,
37
- * when the entry is explicitly `unscoped: true`, or when the entry has no
38
- * decisions/invariants — i.e., when there is nothing useful to surface.
39
- */
40
- export declare function getScopeIndexEntry(repoRoot: string, repoRelativePath: string): ScopeIndexEntry | null;
@@ -1,290 +0,0 @@
1
- /**
2
- * Per-process LRU cache (max 1 entry) for the invariants ledger and
3
- * task-status lookups consumed by the read-enricher hook. All disk
4
- * reads here are best-effort: any failure returns null/not_found so
5
- * the hook stays a no-op.
6
- */
7
- import { createHash } from "node:crypto";
8
- import { existsSync, openSync, readFileSync, readSync, closeSync, statSync } from "node:fs";
9
- import { join } from "node:path";
10
- import { parse as parseYaml } from "yaml";
11
- import { lookupScope, readScopeIndex, scopeIndexPath, } from "../../ground/scope-index.js";
12
- const SCOPE_INDEX_HASH_BYTES = 512;
13
- /**
14
- * Hash the first N bytes of a file. Returns null when the file can't be read.
15
- * Used as the cache key for scope-index — mtime is unreliable under clock
16
- * skew (concurrent ledger writes can land with the same mtime as the
17
- * previous read).
18
- */
19
- function hashFilePrefix(path, bytes) {
20
- let fd;
21
- try {
22
- fd = openSync(path, "r");
23
- }
24
- catch {
25
- return null;
26
- }
27
- try {
28
- const buf = Buffer.alloc(bytes);
29
- const read = readSync(fd, buf, 0, bytes, 0);
30
- return createHash("sha256")
31
- .update(buf.subarray(0, read))
32
- .digest("hex");
33
- }
34
- catch {
35
- return null;
36
- }
37
- finally {
38
- try {
39
- closeSync(fd);
40
- }
41
- catch {
42
- // ignore — best-effort
43
- }
44
- }
45
- }
46
- let invariantsCache = null;
47
- let decisionsCache = null;
48
- let activeTasksCache = null;
49
- let doneTasksCache = null;
50
- let scopeIndexCache = null;
51
- function invariantsLedgerFile(repoRoot) {
52
- return join(repoRoot, ".cairn", "ground", "invariants", "invariants.ledger.yaml");
53
- }
54
- export function getInvariantsLedger(repoRoot) {
55
- const path = invariantsLedgerFile(repoRoot);
56
- if (!existsSync(path))
57
- return null;
58
- let mtimeMs;
59
- try {
60
- mtimeMs = statSync(path).mtimeMs;
61
- }
62
- catch {
63
- return null;
64
- }
65
- if (invariantsCache !== null &&
66
- invariantsCache.repoRoot === repoRoot &&
67
- invariantsCache.mtimeMs === mtimeMs) {
68
- return invariantsCache.snapshot;
69
- }
70
- let parsed;
71
- try {
72
- parsed = parseYaml(readFileSync(path, "utf8"));
73
- }
74
- catch {
75
- return null;
76
- }
77
- if (!Array.isArray(parsed))
78
- return null;
79
- const map = new Map();
80
- for (const raw of parsed) {
81
- if (typeof raw !== "object" || raw === null)
82
- continue;
83
- const r = raw;
84
- const id = typeof r["id"] === "string" ? r["id"] : null;
85
- const title = typeof r["title"] === "string" ? r["title"] : "";
86
- const status = typeof r["status"] === "string" ? r["status"] : "active";
87
- const supersededByRaw = r["superseded_by"];
88
- const supersededBy = typeof supersededByRaw === "string" && supersededByRaw.length > 0
89
- ? supersededByRaw
90
- : undefined;
91
- if (id === null)
92
- continue;
93
- map.set(id, {
94
- title,
95
- status,
96
- ...(supersededBy !== undefined ? { superseded_by: supersededBy } : {}),
97
- });
98
- }
99
- const snapshot = { invariantsByid: map };
100
- invariantsCache = { repoRoot, mtimeMs, snapshot };
101
- return snapshot;
102
- }
103
- function decisionsLedgerFile(repoRoot) {
104
- return join(repoRoot, ".cairn", "ground", "decisions", "decisions.ledger.yaml");
105
- }
106
- export function getDecisionsLedger(repoRoot) {
107
- const path = decisionsLedgerFile(repoRoot);
108
- if (!existsSync(path))
109
- return null;
110
- let mtimeMs;
111
- try {
112
- mtimeMs = statSync(path).mtimeMs;
113
- }
114
- catch {
115
- return null;
116
- }
117
- if (decisionsCache !== null &&
118
- decisionsCache.repoRoot === repoRoot &&
119
- decisionsCache.mtimeMs === mtimeMs) {
120
- return decisionsCache.snapshot;
121
- }
122
- let parsed;
123
- try {
124
- parsed = parseYaml(readFileSync(path, "utf8"));
125
- }
126
- catch {
127
- return null;
128
- }
129
- if (!Array.isArray(parsed))
130
- return null;
131
- const map = new Map();
132
- for (const raw of parsed) {
133
- if (typeof raw !== "object" || raw === null)
134
- continue;
135
- const r = raw;
136
- const id = typeof r["id"] === "string" ? r["id"] : null;
137
- const title = typeof r["title"] === "string" ? r["title"] : "";
138
- const status = typeof r["status"] === "string" ? r["status"] : "accepted";
139
- const supersededByRaw = r["superseded_by"];
140
- const supersededBy = typeof supersededByRaw === "string" && supersededByRaw.length > 0
141
- ? supersededByRaw
142
- : undefined;
143
- if (id === null)
144
- continue;
145
- map.set(id, {
146
- title,
147
- status,
148
- ...(supersededBy !== undefined ? { superseded_by: supersededBy } : {}),
149
- });
150
- }
151
- const snapshot = { decisionsByid: map };
152
- decisionsCache = { repoRoot, mtimeMs, snapshot };
153
- return snapshot;
154
- }
155
- function tasksScopeDir(repoRoot, scope) {
156
- return join(repoRoot, ".cairn", "tasks", scope);
157
- }
158
- function readDirMtime(path) {
159
- if (!existsSync(path))
160
- return null;
161
- try {
162
- return statSync(path).mtimeMs;
163
- }
164
- catch {
165
- return null;
166
- }
167
- }
168
- function extractTitle(taskDir) {
169
- const candidates = [
170
- join(taskDir, "spec.tightened.md"),
171
- join(taskDir, "spec.md"),
172
- ];
173
- for (const c of candidates) {
174
- if (!existsSync(c))
175
- continue;
176
- try {
177
- const text = readFileSync(c, "utf8");
178
- const m = text.match(/^#\s+(.+)$/m);
179
- if (m && typeof m[1] === "string")
180
- return m[1].trim();
181
- }
182
- catch {
183
- // ignore — try next candidate
184
- }
185
- }
186
- return "";
187
- }
188
- function resolveCacheForScope(repoRoot, scope) {
189
- const dir = tasksScopeDir(repoRoot, scope);
190
- const mtimeMs = readDirMtime(dir);
191
- if (mtimeMs === null)
192
- return null;
193
- const cache = scope === "active" ? activeTasksCache : doneTasksCache;
194
- if (cache !== null &&
195
- cache.repoRoot === repoRoot &&
196
- cache.scope === scope &&
197
- cache.mtimeMs === mtimeMs) {
198
- return cache;
199
- }
200
- // Lazy: don't pre-walk all task dirs. We populate `titles` on demand
201
- // in `lookupTask`. Empty map keyed to current dir mtime is fine.
202
- const fresh = {
203
- repoRoot,
204
- scope,
205
- mtimeMs,
206
- titles: new Map(),
207
- };
208
- if (scope === "active")
209
- activeTasksCache = fresh;
210
- else
211
- doneTasksCache = fresh;
212
- return fresh;
213
- }
214
- export function lookupTask(repoRoot, taskId) {
215
- // Active first.
216
- const activeDir = tasksScopeDir(repoRoot, "active");
217
- const activeTaskDir = join(activeDir, taskId);
218
- if (existsSync(activeTaskDir)) {
219
- const cache = resolveCacheForScope(repoRoot, "active");
220
- if (cache !== null) {
221
- let title = cache.titles.get(taskId);
222
- if (title === undefined) {
223
- title = extractTitle(activeTaskDir);
224
- cache.titles.set(taskId, title);
225
- }
226
- return title.length > 0
227
- ? { found: "active", title }
228
- : { found: "active" };
229
- }
230
- // Couldn't cache, but the dir is present.
231
- const title = extractTitle(activeTaskDir);
232
- return title.length > 0 ? { found: "active", title } : { found: "active" };
233
- }
234
- const doneDir = tasksScopeDir(repoRoot, "done");
235
- const doneTaskDir = join(doneDir, taskId);
236
- if (existsSync(doneTaskDir)) {
237
- const cache = resolveCacheForScope(repoRoot, "done");
238
- if (cache !== null) {
239
- let title = cache.titles.get(taskId);
240
- if (title === undefined) {
241
- title = extractTitle(doneTaskDir);
242
- cache.titles.set(taskId, title);
243
- }
244
- return title.length > 0 ? { found: "done", title } : { found: "done" };
245
- }
246
- const title = extractTitle(doneTaskDir);
247
- return title.length > 0 ? { found: "done", title } : { found: "done" };
248
- }
249
- return { found: "not_found" };
250
- }
251
- /**
252
- * Cached scope-index reader. Content-keyed (sha256 of first 512 bytes) so
253
- * back-to-back hook invocations in the same process don't re-parse the file
254
- * AND so concurrent ledger writes that happen within the same mtime tick
255
- * are not silently masked by a stale cache hit (Gap 6 in BUILD_REPORT).
256
- *
257
- * Returns null when the file is missing, when no entry matches the path,
258
- * when the entry is explicitly `unscoped: true`, or when the entry has no
259
- * decisions/invariants — i.e., when there is nothing useful to surface.
260
- */
261
- export function getScopeIndexEntry(repoRoot, repoRelativePath) {
262
- const path = scopeIndexPath(repoRoot);
263
- if (!existsSync(path))
264
- return null;
265
- const contentHash = hashFilePrefix(path, SCOPE_INDEX_HASH_BYTES);
266
- if (contentHash === null)
267
- return null;
268
- let index;
269
- if (scopeIndexCache !== null &&
270
- scopeIndexCache.repoRoot === repoRoot &&
271
- scopeIndexCache.contentHash === contentHash) {
272
- index = scopeIndexCache.index;
273
- }
274
- else {
275
- const fresh = readScopeIndex(repoRoot);
276
- if (fresh === null)
277
- return null;
278
- scopeIndexCache = { repoRoot, contentHash, index: fresh };
279
- index = fresh;
280
- }
281
- const entry = lookupScope(index, repoRelativePath);
282
- if (entry === null)
283
- return null;
284
- if (entry.unscoped === true)
285
- return null;
286
- if (entry.decisions.length === 0 && entry.invariants.length === 0)
287
- return null;
288
- return entry;
289
- }
290
- //# sourceMappingURL=ledger-cache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ledger-cache.js","sourceRoot":"","sources":["../../../src/hooks/post-tool-use/ledger-cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,GAGf,MAAM,6BAA6B,CAAC;AAkDrC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAEnC;;;;;GAKG;AACH,SAAS,cAAc,CAAC,IAAY,EAAE,KAAa;IACjD,IAAI,EAAU,CAAC;IACf,IAAI,CAAC;QACH,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAC5C,OAAO,UAAU,CAAC,QAAQ,CAAC;aACxB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;aAC7B,MAAM,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YACH,SAAS,CAAC,EAAE,CAAC,CAAC;QAChB,C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IAAI;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,KAAiB,CAAC;IACtB,IACE,eAAe,KAAK,IAAI;QACxB,eAAe,CAAC,QAAQ,KAAK,QAAQ;QACrC,eAAe,CAAC,WAAW,KAAK,WAAW,EAC3C,CAAC;QACD,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC;IAChC,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAChC,eAAe,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC1D,KAAK,GAAG,KAAK,CAAC;IAChB,CAAC;IACD,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACnD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/E,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Phase 10-strip — per-module strip-replace consent.
3
- *
4
- * Surfaces each ingestion-flagged module as an A/B/C choice (strip /
5
- * keep / skip). Tracks remaining modules in
6
- * `outputs["10-strip"].pending` and emits one question at a time
7
- * until the queue is empty. When the list is empty (most repos), the
8
- * phase completes immediately with no operator prompts.
9
- */
10
- import type { PhaseResult, PhaseState } from "./types.js";
11
- export declare function runPhase10Strip(state: PhaseState): Promise<PhaseResult>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"10-strip.js","sourceRoot":"","sources":["../../../src/init/phases/10-strip.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;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ACrB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAClB,0GAA0G,CAC3G,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,MAAM,IAAI,GAAe;YACvB,GAAG,KAAK;YACR,OAAO,EAAE;gBACP,GAAG,KAAK,CAAC,OAAO;gBAChB,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;aACvC;YACD,MAAM,EAAE,SAAS;SAClB,CAAC;QACF,OAAO;YACL,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,gBAAgB;YAC3B,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC;SAC1B,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAkB;QAC9B,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,6CAA6C;QACrD,OAAO,EAAE;YACP;gBACE,EAAE,EAAE,WAAW;gBACf,KAAK,EAAE,gBAAgB;gBACvB,MAAM,EAAE,2DAA2D;aACpE;YACD;gBACE,EAAE,EAAE,MAAM;gBACV,KAAK,EAAE,cAAc;gBACrB,MAAM,EAAE,uDAAuD;aAChE;YACD;gBACE,EAAE,EAAE,QAAQ;gBACZ,KAAK,EAAE,6BAA6B;gBACpC,MAAM,EAAE,sDAAsD;aAC/D;SACF;QACD,OAAO,EAAE,WAAW;KACrB,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACpD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"5b-topic-index.js","sourceRoot":"","sources":["../../../src/init/phases/5b-topic-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,MAAM,GAAG,GAAG,MAAM,CAAC,4BA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;YACf,KAAK,EAAE;gBACL,IAAI,EAAE,oBAAoB;gBAC1B,OAAO,EAAE,kCAAkC,OAAO,EAAE;aACrD;YACD,KAAK;SACN,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Phase 6-docs-ingest — emit verbatim DECs for topic-index entries
3
- * whose SoT lives under `docs/*`.
4
- *
5
- * Wraps `runDocsIngestion`; no operator input. The skill driver
6
- * surfaces the resulting `decsWritten.length` in the post-init summary
7
- * so the operator sees how many doc-paragraph DECs landed.
8
- */
9
- import type { PhaseResult, PhaseState } from "./types.js";
10
- export declare function runPhase6DocsIngest(state: PhaseState): Promise<PhaseResult>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"6-docs-ingest.js","sourceRoot":"","sources":["../../../src/init/phases/6-docs-ingest.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAAiB;IACzD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,CAAC;QACH,MAAM,MAAM,GAAoB,MAAM,gBAAgB,CAAC;YACrD,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE;gBACvB,SAAS,IAAI,CAAC,CAAC;gBACf,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE;oBAC5B,KAAK,EAAE,eAAe;oBACtB,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,SAAS;iBACV,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;QACH,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC9B,MAAM,IAAI,GAAe;YACvB,GAAG,KAAK;YACR,OAAO,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE;SACvD,CAAC;QACF,OAAO;YACL,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,oBAAoB;YAC/B,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC;SAC1B,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO;YACL,MAAM,EAAE,OAAO;YACf,KAAK,EAAE;gBACL,IAAI,EAAE,oBAAoB;gBAC1B,OAAO,EAAE,gCAAgC;gBACzC,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACtE;YACD,KAAK;SACN,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Phase 7b-source-comments — walk every source file's docblock-class
3
- * comment, classify via Haiku, write DEC drafts / invariant proposals.
4
- *
5
- * Heavy walk + per-block classifications spill to
6
- * `.cairn/init/source-comments-walk.json`; only the lightweight projection
7
- * (counts, ledger paths, kindCounts) lives on the persisted phase output.
8
- *
9
- * Project globs from the mapper + the 4-pilot picked module flow into
10
- * scoring so every DEC draft + invariant gets `capture_confidence`
11
- * stamped at write time — `cairn attention bulk-accept` becomes an
12
- * O(1) file move instead of a re-score sweep.
13
- */
14
- import type { PhaseResult, PhaseState } from "./types.js";
15
- export declare function runPhase7bSourceComments(state: PhaseState): Promise<PhaseResult>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"7b-source-comments.js","sourceRoot":"","sources":["../../../src/init/phases/7b-source-comments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GA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AAC,GAAG,CAAC;aACtE;YACD,KAAK;SACN,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Phase 8-baseline — first sensor sweep against the synthetic
3
- * full-tree diff. Stamps the audit row counts under outputs so the
4
- * skill driver can summarize "N findings across M sensors".
5
- *
6
- * Reads the mapper's globs (route handlers, DTOs, etc.) from phase 3
7
- * if available. Falls back to baseline-audit's defaults otherwise.
8
- */
9
- import type { PhaseResult, PhaseState } from "./types.js";
10
- export declare function runPhase8Baseline(state: PhaseState): Promise<PhaseResult>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"8-baseline.js","sourceRoot":"","sources":["../../../src/init/phases/8-baseline.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,wBAAwB,EACxB,gBAAgB,GAEjB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAAiB;IACvD,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAgC,CAAC;IAC3E,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAE1B,CAAC;IACd,MAAM,KAAK,GAAiB,MAAM;QAChC,CAAC,CAAC;YACE,mBAAmB,EAAE,MAAM,CAAC,MAAM,CAAC,mBAAmB;YACtD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS;YAClC,sBAAsB,EAAE,MAAM,CAAC,MAAM,CAAC,sBAAsB;YAC5D,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,iBAAiB;YAClD,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAgB;SAC3C;QACH,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,SAAS,GAAG,wBAAwB,CACxC,CAAC,SAAS,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC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