/document-rulesets

internal
Category:
Internal Skills

What it is

Document-specific validation rulesets for artifact type detection (path and frontmatter), structural quality checks per artifact type (PRD, architecture, UX design, test plan, epics), and two-pass validation logic. The validator loads these rulesets when checking specific document types.

Called by

What it does

Provides type detection: determines whether an artifact is a PRD, architecture doc, UX design, test plan, story, etc. using frontmatter template fields (highest priority), then path-based detection.

Defines structural rules per document type -- expected sections, required fields, format conventions.

Supports the two-pass validation logic: Pass 1 (structural) checks document shape, Pass 2 (factual) verifies claims against the filesystem.

When you will see it surface

  • When you run /gaia-val-validate on a known document type, the structural findings (missing sections, wrong format) come from these rulesets.
  • If the artifact type is unrecognized, structural validation is skipped and only factual verification runs.

Technical notes

  • Frontmatter detection wins over path detection when both produce a match.
  • Unknown artifact types fall through to factual verification only -- no rules are fabricated.
  • Severity classifications in rulesets are enforced as-is by the caller.