@boshu2/vibe-check 1.0.1 → 1.1.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 (128) hide show
  1. package/.agents/bundles/ml-learning-loop-complete-plan-2025-11-28.md +908 -0
  2. package/.agents/bundles/unified-vibe-system-plan-phase1-2025-11-28.md +962 -0
  3. package/.agents/bundles/unified-vibe-system-research-2025-11-28.md +1003 -0
  4. package/.agents/bundles/vibe-check-ecosystem-plan-2025-11-29.md +635 -0
  5. package/.agents/bundles/vibe-check-gamification-complete-2025-11-29.md +132 -0
  6. package/.agents/bundles/vibe-score-scientific-framework-2025-11-28.md +602 -0
  7. package/.vibe-check/calibration.json +38 -0
  8. package/.vibe-check/latest.json +114 -0
  9. package/CHANGELOG.md +46 -0
  10. package/CLAUDE.md +178 -0
  11. package/README.md +265 -63
  12. package/action.yml +270 -0
  13. package/dashboard/app.js +494 -0
  14. package/dashboard/index.html +235 -0
  15. package/dashboard/styles.css +647 -0
  16. package/dist/calibration/ece.d.ts +26 -0
  17. package/dist/calibration/ece.d.ts.map +1 -0
  18. package/dist/calibration/ece.js +93 -0
  19. package/dist/calibration/ece.js.map +1 -0
  20. package/dist/calibration/index.d.ts +3 -0
  21. package/dist/calibration/index.d.ts.map +1 -0
  22. package/dist/calibration/index.js +15 -0
  23. package/dist/calibration/index.js.map +1 -0
  24. package/dist/calibration/storage.d.ts +34 -0
  25. package/dist/calibration/storage.d.ts.map +1 -0
  26. package/dist/calibration/storage.js +188 -0
  27. package/dist/calibration/storage.js.map +1 -0
  28. package/dist/cli.js +30 -76
  29. package/dist/cli.js.map +1 -1
  30. package/dist/commands/analyze.d.ts +16 -0
  31. package/dist/commands/analyze.d.ts.map +1 -0
  32. package/dist/commands/analyze.js +256 -0
  33. package/dist/commands/analyze.js.map +1 -0
  34. package/dist/commands/index.d.ts +4 -0
  35. package/dist/commands/index.d.ts.map +1 -0
  36. package/dist/commands/index.js +11 -0
  37. package/dist/commands/index.js.map +1 -0
  38. package/dist/commands/level.d.ts +3 -0
  39. package/dist/commands/level.d.ts.map +1 -0
  40. package/dist/commands/level.js +277 -0
  41. package/dist/commands/level.js.map +1 -0
  42. package/dist/commands/profile.d.ts +4 -0
  43. package/dist/commands/profile.d.ts.map +1 -0
  44. package/dist/commands/profile.js +143 -0
  45. package/dist/commands/profile.js.map +1 -0
  46. package/dist/gamification/achievements.d.ts +15 -0
  47. package/dist/gamification/achievements.d.ts.map +1 -0
  48. package/dist/gamification/achievements.js +273 -0
  49. package/dist/gamification/achievements.js.map +1 -0
  50. package/dist/gamification/index.d.ts +8 -0
  51. package/dist/gamification/index.d.ts.map +1 -0
  52. package/dist/gamification/index.js +30 -0
  53. package/dist/gamification/index.js.map +1 -0
  54. package/dist/gamification/profile.d.ts +46 -0
  55. package/dist/gamification/profile.d.ts.map +1 -0
  56. package/dist/gamification/profile.js +272 -0
  57. package/dist/gamification/profile.js.map +1 -0
  58. package/dist/gamification/streaks.d.ts +26 -0
  59. package/dist/gamification/streaks.d.ts.map +1 -0
  60. package/dist/gamification/streaks.js +132 -0
  61. package/dist/gamification/streaks.js.map +1 -0
  62. package/dist/gamification/types.d.ts +111 -0
  63. package/dist/gamification/types.d.ts.map +1 -0
  64. package/dist/gamification/types.js +26 -0
  65. package/dist/gamification/types.js.map +1 -0
  66. package/dist/gamification/xp.d.ts +37 -0
  67. package/dist/gamification/xp.d.ts.map +1 -0
  68. package/dist/gamification/xp.js +115 -0
  69. package/dist/gamification/xp.js.map +1 -0
  70. package/dist/git.d.ts +11 -0
  71. package/dist/git.d.ts.map +1 -1
  72. package/dist/git.js +52 -0
  73. package/dist/git.js.map +1 -1
  74. package/dist/metrics/code-stability.d.ts +13 -0
  75. package/dist/metrics/code-stability.d.ts.map +1 -0
  76. package/dist/metrics/code-stability.js +74 -0
  77. package/dist/metrics/code-stability.js.map +1 -0
  78. package/dist/metrics/file-churn.d.ts +8 -0
  79. package/dist/metrics/file-churn.d.ts.map +1 -0
  80. package/dist/metrics/file-churn.js +75 -0
  81. package/dist/metrics/file-churn.js.map +1 -0
  82. package/dist/metrics/time-spiral.d.ts +8 -0
  83. package/dist/metrics/time-spiral.d.ts.map +1 -0
  84. package/dist/metrics/time-spiral.js +69 -0
  85. package/dist/metrics/time-spiral.js.map +1 -0
  86. package/dist/metrics/velocity-anomaly.d.ts +13 -0
  87. package/dist/metrics/velocity-anomaly.d.ts.map +1 -0
  88. package/dist/metrics/velocity-anomaly.js +67 -0
  89. package/dist/metrics/velocity-anomaly.js.map +1 -0
  90. package/dist/output/index.d.ts +6 -3
  91. package/dist/output/index.d.ts.map +1 -1
  92. package/dist/output/index.js +4 -3
  93. package/dist/output/index.js.map +1 -1
  94. package/dist/output/json.d.ts +2 -2
  95. package/dist/output/json.d.ts.map +1 -1
  96. package/dist/output/json.js +54 -0
  97. package/dist/output/json.js.map +1 -1
  98. package/dist/output/markdown.d.ts +2 -2
  99. package/dist/output/markdown.d.ts.map +1 -1
  100. package/dist/output/markdown.js +34 -1
  101. package/dist/output/markdown.js.map +1 -1
  102. package/dist/output/terminal.d.ts +6 -2
  103. package/dist/output/terminal.d.ts.map +1 -1
  104. package/dist/output/terminal.js +131 -3
  105. package/dist/output/terminal.js.map +1 -1
  106. package/dist/recommend/index.d.ts +3 -0
  107. package/dist/recommend/index.d.ts.map +1 -0
  108. package/dist/recommend/index.js +14 -0
  109. package/dist/recommend/index.js.map +1 -0
  110. package/dist/recommend/ordered-logistic.d.ts +49 -0
  111. package/dist/recommend/ordered-logistic.d.ts.map +1 -0
  112. package/dist/recommend/ordered-logistic.js +153 -0
  113. package/dist/recommend/ordered-logistic.js.map +1 -0
  114. package/dist/recommend/questions.d.ts +19 -0
  115. package/dist/recommend/questions.d.ts.map +1 -0
  116. package/dist/recommend/questions.js +73 -0
  117. package/dist/recommend/questions.js.map +1 -0
  118. package/dist/score/index.d.ts +21 -0
  119. package/dist/score/index.d.ts.map +1 -0
  120. package/dist/score/index.js +48 -0
  121. package/dist/score/index.js.map +1 -0
  122. package/dist/score/weights.d.ts +16 -0
  123. package/dist/score/weights.d.ts.map +1 -0
  124. package/dist/score/weights.js +28 -0
  125. package/dist/score/weights.js.map +1 -0
  126. package/dist/types.d.ts +83 -0
  127. package/dist/types.d.ts.map +1 -1
  128. package/package.json +10 -9
@@ -0,0 +1,114 @@
1
+ {
2
+ "period": {
3
+ "from": "2025-11-28T17:09:58.000Z",
4
+ "to": "2025-11-29T17:06:04.000Z",
5
+ "activeHours": 5.8
6
+ },
7
+ "commits": {
8
+ "total": 19,
9
+ "feat": 6,
10
+ "fix": 2,
11
+ "docs": 4,
12
+ "other": 7
13
+ },
14
+ "metrics": {
15
+ "iterationVelocity": {
16
+ "value": 3.3,
17
+ "unit": "commits/hour",
18
+ "rating": "high"
19
+ },
20
+ "reworkRatio": {
21
+ "value": 11,
22
+ "unit": "%",
23
+ "rating": "elite"
24
+ },
25
+ "trustPassRate": {
26
+ "value": 100,
27
+ "unit": "%",
28
+ "rating": "elite"
29
+ },
30
+ "debugSpiralDuration": {
31
+ "value": 0,
32
+ "unit": "min",
33
+ "rating": "elite"
34
+ },
35
+ "flowEfficiency": {
36
+ "value": 100,
37
+ "unit": "%",
38
+ "rating": "elite"
39
+ }
40
+ },
41
+ "fixChains": [],
42
+ "patterns": {
43
+ "categories": {},
44
+ "total": 0,
45
+ "tracerAvailable": 0
46
+ },
47
+ "overall": "ELITE",
48
+ "vibeScore": {
49
+ "value": 0.88,
50
+ "components": {
51
+ "fileChurn": 0.97,
52
+ "timeSpiral": 0.74,
53
+ "velocityAnomaly": 0.79,
54
+ "codeStability": 0.99
55
+ },
56
+ "weights": {
57
+ "fileChurn": 0.3,
58
+ "timeSpiral": 0.25,
59
+ "velocityAnomaly": 0.2,
60
+ "codeStability": 0.25
61
+ }
62
+ },
63
+ "recommendation": {
64
+ "level": 5,
65
+ "confidence": 0.3,
66
+ "probabilities": [
67
+ 0.018853929395775577,
68
+ 0.04111986761778373,
69
+ 0.1148237967015614,
70
+ 0.23809991674270975,
71
+ 0.2872499181517066,
72
+ 0.29985257139046295
73
+ ],
74
+ "ci": [
75
+ 1.2053475326593759,
76
+ 5
77
+ ]
78
+ },
79
+ "semanticFreeMetrics": {
80
+ "fileChurn": {
81
+ "value": 97,
82
+ "unit": "%",
83
+ "rating": "elite",
84
+ "description": "Elite: 2/63 files churned (<10%)",
85
+ "churnedFiles": 2,
86
+ "totalFiles": 63
87
+ },
88
+ "timeSpiral": {
89
+ "value": 74,
90
+ "unit": "%",
91
+ "rating": "high",
92
+ "description": "High: 5/19 rapid commits (15-30%)",
93
+ "spiralCommits": 5,
94
+ "totalCommits": 19
95
+ },
96
+ "velocityAnomaly": {
97
+ "value": 79,
98
+ "unit": "%",
99
+ "rating": "elite",
100
+ "description": "Elite: 3.3/hr (near baseline 3.0/hr)",
101
+ "currentVelocity": 3.3,
102
+ "baselineMean": 3,
103
+ "zScore": 0.17
104
+ },
105
+ "codeStability": {
106
+ "value": 99,
107
+ "unit": "%",
108
+ "rating": "elite",
109
+ "description": "Elite: 99% stability (+13230/-261)",
110
+ "linesAdded": 13230,
111
+ "linesSurviving": 13100
112
+ }
113
+ }
114
+ }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,52 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.0] - 2025-11-29
9
+
10
+ ### Added
11
+ - **Gamification System** - XP, levels, streaks, and achievements to make vibe-checking more engaging
12
+ - 18 achievements across streak, score, sessions, and special categories
13
+ - XP rewards for sessions, streaks, scores, and achievements
14
+ - Level progression from "Newbie" (1) to "Legend" (10)
15
+ - Daily streaks with weekly goals
16
+ - 2 hidden achievements to discover
17
+ - **Profile Command** - `vibe-check profile` to view your stats, achievements, and progress
18
+ - `--achievements` flag to see all achievements
19
+ - `--stats` flag for detailed statistics
20
+ - `--json` flag for machine-readable output
21
+ - **GitHub Action** - Automated vibe-check on PRs with comment posting
22
+ - Configurable thresholds for pass/fail
23
+ - JSON artifact output option
24
+ - Full PR comment with metrics and recommendations
25
+ - **JSON File Output** - `--output <file>` flag to save results to a JSON file
26
+ - **Dashboard Shell** - Static HTML dashboard for viewing profile (in `dashboard/` directory)
27
+ - **Simple Mode** - `--simple` flag for compact output showing only essential metrics
28
+ - **UX Improvements**
29
+ - Summary section with top strength and focus area
30
+ - Opportunities section with actionable tips for low/medium metrics
31
+ - Date period context in output header
32
+ - Confidence display for level recommendations
33
+ - **Anti-Gaming** - XP deduplication prevents multiple rewards for same time period
34
+ - **Comprehensive Tests** - 108 tests covering gamification, metrics, and scoring
35
+
36
+ ### Changed
37
+ - Requires Node.js 20+ (for Vitest 4.x compatibility)
38
+ - Updated all dependencies to November 2025 stable versions
39
+ - Improved CLI output clarity with better terminology
40
+ - Renamed internal "FAAFO metrics" to "vibe metrics" (user-facing term unchanged)
41
+
42
+ ### Fixed
43
+ - Grammar issues in CLI output
44
+ - Level recommendation confidence display
45
+
46
+ ## [1.0.2] - 2025-11-28
47
+
48
+ ### Changed
49
+ - Complete README rewrite with problem-first structure
50
+ - Added "The Problem" and "The Insight" sections
51
+ - Added practical "When to Run" guidance
52
+ - Added prevention tips for debug spiral patterns
53
+
8
54
  ## [1.0.1] - 2025-11-28
9
55
 
10
56
  ### Added
package/CLAUDE.md ADDED
@@ -0,0 +1,178 @@
1
+ # vibe-check Development Guide
2
+
3
+ ## npm Publishing Standards
4
+
5
+ ### When to Publish
6
+
7
+ | Change Type | Version Bump | Publish? |
8
+ |-------------|--------------|----------|
9
+ | **Breaking changes** | MAJOR (1.0.0 → 2.0.0) | Yes |
10
+ | **New features** (backward compatible) | MINOR (1.0.0 → 1.1.0) | Yes |
11
+ | **Bug fixes** | PATCH (1.0.0 → 1.0.1) | Yes |
12
+ | **Docs only (README, CHANGELOG)** | None | **No** |
13
+ | **Tests only** | None | **No** |
14
+ | **CI/tooling only** | None | **No** |
15
+
16
+ ### GitHub README vs npm README
17
+
18
+ - **GitHub README**: Always shows latest from repo
19
+ - **npm README**: Snapshot from last publish - only updates when you `npm publish`
20
+
21
+ **Docs-only changes don't need a publish.** Just commit and push to GitHub.
22
+
23
+ ### Version Commands
24
+
25
+ ```bash
26
+ # Check current version
27
+ npm version
28
+
29
+ # Bump and publish (creates git tag automatically)
30
+ npm version patch # 1.0.1 → 1.0.2 (bug fixes)
31
+ npm version minor # 1.0.1 → 1.1.0 (new features)
32
+ npm version major # 1.0.1 → 2.0.0 (breaking changes)
33
+
34
+ # Then publish
35
+ npm publish --access=public
36
+ ```
37
+
38
+ ### How Users Consume Versions
39
+
40
+ ```bash
41
+ npm install @boshu2/vibe-check # Gets "latest"
42
+ npm install @boshu2/vibe-check@1.0.2 # Exact version
43
+ npm install @boshu2/vibe-check@^1.0.0 # Any 1.x.x (common default)
44
+ npm install @boshu2/vibe-check@~1.0.0 # Any 1.0.x only
45
+ ```
46
+
47
+ Most users have `^` (caret) in their package.json, meaning they'll auto-update to latest minor/patch.
48
+
49
+ ## Development Workflow
50
+
51
+ ### Running Locally
52
+
53
+ ```bash
54
+ npm run dev # Run with ts-node
55
+ npm run build # Compile TypeScript
56
+ npm test # Run Vitest tests
57
+ npm run test:coverage # Tests with coverage
58
+ ```
59
+
60
+ ### Testing the CLI
61
+
62
+ ```bash
63
+ # Run against a repo
64
+ node dist/cli.js --repo /path/to/repo --since "1 week ago"
65
+
66
+ # Test different output formats
67
+ node dist/cli.js --format json
68
+ node dist/cli.js --format markdown
69
+ ```
70
+
71
+ ### Before Publishing
72
+
73
+ 1. Ensure tests pass: `npm test`
74
+ 2. Update CHANGELOG.md with changes
75
+ 3. Bump version appropriately (see table above)
76
+ 4. Commit version bump
77
+ 5. `npm publish --access=public`
78
+
79
+ ## Architecture
80
+
81
+ ```
82
+ src/
83
+ ├── cli.ts # CLI entry point (Commander.js)
84
+ ├── git.ts # Git operations (simple-git)
85
+ ├── types.ts # TypeScript interfaces
86
+ ├── commands/
87
+ │ ├── index.ts # Command exports
88
+ │ ├── analyze.ts # Main analyze command
89
+ │ ├── level.ts # Level recommendation command
90
+ │ └── profile.ts # Profile/stats command
91
+ ├── metrics/
92
+ │ ├── index.ts # Orchestrates all metrics
93
+ │ ├── velocity.ts # Iteration velocity
94
+ │ ├── rework.ts # Rework ratio
95
+ │ ├── trust.ts # Trust pass rate
96
+ │ ├── spirals.ts # Debug spiral detection
97
+ │ ├── flow.ts # Flow efficiency
98
+ │ ├── file-churn.ts # File churn patterns
99
+ │ ├── time-spiral.ts # Time-based spirals
100
+ │ ├── velocity-anomaly.ts # Velocity anomaly detection
101
+ │ └── code-stability.ts # Code stability metrics
102
+ ├── gamification/
103
+ │ ├── index.ts # Gamification exports
104
+ │ ├── types.ts # XP, levels, achievements types
105
+ │ ├── xp.ts # XP calculation and levels
106
+ │ ├── streaks.ts # Daily/weekly streak tracking
107
+ │ ├── achievements.ts # Achievement definitions and checks
108
+ │ └── profile.ts # Profile persistence (.vibe-check/)
109
+ ├── calibration/
110
+ │ ├── index.ts # Calibration orchestration
111
+ │ ├── ece.ts # Expected calibration error
112
+ │ └── storage.ts # Calibration data persistence
113
+ ├── recommend/
114
+ │ ├── index.ts # Recommendation orchestration
115
+ │ ├── ordered-logistic.ts # Ordinal logistic regression
116
+ │ └── questions.ts # Assessment questions
117
+ ├── score/
118
+ │ ├── index.ts # VibeScore calculation
119
+ │ └── weights.ts # Metric weights
120
+ └── output/
121
+ ├── index.ts # Output format router
122
+ ├── terminal.ts # Colored terminal output
123
+ ├── json.ts # JSON output
124
+ └── markdown.ts # Markdown output
125
+
126
+ dashboard/ # Static HTML dashboard
127
+ ├── index.html # Dashboard UI
128
+ ├── app.js # Dashboard JavaScript
129
+ └── styles.css # Dashboard styles
130
+
131
+ .vibe-check/ # Local profile data (per-repo)
132
+ ├── profile.json # XP, streaks, achievements
133
+ └── calibration.json # Calibration samples
134
+ ```
135
+
136
+ ## Commands
137
+
138
+ ### Main Command (analyze)
139
+ ```bash
140
+ vibe-check [options] # Analyze git history
141
+ vibe-check --since "1 week" # Time-bounded analysis
142
+ vibe-check --score --recommend # Full analysis with recommendations
143
+ ```
144
+
145
+ ### Profile Command
146
+ ```bash
147
+ vibe-check profile # View your profile
148
+ vibe-check profile --achievements # List all achievements
149
+ vibe-check profile --stats # Detailed statistics
150
+ vibe-check profile --json # Machine-readable output
151
+ ```
152
+
153
+ ### Level Command
154
+ ```bash
155
+ vibe-check level # Get level recommendation
156
+ vibe-check level --calibrate 3 # Record calibration sample
157
+ ```
158
+
159
+ ## The 5 Metrics
160
+
161
+ | Metric | Measures | Threshold |
162
+ |--------|----------|-----------|
163
+ | Iteration Velocity | Commits/hour | >5 = Elite |
164
+ | Rework Ratio | % fix commits | <30% = Elite |
165
+ | Trust Pass Rate | % commits without immediate fix | >95% = Elite |
166
+ | Debug Spiral Duration | Avg time in fix chains | <15m = Elite |
167
+ | Flow Efficiency | % time building vs debugging | >90% = Elite |
168
+
169
+ ## Debug Spiral Detection
170
+
171
+ A "debug spiral" is detected when 3+ consecutive fix commits target the same component. Patterns are categorized:
172
+
173
+ - `SECRETS_AUTH` - OAuth/credentials issues
174
+ - `API_MISMATCH` - API version/schema problems
175
+ - `VOLUME_CONFIG` - Mount/permission issues
176
+ - `SSL_TLS` - Certificate problems
177
+ - `IMAGE_REGISTRY` - Container pull issues
178
+ - `GITOPS_DRIFT` - Sync/reconciliation issues