@boshu2/vibe-check 1.2.0 → 1.3.1
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 +118 -256
- package/SECURITY.md +178 -0
- package/claude-progress.json +44 -0
- package/claude-progress.txt +98 -0
- package/dist/cli.js +3 -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 +2 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +5 -3
- package/dist/commands/index.js.map +1 -1
- 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/commands/watch.d.ts +3 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +182 -0
- package/dist/commands/watch.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,168 @@ 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
24
|
|
|
77
|
-
#
|
|
78
|
-
vibe-check
|
|
79
|
-
vibe-check --format markdown # For reports
|
|
80
|
-
|
|
81
|
-
# Analyze a different repo
|
|
82
|
-
vibe-check --repo /path/to/repo
|
|
25
|
+
# Watch mode - catch spirals in real-time
|
|
26
|
+
vibe-check watch
|
|
83
27
|
```
|
|
84
28
|
|
|
85
|
-
##
|
|
86
|
-
|
|
87
|
-
| Metric | What It Measures | Elite | Good | Needs Work |
|
|
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.*
|
|
103
|
-
|
|
104
|
-
## Debug Spiral Detection
|
|
29
|
+
## Watch Mode (Real-Time Detection)
|
|
105
30
|
|
|
106
|
-
|
|
31
|
+
Catch spirals as they happen, not after:
|
|
107
32
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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 |
|
|
33
|
+
```bash
|
|
34
|
+
vibe-check watch
|
|
35
|
+
```
|
|
115
36
|
|
|
116
|
-
|
|
37
|
+
```
|
|
38
|
+
VIBE-CHECK WATCH MODE
|
|
39
|
+
Monitoring /path/to/repo
|
|
40
|
+
Polling every 5s - Ctrl+C to stop
|
|
41
|
+
|
|
42
|
+
────────────────────────────────────────────────────────────
|
|
43
|
+
09:15 fix(auth) handle token refresh
|
|
44
|
+
09:18 fix(auth) add retry logic
|
|
45
|
+
09:22 fix(auth) increase timeout
|
|
46
|
+
|
|
47
|
+
⚠️ SPIRAL DETECTED
|
|
48
|
+
Component: auth
|
|
49
|
+
Fixes: 3 commits, 7 min
|
|
50
|
+
|
|
51
|
+
Consider:
|
|
52
|
+
• Step back and write a test
|
|
53
|
+
• Check the docs or ask for help
|
|
54
|
+
• Take a 5-minute break
|
|
55
|
+
────────────────────────────────────────────────────────────
|
|
56
|
+
```
|
|
117
57
|
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
- **After frustrating sessions**: Identify what went wrong
|
|
58
|
+
Options:
|
|
59
|
+
- `--quiet` - Only show warnings, not all commits
|
|
60
|
+
- `--interval <ms>` - Poll frequency (default: 5000ms)
|
|
122
61
|
|
|
123
|
-
##
|
|
62
|
+
## Example Output
|
|
124
63
|
|
|
125
64
|
```
|
|
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
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Gamification
|
|
65
|
+
VIBE-CHECK Nov 21 - Nov 28
|
|
140
66
|
|
|
141
|
-
|
|
67
|
+
Rating: HIGH
|
|
68
|
+
Trust: 92% HIGH
|
|
69
|
+
Rework: 35% MEDIUM
|
|
142
70
|
|
|
143
|
-
|
|
71
|
+
Run without --simple for full details
|
|
72
|
+
```
|
|
144
73
|
|
|
145
|
-
|
|
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 |
|
|
74
|
+
## Session Workflow
|
|
157
75
|
|
|
158
|
-
|
|
76
|
+
Declare your trust level before starting, then check if reality matched:
|
|
159
77
|
|
|
160
|
-
|
|
78
|
+
```bash
|
|
79
|
+
# Before work: declare your expectation
|
|
80
|
+
vibe-check start --level 3
|
|
161
81
|
|
|
162
|
-
|
|
163
|
-
- ⚔️ **Week Warrior** - Maintain a 7-day streak
|
|
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!
|
|
82
|
+
# ... do your work ...
|
|
169
83
|
|
|
170
|
-
|
|
84
|
+
# After work: compare reality vs expectation
|
|
85
|
+
vibe-check --since "1 hour ago"
|
|
86
|
+
```
|
|
171
87
|
|
|
172
|
-
|
|
88
|
+
Output:
|
|
173
89
|
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
vibe-check profile
|
|
90
|
+
```
|
|
91
|
+
SESSION COMPLETE
|
|
177
92
|
|
|
178
|
-
|
|
179
|
-
|
|
93
|
+
Declared: Level 3 - Balanced (60% trust)
|
|
94
|
+
Duration: 45 min, 12 commits
|
|
180
95
|
|
|
181
|
-
|
|
182
|
-
|
|
96
|
+
Trust Pass: 85% (expected >65%) ✓
|
|
97
|
+
Rework: 20% (expected <30%) ✓
|
|
183
98
|
|
|
184
|
-
|
|
185
|
-
vibe-check profile --json
|
|
99
|
+
✓ Level 3 was appropriate for this work
|
|
186
100
|
```
|
|
187
101
|
|
|
188
|
-
###
|
|
102
|
+
### Vibe Levels
|
|
189
103
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
104
|
+
| Level | Name | Trust | When to Use |
|
|
105
|
+
|-------|------|-------|-------------|
|
|
106
|
+
| 5 | Full Automation | 95% | Formatting, linting |
|
|
107
|
+
| 4 | High Trust | 80% | Boilerplate, CRUD |
|
|
108
|
+
| 3 | Balanced | 60% | Features, tests |
|
|
109
|
+
| 2 | Careful | 40% | Integrations, APIs |
|
|
110
|
+
| 1 | Skeptical | 20% | Architecture, security |
|
|
111
|
+
| 0 | Manual | 0% | Novel research |
|
|
193
112
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
113
|
+
## The Core Metrics
|
|
114
|
+
|
|
115
|
+
| Metric | What It Measures | Elite | Needs Work |
|
|
116
|
+
|--------|------------------|-------|------------|
|
|
117
|
+
| **Trust Pass Rate** | % commits without immediate fix | >95% | <80% |
|
|
118
|
+
| **Rework Ratio** | % commits that are fixes | <30% | >50% |
|
|
119
|
+
| **Debug Spiral** | Stuck in fix loops? | 0 detected | 3+ detected |
|
|
197
120
|
|
|
198
121
|
## Git Hook
|
|
199
122
|
|
|
200
|
-
Run
|
|
123
|
+
Run automatically before every push:
|
|
201
124
|
|
|
202
125
|
```bash
|
|
203
|
-
# Install the pre-push hook
|
|
204
126
|
vibe-check init-hook
|
|
127
|
+
```
|
|
205
128
|
|
|
206
|
-
|
|
129
|
+
Block pushes on LOW rating:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
207
132
|
vibe-check init-hook --block-low
|
|
208
133
|
```
|
|
209
134
|
|
|
210
|
-
|
|
135
|
+
## Gamification
|
|
211
136
|
|
|
212
|
-
|
|
137
|
+
Track progress with XP, streaks, and achievements:
|
|
213
138
|
|
|
214
139
|
```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
|
|
140
|
+
vibe-check profile
|
|
223
141
|
```
|
|
224
142
|
|
|
225
|
-
|
|
143
|
+
```
|
|
144
|
+
╭─────────────────────────────────────────────╮
|
|
145
|
+
│ Your Vibe Profile │
|
|
146
|
+
├─────────────────────────────────────────────┤
|
|
147
|
+
│ 🌲 Level 4 Expert │
|
|
148
|
+
│ ████████████████░░░░ 320/400 XP │
|
|
149
|
+
│ │
|
|
150
|
+
│ 🔥 Current Streak: 5 days │
|
|
151
|
+
│ 🏆 Achievements: 8/19 unlocked │
|
|
152
|
+
╰─────────────────────────────────────────────╯
|
|
153
|
+
```
|
|
226
154
|
|
|
227
|
-
|
|
155
|
+
## CLI Options
|
|
228
156
|
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
157
|
+
```
|
|
158
|
+
vibe-check [options]
|
|
159
|
+
|
|
160
|
+
Options:
|
|
161
|
+
--since <date> Start date (e.g., "1 week ago")
|
|
162
|
+
--until <date> End date (default: now)
|
|
163
|
+
-f, --format <type> Output: terminal, json, markdown
|
|
164
|
+
-r, --repo <path> Repository path
|
|
165
|
+
-o, --output <file> Write JSON to file
|
|
166
|
+
-s, --simple Simplified output
|
|
167
|
+
--score Include VibeScore
|
|
168
|
+
-v, --verbose Verbose output
|
|
169
|
+
|
|
170
|
+
Commands:
|
|
171
|
+
watch Real-time spiral detection
|
|
172
|
+
start --level <n> Start session with declared level (0-5)
|
|
173
|
+
profile View your gamification profile
|
|
174
|
+
init-hook Install pre-push git hook
|
|
233
175
|
```
|
|
234
176
|
|
|
235
177
|
## GitHub Action
|
|
236
178
|
|
|
237
|
-
Add automated vibe-check to your PRs:
|
|
238
|
-
|
|
239
179
|
```yaml
|
|
240
|
-
# .github/workflows/vibe-check.yml
|
|
241
180
|
name: Vibe Check
|
|
242
|
-
|
|
243
181
|
on:
|
|
244
182
|
pull_request:
|
|
245
183
|
branches: [main]
|
|
@@ -250,104 +188,28 @@ jobs:
|
|
|
250
188
|
permissions:
|
|
251
189
|
contents: read
|
|
252
190
|
pull-requests: write
|
|
253
|
-
|
|
254
191
|
steps:
|
|
255
192
|
- uses: actions/checkout@v4
|
|
256
193
|
with:
|
|
257
194
|
fetch-depth: 0
|
|
258
|
-
|
|
259
195
|
- name: Run Vibe Check
|
|
260
196
|
uses: boshu2/vibe-check@v1
|
|
261
197
|
with:
|
|
262
198
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
263
199
|
```
|
|
264
200
|
|
|
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
201
|
## Requirements
|
|
310
202
|
|
|
311
203
|
- 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.
|
|
204
|
+
- Git repository
|
|
336
205
|
|
|
337
|
-
|
|
206
|
+
## What This Is (and Isn't)
|
|
338
207
|
|
|
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
|
|
208
|
+
**Is:** A quick feedback tool to catch debug spirals early
|
|
343
209
|
|
|
344
|
-
|
|
210
|
+
**Isn't:** A productivity metric, performance review tool, or AI effectiveness measure
|
|
345
211
|
|
|
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
|
|
212
|
+
Use it for self-reflection, not external judgment.
|
|
351
213
|
|
|
352
214
|
## License
|
|
353
215
|
|
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
|
+
}
|