@boshu2/vibe-check 1.5.0 → 1.6.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 (147) hide show
  1. package/.agents/bundles/insight-mining-dashboard-research-2025-11-30.md +400 -0
  2. package/.agents/bundles/storage-enhancement-research-2025-11-30.md +292 -0
  3. package/.agents/bundles/timeline-feature-research-complete-2025-11-30.md +301 -0
  4. package/.agents/plans/insight-dashboard-plan-2025-11-30.md +1130 -0
  5. package/.agents/plans/json-storage-enhancement-plan.md +717 -0
  6. package/.agents/plans/storage-hardening-and-cache-plan.md +592 -0
  7. package/.agents/plans/test-coverage-gaps-plan.md +1117 -0
  8. package/.agents/plans/timeline-feature-plan.md +193 -0
  9. package/.agents/plans/vibe_timeline_research_findings.md +553 -0
  10. package/.claude/settings.local.json +1 -0
  11. package/.vibe-check/.gitignore +6 -0
  12. package/CHANGELOG.md +46 -0
  13. package/CLAUDE.md +24 -0
  14. package/CONTRIBUTING.md +227 -0
  15. package/README.md +200 -143
  16. package/claude-progress.json +191 -9
  17. package/claude-progress.txt +257 -0
  18. package/dashboard/app.js +75 -2
  19. package/dashboard/dashboard-data.json +653 -0
  20. package/dashboard/index.html +13 -0
  21. package/dashboard/styles.css +61 -0
  22. package/dist/analysis/cross-session-analysis.d.ts +68 -0
  23. package/dist/analysis/cross-session-analysis.d.ts.map +1 -0
  24. package/dist/analysis/cross-session-analysis.js +174 -0
  25. package/dist/analysis/cross-session-analysis.js.map +1 -0
  26. package/dist/analysis/index.d.ts +2 -0
  27. package/dist/analysis/index.d.ts.map +1 -0
  28. package/dist/analysis/index.js +12 -0
  29. package/dist/analysis/index.js.map +1 -0
  30. package/dist/cli.js +10 -1
  31. package/dist/cli.js.map +1 -1
  32. package/dist/commands/analyze.d.ts +2 -0
  33. package/dist/commands/analyze.d.ts.map +1 -1
  34. package/dist/commands/analyze.js +105 -2
  35. package/dist/commands/analyze.js.map +1 -1
  36. package/dist/commands/cache.d.ts +6 -0
  37. package/dist/commands/cache.d.ts.map +1 -0
  38. package/dist/commands/cache.js +168 -0
  39. package/dist/commands/cache.js.map +1 -0
  40. package/dist/commands/dashboard.d.ts +8 -0
  41. package/dist/commands/dashboard.d.ts.map +1 -0
  42. package/dist/commands/dashboard.js +109 -0
  43. package/dist/commands/dashboard.js.map +1 -0
  44. package/dist/commands/index.d.ts +3 -0
  45. package/dist/commands/index.d.ts.map +1 -1
  46. package/dist/commands/index.js +8 -1
  47. package/dist/commands/index.js.map +1 -1
  48. package/dist/commands/timeline.d.ts +14 -0
  49. package/dist/commands/timeline.d.ts.map +1 -0
  50. package/dist/commands/timeline.js +462 -0
  51. package/dist/commands/timeline.js.map +1 -0
  52. package/dist/git.d.ts +24 -0
  53. package/dist/git.d.ts.map +1 -1
  54. package/dist/git.js +94 -0
  55. package/dist/git.js.map +1 -1
  56. package/dist/insights/generators.d.ts +44 -0
  57. package/dist/insights/generators.d.ts.map +1 -0
  58. package/dist/insights/generators.js +289 -0
  59. package/dist/insights/generators.js.map +1 -0
  60. package/dist/insights/index.d.ts +16 -0
  61. package/dist/insights/index.d.ts.map +1 -0
  62. package/dist/insights/index.js +171 -0
  63. package/dist/insights/index.js.map +1 -0
  64. package/dist/insights/types.d.ts +93 -0
  65. package/dist/insights/types.d.ts.map +1 -0
  66. package/dist/insights/types.js +6 -0
  67. package/dist/insights/types.js.map +1 -0
  68. package/dist/output/timeline-html.d.ts +6 -0
  69. package/dist/output/timeline-html.d.ts.map +1 -0
  70. package/dist/output/timeline-html.js +389 -0
  71. package/dist/output/timeline-html.js.map +1 -0
  72. package/dist/output/timeline-markdown.d.ts +6 -0
  73. package/dist/output/timeline-markdown.d.ts.map +1 -0
  74. package/dist/output/timeline-markdown.js +167 -0
  75. package/dist/output/timeline-markdown.js.map +1 -0
  76. package/dist/output/timeline.d.ts +9 -0
  77. package/dist/output/timeline.d.ts.map +1 -0
  78. package/dist/output/timeline.js +318 -0
  79. package/dist/output/timeline.js.map +1 -0
  80. package/dist/patterns/detour.d.ts +32 -0
  81. package/dist/patterns/detour.d.ts.map +1 -0
  82. package/dist/patterns/detour.js +137 -0
  83. package/dist/patterns/detour.js.map +1 -0
  84. package/dist/patterns/flow-state.d.ts +16 -0
  85. package/dist/patterns/flow-state.d.ts.map +1 -0
  86. package/dist/patterns/flow-state.js +40 -0
  87. package/dist/patterns/flow-state.js.map +1 -0
  88. package/dist/patterns/index.d.ts +8 -0
  89. package/dist/patterns/index.d.ts.map +1 -0
  90. package/dist/patterns/index.js +22 -0
  91. package/dist/patterns/index.js.map +1 -0
  92. package/dist/patterns/intervention-effectiveness.d.ts +42 -0
  93. package/dist/patterns/intervention-effectiveness.d.ts.map +1 -0
  94. package/dist/patterns/intervention-effectiveness.js +196 -0
  95. package/dist/patterns/intervention-effectiveness.js.map +1 -0
  96. package/dist/patterns/late-night.d.ts +30 -0
  97. package/dist/patterns/late-night.d.ts.map +1 -0
  98. package/dist/patterns/late-night.js +141 -0
  99. package/dist/patterns/late-night.js.map +1 -0
  100. package/dist/patterns/post-delete-sprint.d.ts +28 -0
  101. package/dist/patterns/post-delete-sprint.d.ts.map +1 -0
  102. package/dist/patterns/post-delete-sprint.js +85 -0
  103. package/dist/patterns/post-delete-sprint.js.map +1 -0
  104. package/dist/patterns/spiral-regression.d.ts +49 -0
  105. package/dist/patterns/spiral-regression.d.ts.map +1 -0
  106. package/dist/patterns/spiral-regression.js +219 -0
  107. package/dist/patterns/spiral-regression.js.map +1 -0
  108. package/dist/patterns/thrashing.d.ts +25 -0
  109. package/dist/patterns/thrashing.d.ts.map +1 -0
  110. package/dist/patterns/thrashing.js +111 -0
  111. package/dist/patterns/thrashing.js.map +1 -0
  112. package/dist/storage/atomic.d.ts +40 -0
  113. package/dist/storage/atomic.d.ts.map +1 -0
  114. package/dist/storage/atomic.js +155 -0
  115. package/dist/storage/atomic.js.map +1 -0
  116. package/dist/storage/commit-log.d.ts +35 -0
  117. package/dist/storage/commit-log.d.ts.map +1 -0
  118. package/dist/storage/commit-log.js +128 -0
  119. package/dist/storage/commit-log.js.map +1 -0
  120. package/dist/storage/index.d.ts +5 -0
  121. package/dist/storage/index.d.ts.map +1 -0
  122. package/dist/storage/index.js +33 -0
  123. package/dist/storage/index.js.map +1 -0
  124. package/dist/storage/schema.d.ts +32 -0
  125. package/dist/storage/schema.d.ts.map +1 -0
  126. package/dist/storage/schema.js +37 -0
  127. package/dist/storage/schema.js.map +1 -0
  128. package/dist/storage/timeline-store.d.ts +117 -0
  129. package/dist/storage/timeline-store.d.ts.map +1 -0
  130. package/dist/storage/timeline-store.js +438 -0
  131. package/dist/storage/timeline-store.js.map +1 -0
  132. package/dist/types.d.ts +96 -0
  133. package/dist/types.d.ts.map +1 -1
  134. package/docs/ARCHITECTURE.md +458 -0
  135. package/docs/DATA-ARCHITECTURE.md +565 -0
  136. package/docs/GAMIFICATION.md +564 -0
  137. package/docs/JSON-STORAGE-PATTERNS.md +512 -0
  138. package/docs/METRICS-EXPLAINED.md +394 -0
  139. package/docs/UNIFIED-ECOSYSTEM.md +560 -0
  140. package/docs/VIBE-ECOSYSTEM.md +406 -0
  141. package/feature-list.json +48 -0
  142. package/package.json +2 -1
  143. package/vitest.config.ts +1 -5
  144. package/.vibe-check/calibration.json +0 -38
  145. package/.vibe-check/latest.json +0 -114
  146. package/.vibe-check/sessions.json +0 -44
  147. package/PLAN-ultimate-game.md +0 -1362
@@ -0,0 +1,394 @@
1
+ # vibe-check Metrics Explained
2
+
3
+ **Detailed breakdown of how each metric is calculated**
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ vibe-check analyzes git history to compute metrics. It uses **semantic-free signals**—patterns in commit behavior, not code content. This ensures:
10
+
11
+ - **Privacy**: Never reads your actual code
12
+ - **Universality**: Works for any language/framework
13
+ - **Honesty**: Can't be gamed by writing "clean" commit messages
14
+
15
+ ---
16
+
17
+ ## The 5 Core Metrics
18
+
19
+ ### 1. Iteration Velocity
20
+
21
+ **What it measures:** How fast are your feedback loops?
22
+
23
+ **Formula:**
24
+ ```
25
+ Iteration Velocity = Total Commits / Active Hours
26
+ ```
27
+
28
+ **Active Hours Calculation:**
29
+ - Groups commits into sessions (gaps > 2 hours = new session)
30
+ - Sums session durations
31
+ - Excludes time between sessions
32
+
33
+ **Example:**
34
+ ```
35
+ Commits: 24
36
+ Active hours: 4.5
37
+
38
+ Velocity = 24 / 4.5 = 5.3 commits/hour
39
+ ```
40
+
41
+ **Thresholds:**
42
+
43
+ | Rating | Commits/Hour |
44
+ |--------|--------------|
45
+ | ELITE | >5 |
46
+ | HIGH | 3-5 |
47
+ | MEDIUM | 1-3 |
48
+ | LOW | <1 |
49
+
50
+ **What it means:**
51
+ - High velocity = tight feedback loops, iterating quickly
52
+ - Low velocity = long gaps between commits, possibly stuck
53
+
54
+ ---
55
+
56
+ ### 2. Rework Ratio
57
+
58
+ **What it measures:** Are you building or debugging?
59
+
60
+ **Formula:**
61
+ ```
62
+ Rework Ratio = Fix Commits / Total Commits × 100%
63
+ ```
64
+
65
+ **Fix Commit Detection:**
66
+ - Commit message starts with `fix:` or `fix(`
67
+ - Or contains keywords: "fix", "bug", "patch", "revert"
68
+
69
+ **Example:**
70
+ ```
71
+ Total commits: 50
72
+ Fix commits: 12
73
+
74
+ Rework = 12 / 50 = 24%
75
+ ```
76
+
77
+ **Thresholds:**
78
+
79
+ | Rating | Rework % |
80
+ |--------|----------|
81
+ | ELITE | <30% |
82
+ | HIGH | 30-40% |
83
+ | MEDIUM | 40-50% |
84
+ | LOW | >50% |
85
+
86
+ **What it means:**
87
+ - Low rework = building new things, code sticking
88
+ - High rework = debugging, fixing issues, thrashing
89
+
90
+ ---
91
+
92
+ ### 3. Trust Pass Rate
93
+
94
+ **What it measures:** Does your code stick on first try?
95
+
96
+ **THE most important metric** - directly measures if you vibed at the right level.
97
+
98
+ **Formula:**
99
+ ```
100
+ Trust Pass Rate = (1 - Immediate Fix Rate) × 100%
101
+
102
+ Immediate Fix Rate = Fix-within-10min Commits / Total Non-Fix Commits
103
+ ```
104
+
105
+ **Immediate Fix Detection:**
106
+ - A `fix:` commit within 10 minutes of a `feat:` commit
107
+ - Targeting the same scope/component
108
+
109
+ **Example:**
110
+ ```
111
+ feat(auth): add login
112
+ fix(auth): handle edge case ← 5 min later (immediate fix)
113
+ feat(api): add endpoint
114
+ feat(ui): add button
115
+ fix(api): fix typo ← 3 hours later (not immediate)
116
+
117
+ Non-fix commits: 3 (feat: auth, api, ui)
118
+ Immediate fixes: 1 (auth fix within 10 min)
119
+
120
+ Trust Pass Rate = (1 - 1/3) × 100 = 66.7%
121
+ ```
122
+
123
+ **Thresholds:**
124
+
125
+ | Rating | Trust % |
126
+ |--------|---------|
127
+ | ELITE | >95% |
128
+ | HIGH | 85-95% |
129
+ | MEDIUM | 70-85% |
130
+ | LOW | <70% |
131
+
132
+ **What it means:**
133
+ - High trust = code works first time, appropriate verification level
134
+ - Low trust = frequent immediate fixes, possibly trusting AI too much
135
+
136
+ ---
137
+
138
+ ### 4. Debug Spiral Duration
139
+
140
+ **What it measures:** How long do you get stuck in fix loops?
141
+
142
+ **Formula:**
143
+ ```
144
+ Debug Spiral Duration = Average minutes spent in spirals
145
+ ```
146
+
147
+ **Spiral Detection:**
148
+ 1. Find consecutive fix commits on same component
149
+ 2. If 3+ fixes within 30 minutes → spiral
150
+ 3. Duration = time from first to last fix in chain
151
+
152
+ **Example:**
153
+ ```
154
+ 09:00 fix(auth): try token refresh
155
+ 09:08 fix(auth): add retry logic
156
+ 09:15 fix(auth): increase timeout
157
+ 09:22 fix(auth): finally works!
158
+
159
+ Spiral detected:
160
+ - Component: auth
161
+ - Commits: 4
162
+ - Duration: 22 minutes
163
+ ```
164
+
165
+ **Thresholds:**
166
+
167
+ | Rating | Avg Duration |
168
+ |--------|--------------|
169
+ | ELITE | <15 min |
170
+ | HIGH | 15-25 min |
171
+ | MEDIUM | 25-45 min |
172
+ | LOW | >45 min |
173
+
174
+ **What it means:**
175
+ - Short spirals = quick recovery, good debugging skills
176
+ - Long spirals = getting stuck, may need tracer tests
177
+
178
+ ---
179
+
180
+ ### 5. Flow Efficiency
181
+
182
+ **What it measures:** What percentage of time is productive building?
183
+
184
+ **Formula:**
185
+ ```
186
+ Flow Efficiency = Build Time / Total Active Time × 100%
187
+
188
+ Build Time = Time spent on feat/docs/refactor commits
189
+ Debug Time = Time spent on fix commits
190
+ Total Active Time = Build Time + Debug Time
191
+ ```
192
+
193
+ **Time Attribution:**
194
+ - Each commit gets proportional time based on session duration
195
+ - Fix commits count as debug time
196
+ - Non-fix commits count as build time
197
+
198
+ **Example:**
199
+ ```
200
+ Session: 2 hours
201
+ Commits: 10 feat, 5 fix
202
+
203
+ Build time: 10/15 × 2h = 80 min
204
+ Debug time: 5/15 × 2h = 40 min
205
+
206
+ Flow Efficiency = 80 / 120 × 100 = 66.7%
207
+ ```
208
+
209
+ **Thresholds:**
210
+
211
+ | Rating | Efficiency % |
212
+ |--------|--------------|
213
+ | ELITE | >90% |
214
+ | HIGH | 75-90% |
215
+ | MEDIUM | 50-75% |
216
+ | LOW | <50% |
217
+
218
+ **What it means:**
219
+ - High efficiency = mostly building, little debugging
220
+ - Low efficiency = significant time spent fixing issues
221
+
222
+ ---
223
+
224
+ ## Overall Rating
225
+
226
+ **How overall rating is calculated:**
227
+
228
+ 1. Count ELITE metrics
229
+ 2. Count LOW metrics
230
+ 3. Apply rules:
231
+
232
+ ```
233
+ If 4+ metrics ELITE → ELITE
234
+ If 3 metrics ELITE, 0 LOW → HIGH
235
+ If 2+ metrics LOW → LOW
236
+ Otherwise → MEDIUM
237
+ ```
238
+
239
+ ---
240
+
241
+ ## VibeScore (0-100)
242
+
243
+ **Composite score using semantic-free metrics:**
244
+
245
+ ### Component Metrics
246
+
247
+ | Metric | Weight | What It Measures |
248
+ |--------|--------|------------------|
249
+ | File Churn | 30% | % files touched multiple times |
250
+ | Time Spiral | 25% | Rapid-fire same-file commits |
251
+ | Velocity Anomaly | 20% | Deviation from your baseline |
252
+ | Code Stability | 25% | % added lines that survive |
253
+
254
+ ### Formula
255
+
256
+ ```
257
+ VibeScore = (fileChurn × 0.30) + (timeSpiral × 0.25) +
258
+ (velocityAnomaly × 0.20) + (codeStability × 0.25)
259
+
260
+ Each component normalized to 0-1 range
261
+ Final score × 100 for percentage
262
+ ```
263
+
264
+ ### File Churn
265
+
266
+ ```
267
+ File Churn Score = 1 - (Files touched 3+ times / Total files)
268
+ ```
269
+
270
+ High churn (same files repeatedly) = lower score
271
+
272
+ ### Time Spiral
273
+
274
+ ```
275
+ Time Spiral Score = 1 - (Rapid-fire commits / Total commits)
276
+
277
+ Rapid-fire = 3+ commits on same file within 5 minutes
278
+ ```
279
+
280
+ ### Velocity Anomaly
281
+
282
+ ```
283
+ Z-Score = (Current velocity - Baseline mean) / Baseline std dev
284
+
285
+ If Z < -2 (much slower): Low score
286
+ If Z > 2 (much faster): Caution (may indicate thrashing)
287
+ If -1 < Z < 1: Optimal
288
+ ```
289
+
290
+ ### Code Stability
291
+
292
+ ```
293
+ Stability = Lines surviving after 24h / Lines added
294
+ ```
295
+
296
+ Requires historical data; estimated from fix ratio if unavailable.
297
+
298
+ ---
299
+
300
+ ## Debug Spiral Patterns
301
+
302
+ When a spiral is detected, it's classified by pattern:
303
+
304
+ | Pattern | Keywords | Common Cause |
305
+ |---------|----------|--------------|
306
+ | `SECRETS_AUTH` | oauth, token, secret, credential, auth | Authentication issues |
307
+ | `API_MISMATCH` | api, version, schema, endpoint | API compatibility |
308
+ | `VOLUME_CONFIG` | volume, mount, pvc, permission | Storage/mount issues |
309
+ | `SSL_TLS` | ssl, tls, cert, https | Certificate problems |
310
+ | `IMAGE_REGISTRY` | image, pull, registry, container | Container pull issues |
311
+ | `GITOPS_DRIFT` | sync, reconcile, drift, argocd | GitOps sync issues |
312
+ | `OTHER` | (no match) | Unclassified |
313
+
314
+ ---
315
+
316
+ ## Rating Thresholds Summary
317
+
318
+ | Metric | ELITE | HIGH | MEDIUM | LOW |
319
+ |--------|-------|------|--------|-----|
320
+ | Iteration Velocity | >5/hr | 3-5/hr | 1-3/hr | <1/hr |
321
+ | Rework Ratio | <30% | 30-40% | 40-50% | >50% |
322
+ | Trust Pass Rate | >95% | 85-95% | 70-85% | <70% |
323
+ | Debug Spiral Duration | <15m | 15-25m | 25-45m | >45m |
324
+ | Flow Efficiency | >90% | 75-90% | 50-75% | <50% |
325
+
326
+ ---
327
+
328
+ ## Baseline Comparison
329
+
330
+ After 5+ sessions, vibe-check compares to YOUR baseline:
331
+
332
+ ```
333
+ VS YOUR BASELINE
334
+
335
+ Trust: 92% (+7% vs avg 85%)
336
+ Rework: 18% (-4% vs avg 22%)
337
+
338
+ Better than your usual - nice flow!
339
+ ```
340
+
341
+ ### Baseline Calculation
342
+
343
+ ```
344
+ Baseline mean = Average of last 10 sessions
345
+ Baseline std = Standard deviation of last 10 sessions
346
+
347
+ Current comparison = (Current - Mean) / Std
348
+ ```
349
+
350
+ ### Feedback Messages
351
+
352
+ | Comparison | Message |
353
+ |------------|---------|
354
+ | >1 std better | "Better than your usual - nice flow!" |
355
+ | Within 1 std | "Consistent with your baseline" |
356
+ | >1 std worse | "Below your average - consider a break?" |
357
+
358
+ ---
359
+
360
+ ## Data Sources
361
+
362
+ All metrics derived from git:
363
+
364
+ ```bash
365
+ git log --format="%H|%ad|%s|%an" --date=iso
366
+ ```
367
+
368
+ Fields used:
369
+ - **Hash**: Unique commit identifier
370
+ - **Date**: Timestamp for velocity/duration calculations
371
+ - **Subject**: Message for type detection (feat/fix/etc.)
372
+ - **Author**: For filtering (optional)
373
+
374
+ ---
375
+
376
+ ## Limitations
377
+
378
+ 1. **Commit granularity matters** - Squashed commits hide iteration patterns
379
+ 2. **Commit messages must be parseable** - Relies on conventional commits
380
+ 3. **Multi-author blind** - Doesn't distinguish pair programming
381
+ 4. **No code quality signal** - Doesn't know if code is good, just if it sticks
382
+
383
+ ---
384
+
385
+ ## Accuracy Notes
386
+
387
+ - **Trust Pass Rate** is most reliable when commits are granular
388
+ - **Flow Efficiency** assumes fix commits = debugging (may not always be true)
389
+ - **VibeScore** is calibrated but evolving based on user feedback
390
+
391
+ ---
392
+
393
+ **Version:** 1.5.0
394
+ **Last Updated:** 2025-11-29