| name | add-standard |
| description | Scaffolds a new accessibility standard module (metadata, criteria, standard export, tests, kb entry). Delegates the criteria enumeration to spec-researcher + standard-builder. Use when adding any conformance framework. |
| argument-hint | <standard-id> [--references <existing-standard-id>] |
| allowed-tools | Read Grep Glob Bash(bun *) Bash(git *) |
/add-standard $ARGUMENTS
Implements a new standard module for $1.
Templates: criterion.ts.tpl.
Gotchas: see gotchas.md.
Preconditions
- Working tree clean.
src/standards/$1/ does not yet exist.
- If
--references is passed, the referenced standard is loaded.
Workflow
- Preflight:
/verify.
- Research: dispatch
spec-researcher with the standard's spec URL to produce docs/kb/standards/$1.md with its full criterion list, levels, and WCAG equivalents.
- Build: dispatch
standard-builder with $1 and the kb reference. It produces metadata.ts, criteria.ts (in batches), standard.ts, and the golden-file test.
- Register: add
$1 to src/standards/index.ts and to the CLI --standard validator.
- Integration test: dispatch
test-author to write tests/integration/$1-scan.test.ts confirming that --standard $1 surfaces the expected violations via equivalentTo-reached rules.
- Verify:
/verify.
- Fix drift:
/fix-drift to regenerate docs/kb/index.md and llms.txt.
- Check off the backlog item.
- Report.
Return format
standard: $1
publisher: <name>
version: <version>
criteria_count: <n>
equivalent_to_wcag: <n>
commits: [...]
verify: passed