Skip to content
EN · PT

Gate: code-reference-valid

Every code the spec cites exists in the project.

Property Value
Checker code-reference-valid
Confronts spec
Blocking by default — new project yes
Blocking by default — existing project no — informs

Confronts specification content against the project universe of identities: every requirement code cited by a specification must resolve to an existing unit in the map.

A lying anchor is the exact failure this framework exists to prevent. It takes a form that other gates miss: a specification cites an external requirement identifier — in a note, a narrative explanation, or a cross-reference — and the referenced unit does not exist anywhere in the repository. The citation simulates traceability while pointing to empty space.

A measured incident demonstrated this defect: a schema specification asserted creation of indices on 2026-08-11 and referenced four requirement codes belonging to specifications that were never created. The file described by that schema did not contain a single line implementing the entity. Yet the specification passed all gates: it possessed a code, a header, and valid section headings, and dependency checks only evaluate method symbols rather than requirement prose. Any future reader — human or autonomous agent — reads the text as an authentic historical record of completed work.

This gate enforces referential truth by extracting every requirement token shaped like an identity code followed by a requirement suffix and verifying that its owning unit exists in the project graph.

This gate operates in distinct territory from neighbouring gates:

  • Unlike dependency-honored, which inspects dependency tables to confirm that promised Go symbols and methods appear in code, this gate validates requirement codes against the project identity universe. A unit can legitimately consume existing Go packages while citing non-existent requirement codes.
  • Unlike code-cataloged, which ensures that exported code symbols are catalogued within their own unit specification, this gate governs external references pointing to other specifications.
  • Unlike unit-complete, which enforces local unit structure within a single unit, this gate maintains referential integrity across the collective graph of specifications.
gates:
- name: code-reference-valid
on: [spec]
check: code-reference-valid

Source: checker · its spec