1 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
6ccee10a9d feat(vault-cli): add vault lint + schema drift check
Two new tools.

vault lint <path>
  Author-facing linter. Accepts a single YAML file or a directory.
  Severity levels:
    ERROR    schema violation; question cannot be loaded
    WARN     likely misclassification (zone-level affinity mismatch,
             chain position duplication, etc.)
    INFO     hygiene suggestions (human-review-pending on published Qs)

  Zone-level affinity warning implements paper §3.3 Table 2 (line 397):
  'An L1 question tagged as evaluation is flagged for review, since
  evaluation is cognitively inconsistent with Bloom's Remember level.'
  The warning is soft — marking an outlier does not reject it; it
  surfaces for reviewer judgement. Quickly identifies the ~943 L6+
  questions currently carrying zone=design that should probably be
  zone=mastery.

scripts/check_schema_sync.py
  CI drift check. Compares enum values in schema/enums.py against
  schema/question_schema.yaml (the authoritative LinkML schema) and
  exits non-zero if they disagree. Prevents the three-schema drift
  that caused the v0.1 migration defects from recurring.

  Enums cross-checked: Track, Level, Zone, BloomLevel, Phase, Status,
  Provenance, HumanReviewStatus. Output on success: 'OK: 8 enums in
  sync.' Wire into CI in a follow-up PR.
2026-04-21 18:04:10 -04:00