SpecSheriff
rule · _guidelines/tools/16 · s-pvzms7d8kxb8dk2

Where the types and runtime checks generated from the data records are written

Checkedconfirmed by its owner

sheriff types writes the types and runtime checks it generates from the data record nodes into the files the project's technical appendix lists for them. The list of those files is defined in the section of the technical appendix that describes the technologies the whole system is built with, the stack, in the rule that describes how the system generates its types and runtime checks from its data record nodes, as the rule on data structures requires (§s-e877bnfa559tvk9); each path in it is taken from the root of the repository. Where the technical appendix defines no such list, sheriff types writes nothing.

A file's extension says what is written into it: .ts the types in TypeScript, .py the types in Python, .json the runtime checks in JSON Schema of draft 2020-12. Those checks are run by the JSON Schema validator the technical appendix names, which asserts format rather than taking it as a note.

sheriff binding reads a file of types as the system's code even where the glob patterns naming where that code lives do not reach it.

Why

Which files the generated types go to is a choice covering the whole system, and such choices are described in the stack section (§s-vj7ercem526zd6v). Defined as a list in one rule, those files are read by the tools as the levels of the domains are read from a list in the project's own guidelines, rather than looked for in prose. The extension already says what a file holds. A validator taking format as a mere note would pass an instant that is no instant. A project with no code yet has nowhere to write the types. Read as code, a file of types has its tags read, so that each data record node's list of code names the types generated from it.

The links it makes

The links made to it

The tests bound to it