---
title: "Rule 13.4: Change control, a TypeShade design rule"
description: "Rule 13.4 of the TypeShade language design, in Change control. Every change must pass the mechanical gates: bun run build; bun run test…"
url: https://typeshade.dev/reference/rules/13-4/
language: en
---

# Rule 13.4

Chapter 13, Change control Test

Every change must pass the mechanical gates: `bun run build`; `bun run test`, with `surface-names.test.ts`, `intrinsic-coverage.test.ts`, `capability-reachability.test.ts`, `determinism.test.ts`, `api-surface.test.ts`, `emit-reflection-conformance.test.ts`, and the emit goldens among them; `bun run gate:compile`; the docs snippet test `src/compiler/ts/doc-snippets.test.ts`, which compiles every snippet of the surface document. A change that edits only documents (a `.md` file outside `src/`, or a Doorstop item under `reqs/`) must pass `bun run build`, `bun run test` and the traceability check, and needs no GPU gate, since no GPU gate reads a document; CI’s `change scope` job tells the two apart on a pull request, and a push to `main` and a release run every gate (change `0055`). A pull request range that declares `Move: comments` and that `scripts/move-purity.ts` accepts removes comments and changes no token. Before the merge it must pass the source and policy checks, the unit shards of the pinned TypeScript version and the traceability check. It needs no compile gate, user journeys, TypeScript 5 or 6 unit shards, render gate, perf gate, package smoke or TypeNN build (change `0147`). A range that declares `Move: pure` and that the checker accepts moves declarations between clean files. Before the merge it must also pass the compile gate, the user journeys, one package smoke and the TypeNN build. It needs no TypeScript 5 or 6 unit shards, render gate or perf gate (change `0147`). Each skipped gate runs on `main` after the merge, and a run on `main` is never cancelled by a later push. A push to `main`, a manual dispatch and a release run every gate. A range that the checker refuses is an ordinary change.

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

## Rationale

a rule with a gate is enforced; a rule without one is Appendix B.

## Derives from

`AGENTS.md` and `.github/workflows/ci.yml`.

## 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:

CI (`.github/workflows/ci.yml`).

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

- [`.github/workflows/ci.yml:3`](https://github.com/typeshade/typeshade/blob/af54ddad5/.github/workflows/ci.yml#L3) (checked by the compiler's own test)

## See also

- [Rule 13.3](https://typeshade.dev/reference/rules/13-3/) Test
- [Rule 13.5](https://typeshade.dev/reference/rules/13-5/) Review
- [Design rules](https://typeshade.dev/reference/rules/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

The rule at commit af54ddad5:

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