@boshu2/vibe-check 1.8.1 → 2.2.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/plans/2025-12-27-vibe-check-evolution-plan.md +383 -0
- package/.agents/research/2025-12-27-vibe-check-evolution.md +352 -0
- package/.claude/settings.local.json +9 -3
- package/CHANGELOG.md +43 -0
- package/CLAUDE.md +201 -26
- package/Makefile +4 -4
- package/README.md +95 -0
- package/bin/vibe-check.js +1 -1
- package/claude-progress.json +18 -0
- package/dist/analysis/cross-session-analysis.d.ts +1 -1
- package/dist/analysis/cross-session-analysis.d.ts.map +1 -1
- package/dist/analysis/cross-session-analysis.js +9 -18
- package/dist/analysis/cross-session-analysis.js.map +1 -1
- package/dist/analysis/index.d.ts +1 -1
- package/dist/analysis/index.d.ts.map +1 -1
- package/dist/analysis/index.js +1 -11
- package/dist/analysis/index.js.map +1 -1
- package/dist/analyzers/audit.d.ts +28 -0
- package/dist/analyzers/audit.d.ts.map +1 -0
- package/dist/analyzers/audit.js +86 -0
- package/dist/analyzers/audit.js.map +1 -0
- package/dist/analyzers/eldritch.d.ts +40 -0
- package/dist/analyzers/eldritch.d.ts.map +1 -0
- package/dist/analyzers/eldritch.js +202 -0
- package/dist/analyzers/eldritch.js.map +1 -0
- package/dist/analyzers/modularity.d.ts +67 -0
- package/dist/analyzers/modularity.d.ts.map +1 -0
- package/dist/analyzers/modularity.js +254 -0
- package/dist/analyzers/modularity.js.map +1 -0
- package/dist/analyzers/patterns.d.ts +1 -1
- package/dist/analyzers/patterns.d.ts.map +1 -1
- package/dist/analyzers/patterns.js +4 -10
- package/dist/analyzers/patterns.js.map +1 -1
- package/dist/analyzers/quality.d.ts +1 -1
- package/dist/analyzers/quality.d.ts.map +1 -1
- package/dist/analyzers/quality.js +5 -12
- package/dist/analyzers/quality.js.map +1 -1
- package/dist/analyzers/sessions.d.ts +1 -1
- package/dist/analyzers/sessions.d.ts.map +1 -1
- package/dist/analyzers/sessions.js +1 -4
- package/dist/analyzers/sessions.js.map +1 -1
- package/dist/cli.js +21 -20
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +124 -149
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/audit.d.ts +3 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +102 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/cache.js +31 -70
- package/dist/commands/cache.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +22 -58
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/forensics.d.ts +10 -2
- package/dist/commands/forensics.d.ts.map +1 -1
- package/dist/commands/forensics.js +91 -51
- package/dist/commands/forensics.js.map +1 -1
- package/dist/commands/index.d.ts +15 -13
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +15 -33
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init-hook.js +26 -32
- package/dist/commands/init-hook.js.map +1 -1
- package/dist/commands/insights.js +39 -45
- package/dist/commands/insights.js.map +1 -1
- package/dist/commands/modularity.d.ts +27 -0
- package/dist/commands/modularity.d.ts.map +1 -0
- package/dist/commands/modularity.js +182 -0
- package/dist/commands/modularity.js.map +1 -0
- package/dist/commands/pipeline.js +39 -78
- package/dist/commands/pipeline.js.map +1 -1
- package/dist/commands/profile.js +68 -74
- package/dist/commands/profile.js.map +1 -1
- package/dist/commands/session.js +88 -129
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/sessions.d.ts +1 -1
- package/dist/commands/sessions.d.ts.map +1 -1
- package/dist/commands/sessions.js +42 -49
- package/dist/commands/sessions.js.map +1 -1
- package/dist/commands/start.js +22 -67
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/timeline.js +74 -81
- package/dist/commands/timeline.js.map +1 -1
- package/dist/commands/watch.js +54 -60
- package/dist/commands/watch.js.map +1 -1
- package/dist/gamification/achievements.d.ts +1 -1
- package/dist/gamification/achievements.d.ts.map +1 -1
- package/dist/gamification/achievements.js +7 -13
- package/dist/gamification/achievements.js.map +1 -1
- package/dist/gamification/index.d.ts +8 -8
- package/dist/gamification/index.d.ts.map +1 -1
- package/dist/gamification/index.js +8 -28
- package/dist/gamification/index.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 +21 -64
- package/dist/gamification/profile.js.map +1 -1
- package/dist/gamification/stats.d.ts +1 -1
- package/dist/gamification/stats.d.ts.map +1 -1
- package/dist/gamification/stats.js +4 -10
- package/dist/gamification/stats.js.map +1 -1
- package/dist/gamification/streaks.d.ts +1 -1
- package/dist/gamification/streaks.d.ts.map +1 -1
- package/dist/gamification/streaks.js +8 -18
- package/dist/gamification/streaks.js.map +1 -1
- package/dist/gamification/types.js +3 -6
- package/dist/gamification/types.js.map +1 -1
- package/dist/gamification/xp.d.ts +1 -1
- package/dist/gamification/xp.d.ts.map +1 -1
- package/dist/gamification/xp.js +29 -38
- package/dist/gamification/xp.js.map +1 -1
- package/dist/git.d.ts +1 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +23 -29
- package/dist/git.js.map +1 -1
- package/dist/inner-loop/context-amnesia.d.ts +2 -2
- package/dist/inner-loop/context-amnesia.d.ts.map +1 -1
- package/dist/inner-loop/context-amnesia.js +7 -10
- package/dist/inner-loop/context-amnesia.js.map +1 -1
- package/dist/inner-loop/index.d.ts +7 -7
- package/dist/inner-loop/index.d.ts.map +1 -1
- package/dist/inner-loop/index.js +18 -45
- package/dist/inner-loop/index.js.map +1 -1
- package/dist/inner-loop/instruction-drift.d.ts +2 -2
- package/dist/inner-loop/instruction-drift.d.ts.map +1 -1
- package/dist/inner-loop/instruction-drift.js +5 -10
- package/dist/inner-loop/instruction-drift.js.map +1 -1
- package/dist/inner-loop/logging-only.d.ts +2 -2
- package/dist/inner-loop/logging-only.d.ts.map +1 -1
- package/dist/inner-loop/logging-only.js +9 -17
- package/dist/inner-loop/logging-only.js.map +1 -1
- package/dist/inner-loop/tests-passing-lie.d.ts +2 -2
- package/dist/inner-loop/tests-passing-lie.d.ts.map +1 -1
- package/dist/inner-loop/tests-passing-lie.js +12 -17
- package/dist/inner-loop/tests-passing-lie.js.map +1 -1
- package/dist/inner-loop/types.js +1 -4
- package/dist/inner-loop/types.js.map +1 -1
- package/dist/insights/generators.d.ts +4 -4
- package/dist/insights/generators.d.ts.map +1 -1
- package/dist/insights/generators.js +9 -20
- package/dist/insights/generators.js.map +1 -1
- package/dist/insights/index.d.ts +4 -4
- package/dist/insights/index.d.ts.map +1 -1
- package/dist/insights/index.js +23 -27
- package/dist/insights/index.js.map +1 -1
- package/dist/insights/types.js +1 -2
- package/dist/insights/types.js.map +1 -1
- package/dist/metrics/code-stability.d.ts +1 -1
- package/dist/metrics/code-stability.d.ts.map +1 -1
- package/dist/metrics/code-stability.js +1 -4
- package/dist/metrics/code-stability.js.map +1 -1
- package/dist/metrics/cohesion.d.ts +27 -0
- package/dist/metrics/cohesion.d.ts.map +1 -0
- package/dist/metrics/cohesion.js +134 -0
- package/dist/metrics/cohesion.js.map +1 -0
- package/dist/metrics/file-churn.d.ts +1 -1
- package/dist/metrics/file-churn.d.ts.map +1 -1
- package/dist/metrics/file-churn.js +1 -4
- package/dist/metrics/file-churn.js.map +1 -1
- package/dist/metrics/flow.d.ts +1 -1
- package/dist/metrics/flow.d.ts.map +1 -1
- package/dist/metrics/flow.js +1 -4
- package/dist/metrics/flow.js.map +1 -1
- package/dist/metrics/index.d.ts +10 -2
- package/dist/metrics/index.d.ts.map +1 -1
- package/dist/metrics/index.js +51 -20
- package/dist/metrics/index.js.map +1 -1
- package/dist/metrics/investigation.d.ts +25 -0
- package/dist/metrics/investigation.d.ts.map +1 -0
- package/dist/metrics/investigation.js +115 -0
- package/dist/metrics/investigation.js.map +1 -0
- package/dist/metrics/rework.d.ts +1 -1
- package/dist/metrics/rework.d.ts.map +1 -1
- package/dist/metrics/rework.js +1 -4
- package/dist/metrics/rework.js.map +1 -1
- package/dist/metrics/spirals.d.ts +1 -1
- package/dist/metrics/spirals.d.ts.map +1 -1
- package/dist/metrics/spirals.js +5 -10
- package/dist/metrics/spirals.js.map +1 -1
- package/dist/metrics/time-spiral.d.ts +1 -1
- package/dist/metrics/time-spiral.d.ts.map +1 -1
- package/dist/metrics/time-spiral.js +1 -4
- package/dist/metrics/time-spiral.js.map +1 -1
- package/dist/metrics/tracers.d.ts +28 -0
- package/dist/metrics/tracers.d.ts.map +1 -0
- package/dist/metrics/tracers.js +117 -0
- package/dist/metrics/tracers.js.map +1 -0
- package/dist/metrics/trust.d.ts +1 -1
- package/dist/metrics/trust.d.ts.map +1 -1
- package/dist/metrics/trust.js +3 -6
- package/dist/metrics/trust.js.map +1 -1
- package/dist/metrics/velocity-anomaly.d.ts +1 -1
- package/dist/metrics/velocity-anomaly.d.ts.map +1 -1
- package/dist/metrics/velocity-anomaly.js +3 -6
- package/dist/metrics/velocity-anomaly.js.map +1 -1
- package/dist/metrics/velocity.d.ts +1 -1
- package/dist/metrics/velocity.d.ts.map +1 -1
- package/dist/metrics/velocity.js +6 -10
- package/dist/metrics/velocity.js.map +1 -1
- package/dist/output/index.d.ts +4 -4
- package/dist/output/index.d.ts.map +1 -1
- package/dist/output/index.js +10 -18
- package/dist/output/index.js.map +1 -1
- package/dist/output/json.d.ts +1 -1
- package/dist/output/json.d.ts.map +1 -1
- package/dist/output/json.js +1 -4
- package/dist/output/json.js.map +1 -1
- package/dist/output/markdown.d.ts +1 -1
- package/dist/output/markdown.d.ts.map +1 -1
- package/dist/output/markdown.js +5 -8
- package/dist/output/markdown.js.map +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/output/terminal.d.ts.map +1 -1
- package/dist/output/terminal.js +88 -62
- package/dist/output/terminal.js.map +1 -1
- package/dist/output/timeline-html.d.ts +1 -1
- package/dist/output/timeline-html.d.ts.map +1 -1
- package/dist/output/timeline-html.js +5 -8
- package/dist/output/timeline-html.js.map +1 -1
- package/dist/output/timeline-markdown.d.ts +1 -1
- package/dist/output/timeline-markdown.d.ts.map +1 -1
- package/dist/output/timeline-markdown.js +5 -8
- package/dist/output/timeline-markdown.js.map +1 -1
- package/dist/output/timeline.d.ts +1 -1
- package/dist/output/timeline.d.ts.map +1 -1
- package/dist/output/timeline.js +46 -52
- package/dist/output/timeline.js.map +1 -1
- package/dist/patterns/detour.d.ts +1 -1
- package/dist/patterns/detour.d.ts.map +1 -1
- package/dist/patterns/detour.js +1 -4
- package/dist/patterns/detour.js.map +1 -1
- package/dist/patterns/flow-state.d.ts +1 -1
- package/dist/patterns/flow-state.d.ts.map +1 -1
- package/dist/patterns/flow-state.js +1 -4
- package/dist/patterns/flow-state.js.map +1 -1
- package/dist/patterns/index.d.ts +7 -7
- package/dist/patterns/index.d.ts.map +1 -1
- package/dist/patterns/index.js +7 -21
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/intervention-effectiveness.d.ts +1 -1
- package/dist/patterns/intervention-effectiveness.d.ts.map +1 -1
- package/dist/patterns/intervention-effectiveness.js +3 -8
- package/dist/patterns/intervention-effectiveness.js.map +1 -1
- package/dist/patterns/late-night.d.ts +1 -1
- package/dist/patterns/late-night.d.ts.map +1 -1
- package/dist/patterns/late-night.js +1 -4
- package/dist/patterns/late-night.js.map +1 -1
- package/dist/patterns/post-delete-sprint.d.ts +1 -1
- package/dist/patterns/post-delete-sprint.d.ts.map +1 -1
- package/dist/patterns/post-delete-sprint.js +1 -4
- package/dist/patterns/post-delete-sprint.js.map +1 -1
- package/dist/patterns/spiral-regression.d.ts +1 -1
- package/dist/patterns/spiral-regression.d.ts.map +1 -1
- package/dist/patterns/spiral-regression.js +3 -8
- package/dist/patterns/spiral-regression.js.map +1 -1
- package/dist/patterns/thrashing.d.ts +1 -1
- package/dist/patterns/thrashing.d.ts.map +1 -1
- package/dist/patterns/thrashing.js +3 -6
- package/dist/patterns/thrashing.js.map +1 -1
- package/dist/score/index.d.ts +3 -3
- package/dist/score/index.d.ts.map +1 -1
- package/dist/score/index.js +4 -10
- package/dist/score/index.js.map +1 -1
- package/dist/score/weights.js +2 -6
- package/dist/score/weights.js.map +1 -1
- package/dist/sessions/index.js +9 -51
- package/dist/sessions/index.js.map +1 -1
- package/dist/storage/atomic.js +10 -51
- package/dist/storage/atomic.js.map +1 -1
- package/dist/storage/commit-log.d.ts +1 -1
- package/dist/storage/commit-log.d.ts.map +1 -1
- package/dist/storage/commit-log.js +11 -51
- package/dist/storage/commit-log.js.map +1 -1
- package/dist/storage/index.d.ts +5 -5
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +5 -37
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/schema.js +4 -9
- package/dist/storage/schema.js.map +1 -1
- package/dist/storage/spiral-history.js +14 -57
- package/dist/storage/spiral-history.js.map +1 -1
- package/dist/storage/timeline-store.d.ts +2 -2
- package/dist/storage/timeline-store.d.ts.map +1 -1
- package/dist/storage/timeline-store.js +17 -61
- package/dist/storage/timeline-store.js.map +1 -1
- package/dist/types.d.ts +36 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/docs/ENHANCEMENT-PLAN.md +379 -0
- package/feature-list.json +6 -0
- package/package.json +8 -7
- package/.claude/skills/typescript-review.md +0 -152
- package/dist/calibration/ece.d.ts +0 -26
- package/dist/calibration/ece.d.ts.map +0 -1
- package/dist/calibration/ece.js +0 -93
- package/dist/calibration/ece.js.map +0 -1
- package/dist/calibration/index.d.ts +0 -3
- package/dist/calibration/index.d.ts.map +0 -1
- package/dist/calibration/index.js +0 -15
- package/dist/calibration/index.js.map +0 -1
- package/dist/calibration/storage.d.ts +0 -34
- package/dist/calibration/storage.d.ts.map +0 -1
- package/dist/calibration/storage.js +0 -188
- package/dist/calibration/storage.js.map +0 -1
- package/dist/commands/intervene.d.ts +0 -15
- package/dist/commands/intervene.d.ts.map +0 -1
- package/dist/commands/intervene.js +0 -183
- package/dist/commands/intervene.js.map +0 -1
- package/dist/commands/learn.d.ts +0 -3
- package/dist/commands/learn.d.ts.map +0 -1
- package/dist/commands/learn.js +0 -161
- package/dist/commands/learn.js.map +0 -1
- package/dist/commands/lesson.d.ts +0 -8
- package/dist/commands/lesson.d.ts.map +0 -1
- package/dist/commands/lesson.js +0 -206
- package/dist/commands/lesson.js.map +0 -1
- package/dist/commands/level.d.ts +0 -3
- package/dist/commands/level.d.ts.map +0 -1
- package/dist/commands/level.js +0 -277
- package/dist/commands/level.js.map +0 -1
- package/dist/gamification/badges.d.ts +0 -29
- package/dist/gamification/badges.d.ts.map +0 -1
- package/dist/gamification/badges.js +0 -114
- package/dist/gamification/badges.js.map +0 -1
- package/dist/gamification/challenges.d.ts +0 -42
- package/dist/gamification/challenges.d.ts.map +0 -1
- package/dist/gamification/challenges.js +0 -184
- package/dist/gamification/challenges.js.map +0 -1
- package/dist/gamification/hall-of-fame.d.ts +0 -17
- package/dist/gamification/hall-of-fame.d.ts.map +0 -1
- package/dist/gamification/hall-of-fame.js +0 -64
- package/dist/gamification/hall-of-fame.js.map +0 -1
- package/dist/gamification/intervention-memory.d.ts +0 -61
- package/dist/gamification/intervention-memory.d.ts.map +0 -1
- package/dist/gamification/intervention-memory.js +0 -229
- package/dist/gamification/intervention-memory.js.map +0 -1
- package/dist/gamification/leaderboards.d.ts +0 -49
- package/dist/gamification/leaderboards.d.ts.map +0 -1
- package/dist/gamification/leaderboards.js +0 -179
- package/dist/gamification/leaderboards.js.map +0 -1
- package/dist/gamification/pattern-memory.d.ts +0 -45
- package/dist/gamification/pattern-memory.d.ts.map +0 -1
- package/dist/gamification/pattern-memory.js +0 -188
- package/dist/gamification/pattern-memory.js.map +0 -1
- package/dist/gamification/share.d.ts +0 -29
- package/dist/gamification/share.d.ts.map +0 -1
- package/dist/gamification/share.js +0 -57
- package/dist/gamification/share.js.map +0 -1
- package/dist/learning/cadence.d.ts +0 -15
- package/dist/learning/cadence.d.ts.map +0 -1
- package/dist/learning/cadence.js +0 -130
- package/dist/learning/cadence.js.map +0 -1
- package/dist/learning/index.d.ts +0 -19
- package/dist/learning/index.d.ts.map +0 -1
- package/dist/learning/index.js +0 -35
- package/dist/learning/index.js.map +0 -1
- package/dist/learning/lessons-storage.d.ts +0 -48
- package/dist/learning/lessons-storage.d.ts.map +0 -1
- package/dist/learning/lessons-storage.js +0 -266
- package/dist/learning/lessons-storage.js.map +0 -1
- package/dist/learning/lessons-types.d.ts +0 -83
- package/dist/learning/lessons-types.d.ts.map +0 -1
- package/dist/learning/lessons-types.js +0 -15
- package/dist/learning/lessons-types.js.map +0 -1
- package/dist/learning/nudges.d.ts +0 -20
- package/dist/learning/nudges.d.ts.map +0 -1
- package/dist/learning/nudges.js +0 -68
- package/dist/learning/nudges.js.map +0 -1
- package/dist/learning/retrospective.d.ts +0 -27
- package/dist/learning/retrospective.d.ts.map +0 -1
- package/dist/learning/retrospective.js +0 -184
- package/dist/learning/retrospective.js.map +0 -1
- package/dist/learning/storage.d.ts +0 -44
- package/dist/learning/storage.d.ts.map +0 -1
- package/dist/learning/storage.js +0 -194
- package/dist/learning/storage.js.map +0 -1
- package/dist/learning/surfacing.d.ts +0 -36
- package/dist/learning/surfacing.d.ts.map +0 -1
- package/dist/learning/surfacing.js +0 -255
- package/dist/learning/surfacing.js.map +0 -1
- package/dist/learning/synthesis.d.ts +0 -17
- package/dist/learning/synthesis.d.ts.map +0 -1
- package/dist/learning/synthesis.js +0 -293
- package/dist/learning/synthesis.js.map +0 -1
- package/dist/learning/types.d.ts +0 -60
- package/dist/learning/types.d.ts.map +0 -1
- package/dist/learning/types.js +0 -17
- package/dist/learning/types.js.map +0 -1
- package/dist/recommend/index.d.ts +0 -3
- package/dist/recommend/index.d.ts.map +0 -1
- package/dist/recommend/index.js +0 -14
- package/dist/recommend/index.js.map +0 -1
- package/dist/recommend/ordered-logistic.d.ts +0 -49
- package/dist/recommend/ordered-logistic.d.ts.map +0 -1
- package/dist/recommend/ordered-logistic.js +0 -153
- package/dist/recommend/ordered-logistic.js.map +0 -1
- package/dist/recommend/questions.d.ts +0 -19
- package/dist/recommend/questions.d.ts.map +0 -1
- package/dist/recommend/questions.js +0 -73
- package/dist/recommend/questions.js.map +0 -1
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2025-12-27
|
|
3
|
+
type: Plan
|
|
4
|
+
topic: "Vibe-Check Evolution: Tracer Bullets, Investigation Gaps, and Middle Loop Detection"
|
|
5
|
+
research: ".agents/research/2025-12-27-vibe-check-evolution.md"
|
|
6
|
+
tags: [plan, vibe-check, metrics, tracers, investigation, middle-loop]
|
|
7
|
+
status: READY_FOR_APPROVAL
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Plan: Vibe-Check Evolution
|
|
11
|
+
|
|
12
|
+
**Created:** 2025-12-27
|
|
13
|
+
**Research:** [.agents/research/2025-12-27-vibe-check-evolution.md](.agents/research/2025-12-27-vibe-check-evolution.md)
|
|
14
|
+
**Vibe Level:** L3 (New features with clear patterns to follow)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
Implement the documented Enhancement Plan (P1-P2) plus two middle loop detectors to evolve vibe-check from an inner-loop-only tool to one that provides visibility into investigation time, proactive validation practices, and architectural health.
|
|
21
|
+
|
|
22
|
+
**What we're building:**
|
|
23
|
+
1. **Tracer Bullet Tracking** - Recognize `tracer:`/`tb:` commits and measure proactive validation ratio
|
|
24
|
+
2. **Investigation Gap Detection** - Surface hidden debugging time from commit timestamp gaps
|
|
25
|
+
3. **Eldritch Horror Detector** - Flag functions exceeding 200 lines (middle loop pattern)
|
|
26
|
+
4. **Domain Cohesion Score** - Measure how scattered changes are across domains
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Approach
|
|
31
|
+
|
|
32
|
+
Follow the existing metrics pattern in `src/metrics/`:
|
|
33
|
+
- Each metric is a separate file returning `MetricResult`
|
|
34
|
+
- Metrics are orchestrated in `src/metrics/index.ts`
|
|
35
|
+
- Types are defined in `src/types.ts`
|
|
36
|
+
- Tests follow the pattern in `tests/`
|
|
37
|
+
|
|
38
|
+
**Why this approach:**
|
|
39
|
+
- Consistent with existing architecture (100% TypeScript, clean separation)
|
|
40
|
+
- Each feature can be implemented and tested independently
|
|
41
|
+
- Minimal changes to existing code (additive, not destructive)
|
|
42
|
+
- Follows documented Enhancement Plan specifications
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Features
|
|
47
|
+
|
|
48
|
+
### Feature 1: Tracer Bullet Tracking
|
|
49
|
+
|
|
50
|
+
**Priority:** P1
|
|
51
|
+
**Type:** feature
|
|
52
|
+
**Depends On:** None
|
|
53
|
+
|
|
54
|
+
**Acceptance Criteria:**
|
|
55
|
+
- [ ] New commit type `tracer` recognized in git parser
|
|
56
|
+
- [ ] `src/metrics/tracers.ts` calculates tracer metrics
|
|
57
|
+
- [ ] Output shows tracer count, before-feature ratio, before-fix count
|
|
58
|
+
- [ ] Rating: ELITE >20% | HIGH >10% | MEDIUM >5% | LOW <5%
|
|
59
|
+
- [ ] Tests cover edge cases (no tracers, all tracers, mixed)
|
|
60
|
+
|
|
61
|
+
**Files Affected:**
|
|
62
|
+
- `src/git.ts` - Add `tracer` to commit type detection (line ~45)
|
|
63
|
+
- `src/types.ts` - Add `TracerMetrics` interface
|
|
64
|
+
- `src/metrics/tracers.ts` - NEW: Tracer calculation
|
|
65
|
+
- `src/metrics/index.ts` - Include tracer metrics in result
|
|
66
|
+
- `src/output/terminal.ts` - Display tracer section
|
|
67
|
+
- `tests/tracers.test.ts` - NEW: Unit tests
|
|
68
|
+
|
|
69
|
+
**Implementation Notes:**
|
|
70
|
+
```typescript
|
|
71
|
+
// Commit message patterns to match:
|
|
72
|
+
// "tracer: validate Redis connection"
|
|
73
|
+
// "tb: test SSE streaming"
|
|
74
|
+
// "tracer(fleet): mission directory flow"
|
|
75
|
+
const TRACER_PATTERNS = [/^tracer(?:\([^)]+\))?:/i, /^tb(?:\([^)]+\))?:/i];
|
|
76
|
+
|
|
77
|
+
interface TracerMetrics extends MetricResult {
|
|
78
|
+
tracerCount: number;
|
|
79
|
+
tracerBeforeFeature: number; // Tracers followed by feat: (good!)
|
|
80
|
+
tracerBeforeFix: number; // Tracers followed by fix: (too late!)
|
|
81
|
+
tracerRatio: number; // tracers / (feat + fix)
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Test Strategy:**
|
|
86
|
+
- Unit tests with mock commit lists
|
|
87
|
+
- Integration test with analyze command
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Feature 2: Investigation Gap Detection
|
|
92
|
+
|
|
93
|
+
**Priority:** P1
|
|
94
|
+
**Type:** feature
|
|
95
|
+
**Depends On:** None
|
|
96
|
+
|
|
97
|
+
**Acceptance Criteria:**
|
|
98
|
+
- [ ] `src/metrics/investigation.ts` analyzes commit timestamp gaps
|
|
99
|
+
- [ ] Gaps >15 min and <2 hours followed by `fix:` = investigation
|
|
100
|
+
- [ ] Output shows total investigation time estimate and longest gap
|
|
101
|
+
- [ ] Same-component detection uses existing logic from `spirals.ts`
|
|
102
|
+
- [ ] Tests cover various gap scenarios
|
|
103
|
+
|
|
104
|
+
**Files Affected:**
|
|
105
|
+
- `src/types.ts` - Add `InvestigationMetrics` interface
|
|
106
|
+
- `src/metrics/investigation.ts` - NEW: Gap analysis
|
|
107
|
+
- `src/metrics/index.ts` - Include investigation metrics in result
|
|
108
|
+
- `src/output/terminal.ts` - Display investigation section
|
|
109
|
+
- `tests/investigation.test.ts` - NEW: Unit tests
|
|
110
|
+
|
|
111
|
+
**Implementation Notes:**
|
|
112
|
+
```typescript
|
|
113
|
+
interface InvestigationGap {
|
|
114
|
+
startCommit: string; // Hash of commit before gap
|
|
115
|
+
endCommit: string; // Hash of commit after gap (the fix)
|
|
116
|
+
gapMinutes: number;
|
|
117
|
+
followedByFix: boolean;
|
|
118
|
+
component: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface InvestigationMetrics extends MetricResult {
|
|
122
|
+
gaps: InvestigationGap[];
|
|
123
|
+
totalMinutes: number;
|
|
124
|
+
longestGap: number;
|
|
125
|
+
gapCount: number;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Detection logic:
|
|
129
|
+
// - Gap > 15 min AND < 120 min (SESSION_GAP)
|
|
130
|
+
// - Next commit is type === 'fix'
|
|
131
|
+
// - Same component as previous commit
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Test Strategy:**
|
|
135
|
+
- Unit tests with mock commit lists at various time intervals
|
|
136
|
+
- Edge cases: no gaps, all gaps, gaps at session boundaries
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Feature 3: Domain Cohesion Score
|
|
141
|
+
|
|
142
|
+
**Priority:** P2
|
|
143
|
+
**Type:** feature
|
|
144
|
+
**Depends On:** None
|
|
145
|
+
|
|
146
|
+
**Acceptance Criteria:**
|
|
147
|
+
- [ ] `src/metrics/cohesion.ts` analyzes files changed per commit
|
|
148
|
+
- [ ] Domains extracted from top-level directories under `src/`
|
|
149
|
+
- [ ] Commits touching 3+ domains flagged as "scattered"
|
|
150
|
+
- [ ] Cohesion score = (cohesive commits / total) × 100
|
|
151
|
+
- [ ] Rating: ELITE >80% | HIGH >60% | MEDIUM >40% | LOW <40%
|
|
152
|
+
|
|
153
|
+
**Files Affected:**
|
|
154
|
+
- `src/types.ts` - Add `CohesionMetrics` interface
|
|
155
|
+
- `src/git.ts` - Add `getCommitFiles()` function (uses `git diff-tree`)
|
|
156
|
+
- `src/metrics/cohesion.ts` - NEW: Cohesion calculation
|
|
157
|
+
- `src/output/terminal.ts` - Display cohesion section
|
|
158
|
+
- `tests/cohesion.test.ts` - NEW: Unit tests
|
|
159
|
+
|
|
160
|
+
**Implementation Notes:**
|
|
161
|
+
```typescript
|
|
162
|
+
interface CohesionMetrics extends MetricResult {
|
|
163
|
+
avgDomainsPerCommit: number;
|
|
164
|
+
cohesiveCommits: number; // 1 domain
|
|
165
|
+
scatteredCommits: number; // 3+ domains
|
|
166
|
+
cohesionScore: number; // 0-100%
|
|
167
|
+
scatteredList: Array<{ // For verbose output
|
|
168
|
+
hash: string;
|
|
169
|
+
domains: string[];
|
|
170
|
+
}>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Domain extraction:
|
|
174
|
+
// src/fleet/... → "fleet"
|
|
175
|
+
// src/missions/... → "missions"
|
|
176
|
+
// server/... → "server" (top-level = domain)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Test Strategy:**
|
|
180
|
+
- Mock file lists with various domain distributions
|
|
181
|
+
- Edge cases: single file, all same domain, all different
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
### Feature 4: Eldritch Horror Detector
|
|
186
|
+
|
|
187
|
+
**Priority:** P2
|
|
188
|
+
**Type:** feature
|
|
189
|
+
**Depends On:** None
|
|
190
|
+
|
|
191
|
+
**Acceptance Criteria:**
|
|
192
|
+
- [ ] `src/analyzers/eldritch.ts` scans for oversized functions
|
|
193
|
+
- [ ] Functions >200 lines flagged as warning, >500 as critical
|
|
194
|
+
- [ ] Integrates with `audit` command output
|
|
195
|
+
- [ ] Provides file:line references for each horror
|
|
196
|
+
- [ ] Tests with sample files
|
|
197
|
+
|
|
198
|
+
**Files Affected:**
|
|
199
|
+
- `src/types.ts` - Add `EldritchHorrorResult` interface
|
|
200
|
+
- `src/analyzers/eldritch.ts` - NEW: Function length analysis
|
|
201
|
+
- `src/commands/audit.ts` - Include eldritch detection
|
|
202
|
+
- `src/output/terminal.ts` - Display eldritch section in audit
|
|
203
|
+
- `tests/eldritch.test.ts` - NEW: Unit tests
|
|
204
|
+
|
|
205
|
+
**Implementation Notes:**
|
|
206
|
+
```typescript
|
|
207
|
+
interface EldritchHorror {
|
|
208
|
+
file: string;
|
|
209
|
+
functionName: string;
|
|
210
|
+
lineStart: number;
|
|
211
|
+
lineCount: number;
|
|
212
|
+
severity: 'warning' | 'critical';
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
interface EldritchHorrorResult {
|
|
216
|
+
detected: boolean;
|
|
217
|
+
horrors: EldritchHorror[];
|
|
218
|
+
totalCount: number;
|
|
219
|
+
criticalCount: number;
|
|
220
|
+
warningCount: number;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Detection approach (simple regex, not full AST):
|
|
224
|
+
// Look for function/method declarations and count lines until closing brace
|
|
225
|
+
// Languages: .ts, .js, .py, .go
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Test Strategy:**
|
|
229
|
+
- Sample files with various function lengths
|
|
230
|
+
- Edge cases: nested functions, arrow functions, class methods
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### Feature 5: Extend Commit Types
|
|
235
|
+
|
|
236
|
+
**Priority:** P1
|
|
237
|
+
**Type:** refactor
|
|
238
|
+
**Depends On:** None (prerequisite for Feature 1)
|
|
239
|
+
|
|
240
|
+
**Acceptance Criteria:**
|
|
241
|
+
- [ ] `tracer` type added to Commit type union
|
|
242
|
+
- [ ] Git parser recognizes `tracer:` and `tb:` prefixes
|
|
243
|
+
- [ ] Commit counts include tracer count
|
|
244
|
+
- [ ] Backwards compatible (existing analysis unchanged)
|
|
245
|
+
|
|
246
|
+
**Files Affected:**
|
|
247
|
+
- `src/types.ts` - Add `tracer` to Commit type
|
|
248
|
+
- `src/git.ts` - Update parser regex
|
|
249
|
+
- `src/metrics/index.ts` - Add tracer to countCommitTypes
|
|
250
|
+
|
|
251
|
+
**Test Strategy:**
|
|
252
|
+
- Existing tests still pass
|
|
253
|
+
- New commits with `tracer:` prefix correctly typed
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
### Feature 6: Update Documentation
|
|
258
|
+
|
|
259
|
+
**Priority:** P3
|
|
260
|
+
**Type:** docs
|
|
261
|
+
**Depends On:** Features 1-4
|
|
262
|
+
|
|
263
|
+
**Acceptance Criteria:**
|
|
264
|
+
- [ ] README updated with new metrics descriptions
|
|
265
|
+
- [ ] CHANGELOG updated with version entry
|
|
266
|
+
- [ ] CLAUDE.md updated with new metric thresholds
|
|
267
|
+
- [ ] docs/METRICS.md updated (if exists)
|
|
268
|
+
|
|
269
|
+
**Files Affected:**
|
|
270
|
+
- `README.md`
|
|
271
|
+
- `CHANGELOG.md`
|
|
272
|
+
- `CLAUDE.md`
|
|
273
|
+
- `docs/ENHANCEMENT-PLAN.md` - Mark as IMPLEMENTED
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Implementation Order
|
|
278
|
+
|
|
279
|
+
| Step | Feature | Depends On | Validation |
|
|
280
|
+
|------|---------|------------|------------|
|
|
281
|
+
| 1 | Feature 5: Extend Commit Types | - | `npm test` passes |
|
|
282
|
+
| 2 | Feature 1: Tracer Bullet Tracking | Feature 5 | New tests pass, analyze shows tracers |
|
|
283
|
+
| 3 | Feature 2: Investigation Gap Detection | - | New tests pass, analyze shows gaps |
|
|
284
|
+
| 4 | Feature 3: Domain Cohesion Score | - | New tests pass, analyze shows cohesion |
|
|
285
|
+
| 5 | Feature 4: Eldritch Horror Detector | - | New tests pass, audit shows horrors |
|
|
286
|
+
| 6 | Feature 6: Update Documentation | 1-5 | README accurate |
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Beads Issues to Create
|
|
291
|
+
|
|
292
|
+
After approval, these issues will be created:
|
|
293
|
+
|
|
294
|
+
| ID | Title | Type | Priority | Depends On |
|
|
295
|
+
|----|-------|------|----------|------------|
|
|
296
|
+
| TBD | Epic: Vibe-Check Evolution v2.2 | epic | P1 | - |
|
|
297
|
+
| TBD | Extend commit types to include tracer | task | P1 | Epic |
|
|
298
|
+
| TBD | Implement tracer bullet tracking metric | feature | P1 | Commit types |
|
|
299
|
+
| TBD | Implement investigation gap detection | feature | P1 | Epic |
|
|
300
|
+
| TBD | Implement domain cohesion score | feature | P2 | Epic |
|
|
301
|
+
| TBD | Implement eldritch horror detector | feature | P2 | Epic |
|
|
302
|
+
| TBD | Update documentation for new metrics | task | P3 | All features |
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Version Bump
|
|
307
|
+
|
|
308
|
+
This is a **MINOR** version bump (v2.1.0 → v2.2.0):
|
|
309
|
+
- Adds new features (tracer tracking, investigation gaps, cohesion, eldritch)
|
|
310
|
+
- Backward compatible (existing CLI and output unchanged)
|
|
311
|
+
- No breaking changes
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Rollback Procedure
|
|
316
|
+
|
|
317
|
+
If something goes wrong:
|
|
318
|
+
1. `git revert` the feature commits
|
|
319
|
+
2. Existing metrics continue to work (additive changes)
|
|
320
|
+
3. No data migration needed (new fields are optional)
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Testing Strategy
|
|
325
|
+
|
|
326
|
+
1. **Unit Tests** - Each new metric file has corresponding test file
|
|
327
|
+
2. **Integration Tests** - Extend `cli.integration.test.ts` with new output validation
|
|
328
|
+
3. **Manual Testing** - Run against Houston repo (50k+ lines, real data)
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
# Run all tests
|
|
332
|
+
npm test
|
|
333
|
+
|
|
334
|
+
# Run specific test file
|
|
335
|
+
npm test -- tests/tracers.test.ts
|
|
336
|
+
|
|
337
|
+
# Manual validation
|
|
338
|
+
node dist/cli.js --since "1 week ago" --repo /path/to/houston
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Time Estimates
|
|
344
|
+
|
|
345
|
+
| Feature | Effort |
|
|
346
|
+
|---------|--------|
|
|
347
|
+
| Feature 5: Extend Commit Types | 30 min |
|
|
348
|
+
| Feature 1: Tracer Bullet Tracking | 1.5h |
|
|
349
|
+
| Feature 2: Investigation Gap Detection | 2h |
|
|
350
|
+
| Feature 3: Domain Cohesion Score | 2h |
|
|
351
|
+
| Feature 4: Eldritch Horror Detector | 2h |
|
|
352
|
+
| Feature 6: Documentation | 1h |
|
|
353
|
+
| **Total** | **~9 hours** |
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Next Steps
|
|
358
|
+
|
|
359
|
+
1. Review and approve this plan
|
|
360
|
+
2. Run beads issue creation (after approval)
|
|
361
|
+
3. `bd ready` to see unblocked issues
|
|
362
|
+
4. `/implement` to execute
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Open Questions
|
|
367
|
+
|
|
368
|
+
1. **Should tracer metrics affect overall rating?**
|
|
369
|
+
- Recommendation: Yes, but with lower weight initially
|
|
370
|
+
- Can calibrate based on user feedback
|
|
371
|
+
|
|
372
|
+
2. **Should investigation gaps be surfaced in watch mode?**
|
|
373
|
+
- Recommendation: No, watch mode is real-time; gaps are retrospective
|
|
374
|
+
|
|
375
|
+
3. **What file extensions should eldritch detector support?**
|
|
376
|
+
- Start with: `.ts`, `.js`, `.tsx`, `.jsx`, `.py`, `.go`
|
|
377
|
+
- Can extend later based on usage
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
**Output:** .agents/plans/2025-12-27-vibe-check-evolution-plan.md
|
|
382
|
+
|
|
383
|
+
**Next:** Approve plan → Create beads issues → `/implement`
|