@soulbatical/tetra-dev-toolkit 1.1.0 → 1.1.1

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 (2) hide show
  1. package/package.json +2 -3
  2. package/README.md +0 -312
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulbatical/tetra-dev-toolkit",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },
@@ -39,8 +39,7 @@
39
39
  "scripts": {
40
40
  "test": "node --test src/**/*.test.js",
41
41
  "lint": "eslint src/ lib/ bin/",
42
- "build": "echo 'No build step needed'",
43
- "prepublishOnly": "npm test && npm run lint"
42
+ "build": "echo 'No build step needed'"
44
43
  },
45
44
  "engines": {
46
45
  "node": ">=18.0.0"
package/README.md DELETED
@@ -1,312 +0,0 @@
1
- # @vca/quality-toolkit
2
-
3
- Unified quality checks for all VCA projects. Consolidates security, stability, and code quality checks from sparkbuddy-live and vca-tools into a single npm package.
4
-
5
- **Status:** Installed in 13 projects | Version 1.0.0
6
-
7
- ## Installation
8
-
9
- ```bash
10
- # Local installation (recommended for VCA projects)
11
- npm install --save-dev /Users/albertbarth/projecten/vca-quality-toolkit
12
-
13
- # Or via file reference in package.json
14
- "devDependencies": {
15
- "@vca/quality-toolkit": "file:../vca-quality-toolkit"
16
- }
17
- ```
18
-
19
- ## Quick Start
20
-
21
- ```bash
22
- # Run all checks
23
- npx vca-audit
24
-
25
- # Run only security checks
26
- npx vca-audit security
27
-
28
- # Run only stability checks
29
- npx vca-audit stability
30
-
31
- # Quick check (critical issues only - fast, for pre-commit)
32
- npx vca-audit quick
33
-
34
- # Setup Husky hooks and CI
35
- npx vca-setup
36
- ```
37
-
38
- ## Example Output
39
-
40
- ```
41
- ═══════════════════════════════════════════════════════════════
42
- 🔍 VCA Quality Toolkit - Audit Results
43
- ═══════════════════════════════════════════════════════════════
44
-
45
- Project: /Users/albertbarth/projecten/ralph-manager
46
- Time: 2026-02-03T15:04:03.478Z
47
-
48
- ✅ Overall Status: PASSED
49
-
50
- ✅ SECURITY
51
- ──────────────────────────────────────────────────
52
- ✅ Hardcoded Secrets Detection PASS
53
- ✅ Service Role Key Exposure PASS
54
- ✅ Deprecated supabaseAdmin Usage PASS
55
- ✅ systemDB Context Whitelist PASS
56
-
57
- ✅ STABILITY
58
- ──────────────────────────────────────────────────
59
- ✅ Pre-commit Hooks (Husky) PASS
60
- ✅ CI/CD Pipeline PASS
61
- ✅ NPM Vulnerability Audit PASS
62
-
63
- ═══════════════════════════════════════════════════════════════
64
- Checks: 7 passed, 0 failed, 0 skipped
65
- ═══════════════════════════════════════════════════════════════
66
- ```
67
-
68
- ## What It Checks
69
-
70
- ### Security (4 checks implemented)
71
- | Check | Severity | Description |
72
- |-------|----------|-------------|
73
- | Hardcoded Secrets | Critical | API keys, tokens, JWTs in source code |
74
- | Service Key Exposure | Critical | Supabase service role key in frontend |
75
- | Deprecated supabaseAdmin | High | Direct supabaseAdmin usage (use systemDB/userDB) |
76
- | systemDB Whitelist | High | Unwhitelisted systemDB contexts |
77
-
78
- ### Stability (3 checks implemented)
79
- | Check | Severity | Description |
80
- |-------|----------|-------------|
81
- | Husky Hooks | High | Pre-commit hooks configured with useful checks |
82
- | CI Pipeline | High | GitHub Actions/GitLab CI with lint, test, build |
83
- | npm audit | High | No critical/high vulnerabilities |
84
-
85
- ### Health (15 ecosystem checks) — NEW
86
-
87
- Project-level health scanner shared by ralph-manager and development-mcp.
88
-
89
- | Check | Max Score | Description |
90
- |-------|-----------|-------------|
91
- | `plugins` | 2 | Claude Code plugins installed |
92
- | `mcps` | 1 | MCP servers configured |
93
- | `git` | 3 | Branch, uncommitted, unpushed |
94
- | `tests` | 5 | Test pyramid (unit/integration/e2e) |
95
- | `secrets` | 2 | Exposed secrets in MD files |
96
- | `quality-toolkit` | 2 | @vca/dev-toolkit installed |
97
- | `naming-conventions` | 3 | DB + code naming compliance |
98
- | `rls-audit` | 3 | RLS policies in SQL migrations |
99
- | `gitignore` | 2 | Critical .gitignore entries |
100
- | `repo-visibility` | 2 | Public vs private repo |
101
- | `vincifox-widget` | 2 | VinciFox feedback widget |
102
- | `stella-integration` | 2 | @ralph/stella integration level |
103
- | `claude-md` | 3 | CLAUDE.md protocol sections |
104
- | `doppler-compliance` | 3 | Doppler secret management |
105
- | `infrastructure-yml` | 3 | .ralph/INFRASTRUCTURE.yml |
106
-
107
- **Total: 38 points.** Score thresholds: Healthy >= 70%, Warning 40-70%, Unhealthy < 40%.
108
-
109
- ```javascript
110
- import { scanProjectHealth } from '@vca/dev-toolkit'
111
-
112
- const report = await scanProjectHealth('/path/to/project', 'my-project')
113
- console.log(report.healthPercent + '%') // e.g. "58%"
114
- console.log(report.status) // "healthy" | "warning" | "unhealthy"
115
- ```
116
-
117
- ### Planned Checks
118
- - [ ] Dead code detection (Knip integration)
119
- - [ ] Circular dependency detection
120
- - [ ] TypeScript strict mode
121
- - [ ] Test coverage thresholds
122
-
123
- ## Integration with Ralph Manager
124
-
125
- The toolkit integrates with ralph-manager's Health dashboard:
126
-
127
- - **Health Scanner**: Shared 15-check scanner (ralph-manager imports from this package)
128
- - **Toolkit Check**: Shows toolkit installation status per project
129
- - **API Endpoint**: `/api/admin/health/quality-toolkit` returns status for all projects
130
-
131
- ## Usage in package.json
132
-
133
- ```json
134
- {
135
- "scripts": {
136
- "audit": "vca-audit",
137
- "audit:security": "vca-audit security",
138
- "audit:quick": "vca-audit quick",
139
- "prepare": "husky"
140
- }
141
- }
142
- ```
143
-
144
- ## Configuration
145
-
146
- Create `.vca-quality.json` in your project root:
147
-
148
- ```json
149
- {
150
- "suites": {
151
- "security": true,
152
- "stability": true,
153
- "codeQuality": true,
154
- "supabase": "auto"
155
- },
156
- "security": {
157
- "checkHardcodedSecrets": true,
158
- "checkServiceKeyExposure": true
159
- },
160
- "stability": {
161
- "requireHusky": true,
162
- "requireCiConfig": true,
163
- "allowedVulnerabilities": {
164
- "critical": 0,
165
- "high": 0,
166
- "moderate": 10
167
- }
168
- },
169
- "supabase": {
170
- "publicRpcFunctions": ["get_public_stats"],
171
- "publicTables": ["lookup_countries"]
172
- },
173
- "ignore": [
174
- "node_modules/**",
175
- "dist/**"
176
- ]
177
- }
178
- ```
179
-
180
- ## CI Integration
181
-
182
- ### GitHub Actions
183
-
184
- ```yaml
185
- name: Quality Checks
186
-
187
- on: [push, pull_request]
188
-
189
- jobs:
190
- quality:
191
- runs-on: ubuntu-latest
192
- steps:
193
- - uses: actions/checkout@v4
194
- - uses: actions/setup-node@v4
195
- with:
196
- node-version: '20'
197
- - run: npm ci
198
- - run: npx vca-audit --ci
199
- ```
200
-
201
- The `--ci` flag outputs GitHub Actions annotations for inline PR feedback.
202
-
203
- ### Pre-commit Hook
204
-
205
- Run `npx vca-setup hooks` or manually create `.husky/pre-commit`:
206
-
207
- ```bash
208
- #!/bin/sh
209
- npx vca-audit quick
210
- if [ $? -ne 0 ]; then
211
- echo "❌ Security issues found! Fix before committing."
212
- exit 1
213
- fi
214
- ```
215
-
216
- ## Programmatic Usage
217
-
218
- ```javascript
219
- import { runAllChecks, runSecurityChecks } from '@vca/quality-toolkit'
220
-
221
- const results = await runAllChecks()
222
-
223
- if (!results.passed) {
224
- console.log('Quality checks failed!')
225
- console.log(`Critical: ${results.summary.findings.critical}`)
226
- console.log(`High: ${results.summary.findings.high}`)
227
- }
228
- ```
229
-
230
- ## Projects Using This Toolkit
231
-
232
- | Project | Status | Version |
233
- |---------|--------|---------|
234
- | ralph-manager | ✅ | 1.0.0 |
235
- | sparkbuddy-live | ✅ | 1.0.0 |
236
- | snelstart-mcp | ✅ | 1.0.0 |
237
- | snelstart-portal | ✅ | 1.0.0 |
238
- | vibecodingacademy | ✅ | 1.0.0 |
239
- | Plokko | ✅ | 1.0.0 |
240
- | ad-agent | ✅ | 1.0.0 |
241
- | ai-finder | ✅ | 1.0.0 |
242
- | airbnb | ✅ | 1.0.0 |
243
- | github-ai-research | ✅ | 1.0.0 |
244
- | groei-boom | ✅ | 1.0.0 |
245
- | sparkgrowth | ✅ | 1.0.0 |
246
- | vca-security | ✅ | 1.0.0 |
247
-
248
- ## Relationship to vca-tools
249
-
250
- This package complements [vca-tools](https://github.com/mralbertzwolle/vibe-coding-academy-tools) (Claude Code plugins):
251
-
252
- | Tool | Purpose | Usage |
253
- |------|---------|-------|
254
- | **vca-tools** | Interactive Claude Code plugins | `/security-audit:run`, `/codebase-stability-audit:run` |
255
- | **@vca/quality-toolkit** | Automated CI/pre-commit checks | `npx vca-audit`, GitHub Actions |
256
-
257
- Both share the same check logic, but:
258
- - **vca-tools** = human-in-the-loop, detailed reports, fix suggestions
259
- - **@vca/quality-toolkit** = automated, CI-friendly, pass/fail
260
-
261
- ## Architecture
262
-
263
- ```
264
- @vca/quality-toolkit/
265
- ├── bin/
266
- │ ├── vca-audit.js # Main CLI
267
- │ └── vca-setup.js # Setup hooks/CI
268
- ├── lib/
269
- │ ├── index.js # Main exports
270
- │ ├── config.js # Configuration loader
271
- │ ├── runner.js # Check orchestrator
272
- │ ├── checks/
273
- │ │ ├── health/ # 15 ecosystem health checks (shared with ralph-manager)
274
- │ │ │ ├── scanner.js # Orchestrator — scanProjectHealth()
275
- │ │ │ ├── types.js # Shared types & helpers
276
- │ │ │ ├── plugins.js # Claude Code plugins
277
- │ │ │ ├── mcps.js # MCP server config
278
- │ │ │ ├── git.js # Git status
279
- │ │ │ ├── tests.js # Test pyramid
280
- │ │ │ ├── secrets.js # Exposed secrets
281
- │ │ │ └── ... # 10 more checks
282
- │ │ ├── security/ # Security checks
283
- │ │ ├── stability/ # Stability checks
284
- │ │ ├── codeQuality/ # Code quality checks
285
- │ │ └── supabase/ # Supabase checks
286
- │ └── reporters/
287
- │ └── terminal.js # Pretty output + GitHub Actions
288
- └── package.json
289
- ```
290
-
291
- ## Consumers
292
-
293
- | Package | Import | Usage |
294
- |---------|--------|-------|
295
- | **ralph-manager** | `scanProjectHealth` | Dashboard health scanner (background job, every 2 min) |
296
- | **development-mcp** | `scanProjectHealth` | `health_check` MCP tool (on-demand via Claude Code) |
297
- | **13 VCA projects** | `vca-audit` CLI | CI/pre-commit quality checks |
298
-
299
- ## Contributing
300
-
301
- 1. Add new check in `lib/checks/<category>/<name>.js`
302
- 2. Register in `lib/runner.js`
303
- 3. Update README
304
- 4. Test with `npx vca-audit` in a project
305
-
306
- ## License
307
-
308
- MIT
309
-
310
- ---
311
-
312
- Built by [Vibe Coding Academy](https://vibecodingacademy.nl) • [Albert Barth](https://linkedin.com/in/albertbarth/)