@su-record/vibe 2.4.56 → 2.4.57
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.md +7 -18
- package/agents/compounder.md +1 -1
- package/agents/implementer.md +2 -1
- package/agents/simplifier.md +2 -1
- package/commands/vibe.run.md +4 -1
- package/commands/vibe.spec.md +56 -3
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +0 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/postinstall.js +32 -1
- package/dist/cli/postinstall.js.map +1 -1
- package/dist/cli/setup.d.ts +18 -4
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +87 -27
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/types.d.ts +6 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/languages/csharp-unity.md +516 -0
- package/languages/gdscript-godot.md +470 -0
- package/languages/ruby-rails.md +489 -0
- package/languages/typescript-angular.md +433 -0
- package/languages/typescript-astro.md +416 -0
- package/languages/typescript-electron.md +407 -0
- package/languages/typescript-nestjs.md +524 -0
- package/languages/typescript-svelte.md +407 -0
- package/languages/typescript-tauri.md +366 -0
- package/package.json +1 -1
- package/skills/vibe-capabilities.md +1 -1
- package/vibe/constitution.md +130 -97
- package/vibe/rules/core/communication-guide.md +50 -56
- package/vibe/rules/core/development-philosophy.md +35 -36
- package/vibe/rules/core/quick-start.md +66 -85
- package/vibe/rules/quality/bdd-contract-testing.md +94 -89
- package/vibe/rules/quality/checklist.md +132 -132
- package/vibe/rules/quality/testing-strategy.md +132 -129
- package/vibe/rules/standards/anti-patterns.md +74 -74
- package/vibe/rules/standards/code-structure.md +44 -44
- package/vibe/rules/standards/complexity-metrics.md +63 -62
- package/vibe/rules/standards/naming-conventions.md +72 -72
- package/vibe/templates/constitution-template.md +153 -95
- package/vibe/templates/contract-backend-template.md +41 -32
- package/vibe/templates/contract-frontend-template.md +35 -30
- package/vibe/templates/feature-template.md +33 -33
- package/vibe/templates/spec-template.md +118 -96
|
@@ -1,205 +1,205 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Final Verification Checklist
|
|
2
2
|
|
|
3
|
-
## 5.1
|
|
3
|
+
## 5.1 Enhanced Code Quality Check
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Top Priority
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
const topPriority = {
|
|
9
|
-
obeysTheGoldenRule: true, // ✅
|
|
10
|
-
preservesWorkingCode: true, // ✅
|
|
11
|
-
respectsExistingStyle: true, // ✅
|
|
9
|
+
obeysTheGoldenRule: true, // ✅ Only modify requested scope
|
|
10
|
+
preservesWorkingCode: true, // ✅ Preserve existing code
|
|
11
|
+
respectsExistingStyle: true, // ✅ Maintain existing style
|
|
12
12
|
};
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Type Safety
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
18
|
const typeSafety = {
|
|
19
|
-
noAnyType: true, // ✅ any
|
|
20
|
-
strictNullCheck: true, // ✅ null/undefined
|
|
21
|
-
properTypeGuards: true, // ✅
|
|
22
|
-
genericTypesWhenNeeded: true, // ✅
|
|
19
|
+
noAnyType: true, // ✅ No any type usage
|
|
20
|
+
strictNullCheck: true, // ✅ null/undefined check
|
|
21
|
+
properTypeGuards: true, // ✅ Use type guards
|
|
22
|
+
genericTypesWhenNeeded: true, // ✅ Use generic types
|
|
23
23
|
};
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
###
|
|
26
|
+
### Code Structure & Complexity
|
|
27
27
|
|
|
28
28
|
```typescript
|
|
29
29
|
const codeStructure = {
|
|
30
|
-
singleResponsibility: true, // ✅
|
|
31
|
-
functionUnder30Lines: true, // ✅
|
|
32
|
-
maxNesting3Levels: true, // ✅
|
|
33
|
-
cyclomaticComplexity: 10, // ✅
|
|
34
|
-
cognitiveComplexity: 15, // ✅
|
|
35
|
-
maxParameters: 5, // ✅
|
|
36
|
-
componentUnder50Lines: true, // ✅
|
|
30
|
+
singleResponsibility: true, // ✅ Single Responsibility Principle
|
|
31
|
+
functionUnder30Lines: true, // ✅ Functions ≤30 lines (recommended), 50 allowed
|
|
32
|
+
maxNesting3Levels: true, // ✅ Max nesting 3 levels
|
|
33
|
+
cyclomaticComplexity: 10, // ✅ Cyclomatic complexity ≤ 10
|
|
34
|
+
cognitiveComplexity: 15, // ✅ Cognitive complexity ≤ 15
|
|
35
|
+
maxParameters: 5, // ✅ Max 5 parameters
|
|
36
|
+
componentUnder50Lines: true, // ✅ Component JSX ≤50 lines
|
|
37
37
|
};
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
### Halstead
|
|
40
|
+
### Halstead Metrics
|
|
41
41
|
|
|
42
42
|
```typescript
|
|
43
43
|
const halsteadMetrics = {
|
|
44
|
-
vocabulary: true, // ✅
|
|
45
|
-
difficulty: true, // ✅
|
|
46
|
-
effort: true, // ✅
|
|
47
|
-
lowComplexity: true, // ✅
|
|
44
|
+
vocabulary: true, // ✅ Operator/operand diversity
|
|
45
|
+
difficulty: true, // ✅ Code comprehension difficulty
|
|
46
|
+
effort: true, // ✅ Mental effort
|
|
47
|
+
lowComplexity: true, // ✅ Maintain low complexity
|
|
48
48
|
};
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
###
|
|
51
|
+
### Coupling & Cohesion
|
|
52
52
|
|
|
53
53
|
```typescript
|
|
54
54
|
const couplingCohesion = {
|
|
55
|
-
looseCoupling: true, // ✅
|
|
56
|
-
highCohesion: true, // ✅
|
|
57
|
-
noCircularDeps: true, // ✅
|
|
58
|
-
dependencyInjection: true, // ✅
|
|
55
|
+
looseCoupling: true, // ✅ Loose coupling (≤ 7 dependencies)
|
|
56
|
+
highCohesion: true, // ✅ High cohesion (group related functions only)
|
|
57
|
+
noCircularDeps: true, // ✅ No circular dependencies
|
|
58
|
+
dependencyInjection: true, // ✅ Dependency injection pattern
|
|
59
59
|
};
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
###
|
|
62
|
+
### Error Handling
|
|
63
63
|
|
|
64
64
|
```typescript
|
|
65
65
|
const errorHandling = {
|
|
66
66
|
hasErrorHandling: true, // ✅ try-catch/error state
|
|
67
|
-
hasLoadingState: true, // ✅
|
|
68
|
-
hasFallbackUI: true, // ✅
|
|
69
|
-
properErrorMessages: true, // ✅
|
|
70
|
-
errorBoundaries: true, // ✅ Error
|
|
67
|
+
hasLoadingState: true, // ✅ Loading state
|
|
68
|
+
hasFallbackUI: true, // ✅ Fallback UI
|
|
69
|
+
properErrorMessages: true, // ✅ Clear error messages
|
|
70
|
+
errorBoundaries: true, // ✅ Use Error Boundaries
|
|
71
71
|
};
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
###
|
|
74
|
+
### Accessibility
|
|
75
75
|
|
|
76
76
|
```typescript
|
|
77
77
|
const accessibility = {
|
|
78
|
-
hasAriaLabels: true, // ✅ ARIA
|
|
79
|
-
keyboardAccessible: true, // ✅
|
|
80
|
-
semanticHTML: true, // ✅
|
|
81
|
-
focusManagement: true, // ✅
|
|
82
|
-
screenReaderFriendly: true, // ✅
|
|
78
|
+
hasAriaLabels: true, // ✅ ARIA labels
|
|
79
|
+
keyboardAccessible: true, // ✅ Keyboard accessibility
|
|
80
|
+
semanticHTML: true, // ✅ Semantic HTML
|
|
81
|
+
focusManagement: true, // ✅ Focus management
|
|
82
|
+
screenReaderFriendly: true, // ✅ Screen reader support
|
|
83
83
|
};
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
###
|
|
86
|
+
### Performance
|
|
87
87
|
|
|
88
88
|
```typescript
|
|
89
89
|
const performance = {
|
|
90
|
-
noUnnecessaryRenders: true, // ✅
|
|
91
|
-
memoizedExpensive: true, // ✅
|
|
92
|
-
lazyLoading: true, // ✅
|
|
93
|
-
batchOperations: true, // ✅ API
|
|
94
|
-
optimizedImages: true, // ✅
|
|
95
|
-
codesplitting: true, // ✅
|
|
90
|
+
noUnnecessaryRenders: true, // ✅ Prevent unnecessary re-renders
|
|
91
|
+
memoizedExpensive: true, // ✅ Memoize expensive operations
|
|
92
|
+
lazyLoading: true, // ✅ Lazy loading
|
|
93
|
+
batchOperations: true, // ✅ Batch API calls
|
|
94
|
+
optimizedImages: true, // ✅ Optimized images
|
|
95
|
+
codesplitting: true, // ✅ Code splitting
|
|
96
96
|
};
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
###
|
|
99
|
+
### Maintainability
|
|
100
100
|
|
|
101
101
|
```typescript
|
|
102
102
|
const maintainability = {
|
|
103
|
-
hasJSDoc: true, // ✅
|
|
104
|
-
noMagicNumbers: true, // ✅
|
|
105
|
-
consistentNaming: true, // ✅
|
|
106
|
-
properComments: true, // ✅
|
|
107
|
-
testable: true, // ✅
|
|
103
|
+
hasJSDoc: true, // ✅ Document key functions
|
|
104
|
+
noMagicNumbers: true, // ✅ No magic numbers
|
|
105
|
+
consistentNaming: true, // ✅ Consistent naming
|
|
106
|
+
properComments: true, // ✅ Appropriate comments
|
|
107
|
+
testable: true, // ✅ Testable structure
|
|
108
108
|
};
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
###
|
|
111
|
+
### Security
|
|
112
112
|
|
|
113
113
|
```typescript
|
|
114
114
|
const security = {
|
|
115
|
-
noHardcodedSecrets: true, // ✅
|
|
116
|
-
inputValidation: true, // ✅
|
|
117
|
-
xssPrevention: true, // ✅ XSS
|
|
118
|
-
csrfProtection: true, // ✅ CSRF
|
|
119
|
-
sqlInjectionPrevention: true, // ✅ SQL Injection
|
|
115
|
+
noHardcodedSecrets: true, // ✅ No hardcoded secrets
|
|
116
|
+
inputValidation: true, // ✅ Input validation
|
|
117
|
+
xssPrevention: true, // ✅ XSS prevention
|
|
118
|
+
csrfProtection: true, // ✅ CSRF protection
|
|
119
|
+
sqlInjectionPrevention: true, // ✅ SQL Injection prevention
|
|
120
120
|
};
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
## 5.2
|
|
123
|
+
## 5.2 Project Check
|
|
124
124
|
|
|
125
|
-
###
|
|
125
|
+
### Dependency Management
|
|
126
126
|
|
|
127
127
|
```typescript
|
|
128
128
|
const dependencies = {
|
|
129
|
-
noUnusedDeps: true, // ✅
|
|
130
|
-
noDuplicateDeps: true, // ✅
|
|
131
|
-
upToDateDeps: true, // ✅
|
|
132
|
-
securePackages: true, // ✅
|
|
129
|
+
noUnusedDeps: true, // ✅ No unused packages
|
|
130
|
+
noDuplicateDeps: true, // ✅ No duplicate functionality packages
|
|
131
|
+
upToDateDeps: true, // ✅ Keep up to date
|
|
132
|
+
securePackages: true, // ✅ No security vulnerabilities
|
|
133
133
|
};
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
###
|
|
136
|
+
### File Structure
|
|
137
137
|
|
|
138
138
|
```typescript
|
|
139
139
|
const fileStructure = {
|
|
140
|
-
consistentStructure: true, // ✅
|
|
141
|
-
noCircularDeps: true, // ✅
|
|
142
|
-
logicalGrouping: true, // ✅
|
|
143
|
-
clearNaming: true, // ✅
|
|
140
|
+
consistentStructure: true, // ✅ Consistent folder structure
|
|
141
|
+
noCircularDeps: true, // ✅ No circular references
|
|
142
|
+
logicalGrouping: true, // ✅ Logical grouping
|
|
143
|
+
clearNaming: true, // ✅ Clear file names
|
|
144
144
|
};
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
###
|
|
147
|
+
### Bundle Optimization
|
|
148
148
|
|
|
149
149
|
```typescript
|
|
150
150
|
const bundleOptimization = {
|
|
151
151
|
treeShaking: true, // ✅ Tree shaking
|
|
152
152
|
codeSplitting: true, // ✅ Code splitting
|
|
153
153
|
lazyLoading: true, // ✅ Lazy loading
|
|
154
|
-
minification: true, // ✅
|
|
155
|
-
compression: true, // ✅
|
|
154
|
+
minification: true, // ✅ Minification
|
|
155
|
+
compression: true, // ✅ Compression (gzip/brotli)
|
|
156
156
|
};
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
##
|
|
159
|
+
## Checklist Usage
|
|
160
160
|
|
|
161
|
-
###
|
|
161
|
+
### Before Writing Code
|
|
162
162
|
|
|
163
|
-
```
|
|
164
|
-
[ ]
|
|
165
|
-
[ ]
|
|
166
|
-
[ ]
|
|
167
|
-
[ ]
|
|
163
|
+
```text
|
|
164
|
+
[ ] Clearly understand requirements
|
|
165
|
+
[ ] Identify existing code patterns
|
|
166
|
+
[ ] Confirm impact scope
|
|
167
|
+
[ ] Establish test plan
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
###
|
|
170
|
+
### While Writing Code
|
|
171
171
|
|
|
172
|
-
```
|
|
173
|
-
[ ]
|
|
174
|
-
[ ]
|
|
175
|
-
[ ]
|
|
176
|
-
[ ]
|
|
177
|
-
[ ]
|
|
172
|
+
```text
|
|
173
|
+
[ ] Follow Single Responsibility Principle
|
|
174
|
+
[ ] Keep function length ≤30 lines (max 50)
|
|
175
|
+
[ ] Nesting depth ≤3 levels
|
|
176
|
+
[ ] Extract magic numbers to constants
|
|
177
|
+
[ ] Ensure type safety
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
###
|
|
180
|
+
### After Writing Code
|
|
181
181
|
|
|
182
|
-
```
|
|
183
|
-
[ ]
|
|
184
|
-
[ ]
|
|
185
|
-
[ ]
|
|
186
|
-
[ ]
|
|
187
|
-
[ ]
|
|
182
|
+
```text
|
|
183
|
+
[ ] Type check passes
|
|
184
|
+
[ ] No linter warnings
|
|
185
|
+
[ ] Tests written and passing
|
|
186
|
+
[ ] Documentation complete
|
|
187
|
+
[ ] Ready for code review
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
###
|
|
190
|
+
### Before Commit
|
|
191
191
|
|
|
192
|
-
```
|
|
193
|
-
[ ]
|
|
194
|
-
[ ]
|
|
195
|
-
[ ]
|
|
196
|
-
[ ]
|
|
197
|
-
[ ]
|
|
192
|
+
```text
|
|
193
|
+
[ ] Remove unnecessary code
|
|
194
|
+
[ ] Remove console logs
|
|
195
|
+
[ ] Clean up comments
|
|
196
|
+
[ ] Apply formatting
|
|
197
|
+
[ ] Write meaningful commit message
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
##
|
|
200
|
+
## Automated Verification Tools
|
|
201
201
|
|
|
202
|
-
### ESLint
|
|
202
|
+
### ESLint Configuration
|
|
203
203
|
|
|
204
204
|
```javascript
|
|
205
205
|
// .eslintrc.js
|
|
@@ -215,7 +215,7 @@ module.exports = {
|
|
|
215
215
|
};
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
-
### TypeScript
|
|
218
|
+
### TypeScript Configuration
|
|
219
219
|
|
|
220
220
|
```json
|
|
221
221
|
// tsconfig.json
|
|
@@ -225,7 +225,7 @@ module.exports = {
|
|
|
225
225
|
"noImplicitAny": true,
|
|
226
226
|
"strictNullChecks": true,
|
|
227
227
|
"noUnusedLocals": true,
|
|
228
|
-
"noUnusedParameters": true
|
|
228
|
+
"noUnusedParameters": true
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
```
|
|
@@ -236,41 +236,41 @@ module.exports = {
|
|
|
236
236
|
#!/bin/sh
|
|
237
237
|
# .husky/pre-commit
|
|
238
238
|
|
|
239
|
-
#
|
|
239
|
+
# Type check
|
|
240
240
|
npm run type-check
|
|
241
241
|
|
|
242
|
-
#
|
|
242
|
+
# Linting
|
|
243
243
|
npm run lint
|
|
244
244
|
|
|
245
|
-
#
|
|
245
|
+
# Tests
|
|
246
246
|
npm run test
|
|
247
247
|
|
|
248
|
-
#
|
|
248
|
+
# Format check
|
|
249
249
|
npm run format:check
|
|
250
250
|
```
|
|
251
251
|
|
|
252
|
-
##
|
|
253
|
-
|
|
254
|
-
|
|
|
255
|
-
|
|
256
|
-
| A+ | 95-100 |
|
|
257
|
-
| A | 90-94 |
|
|
258
|
-
| B+ | 85-89 |
|
|
259
|
-
| B | 80-84 |
|
|
260
|
-
| C+ | 75-79 |
|
|
261
|
-
| C | 70-74 |
|
|
262
|
-
| F | < 70 |
|
|
263
|
-
|
|
264
|
-
##
|
|
265
|
-
|
|
266
|
-
```
|
|
267
|
-
✅
|
|
268
|
-
✅ any
|
|
269
|
-
✅
|
|
270
|
-
✅
|
|
271
|
-
✅
|
|
272
|
-
✅
|
|
273
|
-
✅
|
|
252
|
+
## Grade Criteria
|
|
253
|
+
|
|
254
|
+
| Grade | Score | Description |
|
|
255
|
+
|-------|-------|-------------|
|
|
256
|
+
| A+ | 95-100 | Perfect code quality |
|
|
257
|
+
| A | 90-94 | Excellent quality |
|
|
258
|
+
| B+ | 85-89 | Good quality |
|
|
259
|
+
| B | 80-84 | Improvement recommended |
|
|
260
|
+
| C+ | 75-79 | Improvement needed |
|
|
261
|
+
| C | 70-74 | Immediate improvement needed |
|
|
262
|
+
| F | < 70 | Refactoring required |
|
|
263
|
+
|
|
264
|
+
## Quick Check (1 minute)
|
|
265
|
+
|
|
266
|
+
```text
|
|
267
|
+
✅ Only modified requested scope?
|
|
268
|
+
✅ No any types?
|
|
269
|
+
✅ Functions ≤30 lines? (max 50)
|
|
270
|
+
✅ Nesting ≤3 levels?
|
|
271
|
+
✅ Error handling implemented?
|
|
272
|
+
✅ Magic numbers extracted to constants?
|
|
273
|
+
✅ Tests written?
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
-
7
|
|
276
|
+
All 7 Yes → Ready to deploy ✅
|