The validator at _meta/validate.mjs enforces a fixed set of rules on every content file. CI runs it on every PR via .github/workflows/validate.yml. The source of truth for these rules is SCHEMA.md in the repo root; this page mirrors them as a reference.
Errors (block PR)
The validator exits non-zero if any of these fail:
-
Missing required field.
name,description,type,scope,author,versionare mandatory. -
Unknown value for
typeorscope. Must match the enum in_meta/schema.json. -
Body > 200 lines. Matches Anthropic’s MEMORY.md cap; longer bodies don’t fit Claude Code’s context-loading discipline.
-
description> 140 chars. Used in README and slash-command picker, needs to be tight. -
Tag not in
_meta/tags.txtcontrolled vocabulary. Tag taxonomy is centrally curated. -
name≠ filename (minus.md). Catches typos. -
Type-specific schema violations. See File types for the per-type frontmatter requirements.
-
scope: personal-sharewithowners.length != 1orowners[0] != author.github. Strict single-owner enforcement. -
deprecated: truewithout populateddeprecated-reason:ordeprecated-since:. Tombstone shape required. -
PR touches a file under
hooks/other than.gitkeep. v2 guard.
Warnings (do not block, but visible in CI logs)
These warnings are informational — they don’t block the PR but they surface dangling references for the reviewer to notice.
Drift checks
CI separately runs:
node _meta/build-codeowners.mjs
git diff --exit-code .github/CODEOWNERS
node _meta/build-index.mjs
git diff --exit-code _meta/index.json
If either differs from the committed file, CI fails with a pointer to regenerate locally and commit. These checks catch PRs that change a file’s owners: field without regenerating CODEOWNERS, or add/remove a file without regenerating the index.
Running locally
node _meta/validate.mjs
Runs all the rules above against the working tree. Exits 0 if green, non-zero on any error. Warnings print but don’t affect the exit code.
Future enforcement (deferred to ticket #2)
The following rules are documented in SCHEMA.md but not yet validator-enforced. They’re applied by reviewer judgement until the ticket-#2 work lands:
-
Version-bump-on-body-change. PRs that change body must bump
version:. -
Semver monotonicity.
version:regression or flat-on-body-change should be rejected. -
CODEOWNERS strict policy.
scope: universalPRs require maintainer + owner approval;scope: teamrequires any owner;scope: personal-sharerequires single named owner.
See issue #2 for the full update-regulation design.
See also
-
Scope rubric — when each scope rule applies.
-
SCHEMA.md— full contract with worked examples. -
_meta/validate.mjs— the implementation.