Feature modules — the developer rung above blocks. A module contributes capabilities a community
can turn on: calls, notes, transcription, polls, the globe, the graph. Which modules a deployment
ships is the seed's modules list; which a space enables and which an agent installs layer on top
(Space.enabledModules, AgentSettings.installedModules).
Start with docs/guides/writing-a-module.md, then
shared/src/module.ts — the contract — and shared/src/kernels.ts — what a store may reach.
| Package | Role |
|---|---|
@we/module-shared |
The contract: ModuleDefinition (manifest, contributes, createStore), the kernels, the store markers, lintModule |
@we/module-testing |
Test a module without a host: fakeDeps, fakeRecords, fakeAgentData, fakePresence, buildStore |
@we/module-notes |
Private notes in the personal space, shared into a space as a post — writes compositions through the documents kernels |
@we/module-pocket |
Gather things from any space into a panel that is yours — the agent-scoped module |
@we/module-polls |
Ask the space a question — the module that uses every contribution: entities, a block, a view, parts, a function, a setting, a store |
@we/module-call |
WebRTC calls: the module built on kernels (presence, ephemeral, media, peerConnection) |
@we/module-transcribe |
Speech-to-text and extraction over the backend's ports, with two panels and a restrict setting |
@we/module-graph |
Placeable graph fragments and the plugin catalogue over packages/graph-system/; contributes GraphView |
@we/module-flux |
Reads a Flux subgroup's messages, which no shape declares — the module that needs one backend (backends: ['ad4m']) and says so |
| globe family | globe/module (@we/module-globe) · globe/protocol · globe/layers · globe/widget — the Cesium globe as module + layer plugin system |
A module definition is three things: a manifest (id, name, what it requires — backends,
frameworks, kernels, permissions), contributions (entities, parts, panels, slots, anchors,
launchers, settings, activities, blocks, views, functions, components, an embed) and an optional
createStore, the one piece that is code. The host fans the contributions out to registries it
already has and decides where everything renders; a panel's openness is the host's unless the module
claims it. A store is built with injected reactivity and only the kernels its manifest named, and
its members are private by default — deps.state / deps.action publish one, with a sentence,
under modules.<id>.<member>. A module never imports the shell; every package exports one
createModule(host) and the shell's registry is generated from the seed.
pnpm create-module <id> "<Name>"scaffolds one.- Tests:
pnpm --filter @we/module-<id> test; the contract's own lint islintModulefrom@we/module-testing. pnpm validate:schemascovers every.schema.tshere and knows each module's members, parts and entities from the generated context.- After changing what a module contributes:
pnpm --filter @we/ai-context generate-context, so the reference and the validator learn it.