@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.
- package/.agents/bundles/actionable-coaching-plan-2025-12-02.md +209 -0
- package/.agents/bundles/automatic-learning-cadence-plan-2025-12-02.md +1297 -0
- package/.agents/bundles/automatic-learning-cadence-research-2025-12-02.md +481 -0
- package/.agents/bundles/dashboard-data-quality-plan.md +458 -0
- package/.agents/bundles/rating-scoring-alignment-plan.md +427 -0
- package/.agents/bundles/rpi-session-capture-plan-2025-12-02.md +693 -0
- package/.agents/bundles/rpi-session-capture-research-2025-12-02.md +433 -0
- package/.agents/bundles/session-integration-plan-2025-12-02.md +144 -0
- package/.agents/plans/git-forensics-enhancement-2025-12-05.md +493 -0
- package/.claude/skills/typescript-review.md +152 -0
- package/CHANGELOG.md +53 -0
- package/CLAUDE.md +79 -3
- package/Makefile +160 -0
- package/README.md +141 -155
- package/SECURITY.md +5 -1
- package/assets/logo-dark.svg +47 -0
- package/assets/logo.svg +47 -0
- package/claude-progress.json +54 -4
- package/claude-progress.txt +114 -0
- package/dashboard/app.js +699 -66
- package/dashboard/chart.min.js +20 -0
- package/dashboard/dashboard-data.js +764 -0
- package/dashboard/dashboard-data.json +182 -71
- package/dashboard/index.html +139 -14
- package/dashboard/styles.css +579 -4
- package/dist/analyzers/patterns.d.ts +62 -0
- package/dist/analyzers/patterns.d.ts.map +1 -0
- package/dist/analyzers/patterns.js +103 -0
- package/dist/analyzers/patterns.js.map +1 -0
- package/dist/analyzers/quality.d.ts +58 -0
- package/dist/analyzers/quality.d.ts.map +1 -0
- package/dist/analyzers/quality.js +114 -0
- package/dist/analyzers/quality.js.map +1 -0
- package/dist/analyzers/sessions.d.ts +45 -0
- package/dist/analyzers/sessions.d.ts.map +1 -0
- package/dist/analyzers/sessions.js +123 -0
- package/dist/analyzers/sessions.js.map +1 -0
- package/dist/cli.js +5 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +43 -2
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/dashboard.js +4 -1
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/forensics.d.ts +29 -0
- package/dist/commands/forensics.d.ts.map +1 -0
- package/dist/commands/forensics.js +213 -0
- package/dist/commands/forensics.js.map +1 -0
- package/dist/commands/index.d.ts +5 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +13 -3
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/insights.d.ts +3 -0
- package/dist/commands/insights.d.ts.map +1 -0
- package/dist/commands/insights.js +120 -0
- package/dist/commands/insights.js.map +1 -0
- package/dist/commands/learn.d.ts +3 -0
- package/dist/commands/learn.d.ts.map +1 -0
- package/dist/commands/learn.js +161 -0
- package/dist/commands/learn.js.map +1 -0
- package/dist/commands/lesson.d.ts +8 -0
- package/dist/commands/lesson.d.ts.map +1 -0
- package/dist/commands/lesson.js +206 -0
- package/dist/commands/lesson.js.map +1 -0
- package/dist/commands/pipeline.d.ts +3 -0
- package/dist/commands/pipeline.d.ts.map +1 -0
- package/dist/commands/pipeline.js +485 -0
- package/dist/commands/pipeline.js.map +1 -0
- package/dist/commands/profile.d.ts +0 -1
- package/dist/commands/profile.d.ts.map +1 -1
- package/dist/commands/profile.js +3 -206
- package/dist/commands/profile.js.map +1 -1
- package/dist/commands/session.d.ts +51 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +599 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/sessions.d.ts +20 -0
- package/dist/commands/sessions.d.ts.map +1 -0
- package/dist/commands/sessions.js +201 -0
- package/dist/commands/sessions.js.map +1 -0
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +48 -7
- package/dist/commands/watch.js.map +1 -1
- package/dist/gamification/index.d.ts +1 -3
- package/dist/gamification/index.d.ts.map +1 -1
- package/dist/gamification/index.js +2 -5
- package/dist/gamification/index.js.map +1 -1
- package/dist/gamification/pattern-memory.d.ts +1 -1
- package/dist/gamification/pattern-memory.d.ts.map +1 -1
- package/dist/gamification/pattern-memory.js.map +1 -1
- package/dist/gamification/profile.d.ts +2 -2
- package/dist/gamification/profile.d.ts.map +1 -1
- package/dist/gamification/profile.js +2 -15
- package/dist/gamification/profile.js.map +1 -1
- package/dist/gamification/types.d.ts +8 -2
- package/dist/gamification/types.d.ts.map +1 -1
- package/dist/gamification/types.js.map +1 -1
- package/dist/insights/index.d.ts.map +1 -1
- package/dist/insights/index.js +16 -4
- package/dist/insights/index.js.map +1 -1
- package/dist/insights/types.d.ts +14 -0
- package/dist/insights/types.d.ts.map +1 -1
- package/dist/learning/cadence.d.ts +15 -0
- package/dist/learning/cadence.d.ts.map +1 -0
- package/dist/learning/cadence.js +130 -0
- package/dist/learning/cadence.js.map +1 -0
- package/dist/learning/index.d.ts +19 -0
- package/dist/learning/index.d.ts.map +1 -0
- package/dist/learning/index.js +35 -0
- package/dist/learning/index.js.map +1 -0
- package/dist/learning/lessons-storage.d.ts +48 -0
- package/dist/learning/lessons-storage.d.ts.map +1 -0
- package/dist/learning/lessons-storage.js +266 -0
- package/dist/learning/lessons-storage.js.map +1 -0
- package/dist/learning/lessons-types.d.ts +83 -0
- package/dist/learning/lessons-types.d.ts.map +1 -0
- package/dist/learning/lessons-types.js +15 -0
- package/dist/learning/lessons-types.js.map +1 -0
- package/dist/learning/nudges.d.ts +20 -0
- package/dist/learning/nudges.d.ts.map +1 -0
- package/dist/learning/nudges.js +68 -0
- package/dist/learning/nudges.js.map +1 -0
- package/dist/learning/retrospective.d.ts +27 -0
- package/dist/learning/retrospective.d.ts.map +1 -0
- package/dist/learning/retrospective.js +184 -0
- package/dist/learning/retrospective.js.map +1 -0
- package/dist/learning/storage.d.ts +44 -0
- package/dist/learning/storage.d.ts.map +1 -0
- package/dist/learning/storage.js +194 -0
- package/dist/learning/storage.js.map +1 -0
- package/dist/learning/surfacing.d.ts +36 -0
- package/dist/learning/surfacing.d.ts.map +1 -0
- package/dist/learning/surfacing.js +255 -0
- package/dist/learning/surfacing.js.map +1 -0
- package/dist/learning/synthesis.d.ts +17 -0
- package/dist/learning/synthesis.d.ts.map +1 -0
- package/dist/learning/synthesis.js +293 -0
- package/dist/learning/synthesis.js.map +1 -0
- package/dist/learning/types.d.ts +60 -0
- package/dist/learning/types.d.ts.map +1 -0
- package/dist/learning/types.js +17 -0
- package/dist/learning/types.js.map +1 -0
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +11 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/spiral-history.d.ts +62 -0
- package/dist/storage/spiral-history.d.ts.map +1 -0
- package/dist/storage/spiral-history.js +265 -0
- package/dist/storage/spiral-history.js.map +1 -0
- package/docs/ARCHITECTURE.md +2 -10
- package/docs/GAMIFICATION.md +19 -266
- package/docs/METRICS.md +528 -0
- package/docs/VIBE-ECOSYSTEM.md +12 -78
- package/feature-list.json +141 -68
- package/package.json +1 -1
package/docs/METRICS.md
ADDED
|
@@ -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/docs/VIBE-ECOSYSTEM.md
CHANGED
|
@@ -82,7 +82,7 @@ vibe-check start --level 3
|
|
|
82
82
|
|
|
83
83
|
---
|
|
84
84
|
|
|
85
|
-
## Feature Overview (v1.
|
|
85
|
+
## Feature Overview (v1.7.0)
|
|
86
86
|
|
|
87
87
|
### 1. Metrics Engine
|
|
88
88
|
|
|
@@ -125,47 +125,17 @@ Monitors commits and alerts when patterns indicate a spiral forming:
|
|
|
125
125
|
Fixes: 3 commits, 7 min
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
### 3.
|
|
128
|
+
### 3. Session Integration
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
VS YOUR BASELINE
|
|
134
|
-
|
|
135
|
-
Trust: 92% (+7% vs avg 85%)
|
|
136
|
-
Rework: 18% (-4% vs avg 22%)
|
|
137
|
-
|
|
138
|
-
Better than your usual - nice flow!
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### 4. Pattern Memory
|
|
142
|
-
|
|
143
|
-
Tracks what triggers YOUR spirals over time:
|
|
130
|
+
Track sessions with baseline comparison:
|
|
144
131
|
|
|
145
132
|
```bash
|
|
146
|
-
vibe-check
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
YOUR SPIRAL TRIGGERS
|
|
151
|
-
|
|
152
|
-
Component Times Pattern
|
|
153
|
-
auth 5 OAuth/token/refresh issues
|
|
154
|
-
database 3 Connection pooling
|
|
155
|
-
api 2 External API timeouts
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### 5. Intervention Tracking
|
|
159
|
-
|
|
160
|
-
Records what breaks your spirals:
|
|
161
|
-
|
|
133
|
+
vibe-check session start --level 3 # Start session
|
|
134
|
+
vibe-check session status # Check active session
|
|
135
|
+
vibe-check session end --format json # End and get metrics
|
|
162
136
|
```
|
|
163
|
-
WHAT WORKS FOR YOU
|
|
164
137
|
|
|
165
|
-
|
|
166
|
-
Write test first 3 times
|
|
167
|
-
Read docs 2 times
|
|
168
|
-
```
|
|
138
|
+
Output includes failure pattern detection for AgentOps integration.
|
|
169
139
|
|
|
170
140
|
---
|
|
171
141
|
|
|
@@ -203,18 +173,6 @@ Daily check-ins build streaks with visual progression:
|
|
|
203
173
|
|
|
204
174
|
Streak freezes protect against occasional missed days.
|
|
205
175
|
|
|
206
|
-
### Weekly Challenges
|
|
207
|
-
|
|
208
|
-
Auto-generated based on your weak metrics:
|
|
209
|
-
|
|
210
|
-
```
|
|
211
|
-
WEEKLY CHALLENGES
|
|
212
|
-
|
|
213
|
-
🎯 Trust Gauntlet: ████████░░ 4/5 (90%+ trust in 5 sessions)
|
|
214
|
-
🧘 Zen Mode: ██████████ ✓ COMPLETE (+100 XP)
|
|
215
|
-
🔥 Streak Builder: ██░░░░░░░░ 1/5 (extend streak by 5 days)
|
|
216
|
-
```
|
|
217
|
-
|
|
218
176
|
### Achievements (19 total)
|
|
219
177
|
|
|
220
178
|
Categories:
|
|
@@ -224,29 +182,6 @@ Categories:
|
|
|
224
182
|
- **Improvement**: Comeback Kid, On Fire
|
|
225
183
|
- **Special**: Night Owl, Early Bird, Weekend Warrior
|
|
226
184
|
|
|
227
|
-
### Rank Badges
|
|
228
|
-
|
|
229
|
-
```
|
|
230
|
-
🥉 Bronze (10+ sessions)
|
|
231
|
-
🥈 Silver (50+ sessions)
|
|
232
|
-
🥇 Gold (100+ sessions)
|
|
233
|
-
💎 Platinum (14+ day streak)
|
|
234
|
-
🔷 Diamond (5000+ XP)
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Local Leaderboards & Hall of Fame
|
|
238
|
-
|
|
239
|
-
Track your personal bests across all repos:
|
|
240
|
-
|
|
241
|
-
```
|
|
242
|
-
🏛️ HALL OF FAME
|
|
243
|
-
|
|
244
|
-
🏆 Best Score: 96% (Nov 15, my-project)
|
|
245
|
-
🔥 Longest Streak: 15 days
|
|
246
|
-
⚡ Best Week: 847 XP
|
|
247
|
-
📊 Most Commits: 127 (Nov 10, big-refactor)
|
|
248
|
-
```
|
|
249
|
-
|
|
250
185
|
---
|
|
251
186
|
|
|
252
187
|
## Integration Points
|
|
@@ -364,13 +299,12 @@ The VibeScore combines metrics using validated weights derived from empirical an
|
|
|
364
299
|
| Phase | Status | Description |
|
|
365
300
|
|-------|--------|-------------|
|
|
366
301
|
| CLI Core | ✅ Complete | Metrics, scoring, analysis |
|
|
367
|
-
| Gamification | ✅ Complete | XP, streaks, achievements
|
|
302
|
+
| Gamification | ✅ Complete | XP, streaks, achievements |
|
|
368
303
|
| Watch Mode | ✅ Complete | Real-time spiral detection |
|
|
369
304
|
| GitHub Action | ✅ Complete | Automated PR feedback |
|
|
370
|
-
|
|
|
371
|
-
|
|
|
305
|
+
| Session Integration | ✅ Complete | AgentOps integration |
|
|
306
|
+
| Visual Dashboard | ✅ Complete | HTML dashboard with charts |
|
|
372
307
|
| VS Code Extension | 🔮 Planned | Status bar, live alerts |
|
|
373
|
-
| Team Features | 🔮 Planned | Opt-in leaderboards |
|
|
374
308
|
|
|
375
309
|
---
|
|
376
310
|
|
|
@@ -402,5 +336,5 @@ vibe-check watch
|
|
|
402
336
|
|
|
403
337
|
*"The goal isn't perfect metrics. It's conscious awareness of your patterns."*
|
|
404
338
|
|
|
405
|
-
**Version:** 1.
|
|
406
|
-
**Last Updated:** 2025-
|
|
339
|
+
**Version:** 1.7.0
|
|
340
|
+
**Last Updated:** 2025-12-02
|