SpecSheriff
rule · _guidelines/tools/2 · s-f5rz6b7dhxejjts

The commands

Checkedconfirmed by its owner

sheriff validate, sheriff binding, sheriff citations, sheriff guard, sheriff message and sheriff review implement the checks as the table of how each check is made describes them (§s-4kd2pave7vm4hmd).

sheriff init sets a repository up for the SpecSheriff tools, and sheriff remove takes SpecSheriff out of it (§s-7unxytshhc4md54).

sheriff reindex gives a sid to every node that has none, computes every node's address from where it stands, empties every incoming list and rebuilds it from the outgoing ones, rebuilds the index in every domain's header from the domain's sections, and empties the status of every checked node outside the SpecSheriff guidelines the project takes unless the latest line for its wording's fingerprint is a confirmation by the node's owner; it is run after every change to the specification.

Before anything else, sheriff reindex merges, in every file it rewrites, the values an object holds under one key, each into those written before it: two lists into one holding the members of the first and then those of the second that the first does not hold, two objects key by key in the same way with each key where it was first written, and two values JSON Schema holds equal into one. It names every key it merged, with the file and each value's line, and refuses any other two, naming the file, the key and each one's line and value, and then writes no file.

sheriff confirm records an owner's confirmation (§s-v4qus7raqnwzneb).

sheriff export writes the readable export in markdown, one file for each file of the specification, each node as §s-k4nqjr96ux7a5m7 says.

sheriff render writes the map, the mindmap of the specification's structure drawn from its nodes (§s-rpv4fkdqqguptqd).

sheriff guide prints every node of the guidelines — the base, the appendix of the tools and the project's own — as §s-k4nqjr96ux7a5m7 says, and the figures counted off the model as it prints: how many nodes each part holds and how many of them are checked.

sheriff show prints a node, found by its sid or its address, as §s-k4nqjr96ux7a5m7 says.

sheriff types generates, from the data record nodes, the types and the runtime checks of the system's code, where the technical appendix says they stand. It writes a file only where the file is missing or holds, line endings aside, anything other than what it generates, and names each file it writes; where the check of generated copies refuses the list of those files or a data record node (§s-4kd2pave7vm4hmd), it names each refusal and writes no file; while a data record node is unchecked, it writes no file and names each such node.

Why

The reindex rewrites whole the files written by hand, so it keeps everything they hold: two values written under one key are each somebody's intent, kept together where both can stand and refused where keeping one would drop the other, since nothing says which was meant; and every merge is named, because one of them may have been written to replace the other.

sheriff types runs after every edit an agent makes and at every commit, where the pre-commit hook copies each file it names into the working tree for its author to stage (§s-477gtdrkw34dzxw): the files it names are then exactly those its author has to stage, and a file whose content no edit changed keeps its modification time, so that nothing watching the files takes it for changed. Line endings are set aside because git may check a file out with endings other than those committed, which would make every file differ at every run.

Where anything is refused, no file is written, so that the files never disagree, one generated from the nodes as they stand beside another left behind them; and each refusal is named, so that whoever runs it, by hand or through a hook, learns which node or list to change.

The links it makes

The decisions taken on it

2026-10-07 · textual
Problem

The types and runtime checks generated from the data record nodes had no command.

Ruling

The owner: a command of their own generates them.

2026-10-21 · textual
Problem

The reindex read every file through a parser that keeps the last of two values under one key and drops the first, and wrote back what it read: a ruling written under a second decisions key of a node's metadata hid two earlier rulings on the same rule from every tool, and the next reindex would have deleted them.

Ruling

The owner: the reindex merges the two values, names each merge, and refuses two it cannot merge, naming both.

2026-10-26 · textual
Problem

A command reported a citation as a candidate for a link nobody typed, and the citation check, which a commit runs, was named by no rule.

Ruling

Following the owner's rulings on citations (§s-bpdqd9v72wg7vsz, §s-hr7j7scmfkkjnws): the command reporting candidates goes, and the citation check is named among the commands.

2026-10-27 · textual
Problem

The commands were one repository's package scripts.

Ruling

The owner: they are the commands of the SpecSheriff tools, described in the appendix of the tools.

2026-10-30 · textual
Problem

The first sentence gave sheriff binding every check between the specification and the code, though the table of how each check is made gives some of them to other commands.

Ruling

The owner: the sentence names the commands that check and leaves to that table which check each makes, so that it is said in one place.

2026-10-31 · textual
Problem

The rule on sheriff types said neither which files it writes nor what it refuses, and the tool rewrote every listed file at every run, though it now runs after every edit an agent makes and at every commit; the rule read as one block of text, and named the map without saying what it is.

Ruling

The owner: sheriff types writes a file only where its content changes, names each file it writes, and writes nothing where anything is refused; the checks are implemented as the table describes them; the map is named as the mindmap of the specification's structure; each command stands in a paragraph of its own, sheriff init before sheriff reindex.

2026-10-31 · textual
Problem

sheriff types wrote the types and runtime checks from data record nodes whether or not they were checked.

Ruling

Following the owner's ruling on §s-kh8qcd5kxgh9z3j: code generated from the nodes waits until every node it is generated from is checked, no commit changing it meanwhile, and its lag is reported.

The tests bound to it