50 lines
2.2 KiB
Markdown
50 lines
2.2 KiB
Markdown
# CT.M1 — ContentValidationPipeline
|
||
|
||
## Summary
|
||
|
||
| Field | Value |
|
||
|--------|--------|
|
||
| **Module ID** | CT.M1 |
|
||
| **Track** | [Content tooling — internal authoring](../tooling/internal_authoring.md) (cross-cutting; not E1–E9) |
|
||
| **Stage target** | Prototype |
|
||
| **Status** | Planned (see [dependency register](module_dependency_register.md)) |
|
||
|
||
## Purpose
|
||
|
||
Own **content schema artifacts**, **automated validation** in CI and locally, and (when wired) **server-side smoke loading** so file-backed catalogs cannot drift from enforced contracts.
|
||
|
||
## Responsibilities
|
||
|
||
- Publish and version **JSON Schema** (or agreed equivalent) for catalogs consumed by **E2.M1**, **E3.M2–M3**, **E4.M1**, **E7.M1**.
|
||
- Run **structural** and **cross-reference** validation before merge; expose the same rules to **CT.M2**.
|
||
- Optional: **C#** deserialize test or boot check aligned with `ContentCatalogRegistry` (or successor).
|
||
|
||
## Key contracts
|
||
|
||
| Contract | Role |
|
||
|----------|------|
|
||
| Content schema files | `$id` + versioning per [contracts.md](contracts.md) |
|
||
| Validation CLI | Stable exit codes and machine-readable errors for CI and studio |
|
||
|
||
## Module dependencies
|
||
|
||
- **Soft:** Gameplay modules above must define or stabilize the **shapes** being validated; pipeline can ship **minimal** schemas first.
|
||
|
||
## Dependents (by design)
|
||
|
||
- **CT.M2** — AuthoringStudioApplication
|
||
- **CT.M3** — ContentReferenceAndBundleWorkflows
|
||
|
||
## Related implementation slices
|
||
|
||
Content tooling **Slice 1** — schemas + CI; **Slice 4** — server parity hardening.
|
||
|
||
## CI (prototype)
|
||
|
||
**Skill catalogs:** the repo **PR gate** workflow ([`.github/workflows/pr-gate.yml`](../../../.github/workflows/pr-gate.yml)) runs [`scripts/validate_content.py`](../../../scripts/validate_content.py) on every push and pull request. It validates each object in `content/skills/*.json` under the top-level `skills` array against [`content/schemas/skill-def.schema.json`](../../../content/schemas/skill-def.schema.json) (Python **jsonschema**, Draft 2020-12). Extend the script when additional catalogs and schemas ship.
|
||
|
||
## Source anchors
|
||
|
||
- Plan: [`internal-content-authoring.md`](../../plans/internal-content-authoring.md)
|
||
- [Module dependency register](module_dependency_register.md)
|