How to work with domains¶
The stack supports N scientific domains as interchangeable backends. The source of truth is config/domains/*.yaml. This guide covers the common tasks: list, validate, activate, and add domains.
Concept¶
A domain is a scientific area with its own SSOT (a section in config/params.yaml), a Python backend extending DomainBackend, a specific solver, data sources, and its own skill in .agent/skills/domains/{name}.md.
The active domain lives in config/params.yaml — single-domain (project.domain) or multi-domain (project.domains: [...], primary = first element).
Available domains¶
| Domain | Status | Solver |
|---|---|---|
| structural | operational | OpenSeesPy |
| biomedical | operational | scipy.signal, sklearn (Pan-Tompkins + HRV + Welch PSD) |
| construction | operational | numpy, scipy, sklearn (CPM + PERT + EVM) |
| economics | operational | statsmodels (ADF + OLS HC3 + VAR + Granger) |
| environmental | operational | scipy, statsmodels (Mann-Kendall + Sen + STL) |
| forestal | operational | numpy, pandas, scipy (Chave 2014 + IPCC 2006) |
| geotechnical | operational | numpy, scipy (Terzaghi + Bishop + Boulanger-Idriss) |
| materials | operational | sklearn, statsmodels |
| transportation | operational | scipy, statsmodels (Greenshields + HCM LOS) |
| water | planned | FEniCSx (Navier-Stokes, SWE) |
| air | planned | SU2 / FEniCSx (RANS SST) |
Task: list domains¶
python tools/list_domains.py # interactive menu
python tools/list_domains.py --json # for sub-agents
Task: validate viability¶
Checks: valid YAML with required fields, Python backend imports cleanly, c0_check passes (deps), and valid SSOT in params.yaml.
python tools/list_domains.py --check biomedical
# exit 0 → OPERATIONAL
# exit 1 → PLANNED/EXPERIMENTAL (blocks PROPOSE)
PLANNED/EXPERIMENTAL domains block PROPOSE
Only operational domains enter the pipeline. water and air have backend stubs but the solver is not installed.
Task: activate a domain¶
Task: multi-domain papers¶
A paper can combine domains (e.g. structural + geotechnical for SSI):
DomainRegistry.load_many([...]) instantiates both backends; validate_domain.py --domains structural geotechnical validates them in one run. For multi-domain Q1/Q2, gate 0.90 requires statistical evidence from both domains in cv_results.json.
Task: add a new domain¶
The automatic path is the Domain Scaffolder (boot step 4 launches it when a domain doesn't exist). Manual:
- Copy an existing domain:
cp config/domains/environmental.yaml config/domains/agronomy.yamlplus the.pybackend. - Edit the YAML (
name,params_namespace,data_sources,dependencies.python). - Rewrite
validate_ssot()andrun_compute()in the backend, register withDomainRegistry.register(...). - Create the skill
.agent/skills/domains/agronomy.md. - Validate:
python tools/validate_domain.py --domain agronomy. - Add params to
config/params.yaml.
C0–C5 gates per domain¶
Each COMPUTE phase reads commands from the domain YAML. Hardware-free domains (environmental, economics) automatically skip C3/C4 when those fields are null.
See also¶
- The production pipeline — how COMPUTE consumes domains.
- Sub-agents — the Domain Scaffolder.
Canonical source
Derives from docs/shared/DOMAINS.md, which keeps the full anatomy of each domain.