@boshu2/vibe-check 2.0.0 → 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.
Files changed (61) hide show
  1. package/.agents/plans/2025-12-27-vibe-check-evolution-plan.md +383 -0
  2. package/.agents/research/2025-12-27-vibe-check-evolution.md +352 -0
  3. package/.claude/settings.local.json +8 -2
  4. package/CHANGELOG.md +33 -0
  5. package/CLAUDE.md +201 -26
  6. package/README.md +95 -0
  7. package/dist/analyzers/eldritch.d.ts +40 -0
  8. package/dist/analyzers/eldritch.d.ts.map +1 -0
  9. package/dist/analyzers/eldritch.js +202 -0
  10. package/dist/analyzers/eldritch.js.map +1 -0
  11. package/dist/analyzers/modularity.d.ts +67 -0
  12. package/dist/analyzers/modularity.d.ts.map +1 -0
  13. package/dist/analyzers/modularity.js +254 -0
  14. package/dist/analyzers/modularity.js.map +1 -0
  15. package/dist/cli.js +2 -1
  16. package/dist/cli.js.map +1 -1
  17. package/dist/commands/analyze.d.ts.map +1 -1
  18. package/dist/commands/analyze.js +11 -1
  19. package/dist/commands/analyze.js.map +1 -1
  20. package/dist/commands/audit.d.ts.map +1 -1
  21. package/dist/commands/audit.js +25 -0
  22. package/dist/commands/audit.js.map +1 -1
  23. package/dist/commands/forensics.d.ts +8 -0
  24. package/dist/commands/forensics.d.ts.map +1 -1
  25. package/dist/commands/forensics.js +51 -4
  26. package/dist/commands/forensics.js.map +1 -1
  27. package/dist/commands/index.d.ts +1 -0
  28. package/dist/commands/index.d.ts.map +1 -1
  29. package/dist/commands/index.js +1 -0
  30. package/dist/commands/index.js.map +1 -1
  31. package/dist/commands/modularity.d.ts +27 -0
  32. package/dist/commands/modularity.d.ts.map +1 -0
  33. package/dist/commands/modularity.js +182 -0
  34. package/dist/commands/modularity.js.map +1 -0
  35. package/dist/git.d.ts.map +1 -1
  36. package/dist/git.js +8 -2
  37. package/dist/git.js.map +1 -1
  38. package/dist/metrics/cohesion.d.ts +27 -0
  39. package/dist/metrics/cohesion.d.ts.map +1 -0
  40. package/dist/metrics/cohesion.js +134 -0
  41. package/dist/metrics/cohesion.js.map +1 -0
  42. package/dist/metrics/index.d.ts +8 -0
  43. package/dist/metrics/index.d.ts.map +1 -1
  44. package/dist/metrics/index.js +36 -0
  45. package/dist/metrics/index.js.map +1 -1
  46. package/dist/metrics/investigation.d.ts +25 -0
  47. package/dist/metrics/investigation.d.ts.map +1 -0
  48. package/dist/metrics/investigation.js +115 -0
  49. package/dist/metrics/investigation.js.map +1 -0
  50. package/dist/metrics/tracers.d.ts +28 -0
  51. package/dist/metrics/tracers.d.ts.map +1 -0
  52. package/dist/metrics/tracers.js +117 -0
  53. package/dist/metrics/tracers.js.map +1 -0
  54. package/dist/output/terminal.d.ts.map +1 -1
  55. package/dist/output/terminal.js +34 -1
  56. package/dist/output/terminal.js.map +1 -1
  57. package/dist/types.d.ts +36 -1
  58. package/dist/types.d.ts.map +1 -1
  59. package/docs/ENHANCEMENT-PLAN.md +32 -14
  60. package/package.json +1 -1
  61. package/.claude/skills/typescript-review.md +0 -152
@@ -1,152 +0,0 @@
1
- # TypeScript Code Review Skill
2
-
3
- **Trigger:** User asks for TypeScript review, type safety audit, or TS best practices check.
4
-
5
- **Purpose:** Systematic TypeScript code review focusing on type safety, patterns, and idiomatic usage.
6
-
7
- ---
8
-
9
- ## Review Checklist
10
-
11
- ### 1. Compiler Configuration (tsconfig.json)
12
-
13
- | Setting | Recommended | Why |
14
- |---------|-------------|-----|
15
- | `strict` | `true` | Enables all strict checks |
16
- | `noImplicitAny` | `true` (via strict) | No silent `any` types |
17
- | `strictNullChecks` | `true` (via strict) | Catch null/undefined errors |
18
- | `noUncheckedIndexedAccess` | `true` | Arrays return `T \| undefined` |
19
- | `exactOptionalPropertyTypes` | `true` | Distinguish `undefined` vs missing |
20
- | `noImplicitReturns` | `true` | All code paths must return |
21
- | `noFallthroughCasesInSwitch` | `true` | Prevent switch fallthrough bugs |
22
-
23
- ### 2. Type Safety Issues
24
-
25
- **Critical (fix immediately):**
26
- - [ ] Explicit `any` types
27
- - [ ] Type assertions without validation (`as Type`)
28
- - [ ] Non-null assertions (`!`) without checks
29
- - [ ] `@ts-ignore` or `@ts-expect-error` comments
30
- - [ ] Missing return types on exported functions
31
-
32
- **Warning (improve when possible):**
33
- - [ ] Implicit `any` in callbacks
34
- - [ ] Overly broad types (`object`, `{}`, `Function`)
35
- - [ ] Missing generics where reuse is possible
36
- - [ ] Type assertions that could be type guards
37
-
38
- ### 3. Type Design Patterns
39
-
40
- **Good patterns to look for:**
41
- ```typescript
42
- // Discriminated unions
43
- type Result<T> =
44
- | { success: true; data: T }
45
- | { success: false; error: string };
46
-
47
- // Branded types for IDs
48
- type UserId = string & { readonly brand: unique symbol };
49
-
50
- // Const assertions for literals
51
- const STATUSES = ['pending', 'active', 'done'] as const;
52
- type Status = typeof STATUSES[number];
53
-
54
- // Type guards
55
- function isUser(obj: unknown): obj is User {
56
- return typeof obj === 'object' && obj !== null && 'id' in obj;
57
- }
58
- ```
59
-
60
- **Anti-patterns to flag:**
61
- ```typescript
62
- // ❌ Stringly-typed
63
- function setStatus(status: string) { }
64
-
65
- // ✅ Union type
66
- function setStatus(status: 'pending' | 'active' | 'done') { }
67
-
68
- // ❌ Optional chaining hiding bugs
69
- const name = user?.profile?.name ?? 'Unknown';
70
-
71
- // ✅ Explicit null handling
72
- if (!user || !user.profile) {
73
- throw new Error('User profile required');
74
- }
75
- const name = user.profile.name;
76
- ```
77
-
78
- ### 4. Interface vs Type
79
-
80
- | Use Interface | Use Type |
81
- |---------------|----------|
82
- | Object shapes | Unions, intersections |
83
- | Extendable contracts | Computed types |
84
- | Class implementations | Mapped types |
85
- | Public API | Internal aliases |
86
-
87
- ### 5. Export Hygiene
88
-
89
- - [ ] Are internal types exported unnecessarily?
90
- - [ ] Is there a central `types.ts` for shared types?
91
- - [ ] Are re-exports organized (`index.ts` barrels)?
92
-
93
- ---
94
-
95
- ## Review Process
96
-
97
- 1. **Check tsconfig.json** - Verify strict settings
98
- 2. **Run `tsc --noEmit`** - Catch all compiler errors
99
- 3. **Search for anti-patterns:**
100
- ```bash
101
- grep -r ": any" src/
102
- grep -r "as " src/ | grep -v "import"
103
- grep -r "@ts-ignore" src/
104
- grep -r "!" src/ | grep -v "!=" | grep -v "!=="
105
- ```
106
- 4. **Review types.ts** - Check type design
107
- 5. **Sample 3-5 files** - Deep review patterns
108
-
109
- ---
110
-
111
- ## Output Format
112
-
113
- ```markdown
114
- ## TypeScript Review: [Project Name]
115
-
116
- ### Config Score: X/10
117
- [tsconfig.json findings]
118
-
119
- ### Type Safety Score: X/10
120
- [Anti-pattern counts and examples]
121
-
122
- ### Type Design Score: X/10
123
- [Pattern quality assessment]
124
-
125
- ### Top Issues
126
- 1. [Most critical issue]
127
- 2. [Second issue]
128
- 3. [Third issue]
129
-
130
- ### Recommendations
131
- - [ ] [Actionable fix 1]
132
- - [ ] [Actionable fix 2]
133
- - [ ] [Actionable fix 3]
134
- ```
135
-
136
- ---
137
-
138
- ## Quick Fixes
139
-
140
- ```bash
141
- # Find all `any` types
142
- grep -rn ": any" src/
143
-
144
- # Find type assertions
145
- grep -rn " as [A-Z]" src/
146
-
147
- # Find non-null assertions
148
- grep -rn "\![^=]" src/
149
-
150
- # Run strict type check
151
- npx tsc --noEmit --strict
152
- ```