@boshu2/vibe-check 1.6.1 → 1.7.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 (107) hide show
  1. package/.agents/bundles/automatic-learning-cadence-plan-2025-12-02.md +1297 -0
  2. package/.agents/bundles/automatic-learning-cadence-research-2025-12-02.md +481 -0
  3. package/.agents/bundles/dashboard-data-quality-plan.md +458 -0
  4. package/.agents/bundles/rating-scoring-alignment-plan.md +427 -0
  5. package/.agents/bundles/rpi-session-capture-plan-2025-12-02.md +693 -0
  6. package/.agents/bundles/rpi-session-capture-research-2025-12-02.md +433 -0
  7. package/.agents/bundles/session-integration-plan-2025-12-02.md +144 -0
  8. package/CHANGELOG.md +17 -0
  9. package/CLAUDE.md +74 -2
  10. package/Makefile +173 -0
  11. package/README.md +35 -2
  12. package/claude-progress.json +34 -5
  13. package/claude-progress.txt +66 -0
  14. package/dashboard/app.js +699 -66
  15. package/dashboard/chart.min.js +20 -0
  16. package/dashboard/dashboard-data.js +764 -0
  17. package/dashboard/dashboard-data.json +182 -71
  18. package/dashboard/index.html +139 -14
  19. package/dashboard/styles.css +579 -4
  20. package/dist/cli.js +1 -1
  21. package/dist/cli.js.map +1 -1
  22. package/dist/commands/analyze.d.ts.map +1 -1
  23. package/dist/commands/analyze.js +38 -2
  24. package/dist/commands/analyze.js.map +1 -1
  25. package/dist/commands/dashboard.js +4 -1
  26. package/dist/commands/dashboard.js.map +1 -1
  27. package/dist/commands/index.d.ts +1 -1
  28. package/dist/commands/index.d.ts.map +1 -1
  29. package/dist/commands/index.js +3 -3
  30. package/dist/commands/index.js.map +1 -1
  31. package/dist/commands/learn.d.ts +3 -0
  32. package/dist/commands/learn.d.ts.map +1 -0
  33. package/dist/commands/learn.js +161 -0
  34. package/dist/commands/learn.js.map +1 -0
  35. package/dist/commands/lesson.d.ts +8 -0
  36. package/dist/commands/lesson.d.ts.map +1 -0
  37. package/dist/commands/lesson.js +206 -0
  38. package/dist/commands/lesson.js.map +1 -0
  39. package/dist/commands/profile.d.ts.map +1 -1
  40. package/dist/commands/profile.js +3 -202
  41. package/dist/commands/profile.js.map +1 -1
  42. package/dist/commands/session.d.ts +51 -0
  43. package/dist/commands/session.d.ts.map +1 -0
  44. package/dist/commands/session.js +561 -0
  45. package/dist/commands/session.js.map +1 -0
  46. package/dist/gamification/index.d.ts +1 -3
  47. package/dist/gamification/index.d.ts.map +1 -1
  48. package/dist/gamification/index.js +2 -5
  49. package/dist/gamification/index.js.map +1 -1
  50. package/dist/gamification/pattern-memory.d.ts +1 -1
  51. package/dist/gamification/pattern-memory.d.ts.map +1 -1
  52. package/dist/gamification/pattern-memory.js.map +1 -1
  53. package/dist/gamification/profile.d.ts +2 -2
  54. package/dist/gamification/profile.d.ts.map +1 -1
  55. package/dist/gamification/profile.js +2 -15
  56. package/dist/gamification/profile.js.map +1 -1
  57. package/dist/gamification/types.d.ts +8 -2
  58. package/dist/gamification/types.d.ts.map +1 -1
  59. package/dist/gamification/types.js.map +1 -1
  60. package/dist/insights/index.d.ts.map +1 -1
  61. package/dist/insights/index.js +16 -4
  62. package/dist/insights/index.js.map +1 -1
  63. package/dist/insights/types.d.ts +14 -0
  64. package/dist/insights/types.d.ts.map +1 -1
  65. package/dist/learning/cadence.d.ts +15 -0
  66. package/dist/learning/cadence.d.ts.map +1 -0
  67. package/dist/learning/cadence.js +130 -0
  68. package/dist/learning/cadence.js.map +1 -0
  69. package/dist/learning/index.d.ts +19 -0
  70. package/dist/learning/index.d.ts.map +1 -0
  71. package/dist/learning/index.js +35 -0
  72. package/dist/learning/index.js.map +1 -0
  73. package/dist/learning/lessons-storage.d.ts +48 -0
  74. package/dist/learning/lessons-storage.d.ts.map +1 -0
  75. package/dist/learning/lessons-storage.js +266 -0
  76. package/dist/learning/lessons-storage.js.map +1 -0
  77. package/dist/learning/lessons-types.d.ts +83 -0
  78. package/dist/learning/lessons-types.d.ts.map +1 -0
  79. package/dist/learning/lessons-types.js +15 -0
  80. package/dist/learning/lessons-types.js.map +1 -0
  81. package/dist/learning/nudges.d.ts +20 -0
  82. package/dist/learning/nudges.d.ts.map +1 -0
  83. package/dist/learning/nudges.js +68 -0
  84. package/dist/learning/nudges.js.map +1 -0
  85. package/dist/learning/retrospective.d.ts +27 -0
  86. package/dist/learning/retrospective.d.ts.map +1 -0
  87. package/dist/learning/retrospective.js +184 -0
  88. package/dist/learning/retrospective.js.map +1 -0
  89. package/dist/learning/storage.d.ts +44 -0
  90. package/dist/learning/storage.d.ts.map +1 -0
  91. package/dist/learning/storage.js +194 -0
  92. package/dist/learning/storage.js.map +1 -0
  93. package/dist/learning/surfacing.d.ts +36 -0
  94. package/dist/learning/surfacing.d.ts.map +1 -0
  95. package/dist/learning/surfacing.js +255 -0
  96. package/dist/learning/surfacing.js.map +1 -0
  97. package/dist/learning/synthesis.d.ts +17 -0
  98. package/dist/learning/synthesis.d.ts.map +1 -0
  99. package/dist/learning/synthesis.js +293 -0
  100. package/dist/learning/synthesis.js.map +1 -0
  101. package/dist/learning/types.d.ts +60 -0
  102. package/dist/learning/types.d.ts.map +1 -0
  103. package/dist/learning/types.js +17 -0
  104. package/dist/learning/types.js.map +1 -0
  105. package/docs/METRICS.md +528 -0
  106. package/feature-list.json +21 -0
  107. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Learning System Types
4
+ *
5
+ * Types for the automatic learning cadence system including:
6
+ * - Learning state persistence
7
+ * - Nudge queue management
8
+ * - Retrospective summaries
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.PATTERN_WINDOW_DAYS = exports.PATTERN_REPEAT_THRESHOLD = exports.RETRO_CADENCE_DAYS = exports.MAX_PENDING_NUDGES = exports.NUDGE_TTL_DAYS = void 0;
12
+ exports.NUDGE_TTL_DAYS = 7;
13
+ exports.MAX_PENDING_NUDGES = 5;
14
+ exports.RETRO_CADENCE_DAYS = 7;
15
+ exports.PATTERN_REPEAT_THRESHOLD = 3;
16
+ exports.PATTERN_WINDOW_DAYS = 7;
17
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/learning/types.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AA6DU,QAAA,cAAc,GAAG,CAAC,CAAC;AACnB,QAAA,kBAAkB,GAAG,CAAC,CAAC;AACvB,QAAA,kBAAkB,GAAG,CAAC,CAAC;AACvB,QAAA,wBAAwB,GAAG,CAAC,CAAC;AAC7B,QAAA,mBAAmB,GAAG,CAAC,CAAC"}
@@ -0,0 +1,528 @@
1
+ # Vibe-Check Metrics Reference
2
+
3
+ > API-style documentation for all vibe-check metrics. Understand exactly what's measured, how it's calculated, and why it matters.
4
+
5
+ ## Overview
6
+
7
+ Vibe-check uses **two scoring systems** that measure different aspects of your coding workflow:
8
+
9
+ | System | Output | Measures | Best For |
10
+ |--------|--------|----------|----------|
11
+ | **Code Health** | ELITE/HIGH/MEDIUM/LOW | Quality outcomes | Grading your work |
12
+ | **Pattern Score** | 0-100% | Workflow patterns | Early warning signals |
13
+
14
+ **Recommendation:** Use Code Health as your primary "grade" and Pattern Score as a trend indicator.
15
+
16
+ ---
17
+
18
+ ## Code Health Rating (Semantic Metrics)
19
+
20
+ The Code Health rating grades your **actual coding outcomes**. It's calculated from 5 semantic metrics that require conventional commit messages (`feat:`, `fix:`, etc.).
21
+
22
+ ### How Code Health is Calculated
23
+
24
+ ```
25
+ Code Health = weightedAverage(
26
+ iterationVelocity.rating, // elite=4, high=3, medium=2, low=1
27
+ reworkRatio.rating,
28
+ trustPassRate.rating,
29
+ debugSpiralDuration.rating,
30
+ flowEfficiency.rating
31
+ )
32
+
33
+ If average >= 3.5 → ELITE
34
+ If average >= 2.5 → HIGH
35
+ If average >= 1.5 → MEDIUM
36
+ Else → LOW
37
+ ```
38
+
39
+ ---
40
+
41
+ ### Iteration Velocity
42
+
43
+ **What it measures:** How fast you're committing code.
44
+
45
+ **Why it matters:** Tight feedback loops correlate with faster problem-solving. Frequent small commits catch issues early.
46
+
47
+ #### Calculation
48
+
49
+ ```typescript
50
+ velocity = totalCommits / activeHours
51
+
52
+ // Active hours excludes gaps > 2 hours (session breaks)
53
+ // Minimum 10 min/commit assumed for work between commits
54
+ ```
55
+
56
+ #### Rating Thresholds
57
+
58
+ | Rating | Threshold | Interpretation |
59
+ |--------|-----------|----------------|
60
+ | ELITE | > 5 commits/hr | Excellent iteration, tight feedback loops |
61
+ | HIGH | >= 3 commits/hr | Good iteration speed |
62
+ | MEDIUM | >= 1 commit/hr | Normal pace |
63
+ | LOW | < 1 commit/hr | Slow iteration, consider smaller commits |
64
+
65
+ #### Example
66
+
67
+ ```
68
+ 10 commits over 2 active hours
69
+ velocity = 10 / 2 = 5.0 commits/hr → ELITE
70
+ ```
71
+
72
+ #### When Low is OK
73
+
74
+ - Deep architectural work requiring extended thinking
75
+ - Documentation or research-heavy tasks
76
+ - Pair programming where one person drives
77
+
78
+ ---
79
+
80
+ ### Rework Ratio
81
+
82
+ **What it measures:** Percentage of commits that are fixes vs. new features.
83
+
84
+ **Why it matters:** High fix ratios suggest building on unstable foundations. You want to spend time building, not debugging.
85
+
86
+ #### Calculation
87
+
88
+ ```typescript
89
+ reworkRatio = (fixCommits / totalCommits) * 100
90
+
91
+ // fixCommits = commits with type 'fix'
92
+ ```
93
+
94
+ #### Rating Thresholds
95
+
96
+ | Rating | Threshold | Interpretation |
97
+ |--------|-----------|----------------|
98
+ | ELITE | < 30% fixes | Mostly forward progress |
99
+ | HIGH | < 50% fixes | Normal for complex work |
100
+ | MEDIUM | < 70% fixes | Consider validating assumptions first |
101
+ | LOW | >= 70% fixes | High rework - stop and reassess |
102
+
103
+ #### Example
104
+
105
+ ```
106
+ 8 total commits: 2 fix, 6 feat
107
+ reworkRatio = (2/8) * 100 = 25% → ELITE
108
+ ```
109
+
110
+ #### When High is OK
111
+
112
+ - Refactoring legacy code (expected to find issues)
113
+ - Bugfix-focused sprints
114
+ - Fixing known tech debt
115
+
116
+ ---
117
+
118
+ ### Trust Pass Rate
119
+
120
+ **What it measures:** Percentage of commits that "stick" without needing immediate fixes.
121
+
122
+ **Why it matters:** High trust rate means your code works on first try. Low trust suggests you're coding without sufficient understanding.
123
+
124
+ #### Calculation
125
+
126
+ ```typescript
127
+ // A commit "fails trust" if:
128
+ // - Next commit is a fix
129
+ // - To the same component (scope match)
130
+ // - Within 30 minutes
131
+
132
+ trustPassRate = (trustedCommits / totalCommits) * 100
133
+ ```
134
+
135
+ #### Rating Thresholds
136
+
137
+ | Rating | Threshold | Interpretation |
138
+ |--------|-----------|----------------|
139
+ | ELITE | > 95% | Code sticks on first try |
140
+ | HIGH | >= 80% | Occasional fixes, mostly autonomous |
141
+ | MEDIUM | >= 60% | Regular intervention required |
142
+ | LOW | < 60% | Heavy oversight needed - run tracer tests |
143
+
144
+ #### Example
145
+
146
+ ```
147
+ 10 commits, 1 needed immediate fix
148
+ trustPassRate = (9/10) * 100 = 90% → HIGH
149
+ ```
150
+
151
+ #### When Low is OK
152
+
153
+ - Exploring unfamiliar APIs
154
+ - First time working in a new codebase
155
+ - Intentional "spike and fix" approach
156
+
157
+ ---
158
+
159
+ ### Debug Spiral Duration
160
+
161
+ **What it measures:** Average time spent in consecutive fix chains (3+ fixes to same component).
162
+
163
+ **Why it matters:** Long spirals indicate you're stuck. Recognizing and breaking spirals early saves hours.
164
+
165
+ #### Calculation
166
+
167
+ ```typescript
168
+ // A "spiral" = 3+ consecutive fix commits to same component
169
+ spiralDuration = totalSpiralMinutes / spiralCount
170
+
171
+ // Time = first spiral commit to last spiral commit
172
+ ```
173
+
174
+ #### Rating Thresholds
175
+
176
+ | Rating | Threshold | Interpretation |
177
+ |--------|-----------|----------------|
178
+ | ELITE | < 15 min avg | Spirals resolved quickly |
179
+ | HIGH | < 30 min avg | Normal debugging time |
180
+ | MEDIUM | < 60 min avg | Consider using tracer tests |
181
+ | LOW | >= 60 min avg | Extended debugging - use tracers |
182
+
183
+ #### Spiral Pattern Detection
184
+
185
+ Vibe-check detects common spiral causes:
186
+
187
+ | Pattern | Keywords | Prevention |
188
+ |---------|----------|------------|
189
+ | VOLUME_CONFIG | volume, mount, permission, pvc | Test mount paths first |
190
+ | SECRETS_AUTH | secret, oauth, token, credential | Validate auth flow early |
191
+ | API_MISMATCH | api, version, field, spec, crd | Check API schema first |
192
+ | SSL_TLS | ssl, tls, cert, fips | Verify cert chain early |
193
+ | IMAGE_REGISTRY | image, pull, registry, tag | Test pull access first |
194
+ | GITOPS_DRIFT | drift, sync, argocd, reconcil | Verify sync status |
195
+
196
+ #### Example
197
+
198
+ ```
199
+ 2 spirals detected:
200
+ - Spiral 1: 4 fixes over 20 minutes
201
+ - Spiral 2: 3 fixes over 10 minutes
202
+ avgDuration = (20 + 10) / 2 = 15 min → ELITE
203
+ ```
204
+
205
+ ---
206
+
207
+ ### Flow Efficiency
208
+
209
+ **What it measures:** Percentage of active time spent building vs. debugging.
210
+
211
+ **Why it matters:** Time in spirals is time not building features. High efficiency = productive flow state.
212
+
213
+ #### Calculation
214
+
215
+ ```typescript
216
+ spiralMinutes = sum(spiral.duration for each spiral)
217
+ flowEfficiency = ((activeMinutes - spiralMinutes) / activeMinutes) * 100
218
+ ```
219
+
220
+ #### Rating Thresholds
221
+
222
+ | Rating | Threshold | Interpretation |
223
+ |--------|-----------|----------------|
224
+ | ELITE | > 90% | Excellent productive flow |
225
+ | HIGH | >= 75% | Good balance |
226
+ | MEDIUM | >= 50% | Significant debugging overhead |
227
+ | LOW | < 50% | More debugging than building |
228
+
229
+ #### Example
230
+
231
+ ```
232
+ 120 minutes active, 15 minutes in spirals
233
+ flowEfficiency = ((120-15)/120) * 100 = 87.5% → HIGH
234
+ ```
235
+
236
+ ---
237
+
238
+ ## Pattern Score (Semantic-Free Metrics)
239
+
240
+ The Pattern Score detects **workflow patterns** that might indicate trouble, even without conventional commits. It's a 0-100% score calculated from 4 metrics.
241
+
242
+ ### How Pattern Score is Calculated
243
+
244
+ ```typescript
245
+ patternScore = (
246
+ fileChurn * 0.30 + // 30% weight - strongest signal
247
+ timeSpiral * 0.25 + // 25% weight
248
+ velocityAnomaly * 0.20 + // 20% weight
249
+ codeStability * 0.25 // 25% weight
250
+ )
251
+ ```
252
+
253
+ ---
254
+
255
+ ### File Churn
256
+
257
+ **What it measures:** Files touched 3+ times within 1 hour.
258
+
259
+ **Why it matters:** Returning to the same file repeatedly suggests incomplete understanding, unexpected dependencies, or debugging loops.
260
+
261
+ #### Calculation
262
+
263
+ ```typescript
264
+ // Count files with 3+ touches in any 1-hour window
265
+ churnRatio = churnedFiles / totalFiles
266
+ fileChurnScore = (1 - churnRatio) * 100 // Inverted: high = good
267
+ ```
268
+
269
+ #### Rating Thresholds
270
+
271
+ | Rating | Churn Ratio | Score | Interpretation |
272
+ |--------|-------------|-------|----------------|
273
+ | ELITE | < 10% | > 90% | Minimal thrashing |
274
+ | HIGH | < 25% | 75-90% | Normal iteration |
275
+ | MEDIUM | < 40% | 60-75% | Some thrashing |
276
+ | LOW | >= 40% | < 60% | Significant thrashing |
277
+
278
+ #### Example
279
+
280
+ ```
281
+ 20 files touched, 3 churned (3+ times in 1hr)
282
+ churnRatio = 3/20 = 15%
283
+ fileChurnScore = (1 - 0.15) * 100 = 85% → HIGH
284
+ ```
285
+
286
+ ---
287
+
288
+ ### Time Spiral
289
+
290
+ **What it measures:** Commits made less than 5 minutes apart.
291
+
292
+ **Why it matters:** Rapid commits suggest frustrated iteration - "oops forgot", quick fixes, debugging loops.
293
+
294
+ #### Calculation
295
+
296
+ ```typescript
297
+ // Count commits < 5 minutes after previous commit
298
+ spiralRatio = spiralCommits / totalCommits
299
+ timeSpiralScore = (1 - spiralRatio) * 100 // Inverted: high = good
300
+ ```
301
+
302
+ #### Rating Thresholds
303
+
304
+ | Rating | Spiral Ratio | Score | Interpretation |
305
+ |--------|--------------|-------|----------------|
306
+ | ELITE | < 15% | > 85% | Deliberate commits |
307
+ | HIGH | < 30% | 70-85% | Some quick fixes |
308
+ | MEDIUM | < 50% | 50-70% | Frequent iteration |
309
+ | LOW | >= 50% | < 50% | Frustrated iteration |
310
+
311
+ #### Example
312
+
313
+ ```
314
+ 10 commits, 2 were < 5min after previous
315
+ spiralRatio = 2/10 = 20%
316
+ timeSpiralScore = (1 - 0.20) * 100 = 80% → HIGH
317
+ ```
318
+
319
+ ---
320
+
321
+ ### Velocity Anomaly
322
+
323
+ **What it measures:** How far your current velocity is from your personal baseline.
324
+
325
+ **Why it matters:** Unusual velocity (too fast or too slow) can indicate problems - rushing, confusion, or blockers.
326
+
327
+ #### Calculation
328
+
329
+ ```typescript
330
+ // Z-score: standard deviations from your mean velocity
331
+ zScore = |currentVelocity - baselineMean| / baselineStdDev
332
+
333
+ // Sigmoid transform: z=0 → 100%, z=2 → 12%, z=3 → 5%
334
+ velocityAnomalyScore = (1 / (1 + exp(zScore - 1.5))) * 100
335
+ ```
336
+
337
+ #### Default Baseline
338
+
339
+ ```typescript
340
+ // Used until you build personal history
341
+ defaultBaseline = { mean: 3.0 commits/hr, stdDev: 1.5 }
342
+ ```
343
+
344
+ #### Rating Thresholds
345
+
346
+ | Rating | Z-Score | Score | Interpretation |
347
+ |--------|---------|-------|----------------|
348
+ | ELITE | < 1.0σ | > 75% | Near your baseline |
349
+ | HIGH | < 1.5σ | 50-75% | Slightly unusual |
350
+ | MEDIUM | < 2.0σ | 25-50% | Notably different |
351
+ | LOW | >= 2.0σ | < 25% | Very unusual pattern |
352
+
353
+ #### Example
354
+
355
+ ```
356
+ Baseline: 3.0 commits/hr (stdDev 1.5)
357
+ Current: 4.2 commits/hr
358
+ zScore = |4.2 - 3.0| / 1.5 = 0.8σ → ELITE
359
+ ```
360
+
361
+ ---
362
+
363
+ ### Code Stability
364
+
365
+ **What it measures:** What percentage of added code survives (isn't deleted in subsequent commits).
366
+
367
+ **Why it matters:** High churn (adding then deleting) suggests building on wrong assumptions.
368
+
369
+ #### Calculation
370
+
371
+ ```typescript
372
+ // Simplified: uses add/delete ratio as proxy
373
+ churnRate = min(deletions / additions, 1.0)
374
+ codeStabilityScore = (1 - churnRate * 0.5) * 100
375
+
376
+ // Partial penalty: deletions aren't always bad (refactoring)
377
+ ```
378
+
379
+ #### Rating Thresholds
380
+
381
+ | Rating | Score | Interpretation |
382
+ |--------|-------|----------------|
383
+ | ELITE | >= 85% | Code survives well |
384
+ | HIGH | >= 70% | Normal stability |
385
+ | MEDIUM | >= 50% | Some instability |
386
+ | LOW | < 50% | High code churn |
387
+
388
+ #### Fallback (No Line Stats)
389
+
390
+ ```typescript
391
+ // When git stats unavailable, estimate from commit patterns
392
+ fixRatio = fixKeywordCommits / totalCommits
393
+ codeStabilityScore = (1 - fixRatio) * 100
394
+ ```
395
+
396
+ ---
397
+
398
+ ## Interpreting Dual Scores
399
+
400
+ | Scenario | Code Health | Pattern Score | Interpretation |
401
+ |----------|-------------|---------------|----------------|
402
+ | Excellent session | ELITE | 85%+ | Everything working well |
403
+ | Quality but struggling | ELITE | 60-70% | Code works but workflow rough |
404
+ | Smooth but issues | HIGH/MEDIUM | 85%+ | Workflow fine but code needs fixes |
405
+ | Trouble | LOW | < 60% | Both outcomes and workflow suffering |
406
+
407
+ ### When They Disagree
408
+
409
+ **High Code Health, Low Pattern Score:**
410
+ - Your code works, but you're thrashing to get there
411
+ - Consider: More upfront planning, tracer tests
412
+
413
+ **Low Code Health, High Pattern Score:**
414
+ - Smooth workflow but code isn't sticking
415
+ - Consider: Better validation before committing
416
+
417
+ ---
418
+
419
+ ## Limitations
420
+
421
+ ### Not Empirically Validated
422
+
423
+ These thresholds are based on practitioner experience, not academic research. Your mileage may vary.
424
+
425
+ ### Requires Conventional Commits
426
+
427
+ Code Health metrics (semantic) need `feat:`, `fix:`, etc. prefixes. Pattern Score works with any commits.
428
+
429
+ ### Session Detection is Approximate
430
+
431
+ "Active hours" calculation assumes 2-hour gaps mean new sessions. Adjust if your workflow differs.
432
+
433
+ ### Personal Baseline Cold Start
434
+
435
+ Velocity anomaly starts with default baseline until you have enough history.
436
+
437
+ ---
438
+
439
+ ## Calibration
440
+
441
+ Over time, vibe-check learns your personal patterns:
442
+
443
+ ```bash
444
+ vibe-check level --calibrate 3
445
+ # Record that this session felt like a Level 3 (60% trust)
446
+ ```
447
+
448
+ This improves velocity anomaly baseline and helps tune thresholds to your workflow.
449
+
450
+ ---
451
+
452
+ ## API Reference
453
+
454
+ ### Types
455
+
456
+ ```typescript
457
+ type Rating = 'elite' | 'high' | 'medium' | 'low';
458
+ type OverallRating = 'ELITE' | 'HIGH' | 'MEDIUM' | 'LOW';
459
+
460
+ interface MetricResult {
461
+ value: number;
462
+ unit: string;
463
+ rating: Rating;
464
+ description: string;
465
+ }
466
+ ```
467
+
468
+ ### Metric Functions
469
+
470
+ ```typescript
471
+ // Code Health (Semantic)
472
+ calculateIterationVelocity(commits: Commit[]): MetricResult
473
+ calculateReworkRatio(commits: Commit[]): MetricResult
474
+ calculateTrustPassRate(commits: Commit[]): MetricResult
475
+ calculateDebugSpiralDuration(chains: FixChain[]): MetricResult
476
+ calculateFlowEfficiency(activeMinutes: number, spirals: FixChain[]): MetricResult
477
+
478
+ // Pattern Score (Semantic-Free)
479
+ calculateFileChurn(commits: Commit[], filesPerCommit: Map): FileChurnResult
480
+ calculateTimeSpiral(commits: Commit[]): TimeSpiralResult
481
+ calculateVelocityAnomaly(commits: Commit[], baseline?: Baseline): VelocityAnomalyResult
482
+ calculateCodeStability(commits: Commit[], stats?: LineStats[]): CodeStabilityResult
483
+ ```
484
+
485
+ ### Score Calculation
486
+
487
+ ```typescript
488
+ calculateVibeScore(inputs: {
489
+ fileChurn: FileChurnResult;
490
+ timeSpiral: TimeSpiralResult;
491
+ velocityAnomaly: VelocityAnomalyResult;
492
+ codeStability: CodeStabilityResult;
493
+ }): VibeScore
494
+
495
+ interface VibeScore {
496
+ value: number; // 0.0 - 1.0
497
+ components: {
498
+ fileChurn: number;
499
+ timeSpiral: number;
500
+ velocityAnomaly: number;
501
+ codeStability: number;
502
+ };
503
+ weights: ScoreWeights;
504
+ }
505
+ ```
506
+
507
+ ---
508
+
509
+ ## Quick Reference Card
510
+
511
+ ### Code Health (The Grade)
512
+
513
+ | Metric | ELITE | HIGH | MEDIUM | LOW |
514
+ |--------|-------|------|--------|-----|
515
+ | Velocity | >5/hr | >=3/hr | >=1/hr | <1/hr |
516
+ | Rework | <30% | <50% | <70% | >=70% |
517
+ | Trust | >95% | >=80% | >=60% | <60% |
518
+ | Spiral | <15m | <30m | <60m | >=60m |
519
+ | Flow | >90% | >=75% | >=50% | <50% |
520
+
521
+ ### Pattern Score (The Warning System)
522
+
523
+ | Metric | Weight | ELITE | HIGH | MEDIUM | LOW |
524
+ |--------|--------|-------|------|--------|-----|
525
+ | File Churn | 30% | >90% | 75-90% | 60-75% | <60% |
526
+ | Time Spiral | 25% | >85% | 70-85% | 50-70% | <50% |
527
+ | Velocity Anomaly | 20% | >75% | 50-75% | 25-50% | <25% |
528
+ | Code Stability | 25% | >=85% | >=70% | >=50% | <50% |
package/feature-list.json CHANGED
@@ -189,6 +189,27 @@
189
189
  "description": "Timeline persistence: Cache to .vibe-check/timeline.json with compounding insights",
190
190
  "passes": true,
191
191
  "completed_date": "2025-11-30"
192
+ },
193
+ {
194
+ "id": "VIBE-032",
195
+ "description": "Automatic Learning & Retrospective Cadence - cadence triggers, nudges, learn command",
196
+ "passes": true,
197
+ "completed_date": "2025-12-02",
198
+ "plan_bundle": "automatic-learning-cadence-plan-2025-12-02.md",
199
+ "files": [
200
+ "src/learning/types.ts",
201
+ "src/learning/storage.ts",
202
+ "src/learning/cadence.ts",
203
+ "src/learning/nudges.ts",
204
+ "src/learning/retrospective.ts",
205
+ "src/learning/index.ts",
206
+ "src/commands/learn.ts",
207
+ "src/learning/lessons-types.ts",
208
+ "src/learning/lessons-storage.ts",
209
+ "src/learning/synthesis.ts",
210
+ "src/learning/surfacing.ts",
211
+ "src/commands/lesson.ts"
212
+ ]
192
213
  }
193
214
  ]
194
215
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boshu2/vibe-check",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "description": "Track git commit patterns during AI-assisted coding (experimental)",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {