@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
package/CLAUDE.md CHANGED
@@ -72,7 +72,37 @@ Most users have `^` (caret) in their package.json, meaning they'll auto-update t
72
72
 
73
73
  ## Development Workflow
74
74
 
75
- ### Running Locally
75
+ ### Makefile Commands
76
+
77
+ All commands are available via `make`. Run `make help` for full list.
78
+
79
+ ```bash
80
+ # Build & Run
81
+ make build # Compile TypeScript
82
+ make dev # Run with ts-node
83
+ make test # Run all tests
84
+ make test-coverage # Tests with coverage
85
+
86
+ # Vibe-Check
87
+ make dashboard # Open visual dashboard
88
+ make analyze # Analyze last week
89
+ make profile # Show XP, streaks, achievements
90
+ make watch # Real-time spiral detection
91
+
92
+ # Session Integration
93
+ make session-start # Start session (prompts for level)
94
+ make session-end # End session and get metrics
95
+ make session-status # Show active session info
96
+
97
+ # Publishing
98
+ make publish # Build, test, publish to npm
99
+ make version-patch # Bump patch version
100
+ make version-minor # Bump minor version
101
+ ```
102
+
103
+ See [Makefile](./Makefile) for all available targets.
104
+
105
+ ### Running Locally (npm)
76
106
 
77
107
  ```bash
78
108
  npm run dev # Run with ts-node
@@ -110,8 +140,17 @@ src/
110
140
  ├── commands/
111
141
  │ ├── index.ts # Command exports
112
142
  │ ├── analyze.ts # Main analyze command
113
- │ ├── level.ts # Level recommendation command
143
+ │ ├── session.ts # Session start/end/status + coaching
144
+ │ ├── dashboard.ts # Visual dashboard command
145
+ │ ├── watch.ts # Real-time monitoring + coaching
146
+ │ ├── insights.ts # Spiral patterns + recommendations
147
+ │ ├── timeline.ts # Session history
114
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
115
154
  ├── metrics/
116
155
  │ ├── index.ts # Orchestrates all metrics
117
156
  │ ├── velocity.ts # Iteration velocity
@@ -129,7 +168,10 @@ src/
129
168
  │ ├── xp.ts # XP calculation and levels
130
169
  │ ├── streaks.ts # Daily/weekly streak tracking
131
170
  │ ├── achievements.ts # Achievement definitions and checks
171
+ │ ├── stats.ts # Weekly statistics
132
172
  │ └── profile.ts # Profile persistence (.vibe-check/)
173
+ ├── sessions/
174
+ │ └── index.ts # Session tracking and baseline comparison
133
175
  ├── calibration/
134
176
  │ ├── index.ts # Calibration orchestration
135
177
  │ ├── ece.ts # Expected calibration error
@@ -152,9 +194,14 @@ dashboard/ # Static HTML dashboard
152
194
  ├── app.js # Dashboard JavaScript
153
195
  └── styles.css # Dashboard styles
154
196
 
155
- .vibe-check/ # Local profile data (per-repo)
197
+ ~/.vibe-check/ # Global profile data (in home dir)
156
198
  ├── profile.json # XP, streaks, achievements
199
+ ├── spiral-history.ndjson # Spiral log for coaching
157
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
158
205
  ```
159
206
 
160
207
  ## Commands
@@ -180,6 +227,33 @@ vibe-check level # Get level recommendation
180
227
  vibe-check level --calibrate 3 # Record calibration sample
181
228
  ```
182
229
 
230
+ ### Session Commands (AgentOps Integration)
231
+ ```bash
232
+ vibe-check session start --level 3 # Start session, capture baseline
233
+ vibe-check session status # Show active session
234
+ vibe-check session end --format json # End session, get metrics + coaching
235
+ ```
236
+
237
+ Output includes failure pattern detection and personalized coaching:
238
+ ```json
239
+ {
240
+ "metrics": { "trust_pass_rate": 92, "rework_ratio": 11, ... },
241
+ "retro": {
242
+ "failure_patterns_hit": [],
243
+ "failure_patterns_avoided": ["Debug Spiral", "Context Amnesia"]
244
+ }
245
+ }
246
+ ```
247
+
248
+ ### Insights Command (Coaching)
249
+ ```bash
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
+ ```
254
+
255
+ Shows your spiral history, patterns by frequency, what resolutions worked, and personalized recommendations.
256
+
183
257
  ## The 5 Metrics
184
258
 
185
259
  | Metric | Measures | Threshold |
@@ -200,3 +274,5 @@ A "debug spiral" is detected when 3+ consecutive fix commits target the same com
200
274
  - `SSL_TLS` - Certificate problems
201
275
  - `IMAGE_REGISTRY` - Container pull issues
202
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 ADDED
@@ -0,0 +1,160 @@
1
+ # vibe-check Makefile
2
+ # All npm commands and development shortcuts
3
+
4
+ .PHONY: help build dev start test test-coverage lint clean install publish dashboard watch profile analyze session-start session-end
5
+
6
+ # Default target
7
+ help:
8
+ @echo "vibe-check Development Commands"
9
+ @echo "================================"
10
+ @echo ""
11
+ @echo "Build & Run:"
12
+ @echo " make build - Compile TypeScript to dist/"
13
+ @echo " make dev - Run with ts-node (no compile)"
14
+ @echo " make start - Run compiled version"
15
+ @echo " make clean - Remove dist/ directory"
16
+ @echo ""
17
+ @echo "Testing:"
18
+ @echo " make test - Run all tests"
19
+ @echo " make test-coverage - Run tests with coverage report"
20
+ @echo " make test-watch - Run tests in watch mode"
21
+ @echo ""
22
+ @echo "Publishing:"
23
+ @echo " make install - Install dependencies"
24
+ @echo " make publish - Build, test, and publish to npm"
25
+ @echo " make version-patch - Bump patch version (1.0.x)"
26
+ @echo " make version-minor - Bump minor version (1.x.0)"
27
+ @echo " make version-major - Bump major version (x.0.0)"
28
+ @echo ""
29
+ @echo "Vibe-Check Commands:"
30
+ @echo " make dashboard - Open visual dashboard"
31
+ @echo " make watch - Real-time spiral detection"
32
+ @echo " make profile - Show XP, streaks, achievements"
33
+ @echo " make analyze - Analyze last week"
34
+ @echo " make analyze-today - Analyze today only"
35
+ @echo " make timeline - Show coding timeline"
36
+ @echo ""
37
+ @echo "Session Commands:"
38
+ @echo " make session-start - Start session (prompts for level)"
39
+ @echo " make session-end - End session and get metrics"
40
+ @echo " make session-status - Show active session info"
41
+ @echo ""
42
+
43
+ # ============================================
44
+ # Build & Run
45
+ # ============================================
46
+
47
+ build:
48
+ npm run build
49
+
50
+ dev:
51
+ npm run dev
52
+
53
+ start:
54
+ npm run start
55
+
56
+ clean:
57
+ rm -rf dist/
58
+
59
+ # ============================================
60
+ # Testing
61
+ # ============================================
62
+
63
+ test:
64
+ npm test
65
+
66
+ test-coverage:
67
+ npm run test:coverage
68
+
69
+ test-watch:
70
+ npx vitest watch
71
+
72
+ # ============================================
73
+ # Publishing
74
+ # ============================================
75
+
76
+ install:
77
+ npm install
78
+
79
+ publish: build test
80
+ npm publish --access=public
81
+
82
+ version-patch:
83
+ npm version patch
84
+
85
+ version-minor:
86
+ npm version minor
87
+
88
+ version-major:
89
+ npm version major
90
+
91
+ # ============================================
92
+ # Vibe-Check Commands
93
+ # ============================================
94
+
95
+ dashboard:
96
+ node dist/cli.js dashboard
97
+
98
+ watch:
99
+ node dist/cli.js watch
100
+
101
+ profile:
102
+ node dist/cli.js profile
103
+
104
+ analyze:
105
+ node dist/cli.js --since "1 week ago" --score
106
+
107
+ analyze-today:
108
+ node dist/cli.js --since "today" --score
109
+
110
+ analyze-json:
111
+ node dist/cli.js --since "1 week ago" --score --format json
112
+
113
+ timeline:
114
+ node dist/cli.js timeline --since "1 week ago"
115
+
116
+ timeline-expand:
117
+ node dist/cli.js timeline --since "1 week ago" --expand
118
+
119
+ # ============================================
120
+ # Session Commands
121
+ # ============================================
122
+
123
+ session-start:
124
+ @read -p "Vibe Level (0-5): " level; \
125
+ node dist/cli.js session start --level $$level
126
+
127
+ session-start-json:
128
+ @read -p "Vibe Level (0-5): " level; \
129
+ node dist/cli.js session start --level $$level --format json
130
+
131
+ session-end:
132
+ node dist/cli.js session end
133
+
134
+ session-end-json:
135
+ node dist/cli.js session end --format json
136
+
137
+ session-status:
138
+ node dist/cli.js session status
139
+
140
+ # ============================================
141
+ # Shortcuts
142
+ # ============================================
143
+
144
+ # Quick check (alias for analyze)
145
+ check: analyze
146
+
147
+ # Full analysis with all features
148
+ full:
149
+ node dist/cli.js --since "1 week ago" --score --verbose
150
+
151
+ # Export dashboard data without opening browser
152
+ export-dashboard:
153
+ node dist/cli.js dashboard --no-open
154
+
155
+ # Cache management
156
+ cache-stats:
157
+ node dist/cli.js cache --stats
158
+
159
+ cache-clear:
160
+ node dist/cli.js cache --clear
package/README.md CHANGED
@@ -1,232 +1,215 @@
1
- # vibe-check
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/boshu2/vibe-check/main/assets/logo.svg" alt="vibe-check" width="400">
3
+ </p>
2
4
 
3
- [![npm version](https://img.shields.io/npm/v/@boshu2/vibe-check.svg)](https://www.npmjs.com/package/@boshu2/vibe-check)
4
- [![CI](https://github.com/boshu2/vibe-check/actions/workflows/ci.yml/badge.svg)](https://github.com/boshu2/vibe-check/actions/workflows/ci.yml)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ <p align="center">
6
+ <strong>Catch the debug spiral before it catches you.</strong>
7
+ </p>
6
8
 
7
- ![Vibe-Check Dashboard](docs/images/dashboard.png)
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/@boshu2/vibe-check"><img src="https://img.shields.io/npm/v/@boshu2/vibe-check.svg?style=flat-square" alt="npm version"></a>
11
+ <a href="https://www.npmjs.com/package/@boshu2/vibe-check"><img src="https://img.shields.io/npm/dm/@boshu2/vibe-check.svg?style=flat-square" alt="downloads"></a>
12
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" alt="license"></a>
13
+ </p>
8
14
 
9
- **Git-powered metrics for AI-assisted coding.** Catch debug spirals before they catch you.
15
+ <p align="center">
16
+ Git-powered metrics for AI-assisted development.<br>
17
+ Detects the failure patterns from <a href="https://itrevolution.com/product/vibe-coding-book/"><em>Vibe Coding</em></a> (Gene Kim & Steve Yegge, 2025).
18
+ </p>
19
+
20
+ ---
10
21
 
11
22
  ```bash
12
- npx @boshu2/vibe-check --since "2 hours ago"
23
+ npx @boshu2/vibe-check
13
24
  ```
14
25
 
15
- ```
16
- ╭──────────────────────────────────────────────────────────────╮
17
- │ VIBE-CHECK Nov 30, 2025 │
18
- ├──────────────────────────────────────────────────────────────┤
19
- │ │
20
- │ Rating: ELITE ✨ │
21
- │ │
22
- │ Trust Pass Rate ████████████████████ 95% ELITE │
23
- │ Rework Ratio ████░░░░░░░░░░░░░░░░ 18% ELITE │
24
- │ Debug Spirals None detected ELITE │
25
- │ │
26
- │ You're in the zone. Ship it. │
27
- │ │
28
- ╰──────────────────────────────────────────────────────────────╯
29
- ```
26
+ <p align="center">
27
+ <img src="https://raw.githubusercontent.com/boshu2/vibe-check/main/assets/demo.gif" alt="vibe-check demo" width="600">
28
+ </p>
30
29
 
31
30
  ---
32
31
 
33
- ## Dashboard
32
+ ## The Problem
34
33
 
35
- ```bash
36
- vibe-check dashboard
37
- ```
34
+ > "AI can destroy months of work in minutes." — Gene Kim & Steve Yegge
38
35
 
39
- Opens the dashboard above in your browser. Features:
40
- - 📊 Score trend charts with 7/30/90 day views
41
- - 🎯 AI-generated insights about your coding patterns
42
- - 🏆 Achievement tracking (19 achievements, 2 hidden)
43
- - 📈 Session history and ratings distribution
44
- - 🌙 GitHub dark theme
36
+ AI-assisted coding creates a new failure mode: **the debug spiral**.
45
37
 
46
- ---
38
+ You ask AI for a fix. It breaks something else. You ask for another fix. It breaks more. Three commits later, you've lost 30 minutes and made negative progress.
47
39
 
48
- ## Install
40
+ **vibe-check detects these spirals by analyzing your git history.**
49
41
 
50
- ```bash
51
- npm install -g @boshu2/vibe-check
52
- ```
42
+ ---
53
43
 
54
44
  ## Quick Start
55
45
 
56
46
  ```bash
57
47
  # Analyze recent work
58
- vibe-check --since "1 week ago"
48
+ npx @boshu2/vibe-check --since "1 week ago"
59
49
 
60
50
  # Real-time spiral detection
61
- vibe-check watch
51
+ npx @boshu2/vibe-check watch
62
52
 
63
53
  # Visual dashboard
64
- vibe-check dashboard
65
-
66
- # View your profile & achievements
67
- vibe-check profile
54
+ npx @boshu2/vibe-check dashboard
68
55
  ```
69
56
 
70
57
  ---
71
58
 
72
- ## Watch Mode
59
+ ## What It Measures
73
60
 
74
- Catch spirals **as they happen**, not after:
61
+ | Metric | Question | Target |
62
+ |--------|----------|--------|
63
+ | **Trust Pass Rate** | Does the code stick? | >95% |
64
+ | **Rework Ratio** | Building or debugging? | <30% |
65
+ | **Debug Spirals** | Are you stuck? | 0 active |
75
66
 
76
- ```bash
77
- vibe-check watch
78
- ```
67
+ ### Detection Patterns
68
+
69
+ | Pattern | Severity | What It Means |
70
+ |---------|----------|---------------|
71
+ | **Tests Passing Lie** | HIGH | AI claims tests pass, but they don't |
72
+ | **Instruction Drift** | MEDIUM | AI gradually moves off-target |
73
+ | **Debug Loop Spiral** | HIGH | 3+ fix commits on same component |
74
+ | **Context Amnesia** | MEDIUM | Repeated fixes, forgotten solutions |
75
+
76
+ ---
77
+
78
+ ## Watch Mode
79
+
80
+ Catches spirals **as they form** with personalized coaching:
79
81
 
80
82
  ```
81
83
  VIBE-CHECK WATCH MODE
82
- Monitoring: ~/projects/my-app
83
- ────────────────────────────────────────────────────────
84
+ ────────────────────────────────────────────────
84
85
 
85
86
  09:15 fix(auth): handle token refresh
86
87
  09:18 fix(auth): add retry logic
87
88
  09:22 fix(auth): increase timeout
88
89
 
89
- ⚠️ SPIRAL DETECTED
90
- ┌────────────────────────────────────────────────────┐
91
- │ Component: auth │
92
- │ Fixes: 3 commits over 7 minutes │
93
- │ │
94
- │ 💡 Consider: │
95
- │ • Step back and write a test │
96
- │ • Check the docs or ask for help │
97
- │ • Take a 5-minute break │
98
- └────────────────────────────────────────────────────┘
99
-
100
- ────────────────────────────────────────────────────────
90
+ ⚠️ SPIRAL FORMING
91
+ auth component, 3 fixes, 7 min
92
+
93
+ Your history: 4 auth spirals, avg 18 min
94
+ What worked: wrote a test (3x), took a break (1x)
95
+
96
+ Write a test before your next fix attempt.
97
+
98
+ ────────────────────────────────────────────────
101
99
  ```
102
100
 
103
- ---
101
+ Watch mode learns from your history and suggests what's worked before.
104
102
 
105
- ## Gamification
103
+ ---
106
104
 
107
- Level up your coding with XP, streaks, and achievements:
105
+ ## Install
108
106
 
109
107
  ```bash
110
- vibe-check profile
108
+ npm install -g @boshu2/vibe-check
111
109
  ```
112
110
 
113
- ```
114
- ╭─────────────────────────────────────────────────────╮
115
- │ │
116
- │ 🏔️ Level 6 Grandmaster │
117
- │ ████████████████░░░░░░░░ 2140 / 5000 XP │
118
- │ │
119
- │ 🔥 12 day streak (longest: 14) │
120
- │ 🏆 8/19 achievements unlocked │
121
- │ │
122
- │ Recent Unlocks: │
123
- │ ✨ Elite Vibes 🧘 Zen Master 📊 Regular │
124
- │ │
125
- ╰─────────────────────────────────────────────────────╯
126
- ```
111
+ Or use directly with `npx`:
127
112
 
128
- **19 achievements** including 2 hidden ones. Can you find them?
113
+ ```bash
114
+ npx @boshu2/vibe-check --since "2 hours ago"
115
+ ```
129
116
 
130
117
  ---
131
118
 
132
- ## The Metrics
119
+ ## Commands
133
120
 
134
- | Metric | What It Measures | 🟢 Elite | 🔴 Needs Work |
135
- |--------|------------------|----------|---------------|
136
- | **Trust Pass Rate** | % commits without immediate fix | >95% | <80% |
137
- | **Rework Ratio** | % commits that are fixes | <30% | >50% |
138
- | **Debug Spiral** | Stuck in fix loops? | 0 | 3+ |
121
+ ### Core Analysis
139
122
 
140
- ---
123
+ ```bash
124
+ vibe-check # Analyze git history
125
+ vibe-check watch # Real-time spiral monitoring
126
+ vibe-check dashboard # Visual dashboard
127
+ vibe-check timeline # View coding journey
128
+ vibe-check forensics # Deep pattern analysis
129
+ ```
130
+
131
+ ### Sessions
141
132
 
142
- ## Vibe Levels
133
+ ```bash
134
+ vibe-check start --level 3 # Quick session start
135
+ vibe-check session start # Interactive session start
136
+ vibe-check session end # End with metrics
137
+ vibe-check session status # Check active session
138
+ ```
143
139
 
144
- Declare your trust level before starting work:
140
+ ### Profile & Insights
145
141
 
146
142
  ```bash
147
- vibe-check start --level 3
148
- # ... code ...
149
- vibe-check --since "1 hour ago"
143
+ vibe-check profile # XP and achievements
144
+ vibe-check insights # Your spiral patterns
150
145
  ```
151
146
 
152
- | Level | Name | Trust | Use For |
153
- |-------|------|-------|---------|
154
- | **5** | Full Auto | 95% | Formatting, linting |
155
- | **4** | High Trust | 80% | Boilerplate, CRUD |
156
- | **3** | Balanced | 60% | Features, tests |
157
- | **2** | Careful | 40% | Integrations, APIs |
158
- | **1** | Skeptical | 20% | Architecture, security |
159
- | **0** | Manual | 0% | Novel research |
147
+ ### Tools
148
+
149
+ ```bash
150
+ vibe-check cache status # Cache statistics
151
+ vibe-check cache clear # Clear cache
152
+ vibe-check init-hook # Install pre-push hook
153
+ vibe-check pipeline # Audit CI/CD safety
154
+ ```
160
155
 
161
156
  ---
162
157
 
163
- ## Git Hook
158
+ ## Session Integration
164
159
 
165
- Auto-run before every push:
160
+ Integrate with Claude Code or other AI dev tools:
166
161
 
167
162
  ```bash
168
- vibe-check init-hook # Install hook
169
- vibe-check init-hook --block-low # Block LOW pushes
170
- ```
163
+ # Start session
164
+ vibe-check session start --level 3
171
165
 
172
- ---
166
+ # End session - get JSON for logging
167
+ vibe-check session end --format json
168
+ ```
173
169
 
174
- ## GitHub Action
175
-
176
- ```yaml
177
- name: Vibe Check
178
- on: [pull_request]
179
-
180
- jobs:
181
- vibe:
182
- runs-on: ubuntu-latest
183
- steps:
184
- - uses: actions/checkout@v4
185
- with:
186
- fetch-depth: 0
187
- - uses: boshu2/vibe-check@v1
188
- with:
189
- github-token: ${{ secrets.GITHUB_TOKEN }}
170
+ ```json
171
+ {
172
+ "metrics": { "trust_pass_rate": 92, "rework_ratio": 18 },
173
+ "retro": {
174
+ "failure_patterns_hit": [],
175
+ "failure_patterns_avoided": ["Debug Spiral", "Context Amnesia"]
176
+ }
177
+ }
190
178
  ```
191
179
 
192
180
  ---
193
181
 
194
- ## All Commands
182
+ ## The Ecosystem
195
183
 
196
- ```
197
- vibe-check [options] Analyze git history
198
- vibe-check watch Real-time spiral detection
199
- vibe-check dashboard Visual dashboard + insights
200
- vibe-check profile XP, streaks, achievements
201
- vibe-check timeline Coding journey visualization
202
- vibe-check start --level <n> Declare vibe level (0-5)
203
- vibe-check intervene Record spiral intervention
204
- vibe-check init-hook Install git hook
205
- vibe-check cache Manage local storage
206
- ```
184
+ vibe-check implements **Factor V (Measurement)** from [12-Factor AgentOps](https://github.com/boshu2/12-factor-agentops):
207
185
 
208
- **Options:**
209
- ```
210
- --since <date> Start date ("1 week ago", "2024-01-01")
211
- --until <date> End date (default: now)
212
- --score Include VibeScore calculation
213
- --simple Compact output
214
- --format <type> terminal | json | markdown
215
- --output <file> Save JSON to file
216
- --verbose Detailed output
186
+ ```text
187
+ BUILD → WORK → RUN
188
+ 12-Factor Agents Vibe Coding 12-Factor AgentOps
189
+ (HumanLayer) (Gene & Steve) (Operations)
190
+
191
+ vibe-check
192
+ (Measurement)
217
193
  ```
218
194
 
195
+ | Factor | What vibe-check Provides |
196
+ |--------|-------------------------|
197
+ | **IV: Validation Gates** | Pre-commit hooks, CI integration |
198
+ | **V: Measurement** | Quantified feedback loop |
199
+ | **VII: Smart Routing** | Spiral detection triggers intervention |
200
+ | **XI: Fail-Safe Checks** | Pattern detection for all 12 failures |
201
+
219
202
  ---
220
203
 
221
204
  ## Philosophy
222
205
 
223
- **vibe-check is a mirror, not a judge.**
206
+ vibe-check is a mirror, not a judge.
224
207
 
225
- Use it for self-reflection. Catch your own patterns. Improve your own flow.
208
+ It answers one question: *are you building, or are you spiraling?*
226
209
 
227
- It's not a productivity metric. It's not for performance reviews. It's not measuring AI effectiveness.
210
+ Use it for self-reflection. Catch your own patterns. Improve your own flow.
228
211
 
229
- It's just asking: *are you building, or are you spiraling?*
212
+ It's not a productivity metric. It's not for performance reviews.
230
213
 
231
214
  ---
232
215
 
@@ -235,13 +218,16 @@ It's just asking: *are you building, or are you spiraling?*
235
218
  - Node.js >= 20.0.0
236
219
  - Git repository with commits
237
220
 
238
- ## Docs
221
+ ---
222
+
223
+ ## Learn More
239
224
 
240
- - [Vibe-Coding Ecosystem](docs/VIBE-ECOSYSTEM.md) - Full methodology
241
- - [Architecture](docs/ARCHITECTURE.md) - Codebase structure
242
- - [Gamification](docs/GAMIFICATION.md) - XP & achievements deep dive
243
- - [Metrics Explained](docs/METRICS-EXPLAINED.md) - How it works
244
- - [Changelog](CHANGELOG.md) - Version history
225
+ - [Vibe-Coding Ecosystem](docs/VIBE-ECOSYSTEM.md) Full methodology, all features
226
+ - [Vibe Coding Book](https://itrevolution.com/product/vibe-coding-book/) Gene Kim & Steve Yegge (2025)
227
+ - [12-Factor AgentOps](https://github.com/boshu2/12-factor-agentops) Operational framework
228
+ - [12-Factor Agents](https://github.com/humanlayer/12-factor-agents) Engineering patterns (HumanLayer)
229
+
230
+ ---
245
231
 
246
232
  ## License
247
233
 
@@ -250,5 +236,5 @@ MIT
250
236
  ---
251
237
 
252
238
  <p align="center">
253
- <i>Built for developers who vibe with AI</i>
239
+ <em>Built for developers who work with AI.</em>
254
240
  </p>