Skip to content

Commit b6bf6b9

Browse files
authored
Merge pull request #23 from KadenMc/refactor/debrand-limina
refactor: de-brand "limina" — read as plain aexp
2 parents 4998fc4 + c873fb1 commit b6bf6b9

105 files changed

Lines changed: 636 additions & 726 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.5.0] - 2026-05-21
11+
1012
### Changed
1113

1214
- **The Jupyter MCP integration is now a single MCP server.** `aexp
@@ -32,6 +34,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3234
cleanup. The cluster-side `[jupyter]` extra and `aexp jupyter setup`
3335
extension recipe are unchanged.
3436

37+
- **De-branded and de-vendored the "limina" research harness.** `limina`
38+
(the upstream project the harness was adapted from) is no longer
39+
surfaced as a named centerpiece, and the `vendor/` directory framing
40+
is gone — the harness reads as plain `aexp`. **Breaking** public-API
41+
renames (old names removed):
42+
- `install_limina()``install_scaffold()`
43+
- `is_limina_installed()``is_scaffold_installed()`
44+
- `compute_vendor_sha()``compute_scaffold_sha()`
45+
- `LiminaArtifactRef``ArtifactRef`
46+
- module `aexp.limina_io``aexp.kb_io`
47+
48+
Persisted keys are renamed with a **read-side fallback**, so existing
49+
signac projects and install markers keep resolving with no migration:
50+
- run-link key `job.doc["limina"]``job.doc["aexp"]`
51+
- install-marker field `limina_vendor_sha``scaffold_sha`
52+
- W&B run-config block `config["limina"]``config["aexp"]` (past
53+
W&B runs keep `config.limina`; new runs get `config.aexp`)
54+
- validator error codes `limina.validation_failed` /
55+
`limina.validator_unavailable``aexp.*`
56+
57+
The bundled harness moved from `src/aexp/vendor/limina/` to
58+
`src/aexp/scaffold/` — the `vendor/` directory and the vendoring
59+
ceremony files (`VENDORED_FROM.txt`, `VERSION`) are gone. Its
60+
contents, the slash commands, `AGENTS.md` / `CLAUDE.md`, and the docs
61+
are de-branded. The stale top-level "limina" skill was removed —
62+
`aexp install` already scaffolds a project. The upstream credit lives
63+
in the README.
64+
3565
### Fixed
3666

3767
- **`aexp install --with-jupyter` now pins the `.mcp.json` `jupyter`

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
- **Hypothesis-first, not metric-first** — you can't start a run without a live hypothesis; you can't ship a finding without cited runs
4747
- **Git is the source of truth** — every run carries its commit SHA; the knowledge base lives in git; nothing load-bearing is ephemeral
48-
- **Integrate, don't reinvent**[signac](https://signac.readthedocs.io) for run state, [W&B](https://wandb.ai/) for observability, [Limina](https://github.com/KadenMc/limina) for the research-graph primitives (the H→E→F artifact model, templates, and methodology skills this project builds on). `aexp` is the glue and the discipline
48+
- **Integrate, don't reinvent**[signac](https://signac.readthedocs.io) for run state, [W&B](https://wandb.ai/) for observability, and a bundled research harness for the H→E→F artifact model, templates, and methodology skills. `aexp` is the glue and the discipline
4949
- **Portable by default** — the MCP server runs via `uvx` from PyPI; `.mcp.json` is identical on every machine and committable to git
5050

5151
---
@@ -66,7 +66,7 @@ The missing layer is not another tracker. It's a **grammar** — a structure the
6666

6767
| Layer | What lives here |
6868
|---|---|
69-
| **Research grammar** | `kb/` artifact graph — Hypothesis → Experiment → Finding plus Literature / Challenge Review / Strategic Review. Claude Code hooks enforce the H→E→F chain at write time. Four research-methodology skills (`experiment-rigor`, `exploratory-sota-research`, `research-devil-advocate`, `build-maintainable-software`) install into `.claude/skills/` |
69+
| **Research grammar** | `kb/` artifact graph — Hypothesis → Experiment → Finding plus Literature / Challenge Review / Strategic Review. Claude Code hooks enforce the H→E→F chain at write time. Research-methodology skills (`experiment-rigor`, `exploratory-sota-research`, `research-devil-advocate`, `build-maintainable-software`) install into `.claude/skills/` |
7070
| **Local run state** ([signac](https://signac.readthedocs.io)) | `.runs/.signac/` plus one `.runs/workspace/<job_id>/` directory per run. `job.sp` carries identity params; `job.doc` carries the artifact link, tracker IDs, status, and summary metrics |
7171
| **Observability** (**W&B**, optional `[wandb]` extra) | Remote runs grouped by a deterministic slug derived from `(hypothesis_id, experiment_id, condition)`. Offline-by-default on HPC — `aexp sync-offline` walks the run store and syncs every pending run in one call from a login node |
7272

@@ -104,7 +104,7 @@ The design bet: agents already know how to run experiments. What they need is a
104104
|---|---|
105105
| **H→E→F artifact graph** | Every run descends from an Experiment, which descends from a Hypothesis. Findings cite runs with strong references (either specific job IDs or batch selectors). |
106106
| **Hook-enforced discipline** | SessionStart, PreToolUse, PostToolUse, and Stop hooks inject active context, block chain violations, and validate KB integrity at turn end. Hooks ship inside the installed package and upgrade via `pip install -U`. |
107-
| **Research methodology skills** | Four SKILL.md files install into `.claude/skills/` — experiment rigor, exploratory SOTA research, devil's advocate review, and build-maintainable-software. Trigger with `$experiment-rigor` etc. |
107+
| **Research methodology skills** | SKILL.md files install into `.claude/skills/` — experiment rigor, exploratory SOTA research, devil's advocate review, and build-maintainable-software. Trigger with `$experiment-rigor` etc. |
108108

109109
### Run state + observability
110110

@@ -120,9 +120,9 @@ The design bet: agents already know how to run experiments. What they need is a
120120

121121
| | |
122122
|---|---|
123-
| **MCP server** | FastMCP with 22 tools covering artifact creation (H/E/F/T), run lifecycle, batch queries, queue management (incl. `queue_stop` for live-job interruption), tracker binding, and validation. Runs via `uvx --from agentic-experiments[mcp] aexp-mcp-server` — no absolute paths, no per-machine config, `.mcp.json` committable to git. |
124-
| **Slash commands** | Artifact creation: `/aexp-new-hypothesis`, `/aexp-new-experiment`, `/aexp-new-run`. Threads (forward-looking research concerns broader than a hypothesis): `/aexp-new-thread`, `/aexp-list-threads`, `/aexp-show-thread`, `/aexp-close-thread`. Finding creation (pick by what the finding cites): `/aexp-finding-from-run`, `/aexp-finding-from-batch`, `/aexp-finding-placeholder`. Read / inspect: `/aexp-show-run`, `/aexp-show-batch`, `/aexp-list-runs`, `/aexp-status`, `/aexp-validate`. Queue: `/aexp-queue-add`, `/aexp-queue-list`, `/aexp-queue-materialize`, `/aexp-queue-stop`. Notebook lifecycle (when `--with-jupyter` is configured): `/aexp-jupyter-iterate` (test loop), `/aexp-promote-nb` (promote working cells into a tracked-run script). Sandbox scaffolding: `/aexp-new-sandbox` (create an exploratory notebook subdir under `notebooks/_sandbox/`). 22 total. |
125-
| **CLI** | 22 verbs covering install, artifact creation (H/E/F/T + thread lifecycle), run lifecycle, batch queries, tracker binding, validation, offline sync, optional `jupyter-setup`, the `queue` subcommand group (add/list/remove/stop/clear/materialize/run) + `run-queued`, and sandbox scaffolding (`new-sandbox`). See `aexp --help` for the full list. Python API is a one-line `from aexp import ...`. |
123+
| **MCP server** | FastMCP covering artifact creation (H/E/F/T), run lifecycle, batch queries, queue management (incl. `queue_stop` for live-job interruption), tracker binding, and validation. Runs via `uvx --from agentic-experiments[mcp] aexp-mcp-server` — no absolute paths, no per-machine config, `.mcp.json` committable to git. |
124+
| **Slash commands** | Artifact creation: `/aexp-new-hypothesis`, `/aexp-new-experiment`, `/aexp-new-run`. Threads (forward-looking research concerns broader than a hypothesis): `/aexp-new-thread`, `/aexp-list-threads`, `/aexp-show-thread`, `/aexp-close-thread`. Finding creation (pick by what the finding cites): `/aexp-finding-from-run`, `/aexp-finding-from-batch`, `/aexp-finding-placeholder`. Read / inspect: `/aexp-show-run`, `/aexp-show-batch`, `/aexp-list-runs`, `/aexp-status`, `/aexp-validate`. Queue: `/aexp-queue-add`, `/aexp-queue-list`, `/aexp-queue-materialize`, `/aexp-queue-stop`. Notebook lifecycle (when `--with-jupyter` is configured): `/aexp-jupyter-iterate` (test loop), `/aexp-promote-nb` (promote working cells into a tracked-run script). Sandbox scaffolding: `/aexp-new-sandbox` (create an exploratory notebook subdir under `notebooks/_sandbox/`). |
125+
| **CLI** | Verbs covering install, artifact creation (H/E/F/T + thread lifecycle), run lifecycle, batch queries, tracker binding, validation, offline sync, optional `jupyter-setup`, the `queue` subcommand group (add/list/remove/stop/clear/materialize/run) + `run-queued`, and sandbox scaffolding (`new-sandbox`). See `aexp --help` for the full list. Python API is a one-line `from aexp import ...`. |
126126
| **Typed JSON contracts** | Pydantic models (`RunLink`, `BatchSelector`, `Issue`, …) back the schema; MCP tools and CLI return the same shapes. |
127127
| **Jupyter MCP integration** (optional, `[jupyter]` extra) | `aexp install --with-jupyter` adds the `jupyter` MCP server to `.mcp.json` so Claude can read/edit/execute cells in a remote JupyterLab through an existing SSH tunnel — no agent SSH required. The target Jupyter is set per-session at runtime via `connect_to_jupyter`, so one entry retargets to any node. `aexp jupyter-setup` applies the verified Jupyter Server extension state on the cluster (disable Datalayer experiments that conflict with the mainstream stack). After install, see `docs/setup/jupyter-mcp.md` for cluster-side recipe + investigation log. The `/aexp-jupyter-iterate` slash command guides the read → propose → execute loop. |
128128

@@ -146,8 +146,8 @@ graph TB
146146
end
147147
148148
subgraph "aexp (Python package)"
149-
MCP[MCP Server<br/>FastMCP, 22 tools]
150-
CLI[CLI — typer<br/>21 verbs]
149+
MCP[MCP Server<br/>FastMCP]
150+
CLI[CLI — typer]
151151
API[Python API<br/>aexp.*]
152152
end
153153
@@ -198,7 +198,7 @@ aexp install
198198
aexp --help
199199
```
200200

201-
> **Heads up — `aexp install` will modify your repo.** It creates `.mcp.json`, **merges into** any existing `.claude/settings.json` (hooks + permissions are additive; yours are preserved), adds `.claude/skills/` with four research-methodology skills, copies a `kb/` scaffold plus `templates/` into the repo root, initializes `.runs/` as a signac project, and records the interpreter path in `.aexp/installed.json`. It prints the plan and asks for confirmation before writing — pass `--yes` to skip the prompt or `--dry-run` to preview only. **No Python code you didn't write lands in your repo**: hook scripts and validator logic live inside the installed `aexp` package and upgrade via `pip install -U`.
201+
> **Heads up — `aexp install` will modify your repo.** It creates `.mcp.json`, **merges into** any existing `.claude/settings.json` (hooks + permissions are additive; yours are preserved), adds `.claude/skills/` with the research-methodology skills, copies a `kb/` scaffold plus `templates/` into the repo root, initializes `.runs/` as a signac project, and records the interpreter path in `.aexp/installed.json`. It prints the plan and asks for confirmation before writing — pass `--yes` to skip the prompt or `--dry-run` to preview only. **No Python code you didn't write lands in your repo**: hook scripts and validator logic live inside the installed `aexp` package and upgrade via `pip install -U`.
202202
203203
See [docs/quickstart.md](docs/quickstart.md) for a full worked example — hypothesis → experiment → runs → finding.
204204

@@ -260,7 +260,7 @@ src/aexp/
260260
install.py # apply the harness into a consumer repo
261261
runs.py # signac wrappers: create_run, open_run, find_runs, run_lifecycle
262262
linking.py # batch queries + retroactive run-to-experiment linking
263-
limina_io.py # typed read wrappers for H/E/F/L/CR/SR artifacts
263+
kb_io.py # typed read wrappers for H/E/F/L/CR/SR artifacts
264264
validate.py # composes KB structural + run-link + citation integrity
265265
kb_validate.py # KB structural validator (frontmatter, aliases, chain)
266266
schema.py # pydantic + dataclass types
@@ -271,7 +271,7 @@ src/aexp/
271271
slash_commands/ # /aexp-* templates
272272
trackers/ # TrackerAdapter ABC + noop + wandb adapters
273273
utils/ # paths, git, atomic writes
274-
vendor/ # forked research-graph templates, skills, and kb/ scaffold
274+
scaffold/ # research-graph scaffold: kb/, templates, skills, agent contracts
275275
tests/ # pytest suite; CI on Ubuntu + Windows × Py 3.11/3.12/3.13
276276
docs/ # concepts, quickstart, cli, mcp, mapping, tracker-adapters, queue, threads, sandbox, airgapped
277277
```
@@ -280,11 +280,8 @@ docs/ # concepts, quickstart, cli, mcp, mapping, tracker-adapt
280280

281281
## Status
282282

283-
**Pre-release (v0.2.x).** Actively developed by one person and the agents they direct; used in the author's own ML research workflow. The API surface is not yet stable — see [CHANGELOG.md](CHANGELOG.md) for what has shipped.
284-
285283
- **Developed and primarily tested on Windows 11 / Python 3.12.** Supports Python 3.11+. CI runs the full suite on Ubuntu + Windows × Py 3.11/3.12/3.13. macOS hasn't been exercised — issues welcome.
286284
- **MCP server is the only PyPI-gated surface** — the CLI and Python API run from a local checkout without any PyPI round-trip.
287-
- **v0.3 backlog:** `aexp index` dashboard, MLflow / Aim / DVC tracker adapters, OpenTelemetry extra. (Artifact-creation CLI verbs, the three-mode wandb surface, the queue + runner-materialization layer, threads as a new artifact kind, and template/validator strictness all shipped in 0.2.0 — see CHANGELOG for the full breakdown.)
288285

289286
If you run ML experiments with Claude Code and find yourself wanting a harness that holds your agent to scientific discipline, this is built for you. Feedback, bug reports, and PRs all welcome.
290287

@@ -329,6 +326,12 @@ Every edit to `src/aexp/*.py` is now live in:
329326
330327
---
331328

329+
## Acknowledgements
330+
331+
The research harness — the H→E→F artifact model, the `kb/` layout,
332+
artifact templates, and methodology skills — was adapted from
333+
[limina](https://github.com/KadenMc/limina).
334+
332335
## License
333336

334337
[MIT](LICENSE)

docs/cli.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ marker matches the current sha, the command short-circuits with an
124124

125125
### `aexp new-run`
126126

127-
Create (or re-open) a signac job linked to a Limina experiment. Always
128-
writes `job.doc["limina"]` and `job.doc["status"] = "created"`. `--sp` takes
127+
Create (or re-open) a signac job linked to an experiment. Always
128+
writes `job.doc["aexp"]` and `job.doc["status"] = "created"`. `--sp` takes
129129
`KEY=VAL,KEY=VAL` — all values stay as strings; use the Python API when you
130130
need typed values (bools, ints, lists).
131131

@@ -137,7 +137,7 @@ if bound.
137137

138138
### `aexp show-run`
139139

140-
Print the full state point + doc + linked Limina frame for one run.
140+
Print the full state point + doc + linked research frame for one run.
141141

142142
### `aexp new-sandbox`
143143

@@ -179,14 +179,14 @@ Change the grouping via the Python API: `list_batches(selector_keys=("condition"
179179

180180
### `aexp link`
181181

182-
Retroactively stamp `doc["limina"]` onto an existing job. Used when a job
182+
Retroactively stamp `doc["aexp"]` onto an existing job. Used when a job
183183
was created outside `create_run` (e.g. from a notebook directly calling
184184
signac) and you want to link it to an experiment after the fact.
185185

186186
### `aexp bind-tracker`
187187

188188
Start a tracker run and wire it to the job: group = `hypothesis/experiment/condition`,
189-
tags auto-derived, config includes the full Limina chain + `job.sp` + a
189+
tags auto-derived, config includes the full run-link chain + `job.sp` + a
190190
curated frame (hypothesis statement, local hypothesis, success criteria).
191191
`job.doc["tracker"]` stores the handle.
192192

0 commit comments

Comments
 (0)