@vibecodeqa/cli 0.42.0 → 0.44.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/README.md +130 -165
- package/dist/check-meta.js +59 -6
- package/dist/cli.js +299 -762
- package/dist/commands/explain.d.ts +2 -0
- package/dist/commands/explain.js +33 -0
- package/dist/commands/fix.d.ts +6 -0
- package/dist/commands/fix.js +157 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.js +96 -0
- package/dist/commands/shared.d.ts +4 -0
- package/dist/commands/shared.js +80 -0
- package/dist/core.d.ts +1 -0
- package/dist/core.js +12 -1
- package/dist/delta.d.ts +45 -0
- package/dist/delta.js +158 -0
- package/dist/detect.js +2 -2
- package/dist/pr-comment.d.ts +1 -1
- package/dist/pr-comment.js +23 -4
- package/dist/report/html.d.ts +1 -1
- package/dist/report/html.js +7 -2
- package/dist/report/pages.d.ts +2 -0
- package/dist/report/pages.js +167 -0
- package/dist/report/styles.d.ts +1 -1
- package/dist/report/styles.js +37 -0
- package/dist/runners/accessibility.js +4 -1
- package/dist/runners/best-practices.js +1 -1
- package/dist/runners/confusion.js +28 -17
- package/dist/runners/design-consistency.d.ts +12 -0
- package/dist/runners/design-consistency.js +125 -0
- package/dist/runners/error-handling.js +18 -2
- package/dist/runners/file-cohesion.d.ts +17 -0
- package/dist/runners/file-cohesion.js +177 -0
- package/dist/runners/frontend-health.d.ts +14 -0
- package/dist/runners/frontend-health.js +206 -0
- package/dist/runners/html-quality.d.ts +8 -0
- package/dist/runners/html-quality.js +203 -0
- package/dist/runners/lint.js +6 -1
- package/dist/runners/react.js +1 -0
- package/dist/runners/secrets.js +7 -2
- package/dist/runners/security.js +7 -1
- package/dist/runners/standards.d.ts +2 -2
- package/dist/runners/standards.js +45 -12
- package/dist/runners/structure.js +1 -1
- package/dist/runners/styling.d.ts +15 -0
- package/dist/runners/styling.js +280 -0
- package/dist/runners/testing.js +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,249 +2,214 @@
|
|
|
2
2
|
|
|
3
3
|
**Code health scanner for the AI coding era.**
|
|
4
4
|
|
|
5
|
-
One command.
|
|
5
|
+
One command. 34 checks. AI-powered fixes. Zero config.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npx @vibecodeqa/cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
   
|
|
12
12
|
|
|
13
13
|
## What it does
|
|
14
14
|
|
|
15
|
-
vcqa scans your
|
|
15
|
+
vcqa scans your codebase and produces a scored health report with actionable findings. Auto-detects your stack (React, Vue, Svelte, Flutter, monorepos) and runs 34 checks across 7 categories.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
**Scan → See issues → AI fixes them → Score improves.**
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
```bash
|
|
20
|
+
npx @vibecodeqa/cli # scan + full HTML report
|
|
21
|
+
npx @vibecodeqa/cli fix --ai # AI-powered code fixes
|
|
22
|
+
npx @vibecodeqa/cli --skip-tests --top # fast scan + top issues
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Install everywhere
|
|
20
26
|
|
|
21
27
|
```bash
|
|
22
|
-
#
|
|
28
|
+
# CLI (one command, no install needed)
|
|
23
29
|
npx @vibecodeqa/cli
|
|
24
30
|
|
|
25
|
-
#
|
|
26
|
-
|
|
31
|
+
# GitHub Action (automatic PR scanning)
|
|
32
|
+
- uses: vibecodeqa/action@v1
|
|
33
|
+
with:
|
|
34
|
+
fail-under: "70"
|
|
27
35
|
|
|
28
|
-
#
|
|
29
|
-
|
|
36
|
+
# VS Code Extension
|
|
37
|
+
ext install vibecodeqa
|
|
30
38
|
|
|
31
|
-
#
|
|
32
|
-
npx @vibecodeqa/
|
|
39
|
+
# MCP Server (for AI coding agents)
|
|
40
|
+
claude mcp add vcqa -- npx @vibecodeqa/mcp
|
|
33
41
|
|
|
34
|
-
#
|
|
35
|
-
|
|
42
|
+
# Programmatic API
|
|
43
|
+
import { scan } from "@vibecodeqa/cli/core";
|
|
44
|
+
const report = await scan("./src");
|
|
45
|
+
```
|
|
36
46
|
|
|
37
|
-
|
|
38
|
-
npx @vibecodeqa/cli --badge
|
|
47
|
+
## AI-Powered Fix
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
npx @vibecodeqa/cli --sarif
|
|
49
|
+
Don't just find problems — fix them:
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
npx @vibecodeqa/cli
|
|
51
|
+
```bash
|
|
52
|
+
npx @vibecodeqa/cli fix --ai # fix all issues
|
|
53
|
+
npx @vibecodeqa/cli fix --ai --check security # fix only security
|
|
54
|
+
npx @vibecodeqa/cli fix --ai --dry-run # preview without applying
|
|
45
55
|
```
|
|
46
56
|
|
|
47
|
-
|
|
48
|
-
- `report/index.html` — navigable multi-page dashboard (open in browser)
|
|
49
|
-
- `report.json` — machine-readable results
|
|
50
|
-
- `badge.svg` — shields.io-style badge (with `--badge`)
|
|
51
|
-
- `report.sarif` — SARIF 2.1.0 for GitHub Code Scanning (with `--sarif`)
|
|
52
|
-
- `history/` — last 30 reports for trend tracking
|
|
57
|
+
Uses Claude to read your code context, understand the issue, and generate a targeted fix. Requires `ANTHROPIC_API_KEY`.
|
|
53
58
|
|
|
54
|
-
## Checks
|
|
59
|
+
## 34 Checks
|
|
55
60
|
|
|
56
61
|
### Foundations (23%)
|
|
57
62
|
|
|
58
63
|
| Check | Weight | What it measures |
|
|
59
64
|
|-------|--------|-----------------|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
+
| Structure | 6% | Standard files, lockfile, test-to-source ratio |
|
|
66
|
+
| Lint | 5% | Biome or ESLint errors/warnings |
|
|
67
|
+
| Types | 6% | TypeScript compilation errors |
|
|
68
|
+
| Type Safety | 3% | `as any`, `@ts-ignore`, non-null assertions |
|
|
69
|
+
| Standards | 3% | File naming, large files, code smells |
|
|
65
70
|
|
|
66
|
-
### Quality (
|
|
71
|
+
### Quality (28%)
|
|
67
72
|
|
|
68
73
|
| Check | Weight | What it measures |
|
|
69
74
|
|-------|--------|-----------------|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
- **E2E detection** — Playwright/Cypress configured?
|
|
75
|
+
| Complexity | 5% | Cognitive complexity per function |
|
|
76
|
+
| Duplication | 3% | Copy-pasted 6+ line blocks |
|
|
77
|
+
| Error Handling | 3% | Empty catch, throw string, floating promises |
|
|
78
|
+
| React Patterns | 3% | Conditional hooks, missing keys |
|
|
79
|
+
| Accessibility | 4% | img alt, click handlers, form labels |
|
|
80
|
+
| Docs | 3% | README quality, JSDoc coverage |
|
|
81
|
+
| Best Practices | 3% | CI/CD, supply chain, repo hygiene |
|
|
82
|
+
| HTML Quality | — | Static site: meta tags, broken links, heading hierarchy, render-blocking scripts |
|
|
83
|
+
| Frontend Health | 2% | UI framework conflicts, mixed icons, unoptimized images, heavy imports |
|
|
84
|
+
| Styling | 1% | Hardcoded colors, mixed approaches, !important, inconsistent spacing |
|
|
85
|
+
| Env Validation | 1% | .env hygiene, .env.example drift |
|
|
86
|
+
| Git Hygiene | 1% | Merge conflicts, commit quality, large/binary files |
|
|
87
|
+
| Memory Safety | 1% | Interval/listener leaks, unclosed observers, global pollution |
|
|
88
|
+
|
|
89
|
+
### Testing (13%)
|
|
90
|
+
|
|
91
|
+
Deep assessment: pyramid presence, execution, coverage, file pairing, quality metrics, E2E detection.
|
|
88
92
|
|
|
89
93
|
### Architecture (9%)
|
|
90
94
|
|
|
91
95
|
| Check | Weight | What it measures |
|
|
92
96
|
|-------|--------|-----------------|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
97
|
+
| Architecture | 5% | Import graph, circular deps, god modules, orphans |
|
|
98
|
+
| Performance | 4% | Barrel imports, heavy deps, dynamic import opportunities |
|
|
99
|
+
| Container Health | — | Dockerfile best practices, .dockerignore, pinned images |
|
|
95
100
|
|
|
96
101
|
### Security (16%)
|
|
97
102
|
|
|
98
103
|
| Check | Weight | What it measures |
|
|
99
104
|
|-------|--------|-----------------|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
104
|
-
### AI Readiness (11%)
|
|
105
|
+
| Secrets | 6% | Hardcoded keys (AWS, GitHub, Stripe, OpenAI, Anthropic) |
|
|
106
|
+
| Security | 5% | 31 CWE patterns (XSS, injection, SSRF, CORS) |
|
|
107
|
+
| Dependencies | 5% | npm audit CVEs, outdated packages |
|
|
105
108
|
|
|
106
|
-
|
|
109
|
+
### AI Readiness (9%)
|
|
107
110
|
|
|
108
111
|
| Check | Weight | What it measures |
|
|
109
112
|
|-------|--------|-----------------|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
113
|
+
| Confusion Index | 4% | Naming ambiguity that confuses LLMs |
|
|
114
|
+
| Context Locality | 5% | Token density, import depth, circular deps |
|
|
112
115
|
|
|
113
116
|
### AI Analysis (PRO)
|
|
114
117
|
|
|
115
118
|
| Check | What it measures |
|
|
116
119
|
|-------|-----------------|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
+
| Doc Coherence | Contradictions between docs and code |
|
|
121
|
+
| Code Coherence | Internal inconsistencies across modules |
|
|
122
|
+
| Comment Staleness | Stale TODOs, numeric mismatches, commented-out code |
|
|
123
|
+
| Dead Patterns | Leftover code from incomplete refactors |
|
|
124
|
+
| Test Audit | Fake/shallow tests that inflate coverage |
|
|
125
|
+
| File Cohesion | Files mixing multiple responsibilities |
|
|
126
|
+
| Design Consistency | Visual inconsistency across components |
|
|
120
127
|
|
|
121
|
-
##
|
|
128
|
+
## GitHub Action
|
|
122
129
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
```yaml
|
|
131
|
+
- uses: vibecodeqa/action@v1
|
|
132
|
+
with:
|
|
133
|
+
fail-under: "70" # quality gate
|
|
134
|
+
auto-fix: "true" # AI fixes pushed to PR
|
|
135
|
+
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
127
136
|
```
|
|
128
137
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
| Grade | Score | Meaning |
|
|
132
|
-
|-------|-------|---------|
|
|
133
|
-
| **A** | 90-100 | Excellent — production-ready |
|
|
134
|
-
| **B** | 75-89 | Good — minor issues |
|
|
135
|
-
| **C** | 60-74 | Fair — needs attention |
|
|
136
|
-
| **D** | 40-59 | Poor — significant issues |
|
|
137
|
-
| **F** | 0-39 | Critical — major problems |
|
|
138
|
-
|
|
139
|
-
## Report features
|
|
140
|
-
|
|
141
|
-
- **Primary nav**: Overview + 7 dimension tabs (Foundations, Quality, Testing, Architecture, Security, AI Readiness, AI Analysis)
|
|
142
|
-
- **Secondary nav**: Issues + Files (cross-cutting data views)
|
|
143
|
-
- **Score ring + radar chart** — 6-axis view of category scores
|
|
144
|
-
- **Score timeline** — last 30 runs with grade-colored dots
|
|
145
|
-
- **Testing pyramid** — proportional SVG showing unit/integration/component/e2e distribution
|
|
146
|
-
- **Architecture SVG** — modules grouped by directory, bezier edges with arrows, color-coded nodes (god module, cycle, orphan), legend
|
|
147
|
-
- **File health map** — heatmap bars showing issue density per file
|
|
148
|
-
- **Trend comparison** — score delta vs. previous run
|
|
149
|
-
- **GitHub links** — click any file:line to open in GitHub (auto-detected from git remote)
|
|
150
|
-
- **Actionable prompts** — clipboard button on every issue copies a fix prompt for Claude/Codex
|
|
151
|
-
- **Info panels** — each check has What/Risk/Fix explanations with research citations
|
|
152
|
-
- **Priority badges** — critical/high/medium/low on each check
|
|
138
|
+
Features: PR comments, SARIF upload, quality gates, AI autofix.
|
|
153
139
|
|
|
154
|
-
##
|
|
140
|
+
## Programmatic API
|
|
155
141
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
| `--skip-tests` | Skip test execution and coverage (fast mode) |
|
|
159
|
-
| `--ci` | Exit code 1 if composite score < 60 |
|
|
160
|
-
| `--fail-under N` | Exit code 1 if composite score < N |
|
|
161
|
-
| `--json` | Output JSON to stdout (no HTML, no browser) |
|
|
162
|
-
| `--badge` | Generate badge.svg in output directory |
|
|
163
|
-
| `--sarif` | Generate SARIF 2.1.0 for GitHub Code Scanning |
|
|
164
|
-
| `--upload` | Upload report to app.vibecodeqa.online |
|
|
165
|
-
| `--top [N]` | Show top N issues to fix (default: 5) |
|
|
166
|
-
| `--diff [base]` | Only show issues in changed files (vs HEAD or branch) |
|
|
167
|
-
| `--markdown` | Output markdown summary (pipe to file or clipboard) |
|
|
168
|
-
| `--pr-comment` | Post score as GitHub PR comment (needs `GITHUB_TOKEN`) |
|
|
169
|
-
| `--annotations` | Emit GitHub Actions `::warning`/`::error` inline annotations |
|
|
170
|
-
| `--watch` | Re-scan automatically on file changes |
|
|
142
|
+
```typescript
|
|
143
|
+
import { scan, CHECK_META } from "@vibecodeqa/cli/core";
|
|
171
144
|
|
|
172
|
-
|
|
145
|
+
const report = await scan("./src", {
|
|
146
|
+
skipTests: true,
|
|
147
|
+
checks: ["security", "testing"],
|
|
148
|
+
onProgress: (check, result, i, total) => {
|
|
149
|
+
console.log(`${i + 1}/${total} ${check}: ${result.grade}`);
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
console.log(`${report.grade} ${report.score}/100`);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## MCP Server
|
|
157
|
+
|
|
158
|
+
Give AI coding agents real-time code health context:
|
|
173
159
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
- **Linter:** Biome, ESLint, dart analyze
|
|
180
|
-
- **Package manager:** pnpm, npm, yarn, bun, pub
|
|
160
|
+
```bash
|
|
161
|
+
claude mcp add vcqa -- npx @vibecodeqa/mcp
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
6 tools: `vcqa_score`, `vcqa_scan`, `vcqa_file_health`, `vcqa_check`, `vcqa_explain`, `vcqa_fix`.
|
|
181
165
|
|
|
182
166
|
## Configuration
|
|
183
167
|
|
|
184
|
-
Create `.vcqa.json
|
|
168
|
+
Create `.vcqa.json`:
|
|
185
169
|
|
|
186
170
|
```json
|
|
187
171
|
{
|
|
188
172
|
"checks": {
|
|
189
|
-
"
|
|
190
|
-
"
|
|
173
|
+
"react": { "enabled": false },
|
|
174
|
+
"container-health": { "ignore": ["Dockerfile.dev"] }
|
|
191
175
|
},
|
|
192
|
-
"ignore": ["generated/**", "
|
|
176
|
+
"ignore": ["generated/**", "vendor/**"],
|
|
193
177
|
"failUnder": 70
|
|
194
178
|
}
|
|
195
179
|
```
|
|
196
180
|
|
|
197
|
-
| Field | Description |
|
|
198
|
-
|-------|-------------|
|
|
199
|
-
| `checks` | Disable individual checks with `"enabled": false` |
|
|
200
|
-
| `ignore` | Extra glob patterns to skip when scanning source files |
|
|
201
|
-
| `failUnder` | Default score threshold (overridden by `--fail-under` flag) |
|
|
202
|
-
|
|
203
181
|
## Monorepo support
|
|
204
182
|
|
|
205
|
-
|
|
206
|
-
- **pnpm** — `pnpm-workspace.yaml` (with comments, flow-style YAML, negation patterns)
|
|
207
|
-
- **npm/yarn** — `workspaces` in `package.json`
|
|
208
|
-
- **bun** — `workspaces` in `package.json` + `bun.lockb`
|
|
209
|
-
- **lerna** — `lerna.json`
|
|
210
|
-
- **turborepo** — `turbo.json` (overlay on pnpm/npm/yarn)
|
|
211
|
-
- **nx** — `nx.json` (overlay on pnpm/npm/yarn)
|
|
212
|
-
- **melos** — `melos.yaml` (Dart/Flutter monorepos)
|
|
213
|
-
- **Conventional layouts** — `server/` + `client/`, `apps/` + `packages/`, etc.
|
|
214
|
-
|
|
215
|
-
Framework detection aggregates deps from all workspace packages — React in `packages/web/package.json` is detected even if root has no React dependency.
|
|
216
|
-
|
|
217
|
-
## GitHub Actions
|
|
183
|
+
Auto-detects: pnpm, npm, yarn, bun, lerna, turborepo, nx, melos.
|
|
218
184
|
|
|
219
|
-
|
|
185
|
+
## Stack detection
|
|
220
186
|
|
|
221
|
-
|
|
222
|
-
name: VibeCode QA
|
|
223
|
-
on: [pull_request]
|
|
224
|
-
permissions:
|
|
225
|
-
contents: read
|
|
226
|
-
pull-requests: write
|
|
227
|
-
jobs:
|
|
228
|
-
scan:
|
|
229
|
-
runs-on: ubuntu-latest
|
|
230
|
-
steps:
|
|
231
|
-
- uses: actions/checkout@v4
|
|
232
|
-
- run: npx @vibecodeqa/cli --skip-tests --ci --sarif --pr-comment
|
|
233
|
-
env:
|
|
234
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
235
|
-
- uses: github/codeql-action/upload-sarif@v3
|
|
236
|
-
if: always()
|
|
237
|
-
with:
|
|
238
|
-
sarif_file: .vibe-check/report.sarif
|
|
239
|
-
```
|
|
187
|
+
Auto-detects: TypeScript/JavaScript/Dart, React/Vue/Svelte/Flutter, Vite/Webpack/esbuild, vitest/jest, Biome/ESLint, pnpm/npm/yarn/bun.
|
|
240
188
|
|
|
241
|
-
##
|
|
189
|
+
## CLI options
|
|
242
190
|
|
|
243
|
-
|
|
191
|
+
| Flag | Description |
|
|
192
|
+
|------|-------------|
|
|
193
|
+
| `--skip-tests` | Skip test execution (fast mode) |
|
|
194
|
+
| `--ci` | CI mode (exit 1 if score < 60) |
|
|
195
|
+
| `--fail-under N` | Exit 1 if score < N |
|
|
196
|
+
| `--json` | JSON output |
|
|
197
|
+
| `--badge` | Generate SVG badge |
|
|
198
|
+
| `--sarif` | SARIF for GitHub Code Scanning |
|
|
199
|
+
| `--upload` | Upload to dashboard |
|
|
200
|
+
| `--top [N]` | Show top N issues |
|
|
201
|
+
| `--diff [base]` | Issues in changed files only |
|
|
202
|
+
| `--markdown` | Markdown summary |
|
|
203
|
+
| `--pr-comment` | PR comment (needs `GITHUB_TOKEN`) |
|
|
204
|
+
| `--annotations` | GitHub Actions annotations |
|
|
205
|
+
| `--watch` | Re-scan on file changes |
|
|
244
206
|
|
|
245
207
|
## Links
|
|
246
208
|
|
|
247
|
-
- **GitHub:** https://github.com/vibecodeqa/cli
|
|
248
209
|
- **Website:** https://vibecodeqa.online
|
|
249
|
-
- **
|
|
250
|
-
- **
|
|
210
|
+
- **Dashboard:** https://app.vibecodeqa.online
|
|
211
|
+
- **GitHub Action:** https://github.com/vibecodeqa/action
|
|
212
|
+
- **VS Code:** https://github.com/vibecodeqa/vscode
|
|
213
|
+
- **MCP:** https://github.com/vibecodeqa/mcp
|
|
214
|
+
|
|
215
|
+
MIT — Free forever as a CLI tool.
|
package/dist/check-meta.js
CHANGED
|
@@ -46,10 +46,10 @@ export const CHECK_META = {
|
|
|
46
46
|
name: "standards",
|
|
47
47
|
label: "Code Standards",
|
|
48
48
|
category: "Foundations",
|
|
49
|
-
priority: "
|
|
49
|
+
priority: "high",
|
|
50
50
|
weight: 3,
|
|
51
|
-
description: "Checks coding conventions: file naming (PascalCase for components, kebab-case for modules), file size limits (>
|
|
52
|
-
risk: "Large files are hard to review and test. console.log in production leaks internal data. var causes hoisting bugs. == causes type coercion surprises.
|
|
51
|
+
description: "Checks coding conventions: file naming (PascalCase for components, kebab-case for modules), file size limits (>250 lines warning, >400 error), code smells (console.log, var, ==, eval, innerHTML, TODO/FIXME), config hygiene (strict mode), and framework best practices.",
|
|
52
|
+
risk: "Large files are hard to review and test — AI-generated code accumulates in monolithic files that become impossible to refactor. console.log in production leaks internal data. var causes hoisting bugs. == causes type coercion surprises. Inconsistent naming makes the codebase harder to navigate.",
|
|
53
53
|
recommendation: "Split files over 300 lines. Replace console.log with a proper logger or remove it. Use const/let, ===, and safe DOM APIs. Enable TypeScript strict mode.",
|
|
54
54
|
},
|
|
55
55
|
"error-handling": {
|
|
@@ -271,7 +271,7 @@ export const CHECK_META = {
|
|
|
271
271
|
label: "Environment Validation",
|
|
272
272
|
category: "Quality",
|
|
273
273
|
priority: "medium",
|
|
274
|
-
weight:
|
|
274
|
+
weight: 1,
|
|
275
275
|
description: "Checks .env file hygiene: .gitignore coverage, .env.example existence and drift, hardcoded secrets in env files, and empty required variables.",
|
|
276
276
|
risk: "A missing .env.example means new developers can't onboard without asking which env vars to set. Drift between .env and .env.example causes 'works on my machine' failures. Committed .env files leak secrets.",
|
|
277
277
|
recommendation: "Create .env.example with all required vars (values blanked). Ensure .env is in .gitignore. Keep .env.example in sync with .env.",
|
|
@@ -281,7 +281,7 @@ export const CHECK_META = {
|
|
|
281
281
|
label: "Git Hygiene",
|
|
282
282
|
category: "Quality",
|
|
283
283
|
priority: "medium",
|
|
284
|
-
weight:
|
|
284
|
+
weight: 1,
|
|
285
285
|
description: "Checks git repository health: merge conflict markers in source, commit message quality, large/binary files tracked, and .gitignore completeness.",
|
|
286
286
|
risk: "Merge conflict markers cause syntax errors. Large binary files bloat the repo forever (git history is append-only). Poor commit messages make git blame and bisect useless for debugging.",
|
|
287
287
|
recommendation: "Resolve all merge conflicts. Use Git LFS for files over 5MB. Write descriptive commit messages (what and why, not just 'fix').",
|
|
@@ -291,11 +291,64 @@ export const CHECK_META = {
|
|
|
291
291
|
label: "Memory Safety",
|
|
292
292
|
category: "Quality",
|
|
293
293
|
priority: "high",
|
|
294
|
-
weight:
|
|
294
|
+
weight: 1,
|
|
295
295
|
description: "Detects resource leak patterns: setInterval without clearInterval, addEventListener without removeEventListener, unclosed WebSockets/Observers, and global variable pollution.",
|
|
296
296
|
risk: "Resource leaks cause memory growth over time, eventually crashing the app or browser tab. Leaked event listeners fire on stale state, causing bugs. Global pollution creates hard-to-trace conflicts between modules.",
|
|
297
297
|
recommendation: "Always pair setInterval with clearInterval in cleanup. Remove event listeners in componentWillUnmount/useEffect return. Call .disconnect() on Observers. Avoid window.* assignments.",
|
|
298
298
|
},
|
|
299
|
+
"html-quality": {
|
|
300
|
+
name: "html-quality",
|
|
301
|
+
label: "HTML Quality",
|
|
302
|
+
category: "Quality",
|
|
303
|
+
priority: "medium",
|
|
304
|
+
weight: 0,
|
|
305
|
+
description: "Checks static HTML sites for meta tags (title, description, viewport, OG), image optimization (alt, dimensions, lazy loading), broken internal links, heading hierarchy, render-blocking scripts, mixed content, SEO files (robots.txt, sitemap.xml), and accessibility (lang attribute).",
|
|
306
|
+
risk: "Missing viewport meta means the page isn't mobile-responsive. Missing alt attributes make images invisible to screen readers. Render-blocking scripts delay page load. Broken links frustrate users and hurt SEO. Missing OG tags make social sharing look unprofessional.",
|
|
307
|
+
recommendation: "Add meta viewport and description to every page. Set alt on all images. Use async/defer on scripts in <head>. Add robots.txt and sitemap.xml. Ensure each page has a unique title.",
|
|
308
|
+
},
|
|
309
|
+
"frontend-health": {
|
|
310
|
+
name: "frontend-health",
|
|
311
|
+
label: "Frontend Health",
|
|
312
|
+
category: "Quality",
|
|
313
|
+
priority: "high",
|
|
314
|
+
weight: 2,
|
|
315
|
+
description: "Detects frontend antipatterns: conflicting UI frameworks (MUI + Tailwind), mixed icon libraries, unoptimized images (no width/height), heavy full-library imports, missing loading states for async data, DOM nesting violations, and inline base64 images.",
|
|
316
|
+
risk: "Conflicting UI frameworks bloat the bundle and create visual inconsistency — MUI buttons look different from Tailwind buttons. Mixed icon libraries add hundreds of KB. Images without dimensions cause layout shift (CLS). Heavy imports slow initial page load.",
|
|
317
|
+
recommendation: "Pick one UI framework and one icon library. Use next/image or set width/height on all images. Import specific components, not entire libraries. Add loading states for all async data fetches.",
|
|
318
|
+
},
|
|
319
|
+
styling: {
|
|
320
|
+
name: "styling",
|
|
321
|
+
label: "Styling Consistency",
|
|
322
|
+
category: "Quality",
|
|
323
|
+
priority: "medium",
|
|
324
|
+
weight: 1,
|
|
325
|
+
description: "Delegates to Stylelint for CSS/SCSS linting when installed. Adds cross-file analysis no CSS linter covers: mixed styling approaches, hardcoded colors in JSX, inconsistent spacing scale, !important abuse, duplicate Tailwind class strings, and inline style overuse.",
|
|
326
|
+
deeperTools: ["stylelint", "stylelint-config-standard"],
|
|
327
|
+
risk: "AI-generated components pile up inconsistent styles — hardcoded hex colors, random pixel values, inline styles. This creates an accidental design system where every component looks slightly different and nothing is reusable. Changing the brand color means finding 47 hex values across 30 files.",
|
|
328
|
+
recommendation: "Pick one styling approach (Tailwind or CSS Modules). Define colors and spacing as design tokens (CSS variables or Tailwind theme). Extract repeated class strings into shared components. Use a 4px/8px spacing scale.",
|
|
329
|
+
},
|
|
330
|
+
"design-consistency": {
|
|
331
|
+
name: "design-consistency",
|
|
332
|
+
label: "Design Consistency",
|
|
333
|
+
category: "AI Analysis",
|
|
334
|
+
priority: "high",
|
|
335
|
+
weight: 0,
|
|
336
|
+
description: "LLM-powered audit of visual consistency across components. Finds duplicate visual patterns, inconsistent spacing/color/typography, and missing component extraction opportunities.",
|
|
337
|
+
risk: "Components that look similar but are styled differently are impossible to maintain. Changing a button style means editing 7 files. Users notice the inconsistency — different border radius, slightly different padding, mismatched colors.",
|
|
338
|
+
recommendation: "Enable design-consistency with a VibeCode QA Pro subscription. The LLM analyzes styling patterns across all components to surface inconsistencies and suggest shared components.",
|
|
339
|
+
premium: true,
|
|
340
|
+
},
|
|
341
|
+
"file-cohesion": {
|
|
342
|
+
name: "file-cohesion",
|
|
343
|
+
label: "File Cohesion",
|
|
344
|
+
category: "AI Analysis",
|
|
345
|
+
priority: "critical",
|
|
346
|
+
weight: 0,
|
|
347
|
+
description: "AI-powered detection of files with multiple responsibilities — the #1 code smell in AI-generated code. Detects when a single file handles auth + email + database, or mixes HTTP routing with business logic. Provides concrete split suggestions.",
|
|
348
|
+
risk: "AI coding assistants pile features into existing files instead of creating new ones. A file handling auth, sessions, AND email is untestable, unreviewable, and impossible to refactor safely. Every change risks breaking unrelated functionality. This is the root cause of 'vibe-coded' technical debt.",
|
|
349
|
+
recommendation: "Enable file-cohesion with a VibeCode QA Pro subscription. The LLM analyzes each file's exports and logic to label responsibility clusters and suggest concrete splits.",
|
|
350
|
+
premium: true,
|
|
351
|
+
},
|
|
299
352
|
"container-health": {
|
|
300
353
|
name: "container-health",
|
|
301
354
|
label: "Container Health",
|