Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed .claude/skills/migrate-to-submodule/SKILL.md,crates/openhuman-core/src/modules/

Steven Enamakel6e2794ee14b6
diff --git a/.claude/skills/migrate-to-submodule/SKILL.md b/.claude/skills/migrate-to-submodule/SKILL.md
index 7746aa3677..66d87dd92c 100644
--- a/.claude/skills/migrate-to-submodule/SKILL.md
+++ b/.claude/skills/migrate-to-submodule/SKILL.md
@@ -104,6 +104,18 @@ If the change spans nested submodules (`tinyagents/vendor/tinytools`,
`tinymemory/vendor/tinycortex`, ...), release/merge the innermost first and bump
gitlinks outward.
+### Iterate locally before releasing
+
+Between Steps 2 and 3, run the host against your unreleased module with
+`OPENHUMAN_MODULE_SOURCE=linked` (build `openhuman-cli` with
+`--features linked-modules`) or `OPENHUMAN_MODULE_SOURCE=source` (after
+`node scripts/modules/build.mjs <name> --print-env`). These modes are for local
+development and local tests only; CI and shipped builds use the pinned release.
+Before pushing, run `node scripts/modules/pin-status.mjs` to see whether the
+gitlink is ahead of the registry pin. Then release and re-pin with
+`scripts/modules/release-and-repin.mjs` (Steps 3-4). See the modules README
+(`crates/openhuman-core/src/modules/README.md`).
+
## Step 3: Release the submodule
Only for **loadable modules** (a `cdylib` with a registry record). Pure Cargo
diff --git a/crates/openhuman-core/src/modules/README.md b/crates/openhuman-core/src/modules/README.md
index 701c9de67e..9e474246de 100644
--- a/crates/openhuman-core/src/modules/README.md
+++ b/crates/openhuman-core/src/modules/README.md
@@ -134,6 +134,18 @@ where a module comes from; `[[modules.overrides]]` entries take exactly one of
per-module entry beats the global mode. `OPENHUMAN_MODULE_SOURCE` sets the
global mode and `OPENHUMAN_MODULE_SOURCE_<ID>` (id upper-cased) one module.
+| Source | What serves the module | Used by |
+| --- | --- | --- |
+| `release` (default) | The pinned, digest-checked GitHub release | CI, shipped builds, everyone by default |
+| `linked` | A factory registered by `crates/openhuman-modules-linked` (non-product `linked-modules` feature of `openhuman-cli`) | Local development and local tests only |
+| `source` | A library built from the vendored gitlink by `scripts/modules/build.mjs` | Local development and local tests only |
+
+Resolution order for one id: a per-module `path` override or
+`OPENHUMAN_MODULE_SOURCE_<ID>` first, then the global `[modules] source` /
+`OPENHUMAN_MODULE_SOURCE`, then `release`. **CI and shipped builds are
+`release` only**: `check-ci-module-source.mjs` enforces it, and the product
+feature list never contains `linked-modules`.
+
- `release`: the chain below, pinned and digest-checked. The only mode CI and
shipped builds use; `scripts/ci/check-ci-module-source.mjs` (CI Lite) fails
if a workflow or CI script sets any other.
@@ -168,6 +180,22 @@ global mode and `OPENHUMAN_MODULE_SOURCE_<ID>` (id upper-cased) one module.
never written to `records_*.rs`: registry pins come from published releases
only. Builds are cached by (submodule tree, rustc, target, profile, features).
+Local-dev recipe (never in CI):
+
+```bash
+# 1. Edit the module in vendor/<submodule> on its branch.
+# 2a. source: build it and point the core at the artifact.
+eval "$(node scripts/modules/build.mjs tinydocs --print-env)"
+OPENHUMAN_MODULE_SOURCE=source ./target/debug/openhuman-core serve
+# 2b. linked: link it into the CLI.
+OPENHUMAN_MODULE_SOURCE=linked cargo run -p openhuman-cli --features linked-modules -- serve
+# 3. Check the pin before pushing; a debug core warns once per id when the
+# gitlink is ahead of the registry pin.
+eval "$(node scripts/modules/pin-status.mjs --print-env)"
+# 4. Release and re-pin (asks before publishing).
+node scripts/modules/release-and-repin.mjs tinydocs --bump patch
+```
+
For local development and local tests only. When `linked` or `source` cannot be
honoured (no factory registered, no built artifact), the module is served from
`release`, one `warn` line names the id and both modes, and
diff --git a/docs/gitbooks/en/developing/building-rust-core.md b/docs/gitbooks/en/developing/building-rust-core.md
index fd78d9d8a0..38c2befda4 100644
--- a/docs/gitbooks/en/developing/building-rust-core.md
+++ b/docs/gitbooks/en/developing/building-rust-core.md
@@ -138,6 +138,33 @@ checks that `crates/openhuman-app/Cargo.toml` forwards exactly that set.
Turning a gate off drops real code and, for some gates, whole native dependencies. For measured binary sizes and RSS across a few feature recipes,
see [Performance](performance.md).
+## Local module development
+
+Loadable modules (`documents`, `voice`, `mcp`, and so on) come from pinned,
+digest-checked GitHub releases by default. That is the only source CI and
+shipped builds use. To iterate on a module in `vendor/<submodule>` without
+releasing it, switch the source locally:
+
+```bash
+# Build the module from its gitlink and print the environment for it
+eval "$(node scripts/modules/build.mjs tinydocs --print-env)"
+OPENHUMAN_MODULE_SOURCE=source ./target/debug/openhuman-core serve
+
+# Or link it into the CLI (non-product feature)
+OPENHUMAN_MODULE_SOURCE=linked cargo run -p openhuman-cli --features linked-modules -- serve
+
+# Before pushing: is the gitlink ahead of the registry pin?
+node scripts/modules/pin-status.mjs
+
+# Release the module and re-pin the registry (asks before publishing)
+node scripts/modules/release-and-repin.mjs tinydocs --bump patch
+```
+
+`OPENHUMAN_MODULE_SOURCE_<ID>` overrides one module. If a `linked` or `source`
+module is unavailable the core falls back to the release and logs a warning;
+`modules.list` shows which source each module is served from. Details:
+[Loadable modules](architecture/loadable-modules.md).
+
## 4. macOS prerequisites
Install:
diff --git a/gitbooks/developing/building-rust-core.md b/gitbooks/developing/building-rust-core.md
index fd78d9d8a0..38c2befda4 100644
--- a/gitbooks/developing/building-rust-core.md
+++ b/gitbooks/developing/building-rust-core.md
@@ -138,6 +138,33 @@ checks that `crates/openhuman-app/Cargo.toml` forwards exactly that set.
Turning a gate off drops real code and, for some gates, whole native dependencies. For measured binary sizes and RSS across a few feature recipes,
see [Performance](performance.md).
+## Local module development
+
+Loadable modules (`documents`, `voice`, `mcp`, and so on) come from pinned,
+digest-checked GitHub releases by default. That is the only source CI and
+shipped builds use. To iterate on a module in `vendor/<submodule>` without
+releasing it, switch the source locally:
+
+```bash
+# Build the module from its gitlink and print the environment for it
+eval "$(node scripts/modules/build.mjs tinydocs --print-env)"
+OPENHUMAN_MODULE_SOURCE=source ./target/debug/openhuman-core serve
+
+# Or link it into the CLI (non-product feature)
+OPENHUMAN_MODULE_SOURCE=linked cargo run -p openhuman-cli --features linked-modules -- serve
+
+# Before pushing: is the gitlink ahead of the registry pin?
+node scripts/modules/pin-status.mjs
+
+# Release the module and re-pin the registry (asks before publishing)
+node scripts/modules/release-and-repin.mjs tinydocs --bump patch
+```
+
+`OPENHUMAN_MODULE_SOURCE_<ID>` overrides one module. If a `linked` or `source`
+module is unavailable the core falls back to the release and logs a warning;
+`modules.list` shows which source each module is served from. Details:
+[Loadable modules](architecture/loadable-modules.md).
+
## 4. macOS prerequisites
Install: