Macula · Martha · docs from Martha v0.4.1
Martha
A crew of coding agents that builds software the way a good team does
Goal: one developer, or a whole team, runs a crew of coding agents that plans, builds, reviews and releases software, with one method and one tool.
Status: early 0.x. What follows is what Martha is and how it works; the design is still open in issue #1. How the existing crew conductor moves in, slice by slice, is in the port map, and which of its steps are built, in flight or planned is in where we are. What Martha talks to and what it is made of is drawn in the architecture.
What is Martha?
Martha gives each coding agent a job on a crew: one builds, another reviews, and a conductor hands work from one to the next. Every hand-off, verdict and release is written down, so you can always see who did what and why.
The crew works with one method: event storming to find the business, vertical slices (one directory per capability), and event sourcing. Names say what the code does.
Two modes, one tool
| Solo | Team | |
|---|---|---|
| Who | one developer on one machine | several people, several machines |
| Needs | nothing else: no mesh, no account | the Macula mesh |
| Who may approve a push or a release | you | the people the team names |
The mode is a table of who may do what, not a different program. Solo is a table with one person allowed to do everything; team is a table with roles. Start solo and move to team without changing tools.
What it is, and what it is not
It is
- fully open source;
- a core that no coding tool owns; its one host adapter is for Claude Code;
- usable alone, with the mesh only when a team wants it.
It is not
- a hosted service, or anything that needs an account;
- a replacement for your own review: every push and every release still waits for a person's yes.
What keeps a member from acting as you
A member runs as your own OS user. Martha refuses your own acts (martha
approve, release, bells, pin-key, keep-shapes, start) when they are
typed from inside a member, and refuses a member's file tools in Martha's own
state. These are speed bumps, not a wall: a member that sets out to could still
fake your yes, by making a terminal of its own outside its process tree or by
writing Martha's state files directly. Martha draws no OS wall between a member
and you; your review and your yes on every push and release are the line.
A member keeps its shell
A member is a trusted helper. By default it keeps its shell after it reads a file, a tool result or a background agent's answer; what checks it is your review plus your yes on every push and release.
If you want the strict rule instead — text Martha cannot trace stops every later
shell command in that session until the session is replaced — turn it on in the
crew's declaration, .martha/martha.json, with "house_rules": { "strict_gate": true }.
Reading stays allowed under it, and the launch gate, the refused writes to your
memory and the rule against a member widening its own reach stand either way.
Getting started walks
through it.
Install
Martha runs on Node, from the version its engines field sets, and starts one
coding tool, whose version the Claude Code adapter records. Its second host, the
engine built on Goose, is recorded the same way, at the commit its recorder read.
These three commands, run from a Martha checkout, print all of them:
node -p "require('./package.json').engines.node"
node -p "require('./src/claude_code_host/recorded_claude_code_host.json').host_version"
node -p "require('./src/know_the_goose_engines_facts/recorded_goose_engine.json').engine_version"
Those files are where the versions are set: upgrade Node to the one the first
names, and sign in to the coding tool the second names (claude --version is
what you have). The third is the engine's pin, read from the engine's own source
and re-taken only by its recorder, so no version is written on this page.
Install one of two ways: from the published package, when you want to run Martha, or from a checkout, when you are working on Martha itself.
From the published package
With Node alone:
npx -y --ignore-scripts --registry https://git.macula.io/api/packages/macula-pub/npm/ @macula-io/martha@<exact version>
Name the installer's exact version: npm never lets a published version be replaced, so that line is what you trust. What the installer checks before it writes anything is in the installer's README.
On Windows: inside WSL2 (Ubuntu)
Martha runs on Linux x86_64. On an x86_64 Windows PC, run it inside WSL2 with Ubuntu. Every step after the first is typed in the Ubuntu shell, not in PowerShell or cmd.
- In PowerShell, as administrator, install Ubuntu under WSL2. Restart if Windows asks, then open Ubuntu from the Start menu and create your Linux user:
powershell
wsl --install -d Ubuntu
- In the Ubuntu shell, install Node from nodejs.org's Linux x64 build, at the
version Martha's
enginesfield names (above). Ubuntu's ownnodejspackage is older than that.
sh
NODE_VERSION=<the version engines names>
curl -fsSLO "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz"
mkdir -p ~/.local/node
tar -xzf "node-v${NODE_VERSION}-linux-x64.tar.gz" -C ~/.local/node --strip-components=1
echo 'export PATH="$HOME/.local/node/bin:$HOME/.local/bin:$PATH"' >> ~/.bashrc
export PATH="$HOME/.local/node/bin:$HOME/.local/bin:$PATH"
- Still in the Ubuntu shell, install Martha with the same line as above, and check it:
sh
npx -y --ignore-scripts --registry https://git.macula.io/api/packages/macula-pub/npm/ @macula-io/martha@<exact version>
martha --version
- Install Claude Code inside Ubuntu as well, at the version the recording names
(above), and sign in there. Martha starts the
claudeit finds on Ubuntu'sPATH, never a Windows one.
sh
npm install -g @anthropic-ai/claude-code@<the recorded version>
claude --version
Keep your projects in Ubuntu's own file system (under ~), not on a Windows
drive under /mnt/c. Martha is only tested on a Linux file system.
From a checkout
git clone https://github.com/macula-io/martha.git
cd martha
mkdir -p ~/.local/bin
ln -s "$PWD/bin/martha" ~/.local/bin/martha
martha --version
martha --version prints the release's version. If your shell cannot find
martha, put ~/.local/bin on your PATH.
Upgrading an installed Martha
Once Martha is installed, upgrade it with its own command, never with the bootstrap line above:
martha install [<version>] [--downgrade] [--digest sha256:<hex>]
martha install runs the installer the release you are running pins, and no
other. Each release carries a pin — installer.json, three fields: the
installer's name, its version, and the npm integrity of the bytes npm serves for
it, a sha512. The release job reads it from the registry the installer is
published to, and refuses to build a release unless this tree's installer/ is
what its own installer-v tag published. So taking over the publishing account
cannot put a new installer in front of you: the release you run names those bytes
by hash.
What it does, in order: reads the pin from the running release (missing or
malformed is a refusal, before anything is fetched); fetches exactly that
version into a temporary directory with the npm that ships beside your node,
empty user and global config, the registry the release names given explicitly, its own cache and
--ignore-scripts; refuses bytes that do not match the pin and never retries
them; runs the installer with your arguments unchanged; and removes the
temporary directory whatever happens.
It needs no terminal: a member with a shell can already type the bootstrap line, so the pin is what bounds an install, not who typed it.
What a refusal means:
| What you see | What it means |
|---|---|
... carries no readable installer pin ... |
this release predates the pin; upgrade once with the bootstrap line above |
... the installer pin in this release carries no <field> ... |
the release's pin is damaged: do not run it, install a good release |
... pins <name>, and Martha's installer is <name>. |
the pin names a package this release does not accept: do not run it |
... npm does not serve <name>@<version>, which this release pins ... |
that installer version is gone from npm, or never published; nothing was installed |
... npm served bytes for <name>@<version> that are not the ones this release pins ... |
npm is serving other bytes than the release vouched for; nothing was installed |
... the npm of this node is not at <path> ... |
your Node came without npm; use the bootstrap line, or a Node that carries npm |
Changing installer/ needs an npm publish before the next Martha release.
The release pins the installer version this tree carries, and refuses to build
when installer/ is not what that version's installer-v tag published — a fix
merged there without a version bump and a publish stops the release, in words,
instead of quietly never reaching anyone.
Then follow getting started: a crew of two on your own project.
Why "Martha"?
Martha was Paul McCartney's Old English sheepdog, the one in "Martha My Dear". A sheepdog keeps a flock together and moving the same way without doing the grazing itself. That is the job.
Contributing
See CONTRIBUTING.md and our Code of Conduct. To report a vulnerability, see SECURITY.md.
License
Apache-2.0. See LICENSE.
Martha's docs, from release v0.4.1: Getting started: a crew of two on your own project · @macula-io/martha · Martha · The agent control loop · claw-code: what it is, where it comes from, what Martha can learn · The host contract and the ledger · How a release is made · Nothing private gets in · The port map, in summary · The publish gate · The crew's declaration