8 Supplemental Source Surface
This supplement records the top-level source surfaces a reader or reviewer should inspect before turning any prose in the main manuscript into a verifiable claim. Each surface below is authored material under version control; the generated artifacts it produces are described separately so that the boundary between hand-written source and reproducible output stays explicit.
The src/ tree is the executable core of GNN. It is
organized into 45 Python packages spanning 823 source files and roughly
247543 lines of code. Alongside these packages sit the 25 top-level step
modules (0–24) that implement the numbered pipeline as thin
orchestrators delegating into the packages, each module owning one stage
of the progression from a parsed GNN text model through visualization,
type checking, code export, and executable cognitive simulation. A claim
about declared pipeline behavior should identify its source
implementation; a claim about actual execution additionally requires a
source-bound command and result receipt.
The input/ tree holds the model corpora that exercise
the pipeline. Its gnn_files/ subtree contains 12 corpus
directories organized by model family, together totaling 39 example
files — 29 discrete-state specifications and 10 continuous
linear-Gaussian specifications, the partition the manuscript’s
model-kind accounting uses (sec. 3.2).
The cold-start index input/gnn_files/INDEX.md catalogues
every exemplar with its kind and task folder, and the
recursive/ directory is reserved for bounded
--autonomous proposal-loop runs, holding no committed
models. Every model file under input/ lives in that
subtree, so the 39-file count covers the whole tree. A
model_family_manifest.json enumerates the 9 registered
families and their target directories. This manifest is the
authoritative registry that downstream steps and the manuscript variable
producer read when they report family counts and cross-framework
coverage; it should be consulted directly rather than inferred from
directory listings.
The scripts/ tree contains the thin orchestrators that
gate and reproduce the project. These include acceptance scripts that
evaluate scoped pipeline runs, reliability gates that check selected
semantic and coverage contracts, and the manuscript variable producer
(src/gnn/manuscript/variables.py driven from this layer)
that emits the double-brace {{...}} token values consumed
throughout the manuscript. Treating these scripts as the source of
reproduction commands keeps reported numbers bound to what the code
actually computes.
The docs/ tree is the prose and reference surface,
comprising 702 files of specification, tutorial, and design
documentation for the GNN language and its Active Inference grounding
(Smékal and Friedman 2023). It is the
place to verify that a manuscript statement about GNN syntax or
semantics matches the documented language rather than a convenient
paraphrase.
The output/ tree collects per-step pipeline artifacts:
the data dumps, intermediate representations, validation reports, and
the 7 figure artifacts committed under it. Generated build artifacts can
be regenerated from bound inputs, while raw receipts and numerical
results preserve evidence of particular runs. Reproduction requires
their source and environment bindings; the directory location alone does
not establish current-run evidence. Notably,
output/data/manuscript_variables.json is where the
manuscript’s substituted token values are materialized.
8.1 Package Boundaries and Downstream Importers
The 45 packages are not free to import one another.
pyproject.toml declares 12 import-linter contracts, each of
which forbids a named set of imports. Most fix a direction of
dependency: the shared operations stay below both transports, the
pipeline below the report step, the parsers, types and importer reader
below the transports and the execution step, and extraction below
rendering. tests/architecture/test_dependency_direction.py
checks the same directions from the syntax tree, counting imports
written inside functions and type-checking blocks, and it freezes the
set of package pairs that still depend on each other in both directions,
so that set can shrink but cannot grow unnoticed. Where an
implementation moved to satisfy a contract, the earlier import path
re-exports the same objects, and the tests assert that identity. These
contracts state which imports are refused. They do not establish that
the packages behind them can be installed separately.
A repository that applies GNN records the upstream revision it
consumes. The released reader src/gnn/importers.py handles
supported JSON pin records and validates the member’s specifications
with the installed parser. Step By Step pins a Git revision in
pyproject.toml and runs gnn validate --strict
on its authored models through its locked local gate.
docs/downstream/importers.json registers 43 importers, of
which 23 pin the v5.4.0 release by tag and commit.
scripts/check_importer_registry.py checks the registry
against its prose form and this repository’s tags without network
access. The --online mode compares each public row with the
declaration on the member’s default branch. Each member’s own gate
decides whether its specifications parse at the recorded revision.
8.2 Authored Source Versus Generated Output
src/, scripts/, input/, and
docs/ are authored and reviewed. The output/
tree holds generated artifacts and retained run evidence. Its
manuscript/ directory contains token-substituted copies of
the authored docs/manuscript/ sections. Regenerate build
artifacts when their inputs change and retain the receipts that document
historical outcomes. The commands in sec. 6 reproduce per-stage artifacts, the
token map and hydrated sections, the 7 manuscript figures, and the
template’s PDF, HTML, slides, and validation reports.
scripts/check_manuscript_tokens.py checks that derived
quantities use tokens. The resulting 97-entry map is committed at
output/data/manuscript_variables.json. The same gate
cross-checks the citation keys in the prose against
docs/manuscript/references.bib. This manuscript quotes no
private or unpublished material.