# PAG Well-Formedness Validation

> Scan a PAG document for structural and epistemic defects, each named for the shape it catches — a retired unit head, a node without a gate, a check without evidence, a gate without a population or with an empty one, an unknown left unrouted, a write without a refusal, an artifact without freshness, a node declared twice, an input naming no source, an invariant missing its set, parties or objector, a bare invariant block, a lowercase keyword, a bare FOR, a missing colon, a vague condition — and emit a token-based, regex-free verdict.

Record: `algorithms:pag-well-formedness-validation`
Kind: algorithm
Canonical: https://banes-lab.com/ontology/algorithms#algorithms-pag-well-formedness-validation
Closure: https://banes-lab.com/json/records/algorithms/pag-well-formedness-validation/closure

Listed in [Algorithm contracts](https://banes-lab.com/api/records/algorithms.md), after [PAG Authoring Kernel](https://banes-lab.com/records/algorithms/pag-authoring-kernel.md) and before [<PAG Instruction Concern>](https://banes-lab.com/records/algorithms/pag-instruction-concern.md).

## Domain

- [Pattern Abstract Grammar](https://banes-lab.com/records/algorithms-domain/pag.md)

## Stage

- [terminate](https://banes-lab.com/records/stage/terminate.md)

## Axis

- [termination](https://banes-lab.com/records/reasoning/axis-termination.md)

## Tier

- [process](https://banes-lab.com/records/vocabulary/domain-tier-process.md)

## Composes

- [PAG Handoff Gate](https://banes-lab.com/records/algorithms/pag-validation-gate.md)
- [PAG Explicit Control Flow](https://banes-lab.com/records/algorithms/pag-explicit-control-flow.md)

## Named in the derivation of

- [PAG Authoring Kernel](https://banes-lab.com/records/algorithms/pag-authoring-kernel.md)

## Math type

- [Logic](https://banes-lab.com/records/reasoning/math-type-logic.md)

## Force

- [Correctness verification](https://banes-lab.com/records/force/correctness-verification.md)
- [Model governance](https://banes-lab.com/records/force/model-governance.md)

## Linked from

- [Pattern Abstract Grammar](https://banes-lab.com/ontology/algorithms/algorithms-domain-pag.md)
- [The derivation loop](https://banes-lab.com/ontology/reasoning/reasoning-loop-derivation-loop.md)
- [The axes](https://banes-lab.com/ontology/reasoning/the-axes.md)
- [The mathematics](https://banes-lab.com/ontology/reasoning/the-mathematics.md)
- [Domain tiers](https://banes-lab.com/ontology/schema/the-vocabulary-domain-tier.md)
- [The forces](https://banes-lab.com/ontology/schema/the-forces.md)
