@boshu2/vibe-check 1.2.0 → 1.3.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/.claude/settings.local.json +6 -0
- package/README.md +88 -260
- package/SECURITY.md +178 -0
- package/claude-progress.json +44 -0
- package/claude-progress.txt +98 -0
- package/dist/cli.js +2 -6
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze.d.ts +0 -2
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +59 -62
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/init-hook.d.ts.map +1 -1
- package/dist/commands/init-hook.js +6 -2
- package/dist/commands/init-hook.js.map +1 -1
- package/dist/commands/start.d.ts +21 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +139 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/output/json.d.ts.map +1 -1
- package/dist/output/json.js +0 -8
- package/dist/output/json.js.map +1 -1
- package/dist/output/markdown.d.ts.map +1 -1
- package/dist/output/markdown.js +0 -6
- package/dist/output/markdown.js.map +1 -1
- package/dist/output/terminal.d.ts.map +1 -1
- package/dist/output/terminal.js +0 -20
- package/dist/output/terminal.js.map +1 -1
- package/dist/types.d.ts +0 -33
- package/dist/types.d.ts.map +1 -1
- package/feature-list.json +56 -0
- package/hooks/pre-push +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,58 +1,10 @@
|
|
|
1
1
|
# vibe-check
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Quick check: are you building or spiraling?**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Analyzes your git history to tell you if you're making progress or stuck in fix loops.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
You're using AI to write code, but how do you know if it's actually helping?
|
|
10
|
-
|
|
11
|
-
Are you shipping features faster, or just generating more commits? Building new features, or debugging AI mistakes? Moving forward, or stuck in fix-fix-fix loops?
|
|
12
|
-
|
|
13
|
-
Without data, you're guessing.
|
|
14
|
-
|
|
15
|
-
## The Insight
|
|
16
|
-
|
|
17
|
-
vibe-check analyzes your git history and tells you:
|
|
18
|
-
|
|
19
|
-
| What You'll Learn | Why It Matters |
|
|
20
|
-
|-------------------|----------------|
|
|
21
|
-
| **Trust Pass Rate** | Are you accepting AI code that works, or code that breaks immediately? |
|
|
22
|
-
| **Debug Spirals** | Are you stuck in fix loops on the same component? |
|
|
23
|
-
| **Rework Ratio** | What percentage of your work is building vs. cleaning up? |
|
|
24
|
-
| **Pattern Detection** | What types of problems keep recurring? (auth, config, APIs...) |
|
|
25
|
-
|
|
26
|
-
## Quick Demo
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
$ npx @boshu2/vibe-check --since "1 week ago"
|
|
30
|
-
|
|
31
|
-
================================================================
|
|
32
|
-
VIBE-CHECK RESULTS
|
|
33
|
-
================================================================
|
|
34
|
-
Period: Nov 21 - Nov 28, 2025 (12.5h active)
|
|
35
|
-
Commits: 47 total (28 feat, 15 fix, 4 docs)
|
|
36
|
-
|
|
37
|
-
METRIC VALUE RATING
|
|
38
|
-
--------------------------------------------------
|
|
39
|
-
Iteration Velocity 4.2/hr HIGH
|
|
40
|
-
Rework Ratio 35% MEDIUM
|
|
41
|
-
Trust Pass Rate 92% HIGH
|
|
42
|
-
Debug Spiral Duration 18min HIGH
|
|
43
|
-
Flow Efficiency 85% HIGH
|
|
44
|
-
|
|
45
|
-
DEBUG SPIRALS (2 detected):
|
|
46
|
-
- auth: 4 commits, 25m (SECRETS_AUTH)
|
|
47
|
-
- api: 3 commits, 12m (API_MISMATCH)
|
|
48
|
-
|
|
49
|
-
OVERALL: HIGH
|
|
50
|
-
================================================================
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**What this tells you:** You're productive (4.2 commits/hour, 92% trust pass rate), but 35% of your work is fixing things—room to improve. OAuth caused a 25-minute spiral. Next time: validate auth flows with a tracer test before full implementation.
|
|
54
|
-
|
|
55
|
-
## Installation
|
|
7
|
+
## Install
|
|
56
8
|
|
|
57
9
|
```bash
|
|
58
10
|
npm install -g @boshu2/vibe-check
|
|
@@ -64,182 +16,134 @@ Or run directly:
|
|
|
64
16
|
npx @boshu2/vibe-check
|
|
65
17
|
```
|
|
66
18
|
|
|
67
|
-
##
|
|
19
|
+
## Quick Start
|
|
68
20
|
|
|
69
21
|
```bash
|
|
70
|
-
#
|
|
71
|
-
vibe-check
|
|
72
|
-
|
|
73
|
-
# Analyze specific time period
|
|
22
|
+
# Check your recent work
|
|
74
23
|
vibe-check --since "1 week ago"
|
|
75
|
-
vibe-check --since "2025-11-01"
|
|
76
|
-
|
|
77
|
-
# Different output formats
|
|
78
|
-
vibe-check --format json # For CI/automation
|
|
79
|
-
vibe-check --format markdown # For reports
|
|
80
24
|
|
|
81
|
-
#
|
|
82
|
-
vibe-check --
|
|
25
|
+
# Simple one-liner for hooks
|
|
26
|
+
vibe-check --simple
|
|
83
27
|
```
|
|
84
28
|
|
|
85
|
-
##
|
|
29
|
+
## Example Output
|
|
86
30
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
| **Iteration Velocity** | Commits per hour | >5/hr | 3-5/hr | <3/hr |
|
|
90
|
-
| **Rework Ratio** | % of commits that are fixes | <30% | 30-50% | >50% |
|
|
91
|
-
| **Trust Pass Rate** | % of commits without immediate fix | >95% | 80-95% | <80% |
|
|
92
|
-
| **Debug Spiral Duration** | Avg time stuck in fix chains | <15m | 15-30m | >30m |
|
|
93
|
-
| **Flow Efficiency** | % time building vs debugging | >90% | 75-90% | <75% |
|
|
94
|
-
|
|
95
|
-
### What the ratings suggest
|
|
96
|
-
|
|
97
|
-
- **ELITE**: Commit patterns suggest smooth workflow
|
|
98
|
-
- **HIGH**: Generally healthy patterns, some areas to watch
|
|
99
|
-
- **MEDIUM**: Mixed signals—review individual metrics
|
|
100
|
-
- **LOW**: Commit patterns suggest friction—investigate causes
|
|
101
|
-
|
|
102
|
-
*Note: These ratings reflect commit patterns, not actual code quality or productivity.*
|
|
31
|
+
```
|
|
32
|
+
VIBE-CHECK Nov 21 - Nov 28
|
|
103
33
|
|
|
104
|
-
|
|
34
|
+
Rating: HIGH
|
|
35
|
+
Trust: 92% HIGH
|
|
36
|
+
Rework: 35% MEDIUM
|
|
105
37
|
|
|
106
|
-
|
|
38
|
+
Run without --simple for full details
|
|
39
|
+
```
|
|
107
40
|
|
|
108
|
-
|
|
109
|
-
|---------|---------------|------------|
|
|
110
|
-
| `SECRETS_AUTH` | Auth/OAuth/credentials issues | Validate auth flow before implementation |
|
|
111
|
-
| `API_MISMATCH` | API version or schema problems | Check API docs, deploy minimal test first |
|
|
112
|
-
| `VOLUME_CONFIG` | Mount/path/permission issues | Test volume config in isolation |
|
|
113
|
-
| `SSL_TLS` | Certificate/HTTPS problems | Verify certs before deploying |
|
|
114
|
-
| `IMAGE_REGISTRY` | Container pull/tag issues | Test image pull separately |
|
|
41
|
+
## Session Workflow
|
|
115
42
|
|
|
116
|
-
|
|
43
|
+
Declare your trust level before starting, then check if reality matched:
|
|
117
44
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
- **After frustrating sessions**: Identify what went wrong
|
|
45
|
+
```bash
|
|
46
|
+
# Before work: declare your expectation
|
|
47
|
+
vibe-check start --level 3
|
|
122
48
|
|
|
123
|
-
|
|
49
|
+
# ... do your work ...
|
|
124
50
|
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
--since <date> Start date (e.g., "1 week ago", "2025-11-01")
|
|
128
|
-
--until <date> End date (default: now)
|
|
129
|
-
-f, --format <type> Output: terminal, json, markdown
|
|
130
|
-
-r, --repo <path> Repository path (default: current directory)
|
|
131
|
-
-o, --output <file> Write JSON results to file
|
|
132
|
-
-v, --verbose Show detailed output
|
|
133
|
-
--score Include VibeScore (semantic-free metrics)
|
|
134
|
-
--recommend Include level recommendation
|
|
135
|
-
--simple Show simplified output (less verbose)
|
|
136
|
-
-h, --help Display help
|
|
51
|
+
# After work: compare reality vs expectation
|
|
52
|
+
vibe-check --since "1 hour ago"
|
|
137
53
|
```
|
|
138
54
|
|
|
139
|
-
|
|
55
|
+
Output:
|
|
140
56
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
### Levels
|
|
144
|
-
|
|
145
|
-
| Level | Name | XP Required |
|
|
146
|
-
|-------|------|-------------|
|
|
147
|
-
| 1 | Newbie | 0 |
|
|
148
|
-
| 2 | Regular | 100 |
|
|
149
|
-
| 3 | Committed | 300 |
|
|
150
|
-
| 4 | Dedicated | 600 |
|
|
151
|
-
| 5 | Expert | 1000 |
|
|
152
|
-
| 6 | Master | 1500 |
|
|
153
|
-
| 7 | Grandmaster | 2100 |
|
|
154
|
-
| 8 | Guru | 2800 |
|
|
155
|
-
| 9 | Sage | 3600 |
|
|
156
|
-
| 10 | Legend | 4500 |
|
|
157
|
-
|
|
158
|
-
### Achievements
|
|
57
|
+
```
|
|
58
|
+
SESSION COMPLETE
|
|
159
59
|
|
|
160
|
-
|
|
60
|
+
Declared: Level 3 - Balanced (60% trust)
|
|
61
|
+
Duration: 45 min, 12 commits
|
|
161
62
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
- 👑 **Monthly Master** - Maintain a 30-day streak
|
|
165
|
-
- ✨ **Elite Vibes** - Achieve ELITE rating
|
|
166
|
-
- 🏅 **Ninety Club** - Vibe Score of 90%+
|
|
167
|
-
- 🧘 **Zen Master** - 50+ commits, 0 debug spirals
|
|
168
|
-
- ...and 12 more, including 2 hidden achievements!
|
|
63
|
+
Trust Pass: 85% (expected >65%) ✓
|
|
64
|
+
Rework: 20% (expected <30%) ✓
|
|
169
65
|
|
|
170
|
-
|
|
66
|
+
✓ Level 3 was appropriate for this work
|
|
67
|
+
```
|
|
171
68
|
|
|
172
|
-
|
|
69
|
+
### Vibe Levels
|
|
173
70
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
71
|
+
| Level | Name | Trust | When to Use |
|
|
72
|
+
|-------|------|-------|-------------|
|
|
73
|
+
| 5 | Full Automation | 95% | Formatting, linting |
|
|
74
|
+
| 4 | High Trust | 80% | Boilerplate, CRUD |
|
|
75
|
+
| 3 | Balanced | 60% | Features, tests |
|
|
76
|
+
| 2 | Careful | 40% | Integrations, APIs |
|
|
77
|
+
| 1 | Skeptical | 20% | Architecture, security |
|
|
78
|
+
| 0 | Manual | 0% | Novel research |
|
|
177
79
|
|
|
178
|
-
|
|
179
|
-
vibe-check profile --achievements
|
|
80
|
+
## The Core Metrics
|
|
180
81
|
|
|
181
|
-
|
|
182
|
-
|
|
82
|
+
| Metric | What It Measures | Elite | Needs Work |
|
|
83
|
+
|--------|------------------|-------|------------|
|
|
84
|
+
| **Trust Pass Rate** | % commits without immediate fix | >95% | <80% |
|
|
85
|
+
| **Rework Ratio** | % commits that are fixes | <30% | >50% |
|
|
86
|
+
| **Debug Spiral** | Stuck in fix loops? | 0 detected | 3+ detected |
|
|
183
87
|
|
|
184
|
-
|
|
185
|
-
vibe-check profile --json
|
|
186
|
-
```
|
|
88
|
+
## Git Hook
|
|
187
89
|
|
|
188
|
-
|
|
90
|
+
Run automatically before every push:
|
|
189
91
|
|
|
190
92
|
```bash
|
|
191
|
-
|
|
192
|
-
vibe-check --since "1 week ago" --score -o results.json
|
|
193
|
-
|
|
194
|
-
# Combine with other formats
|
|
195
|
-
vibe-check --format markdown -o results.json # Terminal gets markdown, file gets JSON
|
|
93
|
+
vibe-check init-hook
|
|
196
94
|
```
|
|
197
95
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
Run vibe-check automatically before every push:
|
|
96
|
+
Block pushes on LOW rating:
|
|
201
97
|
|
|
202
98
|
```bash
|
|
203
|
-
# Install the pre-push hook
|
|
204
|
-
vibe-check init-hook
|
|
205
|
-
|
|
206
|
-
# Or with blocking enabled (rejects push on LOW rating)
|
|
207
99
|
vibe-check init-hook --block-low
|
|
208
100
|
```
|
|
209
101
|
|
|
210
|
-
|
|
102
|
+
## Gamification
|
|
211
103
|
|
|
212
|
-
|
|
104
|
+
Track progress with XP, streaks, and achievements:
|
|
213
105
|
|
|
214
106
|
```bash
|
|
215
|
-
|
|
216
|
-
VIBE_CHECK_BLOCK_LOW=true git push
|
|
217
|
-
|
|
218
|
-
# Show full output instead of simple (default: true)
|
|
219
|
-
VIBE_CHECK_SIMPLE=false git push
|
|
220
|
-
|
|
221
|
-
# Hide vibe score (default: true)
|
|
222
|
-
VIBE_CHECK_SCORE=false git push
|
|
107
|
+
vibe-check profile
|
|
223
108
|
```
|
|
224
109
|
|
|
225
|
-
|
|
110
|
+
```
|
|
111
|
+
╭─────────────────────────────────────────────╮
|
|
112
|
+
│ Your Vibe Profile │
|
|
113
|
+
├─────────────────────────────────────────────┤
|
|
114
|
+
│ 🌲 Level 4 Expert │
|
|
115
|
+
│ ████████████████░░░░ 320/400 XP │
|
|
116
|
+
│ │
|
|
117
|
+
│ 🔥 Current Streak: 5 days │
|
|
118
|
+
│ 🏆 Achievements: 8/19 unlocked │
|
|
119
|
+
╰─────────────────────────────────────────────╯
|
|
120
|
+
```
|
|
226
121
|
|
|
227
|
-
|
|
122
|
+
## CLI Options
|
|
228
123
|
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
124
|
+
```
|
|
125
|
+
vibe-check [options]
|
|
126
|
+
|
|
127
|
+
Options:
|
|
128
|
+
--since <date> Start date (e.g., "1 week ago")
|
|
129
|
+
--until <date> End date (default: now)
|
|
130
|
+
-f, --format <type> Output: terminal, json, markdown
|
|
131
|
+
-r, --repo <path> Repository path
|
|
132
|
+
-o, --output <file> Write JSON to file
|
|
133
|
+
-s, --simple Simplified output
|
|
134
|
+
--score Include VibeScore
|
|
135
|
+
-v, --verbose Verbose output
|
|
136
|
+
|
|
137
|
+
Commands:
|
|
138
|
+
start --level <n> Start session with declared level (0-5)
|
|
139
|
+
profile View your gamification profile
|
|
140
|
+
init-hook Install pre-push git hook
|
|
233
141
|
```
|
|
234
142
|
|
|
235
143
|
## GitHub Action
|
|
236
144
|
|
|
237
|
-
Add automated vibe-check to your PRs:
|
|
238
|
-
|
|
239
145
|
```yaml
|
|
240
|
-
# .github/workflows/vibe-check.yml
|
|
241
146
|
name: Vibe Check
|
|
242
|
-
|
|
243
147
|
on:
|
|
244
148
|
pull_request:
|
|
245
149
|
branches: [main]
|
|
@@ -250,104 +154,28 @@ jobs:
|
|
|
250
154
|
permissions:
|
|
251
155
|
contents: read
|
|
252
156
|
pull-requests: write
|
|
253
|
-
|
|
254
157
|
steps:
|
|
255
158
|
- uses: actions/checkout@v4
|
|
256
159
|
with:
|
|
257
160
|
fetch-depth: 0
|
|
258
|
-
|
|
259
161
|
- name: Run Vibe Check
|
|
260
162
|
uses: boshu2/vibe-check@v1
|
|
261
163
|
with:
|
|
262
164
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
263
165
|
```
|
|
264
166
|
|
|
265
|
-
### Action Inputs
|
|
266
|
-
|
|
267
|
-
| Input | Description | Default |
|
|
268
|
-
|-------|-------------|---------|
|
|
269
|
-
| `github-token` | GitHub token for PR comments | `${{ github.token }}` |
|
|
270
|
-
| `since` | Start date for analysis | PR base commit |
|
|
271
|
-
| `threshold` | Minimum rating to pass (elite, solid, needs-work) | none |
|
|
272
|
-
| `include-score` | Include VibeScore | `true` |
|
|
273
|
-
| `include-recommendation` | Include level recommendation | `true` |
|
|
274
|
-
| `output-file` | Path to write JSON results | none |
|
|
275
|
-
| `comment-on-pr` | Post results as PR comment | `true` |
|
|
276
|
-
|
|
277
|
-
### Action Outputs
|
|
278
|
-
|
|
279
|
-
| Output | Description |
|
|
280
|
-
|--------|-------------|
|
|
281
|
-
| `overall` | Overall rating (elite, solid, needs-work, struggling) |
|
|
282
|
-
| `vibe-score` | Numeric score (0-100) |
|
|
283
|
-
| `json` | Full JSON results |
|
|
284
|
-
|
|
285
|
-
### Example: Fail PR if Below Threshold
|
|
286
|
-
|
|
287
|
-
```yaml
|
|
288
|
-
- uses: boshu2/vibe-check@v1
|
|
289
|
-
with:
|
|
290
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
291
|
-
threshold: 'solid' # Fails if below solid
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
### Example: Save Results to File
|
|
295
|
-
|
|
296
|
-
```yaml
|
|
297
|
-
- uses: boshu2/vibe-check@v1
|
|
298
|
-
with:
|
|
299
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
300
|
-
output-file: 'vibe-check-results.json'
|
|
301
|
-
|
|
302
|
-
- name: Upload results
|
|
303
|
-
uses: actions/upload-artifact@v4
|
|
304
|
-
with:
|
|
305
|
-
name: vibe-check-results
|
|
306
|
-
path: vibe-check-results.json
|
|
307
|
-
```
|
|
308
|
-
|
|
309
167
|
## Requirements
|
|
310
168
|
|
|
311
169
|
- Node.js >= 20.0.0
|
|
312
|
-
- Git repository
|
|
313
|
-
- Conventional commits recommended (but not required)
|
|
314
|
-
|
|
315
|
-
## Limitations & Caveats
|
|
316
|
-
|
|
317
|
-
### What This Tool Does NOT Measure
|
|
318
|
-
|
|
319
|
-
| Claim | Reality |
|
|
320
|
-
|-------|---------|
|
|
321
|
-
| Code quality | Measures commit patterns, not code correctness |
|
|
322
|
-
| Actual productivity | Measures velocity signals, not shipped value |
|
|
323
|
-
| AI effectiveness | Measures workflow patterns, not AI contribution |
|
|
324
|
-
|
|
325
|
-
### Known Limitations
|
|
326
|
-
|
|
327
|
-
1. **No ground truth validation**: The correlation between these metrics and actual productivity outcomes has not been independently validated.
|
|
328
|
-
|
|
329
|
-
2. **Threshold sensitivity**: Magic numbers (5 min spiral threshold, 3-file churn) are based on practitioner intuition, not empirical studies.
|
|
330
|
-
|
|
331
|
-
3. **Goodhart's Law risk**: Once you know the metrics, you may unconsciously optimize for them rather than actual outcomes.
|
|
332
|
-
|
|
333
|
-
4. **Cold start**: New repositories have no calibration data. Default model weights are educated guesses.
|
|
334
|
-
|
|
335
|
-
5. **Sample size**: The ML model requires 20+ calibration samples for meaningful learning. Results with fewer samples are unreliable.
|
|
170
|
+
- Git repository
|
|
336
171
|
|
|
337
|
-
|
|
172
|
+
## What This Is (and Isn't)
|
|
338
173
|
|
|
339
|
-
|
|
340
|
-
- To compare across teams or developers (different baselines)
|
|
341
|
-
- As the sole indicator of AI tool effectiveness
|
|
342
|
-
- Without understanding what each metric actually measures
|
|
174
|
+
**Is:** A quick feedback tool to catch debug spirals early
|
|
343
175
|
|
|
344
|
-
|
|
176
|
+
**Isn't:** A productivity metric, performance review tool, or AI effectiveness measure
|
|
345
177
|
|
|
346
|
-
Use
|
|
347
|
-
- Combine with code review feedback
|
|
348
|
-
- Track alongside deployment success rates
|
|
349
|
-
- Use for self-reflection, not external judgment
|
|
350
|
-
- Treat as directional, not precise
|
|
178
|
+
Use it for self-reflection, not external judgment.
|
|
351
179
|
|
|
352
180
|
## License
|
|
353
181
|
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
| Version | Supported |
|
|
6
|
+
| ------- | ------------------ |
|
|
7
|
+
| 1.x.x | :white_check_mark: |
|
|
8
|
+
|
|
9
|
+
## Security Assessment
|
|
10
|
+
|
|
11
|
+
**Last Review:** 2025-11-29
|
|
12
|
+
**Risk Level:** LOW
|
|
13
|
+
**Reviewer:** Automated + Manual
|
|
14
|
+
|
|
15
|
+
### Summary
|
|
16
|
+
|
|
17
|
+
vibe-check is a local CLI tool that reads git history and writes statistics to local files. It has a minimal attack surface:
|
|
18
|
+
|
|
19
|
+
- No network requests (except GitHub Action for PR comments)
|
|
20
|
+
- No sensitive data handling
|
|
21
|
+
- No privilege escalation paths
|
|
22
|
+
- Trusted, minimal dependencies
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Threat Model
|
|
27
|
+
|
|
28
|
+
### What vibe-check does
|
|
29
|
+
|
|
30
|
+
1. Reads git commit history via `simple-git`
|
|
31
|
+
2. Calculates metrics from commit patterns
|
|
32
|
+
3. Writes profile/calibration data to `.vibe-check/` directory
|
|
33
|
+
4. Optionally installs a pre-push git hook
|
|
34
|
+
|
|
35
|
+
### What vibe-check does NOT do
|
|
36
|
+
|
|
37
|
+
- Make network requests
|
|
38
|
+
- Handle authentication tokens (except GitHub Action)
|
|
39
|
+
- Execute user-provided code
|
|
40
|
+
- Access files outside the repository or `~/.vibe-check/`
|
|
41
|
+
- Run with elevated privileges
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Known Security Considerations
|
|
46
|
+
|
|
47
|
+
### 1. Shell Command Construction in Git Hook
|
|
48
|
+
|
|
49
|
+
**Severity:** Low
|
|
50
|
+
**Location:** `hooks/pre-push`, `src/commands/init-hook.ts`
|
|
51
|
+
|
|
52
|
+
The pre-push hook uses `eval` to construct commands:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
OUTPUT=$(eval "$VIBE_CMD $SINCE_FLAG" 2>&1)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Risk:** Theoretical command injection if git commit dates contain shell metacharacters.
|
|
59
|
+
|
|
60
|
+
**Mitigation:**
|
|
61
|
+
- `SINCE_FLAG` is derived from `git log --format=%ci` output
|
|
62
|
+
- Git date format is strictly controlled by git itself
|
|
63
|
+
- Attacker would need to compromise git internals
|
|
64
|
+
|
|
65
|
+
**Actual Risk:** Negligible in practice.
|
|
66
|
+
|
|
67
|
+
### 2. File Path Handling
|
|
68
|
+
|
|
69
|
+
**Severity:** Low
|
|
70
|
+
**Location:** `src/calibration/storage.ts`, `src/gamification/profile.ts`
|
|
71
|
+
|
|
72
|
+
The `--repo` flag accepts a path that's used for file operations.
|
|
73
|
+
|
|
74
|
+
**Risk:** Path traversal if malicious path provided.
|
|
75
|
+
|
|
76
|
+
**Mitigation:**
|
|
77
|
+
- User controls the `--repo` flag (self-targeted attack)
|
|
78
|
+
- Writes only to `.vibe-check/` subdirectory
|
|
79
|
+
- Profile stored in user's home directory, not repo
|
|
80
|
+
|
|
81
|
+
**Actual Risk:** None - users would only be affecting their own system.
|
|
82
|
+
|
|
83
|
+
### 3. GitHub Action Input Handling
|
|
84
|
+
|
|
85
|
+
**Severity:** Low
|
|
86
|
+
**Location:** `action.yml`
|
|
87
|
+
|
|
88
|
+
Action inputs are passed to shell commands.
|
|
89
|
+
|
|
90
|
+
**Mitigation:**
|
|
91
|
+
- GitHub sanitizes workflow inputs
|
|
92
|
+
- Only collaborators can trigger PR workflows
|
|
93
|
+
- Inputs validated by vibe-check CLI
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Dependencies
|
|
98
|
+
|
|
99
|
+
All dependencies are widely-used, trusted packages:
|
|
100
|
+
|
|
101
|
+
| Package | Purpose | Risk |
|
|
102
|
+
|---------|---------|------|
|
|
103
|
+
| simple-git | Git operations | Low - no shell execution |
|
|
104
|
+
| commander | CLI framework | Low - argument parsing only |
|
|
105
|
+
| chalk | Terminal colors | Low - output formatting only |
|
|
106
|
+
| date-fns | Date formatting | Low - pure functions |
|
|
107
|
+
| enquirer | CLI prompts | Low - user input handling |
|
|
108
|
+
|
|
109
|
+
Run `npm audit` to check for known vulnerabilities.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Security Best Practices for Users
|
|
114
|
+
|
|
115
|
+
### Git Hook
|
|
116
|
+
|
|
117
|
+
The pre-push hook executes on every `git push`. To review what it does:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
cat .git/hooks/pre-push
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
To disable temporarily:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git push --no-verify
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
To remove:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
rm .git/hooks/pre-push
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Profile Data
|
|
136
|
+
|
|
137
|
+
Profile data is stored in `~/.vibe-check/profile.json`. This contains:
|
|
138
|
+
- Session history (dates, scores, commits analyzed)
|
|
139
|
+
- XP and achievement data
|
|
140
|
+
- No sensitive information
|
|
141
|
+
|
|
142
|
+
To clear your profile:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
rm -rf ~/.vibe-check/
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Repository Data
|
|
149
|
+
|
|
150
|
+
Calibration data is stored in `.vibe-check/` within each repository. Add to `.gitignore` if you don't want to commit it:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
echo ".vibe-check/" >> .gitignore
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Reporting a Vulnerability
|
|
159
|
+
|
|
160
|
+
If you discover a security vulnerability, please:
|
|
161
|
+
|
|
162
|
+
1. **Do NOT** open a public issue
|
|
163
|
+
2. Email the maintainer directly or use GitHub's private vulnerability reporting
|
|
164
|
+
3. Include:
|
|
165
|
+
- Description of the vulnerability
|
|
166
|
+
- Steps to reproduce
|
|
167
|
+
- Potential impact
|
|
168
|
+
- Suggested fix (if any)
|
|
169
|
+
|
|
170
|
+
We aim to respond within 48 hours and will credit reporters in the fix announcement.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Changelog
|
|
175
|
+
|
|
176
|
+
| Date | Version | Change |
|
|
177
|
+
|------|---------|--------|
|
|
178
|
+
| 2025-11-29 | 1.2.0 | Initial security review documented |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"project": "vibe-check",
|
|
3
|
+
"created": "2025-11-29",
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"current_state": {
|
|
6
|
+
"working_on": null,
|
|
7
|
+
"blockers": [],
|
|
8
|
+
"next_steps": []
|
|
9
|
+
},
|
|
10
|
+
"stats": {
|
|
11
|
+
"test_files": 8,
|
|
12
|
+
"tests_passing": 108,
|
|
13
|
+
"npm_version": "1.2.0"
|
|
14
|
+
},
|
|
15
|
+
"sessions": [
|
|
16
|
+
{
|
|
17
|
+
"session_id": "2025-11-29-001",
|
|
18
|
+
"started": "2025-11-29T08:00:00Z",
|
|
19
|
+
"ended": "2025-11-29T09:30:00Z",
|
|
20
|
+
"vibe_level": 4,
|
|
21
|
+
"summary": "Implemented full gamification system: streaks, XP, 19 achievements, dashboard shell, profile command",
|
|
22
|
+
"commits": ["e132b83"],
|
|
23
|
+
"features_completed": ["VIBE-001", "VIBE-002", "VIBE-003"]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"session_id": "2025-11-29-002",
|
|
27
|
+
"started": "2025-11-29T12:00:00Z",
|
|
28
|
+
"ended": "2025-11-29T13:00:00Z",
|
|
29
|
+
"vibe_level": 3,
|
|
30
|
+
"summary": "GitHub Action, JSON output, --simple flag, 57 gamification tests, published v1.1.0",
|
|
31
|
+
"commits": ["70dbd6f", "9e06f71", "62c512a", "a2fb133", "c521144", "43bf561", "9fca764", "e4c9027"],
|
|
32
|
+
"features_completed": ["VIBE-004", "VIBE-005", "VIBE-007"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"session_id": "2025-11-29-003",
|
|
36
|
+
"started": "2025-11-29T13:00:00Z",
|
|
37
|
+
"ended": "2025-11-29T13:45:00Z",
|
|
38
|
+
"vibe_level": 3,
|
|
39
|
+
"summary": "Pre-push git hook, security review, published v1.2.0",
|
|
40
|
+
"commits": ["f1d0843", "ad18702", "464a4ee", "9ae35d6"],
|
|
41
|
+
"features_completed": ["VIBE-006", "VIBE-008"]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|