> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xkat.space/llms.txt
> Use this file to discover all available pages before exploring further.

# The Harness (Code Validation)

> How xkat validates code quality and correctness.

The **Harness** is xkat's code validation system. It checks the code in your
lessons for syntax and quality issues so problems are caught **before** a course
reaches learners.

## What it does

<CardGroup cols={2}>
  <Card title="Syntax validation" icon="code">
    Confirms lesson and exercise code is syntactically valid.
  </Card>

  <Card title="Quality checks" icon="shield-check">
    Flags quality issues so published code meets a consistent bar.
  </Card>

  <Card title="Constraint enforcement" icon="lock">
    Treats your course constraints as fixed and verifies content respects them.
  </Card>

  <Card title="Early failure" icon="triangle-exclamation">
    Surfaces errors during creation, not after publishing.
  </Card>
</CardGroup>

## Where it fits

The Harness is a key part of the [AI control pipeline](/en/platform/ai-pipeline).
Combined with Golden Templates and structured-output validation, it's how
AI-generated content reaches a publishable, reliable quality.

## In your flow

Run the Harness as part of the [creation flow](/en/studio/creation-flow), after
generating content and before [publishing](/en/studio/translation-publishing).
Fix anything it flags, then proceed.
