# QA Engine

The central QA engine runs every repository validator that protects the production pipeline.

## Validators

- `tools/qa-validator/validate-dsl.mjs` checks production DSL YAML definitions in `assets/definitions/`.
- `tools/qa-validator/validate-asset-registry.mjs` checks `assets/registry/ASSET_REGISTRY.v2.yaml`.

## Commands

- `pnpm qa`
- `pnpm validate`
- `node tools/qa-validator/run-all.mjs`

The runner writes the latest JSON report to `reports/qa/latest-report.json`.

## Failure Resolution

1. Read the failing validator output.
2. Fix the missing field, duplicate ID, invalid lifecycle status, missing source definition, or broken DSL entry.
3. Run `pnpm qa` again.
4. Commit only after the central QA runner passes.

## Codex Requirement

Codex must run the central QA runner before every commit that changes source, docs, schemas, tools, assets, definitions, or registries. If QA fails, Codex must fix the failures or clearly report the blocker instead of committing.
