---
title: "Rule 3.7: Textual structure and names in TypeShade"
description: "Rule 3.7 of the TypeShade language design, in Textual structure and names. A new surface section must take the next free § number in docs/use-typeshade-surface."
url: https://typeshade.dev/reference/rules/3-7/
language: en
---

# Rule 3.7

Chapter 3, Textual structure and names Review

A new surface section must take the next free `§` number in `docs/use-typeshade-surface.md` as the current tree makes it, and a new diagnostic must take the next free `TS80xx` code in `src/compiler/ts/codes.ts`. A branch working in parallel may instead be handed a block of numbers and take the number from the block. A number must not be renumbered, a retired number must not be reused, and the unused numbers of a block must stay a gap.

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

## Rationale

a section number and a code are cited from issues, tests, and CHANGELOG entries that do not move when the document does.

## Derives from

[#162](https://github.com/typeshade/typeshade/issues/162) (“claim before you write”); PR [#165](https://github.com/typeshade/typeshade/issues/165)’s body, which took its numbers from a block; the numbering comment at the head of `codes.ts` (8011 is retired and stays a gap; [`TS8099`](https://typeshade.dev/reference/errors/ts8099/) is the parked catch-all; after [`TS8038`](https://typeshade.dev/reference/errors/ts8038/), a block handed to a parallel branch leaves a gap that is never reused).

## How it is verified

Held by review. No file checks it, and the rule names review as what holds it.

Where the rule says the compiler enforces it:

review; `src/compiler/ts/codes.ts` is a hot-spot file ([Rule 13.5](https://typeshade.dev/reference/rules/13-5/)).

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

- [`src/compiler/ts/codes.ts:1`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/codes.ts#L1)

## See also

- [Rule 3.6](https://typeshade.dev/reference/rules/3-6/) Test
- [Rule 3.8](https://typeshade.dev/reference/rules/3-8/) Test
- [Rule 13.5](https://typeshade.dev/reference/rules/13-5/)
- [Design rules](https://typeshade.dev/reference/rules/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

The rule at commit af54ddad5:

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