---
title: "Rule 11.1: Targets and the oracle, a TypeShade design rule"
description: "Rule 11.1 of the TypeShade language design, in Targets and the oracle."
url: https://typeshade.dev/reference/rules/11-1/
language: en
---

# Rule 11.1

Chapter 11, Targets and the oracle Test

There must be one IR, and the WGSL writer, the GLSL ES 3.00 writer, and the CPU oracle must consume it over one shared tree walk; a new emit feature must go into the shared walk, or the oracle and the GLSL writer drift.

The rule text and the parts under it are the compiler's own English, as the design document writes them.

## Rationale

three backends over one walk is what makes the oracle a reference and not a fourth implementation.

## Derives from

`AGENTS.md` (“one IR, three backends, one tree walk”).

## How it is verified

Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.

Where the rule says the compiler enforces it:

`src/core/oracle-backend-parity.test.ts` and `examples/glsl-stages-parity.test.ts`.

The files that verify it at commit af54ddad5, each at the first line that names the rule:

- [`examples/glsl-stages-parity.test.ts:20`](https://github.com/typeshade/typeshade/blob/af54ddad5/examples/glsl-stages-parity.test.ts#L20)
- [`src/core/oracle-backend-parity.test.ts:1`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/oracle-backend-parity.test.ts#L1)

## Explained in

The sections of the surface document that explain this rule, at commit af54ddad5:

- [§54 Derivative uniformity: the control flow a sample may be reached under](https://github.com/typeshade/typeshade/blob/af54ddad5/docs/use-typeshade-surface.md#54-derivative-uniformity-the-control-flow-a-sample-may-be-reached-under)

## See also

- [Rule 10.5](https://typeshade.dev/reference/rules/10-5/) Test
- [Rule 11.2](https://typeshade.dev/reference/rules/11-2/) Test
- [Design rules](https://typeshade.dev/reference/rules/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

The rule at commit af54ddad5:

- [`docs/language-design.md:1446`](https://github.com/typeshade/typeshade/blob/af54ddad5/docs/language-design.md#L1446) (the design document)
- [`reqs/rules/RULE-1101.md`](https://github.com/typeshade/typeshade/blob/af54ddad5/reqs/rules/RULE-1101.md) (its traceability item)
