Outgoing links are written, incoming links are built
A node declares the links it makes, each naming the node it points at, and, for every other node it cites — § followed by that node's sid, in any of its fields but its links, the nodes under it and a header's index of its sections, outside a span quoted as code — at least one naming that node.
The links pointing at it stand in the same list, each naming the node it comes from and read from this node's end; they are rebuilt from those declarations — every such entry removed first and built again — and are never written by hand.
A node of the archive is held to neither: it holds no link pointing at it, and none it declares is built into another node.
A node of the SpecSheriff guidelines holds only the links pointing at it from the SpecSheriff guidelines.
A reverse link kept by hand survives the removal of its other end and then reads as a live relation. Rebuilt from scratch every time, the reverse direction is correct whatever was skipped before. Held in one list with the links the node makes, they show every relation of the node from where it stands, the end each entry names telling the direction.
A citation relies on the node it names as a link does; with no link of its own it is seen only where it is written, and missed by whoever changes the node it names.
A node of the archive is no longer part of the specification, and a link built to or from it would read as a live relation.
The SpecSheriff guidelines read the same in every project working by one release (§s-bsya3febm6u64ab), and a list in them of the links one project makes to them would hold true of that project alone.
The links it makes
The links made to it
The decisions taken on it
- Problem
A citation in a node was only a candidate for a link whose type a review was to name, a step no rule stated and nobody took, until hundreds of citations named nodes their own node held no link to, and the nodes cited showed nobody citing them.
- Ruling
The owner: no candidates — a node citing another declares the link to it, of the type that says how the two bear on each other or cites, and the reindex builds the side pointing at the node cited as it does for every link; a citation with no link is refused, and the links the citations lacked are written once.
- Problem
A project's own guidelines refine or implement rules of the SpecSheriff guidelines, which a project reads from the plugin for Claude Code and never writes, so the links pointing at those rules could not be held there; and where the SpecSheriff guidelines are written, the links its own project guidelines make would have been written into them and carried to every project.
- Ruling
The owner: a project's links to the SpecSheriff guidelines are one-way, as a law lists no act made under it; links in both directions stay everywhere else, between the rules of a project's specification and the nodes implementing them.
- Problem
The links pointing at a node are built from the links the nodes make, so they could be computed whenever they are asked for rather than stored in the node.
- Ruling
The owner: they stay stored in the node, so that an agent opening a node sees what depends on it without remembering to ask.
The tests bound to it
- skills/tools/test/unit/model.test.ts · s-bpdqd9v72wg7vsz builds into a node of the SpecSheriff guidelines only the links the SpecSheriff guidelines make to it
- skills/tools/test/unit/model.test.ts · s-bpdqd9v72wg7vsz builds no link of a project into the SpecSheriff guidelines it takes, and links within the project both ways
- skills/tools/test/unit/model.test.ts · s-bpdqd9v72wg7vsz builds the incoming links of the SpecSheriff guidelines as they stand
- skills/tools/test/unit/model.test.ts · s-bpdqd9v72wg7vsz reads the citations of a node outside its links, the nodes under it and spans quoted as code
- skills/tools/test/unit/reindex.test.ts · s-bpdqd9v72wg7vsz empties every incoming list and rebuilds it from the outgoing links
- skills/tools/test/unit/reindex.test.ts · s-bpdqd9v72wg7vsz empties the incoming lists of the nodes of the archive, and builds none of their links into another node
- skills/tools/test/unit/validate.test.ts · s-bpdqd9v72wg7vsz refuses a node of the archive holding a link pointing at it