Validator
Run MCS quality checks on any product in workspace/ and return actionable, scored reports.
When to use: After building or modifying a product, before publishing, or anytime you want a quality snapshot.
When NOT to use: On products outside workspace/. Do not use to validate the Engine itself.
Activation Protocol
- Shared preamble: Load
references/quality/activation-preamble.md— context assembly, persona adaptation, deterministic routing rules. - Detect product type: read
.meta.yaml→product.typeandstate.phase- Missing → infer from file structure (SKILL.md, AGENT.md, SQUAD.md, hooks.json, etc.)
- Cannot determine → ask: "What product type is this?"
1b. Mode selection (Express vs Guided). Read
creator.yaml → preferences.workflow_style. Resolve the flow mode: --expressflag ORworkflow_style == "autonomous"→ Express mode. Skip the coaching explanations after each stage, suppress the remediation menu, and deliver a single verdict block at the end (pass/warn/fail + fix instructions in a compact list). Persona tone still holds; only the conversational scaffolding is trimmed.workflow_style == "guided"or missing → Guided mode (default). Walk each stage with the full coaching voice and propose remediation interactively after failing stages.
- Maintain creator persona: Read
creator.yaml→ adapt toprofile.typeandtechnical_level - Load voice identity: Load
references/quality/engine-voice-core.md. Load the fullreferences/quality/engine-voice.mdonly for peak moments (first-pass milestone celebration, confronting failure verdict) — see UX Stack below. 3b. Exemplar load: Loadreferences/quality/exemplar-outputs.mdsections E6 and E7 only — the validation pass and failure exemplars. Your verdict MUST carry the same visual structure: Frame for pass (with tier badge), rail format for failure (with numbered fixes + estimated score after). Adapt to creator context — never copy verbatim. - Load DNA requirements:
product-dna/{type}.yaml4b. Load architectural DNA: Readstructural-dna.md. The 10 architectural principles and the Tier 1 DNA patterns (D1-D4, D13, D14) are the canonical audit baseline — Stages 3 and 5 grep the product against them, and any violation surfaces as coaching. - Load product spec:
references/product-specs/{type}-spec.md5b. Load entity ontology (squad/system/agent/workflow/minds): If type ∈ {squad, system, agent, minds, workflow}, readreferences/entity-ontology.md. This substrate drives semantic validation:- §HERITAGE: verify the product inherits correct DNA from its lineage (squad must pass all agent DNA + D9/D10/D12/D18)
- §COMPOSITION: verify only allowed compositions (squad→agents+minds+skills+workflows; system→everything; workflow→skills only)
- §AGENT_ROLES: if
.meta.yamlhasagent_role, verify tool boundaries match the role - §SQUAD_ANATOMY: verify all 8 mandatory components exist and have content
- §WORKFLOW_VS_SQUAD: verify workflows don't contain agents and squads don't use fixed-sequence-only routing
- §HEURISTICS: surface coaching if product shows signs of wrong type (skill >800 lines → suggest agent)
- For type=system ONLY: §SYSTEM_ENGINES — verify declared gears have concrete implementations (not just prose), verify counterpart couplings are declared, verify critical chain (E4→E5→E6→E7) is complete if perception gear is active
- §INTELLIGENCE_PIPELINE — verify baseline delta (is this better than Claude vanilla?), verify substance (does this carry domain intelligence or is it just formatted instructions?)
- Load config:
config.yaml→ scoring weights, thresholds, placeholder patterns - Load gates:
quality-gates.yaml→ state transition rules 7b. Load proactives: Loadreferences/engine-proactive.md— wire #1 (pipeline guidance: after validate passes, guide to /test then /package), #19 (error recovery: on validation failure, propose specific fixes), #20 (test mandate: if MCS-2+ and not tested, block /package suggestion). - CLI contract: Load
references/cli-contract.mdfor Stage 6 (CLI Preflight). Severity map:- Warning:
validate --json— CLI validation is advisory during /validate (blocking only during /publish) - Warning:
doctor --json— health check is advisory, score < 8.0 triggers suggestion - Stage 6 detail protocol:
references/validation-stages/stage-6-cli-preflight.md
- Warning:
Commands
/validate → Auto-detect, run MCS-1
/validate --level=2 → MCS-2 (includes MCS-1)
/validate --level=3 → MCS-3 (includes MCS-1+2, PRO only)
/validate --fix → MCS-1 + auto-remediate fixable issues
/validate --report → MCS-1 + output detailed report file
/validate --batch → Validate ALL products sequentially
Core Instructions
STAGE EXECUTION
Execute stages in order. Blocking stages stop on failure. Non-blocking stages report but continue.
Load detailed stage protocols from references/ on demand. Each stage is a separate file — load only the stage(s) you need for the current --level.
| Stage | Name | Blocking | Reference |
|---|---|---|---|
| 0 | Intent Coherence (W3.7) | advisory | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-0-intent-coherence.md |
| 1 | Structural | YES | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-1-structural.md |
| 2 | Integrity | YES | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-2-integrity.md |
| 3 | DNA Tier 1 | YES (MCS-1) | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-3-dna-tier1.md |
| 4 | DNA Tier 2 | no (MCS-2) | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-4-dna-tier2.md |
| 5 | DNA Tier 3 | no (MCS-3, PRO) | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-5-dna-tier3.md |
| 6 | CLI Preflight + 6b Health | YES (6) / advisory (6b) | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-6-cli-preflight.md |
| 7 | Anti-Commodity (+ 7b/7c/7d) | no (MCS-2+) | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-7-anti-commodity.md |
| 8 | Value Intelligence | no (MCS-2+) | Read ${CLAUDE_SKILL_DIR}/references/value-intelligence.md (legacy) OR ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-8-value-intelligence.md (new) |
| 9 | Voice Coherence | advisory | Read ${CLAUDE_SKILL_DIR}/references/validation-stages/stage-9-voice-coherence.md |
Stage 0 runs first when .meta.yaml contains an intent_declaration block. It is advisory — surfaces coherence drift as coaching, never blocks. Skips silently for legacy products that lack the declaration, with a one-line advisory note.
Stage 0 failure behavior: If Stage 0 checks detect errors (enum_membership, type_legality, codex_consistency), they are reported as coaching items in the verdict — they appear in the output but do NOT affect the overall score or the pass/fail verdict. Stage 0 results are written to .meta.yaml → stage_0_results for downstream consumers but never prevent progression to Stage 1.
Stage 7 sub-stages (7b cognitive fidelity, 7c baseline delta, 7d composition check) are inside the stage 7 file — they only fire under their prerequisites and never need a separate load.
Index: ${CLAUDE_SKILL_DIR}/references/validation-stages/_index.md lists all stages with file paths and routing rules.
Stage routing by level:
--level=1(MCS-1): Stages 0, 1, 2, 3, 6, 9--level=2(MCS-2): Stages 0, 1, 2, 3, 4, 5 (squad only), 6, 7, 7b-7d, 8, 9--level=3(MCS-3): Stages 0, 1, 2, 3, 4, 5, 6, 7, 7b-7d, 8, 9
Squad-specific validation (applies at MCS-2+):
When product.type == "squad", the following additional checks run regardless of edition:
- Stage 5 DNA Tier 3 patterns D9, D10, D18 are MANDATORY at MCS-2 for squads (not P