Gsd-skill-creator kp-content-validation
Validates knowledge pack content against runtime schemas: .skillmeta against KnowledgePackSchema, modules against ModulesFileSchema, activities against PackActivitySchema. Checks cross-pack references, learning outcome uniqueness, and file completeness. Use when validating pack content after generation.
git clone https://github.com/Tibsfox/gsd-skill-creator
T=$(mktemp -d) && git clone --depth=1 https://github.com/Tibsfox/gsd-skill-creator "$T" && mkdir -p ~/.claude/skills && cp -r "$T/infra/packs/knowledge/skills/kp-content-validation" ~/.claude/skills/tibsfox-gsd-skill-creator-kp-content-validation && rm -rf "$T"
infra/packs/knowledge/skills/kp-content-validation/SKILL.mdContent Validation
Purpose
Validates all generated pack content against the runtime schemas defined in src/knowledge/types.ts. This is the quality gate skill used by the KP-05 validator agent after each batch of packs is generated. It catches schema violations, missing files, broken cross-pack references, and duplicate learning outcome codes before content reaches the review stage.
Capabilities
- .skillmeta YAML validation against KnowledgePackSchema via parseSkillmeta
- Modules YAML validation against ModulesFileSchema
- Activities JSON validation against PackActivitySchema (per-entry)
- Vision document structure validation (required sections present)
- Assessment framework structure validation (rubric levels present)
- Resource catalog validation (links resolve, categories present)
- Cross-pack dependency reference validation (pack_id exists in registry)
- Learning outcome code uniqueness across all registered packs
- File completeness check (all 6 required files per pack directory)
- Batch validation: run all checks across 5 packs in a single pass
Key Modules
| Module | Purpose |
|---|---|
| Pack content validation engine |
| .skillmeta YAML parsing with Zod validation |
| Pack registry for cross-reference checking |
| Prerequisite chain validation with cycle detection |
| Entry requirement checking |
Usage Examples
Validate a single pack:
import { validatePack } from './content-validator.js'; const result = await validatePack('src/knowledge/packs/math-101'); // result.valid: boolean // result.errors: string[] (empty if valid) // result.warnings: string[] (non-blocking issues)
Validate a batch:
After Phase 245 completes, run validation across all 5 generated packs: - MATH-101, SCI-101, TECH-101, ENGR-101, PHYS-101 Check cross-pack references resolve within the batch and against previously registered packs.
Dependencies
- Pack runtime API (src/knowledge/) -- all parsers and validators
- Registry with previously registered packs for cross-reference resolution
Token Budget Rationale
1.0% budget reflects the validation module references and schema knowledge needed for comprehensive checking. The validator operates on the runtime API, not on raw content, keeping context requirements moderate.