Skip to content

Specify the framework Gaussian agent in GNN with a pinned conformance gate - #3

Merged
docxology merged 1 commit into
mainfrom
codex/gnn-adoption-20261101
Nov 1, 2026
Merged

docxology merged 1 commit into
mainfrom
codex/gnn-adoption-20261101

Conversation

@docxology

Copy link
Copy Markdown
Collaborator

What changed

  • gnn/gaussian_agent.gnn.md — Generalized Notation Notation (GNN) specification of the continuous linear-Gaussian agent implemented in active_infer_ants/agent.py: identity dynamics F and readout H, process noise Q = I / prior_precision, sensory noise R = I / sensory_precision, the preferred-state prior, and the precision-weighted posterior update that infer() performs. ModelParameters records num_dims, prior_precision, sensory_precision and learning_rate.
  • gnn/upstream.json — the pinned GNN revision: v5.0.3, 8f293d9ba810e6eda5c09842d9c7ed9ffa5f92c1.
  • gnn_conformance.py — extracts the specification from that pinned commit via git archive (never from the GNN checkout's working tree) and checks the extracted model against the package agent: dimensions, identity F/H, Q/R/prior, and that infer() equals the declared Gaussian posterior with the action set to the posterior mean. Continuous models need GNN's runtime dependencies, so the harness resolves a GNN-capable interpreter (GNN_PYTHON, then the checkout's .venv) and reports a clear unavailable state when there is none.
  • scripts/validate_gnn_spec.py — CLI gate: exit 0 pass, 1 conformance failure, 2 GNN unavailable.
  • tests/test_gnn_conformance.py — the structural half (pin record, all required sections, declared dimensions against the agent) always runs; the pinned-parser half skips when the GNN checkout is absent.
  • README.md, SPEC.md, AGENTS.md — document the specification, the gate, and the related repositories (Generalized_Notation_Notation, ants, Active_Skillference).

Verification on this branch

Command Result
Compile sweep over tracked sources (python -m py_compile, the CI step) clean
python -m pytest -q 41 passed
python -m pytest tests/test_gnn_conformance.py -q 10 passed
ruff check gnn_conformance.py scripts/validate_gnn_spec.py tests/test_gnn_conformance.py pass
python scripts/validate_gnn_spec.py exit 0 — model_kind continuous, 3/3 dimensions, 4/4 checks

The gate reports the extracted specification as continuous with num_states = num_observations = 3 and checks: dimensions match the package agent; F and H are identity; Q, R, prior_mean and prior_cov match the agent's Gaussian model; infer() performs the declared posterior update. Syntax was also checked with CPython 3.10 and 3.11 to match the CI matrix.

… gate

Add gnn/gaussian_agent.gnn.md: the Generalized Notation Notation
specification of the continuous linear-Gaussian agent in
active_infer_ants/agent.py (identity dynamics and readout, Q/R carrying the
prior and sensory precision parameters, the preferred-state prior, and the
infer() posterior update), with ModelParameters recording num_dims,
prior_precision, sensory_precision and learning_rate.

gnn/upstream.json records the workstream pin (v5.0.3,
8f293d9ba810e6eda5c09842d9c7ed9ffa5f92c1). gnn_conformance.py extracts the
specification from that pinned commit (git archive, never the checkout's
working tree) with a GNN-capable interpreter and checks F/H, Q/R, the prior
and the posterior update against the agent; scripts/validate_gnn_spec.py is
the CLI gate and tests/test_gnn_conformance.py runs the structural half
always, the pinned-parser half when the checkout is available.

Signpost the specification, the gate and the related repositories in
README.md, SPEC.md and AGENTS.md.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@docxology
docxology merged commit 1465b46 into main Nov 1, 2026
3 checks passed
@docxology
docxology deleted the codex/gnn-adoption-20261101 branch November 1, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant