/gaia-validate-rubric
user-facingWhat it does
/gaia-validate-rubric validates a single rubric file (JSON or YAML) against the rubric JSON Schema. Rubric files define the review criteria used by GAIA's six review commands. This command checks that a rubric conforms to the expected structure and reports PASS or FAIL with actionable schema violations.
When to use it
- You edited a project-level rubric override and want to verify it is valid before the next review run.
- You created a custom domain rubric and need to confirm it matches the expected schema.
- A review command reported unexpected behavior and you suspect a malformed rubric.
Prerequisites
- A rubric file must exist at the path you provide. The file can be JSON or YAML format.
How to invoke
/gaia-validate-rubric rubrics/project/code.json
What it does step by step
- Resolve the file Confirms the rubric file exists at the supplied path.
- Run the validator Invokes the rubric validation script. YAML files are automatically converted to JSON before validation. The script validates against the rubric JSON Schema.
- Report the result On PASS: prints a single confirmation line. On FAIL: prints each violation verbatim so you can fix them.
Inputs
| Input | Source | Description |
|---|---|---|
rubric-path | Command argument | Path to the rubric file (JSON or YAML). |
Outputs
This command produces text output only. It prints PASS or FAIL with violation details. No files are created or modified.
Example session
> /gaia-validate-rubric rubrics/project/code.json
PASS: rubrics/project/code.json
> /gaia-validate-rubric rubrics/project/broken.yaml
Violations:
- $.rules[2].severity: expected one of [critical, high, medium, low], got "urgent"
- $.rules[5]: missing required field "category"
FAIL: rubrics/project/broken.yaml -- 2 violation(s)
What to run next
- Fix any violations and re-run
/gaia-validate-rubric. /gaia-config-validate --rubric-- to validate the merged output of all rubric layers combined.
Troubleshooting
"Rubric file not found"
The path you provided does not point to an existing file. Check the path and ensure the rubric has been created.
"YAML rubric input requires yq or python3"
YAML files need a converter. Install yq (preferred) or ensure python3 with PyYAML is available on your system.