@boshu2/vibe-check 1.8.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/.agents/plans/2025-12-27-vibe-check-evolution-plan.md +383 -0
  2. package/.agents/research/2025-12-27-vibe-check-evolution.md +352 -0
  3. package/.claude/settings.local.json +9 -3
  4. package/CHANGELOG.md +43 -0
  5. package/CLAUDE.md +201 -26
  6. package/Makefile +4 -4
  7. package/README.md +95 -0
  8. package/bin/vibe-check.js +1 -1
  9. package/claude-progress.json +18 -0
  10. package/dist/analysis/cross-session-analysis.d.ts +1 -1
  11. package/dist/analysis/cross-session-analysis.d.ts.map +1 -1
  12. package/dist/analysis/cross-session-analysis.js +9 -18
  13. package/dist/analysis/cross-session-analysis.js.map +1 -1
  14. package/dist/analysis/index.d.ts +1 -1
  15. package/dist/analysis/index.d.ts.map +1 -1
  16. package/dist/analysis/index.js +1 -11
  17. package/dist/analysis/index.js.map +1 -1
  18. package/dist/analyzers/audit.d.ts +28 -0
  19. package/dist/analyzers/audit.d.ts.map +1 -0
  20. package/dist/analyzers/audit.js +86 -0
  21. package/dist/analyzers/audit.js.map +1 -0
  22. package/dist/analyzers/eldritch.d.ts +40 -0
  23. package/dist/analyzers/eldritch.d.ts.map +1 -0
  24. package/dist/analyzers/eldritch.js +202 -0
  25. package/dist/analyzers/eldritch.js.map +1 -0
  26. package/dist/analyzers/modularity.d.ts +67 -0
  27. package/dist/analyzers/modularity.d.ts.map +1 -0
  28. package/dist/analyzers/modularity.js +254 -0
  29. package/dist/analyzers/modularity.js.map +1 -0
  30. package/dist/analyzers/patterns.d.ts +1 -1
  31. package/dist/analyzers/patterns.d.ts.map +1 -1
  32. package/dist/analyzers/patterns.js +4 -10
  33. package/dist/analyzers/patterns.js.map +1 -1
  34. package/dist/analyzers/quality.d.ts +1 -1
  35. package/dist/analyzers/quality.d.ts.map +1 -1
  36. package/dist/analyzers/quality.js +5 -12
  37. package/dist/analyzers/quality.js.map +1 -1
  38. package/dist/analyzers/sessions.d.ts +1 -1
  39. package/dist/analyzers/sessions.d.ts.map +1 -1
  40. package/dist/analyzers/sessions.js +1 -4
  41. package/dist/analyzers/sessions.js.map +1 -1
  42. package/dist/cli.js +21 -20
  43. package/dist/cli.js.map +1 -1
  44. package/dist/commands/analyze.d.ts.map +1 -1
  45. package/dist/commands/analyze.js +124 -149
  46. package/dist/commands/analyze.js.map +1 -1
  47. package/dist/commands/audit.d.ts +3 -0
  48. package/dist/commands/audit.d.ts.map +1 -0
  49. package/dist/commands/audit.js +102 -0
  50. package/dist/commands/audit.js.map +1 -0
  51. package/dist/commands/cache.js +31 -70
  52. package/dist/commands/cache.js.map +1 -1
  53. package/dist/commands/dashboard.d.ts.map +1 -1
  54. package/dist/commands/dashboard.js +22 -58
  55. package/dist/commands/dashboard.js.map +1 -1
  56. package/dist/commands/forensics.d.ts +10 -2
  57. package/dist/commands/forensics.d.ts.map +1 -1
  58. package/dist/commands/forensics.js +91 -51
  59. package/dist/commands/forensics.js.map +1 -1
  60. package/dist/commands/index.d.ts +15 -13
  61. package/dist/commands/index.d.ts.map +1 -1
  62. package/dist/commands/index.js +15 -33
  63. package/dist/commands/index.js.map +1 -1
  64. package/dist/commands/init-hook.js +26 -32
  65. package/dist/commands/init-hook.js.map +1 -1
  66. package/dist/commands/insights.js +39 -45
  67. package/dist/commands/insights.js.map +1 -1
  68. package/dist/commands/modularity.d.ts +27 -0
  69. package/dist/commands/modularity.d.ts.map +1 -0
  70. package/dist/commands/modularity.js +182 -0
  71. package/dist/commands/modularity.js.map +1 -0
  72. package/dist/commands/pipeline.js +39 -78
  73. package/dist/commands/pipeline.js.map +1 -1
  74. package/dist/commands/profile.js +68 -74
  75. package/dist/commands/profile.js.map +1 -1
  76. package/dist/commands/session.js +88 -129
  77. package/dist/commands/session.js.map +1 -1
  78. package/dist/commands/sessions.d.ts +1 -1
  79. package/dist/commands/sessions.d.ts.map +1 -1
  80. package/dist/commands/sessions.js +42 -49
  81. package/dist/commands/sessions.js.map +1 -1
  82. package/dist/commands/start.js +22 -67
  83. package/dist/commands/start.js.map +1 -1
  84. package/dist/commands/timeline.js +74 -81
  85. package/dist/commands/timeline.js.map +1 -1
  86. package/dist/commands/watch.js +54 -60
  87. package/dist/commands/watch.js.map +1 -1
  88. package/dist/gamification/achievements.d.ts +1 -1
  89. package/dist/gamification/achievements.d.ts.map +1 -1
  90. package/dist/gamification/achievements.js +7 -13
  91. package/dist/gamification/achievements.js.map +1 -1
  92. package/dist/gamification/index.d.ts +8 -8
  93. package/dist/gamification/index.d.ts.map +1 -1
  94. package/dist/gamification/index.js +8 -28
  95. package/dist/gamification/index.js.map +1 -1
  96. package/dist/gamification/profile.d.ts +2 -2
  97. package/dist/gamification/profile.d.ts.map +1 -1
  98. package/dist/gamification/profile.js +21 -64
  99. package/dist/gamification/profile.js.map +1 -1
  100. package/dist/gamification/stats.d.ts +1 -1
  101. package/dist/gamification/stats.d.ts.map +1 -1
  102. package/dist/gamification/stats.js +4 -10
  103. package/dist/gamification/stats.js.map +1 -1
  104. package/dist/gamification/streaks.d.ts +1 -1
  105. package/dist/gamification/streaks.d.ts.map +1 -1
  106. package/dist/gamification/streaks.js +8 -18
  107. package/dist/gamification/streaks.js.map +1 -1
  108. package/dist/gamification/types.js +3 -6
  109. package/dist/gamification/types.js.map +1 -1
  110. package/dist/gamification/xp.d.ts +1 -1
  111. package/dist/gamification/xp.d.ts.map +1 -1
  112. package/dist/gamification/xp.js +29 -38
  113. package/dist/gamification/xp.js.map +1 -1
  114. package/dist/git.d.ts +1 -1
  115. package/dist/git.d.ts.map +1 -1
  116. package/dist/git.js +23 -29
  117. package/dist/git.js.map +1 -1
  118. package/dist/inner-loop/context-amnesia.d.ts +2 -2
  119. package/dist/inner-loop/context-amnesia.d.ts.map +1 -1
  120. package/dist/inner-loop/context-amnesia.js +7 -10
  121. package/dist/inner-loop/context-amnesia.js.map +1 -1
  122. package/dist/inner-loop/index.d.ts +7 -7
  123. package/dist/inner-loop/index.d.ts.map +1 -1
  124. package/dist/inner-loop/index.js +18 -45
  125. package/dist/inner-loop/index.js.map +1 -1
  126. package/dist/inner-loop/instruction-drift.d.ts +2 -2
  127. package/dist/inner-loop/instruction-drift.d.ts.map +1 -1
  128. package/dist/inner-loop/instruction-drift.js +5 -10
  129. package/dist/inner-loop/instruction-drift.js.map +1 -1
  130. package/dist/inner-loop/logging-only.d.ts +2 -2
  131. package/dist/inner-loop/logging-only.d.ts.map +1 -1
  132. package/dist/inner-loop/logging-only.js +9 -17
  133. package/dist/inner-loop/logging-only.js.map +1 -1
  134. package/dist/inner-loop/tests-passing-lie.d.ts +2 -2
  135. package/dist/inner-loop/tests-passing-lie.d.ts.map +1 -1
  136. package/dist/inner-loop/tests-passing-lie.js +12 -17
  137. package/dist/inner-loop/tests-passing-lie.js.map +1 -1
  138. package/dist/inner-loop/types.js +1 -4
  139. package/dist/inner-loop/types.js.map +1 -1
  140. package/dist/insights/generators.d.ts +4 -4
  141. package/dist/insights/generators.d.ts.map +1 -1
  142. package/dist/insights/generators.js +9 -20
  143. package/dist/insights/generators.js.map +1 -1
  144. package/dist/insights/index.d.ts +4 -4
  145. package/dist/insights/index.d.ts.map +1 -1
  146. package/dist/insights/index.js +23 -27
  147. package/dist/insights/index.js.map +1 -1
  148. package/dist/insights/types.js +1 -2
  149. package/dist/insights/types.js.map +1 -1
  150. package/dist/metrics/code-stability.d.ts +1 -1
  151. package/dist/metrics/code-stability.d.ts.map +1 -1
  152. package/dist/metrics/code-stability.js +1 -4
  153. package/dist/metrics/code-stability.js.map +1 -1
  154. package/dist/metrics/cohesion.d.ts +27 -0
  155. package/dist/metrics/cohesion.d.ts.map +1 -0
  156. package/dist/metrics/cohesion.js +134 -0
  157. package/dist/metrics/cohesion.js.map +1 -0
  158. package/dist/metrics/file-churn.d.ts +1 -1
  159. package/dist/metrics/file-churn.d.ts.map +1 -1
  160. package/dist/metrics/file-churn.js +1 -4
  161. package/dist/metrics/file-churn.js.map +1 -1
  162. package/dist/metrics/flow.d.ts +1 -1
  163. package/dist/metrics/flow.d.ts.map +1 -1
  164. package/dist/metrics/flow.js +1 -4
  165. package/dist/metrics/flow.js.map +1 -1
  166. package/dist/metrics/index.d.ts +10 -2
  167. package/dist/metrics/index.d.ts.map +1 -1
  168. package/dist/metrics/index.js +51 -20
  169. package/dist/metrics/index.js.map +1 -1
  170. package/dist/metrics/investigation.d.ts +25 -0
  171. package/dist/metrics/investigation.d.ts.map +1 -0
  172. package/dist/metrics/investigation.js +115 -0
  173. package/dist/metrics/investigation.js.map +1 -0
  174. package/dist/metrics/rework.d.ts +1 -1
  175. package/dist/metrics/rework.d.ts.map +1 -1
  176. package/dist/metrics/rework.js +1 -4
  177. package/dist/metrics/rework.js.map +1 -1
  178. package/dist/metrics/spirals.d.ts +1 -1
  179. package/dist/metrics/spirals.d.ts.map +1 -1
  180. package/dist/metrics/spirals.js +5 -10
  181. package/dist/metrics/spirals.js.map +1 -1
  182. package/dist/metrics/time-spiral.d.ts +1 -1
  183. package/dist/metrics/time-spiral.d.ts.map +1 -1
  184. package/dist/metrics/time-spiral.js +1 -4
  185. package/dist/metrics/time-spiral.js.map +1 -1
  186. package/dist/metrics/tracers.d.ts +28 -0
  187. package/dist/metrics/tracers.d.ts.map +1 -0
  188. package/dist/metrics/tracers.js +117 -0
  189. package/dist/metrics/tracers.js.map +1 -0
  190. package/dist/metrics/trust.d.ts +1 -1
  191. package/dist/metrics/trust.d.ts.map +1 -1
  192. package/dist/metrics/trust.js +3 -6
  193. package/dist/metrics/trust.js.map +1 -1
  194. package/dist/metrics/velocity-anomaly.d.ts +1 -1
  195. package/dist/metrics/velocity-anomaly.d.ts.map +1 -1
  196. package/dist/metrics/velocity-anomaly.js +3 -6
  197. package/dist/metrics/velocity-anomaly.js.map +1 -1
  198. package/dist/metrics/velocity.d.ts +1 -1
  199. package/dist/metrics/velocity.d.ts.map +1 -1
  200. package/dist/metrics/velocity.js +6 -10
  201. package/dist/metrics/velocity.js.map +1 -1
  202. package/dist/output/index.d.ts +4 -4
  203. package/dist/output/index.d.ts.map +1 -1
  204. package/dist/output/index.js +10 -18
  205. package/dist/output/index.js.map +1 -1
  206. package/dist/output/json.d.ts +1 -1
  207. package/dist/output/json.d.ts.map +1 -1
  208. package/dist/output/json.js +1 -4
  209. package/dist/output/json.js.map +1 -1
  210. package/dist/output/markdown.d.ts +1 -1
  211. package/dist/output/markdown.d.ts.map +1 -1
  212. package/dist/output/markdown.js +5 -8
  213. package/dist/output/markdown.js.map +1 -1
  214. package/dist/output/terminal.d.ts +1 -1
  215. package/dist/output/terminal.d.ts.map +1 -1
  216. package/dist/output/terminal.js +88 -62
  217. package/dist/output/terminal.js.map +1 -1
  218. package/dist/output/timeline-html.d.ts +1 -1
  219. package/dist/output/timeline-html.d.ts.map +1 -1
  220. package/dist/output/timeline-html.js +5 -8
  221. package/dist/output/timeline-html.js.map +1 -1
  222. package/dist/output/timeline-markdown.d.ts +1 -1
  223. package/dist/output/timeline-markdown.d.ts.map +1 -1
  224. package/dist/output/timeline-markdown.js +5 -8
  225. package/dist/output/timeline-markdown.js.map +1 -1
  226. package/dist/output/timeline.d.ts +1 -1
  227. package/dist/output/timeline.d.ts.map +1 -1
  228. package/dist/output/timeline.js +46 -52
  229. package/dist/output/timeline.js.map +1 -1
  230. package/dist/patterns/detour.d.ts +1 -1
  231. package/dist/patterns/detour.d.ts.map +1 -1
  232. package/dist/patterns/detour.js +1 -4
  233. package/dist/patterns/detour.js.map +1 -1
  234. package/dist/patterns/flow-state.d.ts +1 -1
  235. package/dist/patterns/flow-state.d.ts.map +1 -1
  236. package/dist/patterns/flow-state.js +1 -4
  237. package/dist/patterns/flow-state.js.map +1 -1
  238. package/dist/patterns/index.d.ts +7 -7
  239. package/dist/patterns/index.d.ts.map +1 -1
  240. package/dist/patterns/index.js +7 -21
  241. package/dist/patterns/index.js.map +1 -1
  242. package/dist/patterns/intervention-effectiveness.d.ts +1 -1
  243. package/dist/patterns/intervention-effectiveness.d.ts.map +1 -1
  244. package/dist/patterns/intervention-effectiveness.js +3 -8
  245. package/dist/patterns/intervention-effectiveness.js.map +1 -1
  246. package/dist/patterns/late-night.d.ts +1 -1
  247. package/dist/patterns/late-night.d.ts.map +1 -1
  248. package/dist/patterns/late-night.js +1 -4
  249. package/dist/patterns/late-night.js.map +1 -1
  250. package/dist/patterns/post-delete-sprint.d.ts +1 -1
  251. package/dist/patterns/post-delete-sprint.d.ts.map +1 -1
  252. package/dist/patterns/post-delete-sprint.js +1 -4
  253. package/dist/patterns/post-delete-sprint.js.map +1 -1
  254. package/dist/patterns/spiral-regression.d.ts +1 -1
  255. package/dist/patterns/spiral-regression.d.ts.map +1 -1
  256. package/dist/patterns/spiral-regression.js +3 -8
  257. package/dist/patterns/spiral-regression.js.map +1 -1
  258. package/dist/patterns/thrashing.d.ts +1 -1
  259. package/dist/patterns/thrashing.d.ts.map +1 -1
  260. package/dist/patterns/thrashing.js +3 -6
  261. package/dist/patterns/thrashing.js.map +1 -1
  262. package/dist/score/index.d.ts +3 -3
  263. package/dist/score/index.d.ts.map +1 -1
  264. package/dist/score/index.js +4 -10
  265. package/dist/score/index.js.map +1 -1
  266. package/dist/score/weights.js +2 -6
  267. package/dist/score/weights.js.map +1 -1
  268. package/dist/sessions/index.js +9 -51
  269. package/dist/sessions/index.js.map +1 -1
  270. package/dist/storage/atomic.js +10 -51
  271. package/dist/storage/atomic.js.map +1 -1
  272. package/dist/storage/commit-log.d.ts +1 -1
  273. package/dist/storage/commit-log.d.ts.map +1 -1
  274. package/dist/storage/commit-log.js +11 -51
  275. package/dist/storage/commit-log.js.map +1 -1
  276. package/dist/storage/index.d.ts +5 -5
  277. package/dist/storage/index.d.ts.map +1 -1
  278. package/dist/storage/index.js +5 -37
  279. package/dist/storage/index.js.map +1 -1
  280. package/dist/storage/schema.js +4 -9
  281. package/dist/storage/schema.js.map +1 -1
  282. package/dist/storage/spiral-history.js +14 -57
  283. package/dist/storage/spiral-history.js.map +1 -1
  284. package/dist/storage/timeline-store.d.ts +2 -2
  285. package/dist/storage/timeline-store.d.ts.map +1 -1
  286. package/dist/storage/timeline-store.js +17 -61
  287. package/dist/storage/timeline-store.js.map +1 -1
  288. package/dist/types.d.ts +36 -1
  289. package/dist/types.d.ts.map +1 -1
  290. package/dist/types.js +1 -2
  291. package/docs/ENHANCEMENT-PLAN.md +379 -0
  292. package/feature-list.json +6 -0
  293. package/package.json +8 -7
  294. package/.claude/skills/typescript-review.md +0 -152
  295. package/dist/calibration/ece.d.ts +0 -26
  296. package/dist/calibration/ece.d.ts.map +0 -1
  297. package/dist/calibration/ece.js +0 -93
  298. package/dist/calibration/ece.js.map +0 -1
  299. package/dist/calibration/index.d.ts +0 -3
  300. package/dist/calibration/index.d.ts.map +0 -1
  301. package/dist/calibration/index.js +0 -15
  302. package/dist/calibration/index.js.map +0 -1
  303. package/dist/calibration/storage.d.ts +0 -34
  304. package/dist/calibration/storage.d.ts.map +0 -1
  305. package/dist/calibration/storage.js +0 -188
  306. package/dist/calibration/storage.js.map +0 -1
  307. package/dist/commands/intervene.d.ts +0 -15
  308. package/dist/commands/intervene.d.ts.map +0 -1
  309. package/dist/commands/intervene.js +0 -183
  310. package/dist/commands/intervene.js.map +0 -1
  311. package/dist/commands/learn.d.ts +0 -3
  312. package/dist/commands/learn.d.ts.map +0 -1
  313. package/dist/commands/learn.js +0 -161
  314. package/dist/commands/learn.js.map +0 -1
  315. package/dist/commands/lesson.d.ts +0 -8
  316. package/dist/commands/lesson.d.ts.map +0 -1
  317. package/dist/commands/lesson.js +0 -206
  318. package/dist/commands/lesson.js.map +0 -1
  319. package/dist/commands/level.d.ts +0 -3
  320. package/dist/commands/level.d.ts.map +0 -1
  321. package/dist/commands/level.js +0 -277
  322. package/dist/commands/level.js.map +0 -1
  323. package/dist/gamification/badges.d.ts +0 -29
  324. package/dist/gamification/badges.d.ts.map +0 -1
  325. package/dist/gamification/badges.js +0 -114
  326. package/dist/gamification/badges.js.map +0 -1
  327. package/dist/gamification/challenges.d.ts +0 -42
  328. package/dist/gamification/challenges.d.ts.map +0 -1
  329. package/dist/gamification/challenges.js +0 -184
  330. package/dist/gamification/challenges.js.map +0 -1
  331. package/dist/gamification/hall-of-fame.d.ts +0 -17
  332. package/dist/gamification/hall-of-fame.d.ts.map +0 -1
  333. package/dist/gamification/hall-of-fame.js +0 -64
  334. package/dist/gamification/hall-of-fame.js.map +0 -1
  335. package/dist/gamification/intervention-memory.d.ts +0 -61
  336. package/dist/gamification/intervention-memory.d.ts.map +0 -1
  337. package/dist/gamification/intervention-memory.js +0 -229
  338. package/dist/gamification/intervention-memory.js.map +0 -1
  339. package/dist/gamification/leaderboards.d.ts +0 -49
  340. package/dist/gamification/leaderboards.d.ts.map +0 -1
  341. package/dist/gamification/leaderboards.js +0 -179
  342. package/dist/gamification/leaderboards.js.map +0 -1
  343. package/dist/gamification/pattern-memory.d.ts +0 -45
  344. package/dist/gamification/pattern-memory.d.ts.map +0 -1
  345. package/dist/gamification/pattern-memory.js +0 -188
  346. package/dist/gamification/pattern-memory.js.map +0 -1
  347. package/dist/gamification/share.d.ts +0 -29
  348. package/dist/gamification/share.d.ts.map +0 -1
  349. package/dist/gamification/share.js +0 -57
  350. package/dist/gamification/share.js.map +0 -1
  351. package/dist/learning/cadence.d.ts +0 -15
  352. package/dist/learning/cadence.d.ts.map +0 -1
  353. package/dist/learning/cadence.js +0 -130
  354. package/dist/learning/cadence.js.map +0 -1
  355. package/dist/learning/index.d.ts +0 -19
  356. package/dist/learning/index.d.ts.map +0 -1
  357. package/dist/learning/index.js +0 -35
  358. package/dist/learning/index.js.map +0 -1
  359. package/dist/learning/lessons-storage.d.ts +0 -48
  360. package/dist/learning/lessons-storage.d.ts.map +0 -1
  361. package/dist/learning/lessons-storage.js +0 -266
  362. package/dist/learning/lessons-storage.js.map +0 -1
  363. package/dist/learning/lessons-types.d.ts +0 -83
  364. package/dist/learning/lessons-types.d.ts.map +0 -1
  365. package/dist/learning/lessons-types.js +0 -15
  366. package/dist/learning/lessons-types.js.map +0 -1
  367. package/dist/learning/nudges.d.ts +0 -20
  368. package/dist/learning/nudges.d.ts.map +0 -1
  369. package/dist/learning/nudges.js +0 -68
  370. package/dist/learning/nudges.js.map +0 -1
  371. package/dist/learning/retrospective.d.ts +0 -27
  372. package/dist/learning/retrospective.d.ts.map +0 -1
  373. package/dist/learning/retrospective.js +0 -184
  374. package/dist/learning/retrospective.js.map +0 -1
  375. package/dist/learning/storage.d.ts +0 -44
  376. package/dist/learning/storage.d.ts.map +0 -1
  377. package/dist/learning/storage.js +0 -194
  378. package/dist/learning/storage.js.map +0 -1
  379. package/dist/learning/surfacing.d.ts +0 -36
  380. package/dist/learning/surfacing.d.ts.map +0 -1
  381. package/dist/learning/surfacing.js +0 -255
  382. package/dist/learning/surfacing.js.map +0 -1
  383. package/dist/learning/synthesis.d.ts +0 -17
  384. package/dist/learning/synthesis.d.ts.map +0 -1
  385. package/dist/learning/synthesis.js +0 -293
  386. package/dist/learning/synthesis.js.map +0 -1
  387. package/dist/learning/types.d.ts +0 -60
  388. package/dist/learning/types.d.ts.map +0 -1
  389. package/dist/learning/types.js +0 -17
  390. package/dist/learning/types.js.map +0 -1
  391. package/dist/recommend/index.d.ts +0 -3
  392. package/dist/recommend/index.d.ts.map +0 -1
  393. package/dist/recommend/index.js +0 -14
  394. package/dist/recommend/index.js.map +0 -1
  395. package/dist/recommend/ordered-logistic.d.ts +0 -49
  396. package/dist/recommend/ordered-logistic.d.ts.map +0 -1
  397. package/dist/recommend/ordered-logistic.js +0 -153
  398. package/dist/recommend/ordered-logistic.js.map +0 -1
  399. package/dist/recommend/questions.d.ts +0 -19
  400. package/dist/recommend/questions.d.ts.map +0 -1
  401. package/dist/recommend/questions.js +0 -73
  402. package/dist/recommend/questions.js.map +0 -1
@@ -0,0 +1,383 @@
1
+ ---
2
+ date: 2025-12-27
3
+ type: Plan
4
+ topic: "Vibe-Check Evolution: Tracer Bullets, Investigation Gaps, and Middle Loop Detection"
5
+ research: ".agents/research/2025-12-27-vibe-check-evolution.md"
6
+ tags: [plan, vibe-check, metrics, tracers, investigation, middle-loop]
7
+ status: READY_FOR_APPROVAL
8
+ ---
9
+
10
+ # Plan: Vibe-Check Evolution
11
+
12
+ **Created:** 2025-12-27
13
+ **Research:** [.agents/research/2025-12-27-vibe-check-evolution.md](.agents/research/2025-12-27-vibe-check-evolution.md)
14
+ **Vibe Level:** L3 (New features with clear patterns to follow)
15
+
16
+ ---
17
+
18
+ ## Overview
19
+
20
+ Implement the documented Enhancement Plan (P1-P2) plus two middle loop detectors to evolve vibe-check from an inner-loop-only tool to one that provides visibility into investigation time, proactive validation practices, and architectural health.
21
+
22
+ **What we're building:**
23
+ 1. **Tracer Bullet Tracking** - Recognize `tracer:`/`tb:` commits and measure proactive validation ratio
24
+ 2. **Investigation Gap Detection** - Surface hidden debugging time from commit timestamp gaps
25
+ 3. **Eldritch Horror Detector** - Flag functions exceeding 200 lines (middle loop pattern)
26
+ 4. **Domain Cohesion Score** - Measure how scattered changes are across domains
27
+
28
+ ---
29
+
30
+ ## Approach
31
+
32
+ Follow the existing metrics pattern in `src/metrics/`:
33
+ - Each metric is a separate file returning `MetricResult`
34
+ - Metrics are orchestrated in `src/metrics/index.ts`
35
+ - Types are defined in `src/types.ts`
36
+ - Tests follow the pattern in `tests/`
37
+
38
+ **Why this approach:**
39
+ - Consistent with existing architecture (100% TypeScript, clean separation)
40
+ - Each feature can be implemented and tested independently
41
+ - Minimal changes to existing code (additive, not destructive)
42
+ - Follows documented Enhancement Plan specifications
43
+
44
+ ---
45
+
46
+ ## Features
47
+
48
+ ### Feature 1: Tracer Bullet Tracking
49
+
50
+ **Priority:** P1
51
+ **Type:** feature
52
+ **Depends On:** None
53
+
54
+ **Acceptance Criteria:**
55
+ - [ ] New commit type `tracer` recognized in git parser
56
+ - [ ] `src/metrics/tracers.ts` calculates tracer metrics
57
+ - [ ] Output shows tracer count, before-feature ratio, before-fix count
58
+ - [ ] Rating: ELITE >20% | HIGH >10% | MEDIUM >5% | LOW <5%
59
+ - [ ] Tests cover edge cases (no tracers, all tracers, mixed)
60
+
61
+ **Files Affected:**
62
+ - `src/git.ts` - Add `tracer` to commit type detection (line ~45)
63
+ - `src/types.ts` - Add `TracerMetrics` interface
64
+ - `src/metrics/tracers.ts` - NEW: Tracer calculation
65
+ - `src/metrics/index.ts` - Include tracer metrics in result
66
+ - `src/output/terminal.ts` - Display tracer section
67
+ - `tests/tracers.test.ts` - NEW: Unit tests
68
+
69
+ **Implementation Notes:**
70
+ ```typescript
71
+ // Commit message patterns to match:
72
+ // "tracer: validate Redis connection"
73
+ // "tb: test SSE streaming"
74
+ // "tracer(fleet): mission directory flow"
75
+ const TRACER_PATTERNS = [/^tracer(?:\([^)]+\))?:/i, /^tb(?:\([^)]+\))?:/i];
76
+
77
+ interface TracerMetrics extends MetricResult {
78
+ tracerCount: number;
79
+ tracerBeforeFeature: number; // Tracers followed by feat: (good!)
80
+ tracerBeforeFix: number; // Tracers followed by fix: (too late!)
81
+ tracerRatio: number; // tracers / (feat + fix)
82
+ }
83
+ ```
84
+
85
+ **Test Strategy:**
86
+ - Unit tests with mock commit lists
87
+ - Integration test with analyze command
88
+
89
+ ---
90
+
91
+ ### Feature 2: Investigation Gap Detection
92
+
93
+ **Priority:** P1
94
+ **Type:** feature
95
+ **Depends On:** None
96
+
97
+ **Acceptance Criteria:**
98
+ - [ ] `src/metrics/investigation.ts` analyzes commit timestamp gaps
99
+ - [ ] Gaps >15 min and <2 hours followed by `fix:` = investigation
100
+ - [ ] Output shows total investigation time estimate and longest gap
101
+ - [ ] Same-component detection uses existing logic from `spirals.ts`
102
+ - [ ] Tests cover various gap scenarios
103
+
104
+ **Files Affected:**
105
+ - `src/types.ts` - Add `InvestigationMetrics` interface
106
+ - `src/metrics/investigation.ts` - NEW: Gap analysis
107
+ - `src/metrics/index.ts` - Include investigation metrics in result
108
+ - `src/output/terminal.ts` - Display investigation section
109
+ - `tests/investigation.test.ts` - NEW: Unit tests
110
+
111
+ **Implementation Notes:**
112
+ ```typescript
113
+ interface InvestigationGap {
114
+ startCommit: string; // Hash of commit before gap
115
+ endCommit: string; // Hash of commit after gap (the fix)
116
+ gapMinutes: number;
117
+ followedByFix: boolean;
118
+ component: string;
119
+ }
120
+
121
+ interface InvestigationMetrics extends MetricResult {
122
+ gaps: InvestigationGap[];
123
+ totalMinutes: number;
124
+ longestGap: number;
125
+ gapCount: number;
126
+ }
127
+
128
+ // Detection logic:
129
+ // - Gap > 15 min AND < 120 min (SESSION_GAP)
130
+ // - Next commit is type === 'fix'
131
+ // - Same component as previous commit
132
+ ```
133
+
134
+ **Test Strategy:**
135
+ - Unit tests with mock commit lists at various time intervals
136
+ - Edge cases: no gaps, all gaps, gaps at session boundaries
137
+
138
+ ---
139
+
140
+ ### Feature 3: Domain Cohesion Score
141
+
142
+ **Priority:** P2
143
+ **Type:** feature
144
+ **Depends On:** None
145
+
146
+ **Acceptance Criteria:**
147
+ - [ ] `src/metrics/cohesion.ts` analyzes files changed per commit
148
+ - [ ] Domains extracted from top-level directories under `src/`
149
+ - [ ] Commits touching 3+ domains flagged as "scattered"
150
+ - [ ] Cohesion score = (cohesive commits / total) × 100
151
+ - [ ] Rating: ELITE >80% | HIGH >60% | MEDIUM >40% | LOW <40%
152
+
153
+ **Files Affected:**
154
+ - `src/types.ts` - Add `CohesionMetrics` interface
155
+ - `src/git.ts` - Add `getCommitFiles()` function (uses `git diff-tree`)
156
+ - `src/metrics/cohesion.ts` - NEW: Cohesion calculation
157
+ - `src/output/terminal.ts` - Display cohesion section
158
+ - `tests/cohesion.test.ts` - NEW: Unit tests
159
+
160
+ **Implementation Notes:**
161
+ ```typescript
162
+ interface CohesionMetrics extends MetricResult {
163
+ avgDomainsPerCommit: number;
164
+ cohesiveCommits: number; // 1 domain
165
+ scatteredCommits: number; // 3+ domains
166
+ cohesionScore: number; // 0-100%
167
+ scatteredList: Array<{ // For verbose output
168
+ hash: string;
169
+ domains: string[];
170
+ }>;
171
+ }
172
+
173
+ // Domain extraction:
174
+ // src/fleet/... → "fleet"
175
+ // src/missions/... → "missions"
176
+ // server/... → "server" (top-level = domain)
177
+ ```
178
+
179
+ **Test Strategy:**
180
+ - Mock file lists with various domain distributions
181
+ - Edge cases: single file, all same domain, all different
182
+
183
+ ---
184
+
185
+ ### Feature 4: Eldritch Horror Detector
186
+
187
+ **Priority:** P2
188
+ **Type:** feature
189
+ **Depends On:** None
190
+
191
+ **Acceptance Criteria:**
192
+ - [ ] `src/analyzers/eldritch.ts` scans for oversized functions
193
+ - [ ] Functions >200 lines flagged as warning, >500 as critical
194
+ - [ ] Integrates with `audit` command output
195
+ - [ ] Provides file:line references for each horror
196
+ - [ ] Tests with sample files
197
+
198
+ **Files Affected:**
199
+ - `src/types.ts` - Add `EldritchHorrorResult` interface
200
+ - `src/analyzers/eldritch.ts` - NEW: Function length analysis
201
+ - `src/commands/audit.ts` - Include eldritch detection
202
+ - `src/output/terminal.ts` - Display eldritch section in audit
203
+ - `tests/eldritch.test.ts` - NEW: Unit tests
204
+
205
+ **Implementation Notes:**
206
+ ```typescript
207
+ interface EldritchHorror {
208
+ file: string;
209
+ functionName: string;
210
+ lineStart: number;
211
+ lineCount: number;
212
+ severity: 'warning' | 'critical';
213
+ }
214
+
215
+ interface EldritchHorrorResult {
216
+ detected: boolean;
217
+ horrors: EldritchHorror[];
218
+ totalCount: number;
219
+ criticalCount: number;
220
+ warningCount: number;
221
+ }
222
+
223
+ // Detection approach (simple regex, not full AST):
224
+ // Look for function/method declarations and count lines until closing brace
225
+ // Languages: .ts, .js, .py, .go
226
+ ```
227
+
228
+ **Test Strategy:**
229
+ - Sample files with various function lengths
230
+ - Edge cases: nested functions, arrow functions, class methods
231
+
232
+ ---
233
+
234
+ ### Feature 5: Extend Commit Types
235
+
236
+ **Priority:** P1
237
+ **Type:** refactor
238
+ **Depends On:** None (prerequisite for Feature 1)
239
+
240
+ **Acceptance Criteria:**
241
+ - [ ] `tracer` type added to Commit type union
242
+ - [ ] Git parser recognizes `tracer:` and `tb:` prefixes
243
+ - [ ] Commit counts include tracer count
244
+ - [ ] Backwards compatible (existing analysis unchanged)
245
+
246
+ **Files Affected:**
247
+ - `src/types.ts` - Add `tracer` to Commit type
248
+ - `src/git.ts` - Update parser regex
249
+ - `src/metrics/index.ts` - Add tracer to countCommitTypes
250
+
251
+ **Test Strategy:**
252
+ - Existing tests still pass
253
+ - New commits with `tracer:` prefix correctly typed
254
+
255
+ ---
256
+
257
+ ### Feature 6: Update Documentation
258
+
259
+ **Priority:** P3
260
+ **Type:** docs
261
+ **Depends On:** Features 1-4
262
+
263
+ **Acceptance Criteria:**
264
+ - [ ] README updated with new metrics descriptions
265
+ - [ ] CHANGELOG updated with version entry
266
+ - [ ] CLAUDE.md updated with new metric thresholds
267
+ - [ ] docs/METRICS.md updated (if exists)
268
+
269
+ **Files Affected:**
270
+ - `README.md`
271
+ - `CHANGELOG.md`
272
+ - `CLAUDE.md`
273
+ - `docs/ENHANCEMENT-PLAN.md` - Mark as IMPLEMENTED
274
+
275
+ ---
276
+
277
+ ## Implementation Order
278
+
279
+ | Step | Feature | Depends On | Validation |
280
+ |------|---------|------------|------------|
281
+ | 1 | Feature 5: Extend Commit Types | - | `npm test` passes |
282
+ | 2 | Feature 1: Tracer Bullet Tracking | Feature 5 | New tests pass, analyze shows tracers |
283
+ | 3 | Feature 2: Investigation Gap Detection | - | New tests pass, analyze shows gaps |
284
+ | 4 | Feature 3: Domain Cohesion Score | - | New tests pass, analyze shows cohesion |
285
+ | 5 | Feature 4: Eldritch Horror Detector | - | New tests pass, audit shows horrors |
286
+ | 6 | Feature 6: Update Documentation | 1-5 | README accurate |
287
+
288
+ ---
289
+
290
+ ## Beads Issues to Create
291
+
292
+ After approval, these issues will be created:
293
+
294
+ | ID | Title | Type | Priority | Depends On |
295
+ |----|-------|------|----------|------------|
296
+ | TBD | Epic: Vibe-Check Evolution v2.2 | epic | P1 | - |
297
+ | TBD | Extend commit types to include tracer | task | P1 | Epic |
298
+ | TBD | Implement tracer bullet tracking metric | feature | P1 | Commit types |
299
+ | TBD | Implement investigation gap detection | feature | P1 | Epic |
300
+ | TBD | Implement domain cohesion score | feature | P2 | Epic |
301
+ | TBD | Implement eldritch horror detector | feature | P2 | Epic |
302
+ | TBD | Update documentation for new metrics | task | P3 | All features |
303
+
304
+ ---
305
+
306
+ ## Version Bump
307
+
308
+ This is a **MINOR** version bump (v2.1.0 → v2.2.0):
309
+ - Adds new features (tracer tracking, investigation gaps, cohesion, eldritch)
310
+ - Backward compatible (existing CLI and output unchanged)
311
+ - No breaking changes
312
+
313
+ ---
314
+
315
+ ## Rollback Procedure
316
+
317
+ If something goes wrong:
318
+ 1. `git revert` the feature commits
319
+ 2. Existing metrics continue to work (additive changes)
320
+ 3. No data migration needed (new fields are optional)
321
+
322
+ ---
323
+
324
+ ## Testing Strategy
325
+
326
+ 1. **Unit Tests** - Each new metric file has corresponding test file
327
+ 2. **Integration Tests** - Extend `cli.integration.test.ts` with new output validation
328
+ 3. **Manual Testing** - Run against Houston repo (50k+ lines, real data)
329
+
330
+ ```bash
331
+ # Run all tests
332
+ npm test
333
+
334
+ # Run specific test file
335
+ npm test -- tests/tracers.test.ts
336
+
337
+ # Manual validation
338
+ node dist/cli.js --since "1 week ago" --repo /path/to/houston
339
+ ```
340
+
341
+ ---
342
+
343
+ ## Time Estimates
344
+
345
+ | Feature | Effort |
346
+ |---------|--------|
347
+ | Feature 5: Extend Commit Types | 30 min |
348
+ | Feature 1: Tracer Bullet Tracking | 1.5h |
349
+ | Feature 2: Investigation Gap Detection | 2h |
350
+ | Feature 3: Domain Cohesion Score | 2h |
351
+ | Feature 4: Eldritch Horror Detector | 2h |
352
+ | Feature 6: Documentation | 1h |
353
+ | **Total** | **~9 hours** |
354
+
355
+ ---
356
+
357
+ ## Next Steps
358
+
359
+ 1. Review and approve this plan
360
+ 2. Run beads issue creation (after approval)
361
+ 3. `bd ready` to see unblocked issues
362
+ 4. `/implement` to execute
363
+
364
+ ---
365
+
366
+ ## Open Questions
367
+
368
+ 1. **Should tracer metrics affect overall rating?**
369
+ - Recommendation: Yes, but with lower weight initially
370
+ - Can calibrate based on user feedback
371
+
372
+ 2. **Should investigation gaps be surfaced in watch mode?**
373
+ - Recommendation: No, watch mode is real-time; gaps are retrospective
374
+
375
+ 3. **What file extensions should eldritch detector support?**
376
+ - Start with: `.ts`, `.js`, `.tsx`, `.jsx`, `.py`, `.go`
377
+ - Can extend later based on usage
378
+
379
+ ---
380
+
381
+ **Output:** .agents/plans/2025-12-27-vibe-check-evolution-plan.md
382
+
383
+ **Next:** Approve plan → Create beads issues → `/implement`