@boshu2/vibe-check 1.6.2 → 1.8.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 (156) hide show
  1. package/.agents/bundles/actionable-coaching-plan-2025-12-02.md +209 -0
  2. package/.agents/bundles/automatic-learning-cadence-plan-2025-12-02.md +1297 -0
  3. package/.agents/bundles/automatic-learning-cadence-research-2025-12-02.md +481 -0
  4. package/.agents/bundles/dashboard-data-quality-plan.md +458 -0
  5. package/.agents/bundles/rating-scoring-alignment-plan.md +427 -0
  6. package/.agents/bundles/rpi-session-capture-plan-2025-12-02.md +693 -0
  7. package/.agents/bundles/rpi-session-capture-research-2025-12-02.md +433 -0
  8. package/.agents/bundles/session-integration-plan-2025-12-02.md +144 -0
  9. package/.agents/plans/git-forensics-enhancement-2025-12-05.md +493 -0
  10. package/.claude/skills/typescript-review.md +152 -0
  11. package/CHANGELOG.md +53 -0
  12. package/CLAUDE.md +79 -3
  13. package/Makefile +160 -0
  14. package/README.md +141 -155
  15. package/SECURITY.md +5 -1
  16. package/assets/logo-dark.svg +47 -0
  17. package/assets/logo.svg +47 -0
  18. package/claude-progress.json +54 -4
  19. package/claude-progress.txt +114 -0
  20. package/dashboard/app.js +699 -66
  21. package/dashboard/chart.min.js +20 -0
  22. package/dashboard/dashboard-data.js +764 -0
  23. package/dashboard/dashboard-data.json +182 -71
  24. package/dashboard/index.html +139 -14
  25. package/dashboard/styles.css +579 -4
  26. package/dist/analyzers/patterns.d.ts +62 -0
  27. package/dist/analyzers/patterns.d.ts.map +1 -0
  28. package/dist/analyzers/patterns.js +103 -0
  29. package/dist/analyzers/patterns.js.map +1 -0
  30. package/dist/analyzers/quality.d.ts +58 -0
  31. package/dist/analyzers/quality.d.ts.map +1 -0
  32. package/dist/analyzers/quality.js +114 -0
  33. package/dist/analyzers/quality.js.map +1 -0
  34. package/dist/analyzers/sessions.d.ts +45 -0
  35. package/dist/analyzers/sessions.d.ts.map +1 -0
  36. package/dist/analyzers/sessions.js +123 -0
  37. package/dist/analyzers/sessions.js.map +1 -0
  38. package/dist/cli.js +5 -1
  39. package/dist/cli.js.map +1 -1
  40. package/dist/commands/analyze.d.ts.map +1 -1
  41. package/dist/commands/analyze.js +43 -2
  42. package/dist/commands/analyze.js.map +1 -1
  43. package/dist/commands/dashboard.js +4 -1
  44. package/dist/commands/dashboard.js.map +1 -1
  45. package/dist/commands/forensics.d.ts +29 -0
  46. package/dist/commands/forensics.d.ts.map +1 -0
  47. package/dist/commands/forensics.js +213 -0
  48. package/dist/commands/forensics.js.map +1 -0
  49. package/dist/commands/index.d.ts +5 -1
  50. package/dist/commands/index.d.ts.map +1 -1
  51. package/dist/commands/index.js +13 -3
  52. package/dist/commands/index.js.map +1 -1
  53. package/dist/commands/insights.d.ts +3 -0
  54. package/dist/commands/insights.d.ts.map +1 -0
  55. package/dist/commands/insights.js +120 -0
  56. package/dist/commands/insights.js.map +1 -0
  57. package/dist/commands/learn.d.ts +3 -0
  58. package/dist/commands/learn.d.ts.map +1 -0
  59. package/dist/commands/learn.js +161 -0
  60. package/dist/commands/learn.js.map +1 -0
  61. package/dist/commands/lesson.d.ts +8 -0
  62. package/dist/commands/lesson.d.ts.map +1 -0
  63. package/dist/commands/lesson.js +206 -0
  64. package/dist/commands/lesson.js.map +1 -0
  65. package/dist/commands/pipeline.d.ts +3 -0
  66. package/dist/commands/pipeline.d.ts.map +1 -0
  67. package/dist/commands/pipeline.js +485 -0
  68. package/dist/commands/pipeline.js.map +1 -0
  69. package/dist/commands/profile.d.ts +0 -1
  70. package/dist/commands/profile.d.ts.map +1 -1
  71. package/dist/commands/profile.js +3 -206
  72. package/dist/commands/profile.js.map +1 -1
  73. package/dist/commands/session.d.ts +51 -0
  74. package/dist/commands/session.d.ts.map +1 -0
  75. package/dist/commands/session.js +599 -0
  76. package/dist/commands/session.js.map +1 -0
  77. package/dist/commands/sessions.d.ts +20 -0
  78. package/dist/commands/sessions.d.ts.map +1 -0
  79. package/dist/commands/sessions.js +201 -0
  80. package/dist/commands/sessions.js.map +1 -0
  81. package/dist/commands/watch.d.ts.map +1 -1
  82. package/dist/commands/watch.js +48 -7
  83. package/dist/commands/watch.js.map +1 -1
  84. package/dist/gamification/index.d.ts +1 -3
  85. package/dist/gamification/index.d.ts.map +1 -1
  86. package/dist/gamification/index.js +2 -5
  87. package/dist/gamification/index.js.map +1 -1
  88. package/dist/gamification/pattern-memory.d.ts +1 -1
  89. package/dist/gamification/pattern-memory.d.ts.map +1 -1
  90. package/dist/gamification/pattern-memory.js.map +1 -1
  91. package/dist/gamification/profile.d.ts +2 -2
  92. package/dist/gamification/profile.d.ts.map +1 -1
  93. package/dist/gamification/profile.js +2 -15
  94. package/dist/gamification/profile.js.map +1 -1
  95. package/dist/gamification/types.d.ts +8 -2
  96. package/dist/gamification/types.d.ts.map +1 -1
  97. package/dist/gamification/types.js.map +1 -1
  98. package/dist/insights/index.d.ts.map +1 -1
  99. package/dist/insights/index.js +16 -4
  100. package/dist/insights/index.js.map +1 -1
  101. package/dist/insights/types.d.ts +14 -0
  102. package/dist/insights/types.d.ts.map +1 -1
  103. package/dist/learning/cadence.d.ts +15 -0
  104. package/dist/learning/cadence.d.ts.map +1 -0
  105. package/dist/learning/cadence.js +130 -0
  106. package/dist/learning/cadence.js.map +1 -0
  107. package/dist/learning/index.d.ts +19 -0
  108. package/dist/learning/index.d.ts.map +1 -0
  109. package/dist/learning/index.js +35 -0
  110. package/dist/learning/index.js.map +1 -0
  111. package/dist/learning/lessons-storage.d.ts +48 -0
  112. package/dist/learning/lessons-storage.d.ts.map +1 -0
  113. package/dist/learning/lessons-storage.js +266 -0
  114. package/dist/learning/lessons-storage.js.map +1 -0
  115. package/dist/learning/lessons-types.d.ts +83 -0
  116. package/dist/learning/lessons-types.d.ts.map +1 -0
  117. package/dist/learning/lessons-types.js +15 -0
  118. package/dist/learning/lessons-types.js.map +1 -0
  119. package/dist/learning/nudges.d.ts +20 -0
  120. package/dist/learning/nudges.d.ts.map +1 -0
  121. package/dist/learning/nudges.js +68 -0
  122. package/dist/learning/nudges.js.map +1 -0
  123. package/dist/learning/retrospective.d.ts +27 -0
  124. package/dist/learning/retrospective.d.ts.map +1 -0
  125. package/dist/learning/retrospective.js +184 -0
  126. package/dist/learning/retrospective.js.map +1 -0
  127. package/dist/learning/storage.d.ts +44 -0
  128. package/dist/learning/storage.d.ts.map +1 -0
  129. package/dist/learning/storage.js +194 -0
  130. package/dist/learning/storage.js.map +1 -0
  131. package/dist/learning/surfacing.d.ts +36 -0
  132. package/dist/learning/surfacing.d.ts.map +1 -0
  133. package/dist/learning/surfacing.js +255 -0
  134. package/dist/learning/surfacing.js.map +1 -0
  135. package/dist/learning/synthesis.d.ts +17 -0
  136. package/dist/learning/synthesis.d.ts.map +1 -0
  137. package/dist/learning/synthesis.js +293 -0
  138. package/dist/learning/synthesis.js.map +1 -0
  139. package/dist/learning/types.d.ts +60 -0
  140. package/dist/learning/types.d.ts.map +1 -0
  141. package/dist/learning/types.js +17 -0
  142. package/dist/learning/types.js.map +1 -0
  143. package/dist/storage/index.d.ts +1 -0
  144. package/dist/storage/index.d.ts.map +1 -1
  145. package/dist/storage/index.js +11 -1
  146. package/dist/storage/index.js.map +1 -1
  147. package/dist/storage/spiral-history.d.ts +62 -0
  148. package/dist/storage/spiral-history.d.ts.map +1 -0
  149. package/dist/storage/spiral-history.js +265 -0
  150. package/dist/storage/spiral-history.js.map +1 -0
  151. package/docs/ARCHITECTURE.md +2 -10
  152. package/docs/GAMIFICATION.md +19 -266
  153. package/docs/METRICS.md +528 -0
  154. package/docs/VIBE-ECOSYSTEM.md +12 -78
  155. package/feature-list.json +141 -68
  156. package/package.json +1 -1
@@ -0,0 +1,493 @@
1
+ # vibe-check Enhancement Proposal
2
+
3
+ **Package:** @boshu2/vibe-check v1.7.0
4
+ **Purpose:** Add git forensics capabilities proven in release-engineering retrospective
5
+ **Date:** December 5, 2025
6
+
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ Three proven algorithms from the release-engineering retrospective (475 commits, 60 days) should be integrated into vibe-check as new features:
12
+
13
+ 1. **Git Forensics** - Repository analysis with pattern detection
14
+ 2. **Session Detection** - Work session identification (90-min threshold)
15
+ 3. **Era Evolution** - Track transformation phases over time
16
+
17
+ **Impact:** Transform vibe-check from real-time monitor → comprehensive retrospective tool
18
+
19
+ ---
20
+
21
+ ## Enhancement #1: Git Forensics Mode
22
+
23
+ ### Command
24
+ ```bash
25
+ npx @boshu2/vibe-check forensics [--since DATE] [--format json|markdown]
26
+ ```
27
+
28
+ ### What It Does
29
+ Analyzes git history to detect failure patterns and calculate quality metrics.
30
+
31
+ ### Outputs
32
+ ```json
33
+ {
34
+ "analysis_period": "2025-10-04 to 2025-12-05",
35
+ "total_commits": 475,
36
+ "patterns_detected": {
37
+ "debug_spirals": {
38
+ "count": 14,
39
+ "duration_minutes": 58.7,
40
+ "dates": ["2025-10-04"],
41
+ "commits": ["7b07068", "bb685a2", ...]
42
+ },
43
+ "vague_commits": {
44
+ "count": 282,
45
+ "percentage": 59.4,
46
+ "threshold": 20,
47
+ "examples": ["ci", "v3", "blah", "take 2"]
48
+ },
49
+ "context_amnesia": {
50
+ "scopes": [
51
+ {"name": "ci", "visits": 10},
52
+ {"name": "automation", "visits": 9},
53
+ {"name": "pipelines", "visits": 8}
54
+ ]
55
+ }
56
+ },
57
+ "quality_metrics": {
58
+ "conventional_commits": 28.6,
59
+ "descriptive_quality": 30.7,
60
+ "vague_quality": 59.4
61
+ },
62
+ "recommendation": "sweep",
63
+ "sweep_targets": ["lib/common.sh", "harmonize.sh", "scaffold.sh"]
64
+ }
65
+ ```
66
+
67
+ ### Implementation Algorithm
68
+
69
+ ```python
70
+ # Pseudocode from release-engineering analysis
71
+ def git_forensics(since_date):
72
+ # Extract commits
73
+ commits = git_log(format="%H|%h|%an|%ae|%ai|%at|%s", since=since_date)
74
+
75
+ # Parse each commit
76
+ parsed = []
77
+ for commit in commits:
78
+ hash, short, author, email, date_iso, timestamp, subject = commit.split('|')
79
+
80
+ # Detect patterns
81
+ is_take = re.match(r'^take [0-9]+$', subject)
82
+ is_vague = len(subject) < 20
83
+ is_conventional = re.match(r'^(feat|fix|docs|test|refactor|chore)', subject)
84
+
85
+ parsed.append({
86
+ 'hash': short,
87
+ 'subject': subject,
88
+ 'is_take': is_take,
89
+ 'is_vague': is_vague,
90
+ 'is_conventional': is_conventional,
91
+ 'timestamp': int(timestamp)
92
+ })
93
+
94
+ # Detect debug spirals
95
+ take_commits = [c for c in parsed if c['is_take']]
96
+ if len(take_commits) >= 3:
97
+ first = min(take_commits, key=lambda c: c['timestamp'])
98
+ last = max(take_commits, key=lambda c: c['timestamp'])
99
+ duration_min = (last['timestamp'] - first['timestamp']) / 60
100
+
101
+ patterns['debug_spirals'] = {
102
+ 'count': len(take_commits),
103
+ 'duration_minutes': duration_min
104
+ }
105
+
106
+ # Calculate quality metrics
107
+ total = len(parsed)
108
+ vague_count = len([c for c in parsed if c['is_vague']])
109
+ conventional_count = len([c for c in parsed if c['is_conventional']])
110
+
111
+ quality_metrics = {
112
+ 'conventional_commits': 100 * conventional_count / total,
113
+ 'vague_quality': 100 * vague_count / total
114
+ }
115
+
116
+ # Recommendation
117
+ if vague_count > total * 0.5 or len(take_commits) > 0:
118
+ recommendation = 'sweep'
119
+
120
+ return {
121
+ 'patterns_detected': patterns,
122
+ 'quality_metrics': quality_metrics,
123
+ 'recommendation': recommendation
124
+ }
125
+ ```
126
+
127
+ ### Files to Create
128
+ - `src/commands/forensics.js` - Main command
129
+ - `src/analyzers/patterns.js` - Pattern detection
130
+ - `src/analyzers/quality.js` - Quality metrics
131
+
132
+ ---
133
+
134
+ ## Enhancement #2: Session Detection
135
+
136
+ ### Command
137
+ ```bash
138
+ npx @boshu2/vibe-check sessions [--threshold MINUTES] [--format json]
139
+ ```
140
+
141
+ ### What It Does
142
+ Identifies work sessions from git history using configurable time gap threshold.
143
+
144
+ ### Output
145
+ ```json
146
+ {
147
+ "total_sessions": 46,
148
+ "total_commits": 475,
149
+ "avg_commits_per_session": 10.3,
150
+ "avg_duration_minutes": 79.4,
151
+ "median_duration_minutes": 33.1,
152
+ "longest_session_minutes": 413.2,
153
+ "sessions": [
154
+ {
155
+ "session_id": 1,
156
+ "start_date": "2025-10-04 11:59:47",
157
+ "end_date": "2025-10-04 16:53:29",
158
+ "duration_minutes": 293.7,
159
+ "num_commits": 50,
160
+ "commits": ["c83fea9", "de59b1c", ...]
161
+ }
162
+ ]
163
+ }
164
+ ```
165
+
166
+ ### Implementation Algorithm
167
+
168
+ ```python
169
+ # Proven algorithm from release-engineering
170
+ def detect_sessions(commits, gap_threshold=90):
171
+ """
172
+ Detect work sessions using time gap between commits.
173
+
174
+ Args:
175
+ commits: List of commits sorted by timestamp
176
+ gap_threshold: Minutes between commits to start new session (default: 90)
177
+
178
+ Returns:
179
+ List of sessions with metadata
180
+ """
181
+ SESSION_GAP = gap_threshold * 60 # Convert to seconds
182
+ sessions = []
183
+ current_session = []
184
+
185
+ for commit in sorted(commits, key=lambda c: c['timestamp']):
186
+ if not current_session:
187
+ current_session = [commit]
188
+ elif commit['timestamp'] - current_session[-1]['timestamp'] > SESSION_GAP:
189
+ # Gap exceeded, save current session and start new
190
+ sessions.append({
191
+ 'start': current_session[0],
192
+ 'end': current_session[-1],
193
+ 'commits': current_session,
194
+ 'duration_min': (current_session[-1]['timestamp'] - current_session[0]['timestamp']) / 60
195
+ })
196
+ current_session = [commit]
197
+ else:
198
+ current_session.append(commit)
199
+
200
+ # Don't forget last session
201
+ if current_session:
202
+ sessions.append({
203
+ 'start': current_session[0],
204
+ 'end': current_session[-1],
205
+ 'commits': current_session,
206
+ 'duration_min': (current_session[-1]['timestamp'] - current_session[0]['timestamp']) / 60
207
+ })
208
+
209
+ return sessions
210
+ ```
211
+
212
+ ### Use Cases
213
+ - Productivity analysis (session duration trends)
214
+ - Work pattern identification (when do you work best?)
215
+ - Break analysis (gap between sessions)
216
+ - Integration with time tracking tools
217
+
218
+ ### Files to Create
219
+ - `src/commands/sessions.js` - Main command
220
+ - `src/analyzers/sessions.js` - Session detection algorithm
221
+
222
+ ---
223
+
224
+ ## Enhancement #3: Era Evolution Tracking
225
+
226
+ ### Command
227
+ ```bash
228
+ npx @boshu2/vibe-check evolution [--eras CONFIG] [--format json]
229
+ ```
230
+
231
+ ### What It Does
232
+ Classifies commits into user-defined eras and tracks quality evolution over time.
233
+
234
+ ### Configuration
235
+ ```json
236
+ {
237
+ "eras": [
238
+ {
239
+ "name": "genesis",
240
+ "start": "2025-10-04",
241
+ "end": "2025-10-05",
242
+ "description": "Initial chaos"
243
+ },
244
+ {
245
+ "name": "transformation",
246
+ "start": "2025-11-18",
247
+ "end": "2025-12-02",
248
+ "description": "Post-sweep discipline"
249
+ }
250
+ ]
251
+ }
252
+ ```
253
+
254
+ ### Output
255
+ ```json
256
+ {
257
+ "eras": [
258
+ {
259
+ "name": "genesis",
260
+ "commits": 154,
261
+ "sessions": 6,
262
+ "metrics": {
263
+ "conventional": 0.0,
264
+ "vague": 97.4,
265
+ "velocity": 10.79,
266
+ "rework_ratio": 6.5,
267
+ "debug_spirals": 14
268
+ }
269
+ },
270
+ {
271
+ "name": "transformation",
272
+ "commits": 63,
273
+ "sessions": 10,
274
+ "metrics": {
275
+ "conventional": 85.7,
276
+ "vague": 0.0,
277
+ "velocity": 6.97,
278
+ "rework_ratio": 25.4,
279
+ "debug_spirals": 0
280
+ }
281
+ }
282
+ ],
283
+ "transformation_summary": {
284
+ "conventional": "+85.7%",
285
+ "vague": "-97.4%",
286
+ "debug_spirals": "-14"
287
+ }
288
+ }
289
+ ```
290
+
291
+ ### Implementation Algorithm
292
+
293
+ ```python
294
+ # Era classification from release-engineering
295
+ def classify_eras(commits, era_config):
296
+ """
297
+ Classify commits into eras and calculate per-era metrics.
298
+
299
+ Args:
300
+ commits: List of parsed commits
301
+ era_config: Era definitions with start/end dates
302
+
303
+ Returns:
304
+ Metrics grouped by era
305
+ """
306
+ commits_by_era = defaultdict(list)
307
+
308
+ for commit in commits:
309
+ commit_date = commit['date_iso'].split()[0]
310
+
311
+ # Find matching era
312
+ for era in era_config:
313
+ if era['start'] <= commit_date <= era['end']:
314
+ commits_by_era[era['name']].append(commit)
315
+ break
316
+
317
+ # Calculate metrics per era
318
+ results = []
319
+ for era_name, era_commits in commits_by_era.items():
320
+ total = len(era_commits)
321
+
322
+ metrics = {
323
+ 'conventional': 100 * sum(1 for c in era_commits if c['is_conventional']) / total,
324
+ 'vague': 100 * sum(1 for c in era_commits if c['is_vague']) / total,
325
+ 'debug_spirals': sum(1 for c in era_commits if c['is_take'])
326
+ }
327
+
328
+ results.append({
329
+ 'name': era_name,
330
+ 'commits': total,
331
+ 'metrics': metrics
332
+ })
333
+
334
+ return results
335
+ ```
336
+
337
+ ### Use Cases
338
+ - Transformation stories (before/after)
339
+ - Quarterly reviews (Q1, Q2, Q3, Q4)
340
+ - Migration tracking (pre-refactor, during, post)
341
+ - Team onboarding impact (before new dev, after)
342
+
343
+ ### Files to Create
344
+ - `src/commands/evolution.js` - Main command
345
+ - `src/analyzers/eras.js` - Era classification
346
+ - `src/config/eras.schema.json` - Era config validation
347
+
348
+ ---
349
+
350
+ ## Integration Points
351
+
352
+ ### Current vibe-check Commands
353
+ ```bash
354
+ vibe-check analyze # Real-time metrics for current session
355
+ vibe-check history # Historical trend analysis
356
+ ```
357
+
358
+ ### New Commands (Proposed)
359
+ ```bash
360
+ vibe-check forensics # Git history pattern detection
361
+ vibe-check sessions # Work session analysis
362
+ vibe-check evolution # Era-based transformation tracking
363
+ vibe-check sweep-check # Quick check: is sweep needed?
364
+ ```
365
+
366
+ ### sweep-check Integration
367
+ ```bash
368
+ npx @boshu2/vibe-check sweep-check
369
+
370
+ # Combines forensics + pattern detection + recommendation
371
+ # Output:
372
+ ⚠️ Sweep recommended
373
+ Detected patterns:
374
+ - 12 vague commits (threshold: >5)
375
+ - 2 debug spirals
376
+ - Context amnesia: ci (10 visits), automation (9 visits)
377
+
378
+ Targets for sweep:
379
+ - lib/common.sh (0% test coverage, 8 vague commits)
380
+ - harmonize.sh (no tests, spiral detected)
381
+
382
+ Run: npx @boshu2/vibe-check sweep --target lib/common.sh
383
+ ```
384
+
385
+ ---
386
+
387
+ ## Implementation Priority
388
+
389
+ ### Phase 1: Core Forensics (MVP)
390
+ - [ ] Git log parsing
391
+ - [ ] Pattern detection (vague commits, debug spirals)
392
+ - [ ] Basic quality metrics
393
+ - [ ] JSON output
394
+ - **Estimate:** 2-3 days
395
+
396
+ ### Phase 2: Sessions & Evolution
397
+ - [ ] Session detection algorithm
398
+ - [ ] Era classification
399
+ - [ ] Comparative metrics
400
+ - [ ] Markdown/Terminal output
401
+ - **Estimate:** 2-3 days
402
+
403
+ ### Phase 3: Integration
404
+ - [ ] sweep-check convenience command
405
+ - [ ] Integration with existing analyze command
406
+ - [ ] Historical storage
407
+ - [ ] Dashboard visualization
408
+ - **Estimate:** 2-3 days
409
+
410
+ ---
411
+
412
+ ## Testing Strategy
413
+
414
+ ### Unit Tests
415
+ ```javascript
416
+ describe('forensics', () => {
417
+ it('detects debug spirals from take N pattern', () => {
418
+ const commits = [
419
+ { subject: 'take 2', timestamp: 1000 },
420
+ { subject: 'take 3', timestamp: 1300 },
421
+ { subject: 'take 4', timestamp: 1600 }
422
+ ];
423
+ const patterns = detectPatterns(commits);
424
+ expect(patterns.debug_spirals.count).toBe(3);
425
+ expect(patterns.debug_spirals.duration_minutes).toBe(10);
426
+ });
427
+
428
+ it('detects vague commits', () => {
429
+ const commits = [
430
+ { subject: 'ci' },
431
+ { subject: 'v3' },
432
+ { subject: 'feat: proper commit message' }
433
+ ];
434
+ const quality = calculateQuality(commits);
435
+ expect(quality.vague_percentage).toBe(66.7);
436
+ });
437
+ });
438
+ ```
439
+
440
+ ### Integration Tests
441
+ - Test against real repositories (release-engineering as reference)
442
+ - Validate against known metrics (475 commits → 46 sessions)
443
+ - Compare with manual analysis
444
+
445
+ ---
446
+
447
+ ## Reference Implementation
448
+
449
+ All algorithms proven in:
450
+ - **Repository:** release-engineering (475 commits analyzed)
451
+ - **Files:** `/tmp/full_parse.py`, `/tmp/detect_sessions.py`, `/tmp/calc_vibe_metrics.py`
452
+ - **Story:** `THE-RELEASE-ENGINEERING-STORY.md`
453
+
454
+ **Results:**
455
+ - Successfully detected 14 debug spirals
456
+ - Calculated metrics across 5 eras
457
+ - Identified 46 work sessions
458
+ - Proved transformation: 97.4% vague → 0%
459
+
460
+ ---
461
+
462
+ ## Benefits
463
+
464
+ **For Individual Developers:**
465
+ - Understand your coding patterns
466
+ - Identify when you're most productive
467
+ - Catch failure patterns before they compound
468
+
469
+ **For Teams:**
470
+ - Track transformation progress
471
+ - Identify training needs
472
+ - Celebrate improvements with data
473
+
474
+ **For Organizations:**
475
+ - Prove ROI of process improvements
476
+ - Benchmark across projects
477
+ - Make data-driven decisions
478
+
479
+ ---
480
+
481
+ ## Next Steps
482
+
483
+ 1. **Validate approach** with vibe-check maintainers
484
+ 2. **Create GitHub issue** with this proposal
485
+ 3. **Implement Phase 1** (forensics MVP)
486
+ 4. **Get community feedback** on UX
487
+ 5. **Iterate** based on real-world usage
488
+
489
+ ---
490
+
491
+ **Contact:** Boden Fuller (boden.fuller@gdit.com)
492
+ **Reference:** release-engineering retrospective (Dec 5, 2025)
493
+ **Tags:** `#vibe-check` `#git-forensics` `#enhancement-proposal`
@@ -0,0 +1,152 @@
1
+ # TypeScript Code Review Skill
2
+
3
+ **Trigger:** User asks for TypeScript review, type safety audit, or TS best practices check.
4
+
5
+ **Purpose:** Systematic TypeScript code review focusing on type safety, patterns, and idiomatic usage.
6
+
7
+ ---
8
+
9
+ ## Review Checklist
10
+
11
+ ### 1. Compiler Configuration (tsconfig.json)
12
+
13
+ | Setting | Recommended | Why |
14
+ |---------|-------------|-----|
15
+ | `strict` | `true` | Enables all strict checks |
16
+ | `noImplicitAny` | `true` (via strict) | No silent `any` types |
17
+ | `strictNullChecks` | `true` (via strict) | Catch null/undefined errors |
18
+ | `noUncheckedIndexedAccess` | `true` | Arrays return `T \| undefined` |
19
+ | `exactOptionalPropertyTypes` | `true` | Distinguish `undefined` vs missing |
20
+ | `noImplicitReturns` | `true` | All code paths must return |
21
+ | `noFallthroughCasesInSwitch` | `true` | Prevent switch fallthrough bugs |
22
+
23
+ ### 2. Type Safety Issues
24
+
25
+ **Critical (fix immediately):**
26
+ - [ ] Explicit `any` types
27
+ - [ ] Type assertions without validation (`as Type`)
28
+ - [ ] Non-null assertions (`!`) without checks
29
+ - [ ] `@ts-ignore` or `@ts-expect-error` comments
30
+ - [ ] Missing return types on exported functions
31
+
32
+ **Warning (improve when possible):**
33
+ - [ ] Implicit `any` in callbacks
34
+ - [ ] Overly broad types (`object`, `{}`, `Function`)
35
+ - [ ] Missing generics where reuse is possible
36
+ - [ ] Type assertions that could be type guards
37
+
38
+ ### 3. Type Design Patterns
39
+
40
+ **Good patterns to look for:**
41
+ ```typescript
42
+ // Discriminated unions
43
+ type Result<T> =
44
+ | { success: true; data: T }
45
+ | { success: false; error: string };
46
+
47
+ // Branded types for IDs
48
+ type UserId = string & { readonly brand: unique symbol };
49
+
50
+ // Const assertions for literals
51
+ const STATUSES = ['pending', 'active', 'done'] as const;
52
+ type Status = typeof STATUSES[number];
53
+
54
+ // Type guards
55
+ function isUser(obj: unknown): obj is User {
56
+ return typeof obj === 'object' && obj !== null && 'id' in obj;
57
+ }
58
+ ```
59
+
60
+ **Anti-patterns to flag:**
61
+ ```typescript
62
+ // ❌ Stringly-typed
63
+ function setStatus(status: string) { }
64
+
65
+ // ✅ Union type
66
+ function setStatus(status: 'pending' | 'active' | 'done') { }
67
+
68
+ // ❌ Optional chaining hiding bugs
69
+ const name = user?.profile?.name ?? 'Unknown';
70
+
71
+ // ✅ Explicit null handling
72
+ if (!user || !user.profile) {
73
+ throw new Error('User profile required');
74
+ }
75
+ const name = user.profile.name;
76
+ ```
77
+
78
+ ### 4. Interface vs Type
79
+
80
+ | Use Interface | Use Type |
81
+ |---------------|----------|
82
+ | Object shapes | Unions, intersections |
83
+ | Extendable contracts | Computed types |
84
+ | Class implementations | Mapped types |
85
+ | Public API | Internal aliases |
86
+
87
+ ### 5. Export Hygiene
88
+
89
+ - [ ] Are internal types exported unnecessarily?
90
+ - [ ] Is there a central `types.ts` for shared types?
91
+ - [ ] Are re-exports organized (`index.ts` barrels)?
92
+
93
+ ---
94
+
95
+ ## Review Process
96
+
97
+ 1. **Check tsconfig.json** - Verify strict settings
98
+ 2. **Run `tsc --noEmit`** - Catch all compiler errors
99
+ 3. **Search for anti-patterns:**
100
+ ```bash
101
+ grep -r ": any" src/
102
+ grep -r "as " src/ | grep -v "import"
103
+ grep -r "@ts-ignore" src/
104
+ grep -r "!" src/ | grep -v "!=" | grep -v "!=="
105
+ ```
106
+ 4. **Review types.ts** - Check type design
107
+ 5. **Sample 3-5 files** - Deep review patterns
108
+
109
+ ---
110
+
111
+ ## Output Format
112
+
113
+ ```markdown
114
+ ## TypeScript Review: [Project Name]
115
+
116
+ ### Config Score: X/10
117
+ [tsconfig.json findings]
118
+
119
+ ### Type Safety Score: X/10
120
+ [Anti-pattern counts and examples]
121
+
122
+ ### Type Design Score: X/10
123
+ [Pattern quality assessment]
124
+
125
+ ### Top Issues
126
+ 1. [Most critical issue]
127
+ 2. [Second issue]
128
+ 3. [Third issue]
129
+
130
+ ### Recommendations
131
+ - [ ] [Actionable fix 1]
132
+ - [ ] [Actionable fix 2]
133
+ - [ ] [Actionable fix 3]
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Quick Fixes
139
+
140
+ ```bash
141
+ # Find all `any` types
142
+ grep -rn ": any" src/
143
+
144
+ # Find type assertions
145
+ grep -rn " as [A-Z]" src/
146
+
147
+ # Find non-null assertions
148
+ grep -rn "\![^=]" src/
149
+
150
+ # Run strict type check
151
+ npx tsc --noEmit --strict
152
+ ```
package/CHANGELOG.md CHANGED
@@ -5,6 +5,59 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ## [1.8.0] - 2025-12-05
11
+
12
+ ### Added
13
+
14
+ - **Git Forensics** - `vibe-check forensics` command for deep pattern analysis (VIBE-045)
15
+ - Detects debug spirals ("take N" patterns indicating fix-retry loops)
16
+ - Detects vague commits (<20 characters)
17
+ - Detects context amnesia (repeatedly revisiting same scope)
18
+ - Quality metrics: conventional commit %, descriptive commit %
19
+ - Recommendations: sweep, maintain, or celebrate
20
+ - **Session Detection** - `vibe-check sessions` command for work session analysis (VIBE-046)
21
+ - Identifies sessions from commit timestamps (90-minute gap threshold)
22
+ - Session statistics: avg duration, commits per session, longest/shortest
23
+ - Proven algorithm from release-engineering retrospective
24
+ - **Brand Assets** - Professional logo and visual identity
25
+ - SVG logo with spiral-to-checkmark concept
26
+ - Light and dark mode variants
27
+ - Tagline: "catch the spiral before it catches you"
28
+ - **Actionable Coaching** - Personalized coaching based on your spiral history
29
+ - `vibe-check insights` - View your spiral patterns and what works for you
30
+ - Watch mode shows personalized alerts
31
+ - Session end shows coaching for spirals hit during the session
32
+ - All spirals auto-recorded to `~/.vibe-check/spiral-history.ndjson`
33
+
34
+ ### Changed
35
+
36
+ - **README Redesign** - Modern visual flow inspired by top npm packages
37
+ - Centered hero section with logo and badges
38
+ - Progressive disclosure structure
39
+ - Cleaner section organization with horizontal rules
40
+ - Scannable tables instead of prose
41
+ - **Security Policy Updated** - Added forensics and sessions to threat model
42
+
43
+ ## [1.7.0] - 2025-12-02
44
+
45
+ ### Added
46
+ - **Session Integration** - New `vibe-check session` command suite for Claude Code integration
47
+ - `session start` - Capture baseline metrics at session start
48
+ - `session end` - Get session metrics with failure pattern detection
49
+ - `session status` - Show active session info
50
+ - JSON output compatible with `claude-progress.json` format
51
+ - Automatic failure pattern detection (Debug Spiral, Context Amnesia, Velocity Crash, Trust Erosion, Flow Disruption)
52
+ - Auto-generated learnings based on metrics and patterns
53
+ - Baseline comparison with last 7 days
54
+
55
+ ### Changed
56
+ - Major cleanup: removed 20 files, -3900 lines of speculative features
57
+ - Removed learning system (zero adoption evidence)
58
+ - Removed advanced gamification (challenges, prestige, leaderboards)
59
+ - Simplified to core value: metrics, coaching, insights
60
+
8
61
  ## [1.6.0] - 2025-11-30
9
62
 
10
63
  ### Added