@boshu2/vibe-check 1.7.0 → 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 (72) hide show
  1. package/.agents/bundles/actionable-coaching-plan-2025-12-02.md +209 -0
  2. package/.agents/plans/git-forensics-enhancement-2025-12-05.md +493 -0
  3. package/.claude/skills/typescript-review.md +152 -0
  4. package/CHANGELOG.md +41 -5
  5. package/CLAUDE.md +27 -23
  6. package/Makefile +0 -13
  7. package/README.md +126 -173
  8. package/SECURITY.md +5 -1
  9. package/assets/logo-dark.svg +47 -0
  10. package/assets/logo.svg +47 -0
  11. package/claude-progress.json +28 -7
  12. package/claude-progress.txt +48 -0
  13. package/dist/analyzers/patterns.d.ts +62 -0
  14. package/dist/analyzers/patterns.d.ts.map +1 -0
  15. package/dist/analyzers/patterns.js +103 -0
  16. package/dist/analyzers/patterns.js.map +1 -0
  17. package/dist/analyzers/quality.d.ts +58 -0
  18. package/dist/analyzers/quality.d.ts.map +1 -0
  19. package/dist/analyzers/quality.js +114 -0
  20. package/dist/analyzers/quality.js.map +1 -0
  21. package/dist/analyzers/sessions.d.ts +45 -0
  22. package/dist/analyzers/sessions.d.ts.map +1 -0
  23. package/dist/analyzers/sessions.js +123 -0
  24. package/dist/analyzers/sessions.js.map +1 -0
  25. package/dist/cli.js +4 -0
  26. package/dist/cli.js.map +1 -1
  27. package/dist/commands/analyze.d.ts.map +1 -1
  28. package/dist/commands/analyze.js +5 -0
  29. package/dist/commands/analyze.js.map +1 -1
  30. package/dist/commands/forensics.d.ts +29 -0
  31. package/dist/commands/forensics.d.ts.map +1 -0
  32. package/dist/commands/forensics.js +213 -0
  33. package/dist/commands/forensics.js.map +1 -0
  34. package/dist/commands/index.d.ts +4 -0
  35. package/dist/commands/index.d.ts.map +1 -1
  36. package/dist/commands/index.js +11 -1
  37. package/dist/commands/index.js.map +1 -1
  38. package/dist/commands/insights.d.ts +3 -0
  39. package/dist/commands/insights.d.ts.map +1 -0
  40. package/dist/commands/insights.js +120 -0
  41. package/dist/commands/insights.js.map +1 -0
  42. package/dist/commands/pipeline.d.ts +3 -0
  43. package/dist/commands/pipeline.d.ts.map +1 -0
  44. package/dist/commands/pipeline.js +485 -0
  45. package/dist/commands/pipeline.js.map +1 -0
  46. package/dist/commands/profile.d.ts +0 -1
  47. package/dist/commands/profile.d.ts.map +1 -1
  48. package/dist/commands/profile.js +0 -4
  49. package/dist/commands/profile.js.map +1 -1
  50. package/dist/commands/session.d.ts.map +1 -1
  51. package/dist/commands/session.js +38 -0
  52. package/dist/commands/session.js.map +1 -1
  53. package/dist/commands/sessions.d.ts +20 -0
  54. package/dist/commands/sessions.d.ts.map +1 -0
  55. package/dist/commands/sessions.js +201 -0
  56. package/dist/commands/sessions.js.map +1 -0
  57. package/dist/commands/watch.d.ts.map +1 -1
  58. package/dist/commands/watch.js +48 -7
  59. package/dist/commands/watch.js.map +1 -1
  60. package/dist/storage/index.d.ts +1 -0
  61. package/dist/storage/index.d.ts.map +1 -1
  62. package/dist/storage/index.js +11 -1
  63. package/dist/storage/index.js.map +1 -1
  64. package/dist/storage/spiral-history.d.ts +62 -0
  65. package/dist/storage/spiral-history.d.ts.map +1 -0
  66. package/dist/storage/spiral-history.js +265 -0
  67. package/dist/storage/spiral-history.js.map +1 -0
  68. package/docs/ARCHITECTURE.md +2 -10
  69. package/docs/GAMIFICATION.md +19 -266
  70. package/docs/VIBE-ECOSYSTEM.md +12 -78
  71. package/feature-list.json +140 -88
  72. package/package.json +1 -1
@@ -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
@@ -7,6 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
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
+
10
45
  ### Added
11
46
  - **Session Integration** - New `vibe-check session` command suite for Claude Code integration
12
47
  - `session start` - Capture baseline metrics at session start
@@ -16,11 +51,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
51
  - Automatic failure pattern detection (Debug Spiral, Context Amnesia, Velocity Crash, Trust Erosion, Flow Disruption)
17
52
  - Auto-generated learnings based on metrics and patterns
18
53
  - Baseline comparison with last 7 days
19
- - **Learning System** - New learning and lessons database
20
- - `learn` command - Extract patterns from sessions
21
- - `lesson` command - Manage synthesized lessons with `--list`, `--stats`, `--apply`, `--dismiss`
22
- - Automatic synthesis from pattern + intervention memory
23
- - Lessons surface during analyze when relevant spirals detected
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
24
60
 
25
61
  ## [1.6.0] - 2025-11-30
26
62
 
package/CLAUDE.md CHANGED
@@ -140,11 +140,17 @@ src/
140
140
  ├── commands/
141
141
  │ ├── index.ts # Command exports
142
142
  │ ├── analyze.ts # Main analyze command
143
- │ ├── session.ts # Session start/end/status commands
143
+ │ ├── session.ts # Session start/end/status + coaching
144
144
  │ ├── dashboard.ts # Visual dashboard command
145
- │ ├── learn.ts # Learning extraction command
146
- │ ├── lesson.ts # Lessons database command
145
+ │ ├── watch.ts # Real-time monitoring + coaching
146
+ │ ├── insights.ts # Spiral patterns + recommendations
147
+ │ ├── timeline.ts # Session history
147
148
  │ └── profile.ts # Profile/stats command
149
+ ├── storage/
150
+ │ ├── spiral-history.ts # Spiral history NDJSON log
151
+ │ ├── atomic.ts # Atomic file operations
152
+ │ ├── commit-log.ts # Commit log storage
153
+ │ └── timeline-store.ts # Timeline cache
148
154
  ├── metrics/
149
155
  │ ├── index.ts # Orchestrates all metrics
150
156
  │ ├── velocity.ts # Iteration velocity
@@ -162,17 +168,8 @@ src/
162
168
  │ ├── xp.ts # XP calculation and levels
163
169
  │ ├── streaks.ts # Daily/weekly streak tracking
164
170
  │ ├── achievements.ts # Achievement definitions and checks
165
- │ ├── pattern-memory.ts # Track spiral triggers over time
166
- │ ├── intervention-memory.ts # Track what breaks spirals
171
+ │ ├── stats.ts # Weekly statistics
167
172
  │ └── profile.ts # Profile persistence (.vibe-check/)
168
- ├── learning/
169
- │ ├── index.ts # Learning system exports
170
- │ ├── types.ts # Learning/lesson types
171
- │ ├── storage.ts # Learnings persistence
172
- │ ├── cadence.ts # Automatic learning cadence
173
- │ ├── synthesis.ts # Lesson synthesis from patterns
174
- │ ├── surfacing.ts # Surface lessons during analyze
175
- │ └── lessons-storage.ts # Lessons database
176
173
  ├── sessions/
177
174
  │ └── index.ts # Session tracking and baseline comparison
178
175
  ├── calibration/
@@ -197,9 +194,14 @@ dashboard/ # Static HTML dashboard
197
194
  ├── app.js # Dashboard JavaScript
198
195
  └── styles.css # Dashboard styles
199
196
 
200
- .vibe-check/ # Local profile data (per-repo)
197
+ ~/.vibe-check/ # Global profile data (in home dir)
201
198
  ├── profile.json # XP, streaks, achievements
199
+ ├── spiral-history.ndjson # Spiral log for coaching
202
200
  └── calibration.json # Calibration samples
201
+
202
+ .vibe-check/ # Local data (per-repo)
203
+ ├── active-session.json # Active session state
204
+ └── timeline.json # Timeline cache
203
205
  ```
204
206
 
205
207
  ## Commands
@@ -229,29 +231,29 @@ vibe-check level --calibrate 3 # Record calibration sample
229
231
  ```bash
230
232
  vibe-check session start --level 3 # Start session, capture baseline
231
233
  vibe-check session status # Show active session
232
- vibe-check session end --format json # End session, get metrics + patterns
234
+ vibe-check session end --format json # End session, get metrics + coaching
233
235
  ```
234
236
 
235
- Output includes failure pattern detection for `/session-end` integration:
237
+ Output includes failure pattern detection and personalized coaching:
236
238
  ```json
237
239
  {
238
240
  "metrics": { "trust_pass_rate": 92, "rework_ratio": 11, ... },
239
241
  "retro": {
240
242
  "failure_patterns_hit": [],
241
- "failure_patterns_avoided": ["Debug Spiral", "Context Amnesia"],
242
- "learnings": ["Test-first approach prevented spirals"]
243
+ "failure_patterns_avoided": ["Debug Spiral", "Context Amnesia"]
243
244
  }
244
245
  }
245
246
  ```
246
247
 
247
- ### Learning Commands
248
+ ### Insights Command (Coaching)
248
249
  ```bash
249
- vibe-check learn # Extract patterns from sessions
250
- vibe-check lesson --list # List synthesized lessons
251
- vibe-check lesson --stats # Lesson statistics
252
- vibe-check lesson --apply <id> # Apply a lesson
250
+ vibe-check insights # Your spiral patterns + what works
251
+ vibe-check insights --days 90 # Longer history
252
+ vibe-check insights --format json # Export for analysis
253
253
  ```
254
254
 
255
+ Shows your spiral history, patterns by frequency, what resolutions worked, and personalized recommendations.
256
+
255
257
  ## The 5 Metrics
256
258
 
257
259
  | Metric | Measures | Threshold |
@@ -272,3 +274,5 @@ A "debug spiral" is detected when 3+ consecutive fix commits target the same com
272
274
  - `SSL_TLS` - Certificate problems
273
275
  - `IMAGE_REGISTRY` - Container pull issues
274
276
  - `GITOPS_DRIFT` - Sync/reconciliation issues
277
+
278
+ **Coaching Integration:** Spirals are automatically recorded to `~/.vibe-check/spiral-history.ndjson`. Watch mode and session end show personalized advice based on what's worked before for you.
package/Makefile CHANGED
@@ -137,19 +137,6 @@ session-end-json:
137
137
  session-status:
138
138
  node dist/cli.js session status
139
139
 
140
- # ============================================
141
- # Learning Commands
142
- # ============================================
143
-
144
- learn:
145
- node dist/cli.js learn
146
-
147
- lessons:
148
- node dist/cli.js lesson --list
149
-
150
- lesson-stats:
151
- node dist/cli.js lesson --stats
152
-
153
140
  # ============================================
154
141
  # Shortcuts
155
142
  # ============================================