Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ jobs:
- name: Cache OpenRA engine
uses: actions/cache@v4
with:
path: command-and-clanker/engine
key: openra-engine-${{ runner.os }}-${{ hashFiles('command-and-clanker/mod.config') }}
path: command-and-combobulate/engine
key: openra-engine-${{ runner.os }}-${{ hashFiles('command-and-combobulate/mod.config') }}
restore-keys: |
openra-engine-${{ runner.os }}-

- name: Build mod
working-directory: command-and-clanker
working-directory: command-and-combobulate
run: make
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dist/
.vite/
*.log
.DS_Store
.clanker-cache.json
.combobulate-cache.json
32 changes: 16 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ conventions an agent needs to make changes safely.

## What this repo is

Command & Clanker visualises an AI agent's tool calls as an
Command & Combobulate visualises an AI agent's tool calls as an
[OpenRA](https://www.openra.net) real-time strategy game. The agent's terminal
is a building, files are smaller buildings inside folder compounds, and every
read/write/run shows up as a unit moving on the map.
Expand All @@ -17,13 +17,13 @@ It ships as two cooperating pieces that talk over WebSocket and HTTP on
- **`server/`** — a Node backend. Hosts real PTYs via `node-pty`, ingests tool
events posted by the agent adapters, builds a world model, and streams it to
connected game clients.
- **`command-and-clanker/`** — an OpenRA Mod SDK mod. A C# client connects to
- **`command-and-combobulate/`** — an OpenRA Mod SDK mod. A C# client connects to
the backend, receives world updates, and renders them through the OpenRA
engine.

The agent adapters in `integrations/` are the third leg: shims for Claude Code
and Codex that POST tool calls to the backend, but only when launched from
inside an in-game terminal (detected via the `CLANKER_SESSION` env var).
inside an in-game terminal (detected via the `COMBOBULATE_SESSION` env var).

## Layout

Expand All @@ -45,10 +45,10 @@ inside an in-game terminal (detected via the `CLANKER_SESSION` env var).
Tests sit next to sources as `*.test.ts`.
- `shared/` — types shared between the backend and the adapters
(`proc-types.ts`, `types.ts`).
- `command-and-clanker/` — the OpenRA mod. Contains an OpenRA SDK scaffold
- `command-and-combobulate/` — the OpenRA mod. Contains an OpenRA SDK scaffold
plus:
- `mods/clanker/` — yaml rules, art, maps, and other mod data.
- `OpenRA.Mods.Clanker/` — C# traits and widgets specific to this mod.
- `mods/combobulate/` — yaml rules, art, maps, and other mod data.
- `OpenRA.Mods.Combobulate/` — C# traits and widgets specific to this mod.
- `engine/` — fetched OpenRA engine (not checked in; populated by
`fetch-engine.sh` / `make`).
- `integrations/` — per-agent adapters wired up by `bun run setup`.
Expand All @@ -70,7 +70,7 @@ The split between Node and Bun is deliberate and load-bearing:
- TypeScript is executed via Node's `--experimental-strip-types`; there is no
separate build step for the backend. `bun run typecheck` runs `tsc --noEmit`.
- The OpenRA mod builds with .NET 8 (or Mono) via `make` inside
`command-and-clanker/`. The first build fetches and compiles the pinned
`command-and-combobulate/`. The first build fetches and compiles the pinned
engine and takes several minutes.
- `mise.toml` pins Bun and Node versions.

Expand All @@ -86,7 +86,7 @@ Run from the repo root unless noted:
- `bun test` — run all `*.test.ts` files.
- `bun run game` — build the mod and launch the game (also starts a backend).

Mod-only flow (from `command-and-clanker/`):
Mod-only flow (from `command-and-combobulate/`):

- `make` — fetch the engine on first run, then build the mod.
- `./launch-game.sh` / `./launch-dedicated.sh` — launch the game / a dedicated
Expand All @@ -102,12 +102,12 @@ Mod-only flow (from `command-and-clanker/`):
is the canonical example: events in, world state out, no I/O.
- Co-locate tests with the code they cover (`foo.ts` + `foo.test.ts`).
- The OpenRA mod follows OpenRA's own conventions for yaml rules and C#
traits. When in doubt, mirror an existing trait in `OpenRA.Mods.Clanker/`
or an existing rule in `mods/clanker/`.
- Mod assets (sprites, palettes, maps) live under `mods/clanker/`. Generated
files under `command-and-clanker/engine/` and `bin/` are not checked in.
- Adapters in `integrations/` must stay silent outside a Command & Clanker
session — gate all reporting on `CLANKER_SESSION`.
traits. When in doubt, mirror an existing trait in `OpenRA.Mods.Combobulate/`
or an existing rule in `mods/combobulate/`.
- Mod assets (sprites, palettes, maps) live under `mods/combobulate/`. Generated
files under `command-and-combobulate/engine/` and `bin/` are not checked in.
- Adapters in `integrations/` must stay silent outside a Command & Combobulate
session — gate all reporting on `COMBOBULATE_SESSION`.

## Engineering standards

Expand All @@ -125,8 +125,8 @@ Mod-only flow (from `command-and-clanker/`):

## Things to avoid

- Do not commit anything under `command-and-clanker/engine/`,
`command-and-clanker/bin/`, or `.clanker-cache.json` — these are
- Do not commit anything under `command-and-combobulate/engine/`,
`command-and-combobulate/bin/`, or `.combobulate-cache.json` — these are
build/runtime artefacts.
- Do not switch the backend off Node, or the test runner off Bun.
- Do not add comments that restate what the code does; follow the
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Command & Clanker
<img width="512" height="256" alt="clanker-loadscreen" src="https://github.com/user-attachments/assets/61281ddd-34d0-4cf6-9692-9d8deeaeb24f" />
# Command & Combobulate
<img width="512" height="256" alt="Command & Combobulate" src="assets/loadscreen.png" />

<video width="1280" height="720" src="assets/demo002.mp4" controls></video>

Expand All @@ -14,7 +14,7 @@ It is two pieces:
- **`server/`** — a small Node backend. Agent adapters POST their tool calls to it,
and it hosts the real terminals (`node-pty`). It streams a live world and terminal
I/O over WebSocket.
- **`command-and-clanker/`** — an [OpenRA Mod SDK](https://github.com/OpenRA/OpenRAModSDK)
- **`command-and-combobulate/`** — an [OpenRA Mod SDK](https://github.com/OpenRA/OpenRAModSDK)
mod that connects to the backend and renders that world inside the OpenRA engine.

## Prerequisites
Expand All @@ -37,7 +37,7 @@ In a second shell, build and launch the mod. The first `make` fetches the pinned
OpenRA engine and builds it (a few minutes):

```sh
cd command-and-clanker
cd command-and-combobulate
make # fetch engine + build the mod
./launch-game.sh # launch
```
Expand All @@ -54,7 +54,7 @@ claude # also: codex

The agent appears as a unit and starts working the map. Scout outward to reveal
what other agents are doing. The adapters only report from inside a Command &
Clanker terminal (where `CLANKER_SESSION` is injected), so they stay quiet
Combobulate terminal (where `COMBOBULATE_SESSION` is injected), so they stay quiet
everywhere else.

## What you see
Expand All @@ -71,8 +71,8 @@ everywhere else.
## Layout

- `server/` — the backend (event ingest + PTY hosting).
- `command-and-clanker/` — the OpenRA mod: SDK scaffold, `mods/clanker/` (yaml,
art, maps) and `OpenRA.Mods.Clanker/` (C# traits and widgets).
- `command-and-combobulate/` — the OpenRA mod: SDK scaffold, `mods/combobulate/` (yaml,
art, maps) and `OpenRA.Mods.Combobulate/` (C# traits and widgets).
- `integrations/` — the Claude and Codex adapters installed by `bun run setup`.
- `docs/` — design notes.

Expand Down
Binary file added assets/loadscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions command-and-clanker/mods/clanker/fluent/clanker.ftl

This file was deleted.

7 changes: 0 additions & 7 deletions command-and-clanker/mods/clanker/rules/world.yaml

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 0 additions & 12 deletions command-and-clanker/package.json

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Clanker", "OpenRA.Mods.Clanker\OpenRA.Mods.Clanker.csproj", "{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Combobulate", "OpenRA.Mods.Combobulate\OpenRA.Mods.Combobulate.csproj", "{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Game", "engine\OpenRA.Game\OpenRA.Game.csproj", "{0DFB103F-2962-400F-8C6D-E2C28CCBA633}"
EndProject
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
using System.Threading.Tasks;
using OpenRA.Support;

namespace OpenRA.Mods.Clanker
namespace OpenRA.Mods.Combobulate
{
// Fire-and-forget JSON POSTs to the Command & Clanker backend. Called from the
// Fire-and-forget JSON POSTs to the Command & Combobulate backend. Called from the
// game thread; the request runs on a background task so it never stalls a tick.
// Anything that changes the world comes back over the bridge's /live stream,
// so callers do not await a response.
public static class ClankerBackend
public static class CombobulateBackend
{
public static string BaseUrl = "http://127.0.0.1:3001";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
using OpenRA.Mods.Common.LoadScreens;
using OpenRA.Primitives;

namespace OpenRA.Mods.Clanker
namespace OpenRA.Mods.Combobulate
{
// Draws a single image centered on screen plus the loadscreen-loading phrases.
// Unlike LogoStripeLoadScreen (which tiles a "stripe" region across the full
// width and so mangles a plain banner), this shows the image exactly once.
// Image size defaults to 512x256 and can be overridden with Width/Height in
// the LoadScreen block.
public sealed class ClankerLoadScreen : SheetLoadScreen
public sealed class CombobulateLoadScreen : SheetLoadScreen
{
[FluentReference]
const string Loading = "loadscreen-loading";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using OpenRA.Mods.Clanker.Protocol;
using OpenRA.Mods.Combobulate.Protocol;

namespace OpenRA.Mods.Clanker
namespace OpenRA.Mods.Combobulate
{
// Translates the backend's unbounded tile grid (Region.origin / fileArea,
// laid out by the spiral slot allocator in server/world-builder.ts) onto a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Text.Json;
using System.Text.Json.Serialization;

namespace OpenRA.Mods.Clanker.Protocol
namespace OpenRA.Mods.Combobulate.Protocol
{
// Mirrors the wire format the Command & Clanker backend broadcasts over
// Mirrors the wire format the Command & Combobulate backend broadcasts over
// WS /live (see the LiveMessage union in shared/proc-types.ts). One inbound
// frame is one of three kinds: a full world snapshot ("world-delta"), the
// current agents ("agents"), or the files each folder has touched ("files").
Expand Down
Loading
Loading