Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
b576c0d
agentize state, observables
thevolatilebit Sep 8, 2023
7b527ce
simulation under `ReactiveNetwork`
thevolatilebit Sep 8, 2023
212da9c
solve
thevolatilebit Sep 15, 2023
00e4f6a
fixes initialization, stepping function
thevolatilebit Sep 16, 2023
4e93e19
fix plotting, solution, log
thevolatilebit Sep 16, 2023
aec5820
reformat
thevolatilebit Sep 16, 2023
033f202
Fixes for compatibility with latest Catlab/ACSets (#15)
slwu89 Oct 10, 2023
8652f3d
Add structured agents and related examples
thevolatilebit Feb 22, 2024
2814b14
Format
thevolatilebit Feb 22, 2024
4791a81
Structured species
thevolatilebit Mar 12, 2024
c99d4ce
Add tutorial w/ CEED integration
thevolatilebit Apr 23, 2024
c32b126
Remove compats
thevolatilebit Aug 18, 2025
24387c9
Fix interface methods for agents
thevolatilebit Jun 20, 2024
37d43e8
Update compats
thevolatilebit Aug 18, 2025
2a0490f
docs: ref-agents src/ inventory + Phase-0 ADRs (engine, allocation)
thevolatilebit Jun 18, 2026
a7b37c8
docs: ADR 0003 (data store) + Phase-0 modeling contract draft
thevolatilebit Jun 18, 2026
c3475b3
docs: accept ADR 0003; add ADR 0004 (runtime mutation) + 0005 (JSON I…
thevolatilebit Jun 18, 2026
24823f2
docs+test: complete Phase-0 contract (§6-8) + semantic test suite
thevolatilebit Jun 19, 2026
28ca994
docs: add Phase-0 review & sign-off summary
thevolatilebit Jun 19, 2026
84455a7
docs: ADR 0006 (structured tokens + custom-function registry) + contr…
thevolatilebit Jun 20, 2026
45e4452
docs: resolve final Phase-0 scoping calls; sign off Phase 0
thevolatilebit Jun 20, 2026
28ce38b
docs: Phase-0.5 modeling-language extension — ADRs 0007-0009 + contra…
thevolatilebit Jun 21, 2026
71b08b3
docs: make phase-as-attribute canonical; add SetField/@advance field-…
thevolatilebit Jun 21, 2026
5c5d6d0
docs: BD acquisition-impact MVP + ADR 0010 (endogenous decision channel)
thevolatilebit Jun 21, 2026
c03bfa7
docs: ADR 0011 — action callbacks (SetTokens population write + gener…
thevolatilebit Jun 21, 2026
77a1cba
docs: ADR 0012 — AlgebraicAgents integration (RD as hierarchy node + …
thevolatilebit Jun 21, 2026
7b32bdc
Phase-1 Stage A: state-owned RNG (§4 D1–D9) + reinit! + corruption bu…
thevolatilebit Jun 22, 2026
4ca6c36
Phase-1 Stage B: endogenous decision channel — Rule + transition guar…
thevolatilebit Jun 23, 2026
635e617
Phase-1 Stage C: token filtration — @select/TokenPredicate + @advance…
thevolatilebit Jun 23, 2026
c346c0a
Stage C fixes: deterministic bind total-order + QuoteNode action values
thevolatilebit Jun 23, 2026
2ace898
BD acquisition-impact demo: end-to-end runnable example (MVP Mileston…
thevolatilebit Jun 23, 2026
bd5cd84
Phase-1 Stage D: declarative initial state + checkpoint (ADR 0007, §10)
thevolatilebit Jun 24, 2026
63df89b
Phase-1 Stage E (E1+E2): typed ExprNode IR + JSON model envelope + sc…
thevolatilebit Jun 24, 2026
a85d9d7
Phase-1 Stage E (E3+E4): rate-mode Sample/TimeRef/Choose + reactant→r…
thevolatilebit Jun 24, 2026
5aeed7f
Phase-1 Stage E (E5-E7): action/predicate/rule (de)serialization + mo…
thevolatilebit Jun 24, 2026
7d62d8e
Phase-1 Stage E (E8): BD pipeline as model.rdj.json — JSON ≡ DSL traj…
thevolatilebit Jun 24, 2026
49197f6
Phase-1 Stage E (E9): close the import-time RCE — remove eval/parse f…
thevolatilebit Jun 24, 2026
486df1c
BD demo README: document the model.rdj.json eval-free artifact (Stage E)
thevolatilebit Jun 24, 2026
90ca0d2
Phase-1 review fixes: ongoing-bind priority index + unguarded findfir…
thevolatilebit Jun 24, 2026
90cc49a
Phase-1 review fixes (cont.): @move graceful no-op + restore creation…
thevolatilebit Jun 24, 2026
cd9601f
Phase-1 review fixes (cont.): reject Field nodes in @select predicate…
thevolatilebit Jun 24, 2026
2a491af
Phase-1 review fix (final): SetTokens evaluates values in the selecte…
thevolatilebit Jun 24, 2026
a42ba27
BD demo: fix valuation/calibration, add CIs + presentation artifacts
thevolatilebit Jun 26, 2026
dc0ecb8
BD demo: framework-first static HTML presentation
thevolatilebit Jun 26, 2026
2deb55a
Replace basic tutorials with two comprehensive literate demos
thevolatilebit Jun 26, 2026
5e7399d
Fix Pkg.test(): add the deps the semantic suite uses to test/Project.…
thevolatilebit Jun 26, 2026
b2dab6a
ADR-0012 inbound: ExternalRef leaf + inputs[] ports + external_inputs…
thevolatilebit Jun 28, 2026
ac4320a
ADR-0012 outbound: AA read surface + _prestep! latch on ReactionNetwo…
thevolatilebit Jun 28, 2026
681787a
ADR-0012 tests: test/semantic/aa_integration.jl (41 assertions)
thevolatilebit Jun 28, 2026
4891a5f
ADR-0012 demo: demo/aa_integration/ (literate .jl + README)
thevolatilebit Jun 28, 2026
aa52e2c
Complete the JSON model EXPORT path (to_json_model is the inverse of …
thevolatilebit Jun 28, 2026
26cb45c
Per-program ledger: attribute cost/reward per structured token (findi…
thevolatilebit Jun 28, 2026
ca86797
Implement ADR-0002 priority-weighted progressive-filling allocator
thevolatilebit Jun 28, 2026
5f20e2c
Merge branch 'worktree-agent-afee8c37788553f7e' into phase2-integration
thevolatilebit Jun 28, 2026
19ba91f
Merge branch 'worktree-agent-a8b9c78abf5813146' into phase2-integration
thevolatilebit Jun 29, 2026
87c1d1c
Merge branch 'worktree-agent-affd404742b68183c' into phase2-integration
thevolatilebit Jun 29, 2026
799351c
Integration: close inputs[] export round-trip symmetry (ADR 0012 ⟷ JS…
thevolatilebit Jun 29, 2026
874802e
docs: Phase-0.6 — ADR 0013/0014 + CONTRACT §14/§15 (analysis & visual…
thevolatilebit Jun 29, 2026
f52f95e
Phase-0.6: implement analysis & visualization (ADR 0013/0014, §14/§15)
thevolatilebit Jun 30, 2026
ce7dcf5
docs: mark Phase-0.6 (ADR 0013/0014, §14/§15) IMPLEMENTED
thevolatilebit Jun 30, 2026
acc0cae
demo(bd): collapse hand-rolled ensemble/Δ onto the engine APIs (ADR 0…
thevolatilebit Jun 30, 2026
6848b63
docs: add HANDOFF_PLAN.md — agentic handoff for remaining ref-agents …
thevolatilebit Jul 8, 2026
5bf0749
housekeeping (WS-4): delete dangling exports, add exports-resolve gua…
thevolatilebit Jul 9, 2026
13e54de
demo(introspection): add the introspection & exec-map tour (WS-5)
thevolatilebit Jul 9, 2026
02b5217
Merge WS-5: introspection & exec-map literate demo (demo/introspectio…
thevolatilebit Jul 9, 2026
1a853a9
Merge WS-4: housekeeping — drop dangling exports, exports_resolve tes…
thevolatilebit Jul 9, 2026
f07a013
WS-3: close the 3 pinned engine bugs (ceil dt-invariance, :E/:obs mer…
thevolatilebit Jul 9, 2026
7211348
WS-1 Phase 1 (ADR 0003): replace ACSets store with a dependency-free …
thevolatilebit Jul 9, 2026
3b98a55
WS-1 Phase 1 fix: guard rem_parts! swap against undefined non-bits cells
thevolatilebit Jul 9, 2026
120bb09
WS-1 Phase 2 (ADR 0003): promote the transition↔reactant relation to …
thevolatilebit Jul 9, 2026
3546282
WS-2 (ADR 0009 / CONTRACT §11): hierarchical refinement & open-port c…
thevolatilebit Jul 9, 2026
95e5780
docs: refresh INVENTORY schema section for the WS-1 typed-struct stor…
thevolatilebit Jul 9, 2026
aba3442
deps: move AlgebraicAgents to 0.4 (registry release), drop the GitHub…
thevolatilebit Jul 10, 2026
6bc3fb5
demo: refinement_tour — literate tour of ADR 0009 / §11 refinement & …
thevolatilebit Jul 10, 2026
01ee720
demo/wires_viz_tour: a VISUAL tour of AlgebraicAgents wires / open-po…
thevolatilebit Jul 10, 2026
2b7ac0a
demo/wires_viz_tour: consolidate on the Literate form (drop Pluto)
thevolatilebit Jul 10, 2026
17fcc35
deps: drop unused Pluto / PlutoUI / IJulia from the engine's dependen…
thevolatilebit Jul 10, 2026
c97d112
demo/test: illustrate @structured RHS genesis (a token born as a tran…
thevolatilebit Jul 13, 2026
227a167
feat: serializable named @structured(:Kind, field=…) genesis (ADR 000…
thevolatilebit Jul 14, 2026
baa3c55
serialize: localize the raw-@structured export error + add unserializ…
thevolatilebit Jul 14, 2026
54c6195
remove the raw @structured(Ctor(…)) form — genesis is named-only, ser…
thevolatilebit Jul 14, 2026
a281331
docs: resync design charter with named-only @structured genesis
thevolatilebit Jul 14, 2026
762b6dc
feat(WS-B2): @agentize thin constructor sugar (ADR 0001/0012)
thevolatilebit Jul 15, 2026
6f9f86e
feat: ensemble mode (b) — reinit-reseed member reuse (WS-B1, ADR 0013…
thevolatilebit Jul 15, 2026
772d224
fix(WS-B2): esc @agentize kwarg values (macro hygiene)
thevolatilebit Jul 15, 2026
9656681
ADR 0015: post-ACSets naming rename + drop GeneratedExpressions
thevolatilebit Jul 15, 2026
99be502
Merge WS-B1: ensemble mode (b) reinit-reseed
thevolatilebit Jul 15, 2026
49a14e4
Merge WS-B2: @agentize thin constructor sugar
thevolatilebit Jul 15, 2026
2e96976
test: anchor serialization_ir demo paths to pkgdir, not homedir()
thevolatilebit Jul 15, 2026
1d2c5a3
docs: land the acset-adapter removal + Handoff II (ensemble mode b, @…
thevolatilebit Jul 15, 2026
ba528d3
docs: truth-up ADR statuses to reflect what shipped
thevolatilebit Jul 15, 2026
e676b53
docs: consolidate handoff plans + reorg into a single STATUS index
thevolatilebit Jul 15, 2026
62a3eb4
docs: author repo-root CLAUDE.md; retire REVIEW.md to historical
thevolatilebit Jul 15, 2026
997b4a6
docs: correct CLAUDE.md CI claim — no CI is configured
thevolatilebit Jul 15, 2026
1c4b439
docs: reclassify ADR 0003 Phase 3 acset interop from deferred → REJECTED
thevolatilebit Jul 15, 2026
ad237b3
feat: construction-time modality validator (CONTRACT §1.4)
thevolatilebit Jul 15, 2026
9103c62
Merge: construction-time modality validator (CONTRACT §1.4)
thevolatilebit Jul 15, 2026
6692acd
docs: status truth-up — modality validator landed, suite fully green
thevolatilebit Jul 15, 2026
ba876bd
docs: add draft PR description for the native-engine rework
thevolatilebit Jul 16, 2026
01946cc
refactor: unify the integrator time-step naming on dt (dt/tstep pass)
thevolatilebit Jul 16, 2026
df65474
style: reformat all Julia sources with Runic
thevolatilebit Jul 16, 2026
98f5545
build: migrate formatter to Runic
thevolatilebit Jul 16, 2026
4305a71
build: raise Julia floor to 1.12
thevolatilebit Jul 16, 2026
e1ac769
docs: refine PR draft + add illustrative code snippets
thevolatilebit Jul 16, 2026
0aba3cc
docs: consolidate supporting docs — split spec/ from the Documenter site
thevolatilebit Jul 17, 2026
ebe9282
chore: normalize LICENSE to canonical MIT text
thevolatilebit Jul 17, 2026
bfe6747
docs: refresh INVENTORY.md against current source
thevolatilebit Jul 17, 2026
3eb5d62
docs: charter the docs/tutorials rework + introductory-tutorial exemplar
thevolatilebit Jul 17, 2026
739c9c9
docs(charter): anchor Workstream D on an arXiv-first academic paper
thevolatilebit Jul 17, 2026
c0a54ec
docs: calibrate tutorial voice/hierarchy + add inline plots
thevolatilebit Jul 17, 2026
7fa5909
docs(reference): Workstream C — capability-organized API reference + …
thevolatilebit Jul 18, 2026
b565688
docs(src): backfill legacy-file docstrings, retire acs-vocabulary nam…
thevolatilebit Jul 18, 2026
ba7f2f0
docs: remove stale, unreferenced src/macros_overview/macros.mmd
thevolatilebit Jul 18, 2026
b278ffa
docs(tutorials): Workstreams A2–A5 + B1–B3 — tiered tutorials, deep-d…
thevolatilebit Jul 18, 2026
d1125d0
docs(charter): mark Workstreams A2–A5, B1–B3, C1/C2 delivered; full s…
thevolatilebit Jul 18, 2026
100fa89
docs(nav): give the three tutorial tiers subject-bearing labels
thevolatilebit Jul 18, 2026
14d255d
docs(brand): house design system — firing-glyph logo, ink-black nav t…
thevolatilebit Jul 18, 2026
da9304e
docs(brand): switch accent azure→teal, soften nav to off-white
thevolatilebit Jul 18, 2026
fe8bd74
docs(brand): fix light-nav white sub-items and dark-mode unreadable code
thevolatilebit Jul 19, 2026
b287ff9
docs(brand): offer only the two branded themes (drop catppuccin)
thevolatilebit Jul 19, 2026
53a5b69
docs(readme): rewrite to the standard package outline, align with new…
thevolatilebit Jul 19, 2026
b76d219
docs(readme): drop License section, add Contributing
thevolatilebit Jul 19, 2026
c89e543
docs: add standalone CONTRIBUTING.md, link it + LICENSE from readme
thevolatilebit Jul 19, 2026
bfa84d3
docs: move INVENTORY.md into spec/, fix references
thevolatilebit Jul 20, 2026
ebda73d
ci: add GitHub Actions (tests matrix, docs, Runic, TagBot, CompatHelper)
thevolatilebit Jul 20, 2026
f1a8d3b
docs(claude): defer the spec catalog to STATUS.md (de-dup)
thevolatilebit Jul 20, 2026
709dc46
docs(theme): teal accent, near-white sidebar, uniform brand lockup
thevolatilebit Jul 20, 2026
055a26d
docs(theme): enlarge sidebar wordmark to 1.4rem
thevolatilebit Jul 20, 2026
1b258fb
docs(charter): re-scope Workstream D — drop D1/D2, split into two pee…
thevolatilebit Jul 20, 2026
9632421
docs(pr-draft): consolidate to spec/, fix stale paths, document the d…
thevolatilebit Jul 20, 2026
4447622
demo(bd): drop presentation/brief artifacts, keep the runnable core
thevolatilebit Jul 21, 2026
5cc2d44
ci: re-trigger PR checks now that workflows live on main
thevolatilebit Jul 22, 2026
e411a28
Merge main into rework: resolve readme.md, keep the rework rewrite
thevolatilebit Jul 22, 2026
95d2ade
docs: enable push_preview so PR builds deploy a gh-pages preview
thevolatilebit Jul 23, 2026
22735fc
ci: re-trigger docs deploy after DOCUMENTER_KEY rotation
thevolatilebit Jul 23, 2026
dd28e0a
docs(release): bump to 0.3.0, point docs badge at PR #17 preview
thevolatilebit Jul 23, 2026
aed0827
docs(theme): drop the favicon's white background
thevolatilebit Jul 23, 2026
cfaffaf
fix(ci): repair downgrade-compat floors and clear docs build warnings
thevolatilebit Jul 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .JuliaFormatter.toml

This file was deleted.

7 changes: 7 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Revisions listed here are skipped by `git blame` (bulk mechanical changes that
# would otherwise obscure real authorship). Enable locally with:
# git config blame.ignoreRevsFile .git-blame-ignore-revs
# (GitHub honors this file automatically.)

# style: reformat all Julia sources with Runic (2026-07-16)
4262b3342af377f3e879dda238d8cfa51f7660ab
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Keep the GitHub Actions themselves current (CompatHelper handles Julia package deps; this
# handles the `uses:` action versions in .github/workflows/).
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- dependencies
- github-actions
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
docs/build_*
docs/build/
docs/site/
docs/preview/
docs/src/tutorials/
docs/src/case_studies/
docs/src/deep_dives/
tmp.gif
gks.*
Manifest.toml
.vscode/
LocalPreferences.toml
.DS_Store
_*
_*
*.db
*.db.wal
dev/
.claude/
57 changes: 57 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# CLAUDE.md — ReactiveDynamics.jl agent guide

Agent-facing orientation for the `ref-agents` branch. Re-verify any `file:line` before acting — line numbers drift; grep to confirm.

## What this project is

ReactiveDynamics.jl (RD) is a timed, stochastic, resource-constrained Petri net / discrete-event engine for system-dynamics-style modeling of business / R&D processes (budgeting, ledgers, what-if, rNPV) — NOT a chemical reaction network, despite the Catalyst-derived DSL surface. A **transition** is a stateful recipe that spawns in-flight instances at a Poisson rate, occupies shared finite resources (**species**) over a cycle time, and completes with a terminal probability-of-success that emits RHS products. Resources carry a **modality** governing allocation (`:nonblock`/`:conserved`/`:rate`), and a cost/reward/valuation **ledger** accumulates into a per-step log. Structured/agentic **tokens** are first-class entities (a "project" is an agent with attributes, custom behavior, and history) that can be instantiated, selected by predicate, advanced through lifecycle phases, and audited per-program. RD is part of the DyVE family and sits ON TOP of [AlgebraicAgents.jl](https://github.com/Merck/AlgebraicAgents.jl) (AA): a `ReactionNetworkProblem` IS an AA `@aagent`, so a network is a node in a larger heterogeneous AA hierarchy.

## Where the durable spec lives

The durable engineering artifacts live under top-level **`spec/`**, kept separate from **`docs/`** — which is reserved for the Documenter.jl static-pages site (`docs/make.jl`, `docs/src/`, generated `docs/build/`). Do not put spec material in `docs/`.

**[`spec/STATUS.md`](spec/STATUS.md) is the single entry point — start there.** It carries the authoritative catalog of every durable artifact (CONTRACT_DRAFT, adr/, PR_DRAFT, DOCS_CHARTER, INVENTORY, the retired/archived docs) so this guide need not duplicate it. The three you touch most:

- **`spec/STATUS.md`** — "what is the state, what is left." The dashboard: feature→commit table, test tally, deferred items with gates.
- **`spec/CONTRACT_DRAFT.md`** — the normative operational-semantics spec (§1–§15). The durable spine: *what the engine must do*.
- **`spec/INVENTORY.md`** — the current-source map (module map, public-API audit, static store, stepping trace, AA touchpoints): *where it lives in the source*.
- **`spec/adr/`** — Architecture Decision Records (append-only), status table in `spec/adr/README.md`. To change a decision, add a new ADR; do not rewrite history.

## Current architecture (post-ADR-0015)

The static authoring/IR store is a dependency-free typed struct-of-columns (ACSets and Catlab were dropped, ADR 0003). ADR 0015 retired the last ACSets-lineage vocabulary, so the CURRENT names are:

- Store type **`ReactionNetwork`** (was `ReactionNetworkSchema`); the type-level object model is `const SCHEMA`.
- Authoring macro **`@reaction_network`** (was `@ReactionNetworkSchema`).
- Conventional variable **`net`** (was `acs`); the `ReactionNetworkProblem` field **`.network`** (was `.acs`); store fields **`.counts`**/**`.columns`** (were `.parts`/`.subparts`).
- Store verbs renamed to store vocabulary AND UNEXPORTED (internal, `RD.`-qualified): `nrows`, `row_ids`, `col_row_ids`, `column`/`cell`, `set_cell!`, `add_row!`/`add_rows!`, `rem_rows!`, `find_rows` (a `findall`, NOT an FK follow), `merge_networks!`, `build_network_from_dict`.
- Old names survive ONE release as `@deprecate`/`@deprecate_binding` shims (`src/ReactiveDynamics.jl:427-435`; the deprecated `@ReactionNetworkSchema` macro alias at `src/interface/create.jl:83`). GeneratedExpressions was dropped.

Module layout (`src/`, include order orchestrated in `src/ReactiveDynamics.jl`): `state.jl` (live sim state, the `@aagent` structs), `exprnode.jl` (the closed eval-free `ExprNode` IR), `compilers.jl` (expr→closure), `interface/*` (the DSL: `create.jl`/`update.jl` macros, `agents.jl` structured tokens, `aa_coupling.jl` the AA read/coupling surface, `checkpoint.jl` dump/restore, `solve.jl` `@agentize`), `operators/*` (`joins.jl`/`equalize.jl`/`refine.jl`), `solvers.jl` (THE step loop + constructor + `_step!`/`_reinit!`/`_projected_to`), `predicates.jl` (`TokenPredicate`/`@select`), `actions.jl` (the closed action family + `Rule`), `ledger.jl` (per-program ledger), `serialize.jl` (single-JSON eval-free (de)serialization), `analysis.jl`/`export.jl`/`visualize.jl` (Phase-0.6 result-inspection layer). Extensions: `ext/RDPlotsExt.jl` (Plots recipes + `_draw`, weakdep), `ext/RDArrowExt.jl` (Arrow export, weakdep).

Everything specified in the contract (§1–§15) and ADRs 0001–0015 is IMPLEMENTED and green. See `spec/STATUS.md` for the feature→commit table. There is no open non-deferred work: the suite is fully green with zero skips, and the only remaining items are deliberate deferrals (`dump_state`'s clean-tick-boundary constraint; entity-level refinement ADR 0009 §F; threaded ensemble backend; AA Opera implicit coupling) — plus the rejected/will-not-do ACSets interop view (ADR 0003 Phase 3).

## Build / test / dev

```bash
julia --project=. -e 'using Pkg; Pkg.instantiate()' # install deps
julia --project=. -e 'using Pkg; Pkg.test()' # run the semantic suite
julia --project=. -e 'using ReactiveDynamics' # load the package
```

Tests live in `test/semantic/*.jl` (entry `test/runtests.jl` → `test/semantic/runtests.jl`) under a two-tier scheme: **T1-characterization** (runs against the engine) and **T2-acceptance** (target behavior). The suite is FULLY green — 801 pass / 0 broken, no `@test_skip` placeholders and no `@test_broken` pins (the last skips, the §1.4 modality validators, landed in `53d1fac`). A few tests carry weakdep environment guards (Plots/Arrow/Graphviz) that skip only when the package is absent; in the full test env they run. `test/Project.toml` declares the test-only deps (Plots, Arrow, DataFrames, Distributions, …) that the main project keeps as weakdeps. AlgebraicAgents is the registered 0.4 release (no `[sources]` pin). Julia ≥ 1.12.

Formatting is [Runic](https://github.com/fredrikekre/Runic.jl) (opinionated, non-configurable — no config file). Run `julia -m Runic --inplace src test ext dev docs/make.jl demo` before committing, or `julia -m Runic --check .` to verify. No CI is configured in this repo (no `.github/workflows/`) — run the suite and formatter locally. The bulk reformat commit is listed in `.git-blame-ignore-revs`; `git config blame.ignoreRevsFile .git-blame-ignore-revs` makes `git blame` skip it.

## Dev-loop gotchas

- **Determinism is contractual.** All stochasticity draws from a state-owned `rng`; a run is determined by `(model, seed)` (CONTRACT §4). Thread the seed; never reach for the global RNG. `_reinit!` restores the exact stream (and takes a `seed` kwarg for ensemble mode (b) reseed).
- **Append-only store.** Compiled attribute closures hard-code each species/param position; runtime mutation is append-only + soft-deactivate (ADR 0004). Never reorder or delete rows on a live/stepping model; reindexing macros (`equalize!`, refinement) are authoring-time only.
- **Eval-free everywhere.** The serializer and IR never `Meta.parse`/`eval` a model field — the closed `ExprNode`/action whitelist + `validate` is the trust boundary (ADR 0005/0006). Custom host functions go through the per-network registry, not `@eval`. Do not add runtime `eval`.
- **Adding a new `src/` file** requires clearing the compiled cache; the `dev/` Revise test server (`dev/run.sh`) otherwise avoids recompilation across edits.
- **`NodeRef`, not `Ref`**, in the IR; JSON alloc-strategy fields are Symbols. Structured-token iteration uses a `(species, creation_index)` total order for determinism.
- **Worktrees** go under `~/worktrees/<repo-short>/<branch>` (never repo-siblings or nested inside the tree).

## Working rules

Source of truth for decisions is `spec/adr/`; the normative spec is `spec/CONTRACT_DRAFT.md`. When docs contradict code, the CODE is truth. Commit at the end of a coherent logical batch (not per-file). Do not hard-wrap prose in Markdown — one continuous line per paragraph/list-item.
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Thanks for taking the time to contribute — we appreciate it very much!

We welcome contributions to the core engine of ReactiveDynamics.jl — refining and extending the modeling metalanguage, the resource allocator, and the analysis/observability layer for improved user experience and modeling expressivity — as well as to the documentation and the worked decision case studies.

Please start with the design records under [`spec/`](spec), which document the engine's behavior and the reasoning behind it:

- [`spec/STATUS.md`](spec/STATUS.md) — the single "what is the state, what is left" index. Start here.
- [`spec/CONTRACT_DRAFT.md`](spec/CONTRACT_DRAFT.md) — the normative operational-semantics specification (§1–§15).
- [`spec/adr/`](spec/adr) — the Architecture Decision Records: *why* the engine is the way it is.
- [`spec/INVENTORY.md`](spec/INVENTORY.md) — the current-source map (module map, public-API audit, stepping trace, AlgebraicAgents touchpoints).

Two conventions matter. Decisions are changed by **adding a new ADR**, not by rewriting an existing one — the record is append-only. And when documentation and code disagree, **the code is the source of truth**; fix the docs to match, or open an issue if the code looks wrong.

Before submitting a pull request, please run the semantic test suite and the formatter locally (there is no CI in this repo):

```bash
julia --project=. -e 'using Pkg; Pkg.test()' # the semantic suite
julia -m Runic --check . # formatting (Runic — opinionated, no config)
```

[Runic](https://github.com/fredrikekre/Runic.jl) is non-configurable; `julia -m Runic --inplace src test ext dev docs/make.jl demo` applies the formatting in place.

Contributions to ReactiveDynamics.jl are welcome in the following forms:

- Modifying the code or documentation via a pull request.
- Reporting bugs or suggesting enhancements in the project's [GitHub Issues](https://github.com/Merck/ReactiveDynamics.jl/issues). If you propose a feature for future development, we are happy to discuss and take on the implementation.
14 changes: 6 additions & 8 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
The MIT License
MIT License

Copyright © 2022 Merck & Co., Inc., Rahway, NJ, USA and its affiliates. All rights reserved.

Jan Bima (MSD), Otto Ritter (MSD), Sean L. Wu (Merck)
Copyright (c) 2023 Merck & Co., Inc., Rahway, NJ, USA and its affiliates

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -11,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
36 changes: 3 additions & 33 deletions LICENSES_THIRD_PARTY
Original file line number Diff line number Diff line change
@@ -1,40 +1,10 @@
ReactiveDynamics.jl depends on third-party Julia packages which may be distributed under different licenses. We have listed all of these third party packages and their licenses below. For the most up-to-date information, see `Project.toml`.
ReactiveDynamics.jl depends on third-party Julia packages, which may be distributed under various licenses. For the most recent list of these packages, refer to `Project.toml` and consult the license terms of the individual packages.

You must agree to the terms of these licenses, in addition to the ReactiveDynamics source code license, in order to use this software.
You must agree to the terms of these licenses, in addition to the ReactiveDynamics.jl source code license, in order to use this software.

--------------------------------------------------
Third party software listed by License type
--------------------------------------------------

MIT License (or adaptations) (https://www.opensource.org/licenses/MIT)
* The Julia Language - https://github.com/JuliaLang/julia/blob/master/LICENSE.md
* BenchmarkTools.jl - https://github.com/JuliaCI/BenchmarkTools.jl
* CSV - https://github.com/JuliaData/CSV.jl
* Catlab - https://github.com/AlgebraicJulia/Catlab.jl
* ComponentArrays.jl - https://github.com/jonniedie/ComponentArrays.jl
* Crayons - https://github.com/KristofferC/Crayons.jl
* DataFrames.jl - https://github.com/JuliaData/DataFrames.jl
* DiffEqBase.jl - https://github.com/SciML/DiffEqBase.jl
* DifferentialEquations.jl - https://github.com/SciML/DifferentialEquations.jl
* Distributions.jl - https://github.com/JuliaStats/Distributions.jl
* Documenter - https://github.com/JuliaDocs/Documenter.jl
* DocumenterMarkdown - https://github.com/JuliaDocs/DocumenterMarkdown.jl
* GeneratedExpressions.jl - https://github.com/Merck/GeneratedExpressions.jl
* IJulia - https://github.com/JuliaLang/IJulia.jl
* JLD2 - https://github.com/JuliaIO/JLD2.jl
* JSON.jl - https://github.com/JuliaIO/JSON.jl
* MacroTools.jl - https://github.com/FluxML/MacroTools.jl
* NLopt - https://github.com/JuliaOpt/NLopt.jl
* OrdinaryDiffEq - https://github.com/SciML/OrdinaryDiffEq.jl
* Plots - https://github.com/JuliaPlots/Plots.jl
* Pluto.jl - https://github.com/fonsp/Pluto.jl
* Reexport - https://github.com/simonster/Reexport.jl
* SafeTestsets - https://github.com/YingboMa/SafeTestsets.jl
* Statistics.jl - https://github.com/JuliaStats/Statistics.jl
* StatsFuns.jl - https://github.com/JuliaStats/StatsFuns.jl
* Symbolics.jl - https://github.com/JuliaSymbolics/Symbolics.jl
* TOML.jl - https://github.com/JuliaLang/TOML.jl
* Tables.jl - https://github.com/JuliaData/Tables.jl

The Unlicense (https://opensource.org/licenses/unlicense)
* PlutoUI.jl - https://github.com/JuliaPluto/PlutoUI.jl
* The Julia Language - https://github.com/JuliaLang/julia/blob/master/LICENSE.md
Loading
Loading