swarmboard 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- swarmboard-0.1.0/PKG-INFO +229 -0
- swarmboard-0.1.0/README.md +219 -0
- swarmboard-0.1.0/pyproject.toml +24 -0
- swarmboard-0.1.0/setup.cfg +4 -0
- swarmboard-0.1.0/swarmboard.egg-info/PKG-INFO +229 -0
- swarmboard-0.1.0/swarmboard.egg-info/SOURCES.txt +13 -0
- swarmboard-0.1.0/swarmboard.egg-info/dependency_links.txt +1 -0
- swarmboard-0.1.0/swarmboard.egg-info/entry_points.txt +2 -0
- swarmboard-0.1.0/swarmboard.egg-info/top_level.txt +1 -0
- swarmboard-0.1.0/swrm.py +2656 -0
- swarmboard-0.1.0/tests/test_boards.py +157 -0
- swarmboard-0.1.0/tests/test_connectors.py +301 -0
- swarmboard-0.1.0/tests/test_labels.py +210 -0
- swarmboard-0.1.0/tests/test_onboard.py +70 -0
- swarmboard-0.1.0/tests/test_update.py +110 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmboard
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI-first kanban board for agent swarms: one board, a live change feed, and multiple agents at once.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Nergy101/swarmboard
|
|
6
|
+
Project-URL: Documentation, https://nergy101.github.io/swarmboard/
|
|
7
|
+
Keywords: kanban,agents,cli,swarm,todo
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="assets/logo.svg" alt="swarmboard logo" width="160"/>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<h1 align="center">swarmboard</h1>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<b>One board. The whole swarm.</b><br/>
|
|
19
|
+
A CLI-first kanban board (`swrm`) that any number of agents can work on <b>at the same time</b> —
|
|
20
|
+
with a live terminal view and an immediate change feed. No server, no dependencies.
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="#install">Install</a> ·
|
|
25
|
+
<a href="#watch-it-live">Live board</a> ·
|
|
26
|
+
<a href="#multi-agent-usage-one-pc">Multi-agent</a> ·
|
|
27
|
+
<a href="#across-multiple-pcs--leader-follower-mode">Multi-PC</a> ·
|
|
28
|
+
<a href="#commands">Commands</a> ·
|
|
29
|
+
<a href="#the-swarmboard-skill">Skill</a>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Why swarmboard
|
|
35
|
+
|
|
36
|
+
Most kanban tools assume one human at a keyboard. **swarmboard** assumes a *swarm*:
|
|
37
|
+
many agents (and humans) claiming, commenting, blocking, and completing cards
|
|
38
|
+
concurrently — and everyone sees it happen immediately.
|
|
39
|
+
|
|
40
|
+
- **Concurrency-safe by design** — one SQLite database in WAL mode; claims are
|
|
41
|
+
atomic, so two agents can never grab the same card.
|
|
42
|
+
- **Immediate change feed** — every mutation lands in an append-only event log
|
|
43
|
+
in the same transaction. `swrm watch` streams it; `swrm dash` renders it.
|
|
44
|
+
- **Terminal-first** — the board *is* the terminal. Open `swrm dash` and watch
|
|
45
|
+
the swarm move.
|
|
46
|
+
- **Zero dependencies** — a single Python 3 module (`swrm.py`) using only the standard library.
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pipx install swarmboard # command: swrm
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
or with Homebrew: `brew tap Nergy101/swrm && brew install swrm`, or from source:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git clone https://github.com/Nergy101/swarmboard.git
|
|
58
|
+
cd swarmboard
|
|
59
|
+
chmod +x swrm # already executable (two-line shim around swrm.py)
|
|
60
|
+
ln -s "$PWD/swrm" ~/.local/bin/swrm # optional: put it on PATH
|
|
61
|
+
swrm init # create ./.kanban/kanban.db
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Requires Python 3.9+. `swrm update` self-updates pipx/Homebrew/git installs.
|
|
65
|
+
Board location: `--db PATH`, else `$KANBAN_DB`, else
|
|
66
|
+
`./.kanban/kanban.db`. Actor name: `--actor NAME`, else `$KANBAN_ACTOR`, else
|
|
67
|
+
`$USER`. Every command also accepts `--json`. Remote mode: set `$KANBAN_URL`
|
|
68
|
+
(or pass `--url`) and every command runs against the leader over HTTP — see
|
|
69
|
+
"Across multiple PCs".
|
|
70
|
+
|
|
71
|
+
## Watch it live
|
|
72
|
+
|
|
73
|
+
Open a terminal and run:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
swrm dash # full-screen live board, re-rendered every 0.5s (alias: swrm dashboard)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
KANBAN /proj/.kanban/kanban.db 2026-11-17T23:21:40Z
|
|
81
|
+
todo:1 ready:2 doing:1 blocked:0 done:12
|
|
82
|
+
----------------------------------------------------------------
|
|
83
|
+
TODO (1) READY (2) DOING (1) BLOCKED (0) DONE (12)
|
|
84
|
+
-------------- -------------- -------------- ----------- ------
|
|
85
|
+
┌────────────┐ ┌────────────┐ ┌────────────┐
|
|
86
|
+
│research │ │ship the │ │polish │
|
|
87
|
+
│costs │ │API │ │dashboard │
|
|
88
|
+
│t_aa11 P1 │ │t_bb22 P3 │ │t_9f4b P0 │
|
|
89
|
+
│@dev │ │@qa │ │[dev 14m59s]│
|
|
90
|
+
└────────────┘ └────────────┘ └────────────┘
|
|
91
|
+
feed: #41 dev claimed t_9f4b ... #42 qa done t_cc33 ...
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Each card is a bordered box (tinted with its column color): **title first**,
|
|
95
|
+
with a dim meta line underneath (`id`, priority, assignee or claim time left).
|
|
96
|
+
|
|
97
|
+
`doing` rows show **which worker picked up which task** and the time left on
|
|
98
|
+
their claim. In the live full-screen view the column headers and feed stay
|
|
99
|
+
pinned; move the cursor with ↑/↓/←/→ (or hjkl) and press **Enter or click a
|
|
100
|
+
card** to open a detail modal (history, parents/children, body) — click another
|
|
101
|
+
card to switch the modal to it, click outside to close; `q` closes the
|
|
102
|
+
modal / quits. `swrm dash --once` prints one snapshot (default when piped);
|
|
103
|
+
`swrm watch --json` is the NDJSON feed for piping into other agents.
|
|
104
|
+
|
|
105
|
+
## Lifecycle
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
todo ──(all parents done)──> ready ──(claim)──> doing ──> done
|
|
109
|
+
└───────> blocked ──(unblock)──> ready
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Multi-agent usage (one PC)
|
|
113
|
+
|
|
114
|
+
Point every agent at the same board and give each a distinct actor name:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
export KANBAN_DB=/shared/project/.kanban/kanban.db
|
|
118
|
+
|
|
119
|
+
# orchestrator fans work out — children wait for their parents automatically
|
|
120
|
+
T1=$(swrm add "research costs" --assignee researcher --json | jq -r .id)
|
|
121
|
+
T2=$(swrm add "research perf" --assignee researcher --json | jq -r .id)
|
|
122
|
+
swrm add "synthesize" --assignee analyst --parent "$T1" --parent "$T2"
|
|
123
|
+
|
|
124
|
+
# workers self-serve from the board
|
|
125
|
+
swrm claim --any --assignee researcher --actor researcher # atomic claim
|
|
126
|
+
swrm comment "$T1" "started" --actor researcher
|
|
127
|
+
swrm complete "$T1" --actor researcher --summary "costs done"
|
|
128
|
+
|
|
129
|
+
# anyone can watch the swarm live
|
|
130
|
+
swrm dash
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Parallel `add`/`claim`/`complete` calls from many processes never lose events.
|
|
134
|
+
Claims expire (default TTL 900 s, `--ttl` to change); `swrm reclaim` releases
|
|
135
|
+
stale ones back to `ready`.
|
|
136
|
+
|
|
137
|
+
## Across multiple PCs — leader-follower mode
|
|
138
|
+
|
|
139
|
+
SQLite is single-host (WAL locking doesn't survive network filesystems), so the
|
|
140
|
+
board file lives on **one leader PC**; every other PC is a thin follower that
|
|
141
|
+
talks HTTP. All commands work unchanged — set one env var on the followers:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# PC1 — the leader (owns the database)
|
|
145
|
+
swrm serve --host 0.0.0.0 --port 8765 --passkey s3cret # bind 127.0.0.1 for localhost-only
|
|
146
|
+
|
|
147
|
+
# PC2, PC3, ... — followers
|
|
148
|
+
export KANBAN_URL=http://pc1:8765 KANBAN_PASSKEY=s3cret # or --passkey s3cret per command
|
|
149
|
+
swrm add "task from pc2" --assignee qa
|
|
150
|
+
swrm claim --any --assignee qa --actor qa
|
|
151
|
+
swrm dash # live board, long-polled from the leader
|
|
152
|
+
swrm watch --json # NDJSON feed, long-polled from the leader
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
PC2 (follower) PC1 (leader)
|
|
157
|
+
swrm claim --any ──HTTP──> swrm serve ──> SQLite (WAL, atomic claims)
|
|
158
|
+
swrm dash <──GET /snapshot / /events?since=N (long-poll)──
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
- The leader runs the exact same command functions in-process, so claims stay
|
|
162
|
+
**atomic across all PCs** — two followers can never grab the same card.
|
|
163
|
+
- `watch`/`dash` on followers long-poll `GET /events?since=N` / `GET /snapshot`,
|
|
164
|
+
so the live feed works over the network with ~LAN-latency updates.
|
|
165
|
+
- `--url http://pc1:8765` works per-command as an alternative to `$KANBAN_URL`.
|
|
166
|
+
- **Passkey**: `swrm serve --passkey SECRET` (or `$KANBAN_PASSKEY`) makes the
|
|
167
|
+
leader require an `X-Swrm-Passkey: SECRET` header on every request — anything
|
|
168
|
+
missing/wrong gets `401`. Followers set the same secret via
|
|
169
|
+
`KANBAN_PASSKEY` or `--passkey`. Without a passkey the API is open — trusted
|
|
170
|
+
LANs/VPNs only, or front it with an auth-ing reverse proxy.
|
|
171
|
+
- HTTP endpoints: `POST /cmd/<command>` (any CLI command, JSON args),
|
|
172
|
+
`GET /events?since=N&timeout=25` (long-poll feed), `GET /events?max=1` (latest),
|
|
173
|
+
`GET /snapshot?feed=N`, `GET /health`.
|
|
174
|
+
|
|
175
|
+
## Commands
|
|
176
|
+
|
|
177
|
+
| Command | What it does |
|
|
178
|
+
|---|---|
|
|
179
|
+
| `swrm init` | create the board database |
|
|
180
|
+
| `swrm help` | quick-start guide and where to go next |
|
|
181
|
+
| `swrm add "title" [--body B] [--assignee A] [--priority N] [--label L]... [--parent ID]...` | create a card; starts `ready`, or `todo` if any parent isn't `done` |
|
|
182
|
+
| `swrm ls [--status S] [--assignee A] [--label L]` | list cards |
|
|
183
|
+
| `swrm board` | static column view |
|
|
184
|
+
| `swrm dash` (aliases `dashboard`, `live`) | **live-updating board view** — `--once`, `--follow`, `--interval`, `--feed N` |
|
|
185
|
+
| `swrm show <id>` | card detail + parents/children + full event history |
|
|
186
|
+
| `swrm claim <id>` / `swrm claim --any [--assignee A] [--ttl SECONDS]` | atomically claim a `ready` card |
|
|
187
|
+
| `swrm release <id> [--force]` | release a claim back to `ready` |
|
|
188
|
+
| `swrm reclaim [id] [--force]` | release expired claims back to `ready` |
|
|
189
|
+
| `swrm complete <id> --summary "..."` | mark `done`; auto-promotes children whose parents are all done |
|
|
190
|
+
| `swrm block <id> --reason "..."` / `swrm unblock <id>` | park / revive a card |
|
|
191
|
+
| `swrm move <id> <status>` | set status directly (`todo ready doing done blocked archived`) |
|
|
192
|
+
| `swrm assign <id> <agent>` | reassign |
|
|
193
|
+
| `swrm edit <id> [--title T] [--body B] [--priority N] [--label L]...` | edit fields |
|
|
194
|
+
| `swrm link <parent> <child>` / `swrm unlink <parent> <child>` | dependency links; linking demotes a runnable child to `todo` until parents finish |
|
|
195
|
+
| `swrm comment <id> "text"` | add a note to the card's history |
|
|
196
|
+
| `swrm rm <id>` / `swrm rm <status>` / `swrm rm --all` | archive one card, all cards in a status (`rm done`, `rm blocked`), or the whole board |
|
|
197
|
+
| `swrm prune [--dry-run]` | permanently delete archived cards, their links and their events |
|
|
198
|
+
| `swrm events [--task ID] [--limit N]` | dump the change feed |
|
|
199
|
+
| `swrm watch [--json] [--since N] [--interval S]` | stream the change feed live (Ctrl-C to stop) |
|
|
200
|
+
| `swrm serve [--host H] [--port P] [--passkey K]` | run the **leader server** (default 127.0.0.1:8765) so other PCs can connect via `KANBAN_URL`; `--passkey` requires followers to authenticate |
|
|
201
|
+
| all commands | `--url http://leader:8765` / `$KANBAN_URL` to run remotely; `--passkey` / `$KANBAN_PASSKEY` to authenticate |
|
|
202
|
+
|
|
203
|
+
## The swarmboard skill
|
|
204
|
+
|
|
205
|
+
`.vibe/skills/swarmboard/SKILL.md` is the orchestrator playbook for routing a
|
|
206
|
+
swarm through this board (load it as `/swarmboard`; adapted from the
|
|
207
|
+
`kanban-orchestrator` workflow): decomposition patterns, parent-gating,
|
|
208
|
+
anti-temptation rules ("route, don't execute"), and stuck-card recovery — all
|
|
209
|
+
expressed in `swrm` commands.
|
|
210
|
+
|
|
211
|
+
## Docs
|
|
212
|
+
|
|
213
|
+
Docs live at **[nergy101.github.io/swarmboard](https://nergy101.github.io/swarmboard/)** —
|
|
214
|
+
deployed automatically to GitHub Pages by `.github/workflows/docs.yml` on every
|
|
215
|
+
push to `main` that touches `docs/`. Sources are the Markdown files in `docs/src/`
|
|
216
|
+
(MkDocs + Material); the built static HTML is in `docs/site/` and can also be
|
|
217
|
+
served locally with any static file server:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
python3 -m http.server -d docs/site 8000 # or rebuild: python3 -m mkdocs build
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Development
|
|
224
|
+
|
|
225
|
+
Single file: `swrm` (Python 3 stdlib only). Schema: `tasks`, `links`
|
|
226
|
+
(parent→child), `events` (append-only audit feed). Brand assets in `assets/`:
|
|
227
|
+
`logo.svg` (hive mark on dark tile, used above), `logo-mark.svg` (mark only,
|
|
228
|
+
transparent), `logo-wordmark.svg` (mark + wordmark + tagline),
|
|
229
|
+
`favicon.svg` / `favicon.ico` (16–256 px).
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/logo.svg" alt="swarmboard logo" width="160"/>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">swarmboard</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>One board. The whole swarm.</b><br/>
|
|
9
|
+
A CLI-first kanban board (`swrm`) that any number of agents can work on <b>at the same time</b> —
|
|
10
|
+
with a live terminal view and an immediate change feed. No server, no dependencies.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="#install">Install</a> ·
|
|
15
|
+
<a href="#watch-it-live">Live board</a> ·
|
|
16
|
+
<a href="#multi-agent-usage-one-pc">Multi-agent</a> ·
|
|
17
|
+
<a href="#across-multiple-pcs--leader-follower-mode">Multi-PC</a> ·
|
|
18
|
+
<a href="#commands">Commands</a> ·
|
|
19
|
+
<a href="#the-swarmboard-skill">Skill</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Why swarmboard
|
|
25
|
+
|
|
26
|
+
Most kanban tools assume one human at a keyboard. **swarmboard** assumes a *swarm*:
|
|
27
|
+
many agents (and humans) claiming, commenting, blocking, and completing cards
|
|
28
|
+
concurrently — and everyone sees it happen immediately.
|
|
29
|
+
|
|
30
|
+
- **Concurrency-safe by design** — one SQLite database in WAL mode; claims are
|
|
31
|
+
atomic, so two agents can never grab the same card.
|
|
32
|
+
- **Immediate change feed** — every mutation lands in an append-only event log
|
|
33
|
+
in the same transaction. `swrm watch` streams it; `swrm dash` renders it.
|
|
34
|
+
- **Terminal-first** — the board *is* the terminal. Open `swrm dash` and watch
|
|
35
|
+
the swarm move.
|
|
36
|
+
- **Zero dependencies** — a single Python 3 module (`swrm.py`) using only the standard library.
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pipx install swarmboard # command: swrm
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
or with Homebrew: `brew tap Nergy101/swrm && brew install swrm`, or from source:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
git clone https://github.com/Nergy101/swarmboard.git
|
|
48
|
+
cd swarmboard
|
|
49
|
+
chmod +x swrm # already executable (two-line shim around swrm.py)
|
|
50
|
+
ln -s "$PWD/swrm" ~/.local/bin/swrm # optional: put it on PATH
|
|
51
|
+
swrm init # create ./.kanban/kanban.db
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Requires Python 3.9+. `swrm update` self-updates pipx/Homebrew/git installs.
|
|
55
|
+
Board location: `--db PATH`, else `$KANBAN_DB`, else
|
|
56
|
+
`./.kanban/kanban.db`. Actor name: `--actor NAME`, else `$KANBAN_ACTOR`, else
|
|
57
|
+
`$USER`. Every command also accepts `--json`. Remote mode: set `$KANBAN_URL`
|
|
58
|
+
(or pass `--url`) and every command runs against the leader over HTTP — see
|
|
59
|
+
"Across multiple PCs".
|
|
60
|
+
|
|
61
|
+
## Watch it live
|
|
62
|
+
|
|
63
|
+
Open a terminal and run:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
swrm dash # full-screen live board, re-rendered every 0.5s (alias: swrm dashboard)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
KANBAN /proj/.kanban/kanban.db 2026-11-17T23:21:40Z
|
|
71
|
+
todo:1 ready:2 doing:1 blocked:0 done:12
|
|
72
|
+
----------------------------------------------------------------
|
|
73
|
+
TODO (1) READY (2) DOING (1) BLOCKED (0) DONE (12)
|
|
74
|
+
-------------- -------------- -------------- ----------- ------
|
|
75
|
+
┌────────────┐ ┌────────────┐ ┌────────────┐
|
|
76
|
+
│research │ │ship the │ │polish │
|
|
77
|
+
│costs │ │API │ │dashboard │
|
|
78
|
+
│t_aa11 P1 │ │t_bb22 P3 │ │t_9f4b P0 │
|
|
79
|
+
│@dev │ │@qa │ │[dev 14m59s]│
|
|
80
|
+
└────────────┘ └────────────┘ └────────────┘
|
|
81
|
+
feed: #41 dev claimed t_9f4b ... #42 qa done t_cc33 ...
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Each card is a bordered box (tinted with its column color): **title first**,
|
|
85
|
+
with a dim meta line underneath (`id`, priority, assignee or claim time left).
|
|
86
|
+
|
|
87
|
+
`doing` rows show **which worker picked up which task** and the time left on
|
|
88
|
+
their claim. In the live full-screen view the column headers and feed stay
|
|
89
|
+
pinned; move the cursor with ↑/↓/←/→ (or hjkl) and press **Enter or click a
|
|
90
|
+
card** to open a detail modal (history, parents/children, body) — click another
|
|
91
|
+
card to switch the modal to it, click outside to close; `q` closes the
|
|
92
|
+
modal / quits. `swrm dash --once` prints one snapshot (default when piped);
|
|
93
|
+
`swrm watch --json` is the NDJSON feed for piping into other agents.
|
|
94
|
+
|
|
95
|
+
## Lifecycle
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
todo ──(all parents done)──> ready ──(claim)──> doing ──> done
|
|
99
|
+
└───────> blocked ──(unblock)──> ready
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Multi-agent usage (one PC)
|
|
103
|
+
|
|
104
|
+
Point every agent at the same board and give each a distinct actor name:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
export KANBAN_DB=/shared/project/.kanban/kanban.db
|
|
108
|
+
|
|
109
|
+
# orchestrator fans work out — children wait for their parents automatically
|
|
110
|
+
T1=$(swrm add "research costs" --assignee researcher --json | jq -r .id)
|
|
111
|
+
T2=$(swrm add "research perf" --assignee researcher --json | jq -r .id)
|
|
112
|
+
swrm add "synthesize" --assignee analyst --parent "$T1" --parent "$T2"
|
|
113
|
+
|
|
114
|
+
# workers self-serve from the board
|
|
115
|
+
swrm claim --any --assignee researcher --actor researcher # atomic claim
|
|
116
|
+
swrm comment "$T1" "started" --actor researcher
|
|
117
|
+
swrm complete "$T1" --actor researcher --summary "costs done"
|
|
118
|
+
|
|
119
|
+
# anyone can watch the swarm live
|
|
120
|
+
swrm dash
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Parallel `add`/`claim`/`complete` calls from many processes never lose events.
|
|
124
|
+
Claims expire (default TTL 900 s, `--ttl` to change); `swrm reclaim` releases
|
|
125
|
+
stale ones back to `ready`.
|
|
126
|
+
|
|
127
|
+
## Across multiple PCs — leader-follower mode
|
|
128
|
+
|
|
129
|
+
SQLite is single-host (WAL locking doesn't survive network filesystems), so the
|
|
130
|
+
board file lives on **one leader PC**; every other PC is a thin follower that
|
|
131
|
+
talks HTTP. All commands work unchanged — set one env var on the followers:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# PC1 — the leader (owns the database)
|
|
135
|
+
swrm serve --host 0.0.0.0 --port 8765 --passkey s3cret # bind 127.0.0.1 for localhost-only
|
|
136
|
+
|
|
137
|
+
# PC2, PC3, ... — followers
|
|
138
|
+
export KANBAN_URL=http://pc1:8765 KANBAN_PASSKEY=s3cret # or --passkey s3cret per command
|
|
139
|
+
swrm add "task from pc2" --assignee qa
|
|
140
|
+
swrm claim --any --assignee qa --actor qa
|
|
141
|
+
swrm dash # live board, long-polled from the leader
|
|
142
|
+
swrm watch --json # NDJSON feed, long-polled from the leader
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
PC2 (follower) PC1 (leader)
|
|
147
|
+
swrm claim --any ──HTTP──> swrm serve ──> SQLite (WAL, atomic claims)
|
|
148
|
+
swrm dash <──GET /snapshot / /events?since=N (long-poll)──
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- The leader runs the exact same command functions in-process, so claims stay
|
|
152
|
+
**atomic across all PCs** — two followers can never grab the same card.
|
|
153
|
+
- `watch`/`dash` on followers long-poll `GET /events?since=N` / `GET /snapshot`,
|
|
154
|
+
so the live feed works over the network with ~LAN-latency updates.
|
|
155
|
+
- `--url http://pc1:8765` works per-command as an alternative to `$KANBAN_URL`.
|
|
156
|
+
- **Passkey**: `swrm serve --passkey SECRET` (or `$KANBAN_PASSKEY`) makes the
|
|
157
|
+
leader require an `X-Swrm-Passkey: SECRET` header on every request — anything
|
|
158
|
+
missing/wrong gets `401`. Followers set the same secret via
|
|
159
|
+
`KANBAN_PASSKEY` or `--passkey`. Without a passkey the API is open — trusted
|
|
160
|
+
LANs/VPNs only, or front it with an auth-ing reverse proxy.
|
|
161
|
+
- HTTP endpoints: `POST /cmd/<command>` (any CLI command, JSON args),
|
|
162
|
+
`GET /events?since=N&timeout=25` (long-poll feed), `GET /events?max=1` (latest),
|
|
163
|
+
`GET /snapshot?feed=N`, `GET /health`.
|
|
164
|
+
|
|
165
|
+
## Commands
|
|
166
|
+
|
|
167
|
+
| Command | What it does |
|
|
168
|
+
|---|---|
|
|
169
|
+
| `swrm init` | create the board database |
|
|
170
|
+
| `swrm help` | quick-start guide and where to go next |
|
|
171
|
+
| `swrm add "title" [--body B] [--assignee A] [--priority N] [--label L]... [--parent ID]...` | create a card; starts `ready`, or `todo` if any parent isn't `done` |
|
|
172
|
+
| `swrm ls [--status S] [--assignee A] [--label L]` | list cards |
|
|
173
|
+
| `swrm board` | static column view |
|
|
174
|
+
| `swrm dash` (aliases `dashboard`, `live`) | **live-updating board view** — `--once`, `--follow`, `--interval`, `--feed N` |
|
|
175
|
+
| `swrm show <id>` | card detail + parents/children + full event history |
|
|
176
|
+
| `swrm claim <id>` / `swrm claim --any [--assignee A] [--ttl SECONDS]` | atomically claim a `ready` card |
|
|
177
|
+
| `swrm release <id> [--force]` | release a claim back to `ready` |
|
|
178
|
+
| `swrm reclaim [id] [--force]` | release expired claims back to `ready` |
|
|
179
|
+
| `swrm complete <id> --summary "..."` | mark `done`; auto-promotes children whose parents are all done |
|
|
180
|
+
| `swrm block <id> --reason "..."` / `swrm unblock <id>` | park / revive a card |
|
|
181
|
+
| `swrm move <id> <status>` | set status directly (`todo ready doing done blocked archived`) |
|
|
182
|
+
| `swrm assign <id> <agent>` | reassign |
|
|
183
|
+
| `swrm edit <id> [--title T] [--body B] [--priority N] [--label L]...` | edit fields |
|
|
184
|
+
| `swrm link <parent> <child>` / `swrm unlink <parent> <child>` | dependency links; linking demotes a runnable child to `todo` until parents finish |
|
|
185
|
+
| `swrm comment <id> "text"` | add a note to the card's history |
|
|
186
|
+
| `swrm rm <id>` / `swrm rm <status>` / `swrm rm --all` | archive one card, all cards in a status (`rm done`, `rm blocked`), or the whole board |
|
|
187
|
+
| `swrm prune [--dry-run]` | permanently delete archived cards, their links and their events |
|
|
188
|
+
| `swrm events [--task ID] [--limit N]` | dump the change feed |
|
|
189
|
+
| `swrm watch [--json] [--since N] [--interval S]` | stream the change feed live (Ctrl-C to stop) |
|
|
190
|
+
| `swrm serve [--host H] [--port P] [--passkey K]` | run the **leader server** (default 127.0.0.1:8765) so other PCs can connect via `KANBAN_URL`; `--passkey` requires followers to authenticate |
|
|
191
|
+
| all commands | `--url http://leader:8765` / `$KANBAN_URL` to run remotely; `--passkey` / `$KANBAN_PASSKEY` to authenticate |
|
|
192
|
+
|
|
193
|
+
## The swarmboard skill
|
|
194
|
+
|
|
195
|
+
`.vibe/skills/swarmboard/SKILL.md` is the orchestrator playbook for routing a
|
|
196
|
+
swarm through this board (load it as `/swarmboard`; adapted from the
|
|
197
|
+
`kanban-orchestrator` workflow): decomposition patterns, parent-gating,
|
|
198
|
+
anti-temptation rules ("route, don't execute"), and stuck-card recovery — all
|
|
199
|
+
expressed in `swrm` commands.
|
|
200
|
+
|
|
201
|
+
## Docs
|
|
202
|
+
|
|
203
|
+
Docs live at **[nergy101.github.io/swarmboard](https://nergy101.github.io/swarmboard/)** —
|
|
204
|
+
deployed automatically to GitHub Pages by `.github/workflows/docs.yml` on every
|
|
205
|
+
push to `main` that touches `docs/`. Sources are the Markdown files in `docs/src/`
|
|
206
|
+
(MkDocs + Material); the built static HTML is in `docs/site/` and can also be
|
|
207
|
+
served locally with any static file server:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
python3 -m http.server -d docs/site 8000 # or rebuild: python3 -m mkdocs build
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Development
|
|
214
|
+
|
|
215
|
+
Single file: `swrm` (Python 3 stdlib only). Schema: `tasks`, `links`
|
|
216
|
+
(parent→child), `events` (append-only audit feed). Brand assets in `assets/`:
|
|
217
|
+
`logo.svg` (hive mark on dark tile, used above), `logo-mark.svg` (mark only,
|
|
218
|
+
transparent), `logo-wordmark.svg` (mark + wordmark + tagline),
|
|
219
|
+
`favicon.svg` / `favicon.ico` (16–256 px).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "swarmboard"
|
|
7
|
+
description = "CLI-first kanban board for agent swarms: one board, a live change feed, and multiple agents at once."
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
keywords = ["kanban", "agents", "cli", "swarm", "todo"]
|
|
11
|
+
dynamic = ["version"]
|
|
12
|
+
|
|
13
|
+
[project.urls]
|
|
14
|
+
Homepage = "https://github.com/Nergy101/swarmboard"
|
|
15
|
+
Documentation = "https://nergy101.github.io/swarmboard/"
|
|
16
|
+
|
|
17
|
+
[project.scripts]
|
|
18
|
+
swrm = "swrm:main"
|
|
19
|
+
|
|
20
|
+
[tool.setuptools]
|
|
21
|
+
py-modules = ["swrm"]
|
|
22
|
+
|
|
23
|
+
[tool.setuptools.dynamic]
|
|
24
|
+
version = { attr = "swrm.__version__" }
|