start-vibing-stacks 2.25.0 → 2.25.2
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/package.json
CHANGED
|
@@ -1,28 +1,113 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: validate
|
|
3
|
-
description: Run the full quality gate (typecheck → lint → test → build) using
|
|
4
|
-
version: 1.
|
|
3
|
+
description: Run the full quality gate (typecheck → lint → test → build) using THIS project's `active-project.json#qualityGates`. Per-stack reference is below.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /validate — Run Full Validation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## How it works (canonical — always use this)
|
|
10
|
+
|
|
11
|
+
1. **Read the gates from `.claude/config/active-project.json#qualityGates`.** This is the **only** source of truth — it was populated at install time from the active stack and reflects this project's actual tooling.
|
|
12
|
+
2. Run each gate in `order` ascending; stop at the first failure that has `required: true`.
|
|
13
|
+
3. If a gate has `appliesTo: ["nextjs", ...]`, only run it when `framework` in `active-project.json` matches.
|
|
10
14
|
|
|
11
15
|
```bash
|
|
12
|
-
jq -r '.qualityGates' .claude/config/active-project.json
|
|
16
|
+
jq -r '.qualityGates | sort_by(.order) | .[] | "\(.order). \(.name) (required=\(.required)): \(.command)"' .claude/config/active-project.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`commit-manager` refuses to commit while `/validate` is failing.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Per-stack reference (suggested — only used if `active-project.json` is missing or corrupted)
|
|
24
|
+
|
|
25
|
+
This block exists so the model has a stack-aware fallback. **Do not pick from here when `active-project.json#qualityGates` is present and valid** — that JSON always wins.
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"python": {
|
|
30
|
+
"_default": {
|
|
31
|
+
"typecheck": "mypy .",
|
|
32
|
+
"lint": "ruff check .",
|
|
33
|
+
"format": "ruff format .",
|
|
34
|
+
"test": "pytest --tb=short",
|
|
35
|
+
"serve": "uvicorn app.main:app --reload"
|
|
36
|
+
},
|
|
37
|
+
"frameworks": {
|
|
38
|
+
"fastapi": { "test": "pytest --tb=short" },
|
|
39
|
+
"django": { "test": "python manage.py test", "migrate": "python manage.py migrate" },
|
|
40
|
+
"flask": { "test": "pytest --tb=short" },
|
|
41
|
+
"scripts": { "test": "pytest --tb=short" }
|
|
42
|
+
},
|
|
43
|
+
"_runOrder": ["typecheck", "lint", "test"]
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
"nodejs": {
|
|
47
|
+
"_default": {
|
|
48
|
+
"typecheck": "bun run typecheck",
|
|
49
|
+
"lint": "bun run lint",
|
|
50
|
+
"format": "bun run format",
|
|
51
|
+
"test": "bun run test",
|
|
52
|
+
"build": "bun run build",
|
|
53
|
+
"serve": "bun run dev"
|
|
54
|
+
},
|
|
55
|
+
"frameworks": {
|
|
56
|
+
"nextjs": {
|
|
57
|
+
"_extra": [
|
|
58
|
+
{ "name": "RouteSlugs", "command": "node scripts/check-route-slugs.mjs", "order": 4, "required": true, "why": "next build does not catch dynamic-route slug mismatch" },
|
|
59
|
+
{ "name": "BuildScripts", "command": "node scripts/check-build-scripts.mjs", "order": 5, "required": true, "why": "Vercel/Docker strip devDeps; scripts.build calling tsx/ts-node/vitest crash exit 127" }
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"nuxt": { "build": "bun run build" },
|
|
63
|
+
"astro": { "build": "bun run build" },
|
|
64
|
+
"express": { "test": "bun run test" },
|
|
65
|
+
"fastify": { "test": "bun run test" },
|
|
66
|
+
"vanilla": { "test": "bun run test" }
|
|
67
|
+
},
|
|
68
|
+
"_runOrder": ["typecheck", "lint", "test", "_extra", "build"]
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
"php": {
|
|
72
|
+
"_default": {
|
|
73
|
+
"static": "vendor/bin/phpstan analyse --level=6",
|
|
74
|
+
"test": "vendor/bin/phpunit",
|
|
75
|
+
"format": "vendor/bin/php-cs-fixer fix",
|
|
76
|
+
"serve": "php artisan serve"
|
|
77
|
+
},
|
|
78
|
+
"frameworks": {
|
|
79
|
+
"laravel-octane": {
|
|
80
|
+
"serve": "php artisan octane:start --watch",
|
|
81
|
+
"_extraIfFrontend": ["typecheck", "lint", "viteManifest"]
|
|
82
|
+
},
|
|
83
|
+
"laravel": { "_extraIfFrontend": ["typecheck", "lint", "viteManifest"] }
|
|
84
|
+
},
|
|
85
|
+
"_frontendChecks": {
|
|
86
|
+
"typecheck": "npx tsc --noEmit",
|
|
87
|
+
"lint": "npx eslint resources/js/",
|
|
88
|
+
"viteManifest": "node scripts/check-vite-manifest.mjs"
|
|
89
|
+
},
|
|
90
|
+
"_runOrder": ["static", "test", "typecheck", "lint", "viteManifest"]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
13
93
|
```
|
|
14
94
|
|
|
15
|
-
|
|
95
|
+
### How to read this fallback
|
|
96
|
+
|
|
97
|
+
- `_default` — commands that always apply within the stack.
|
|
98
|
+
- `frameworks.<framework>` — overrides or extras gated by `framework` in `active-project.json`.
|
|
99
|
+
- `_extra` — additional gates with explicit `order` (PHP/Next.js use this for stack-specific static checks like vite-manifest, route-slugs, build-scripts).
|
|
100
|
+
- `_runOrder` — order to chain when no `qualityGates` is available.
|
|
16
101
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
102
|
+
If `.claude/config/active-project.json#qualityGates` is missing, **do not silently fall back** — instead:
|
|
103
|
+
|
|
104
|
+
1. Print a warning: `WARN: active-project.json#qualityGates missing — using fallback for stack=<X>, framework=<Y>`.
|
|
105
|
+
2. Run the fallback in `_runOrder`.
|
|
106
|
+
3. Recommend the user re-run `npx start-vibing-stacks` (or `migrate --apply`) to repair the config.
|
|
107
|
+
|
|
108
|
+
---
|
|
24
109
|
|
|
25
|
-
Output format
|
|
110
|
+
## Output format
|
|
26
111
|
|
|
27
112
|
```
|
|
28
113
|
typecheck: PASS (1.4s)
|
|
@@ -34,4 +119,4 @@ build: PASS (3.1s)
|
|
|
34
119
|
✅ All gates passed — safe to invoke commit-manager
|
|
35
120
|
```
|
|
36
121
|
|
|
37
|
-
If any gate fails, print
|
|
122
|
+
If any required gate fails, print its full output and exit non-zero. Optional gates (`required: false`) print a warning but do not block.
|