Metadata-Version: 2.4
Name: lmdl
Version: 0.1.0
Summary: Language-Model Domain Language: planning domains as typed, pydantic-validated JSON with PDDL compilation and template-driven NL rendering
License-Expression: CC-BY-4.0
Project-URL: Repository, https://github.com/brennanmk/lmdl
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: furo; extra == "docs"
Dynamic: license-file

# LMDL — Language-Model Domain Language

A meta-language for the LLM/symbolic-planner interface. LMDL lets you define a planning domain as typed, pydantic-validated JSON that LLMs can generate reliably, with PDDL as a compilation target and template-driven natural-language rendering.


## Repository layout

```
lmdl/               the installable package. Source code for the package lives here. 


docs/               Sphinx docs

experiments/           the LLM study suite — not part of the installed package
  autoplanbench/       AutoPlanBench submodule: benchmark PDDL + APB's NL pipeline
  domains/             LMDL domain profiles (*.lmdl.json) for the IPC benchmark domains
  harness/             importable experiment library
  run_all.py           reproduces the full study in its standard config
  run_experiment.py    plan-generation experiment (lmdl / pddl / apb_nl pipelines)
  run_generation.py    action- and predicate-generation experiment
  run_apb_preprocessing.py   reproduce APB's NL encodings and measure their cost
  compare_sizes.py     representation size comparison (PDDL vs LMDL vs NL)
  summarize_results.py results table from a .jsonl results file
```


## Dev setup

### Nix
Requires [Nix](https://nixos.org/) with flakes enabled and [direnv](https://direnv.net/).

```bash
cd ~/lmdl
direnv allow          # activates the flake devshell (Python 3.12 + deps)
python3.12 -m venv .venv
pip install -e .
pytest
```

The devshell registers `.githooks/` as the git hooks path; the pre-commit hook formats staged Python files with black. CI (`.github/workflows/ci.yml`) runs `black --check` and the test suite on pushes and PRs. Without the devshell, enable the hook manually with `git config core.hooksPath .githooks`.

Without direnv, use `nix develop` directly:

```bash
nix develop --command bash -c "python3.12 -m venv .venv && source .venv/bin/activate && pip install -e . && pytest"
```

### Other
Make sure python3.12 is installed and install the projects deps using:

```bash
cd ~/lmdl
python3.12 -m venv .venv
pip install -e .
pytest
```
