git clone https://garage44.eu/jeroen/midas.gitcartopolis-agent · 2026-11-21T20:19:37Z
docs(readme): shorter: what it is, and how to use it
README.md | 159 ++++++++++++--------------------------------------------------
1 file changed, 29 insertions(+), 130 deletions(-)
diff --git a/README.md b/README.md
index b243c36..a99e264 100644
--- a/README.md
+++ b/README.md
@@ -1,131 +1,46 @@
# midas
-**A workspace where AI agents do the coding and a person steers them, often
-from a phone.**
+A workspace where AI agents do the coding and a person steers them, often
+from a phone. One page shows every session: start one with a message, follow
+what it does, answer when it asks, say whether its branch lands. Under the
+page, midas lends the agents **build nodes**: contained checkouts on your own
+machines, kept warm, one session at a time over plain `ssh`.
-The **hub** is one page for all of it: start a session with a message, follow
-what every session is doing, answer when one asks, say whether its branch
-lands, and see the machines it builds on. Under the page, midas lends the
-agents **build nodes**: contained checkouts on the workspace's own machines,
-kept warm, held by one session at a time over plain `ssh`.
-
-Everything is one Rust binary, `midas`: the hub, each node's daemon, and the
-CLI the agents use. The page is a small TypeScript app, built with Bun and
-embedded in the binary.
-
-> midas is in daily use in one workspace and still changes shape. It assumes
-> Claude Code as the agent, a Linux machine for the hub, and WireGuard between
-> the machines.
-
-## What it looks like
-
-**Home**: what needs you, and what is at work. Every session is a row with its
-project, what it is doing now, and three steps: working, landing, on main.
+One Rust binary, `midas`, is the hub, each node and the agents' CLI. It
+assumes Claude Code as the agent, a Linux machine for the hub, and WireGuard
+between the machines.

-**On the phone**: follow a session as a chat, answer its question with a tap,
-and find it again later. *Shall it land?* is one of those questions: a yes puts
-the branch on main and, if asked, deploys it.
-

-**Workspace** and **Activity**: the machines and their nodes, who holds what,
-deploys on their way, and where the time goes.
-

-The workspace in these pictures is made up (`docs/screens/fixtures.ts`, served
-by `serve.ts` there); the page itself is the real one.
-
-## What it does
-
-- **Sessions.** A session is a Claude Code conversation with a folder of its
- own; it adds the projects it needs as git worktrees on a branch of its own.
- The hub runs them, keeps their transcripts, and shows them as a feed.
-- **Steering.** A session's questions, permission requests and *Shall it land?*
- reach the page (and the phone, as a push notification). Answers go back the
- same way. A session that has to wait for you says so, with the steps.
-- **Build nodes.** A contained checkout with a warm build directory, on any
- machine in the workspace: a rootless container on Linux, a VM on a Mac.
- Agents take one, build over `ssh`, and give it back; a fair queue hands out
- the next free one.
-- **Landing and deploying.** A finished branch is checked on a node, fast-
- forwarded onto main, and deployed by a target the project defines.
- Projects deploy the same way, midas itself included.
-- **Working beside each other.** Sessions see who changes which files, leave
- each other notes, and put a decision to the person when it is theirs to take.
-- **Accounts and devices.** Password plus one-time code for people; keys for
- the machines; a pairing code for a phone app. Secrets a session asks for go
- to the hub, never into the conversation.
-
-## How it fits together
-
-A typical workspace, all of it over WireGuard:
-
-```mermaid
-flowchart LR
- you["you<br/>phone, browser"]
- subgraph server["server"]
- hub["midas hub<br/>state, page, git mirror"]
- agents["agent container<br/>Claude Code sessions"]
- vps["node build-1"]
- end
- subgraph linux["Linux machine"]
- deck["node gpu-1<br/>rootless container"]
- end
- subgraph mac["Mac"]
- macn["node mac-1<br/>VM"]
- end
- you -->|"page: follow, steer"| hub
- agents -->|"take, release"| hub
- agents -->|"ssh: build, test, run"| vps & deck & macn
- vps & deck & macn -->|"heartbeat, git"| hub
-```
-
-| | |
-|---|---|
-| **machine** | a computer in the workspace. All of them share one WireGuard network. |
-| **hub** | the process that holds the workspace's state (nodes, leases, the queue, the event log, sessions) and answers for it over HTTP. It also mirrors git for the nodes and keeps them warm. |
-| **node** | a sealed-off build environment on a machine: a checkout with a warm build directory. A rootless container on Linux, a VM on a Mac. One agent holds it at a time. |
-| **agent** | whoever builds: it *takes* a node, runs commands there over ssh, and *releases* it. Usually a Claude Code session, known by its worktree's name. |
-| **lease** | an agent holding a node. It ends at `release`, or after 30 minutes with no ssh session open. A *job lease* (`midas run`) holds it for one command; a *bot lease* holds it for a long-running program the agent talks to over MCP. |
-
-The hub's machine is assumed compromisable, since agents run there. What has to
-hold is each build machine, its owner's files and home network: a node runs as
-its own user, contained, behind a firewall that lets it reach the hub and the
-internet and nothing else. Nothing from the hub runs on a machine outside its
-node. [docs/development.md](docs/development.md#security-which-code-must-keep)
-has the line the code must keep.
+The workspace in the pictures is made up (`docs/screens/`); the page is the real one.
## Using it
-**As a person**, on the page:
+**On the page:**
-1. **+ New session**: say what to do. The session gets its own folder, adds
- the projects it needs as worktrees, and starts working.
-2. Follow it on **Home**. A session is **working** (a turn, or a build it
- left running in the background), **asks you** (orange: a question, a
- permission, or **Shall it land?**), or is **idle**: done with its turn,
- asking nothing. Only asking waits for you.
+1. **+ New session**: say what to do. The session gets a folder, adds the
+ projects it needs as worktrees, and starts working.
+2. **Home** shows each session as working, asking you (orange), or idle. Only
+ asking waits for you.
3. Answer **Land it**: the branch is checked on a node, put on main, and
- deployed with the next batch.
+ deployed.
4. **Workspace** when something is stuck: a node offline, a long wait, a
deploy held.
-**As an agent**, inside a session (midas's session hook explains this at
-start, and its skills `commit`, `finish-branch` and `handover` do the rest):
+**Inside a session**, the agent uses the CLI (its session hook explains this
+at start; the skills `commit`, `finish-branch` and `handover` do the rest):
```bash
midas run -- cargo test # a node for one command; it follows this worktree
-midas take # or borrow one for longer (waits in line if none is free)
-ssh <node> 'cargo test' # build and run there
-midas release # give it back (also automatic after 30 idle minutes)
-
+midas take # or hold one for longer; ssh <node> 'cargo test' builds there
+midas release # give it back (automatic after 30 idle minutes)
midas who # the other sessions, and the files each changes
midas say <session> "…" # leave one a note
midas ask "…" --option A --option B # put a decision to the person
-midas deploy <target> # build main on a node and publish it
midas status # who holds what, the queue, who is landing
```
@@ -133,39 +48,23 @@ midas status # who holds what, the queue, who is landing
You need a Linux machine for the hub (systemd, a git server it can reach, a
reverse proxy with TLS in front of the page), WireGuard between the machines,
-and on each build machine Podman (Linux) or macOS with its virtualization
-framework (Mac). Building midas needs a Rust toolchain and [Bun](https://bun.sh).
+and on each build machine Podman (Linux) or macOS. Building needs Rust and
+[Bun](https://bun.sh):
```bash
-git clone <this repository> && cd midas
(cd web && bun install --frozen-lockfile && bun run build) # the page, embedded by build.rs
cargo build --release
```
-Then, in this order:
-
-1. **[Setting up the hub](docs/hub.md)**: once, on the machine that runs it;
- also the page, sessions, accounts, devices and the HTTP API.
-2. **[Setting up a node](docs/node.md)**: on each build machine, by its owner.
- Linux (and SteamOS), or a [Mac for iOS builds](docs/macos-nodes.md).
-3. **[Using midas](docs/usage.md)**: taking nodes and building on them, bots,
- landing, deploying, working beside other sessions.
-
-## Working on midas
+1. [Setting up the hub](docs/hub.md): once, on the machine that runs it.
+2. [Setting up a node](docs/node.md): on each build machine, by its owner; or a [Mac](docs/macos-nodes.md).
+3. [Using midas](docs/usage.md): nodes, bots, landing, deploying, working beside other sessions.
-[docs/development.md](docs/development.md): building and testing it, the code
-map, how a change reaches the machines, and the security line the code must
-keep. Why it is built this way, and what lost: [DESIGN.md](DESIGN.md).
-
-```bash
-cargo test # the hub, the CLI, the node
-(cd web && bunx tsc --noEmit && bun test) # the page
-```
+[Working on midas](docs/development.md) has the build, the tests, the code map
+and the security line the code keeps; [DESIGN.md](DESIGN.md) says why it is
+built this way.
## License
-Licensed under either of the [Apache License, Version 2.0](LICENSE-APACHE) or
-the [MIT license](LICENSE-MIT), at your option. Unless you explicitly state
-otherwise, any contribution intentionally submitted for inclusion in the work
-by you shall be dual licensed as above, without any additional terms or
-conditions.
+MIT or Apache-2.0, at your option ([LICENSE-MIT](LICENSE-MIT),
+[LICENSE-APACHE](LICENSE-APACHE)).