validate-loop
Runs the full validation pipeline — typecheck, lint, format, data validation, unit tests, test discovery, and build — in a loop until all checks pass or the user triages failures.
- License 许可
- MIT
- 所属仓库
- ruake/AWARE
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- validate-loop
- license
- MIT
- metadata
- { "role": "specialist", "scope": "implementation", "author": "ruake", "domain": "ci-cd", "version": "1.0.0", "triggers": "validate, verify, lint, typecheck, build, test, format, pre-commit, pre-push", "output-format": "terminal" }
- description
- Runs the full validation pipeline — typecheck, lint, format, data validation, unit tests, test discovery, and build — in a loop until all checks pass or the user triages failures.
03 SKILL.md 正文
Validate Loop
Validation automation for the AWARE project. Runs the full check suite and loops on failure, letting the agent fix issues and re-run.
When to use
Use this skill when:
- Asked to "validate", "verify", "run checks", "run the validation loop"
- About to commit or push — run the full pipeline first
- Fixing CI failures — reproduce locally
- After making changes to data files, types, components, or tests
Required project context
- Working directory:
artifacts/aware-app - Package manager:
pnpm(v10.26.1) - Key scripts (from
package.json):
| Script | Command | Purpose |
|---|---|---|
validate:data |
node scripts/validate-data.mjs |
JSON schema contract validation |
typecheck |
tsc -p tsconfig.json --noEmit |
TypeScript type checking |
lint |
eslint src/ |
ESLint static analysis |
format |
prettier --check ... |
Prettier formatting check |
test |
vitest run |
Unit tests (vitest) |
discover:tests |
node scripts/discover-all.mjs |
Auto-discover pytest/Playwright/Puppeteer/HTTP tests |
build |
vite build |
Production build (auto-runs validate:data) |
verify |
typecheck + lint + format + test | Quick pre-commit check |
Instructions
Execution order
Run these steps in order. Stop at the first failure, fix it, then restart the loop from step 1.
- Data validation —
pnpm validate:data- Checks every JSON data file against its schema
- Cross-references IDs between files
- If this fails, inspect the error output and fix the malformed data or schema
- TypeScript typecheck —
pnpm run typecheck- Full project type checking with
tsc --noEmit - If this fails, fix type errors (missing imports, incorrect types, etc.)
- Full project type checking with
- Lint —
pnpm run lint- ESLint check on
src/ - If this fails, auto-fix with
pnpm run lint:fixwhen safe, then re-run lint
- ESLint check on
- Format —
pnpm run format- Prettier check on source files
- If this fails, auto-fix with
pnpm run format:fix, then re-run format
- Unit tests —
pnpm test- Vitest runner
- If this fails, read the test output to identify the failing test, fix the code, re-run
- Test discovery —
pnpm discover:tests- Regenerates
auto-tests.jsonfrom pytest/Playwright/Puppeteer/HTTP sources - If this fails, check the individual discovery scripts for parse errors
- Regenerates
- Build —
pnpm build- Vite production build (prebuild hook runs
validate:dataautomatically) - If this fails, check Vite/TypeScript errors in build output
- Vite production build (prebuild hook runs
Loop behavior
- After fixing any failure, restart from step 1, not from the failed step
- Keep a counter of iterations; if the loop exceeds 5 iterations without full pass, prompt the user to triage manually
- Report each step result clearly:
✅ pnpm validate:dataor❌ pnpm run typecheck - On full pass, print a summary:
✅ Validation loop complete (X iterations)
- validate:data ✅
- typecheck ✅
- lint ✅
- format ✅
- test ✅
- discover:tests ✅
- build ✅
Partial / quick variants
| Request | Steps to run |
|---|---|
| "quick check" or "verify" | typecheck + lint + format + test (same as pnpm run verify) |
| "validate data only" | validate:data only |
| "pre-commit check" | validate:data + typecheck + lint + format |
| "full validation" | All 7 steps |
Error handling
- If a command is not found, install dependencies first with
pnpm install - If a step produces warnings but no errors, continue to the next step
- If the same step fails twice in a row with the same error, stop the loop and show the error to the user — automatic retry is not helping
- If
buildfails due to a pre-existing issue unrelated to current changes, note it and ask the user whether to proceed
04 同仓库更多 Skills
xlsx
暂无简介
writing-plans
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste.
web-design-guidelines
Review files for compliance with Web Interface Guidelines.
web-component-design
Build reusable, maintainable UI components using modern frameworks with clean composition patterns and styling approache
web-artifacts-builder
暂无简介
vueuse-functions
This skill is a decision-and-implementation guide for VueUse composables in Vue.js / Nuxt projects. It maps requirements