Skip to content

Commit f23870e

Browse files
Merge pull request #81 from BlockScience/dev
docs + fix: improve llms.txt and fix canonical formula
2 parents 1c41253 + c42b971 commit f23870e

35 files changed

Lines changed: 2595 additions & 64 deletions

CLAUDE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1616
| gds-stockflow | `stockflow` | `packages/gds-stockflow/` |
1717
| gds-control | `gds_control` | `packages/gds-control/` |
1818
| gds-software | `gds_software` | `packages/gds-software/` |
19+
| gds-sim | `gds_sim` | `packages/gds-sim/` |
1920
| gds-examples || `packages/gds-examples/` |
2021

2122
## Commands
@@ -32,12 +33,13 @@ uv run --package gds-stockflow pytest packages/gds-stockflow/tests -v
3233
uv run --package gds-control pytest packages/gds-control/tests -v
3334
uv run --package gds-software pytest packages/gds-software/tests -v
3435
uv run --package gds-examples pytest packages/gds-examples -v
36+
uv run --package gds-sim pytest packages/gds-sim/tests -v
3537

3638
# Run a single test
3739
uv run --package gds-framework pytest packages/gds-framework/tests/test_blocks.py::TestStackComposition::test_rshift_operator -v
3840

3941
# Run all tests across all packages
40-
uv run --package gds-framework pytest packages/gds-framework/tests packages/gds-viz/tests packages/gds-games/tests packages/gds-stockflow/tests packages/gds-control/tests packages/gds-software/tests packages/gds-examples -v
42+
uv run --package gds-framework pytest packages/gds-framework/tests packages/gds-viz/tests packages/gds-games/tests packages/gds-stockflow/tests packages/gds-control/tests packages/gds-software/tests packages/gds-examples packages/gds-sim/tests -v
4143

4244
# Lint & format
4345
uv run ruff check packages/
@@ -68,6 +70,8 @@ gds-control ← control systems DSL (depends on gds-framework)
6870
gds-software ← software architecture DSL (depends on gds-framework)
6971
7072
gds-examples ← tutorials (depends on gds-framework + gds-viz)
73+
74+
gds-sim ← simulation engine (standalone — no gds-framework dep, only pydantic)
7175
```
7276

7377
### gds-framework: Two-Layer Design

docs/guides/getting-started.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,15 @@ You have built a complete GDS specification for a thermostat system, progressing
422422

423423
From here, explore the [example models](../examples/index.md) or the [Rosetta Stone](rosetta-stone.md) guide to see the same system through different DSL lenses.
424424

425-
## Running Interactively
425+
## Interactive Notebook
426426

427-
The guide includes a [marimo notebook](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/getting_started/notebook.py) for interactive exploration:
427+
/// marimo-embed-file
428+
filepath: packages/gds-examples/guides/getting_started/notebook.py
429+
height: 800px
430+
mode: read
431+
///
432+
433+
To run the notebook locally:
428434

429435
```bash
430436
uv run marimo run packages/gds-examples/guides/getting_started/notebook.py

docs/guides/interoperability.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,31 +232,47 @@ This validates GDS as an **interoperability substrate**, not just a modeling fra
232232

233233
## Running the Examples
234234

235-
### Nash equilibrium analysis
235+
### Nash Equilibrium Analysis
236+
237+
/// marimo-embed-file
238+
filepath: packages/gds-examples/guides/nash_equilibrium/notebook.py
239+
height: 800px
240+
mode: read
241+
///
242+
243+
To run locally:
236244

237245
```bash
238-
# Install dependencies
239246
uv sync --all-packages --extra nash
247+
cd packages/gds-examples && \
248+
uv run marimo run guides/nash_equilibrium/notebook.py
249+
```
240250

251+
```bash
241252
# Run tests (22 tests)
242253
uv run --package gds-examples pytest \
243254
packages/gds-examples/games/prisoners_dilemma_nash/ -v
255+
```
256+
257+
### Evolution of Trust Simulation
258+
259+
/// marimo-embed-file
260+
filepath: packages/gds-examples/guides/evolution_of_trust/notebook.py
261+
height: 800px
262+
mode: read
263+
///
244264

245-
# Interactive notebook
265+
To run locally:
266+
267+
```bash
246268
cd packages/gds-examples && \
247-
uv run marimo run guides/nash_equilibrium/notebook.py
269+
uv run marimo run guides/evolution_of_trust/notebook.py
248270
```
249271

250-
### Evolution of Trust simulation
251-
252272
```bash
253273
# Run tests (71 tests)
254274
uv run --package gds-examples pytest \
255275
packages/gds-examples/games/evolution_of_trust/ -v
256-
257-
# Interactive notebook (with plotly charts)
258-
cd packages/gds-examples && \
259-
uv run marimo run guides/evolution_of_trust/notebook.py
260276
```
261277

262278
### Source files

docs/guides/rosetta-stone.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,15 @@ from guides.rosetta.comparison import canonical_spectrum_table
313313
print(canonical_spectrum_table())
314314
```
315315

316-
## Running Interactively
316+
## Interactive Notebook
317317

318-
The guide includes a [marimo notebook](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/rosetta/notebook.py) for interactive exploration with live Mermaid rendering and dropdown selectors:
318+
/// marimo-embed-file
319+
filepath: packages/gds-examples/guides/rosetta/notebook.py
320+
height: 800px
321+
mode: read
322+
///
323+
324+
To run the notebook locally:
319325

320326
```bash
321327
uv run marimo run packages/gds-examples/guides/rosetta/notebook.py

docs/guides/verification.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,15 @@ for finding in report.findings:
372372
print(f"{finding.check_id}: {finding.message}")
373373
```
374374

375-
## Running Interactively
375+
## Interactive Notebook
376376

377-
The guide includes a [marimo notebook](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/verification/notebook.py) with interactive dropdowns for selecting broken models and watching checks in real time:
377+
/// marimo-embed-file
378+
filepath: packages/gds-examples/guides/verification/notebook.py
379+
height: 800px
380+
mode: read
381+
///
382+
383+
To run the notebook locally:
378384

379385
```bash
380386
uv run marimo run packages/gds-examples/guides/verification/notebook.py

docs/guides/visualization.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,15 @@ mermaid_str = system_to_mermaid(system, theme="dark")
203203
# Paste into GitHub markdown, mermaid.live, or mo.mermaid()
204204
```
205205

206-
## Running Interactively
206+
## Interactive Notebook
207207

208-
The guide includes a [marimo notebook](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/visualization/notebook.py) with interactive dropdowns for selecting views, themes, and models:
208+
/// marimo-embed-file
209+
filepath: packages/gds-examples/guides/visualization/notebook.py
210+
height: 800px
211+
mode: read
212+
///
213+
214+
To run the notebook locally:
209215

210216
```bash
211217
uv run marimo run packages/gds-examples/guides/visualization/notebook.py

mkdocs.yml

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ theme:
2727

2828
plugins:
2929
- search
30+
- marimo
3031
- mkdocstrings:
3132
handlers:
3233
python:
@@ -44,55 +45,69 @@ plugins:
4445
compile to the same GDS IR, validating it as a universal transition calculus.
4546
full_output: llms-full.txt
4647
sections:
47-
Framework:
48-
- index.md
49-
- framework/index.md
50-
- framework/quick-reference.md
51-
- framework/getting-started/install.md
52-
- framework/getting-started/quickstart.md
48+
Framework (gds-framework):
49+
- {index.md: "Monorepo landing page — package overview, install, architecture"}
50+
- {framework/index.md: "Core engine — blocks, composition algebra, compiler, verification"}
51+
- {framework/quick-reference.md: "Cheat sheet for types, blocks, composition, and verification"}
52+
- {framework/getting-started/install.md: "Installation for users and developers"}
53+
- {framework/getting-started/quickstart.md: "Build a thermostat spec in 5 minutes"}
5354
- framework/guide/*.md
54-
- framework/design/*.md
5555
- framework/api/*.md
56-
Visualization:
57-
- viz/index.md
58-
- viz/getting-started.md
56+
Visualization (gds-viz):
57+
- {viz/index.md: "Mermaid diagram renderers for GDS specifications"}
58+
- {viz/getting-started.md: "First diagram in 3 lines of code"}
5959
- viz/guide/*.md
6060
- viz/api/*.md
61-
Games:
62-
- games/index.md
63-
- games/getting-started.md
61+
Games (gds-games / ogs):
62+
- {games/index.md: "Typed DSL for compositional game theory (Open Games)"}
63+
- {games/getting-started.md: "Model a Prisoner's Dilemma game"}
6464
- games/guide/*.md
6565
- games/design/*.md
6666
- games/api/*.md
67-
Business:
68-
- business/index.md
69-
- business/getting-started.md
67+
Business (gds-business):
68+
- {business/index.md: "Business dynamics DSL — CLD, supply chain, value stream map"}
69+
- {business/getting-started.md: "Model a causal loop diagram"}
7070
- business/guide/*.md
7171
- business/api/*.md
72-
Stock-Flow:
73-
- stockflow/index.md
74-
- stockflow/getting-started.md
72+
Stock-Flow (gds-stockflow):
73+
- {stockflow/index.md: "Declarative stock-flow DSL over GDS semantics"}
74+
- {stockflow/getting-started.md: "Model an SIR epidemic as stocks and flows"}
7575
- stockflow/guide/*.md
7676
- stockflow/api/*.md
77-
Control:
78-
- control/index.md
79-
- control/getting-started.md
77+
Control (gds-control):
78+
- {control/index.md: "State-space control systems DSL over GDS semantics"}
79+
- {control/getting-started.md: "Model a PID thermostat controller"}
8080
- control/guide/*.md
8181
- control/api/*.md
82-
Software:
83-
- software/index.md
84-
- software/getting-started.md
82+
Software (gds-software):
83+
- {software/index.md: "Software architecture DSL — DFD, state machine, C4, ERD, component, dependency"}
84+
- {software/getting-started.md: "Model a data flow diagram"}
8585
- software/guide/*.md
8686
- software/api/*.md
8787
Examples:
88-
- examples/*.md
88+
- {examples/index.md: "Six tutorial models demonstrating every framework feature"}
89+
- {examples/learning-path.md: "Recommended order for working through examples"}
90+
- examples/building-models.md
91+
- examples/feature-matrix.md
8992
- examples/examples/*.md
9093
Tutorials:
9194
- tutorials/*.md
9295
Guides:
93-
- guides/*.md
96+
- {guides/getting-started.md: "Build a thermostat model in 5 progressive stages"}
97+
- {guides/choosing-a-dsl.md: "Decision guide for picking the right DSL"}
98+
- {guides/best-practices.md: "Patterns and anti-patterns for GDS modeling"}
99+
- {guides/rosetta-stone.md: "Same problem modeled with stockflow, control, and games"}
100+
- {guides/verification.md: "All 3 verification layers with deliberately broken models"}
101+
- {guides/visualization.md: "6 view types, 5 themes, cross-DSL rendering"}
102+
- guides/real-world-patterns.md
103+
- guides/troubleshooting.md
104+
- guides/interoperability.md
105+
- guides/architecture-milestone-layer0.md
106+
- guides/dsl-roadmap.md
107+
- guides/research-boundaries.md
108+
- guides/view-stratification.md
94109
Ecosystem:
95-
- framework/ecosystem.md
110+
- {framework/ecosystem.md: "All packages, their imports, and dependency relationships"}
96111

97112
markdown_extensions:
98113
- admonition
@@ -131,11 +146,6 @@ nav:
131146
- Pipeline: framework/guide/pipeline.md
132147
- Verification: framework/guide/verification.md
133148
- Glossary: framework/guide/glossary.md
134-
- Design:
135-
- GDS Deep Dive: framework/design/gds-deepdive.md
136-
- v0.2 Design: framework/design/v0.2-design.md
137-
- Proposals:
138-
- Entity Redesign: framework/design/proposals/entity-redesign.md
139149
- API Reference:
140150
- Overview: framework/api/index.md
141151
- gds: framework/api/init.md

packages/gds-examples/games/prisoners_dilemma_nash/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)