# Document Truth Alignment

> For any document that states facts about a codebase, separate invariant facts (counts, paths, names, and the doc-type's structural schema) from variant prose, bind each invariant to a code-derived value through a stable key, compile the document from a template, and gate the output so a stated fact can never drift from the code it describes.

Record: `algorithms:document-truth-alignment`
Kind: algorithm
Canonical: https://banes-lab.com/ontology/algorithms#algorithms-document-truth-alignment
Closure: https://banes-lab.com/json/records/algorithms/document-truth-alignment/closure

Listed in [Algorithm contracts](https://banes-lab.com/api/records/algorithms.md), after [<Architecture Anti-Pattern>](https://banes-lab.com/records/algorithms/architecture-anti-pattern.md) and before [Architectural Contract Kernel](https://banes-lab.com/records/algorithms/architectural-contract-kernel.md).

## Domain

- [Architecture](https://banes-lab.com/records/algorithms-domain/architecture.md)

## Tier

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

## Composed by

- [Manifest-Driven Documentation](https://banes-lab.com/records/algorithms/manifest-driven-documentation.md)

## Math type

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

## Force

- [Contract compatibility](https://banes-lab.com/records/force/contract-compatibility.md)
- [Correctness verification](https://banes-lab.com/records/force/correctness-verification.md)
- [Modularity](https://banes-lab.com/records/force/modularity.md)

## Linked from

- [Architecture](https://banes-lab.com/ontology/algorithms/algorithms-domain-architecture.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)
