OpenRig Development Guide

Developing openrig

by mvschwarz · Apache-2.0 license · ★ 4,707 on GitHub

Developing openrig cover

Use when changing OpenRig's own source in a clone of the openrig repository: finding which package or file owns a behaviour, choosing which tests to run, testing a change without disturbing the OpenRig daemon your own session runs on,…

---
name: developing-openrig
description: "Use when changing OpenRig's own source in a clone of the openrig repository: finding which package or file owns a behaviour, choosing which tests to run, testing a change without disturbing the OpenRig daemon your own session runs on, judging whether a diff touches a high-risk area, or preparing a pull request. Not for operating rigs (openrig-skills) or designing rig topologies."
---

# Developing OpenRig

This skill is a map to the other maps. Each one is incomplete and may be stale: where a map and the code disagree, the
code is right, and fixing the map is a welcome contribution.

## First: which OpenRig are you in?

If you are an agent running inside OpenRig, two different OpenRigs are in play:

- **The installed one runs your session.** `rig --version` and `rig daemon status` describe it.
- **The checkout is what you're changing.** `git rev-parse HEAD` describes it.

Restarting the installed daemon does not run your checkout, and stopping it stops the agents running on it, including

Overview

This skill is a map to the other maps. Each one is incomplete and may be stale: where a map and the code disagree, the code is right, and fixing the map is a welcome contribution.

Manual install (npx, ZIP)
Claude Codenpx skills add mvschwarz/openrig --skill developing-openrig -g -a claude-code
Claude Code (degit)npx degit mvschwarz/openrig/.agents/skills/developing-openrig#main ~/.claude/skills/developing-openrig
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md4.3 KB
Read SKILL.md here
mvschwarz/main1 file shown
SKILL.md
Show the full text67 lines

Developing OpenRig

This skill is a map to the other maps. Each one is incomplete and may be stale: where a map and the code disagree, the code is right, and fixing the map is a welcome contribution.

First: which OpenRig are you in?

If you are an agent running inside OpenRig, two different OpenRigs are in play:

  • The installed one runs your session. rig --version and rig daemon status describe it.
  • The checkout is what you're changing. git rev-parse HEAD describes it.

Restarting the installed daemon does not run your checkout, and stopping it stops the agents running on it, including you. Test your change with the repo's own harnesses, which start a private daemon and tmux server (see "Test it" below), not by restarting the daemon you live in.

Find your way

You want to know Read How much to trust it
How the packages fit, the request path, where to add a command, route, migration, adapter, skill, context pack or scenario ARCHITECTURE.md Checked against the commit it names; counts come with the command to refresh them
Whether your change touches a high-risk area, what depends on it, what broke there before docs/as-built/arteries.md Incomplete by design: absence from it doesn't make a change safe
What to run before you push, and what each layer can and can't prove docs/as-built/test-layers.md Checked against the commit it names
The exact behaviour of a rig command rig <command> --help on the running binary, then packages/cli/src/commands/ The binary and the code win over any document
A subsystem in depth docs/as-built/ Most modules predate 0.6; check each one's last-verified-against-source marker against git log before relying on it
Rig spec, agent spec and other user-facing reference docs/reference/ Ships to every user; if you find drift, fix it there
How to open a good pull request, and what review looks like CONTRIBUTING.md Current

If none of these answers your question, search the code before inventing an answer. A missing map is worth an issue.

Before you change an artery

If your diff touches anything in arteries.md (message delivery, launch and resume, the queue, rig identity, skill projection, process observation, migrations, restore):

  1. Read the artery row: what depends on it, and the past regressions listed there.
  2. Describe the downstream effect in your pull request, not just the diff.
  3. Add or extend a stub-agent scenario, or say precisely why the stub can't exercise it and what you ran instead.

Test it

The short version is npm run build, npm run lint, npm test. test-layers.md has the full ladder, including the stub-agent scenarios, which run the real CLI, daemon, tmux and SQLite with scripted agents and no model cost.

  • The scenario runner starts its own daemon and tmux server and drops your session's TMUX and daemon variables, so it won't touch the daemon your session runs on.
  • A stub proves OpenRig's own plumbing, not how Claude Code or Codex behave. Say which you exercised.

How we judge changes

OpenRig is a coordination layer for a trusted environment: it should help agents and people keep work flowing.

  • A change that removes friction, or makes state more truthful, is usually welcome.
  • A change that adds a refusal, a prompt or a required step needs the concrete case in CONTRIBUTING.md: who is harmed, how, and what it costs everyone else.
  • One concern per pull request. Keep the diff reviewable in one sitting.

When the map is wrong

Fix it in the same pull request, or open an issue. Update a document's last-verified-against-source marker only when you have actually checked it against that commit.

1---
2name: developing-openrig
3description: "Use when changing OpenRig's own source in a clone of the openrig repository: finding which package or file owns a behaviour, choosing which tests to run, testing a change without disturbing the OpenRig daemon your own session runs on, judging whether a diff touches a high-risk area, or preparing a pull request. Not for operating rigs (openrig-skills) or designing rig topologies."
4---
5 
6# Developing OpenRig
7 
8This skill is a map to the other maps. Each one is incomplete and may be stale: where a map and the code disagree, the
9code is right, and fixing the map is a welcome contribution.
10 
11## First: which OpenRig are you in?
12 
13If you are an agent running inside OpenRig, two different OpenRigs are in play:
14 
15- **The installed one runs your session.** `rig --version` and `rig daemon status` describe it.
16- **The checkout is what you're changing.** `git rev-parse HEAD` describes it.
17 
18Restarting the installed daemon does not run your checkout, and stopping it stops the agents running on it, including
19you. Test your change with the repo's own harnesses, which start a private daemon and tmux server (see "Test it" below),
20not by restarting the daemon you live in.
21 
22## Find your way
23 
24| You want to know | Read | How much to trust it |
25|---|---|---|
26| How the packages fit, the request path, where to add a command, route, migration, adapter, skill, context pack or scenario | [`ARCHITECTURE.md`](../../../ARCHITECTURE.md) | Checked against the commit it names; counts come with the command to refresh them |
27| Whether your change touches a high-risk area, what depends on it, what broke there before | [`docs/as-built/arteries.md`](../../../docs/as-built/arteries.md) | Incomplete by design: absence from it doesn't make a change safe |
28| What to run before you push, and what each layer can and can't prove | [`docs/as-built/test-layers.md`](../../../docs/as-built/test-layers.md) | Checked against the commit it names |
29| The exact behaviour of a `rig` command | `rig <command> --help` on the running binary, then `packages/cli/src/commands/` | The binary and the code win over any document |
30| A subsystem in depth | [`docs/as-built/`](../../../docs/as-built/README.md) | Most modules predate 0.6; check each one's `last-verified-against-source` marker against `git log` before relying on it |
31| Rig spec, agent spec and other user-facing reference | [`docs/reference/`](../../../docs/reference/) | Ships to every user; if you find drift, fix it there |
32| How to open a good pull request, and what review looks like | [`CONTRIBUTING.md`](../../../CONTRIBUTING.md) | Current |
33 
34If none of these answers your question, search the code before inventing an answer. A missing map is worth an issue.
35 
36## Before you change an artery
37 
38If your diff touches anything in `arteries.md` (message delivery, launch and resume, the queue, rig identity, skill
39projection, process observation, migrations, restore):
40 
411. Read the artery row: what depends on it, and the past regressions listed there.
422. Describe the downstream effect in your pull request, not just the diff.
433. Add or extend a stub-agent scenario, or say precisely why the stub can't exercise it and what you ran instead.
44 
45## Test it
46 
47The short version is `npm run build`, `npm run lint`, `npm test`. `test-layers.md` has the full ladder, including the
48stub-agent scenarios, which run the real CLI, daemon, tmux and SQLite with scripted agents and no model cost.
49 
50- The scenario runner starts its own daemon and tmux server and drops your session's `TMUX` and daemon variables, so
51 it won't touch the daemon your session runs on.
52- A stub proves OpenRig's own plumbing, not how Claude Code or Codex behave. Say which you exercised.
53 
54## How we judge changes
55 
56OpenRig is a coordination layer for a trusted environment: it should help agents and people keep work flowing.
57 
58- A change that removes friction, or makes state more truthful, is usually welcome.
59- A change that adds a refusal, a prompt or a required step needs the concrete case in CONTRIBUTING.md: who is
60 harmed, how, and what it costs everyone else.
61- One concern per pull request. Keep the diff reviewable in one sitting.
62 
63## When the map is wrong
64 
65Fix it in the same pull request, or open an issue. Update a document's `last-verified-against-source` marker only when
66you have actually checked it against that commit.
67 
View all files on GitHub →

Details

License
Apache-2.0
Stars on the repo
★ 4,707
Checked
Source
mvschwarz/openrig ↗
Creator
mvschwarz · 13 listings
View creator

Similar skills

See all →

More from mvschwarz

SkillSession Compaction Restoremvschwarz/openrig · by mvschwarzUse when a Claude Code session is about to compact, has just compacted, reached its context limit, resumed after /compact, or must rebuild its working picture of a long-running seat from its own restore map, its JSONL transcript and the files it touched.★ 4.7k GitHub starsSkillTask Delegation Advisormvschwarz/openrig · by mvschwarzUse when you have a task and must decide WHO does it — yourself, a spawned subagent, or another agent in the topology that already holds the context. The rule: how much would a blank slate have to read in to do this correctly? A lot → route to a context-holding agent; a little → subagent; unsure → a real agent or yourself. NOT the mechanics of fanning out (that's dispatching-parallel-agents / subagent-driven-development) — this is the who/whether decision, and the failure mode that makes teams abandon subagents.★ 4.7k GitHub starsSkillSystem Architecture Primermvschwarz/openrig · by mvschwarzUse when the system around you does not make sense yet: you just booted into a seat and do not know how the pieces fit; someone said rig, pod, seat, fleet, topology, or slice and you are not certain what they mean here; you are unsure what kind of rig you are in or what it is for; you do not know how skills reach you or where context comes from; or you are about to act on a guess about how OpenRig works. Gives the runtime mental model fast, so you stop guessing.★ 4.7k GitHub starsSkillHuman Communication Handlermvschwarz/openrig · by mvschwarzUse when project policy calls for a human decision or update, a human delivery is pending or failed, or a reply must resume the right work.★ 4.7k GitHub starsSkillMission Lifecycle Frameworkmvschwarz/openrig · by mvschwarzUse when starting, building, handing off, restoring, or closing a mission or slice under the default lightweight SDLC.★ 4.7k GitHub starsSkillOpenRig Skills Indexmvschwarz/openrig · by mvschwarzUse when you're operating OpenRig and need the right skill or context for fleet recovery, seat handover, new-seat orientation, a watchdog wake, cross-host reach to an agent on another machine, rig packaging, an OpenRig upgrade, systematic debugging, queue triage, or implementation planning; also use when you don't know what applies or nothing is projected on cold boot.★ 4.7k GitHub stars