Skip to content

Notebooks

Executable Jupyter notebook walkthroughs of every major COGANT workflow. Every numbered notebook ships as both an .ipynb (executable source) and an .md (rendered export for the MkDocs site); the .md links below are what renders on the site, and every corresponding .ipynb is checked in alongside. Use these when you want to step interactively through a workflow with all intermediate state visible.

Contents

Page Description Level
01 Forward Pipeline Code -> GNN forward pipeline walkthrough. Background: program graph, role assignment Beginner
02 Explore GNN Inspecting and visualizing a generated GNN. Background: GNN, Active Inference Beginner
03 Reverse Synthesis GNN -> Code reverse synthesis. Background: roundtrip, reverse API Intermediate
04 Roundtrip Full forward + reverse roundtrip verification. Background: roundtrip, Markov blanket Intermediate
05 Custom Rules Writing and registering custom translation rules. Background: translation rules reference, rules overview, custom rules guide Intermediate
06 Plugin Authoring Authoring a parser/exporter plugin. Background: plugin API, rules overview Advanced
07 Real-World Flask End-to-end run against a real Flask application Intermediate
08 Constraint Authoring Authoring CONSTRAINT-class translation rules Advanced
09 Plugin Authoring (Extended) Deeper plugin authoring patterns and edge cases Advanced
10 Rule DSL Working with the rule DSL directly Advanced
11 Inference Learning Learning from human review feedback to refine the rule set Advanced
12 Cross Language Cross-language roundtrip and analysis Advanced
  1. 01 Forward Pipeline — see the full pipeline run live.
  2. 02 Explore GNN — learn to read the artifacts you just produced.
  3. 03 Reverse Synthesis and 04 Roundtrip — close the loop.
  4. 05 Custom Rules — your first customization.
  5. 07 Real-World Flask — exercise everything on a non-trivial codebase.
  6. 06 Plugin Authoring, 09 Plugin Authoring (Extended), 10 Rule DSL — extension and authoring patterns.
  7. 08 Constraint Authoring, 11 Inference Learning, 12 Cross Language — advanced topics.

Running the notebooks

# COGANT is not on PyPI yet, and pyproject.toml defines no `notebooks` extra;
# install from a checkout and add Jupyter:
uv sync --extra all
uv pip install jupyterlab
jupyter lab docs/notebooks/

.ipynb / .md pairing

Every notebook is checked in as both an .ipynb (executable source) and a matching .md (rendered export for the MkDocs site). The .md is a derived artifact — do not hand-edit it. To regenerate after changing a notebook:

uv run jupyter nbconvert --to markdown docs/notebooks/NN_slug.ipynb

Commit both files together so the MkDocs site and the executable source stay in sync.

Agent notes: AGENTS.md - Hub: ../index.md