hird 0.3.0

Cross-harness agent work queue and shared assertion memory, backed by one local SQLite database
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hird — usage guide</title>
<meta name="description" content="How to use hird: a shared work queue and shared assertion memory for AI coding agents across harnesses, backed by one local SQLite database.">
<link rel="stylesheet" href="style.css">
</head>
<body>

<button id="theme" type="button" aria-label="Toggle colour theme">theme</button>

<div class="shell">
<nav class="toc" aria-label="Contents">
  <a class="brand" href="#top">hird</a>
  <p class="tagline">One work queue and one memory, shared by every agent you run.</p>
  <details class="nav-body" open>
  <summary>Contents</summary>
  <ol>
    <li><a href="#install">Install</a></li>
    <li><a href="#dispatch">Dispatching work</a></li>
    <li class="sub"><a href="#by-hand">By hand, by number</a></li>
    <li class="sub"><a href="#work-the-queue">Letting agents pull</a></li>
    <li class="sub"><a href="#plan-files">The plan as a file</a></li>
    <li class="sub"><a href="#dispatch-hook">The dispatch hook</a></li>
    <li class="sub"><a href="#recess">The recess</a></li>
    <li><a href="#harnesses">Registering a harness</a></li>
    <li class="sub"><a href="#protocol">The protocol</a></li>
    <li><a href="#lifecycle">How a task moves</a></li>
    <li><a href="#dependencies">Dependencies</a></li>
    <li><a href="#capabilities">What a worker must have</a></li>
    <li><a href="#scope">File scope and collisions</a></li>
    <li><a href="#witness">What actually happened</a></li>
    <li class="sub"><a href="#footprint">Modified, or read-only</a></li>
    <li class="sub"><a href="#exhibit">The witness keeps what it saw</a></li>
    <li class="sub"><a href="#tenure">Every hand that held it</a></li>
    <li><a href="#split">Splitting a task</a></li>
    <li><a href="#review">No agent reviews its own work</a></li>
    <li><a href="#verdict">The review closes its own loop</a></li>
    <li><a href="#ground">The ground a task builds on</a></li>
    <li><a href="#memory">Memory</a></li>
    <li class="sub"><a href="#recall">Recall</a></li>
    <li class="sub"><a href="#footing">Footing: when a fact went stale</a></li>
    <li><a href="#cli">Command line</a></li>
    <li><a href="#tui">The TUI</a></li>
    <li><a href="#events">The board as a log</a></li>
    <li><a href="#web">Seeing the graph run</a></li>
    <li><a href="#mcp">MCP tools</a></li>
    <li><a href="#config">Configuration</a></li>
    <li><a href="#examples">Examples</a></li>
    <li><a href="#faq">FAQ</a></li>
  </ol>
  <div class="away">
    <a href="server.html">The central queue, running &rarr;</a>
    <a href="swarm.html">How a swarm collaborates &rarr;</a>
    <a href="factory.html">The software factory &rarr;</a>
    <a href="https://github.com/aoprisan/hird">Source on GitHub &rarr;</a>
    <a href="https://github.com/aoprisan/hird/tree/main/examples">Examples folder &rarr;</a>
    <a href="https://github.com/aoprisan/hird/blob/main/DESIGN.md">DESIGN.md &rarr;</a>
  </div>
  </details>
</nav>

<main id="top">

<header class="hero">
  <div class="badges">
    <span class="badge">one binary</span>
    <span class="badge">no daemon</span>
    <span class="badge">SQLite (WAL)</span>
    <span class="badge">MCP over stdio</span>
  </div>
  <h1>hird</h1>
  <p class="lede">
    You run Claude Code in one terminal, Codex CLI in another, maybe Copilot in
    your editor. They cannot see each other's work, and nothing either of them
    learns survives the session. <strong>hird</strong> is one local binary that
    gives them a shared queue and a shared memory, in one SQLite file, with a
    terminal UI over the top.
  </p>
  <div class="cta">
    <a class="primary" href="#install">Install</a>
    <a href="#by-hand">Dispatch a task by hand</a>
    <a href="https://github.com/aoprisan/hird">GitHub</a>
  </div>
</header>

<pre class="diagram" aria-label="Architecture diagram"><code>┌────────────┐  ┌────────────┐  ┌────────────┐
│ Claude Code│  │  Codex CLI │  │  Copilot   │
└─────┬──────┘  └─────┬──────┘  └─────┬──────┘
      │ stdio MCP     │ stdio MCP     │ stdio MCP
┌─────▼──────┐  ┌─────▼──────┐  ┌─────▼──────┐
│ hird mcp   │  │ hird mcp   │  │ hird mcp   │   one process per session
└─────┬──────┘  └─────┬──────┘  └─────┬──────┘
      └───────────────┼────────────────┘
                ┌─────▼──────┐        ┌──────────┐
                │  SQLite    │◄───────┤ hird tui │
                │  (WAL)     │◄───────┤ hird CLI │
                └────────────┘        └──────────┘</code></pre>

<section id="install">
<h2>Install</h2>

<pre><code>curl -fsSL https://raw.githubusercontent.com/aoprisan/hird/main/scripts/get.sh | sh</code></pre>

<p>
  No Rust toolchain: this downloads the
  <a href="https://github.com/aoprisan/hird/releases">release</a> binary for
  your platform (Linux x86_64/aarch64, macOS Apple&nbsp;silicon — the
  Linux ones are static musl builds that run on any distribution), verifies
  it against the release's checksum, and installs it as
  <code>~/.local/bin/hird</code>. Append <code>-s -- --install-skill</code>
  to the <code>sh</code> to also install the agent skill, and set
  <code>HIRD_VERSION=v0.2.2</code> to pin a release instead of taking the
  latest.
</p>

<p>
  With a Rust toolchain (1.88 or newer),
  <code>cargo install hird --locked</code> gets the same binary from
  crates.io, and from a checkout
  <code>./scripts/install.sh --install-skill</code> builds the release
  binary, copies that standalone snapshot to <code>~/.local/bin/hird</code>,
  then removes the release build artifacts; re-run it after upgrading the
  source.
</p>

<p>
  Whichever way it arrived, <code>--install-skill</code> installs the bundled
  portable skill for Codex and OpenCode (<code>~/.agents/skills/hird</code>),
  Claude Code (<code>~/.claude/skills/hird</code>), GitHub Copilot
  (<code>~/.copilot/skills/hird</code>), and the Gemini CLI
  (<code>~/.gemini/skills/hird</code>). It is optional, can be run
  separately (<code>hird --install-skill</code>), and new agent sessions
  should be started after installing it.
</p>

<p>
  SQLite is compiled in, so there is nothing else to install and nothing to
  configure before first use. The database is created on first write at
  <code>${XDG_DATA_HOME:-~/.local/share}/hird/hird.db</code>; ask for the
  exact path with <code>hird db-path</code>.
</p>
</section>

<section id="dispatch">
<h2>Dispatching work</h2>

<p>
  There are two ways to get work to an agent, and they are not exclusive — the
  same queue serves both, at the same time, and you can mix them task by task.
</p>

<div class="cols">
  <div class="card">
    <h4>By hand, by number</h4>
    <p>
      You file a task, then tell a specific agent <em>"pick up task 42"</em>. It
      calls <code>task_claim</code> on the number you said. You decide who works
      what and when.
    </p>
  </div>
  <div class="card">
    <h4>Letting agents pull</h4>
    <p>
      You file a plan, then tell every agent <em>"work the queue"</em>. Each one
      calls <code>task_next</code> and is handed the most important task that is
      actually workable. Nobody assigns anything.
    </p>
  </div>
</div>

<div class="note">
  <span class="label">Manual dispatch is not going anywhere</span>
  <p>
    Self-service dispatch was added alongside manual dispatch, not in place of
    it. Nothing in hird ever pushes work at an agent: <code>task_next</code> is
    a tool an agent chooses to call, so an agent you never tell to work the
    queue will sit idle until you name a number. Naming a number still works
    exactly as it did — including for tasks that were filed as part of a
    dependency graph.
  </p>
</div>

<h3 id="by-hand">By hand, by number</h3>

<p>File the task from the shell (or with <kbd>a</kbd> in the TUI):</p>

<pre><code><span class="k">hird</span> add <span class="s">"Port the config loader to serde"</span> \
        --body <span class="s">"Keep the env-var precedence. Tests in tests/config.rs must pass."</span>
<span class="c"># → 1</span>

<span class="k">hird</span> ls
<span class="c"># #1  open         Port the config loader to serde</span></code></pre>

<p>
  <code>hird add</code> prints the task number and nothing else, so it composes:
  <code>seq=$(hird add "…")</code>. Then, in any
  <a href="#harnesses">registered harness</a>, say:
</p>

<blockquote>pick up task 1</blockquote>

<p>
  The agent calls <code>task_claim</code> with <code>seq: 1</code>, gets the full
  body back, works it, and calls <code>task_complete</code>. Watch it happen with
  <code>hird tui</code>, or read the history afterwards with
  <code>hird show 1</code>.
</p>

<p>
  A claim is atomic. If you hand the same number to two agents, exactly one wins
  and the loser gets a sentence it can repeat to you verbatim:
</p>

<pre><code><span class="w">task 42 is claimed by codex:9f2c until 2026-07-25T14:32:00.000Z</span></code></pre>

<p>
  A claim on a task whose dependencies are unfinished is refused for that reason
  instead — see <a href="#dependencies">Dependencies</a>. Those are the only two
  ways a claim by number fails.
</p>

<h3 id="work-the-queue">Letting agents pull</h3>

<p>
  Naming a number works, but it does not scale past one agent. Give the queue a
  plan instead, and let the agents take it apart themselves.
</p>

<pre><code><span class="k">hird</span> add <span class="s">"Design the storage schema"</span>     --path <span class="s">'src/db.rs'</span>
<span class="k">hird</span> add <span class="s">"Port the repository layer"</span>     --path <span class="s">'src/repo/**'</span> --needs 1
<span class="k">hird</span> add <span class="s">"Rewrite the renderer"</span>          --path <span class="s">'src/tui/**'</span></code></pre>

<p>
  Now open three harnesses and tell each one the same thing:
  <strong>"work the queue"</strong>. Each agent calls <code>task_next</code>, and
  the queue hands out the most important task that is <em>actually workable</em>
  — open, with every dependency finished, and whose files nobody else is inside.
  Tasks 1 and 3 go out immediately, in parallel. Task 2 waits, because the schema
  is not done yet.
</p>

<pre><code>$ <span class="k">hird</span> graph
wave 1  (workable now)
  #1    in_progress  Design the storage schema
  #3    claimed      Rewrite the renderer
wave 2  (after wave 1)
  #2    open         Port the repository layer      waits for #1</code></pre>

<p>
  Agents keep calling <code>task_next</code> as they finish, until it comes back
  with nothing to do — and it says why it is idle: everything done, everything
  blocked, or everything left overlapping live work.
</p>

<h3 id="plan-files">The plan as a file</h3>

<p>
  Three <code>hird add</code> calls are fine. A plan worth reviewing before you
  point three agents at it is worth writing down, and a plan you will edit is
  worth being able to run twice.
</p>

<pre><code><span class="c"># plan.toml</span>
plan = <span class="s">"serde-migration"</span>

[[task]]
name = <span class="s">"schema"</span>
title = <span class="s">"Design the storage schema"</span>
priority = 3
paths = [<span class="s">"src/db.rs"</span>]

[[task]]
name = <span class="s">"repos"</span>
title = <span class="s">"Port the repository layer"</span>
paths = [<span class="s">"src/repo/**"</span>]
needs = [<span class="s">"schema"</span>]</code></pre>

<pre><code><span class="k">hird</span> plan apply plan.toml --dry-run   <span class="c"># read it first</span>
<span class="k">hird</span> plan apply plan.toml             <span class="c"># file the whole graph in one transaction</span></code></pre>

<p>
  Tasks carry names instead of numbers, so the file means the same thing in a
  fresh database as in one holding two hundred tasks, and it can live in the
  repository beside the code it describes. Each task is remembered under the
  name it was filed with, so applying an edited plan files only what the file
  has gained — the tasks already in flight keep their claims, their history and
  their numbers. Either the whole graph lands or none of it does.
</p>

<p>
  What a plan may say is exactly what a task row can hold: a title, a body, a
  priority, the files it expects to touch, the tasks it waits for. There are no
  conditionals, no loops and no retries, and that is not an omission to be
  filled in later — <code>hird</code> hands work out because an agent asked for
  it, and a file that could say <em>when</em> to run something would be
  describing a scheduler this queue deliberately does not have.
</p>

<p>
  <strong><code>--dry-run</code> is the reason the file earns its place.</strong>
  It lays the plan out in the waves <code>hird graph</code> will print, and then
  tells you the thing the queue could not have told you until the work was
  already live:
</p>

<pre><code>$ <span class="k">hird</span> plan apply plan.toml --dry-run
plan "serde-migration" — 5 tasks, 3 waves, at most 3 at once

wave 1  (workable now)
  new   schema         Design the storage schema
      files  src/db.rs
  new   renderer       Rewrite the renderer
      files  src/tui/**
  new   audit          Audit the renderer tests
      files  src/tui/view.rs
…

<span class="w">same files, nothing ordering them — the queue hands these out one at a time,
so the waves above are wider than the work really is
  renderer and audit — src/tui/** overlaps src/tui/view.rs

declaring no files: notes
  the queue cannot keep another agent out of what these touch, and what
  earlier work learned reaches them by title alone</span>

nothing was written; drop --dry-run to file it</code></pre>

<p>
  Two globs can be intersected before either file exists, so a pair that
  <em>looks</em> parallel and will in fact be handed out one at a time is
  knowable while the plan is still a file. Wave 1 above says three; the work
  says two and a queue.
</p>

<p>
  Filing a plan is a human act, which is why there is no MCP tool for it: the
  review is the point, and an agent that could apply its own plan unread would
  have removed the only step this feature exists for. An agent that finds its
  task is really three jobs has <a href="#split"><code>task_split</code></a>
  instead. The annotated format is
  <a href="https://github.com/aoprisan/hird/blob/main/examples/plan.toml">examples/plan.toml</a>.
</p>

<h3 id="dispatch-hook">The dispatch hook: the one push in a pull design</h3>

<p>
  Everything above is pull, and one seam is left by hand: a task that becomes
  workable while every agent is idle sits on the board, correct and silent,
  until you notice and go find an agent to point at it. The
  <code>dispatch_hook</code> config key closes that seam without a daemon.
  Name a command and hird runs it — detached, through <code>sh -c</code> — at
  the moment a task becomes claimable, with the announcement in its
  environment:
</p>

<pre><code><span class="c"># ${XDG_CONFIG_HOME:-~/.config}/hird/config.toml</span>
dispatch_hook = <span class="s">'herdr agent prompt worker "hird task $HIRD_TASK is ready; work the hird queue."'</span></code></pre>

<div class="table-wrap">
<table>
  <thead><tr><th>Variable</th><th>Meaning</th></tr></thead>
  <tbody>
    <tr><td><code>HIRD_EVENT</code></td><td>Why the task is claimable: <code>filed</code>, <code>unblocked</code>, <code>review_filed</code>, <code>sent_back</code>, <code>reopened</code>, <code>released</code>, <code>answered</code>, <code>lease_expired</code> or <code>resumed</code> — the last one meaning it waited behind a <a href="#recess">recess</a> you have just lifted.</td></tr>
    <tr><td><code>HIRD_TASK</code></td><td>The task number.</td></tr>
    <tr><td><code>HIRD_TITLE</code></td><td>Its title.</td></tr>
    <tr><td><code>HIRD_PROJECT</code></td><td>Its project root.</td></tr>
    <tr><td><code>HIRD_RECUSED</code></td><td>Harnesses the queue will refuse this task to, comma-separated; empty for tasks anybody may take. A filed review names whoever did the work under review.</td></tr>
    <tr><td><code>HIRD_DB</code></td><td>The database, so the hook's own <code>hird</code> calls read the same board.</td></tr>
  </tbody>
</table>
</div>

<p>
  hird neither waits for the command nor reads its answer — a broken hook
  cannot slow a claim or fail a completion — and the announcement is read back
  from the committed board, so a task another agent grabbed in the meantime is
  never announced. What the command does is your business: append to a log,
  post a notification, or — the case it was built for — summon an idle agent
  through a terminal multiplexer that can address one, such as
  <a href="https://herdr.dev">herdr</a>. Under herdr, the hook above turns the
  whole loop autonomous: a plan is filed and its first wave prompts agents to
  pull; a finish frees dependents and prompts for them; a completion files its
  <a href="#review">review</a> and prompts a <em>different</em> harness to read
  it; a <a href="#verdict">sent-back verdict</a> reopens the work and prompts
  for the redo — with you watching the TUI instead of carrying prompts between
  terminals.
</p>

<p>
  One announcement in that loop is not for just anybody, and the hook is told
  so. A hook that always prompts the same agent will, sooner or later, summon
  it to a <a href="#review">review</a> of its own work — which the queue then
  refuses, and the review sits silent again: the very seam the hook exists to
  close, reopened for exactly the tasks where the second pair of eyes matters.
  <code>HIRD_RECUSED</code> carries the fact only hird knows — which harness
  the claim would turn away — so one line of shell routes the summons. Commas
  cannot appear in a harness name, making the membership test safe:
</p>

<pre><code>dispatch_hook = <span class="s">'''
worker=claude; case ",$HIRD_RECUSED," in *,claude-code,*) worker=codex;; esac
herdr agent prompt "$worker" "hird task $HIRD_TASK is ready; work the hird queue."
'''</span></code></pre>

<p>
  Because hird only runs when somebody calls it, an announcement happens when
  the becoming-claimable is observed — which for every cause except
  <code>lease_expired</code> is the same write that causes it. Expiry is
  <a href="#lifecycle">enforced lazily by sweeps</a>, and every queue call —
  every MCP tool, every CLI verb — sweeps before its real work and announces
  what came back to the pool, so a dead agent's task is heard about by the
  next call any other agent (or you) makes.
  <a href="https://github.com/aoprisan/hird/blob/main/examples/dispatch-hook.sh">examples/dispatch-hook.sh</a>
  shows every announcement landing, no multiplexer required.
</p>

<p>
  Questions have the same seam on the other side of the table, and the
  <code>question_hook</code> key closes it the same way. A task
  <a href="#lifecycle">released with a question</a> steps out of dispatch on
  purpose — it is waiting for a human, not another agent, so the dispatch hook
  stays deliberately quiet — but a human who is not watching the board waits
  in the same silence an idle agent did. Name a command and hird runs it,
  detached, the moment a question gate opens, with <code>HIRD_TASK</code>,
  <code>HIRD_TITLE</code>, <code>HIRD_PROJECT</code>,
  <code>HIRD_QUESTION</code>, <code>HIRD_ASKED_BY</code> and
  <code>HIRD_DB</code> in its environment (<code>HIRD_EVENT</code> is always
  <code>asked</code>, so one script can serve both hooks and branch on the
  same vocabulary). Point it at whatever reaches you:
</p>

<pre><code>question_hook = <span class="s">'notify-send "hird task $HIRD_TASK asks" "$HIRD_QUESTION"'</span></code></pre>

<p>
  Answering stays a human act — <code>hird answer</code> or the TUI — and the
  moment you do, the dispatch hook announces the task back to the agents as
  <code>answered</code>. The two hooks together close the loop's last manual
  mile in both directions: agents are woken when work appears, and you are
  woken when work needs you.
</p>

<p>
  Under herdr, the whole pairing also ships packaged as a
  <a href="https://github.com/aoprisan/hird/tree/main/herdr-plugin">herdr plugin</a>:
  <code>herdr plugin install aoprisan/hird/herdr-plugin</code> wires the hook
  for you, keeps the worker roster in a config file instead of a shell
  one-liner, falls through to the next worker when an agent is gone, and puts
  the <a href="#tui">board</a> in an overlay pane.
</p>

<p>
  The roster is an order you wrote once, and it cannot know that this task is
  a sprawling refactor and that one a rename. hird will not choose for you —
  it knows what a task <em>requires</em> and what a caller
  <em>advertises</em>, but it has no roster and picks nobody. Fit is a
  judgement, and judgements live in the hook: give the plugin a
  <a href="https://crates.io/crates/jev-repl"><code>jev</code></a> page and
  every announcement asks which harness suits the work, and that harness gets
  first refusal. It is a preference and never a permission — the named
  harness still has to be unrecused, equipped and free, the ordinary walk
  follows immediately after, and anything that goes wrong along the way
  leaves the order you wrote exactly as it was.
</p>

<p>
  And it is asked only about the agents the task may actually go to. Recusal
  and required capabilities are applied to the page's labels before the call,
  not only to the answer afterwards, so a choice never spends its confidence
  on a harness the queue has already ruled out — and when they leave fewer
  than two harnesses in the running there is nothing to decide and no call is
  made at all. Which knob is which matters here: what an agent's environment
  has is a <em>capability</em>, enforced, and what an agent is better at
  belongs in the page's descriptions, where being wrong costs one summons.
</p>

<h3 id="recess">The recess: standing the queue down</h3>

<p>
  All of the above makes the queue live all the time: <code>task_next</code>
  answers whoever asks, and with a hook wired, a task that becomes claimable
  summons a worker within the second. The moment you need the tree to
  yourself — a rebase, a merge landing, a plan you have stopped believing
  in — there was no way to say so short of killing sessions or unwiring the
  hook. Now there is one:
</p>

<pre><code><span class="k">hird</span> recess <span class="s">"rebasing main"</span>
<span class="c"># queue for /home/you/app in recess ("rebasing main")
#   nothing new is handed out; work already claimed continues
#   hird resume lifts it</span></code></pre>

<p>
  A recess stands one project's queue down. Named claims and
  <code>task_next</code> alike are refused, carrying your reason, and the
  dispatch hook stays quiet — a summons to a stood-down queue would send an
  agent straight into a refusal. Work already claimed is untouched: leases
  run, check-ins land, completions finish, because a recess stops the
  hand-out, not the work. An agent asking for work is told the difference
  out loud — <em>in recess, not idle</em> — so it stands by instead of
  retrying, and <code>hird ls</code>, <code>hird graph</code>,
  <code>hird show --why</code> and the TUI's status bar all wear the recess while it
  stands.
</p>

<pre><code><span class="k">hird</span> resume
<span class="c"># recess lifted for /home/you/app — claims resume</span></code></pre>

<p>
  Lifting it announces everything that became claimable while the queue stood
  down — each task reaching the dispatch hook as
  <code>HIRD_EVENT=resumed</code> — so the backlog summons hands the moment
  you are ready for them, and not a moment before. Calling and lifting a
  recess are human acts, like <a href="#plan-files">filing a plan</a>, so
  there is no MCP tool for either; a recess ends when you say so, never at a
  time.
</p>
</section>

<section id="harnesses">
<h2>Registering a harness</h2>

<p>
  Each harness runs its own <code>hird mcp</code> process over stdio. The only
  thing they need to differ on is <code>HIRD_HARNESS</code>, which is how agents
  and the board tell each other apart (<code>claude-code:af31</code>,
  <code>codex:9f2c</code>). Leave it unset and the agent shows up as
  <code>unknown</code>.
</p>

<p>
  <code>hird register</code> writes that for you, into the one file the harness
  in question actually reads:
</p>

<pre><code><span class="k">hird</span> register claude-code    <span class="c"># ./.mcp.json</span>
<span class="k">hird</span> register codex          <span class="c"># ~/.codex/config.toml</span>
<span class="k">hird</span> register copilot        <span class="c"># ./.vscode/mcp.json — Copilot in VS Code</span>
<span class="k">hird</span> register copilot-cli    <span class="c"># ~/.copilot/mcp-config.json</span>
<span class="k">hird</span> register gemini         <span class="c"># ./.gemini/settings.json</span>
<span class="k">hird</span> register opencode       <span class="c"># ~/.config/opencode/opencode.json</span></code></pre>

<pre><code><span class="w">registered hird in /home/you/project/.vscode/mcp.json
  command  /home/you/.cargo/bin/hird mcp
  env      HIRD_HARNESS=copilot
next: in VS Code: MCP: List Servers → hird → Start Server, then tick hird in
      the agent-mode tools picker</span></code></pre>

<p>
  The <code>command</code> it writes is the absolute path of the binary doing
  the writing, because that is the thing hand-written configs get wrong: a bare
  <code>hird</code> resolves against the harness's <code>PATH</code>, and a GUI
  editor's is not your shell's.
</p>

<p>
  Register as many harnesses as you run — that is the point — and run it again
  whenever you move the binary. Registering twice changes nothing and says so.
  An entry you have since edited by hand is refused rather than overwritten,
  with <code>--force</code> to say you meant it. <code>--print</code> writes
  nothing and shows what it would have written, for a config this cannot safely
  edit — one with comments in it, or a harness hird has never heard of.
</p>

<p>
  A second registration on a scratch database, alongside the real one:
</p>

<pre><code><span class="k">hird</span> register codex --name hird-scratch --db /tmp/scratch/hird.db</code></pre>

<p>
  <code>--capability</code> records what the registered session can satisfy —
  a browser, network access, an operating system — as
  <code>HIRD_CAPABILITIES</code> in the same entry, which is how
  <a href="#capabilities">work that requires them</a> finds the right hands.
</p>

<h3>What it writes</h3>

<h4>Claude Code</h4>
<span class="filename">./.mcp.json</span>
<p>
  Project-scoped, so it belongs to the checkout rather than to you.
  <code>claude mcp add hird -e HIRD_HARNESS=claude-code -- hird mcp</code> is
  the user-wide equivalent.
</p>

<h4>Codex CLI</h4>
<span class="filename">~/.codex/config.toml</span>
<pre><code>[mcp_servers.hird]
command = <span class="s">"/home/you/.cargo/bin/hird"</span>
args = [<span class="s">"mcp"</span>]
env = { HIRD_HARNESS = <span class="s">"codex"</span> }</code></pre>
<p>
  Appended, with the comments already in the file left alone.
</p>

<h4>Copilot in VS Code</h4>
<span class="filename">.vscode/mcp.json</span>
<pre><code>{
  <span class="s">"servers"</span>: {
    <span class="s">"hird"</span>: {
      <span class="s">"type"</span>: <span class="s">"stdio"</span>,
      <span class="s">"command"</span>: <span class="s">"/home/you/.cargo/bin/hird"</span>,
      <span class="s">"args"</span>: [<span class="s">"mcp"</span>],
      <span class="s">"env"</span>: { <span class="s">"HIRD_HARNESS"</span>: <span class="s">"copilot"</span> }
    }
  }
}</code></pre>

<p>
  Writing this does not start it: <strong>MCP: List Servers</strong> → <code>hird</code> →
  <strong>Start Server</strong>, and tick <code>hird</code> in the tools picker
  of the agent-mode chat box. VS Code does not launch a newly written server on
  its own, and a stopped or unticked server looks exactly like one that was
  never registered.
</p>

<h4>Copilot CLI</h4>
<span class="filename">~/.copilot/mcp-config.json</span>
<pre><code>{
  <span class="s">"mcpServers"</span>: {
    <span class="s">"hird"</span>: {
      <span class="s">"type"</span>: <span class="s">"local"</span>,
      <span class="s">"command"</span>: <span class="s">"/home/you/.cargo/bin/hird"</span>,
      <span class="s">"args"</span>: [<span class="s">"mcp"</span>],
      <span class="s">"env"</span>: { <span class="s">"HIRD_HARNESS"</span>: <span class="s">"copilot"</span> },
      <span class="s">"tools"</span>: [<span class="s">"*"</span>]
    }
  }
}</code></pre>

<p>
  <code>/mcp add</code> inside a session writes the same file.
</p>

<h4>Gemini CLI</h4>
<span class="filename">.gemini/settings.json</span>
<pre><code>{
  <span class="s">"mcpServers"</span>: {
    <span class="s">"hird"</span>: {
      <span class="s">"command"</span>: <span class="s">"/home/you/.cargo/bin/hird"</span>,
      <span class="s">"args"</span>: [<span class="s">"mcp"</span>],
      <span class="s">"env"</span>: { <span class="s">"HIRD_HARNESS"</span>: <span class="s">"gemini"</span> }
    }
  }
}</code></pre>

<p>
  Project-scoped, the same scope <code>gemini mcp add</code> defaults to, and
  there is no <code>type</code> to get wrong: the Gemini CLI reads a
  <code>command</code> as stdio.
  <code>gemini mcp add -e HIRD_HARNESS=gemini hird hird mcp</code> writes the
  same entry — with the bare <code>hird</code> this command exists to avoid —
  and its <code>--scope user</code> writes
  <code>~/.gemini/settings.json</code> instead, which every project reads and
  the project file merges over. The CLI tolerates comments in
  <code>settings.json</code> and no JSON parser does, so a commented file is
  left untouched and <code>--print</code> renders the block to merge by hand. Restart the Gemini CLI after registering, and
  <code>gemini mcp list</code> confirms the connection.
</p>

<h4>OpenCode</h4>
<span class="filename">${XDG_CONFIG_HOME:-~/.config}/opencode/opencode.json</span>
<pre><code>{
  <span class="s">"mcp"</span>: {
    <span class="s">"hird"</span>: {
      <span class="s">"type"</span>: <span class="s">"local"</span>,
      <span class="s">"command"</span>: [<span class="s">"/home/you/.cargo/bin/hird"</span>, <span class="s">"mcp"</span>],
      <span class="s">"environment"</span>: { <span class="s">"HIRD_HARNESS"</span>: <span class="s">"opencode"</span> }
    }
  }
}</code></pre>

<p>
  If <code>opencode.jsonc</code> already exists and
  <code>opencode.json</code> does not, hird uses the JSONC path. A file
  containing comments is left untouched; <code>--print</code> renders the
  block to merge by hand. Restart OpenCode after registering, and
  <code>opencode mcp list</code> confirms the connection.
</p>

<p>
  Any other MCP-capable harness works the same way: run <code>hird mcp</code>
  over stdio and set <code>HIRD_HARNESS</code> to something recognisable.
  <code>hird register copilot --print</code> is a reasonable starting point for
  one hird has no entry for. Whichever way it is registered, the server states
  the queue's rules when the harness first asks — claim before working, heartbeat
  before the lease runs out, declare your files, write down what you learn — so
  agents generally behave without being coached in your prompt.
</p>

<h3 id="protocol">The protocol</h3>

<p>
  <code>hird mcp</code> speaks MCP <strong>2026-07-28</strong>, and every
  earlier revision back to 2024-11-05. Which one a session uses is the harness’s
  choice, not something to configure — hird answers whichever it is asked
  for, and says so by name when asked for one it does not have.
</p>

<p>
  2026-07-28 removes the <code>initialize</code> handshake: a client opens with
  <code>server/discover</code>, or simply with the request it wanted to make,
  and carries the protocol version, its own name and its capabilities in
  <code>_meta</code> on every one. Nothing hird does depended on that handshake
  — it is one process per session over a pipe, which is about as
  stateless as a session gets — so a harness on the new lifecycle and one
  still handshaking share a queue without noticing each other’s era. The
  one visible difference is that a request claiming 2026-07-28 without carrying
  what 2026-07-28 requires is refused as a bad request, in a sentence naming
  what was missing, rather than served on a guess about who sent it.
</p>

<p>
  The revision also means a client now names itself on every call, which hird
  uses for exactly one thing: <strong>a harness that never set
  <code>HIRD_HARNESS</code> is filed under the name its client gives, instead of
  <code>unknown</code></strong>. <code>HIRD_HARNESS</code> still wins wherever
  it is set — it is the half of the identity you control, and
  <code>hird register</code> writes it — and the name is taken once and
  then held for the life of the session, because an actor that changed its name
  halfway through would lose track of its own claims.
</p>

<p>
  What hird has never used, and does not start using now, are the three
  features this revision deprecates: no roots, no sampling, no protocol
  logging.
</p>

<h3>When the agent says it has no hird tools</h3>

<p>
  A skill, a prompt file or a <code>copilot-instructions.md</code> that talks
  about <code>task_claim</code> is not a connection. It tells an agent what to
  do with the tools; it cannot hand it any. Registering the server is a
  separate step, and it is the one above. If the agent reports no
  <code>task_*</code> tools, work down this list.
</p>

<p>
  <strong>Is the server registered where that harness reads?</strong> Each
  registration above belongs to exactly one harness. Copilot in VS Code does
  not read <code>~/.copilot/mcp-config.json</code>, and the Copilot CLI does
  not read <code>.vscode/mcp.json</code>. <code>hird register &lt;harness&gt;</code>
  picks the file for you; run it again and it will say
  <code>already registered</code> against the path it went to.
</p>

<p>
  <strong>Can the harness spawn <code>hird</code>?</strong>
  <code>command: "hird"</code> resolves against the harness's <code>PATH</code>,
  not your shell's. A GUI VS Code launched from Finder or a dock has neither
  <code>~/.cargo/bin</code> nor anything else your shell profile adds, so the
  spawn fails and the server dies before the handshake. This is what
  <code>hird register</code> exists to get right; in a config written by hand,
  paste the absolute path instead:
</p>

<pre><code><span class="k">which</span> hird     <span class="c"># → /Users/you/.cargo/bin/hird</span></code></pre>

<p>
  <strong>What did the server say?</strong> Every harness keeps the stdio
  server's output. In VS Code it is <strong>MCP: List Servers</strong> →
  <code>hird</code> → <strong>Show Output</strong>; in Claude Code,
  <code>claude mcp list</code>. A <code>hird</code> that starts prints nothing
  and waits, so an empty log is the healthy case and
  <code>command not found</code> is the usual one.
</p>

<p>
  <strong>Is it the cloud coding agent?</strong> The Copilot coding agent on
  github.com runs in an ephemeral container with no access to your machine.
  hird is a local queue in a local SQLite file, so there is nothing there for
  it to connect to — register hird in an editor or CLI that runs on the same
  machine as the database (<code>hird db-path</code>). What such a session
  <em>can</em> be given is the brief: <code>hird show &lt;seq&gt; --brief</code>
  renders everything a claim would hand an agent as Markdown, to paste where
  the queue does not reach.
</p>

<p>
  Confirm the binary works at all before blaming the wiring: <code>hird ls</code>
  from a terminal exercises the same database over the same code the server
  does.
</p>
</section>

<section id="lifecycle">
<h2>How a task moves</h2>

<pre class="diagram"><code>open ──claim──► claimed ──start──► in_progress ──complete──► done
  ▲                │                    │        └─fail────► failed
  │                └── lease expiry ────┘
  │                └──── release ───────┘
  └──────── reopen (human) ◄── done|failed|cancelled
open ──cancel (human)──► cancelled</code></pre>

<p>
  <strong>Claiming is atomic.</strong> It is a single compare-and-set, so if two
  agents reach for the same task at the same moment exactly one wins.
</p>

<p>
  <strong>Claims are leases, not locks.</strong> A claim lasts 15 minutes by
  default and every <code>task_update</code> renews it. If an agent crashes,
  gets killed, or simply wanders off, the lease lapses and the task returns to
  <code>open</code> on its own — no stuck tasks, no manual cleanup, no
  background process. Expiry is enforced lazily by whoever reads the table next,
  which is usually the TUI half a second later.
</p>

<p>
  <strong>Only the lease holder can drive a task.</strong> Another agent cannot
  complete, fail, or update work it does not hold. You, however, can always
  <code>cancel</code> or <code>reopen</code> anything from the CLI or the TUI.
</p>

<p>
  <strong>An agent that cannot finish hands the task back.</strong>
  <code>task_release</code> returns it to <code>open</code> immediately, which is
  not the same as <code>failed</code> — a failure is a verdict on the task and
  waits for you to reopen it, a release just says this agent stopped.
</p>

<p>
  <strong>An agent that needs your answer stops the churn.</strong> A
  <code>task_release</code> carrying <code>question</code> returns the task to
  <code>open</code> but keeps it out of claims and <code>task_next</code> until
  you run <code>hird answer &lt;seq&gt; &lt;answer&gt;</code> or press
  <kbd>A</kbd> on its card. The answer makes it claimable, announces
  <code>HIRD_EVENT=answered</code>, and rides in the next claim beside the
  question. Releasing without a question remains an immediate handoff.
</p>

<p>
  No agent is summoned to it: a question is the one stall no agent can clear,
  so the dispatch hook stays silent rather than waking somebody who would
  only hand it around again. On the board, <code>hird ls</code> marks the
  row, <code>hird show</code> prints the command that answers it, and the TUI
  counts them in its status bar (<code>· 2 awaiting you</code>) — and if
  noticing should not have to wait for a glance, the
  <a href="#dispatch-hook"><code>question_hook</code></a> config key runs a
  command of yours the moment the question is raised, with the question in
  its environment.
</p>
</section>

<section id="dependencies">
<h2>Dependencies</h2>

<p>
  Dependencies are enforced, not annotated. A task whose dependencies are
  unfinished cannot be claimed at all — by number or by
  <code>task_next</code> — and the refusal says what to do about it:
</p>

<pre><code><span class="w">task 2 is blocked by task 1 (Design the storage schema, in_progress);
it becomes claimable once every dependency is done</span></code></pre>

<p>
  Only <code>done</code> clears a blocker. A failed dependency keeps its
  dependents off the ready list, because the work they were waiting for did not
  happen.
</p>

<pre><code><span class="c"># at filing time</span>
<span class="k">hird</span> add <span class="s">"Write the release notes"</span> --needs 1,2

<span class="c"># or afterwards</span>
<span class="k">hird</span> dep add 3 --needs 1,2
<span class="k">hird</span> dep rm  3 --needs 2

<span class="c"># see the whole plan as dispatch waves</span>
<span class="k">hird</span> graph</code></pre>

<p>
  <code>hird graph</code> prints waves rather than edges, because that is the
  shape you actually want: how much of this can run at once, and what the
  critical path is.
</p>
</section>

<section id="capabilities">
<h2>Work knows what its worker must have</h2>

<p>
  Harnesses are not interchangeable. One may have a browser, another network
  access or deployment credentials, and a third may be the only session
  running on macOS. Put those hard constraints on the work instead of
  discovering them after the wrong agent takes a lease:
</p>

<pre><code><span class="k">hird</span> add <span class="s">"Verify the responsive UI"</span> --path <span class="s">'frontend/**'</span> --requires browser
<span class="k">hird</span> register codex --capability network
<span class="k">hird</span> register claude-code --capability browser --capability network</code></pre>

<p>
  The registration writes <code>HIRD_CAPABILITIES</code>; labels are lowercase
  free-form tokens such as <code>browser</code>, <code>network</code>,
  <code>macos</code> or <code>deploy.staging</code>. A named claim from an
  unequipped session is refused before it writes anything:
</p>

<pre><code><span class="w">task 7 requires browser, but this session advertises network; start a capable
harness or update HIRD_CAPABILITIES</span></code></pre>

<p>
  <code>task_next</code> routes around the mismatch and reports skipped tasks
  under <code>incompatible</code>, alongside blocked, contended and recused
  work. This does not make hird an agent router: the queue knows what the task
  requires and what this caller advertises, but it has no roster and chooses
  nobody. The <a href="#dispatch-hook">dispatch hook</a> receives the same
  requirements as <code>HIRD_REQUIRES</code> and remains the place that maps
  labels to workers. Reviews inherit the work's requirements, because checking
  browser-only work generally requires a browser too; use
  <code>hird require &lt;seq&gt; --clear</code> when a particular review only
  needs its diff.
</p>
</section>

<section id="scope">
<h2>File scope and collisions</h2>

<p>
  The queue also knows which files each task expects to touch, so it can see the
  one failure mode a status machine cannot: two agents editing the same file
  from two harnesses, one of them about to lose their work.
</p>

<p>
  Declarations are globs, not files, because nothing has been written yet — and
  overlap is decided by asking whether <em>any path at all</em> is described by
  both patterns. <code>src/*.rs</code> and <code>src/lib*</code> collide before
  <code>src/lib.rs</code> exists.
</p>

<pre><code>$ <span class="k">hird</span> agents
codex:9f2c        #4 in_progress  Port the config loader        11m left
    files  src/config.rs, tests/config.rs
claude-code:af31  #7 claimed      Rewrite the loader tests      14m left
    files  tests/**
    <span class="w">!!     tests/** also claimed by codex:9f2c on #4</span></code></pre>

<p>The agents see it too, the moment they say what they are about to change:</p>

<pre><code>{ <span class="s">"seq"</span>: 7, <span class="s">"paths"</span>: [<span class="s">"tests/**"</span>],
  <span class="s">"overlaps"</span>: [<span class="s">"tests/** overlaps tests/config.rs on task 4 (Port the config loader), held by codex:9f2c"</span>],
  <span class="s">"advice"</span>: <span class="s">"tell the human about the overlap before editing those files, …"</span> }</code></pre>

<p>
  By default <code>task_next</code> simply does not hand out work that would
  collide — with several tasks to choose from there is no reason to pick the one
  that clashes. A claim <em>by number</em> is still allowed to overlap, and only
  reports it, on the theory that you named that task on purpose. Set
  <code>path_conflicts = "refuse"</code> to make an overlapping claim fail
  outright instead.
</p>

<p>
  Scope can be set at filing time with <code>--path</code>, adjusted later with
  <code>hird scope</code>, or declared by the agent itself through
  <code>task_scope</code> once it knows where it is going.
</p>
</section>

<section id="witness">
<h2>What actually happened</h2>

<p>
  Everything above is what an agent <em>said</em>. A task's status is its
  holder's claim about itself, its file scope is its holder's prediction, and
  its result is a sentence the holder wrote about its own work. That is fine
  right up until three agents share one checkout, where the failure that costs
  you work is the one nobody reports.
</p>

<p>
  Play the collision out to the end. Two agents declare
  <code>src/config.rs</code>. Both are told about the overlap. Both decide their
  part is small. Both edit. The second write lands on the first, both tasks
  complete, the board goes green — and git has nothing to show you, because
  nothing was committed and there is only ever one version of the file on disk.
  Not one of the three participants is in a position to notice.
</p>

<p>
  So <code>hird</code> goes and looks. A claim fingerprints the repository,
  every check-in takes another fingerprint and subtracts, and the results say
  what moved:
</p>

<pre><code>{ <span class="s">"seq"</span>: 1, <span class="s">"status"</span>: <span class="s">"in_progress"</span>, <span class="s">"note_recorded"</span>: <span class="s">"loader ported"</span>,
  <span class="s">"changed"</span>: [<span class="s">"src/config.rs (modified)"</span>, <span class="s">"src/mcp.rs (added)"</span>] }</code></pre>

<p>That list did not come from the agent. It came off the disk.</p>

<h3 id="contention">The overlap that has stopped being hypothetical</h3>

<p>
  What the working tree cannot tell you is <em>who</em> — one filesystem, no
  keyboards — and <code>hird</code> does not pretend it can. What it has instead
  is the other half of the picture, which it was already collecting: a declared
  scope is an agent saying it holds a copy of a file and means to write from it.
</p>

<blockquote>
  A <strong>contention</strong> is a file two live agents both declared, which
  has since moved under both of them, and which the two of them disagree about.
</blockquote>

<p>
  All three clauses earn their place. Both declaring is the attribution the
  filesystem cannot supply. Having moved is what makes it an event rather than a
  forecast — the plain overlap is already on the board. Disagreeing is what
  makes it worth interrupting an agent over: two agents who have both been shown
  the current file are not in trouble yet, and warning them anyway is how a
  warning stops being read.
</p>

<p>When all three hold, both sides hear about it on their next call, by name:</p>

<pre><code>{ <span class="s">"contended"</span>: [<span class="s">"src/config.rs changed under task 2 (Audit the config loader), held by
     claude-code:af31 at 14:36 UTC, at or after the version hird last confirmed
     for you — re-read it before you write, or your edit will discard theirs"</span>],
  <span class="s">"advice"</span>: <span class="s">"a file you declared has changed under another agent that declared
             it too — re-read it before your next write, and tell the human"</span> }</code></pre>

<p>
  Re-reading the file is the whole fix, and it is the one thing neither agent
  would have thought to do.
</p>

<h3 id="drift">Drift</h3>

<p>
  An agent that wanders outside what it declared is told so, because everyone
  else's collision check is reading the declaration and not the edits:
</p>

<pre><code>{ <span class="s">"undeclared"</span>: [<span class="s">"src/mcp.rs"</span>],
  <span class="s">"advice"</span>: <span class="s">"src/mcp.rs moved while you held this task and nobody has declared
             it. If the edit was yours, call task_scope so the other agents can
             see it; if it was not, another agent is working outside what it
             declared"</span> }</code></pre>

<p>
  The conditional is deliberate. Alone in a project, a file that moved moved
  because of you. With another agent live, <code>hird</code> watched the file
  and not the keyboard, and it says so rather than guessing.
</p>

<h3 id="footprint">Did it change anything, or did it only read?</h3>

<p>
  The same fingerprints answer a blunter question, and it is the one you ask
  first when a task comes back done: did this work touch the code at all?
</p>

<pre><code>$ <span class="k">hird</span> ls
#1  done         Port the config loader   modified 2 files
#2  done         Audit the config loader  read-only
#3  in_progress  Write the release notes  [codex:9f2c] 11m left  read-only so far</code></pre>

<p>
  An investigation that changed nothing and a refactor that rewrote half the
  module are the same green card otherwise, and the difference decides whether
  there is anything to review, anything to test, or anything to undo.
</p>

<p>Three answers, and the third one matters as much as the other two:</p>

<ul>
  <li>
    <code>modified N files</code> — the tree differs from the fingerprint taken
    when the task was claimed. Where another agent was live in one of those
    files, the line says so, because one checkout has no keyboards.
  </li>
  <li>
    <code>read-only</code> — <code>hird</code> was watching, and nothing moved.
    On a task still being worked it reads <code>read-only so far</code>: a
    running total, not a verdict.
  </li>
  <li>
    nothing at all — <code>hird</code> was not watching, so it has no opinion.
    Saying <em>read-only</em> here would be inventing evidence, and the whole
    point of the witness is that it does not.
  </li>
</ul>

<p>
  Agents are told the same thing in the same words, on every check-in and on the
  call that finishes the work:
</p>

<pre><code>{ <span class="s">"seq"</span>: 2, <span class="s">"status"</span>: <span class="s">"done"</span>, <span class="s">"result"</span>: <span class="s">"read it; the precedence is already right"</span>,
  <span class="s">"footprint"</span>: <span class="s">"read-only — nothing in the working tree moved while it was held"</span> }</code></pre>

<h3 id="witness-board">On the board</h3>

<pre><code>$ <span class="k">hird</span> agents
codex:9f2c        #1 in_progress  Port the config loader        11m left
    files  src/config.rs
    moved  src/config.rs, src/mcp.rs
    <span class="w">!!     src/config.rs also claimed by claude-code:af31 on #2</span>
    <span class="w">!!!    src/config.rs changed under task 2 (Audit the config loader), held by
           claude-code:af31 at 14:36 UTC … re-read it before you write</span></code></pre>

<p>
  <code>files</code> is what was announced; <code>moved</code> is what happened
  — or <code>moved&nbsp;&nbsp;nothing yet</code> where an agent has been in the
  code and written none of it — and the gap between the two lines is the point.
  <code>hird show</code> carries the same record, headed by the one-line answer:
</p>

<pre><code>$ <span class="k">hird</span> show 1
…
changed   modified 2 files, though another agent was live in some of them
          src/config.rs (modified)
          src/mcp.rs (added)</code></pre>

<p>
  That is the evidence behind a finished task's result line, and it was not
  written by the agent that wrote it. The TUI's Swarm screen shows both, and
  titles the pane with how many agents are standing in a file that is moving
  under them; the queue board badges every card with what it did to the tree.
</p>

<h3 id="exhibit">The witness keeps what it saw</h3>

<p>
  Detection is half an answer. The witness could tell you
  <code>src/config.rs</code> moved under task 1; it could not show you the
  change, and when a second agent's write landed on the first's uncommitted
  work it could name the loss but not undo it. So every file version the
  witness fingerprints is also <strong>kept</strong> — content-addressed,
  deduplicated, in the same SQLite file as everything else — and three things
  read it back.
</p>

<pre><code>$ <span class="k">hird</span> diff 1
diff --git a/src/config.rs b/src/config.rs
--- a/src/config.rs
+++ b/src/config.rs
@@ -1 +1 @@
-fn load() {}
+fn load() { ported() }</code></pre>

<p>
  That is the uncommitted diff of what actually moved under task 1 — while the
  work is live, after it is done, and after the tree has moved on to something
  else. Git remembers what was committed; the exhibit remembers what happened
  between commits, which is where agents live. <code>--path</code> narrows it
  to one file.
</p>

<p>
  The <a href="#review">review</a> a completion files is the second reader:
  its brief now carries the diff of the work under judgement, clipped to a
  size a context window can afford and pointing at <code>hird diff</code> for
  the rest — so the reviewing agent reads the change itself rather than
  reconstructing it from a list of file names.
</p>

<pre><code>$ <span class="k">hird</span> salvage 1 src/config.rs --out recovered.rs
salvaged src/config.rs as the witness last saw it under the task — 24 bytes into recovered.rs</code></pre>

<p>
  And <code>salvage</code> is the third: the last version the witness saw of a
  file under a task, which is exactly the version another agent's write landed
  on in the collision the witness was built to catch. <code>--baseline</code>
  asks instead for the version the task started from. The name is the honest
  limit — a version that came and went between two observations was never
  seen, and hird will say a version is not kept rather than guess at one.
</p>

<p>
  Kept versions are pruned once nothing references them and they have aged
  out, so the store grows with what actually changed, not with time.
  <code>exhibit = false</code> keeps the watching and gives up the keeping.
</p>

<h3 id="tenure">A task remembers every hand that held it</h3>

<p>
  An agent claims a task, edits two files, and dies — session killed, laptop
  closed, context burned out. The lease lapses and the task goes back in the
  pool. Whoever picks it up next starts on a working tree carrying a vanished
  agent's uncommitted edits, looking exactly like code that was always there.
</p>

<p>
  So the record survives the task changing hands. When a lease expires
  mid-work, work is released, or a review sends it back, the next claim
  archives the previous holding as a <em>tenure</em> — who held it, how it
  ended, what moved — instead of overwriting it, and the successor's claim
  answer carries <code>previously</code>: whose uncommitted leavings are in
  the tree it starts from, and which files to re-read before building on or
  over them.
</p>

<pre><code>{ <span class="s">"claimed"</span>: 7,
  <span class="s">"previously"</span>: <span class="s">"codex:9f2c went quiet until the lease expired, and these files moved
    while they held it: src/config.rs (modified), src/loader.rs (added). Whatever state
    they left is part of the tree this claim starts from — `hird diff 7 --tenure 1`
    shows that round's changes before you build on or over them"</span> }</code></pre>

<p>
  <code>hird show</code> numbers the rounds (<code>held  round 1: codex:9f2c —
  lease expired; saw src/config.rs (modified)</code>), and <code>hird diff
  --tenure N</code> and <code>hird salvage --tenure N</code> keep every earlier
  round readable and recoverable after the redo has written over all of it. A
  review that sends work back gets the same benefit for free: the redo no
  longer erases the evidence of the round the reviewer judged.
</p>

<h3 id="witness-cost">It is never in the way</h3>

<p>
  Watching needs git, and a project without it is not a degraded project — every
  tool answers exactly as it did before, and agents are not told about a field
  nothing will ever fill. A sweep that fails costs a report nobody asked for,
  never the call that was actually made. <code>.gitignore</code> decides what
  counts as noise, so build output is free. And with no task in the project
  holding a lease there is nobody to measure, so git is not run at all.
</p>

<p>
  Measured on hird's own repository: about 8&nbsp;ms for a claim and 6&nbsp;ms
  for a check-in, against 0.5&nbsp;ms for a call that never looks — three git
  subprocesses, against a heartbeat measured in minutes.
  <code>witness = false</code> turns it off.
</p>
</section>

<section id="split">
<h2>Splitting a task</h2>

<p>
  An agent that finds its task is really three jobs does not have to do them in
  sequence, or hand the problem back to you:
</p>

<pre><code>task_split { seq: 1, subtasks: [
  { title: <span class="s">"Write the migration"</span>,   paths: [<span class="s">"src/db.rs"</span>] },
  { title: <span class="s">"Port the repositories"</span>, paths: [<span class="s">"src/repo/**"</span>] },
] }</code></pre>

<p>
  The pieces are filed as real tasks. Task 1 starts waiting for both and goes
  back in the pool — blocked, so nobody can claim it early — and the agent that
  split it is free to pick up something else. The other harnesses take a piece
  each, in parallel, and task 1 becomes workable again the moment they are both
  done. Pass <code>sequential: true</code> when the pieces genuinely have to
  happen in order.
</p>
</section>

<section id="review">
<h2>No agent reviews its own work</h2>

<p>
  Every result line in the queue was written by the agent that did the work. It
  is the last word, and nobody else ever looks. With one agent that is not a
  choice. With three it is a waste of the only thing that makes running three
  worth doing.
</p>

<p>
  Every harness can review code already. None of them can tell <em>whose</em>
  code it is looking at — a harness cannot see another harness's session, and an
  agent handed "review this" has no way to know it wrote the thing an hour ago.
  hird can: it is the process all of them talk to, and it wrote down who held
  the lease.
</p>

<pre><code><span class="k">hird</span> add <span class="s">"Port the config loader"</span> --review --path src/config.rs</code></pre>

<p>
  That is the whole opt-in, and it says nothing about who or when. Codex claims
  it, works it, and finishes the way it always does:
</p>

<pre><code>task_complete { seq: 1, result: <span class="s">"ported; env still wins over the file"</span> }

{ <span class="s">"seq"</span>: 1, <span class="s">"status"</span>: <span class="s">"done"</span>, <span class="s">"changed"</span>: [<span class="s">"src/config.rs (modified)"</span>],
  <span class="s">"review_filed"</span>: 2,
  <span class="s">"advice"</span>: <span class="s">"this work was marked for review, so task 2 is now open for an agent
             in another harness — you cannot take it yourself. Tell the human."</span> }</code></pre>

<p>
  Task 2 was filed by the completion. It is titled after the work, scoped to the
  file the <a href="#witness">witness</a> saw move rather than the one anybody
  declared, and its body carries codex's own summary marked as the thing under
  review rather than as the brief. Then:
</p>

<pre><code>task_next {}                       <span class="c"># asked by codex</span>

{ <span class="s">"idle"</span>: <span class="s">"1 task is ready, but every one of them is a review of work this
           harness did — they need an agent in another harness. Tell the human;
           waiting will not change it"</span>,
  <span class="s">"recused"</span>: [{ <span class="s">"seq"</span>: 2, <span class="s">"why"</span>: <span class="s">"not whoever worked task 1 (Port the config
                loader): that was codex:43em, so this needs another harness"</span> }] }</code></pre>

<p>
  Not "nothing to do". The queue is not idle — it is waiting for a different
  tool, and an agent told the queue was empty would send you away from the one
  thing that needs you. Claiming it by name is refused too, in the same
  transaction as the compare-and-set, so there is no race to win.
</p>

<p>
  <strong>The bar is the harness, not the session.</strong> Two Claude Code
  windows are one model reading its own homework; a bar you could get around by
  opening a tab would be no bar at all.
</p>

<p>
  <strong>It is a constraint, not a scheduler.</strong> A recusal says who may
  <em>not</em> take a task and never who must. Run one harness and the review
  simply sits there unclaimable — which the board says plainly, because that is
  a fact about your setup rather than something to paper over.
</p>

<p>You can set the bar by hand, and lift it:</p>

<pre><code><span class="k">hird</span> recuse 7 --from 4 --reason <span class="s">"wrote the thing being checked"</span>
<span class="k">hird</span> recuse 7 --clear</code></pre>

<p>
  And a <a href="#plan-files">plan file</a> is where the judgement belongs,
  since which work deserves a second pair of eyes is a property of the job:
</p>

<pre><code>[[task]]
name = <span class="s">"renderer"</span>
title = <span class="s">"Rewrite the renderer"</span>
paths = [<span class="s">"src/tui/**"</span>]
review = <span class="s">true</span></code></pre>

<p>
  Nothing is filed for work the witness saw no trace of, for work that
  <code>failed</code> — there is nothing to check, and whether the attempt is
  worth reading is your call — or while an earlier review of the same work is
  still open.
</p>
</section>

<section id="verdict">
<h2>The review closes its own loop</h2>

<p>
  Getting the work in front of a second harness is half the job. The other half
  used to be yours: read the review, decide "the error path drops the lock"
  means <em>broken</em>, find the task it reviewed, reopen it, paste the
  findings somewhere. Every other hand-off in hird files itself; the one
  carrying the judgment was left by hand.
</p>

<p>
  So a review ends in a <strong>verdict</strong>, and completing one without it
  is refused — the refusal says what the two verdicts are and what each will
  do:
</p>

<pre><code>task_complete { <span class="s">"seq"</span>: 2, <span class="s">"result"</span>: <span class="s">"the file path still wins when both are
                set; invert the precedence in load()"</span>,
                <span class="s">"verdict"</span>: <span class="s">"sent_back"</span> }

{ <span class="s">"seq"</span>: 2, <span class="s">"status"</span>: <span class="s">"done"</span>,
  <span class="s">"verdicts"</span>: [<span class="s">"task 1 sent back — open again with your findings appended to
                its brief"</span>],
  <span class="s">"advice"</span>: <span class="s">"the work you sent back is open again carrying your findings; any
             agent — its author included — may pick it up, and completing it
             will file a fresh review. Tell the human the verdict."</span> }</code></pre>

<p>
  <code>sent_back</code> acts in the same transaction as the completion: the
  judged work reopens with the findings appended to its brief, so the next
  agent to claim it — its author included — is handed exactly what must change
  without knowing to ask. The work still carries its review flag, so finishing
  it again files a fresh review, recused the same way, and the loop runs round
  after round until a review says <code>upheld</code>. Upholding is a
  signature: the card now reads <em>done, and seen to be done</em> by a harness
  that provably did not do the work.
</p>

<p>
  You keep the last word you always had. A <code>sent_back</code> that lands on
  work you already reopened or cancelled goes on the record and moves nothing —
  the queue never overrules a human. You just stop being the loop's courier.
</p>

<p>
  And because every verdict is delivered on the record — who judged, whose
  work, which round — the queue accumulates the one measurement it is uniquely
  placed to take:
</p>

<pre><code><span class="k">$ hird</span> record
as worker       judged  upheld  sent back  first pass
claude-code          3       3          0        2/2
codex                2       1          1        0/1

as reviewer     upheld  sent back
claude-code          1          1
codex                3          0</code></pre>

<p>
  That is whose work survives a reading by a different model, per harness, off
  delivered verdicts and nothing else. It is a report, not a scheduler: nothing
  routes work by it — the moment the queue started steering tasks toward
  whoever scores well, agents would be graded by a table they can see, and the
  table would stop measuring anything. What to do about a harness that ships
  rework stays your call, made over a table instead of a hunch.
</p>
</section>

<section id="ground">
<h2>The ground a task builds on</h2>

<p>
  A dependency edge means one task needs what another produces — "the API
  waits for the schema" is about <em>knowing the schema</em>, not just
  outliving it. So the edge is a context channel, not only a gate: claiming a
  task hands over each finished dependency's own result, written by whoever
  finished it, without the claimant knowing to ask.
</p>

<pre><code>task_claim { <span class="s">"seq"</span>: 2 }

{ <span class="s">"claimed"</span>: 2, ...
  <span class="s">"built_on"</span>: [{ <span class="s">"seq"</span>: 1, <span class="s">"title"</span>: <span class="s">"Design the storage schema"</span>,
                 <span class="s">"result"</span>: <span class="s">"schema in src/db.rs; migrations are an array,
                            version = index + 1"</span>,
                 <span class="s">"standing"</span>: <span class="s">"done"</span> }] }</code></pre>

<p>
  <code>standing</code> says how far that word can be trusted, the same move
  memory's footing makes for facts: <code>done</code>, <code>upheld</code> —
  read and signed for by a harness that provably did not write it — or
  <code>under review 5, provisional</code>, which means the review has not
  delivered its verdict and a <code>sent_back</code> could still reopen that
  work.
</p>

<p>
  Provisional matters because verdicts made <code>done</code> revocable. A
  dependent claimed while its blocker's review is still open is building on an
  answer that can be taken back — and when that happens, the queue is the only
  participant positioned to notice. Now it does something about it, twice
  over: the reopened work's live dependents get a <code>ground_shifted</code>
  event on their trails in the same transaction as the verdict, and each
  holder hears at its next check-in, ahead of everything else the reply could
  say:
</p>

<pre><code>task_update { <span class="s">"seq"</span>: 2, <span class="s">"note"</span>: <span class="s">"wiring the loader in"</span> }

{ ...,
  <span class="s">"ground_shifted"</span>: [<span class="s">"task 1 (Design the storage schema), which this task
      builds on, was sent back by review 5 and reopened; re-read it — the
      findings are in its brief — before building further on its work"</span>] }</code></pre>

<p>
  The same sentence catches ground lost any other way — a blocker you reopened
  or cancelled, or one that failed since — attributed no further than its
  status can back. Nothing interrupts an agent mid-edit: hird tells, at the
  next moment it is listening, and lets it decide — the same manners the
  witness has.
</p>

<p>
  Whether provisional ground should <em>hold</em> dependents back is a policy,
  not a rule: <code>under_review = "clears"</code> (the default) makes them
  workable at once and tells them what they stand on; <code>"holds"</code>
  keeps them unclaimable until the verdict, for work whose later stages cost
  more than the wait. Under <code>holds</code> the refusal and the board both
  say what the wait actually is — <code>waits for #1 (done, under review
  5)</code> — and <code>task_next</code> reports held tasks in their own
  bucket, because "finished but for a verdict" points you at a review to
  chase, not at work to do. On every board, a <code>done</code> card with an
  open review wears <code>under review #5</code> until the verdict lands: the
  difference between <em>done</em> and <em>done, so far as anyone has
  checked</em>.
</p>
</section>

<section id="memory">
<h2>Memory</h2>

<p>
  The queue is for work; memory is for what the work taught you. Agents call
  <code>mem_store</code> with one plain-prose fact — where something lives, why a
  decision went the way it did, which command actually works — and
  <code>mem_search</code> finds it later, from any harness, in any session.
</p>

<p>
  Every assertion carries provenance: who asserted it, when, and which task they
  were working at the time. Facts are never edited or deleted; a fact that stops
  being true is <em>superseded</em> by a new one, and the old version stays
  searchable behind <code>--include-superseded</code>.
</p>

<pre><code><span class="k">hird</span> mem add <span class="s">"Integration tests need HIRD_DB set or they touch the real db"</span> --tags testing
<span class="k">hird</span> mem search testing</code></pre>

<p>
  Search is SQLite FTS5. If a query is not valid FTS syntax — an agent typing
  <code>handle_event(ctx)</code> — it degrades to a term-wise substring match
  instead of erroring.
</p>

<h3 id="recall">Recall: the task arrives knowing things</h3>

<p>
  <code>mem_search</code> only helps an agent that thinks to search, and an agent
  that has just been handed a task does not yet know what it does not know. The
  queue does. It knows which files the task expects to touch, and it knows what
  earlier agents recorded while working those same files — so a claim comes back
  with those facts already attached.
</p>

<pre><code>task_claim { seq: 7, paths: [<span class="s">"src/*.rs"</span>] }

{ <span class="s">"claimed"</span>: 7, <span class="s">"title"</span>: <span class="s">"Audit the loader"</span>,
  <span class="s">"recalled"</span>: [
    { <span class="s">"content"</span>: <span class="s">"the loader reads HIRD_DB before the config file"</span>,
      <span class="s">"why"</span>: <span class="s">"learned on task 4 (Port the config loader), working src/config.rs"</span>,
      <span class="s">"actor"</span>: <span class="s">"codex:9f2c"</span>, <span class="s">"task_seq"</span>: 4 } ],
  <span class="s">"reminder"</span>: <span class="s">"read `recalled` first — earlier agents left those notes …"</span> }</code></pre>

<p>
  Nobody searched, and the two tasks never mention each other: overlap is decided
  by the same exact pattern intersection the collision detector uses, so an
  assertion recorded on <code>src/config.rs</code> reaches a task that declared
  <code>src/*.rs</code>. Declaring your paths early is what makes this work,
  which is the second reason to do it.
</p>

<p>
  Territory is not only what was declared, though. The
  <a href="#witness">witness</a> knows which files actually moved under a task,
  and those count on both sides — which matters because declaring a scope is
  exactly the step an agent in a hurry skips. An agent that said nothing and
  went ahead and edited <code>src/config.rs</code> still leaves the file behind
  it, and what it learned still reaches whoever comes next.
</p>

<p>Three things make a fact relevant, strongest first:</p>

<div class="table-wrap">
<table>
  <thead><tr><th>Because</th><th>The <code>why</code> line reads</th></tr></thead>
  <tbody>
    <tr><td>it was recorded on this task, on an earlier pass</td><td><code>recorded while working this task earlier</code></td></tr>
    <tr><td>it was recorded on a task whose files overlap yours</td><td><code>learned on task 4 (…), working src/config.rs</code></td></tr>
    <tr><td>it reads like your title</td><td><code>mentions "config", "loader"</code></td></tr>
  </tbody>
</table>
</div>

<p>
  Every recalled fact says where it came from, because an assertion is a claim
  and not gospel: an agent that finds one is wrong should
  <code>mem_store</code> the truth, which supersedes it and stops it being
  recalled again. Nothing is stored for recall — it is derived at read time from
  the assertion trail and the declared scopes, so there is no index to rebuild
  and no migration to run.
</p>

<p>
  <code>task_get</code> carries the same list without claiming anything, and
  <code>hird show &lt;seq&gt; --recall</code> shows a human exactly what their agents are
  being told. Five facts ride along by default; set
  <code>recall_limit = 0</code> to switch it off entirely.
</p>

<h3 id="footing">Footing: a fact knows what it was learned against</h3>

<p>
  A memory that only grows eventually lies to you. Not by filling up with
  falsehoods — you would notice those — but by filling up with sentences that
  <em>were</em> true. A fact recorded in March about a file that has been
  rewritten twice since arrives in July in exactly the same voice as one
  recorded this morning, and nothing about reading it tells you which is which.
</p>

<p>
  The sentence cannot tell you. The code can. So hird records what an assertion
  was read off — the files behind it, and the content hash each one had at the
  time — and every later reader is told whether that ground has moved.
</p>

<pre><code>$ <span class="k">hird</span> mem standing
firm      the loader reads HIRD_DB before the config file
    01J…  codex:9f2c  2h ago
    src/config.rs
shaky     the renderer redraws on every poll
    01J…  claude-code:af31  3d ago
    src/tui/view.rs
    src/tui/view.rs has changed since this was recorded — re-read before relying on it

2 anchored: 1 firm, 1 shaky</code></pre>

<p>
  Nobody curated that, and nobody told hird that <code>src/tui/view.rs</code>
  had changed. The fact remembers which file it came from and what that file
  said, and the file no longer says it.
</p>

<p>
  The same word rides along everywhere a fact is served — <code>mem_search</code>
  results, the memory browser, and the <code>recalled</code> list a claim arrives
  with, which is the one that matters most because it lands in an agent's
  context unasked:
</p>

<pre><code><span class="s">"recalled"</span>: [
  { <span class="s">"content"</span>: <span class="s">"the renderer redraws on every poll"</span>,
    <span class="s">"why"</span>: <span class="s">"learned on task 4 (Fix the renderer), working src/tui/view.rs"</span>,
    <span class="s">"standing"</span>: <span class="s">"shaky"</span>,
    <span class="s">"caution"</span>: <span class="s">"src/tui/view.rs has changed since this was recorded — re-read before relying on it"</span> } ]</code></pre>

<p>
  <strong>It never says a fact is false.</strong> A rename, a formatting pass and
  a total rewrite look identical from here. <code>shaky</code> means
  <em>unverified</em>, which is a weaker claim and a far more useful one: it is
  exactly the set of facts where opening the file pays for itself.
  <code>orphaned</code> — every file it was about is gone — is the strongest
  thing hird will say, and it still stops short of a verdict.
</p>

<p>
  Where the files come from needs nothing from the agent. A fact stored with
  <code>task_seq</code> is anchored to the literal paths that task declared plus
  everything the <a href="#witness">witness</a> saw it move;
  <code>mem_store { paths: […] }</code> names them outright for a fact that
  belongs to no task. A fact with neither stays unanchored, and hird says
  nothing about it rather than guessing.
</p>

<h4>Saying it again is how you say you checked</h4>

<p>
  An agent that re-reads a shaky fact and finds it still true has one way to say
  so, and should not need to know any more than that: say the fact again.
</p>

<pre><code>$ <span class="k">hird</span> mem add <span class="s">"the renderer redraws on every poll"</span> --path src/tui/view.rs
01J…
  already on record — affirmed, not duplicated and re-anchored</code></pre>

<p>
  No second row, no lost provenance. The original is re-anchored to today's code
  and you are recorded as another voice for it. That kills duplicate assertions —
  the oldest complaint about memory stores — and buys something else on the way
  past: hird counts <em>voices</em>, not sentences, so it can say the thing no
  single harness is positioned to say.
</p>

<pre><code>also stated by codex:9f2c, independently across 2 harnesses</code></pre>

<p>
  Two agents that cannot see each other's sessions arrived at the same fact.
  Only the process both of them talk to can know that.
</p>

<h4>Why it stays quiet</h4>

<p>
  A task that records a fact and then keeps editing the same file would, left
  alone, mark its own fact shaky by its own hand. Finishing a task
  <strong>settles</strong> what it learned against the tree it is leaving behind,
  so <code>shaky</code> keeps meaning <em>somebody else moved this</em> — which
  is the only reading worth a warning, and a warning that fires on everything is
  a warning nobody reads.
</p>

<p>
  It rides on the same working-tree access as the witness and is off wherever
  that is: no git, or <code>memory_footing = false</code>, and memory behaves
  exactly as it did before any of this existed — no anchors, no
  <code>standing</code> field, and the handshake does not mention it.
</p>
</section>

<section id="cli">
<h2>Command line</h2>

<pre><code>hird add &lt;title&gt; [--body &lt;md&gt;|--body-file &lt;path&gt;] [--priority N] [--project &lt;path&gt;]
                 [--needs &lt;seq&gt;,…] [--path &lt;glob&gt;]… [--requires &lt;capability&gt;]… [--review]
hird ls [--status &lt;status&gt; | --at &lt;when&gt;] [--all-projects]
hird show &lt;seq&gt; [--why | --recall [--limit N] | --brief]
hird show &lt;path&gt;
hird diff &lt;seq&gt; [--path &lt;file&gt;] [--tenure N]
hird salvage &lt;seq&gt; &lt;path&gt; [--baseline] [--tenure N] [--out &lt;file&gt; [--force]]
hird cancel &lt;seq&gt; [--reason &lt;text&gt;]
hird reopen &lt;seq&gt; [--reason &lt;text&gt;]
hird answer &lt;seq&gt; &lt;answer&gt;
hird recess [reason] [--project &lt;path&gt;]
hird resume [--project &lt;path&gt;]
hird dep add &lt;seq&gt; --needs &lt;seq&gt;,…
hird dep rm  &lt;seq&gt; --needs &lt;seq&gt;,…
hird plan apply &lt;file&gt; [--dry-run] [--project &lt;path&gt;]
hird plan lint &lt;file&gt; [--project &lt;path&gt;]
hird plan export [--plan &lt;name&gt;] [--name &lt;name&gt;] [--all] [--project &lt;path&gt;]
hird graph [--all-projects] [--plan &lt;name&gt;] [--dot | --mermaid | --json]
hird scope &lt;seq&gt; [--path &lt;glob&gt;]… [--clear]
hird require &lt;seq&gt; [--capability &lt;name&gt;]… [--clear]
hird agents [--record [--by harness|person]] [--all-projects]
hird recuse &lt;seq&gt; --from &lt;seq&gt;,… [--reason &lt;text&gt;] | --clear
hird events [--follow] [--json] [--kind &lt;kind&gt;,…] [--task &lt;seq&gt;] [--actor &lt;name&gt;]
            [--limit N] [--all-projects]
hird events --digest [--since &lt;when&gt;] [--peek] [--all-projects]
hird mem add &lt;content&gt; [--tags a,b] [--task &lt;seq&gt;] [--path &lt;file&gt;]…
hird mem search [query] [--limit N] [--all-projects] [--include-superseded]
hird mem standing [--shaky] [--all-projects]
hird mem export [--path &lt;glob&gt;] [--firm]
hird tui
hird web [--port N] [--bind &lt;addr&gt;] [--all-projects]
hird mcp
hird register &lt;claude-code|codex|copilot|copilot-cli|gemini|opencode&gt; [--name &lt;name&gt;]
              [--capability &lt;name&gt;]… [--print] [--force]
hird db-path</code></pre>

<div class="table-wrap">
<table>
  <thead><tr><th>Command</th><th>What it is for</th></tr></thead>
  <tbody>
    <tr><td><code>add</code></td><td>File a task. Prints the number, which is how you and the agents refer to it.</td></tr>
    <tr><td><code>ls</code></td><td>The queue as rows: status, holder, lease countdown, what it waits for, and whether it <a href="#footprint">changed anything</a>. <code>--at 2h</code> (or an instant, prefixes fine) folds the trail back into the board as it stood at that moment instead.</td></tr>
    <tr><td><code>show</code></td><td>One task in full — body, dependencies, scope, history, what was learned on it, and what the working tree says it did. Three flags ask it one narrower question: <code>--why</code>, whether it is claimable right now and, if not, every gate in the way in the order dispatch checks them; <code>--recall</code>, what earlier work learned that an agent is handed when it claims it; <code>--brief</code>, the claim brief as Markdown for a session that cannot reach the queue. Given a path instead of a number, <code>show</code> answers for a file: which tasks declared it, whose hands the witness saw in it, and what the memory says about it.</td></tr>
    <tr><td><code>diff</code></td><td>The uncommitted diff of what moved under a task, from the versions the <a href="#exhibit">witness kept</a> — even after the task is done and the tree has moved on. <code>--tenure N</code> reads an archived round instead, after the task has changed hands.</td></tr>
    <tr><td><code>salvage</code></td><td>Recover a version of a file as it stood under a task: the last one the witness saw, or with <code>--baseline</code> the one the task started from. <code>--tenure N</code> reaches an earlier holding's record.</td></tr>
    <tr><td><code>cancel</code> / <code>reopen</code></td><td>Human overrides. They work regardless of who holds the task.</td></tr>
    <tr><td><code>answer</code></td><td>Resolve the question holding an open task out of dispatch; the answer is handed to its next claimant.</td></tr>
    <tr><td><code>recess</code> / <code>resume</code></td><td>Stand this project's queue down and lift it again — <a href="#recess">the recess</a>. While it stands nothing is handed out and the dispatch hook is quiet; work already claimed continues. Resuming announces everything that waited.</td></tr>
    <tr><td><code>dep</code></td><td>Add or remove "must wait for" edges after the fact.</td></tr>
    <tr><td><code>plan</code></td><td>File a whole graph from a <a href="#plan-files">plan file</a>, in one transaction. <code>--dry-run</code> reads it out — waves, overlaps and all — and writes nothing. <code>lint</code> reads the same file for the trouble it can carry while still filing cleanly: unordered tasks on the same files, tasks the collision radar cannot see, reviews that will never be filed or that nobody present could claim. <code>export</code> is the round trip: the board written back out as the TOML <code>apply</code> reads, unfinished tasks by default and everything with <code>--all</code>, tasks keeping the names their plan gave them.</td></tr>
    <tr><td><code>graph</code></td><td>The plan as dispatch waves: workable now, and what each later wave waits for. <code>--dot</code> and <code>--mermaid</code> draw it; <code>--json</code> is the board as one object, for anything that draws it; <code>--plan</code> narrows any of them to one plan's tasks.</td></tr>
    <tr><td><code>scope</code></td><td>Show or set the files a task is expected to touch. Warns about overlaps.</td></tr>
    <tr><td><code>require</code></td><td>Show or set the <a href="#capabilities">capabilities</a> a task's worker must have. Supplying any replaces the set; <code>--clear</code> empties it, which a review only needing its diff sometimes wants.</td></tr>
    <tr><td><code>agents</code></td><td>Who is working what, what has moved under each of them, and a <code>!!</code> line wherever two agents are in the same files. <code>--record</code> reads each harness's track record under <a href="#verdict">review</a> instead: work upheld, work sent back, first-pass rate, and the verdicts it has handed out.</td></tr>
    <tr><td><code>events</code></td><td>The append-only trail read across tasks, oldest first — <a href="#events">the board as a log</a>. <code>--follow</code> keeps reading; <code>--json</code> makes each line one object. <code>--digest</code> folds what happened since you last looked into news, moving a bookmark so the next one starts where this ended.</td></tr>
    <tr><td><code>mem</code></td><td>Record and search assertions. <code>export</code> writes the project's current facts as Markdown for a CLAUDE.md or AGENTS.md — footing-aware, so a fact whose ground has been rewritten goes out marked for a re-read.</td></tr>
    <tr><td><code>tui</code></td><td>The live board.</td></tr>
    <tr><td><code>web</code></td><td>The live board as a picture in a browser — <a href="#web">the graph, running</a>. Loopback, read-only, gone when the terminal is.</td></tr>
    <tr><td><code>mcp</code></td><td>Serve MCP on stdio. Harnesses run this, you generally do not.</td></tr>
    <tr><td><code>register</code></td><td>Write the MCP registration into <a href="#harnesses">the one file a harness reads</a>, with the binary's absolute path. <code>--capability</code> records what that session can satisfy; <code>--print</code> shows the entry without writing it.</td></tr>
    <tr><td><code>db-path</code></td><td>Print the database path this invocation would use.</td></tr>
  </tbody>
</table>
</div>

<p>
  <code>--body-file -</code> reads the task body from stdin, and
  <code>hird plan apply -</code> reads a whole plan from it, so either can be
  piped straight into the queue. <code>ls</code>, <code>show</code>,
  <code>agents</code> and <code>events</code> sweep the working tree as they
  render, so all four report what has actually moved alongside what was
  declared — and say plainly when the answer is <em>nothing</em>. Every CLI action is recorded with
  <code>actor = "cli"</code>, so the history pane shows who did what.
</p>
</section>

<section id="tui">
<h2>The TUI</h2>

<pre><code><span class="k">hird</span> tui</code></pre>

<p>
  Four screens, <kbd>Tab</kbd> between them (<kbd>Shift-Tab</kbd> goes back).
  The board polls every 500&nbsp;ms, so claims from other harnesses appear as
  they happen.
</p>

<p>
  The <strong>Swarm</strong> screen is the one to watch while several agents are
  running: every live agent, the files it has declared, an overlap line in red
  wherever two of them are in the same territory, and — on the right — what is
  workable right now and how much is queued behind it.
</p>

<div class="cols">
<div class="card">
<h4>Anywhere</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>Tab</kbd></td><td>next screen (<kbd>Shift-Tab</kbd> for the previous)</td></tr>
<tr><td><kbd>p</kbd></td><td>toggle project filter (current / all)</td></tr>
<tr><td><kbd>/</kbd></td><td>filter or search</td></tr>
<tr><td><kbd>?</kbd></td><td>help</td></tr>
<tr><td><kbd>q</kbd></td><td>quit</td></tr>
</tbody></table></div>
</div>

<div class="card">
<h4>Queue board</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>j</kbd> <kbd>k</kbd></td><td>move down / up</td></tr>
<tr><td><kbd>h</kbd> <kbd>l</kbd></td><td>previous / next column</td></tr>
<tr><td><kbd>g</kbd> <kbd>G</kbd></td><td>first / last card</td></tr>
<tr><td><kbd>Enter</kbd></td><td>open the task and its history</td></tr>
<tr><td><kbd>a</kbd></td><td>add a task (<kbd>Tab</kbd> for the body, <kbd>Enter</kbd> to save)</td></tr>
<tr><td><kbd>A</kbd></td><td>answer the selected task's question</td></tr>
<tr><td><kbd>c</kbd> <kbd>r</kbd></td><td>cancel / reopen the selected task</td></tr>
</tbody></table></div>
</div>

<div class="card">
<h4>Memory browser</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>j</kbd> <kbd>k</kbd></td><td>move down / up</td></tr>
<tr><td><kbd>Enter</kbd></td><td>show the assertion and its provenance</td></tr>
<tr><td><kbd>d</kbd></td><td>supersede it with something truer</td></tr>
<tr><td><kbd>s</kbd></td><td>show or hide superseded assertions</td></tr>
<tr><td><kbd>f</kbd></td><td>only the facts whose files have moved since</td></tr>
</tbody></table></div>
</div>

<div class="card">
<h4>Swarm</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>j</kbd> <kbd>k</kbd></td><td>move between agents</td></tr>
<tr><td><kbd>Enter</kbd></td><td>open the task that agent is holding</td></tr>
</tbody></table></div>
</div>

<div class="card">
<h4>Graph</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>j</kbd> <kbd>k</kbd></td><td>move within a wave</td></tr>
<tr><td><kbd>h</kbd> <kbd>l</kbd></td><td>previous / next wave</td></tr>
<tr><td><kbd>Enter</kbd></td><td>open the selected task</td></tr>
</tbody></table></div>
</div>
</div>

<p>
  The <strong>Graph</strong> screen is the plan laid out the way the queue will
  run it: one column per dispatch wave, with the finished work live tasks still
  build on in a column of its own on the left. Each card says what it needs and
  what it feeds, and selecting one lights up its neighbours. Edges are said
  rather than drawn — a terminal is a poor medium for a dozen crossing arrows,
  which is what <a href="#web"><code>hird web</code></a> is for.
</p>

<p>
  Cards on the queue board carry a yellow <code>waits #1 #3</code> badge when a
  task looks open but nobody can actually claim it yet, an
  <code>awaits answer</code> badge when its holder needs a human decision, and a magenta
  <code>reviews #4</code> badge when a task is somebody's
  <a href="#review">review</a> — which decides who can take it, and is exactly
  the thing the title cannot tell you. <a href="#verdict">Verdicts</a> mark the
  cards they judged: a green <code>upheld</code> on done work a review signed
  off, a yellow <code>sent back</code> on work that is open again because one
  did not.
</p>
</section>

<section id="events">
<h2>The board as a log</h2>

<p>
  The TUI is a screen you sit at. <code>hird events</code> is the same view for
  everything that cannot sit at one — a second terminal, a tmux pane, a CI job,
  a script, or another agent:
</p>

<pre><code>$ <span class="k">hird</span> events --follow
14:31:52    #1  claimed        codex:9f2c        Port the config loader
14:32:07    #1  witnessed      codex:9f2c        saw src/config.rs change
14:33:41    #2  claimed        claude-code:af31  Audit the config loader
14:36:09    #1  completed      codex:9f2c        ported; env still wins over the file</code></pre>

<p>
  Nothing new is recorded to serve it. Every mutation in hird already lands one
  row in an append-only trail — <code>hird show</code> replays one task's slice
  of it as history — and this is the same trail read sideways: across tasks, in
  the order things happened. One shot prints the last 30 and stops.
  <code>--follow</code> keeps reading at the TUI's cadence, and sweeps expired
  leases and the working tree on the way, so an expiry or a
  <a href="#witness">witnessed</a> change lands in the feed even while no agent
  is calling and nobody has the board open. Stopping the tail costs nothing and
  forgets nothing, because the cursor is the trail itself.
</p>

<p>
  <code>--kind claimed,completed</code> narrows to the events you are waiting
  on, <code>--task 7</code> to one piece of work,
  <code>--actor codex:9f2c</code> to one agent's doings, and
  <code>--all-projects</code> widens to everything in the database. And because
  a feed for machines should not make them parse columns, <code>--json</code>
  makes each line one object:
</p>

<pre><code>$ <span class="k">hird</span> events --json --kind ground_shifted,contended --follow
{"cursor":41,"at":"2026-08-11T14:36:09.120Z","project":"/home/you/app","task":2,
 "title":"Port the repository layer","actor":"codex:9f2c","kind":"ground_shifted",
 "detail":"task 1 (Design the storage schema) sent back by review 5"}</code></pre>

<p>
  That line is hird's whole integration surface as an emitter: pipe it into
  <code>jq</code>, a log file, a dashboard, or the thing that pages you. The
  <a href="#dispatch-hook">dispatch hook</a> answers <em>wake somebody when
  work appears</em>; the feed answers everything after that — what the swarm
  did, as it does it, in a form both halves of your tooling can read.
</p>
</section>

<section id="web">
<h2>Seeing the graph run</h2>

<p>
  The TUI shows the board; it cannot show the shape of the plan. For that
  there is a picture, live, in a browser:
</p>

<pre><code>$ <span class="k">hird</span> web
hird web: http://127.0.0.1:7473/</code></pre>

<p>
  One column per dispatch wave, an arrow for every dependency, the finished
  ground on the left, and on each node its holder, lease countdown, what it
  waits for and what it requires. Nodes light up as harnesses claim them, and
  the trail streams underneath as it lands. Click a node and the panel beside
  the graph answers <code>hird show</code> and <code>hird show --why</code> for it.
  Narrow the picture to one plan from the header, and drag the
  <strong>replay</strong> slider to see the board as it stood at any moment
  since the trail began — the same fold <code>hird ls --at</code> prints, drawn.
</p>

<p>
  <strong>A viewer, not a transport.</strong> <code>hird web</code> has the
  TUI's posture and nothing more: it binds <code>127.0.0.1</code>, it is
  read-only — every route is a <code>GET</code>, and the page has no button
  that writes — and it dies with the terminal. No agent ever talks to it;
  harnesses reach the queue over MCP on stdio exactly as before, and the page
  reads the same SQLite file the TUI does. While it runs it sweeps expired
  leases at the board's cadence and announces them to the
  <a href="#dispatch-hook">dispatch hook</a>, so a board left open in a browser
  tab never swallows a summons. <code>--port</code> picks another port
  (<code>0</code> lets the system choose and the banner reports it),
  <code>--bind</code> another address, <code>--all-projects</code> the whole
  database.
</p>

<p>
  The picture is drawn from data you can have as well: <code>hird graph
  --json</code> prints the board as one object — every unfinished task with
  its wave, every finished one that live work still builds on,
  <code>waits_for</code> and <code>feeds</code> on each, the plan and node
  name it was filed under, and the recess if one stands — and <code>hird
  graph --plan &lt;name&gt;</code> narrows any rendering, waves, DOT, Mermaid
  or JSON, to the tasks one plan filed and the dependencies between them.
</p>
</section>

<section id="mcp">
<h2>MCP tools</h2>

<p>Twelve, and no more.</p>

<div class="table-wrap">
<table>
  <thead><tr><th>Tool</th><th>Purpose</th></tr></thead>
  <tbody>
    <tr><td><code>task_list</code></td><td>What work exists, optionally filtered by status — marking the ones your harness cannot claim.</td></tr>
    <tr><td><code>task_get</code></td><td>One task in full: dependencies, file scope, recent history.</td></tr>
    <tr><td><code>task_next</code></td><td><strong>Be handed the next workable task, already claimed.</strong></td></tr>
    <tr><td><code>task_claim</code></td><td><strong>Take a named task.</strong> Atomic; fails if someone else has it, or if it reviews your own harness's work.</td></tr>
    <tr><td><code>task_scope</code></td><td>Say which files you will change; find out who else is in them.</td></tr>
    <tr><td><code>task_update</code></td><td>Record progress and renew the lease. Holder only.</td></tr>
    <tr><td><code>task_split</code></td><td>Break a task into pieces the other agents can work. Holder only.</td></tr>
    <tr><td><code>task_complete</code></td><td>Finish, with a summary — and on a review, a <a href="#verdict">verdict</a>. Holder only.</td></tr>
    <tr><td><code>task_fail</code></td><td>Give up, with a reason. Holder only.</td></tr>
    <tr><td><code>task_release</code></td><td>Hand the task back unfinished; with <code>question</code>, park it until <code>hird answer</code>. Holder only.</td></tr>
    <tr><td><code>mem_store</code></td><td>Record one durable fact — or, said again word for word, confirm one.</td></tr>
    <tr><td><code>mem_search</code></td><td>Find facts recorded earlier, by anyone, each marked with whether its code has moved since.</td></tr>
  </tbody>
</table>
</div>

<p>
  Results are compact JSON. Failures come back as <code>isError</code> text
  rather than protocol errors, so a model can relay them to you as-is instead of
  reporting that a tool broke. There is deliberately no tool for filing
  arbitrary new work: agents split what they hold, and everything else is filed
  by you. <a href="#recall">Recall</a> did not need a thirteenth tool either — it
  rides along with the claim — and neither did
  <a href="#footing">footing</a>, which rides along with every fact hird serves,
  or the <a href="#footprint">footprint</a>, which rides along with every
  check-in and every finishing call.
  The <a href="#verdict">verdict</a> is a parameter on <code>task_complete</code>,
  not a thirteenth tool. Something an agent has to know to ask for is something
  it will not ask for.
</p>
</section>

<section id="config">
<h2>Configuration</h2>

<p>
  The database lives at
  <code>${XDG_DATA_HOME:-~/.local/share}/hird/hird.db</code>. Point hird
  somewhere else with <code>--db</code> (highest precedence) or
  <code>HIRD_DB</code> — pointing it at a throwaway file is how you try things
  without touching your real board.
</p>

<p>Optional config at <code>${XDG_CONFIG_HOME:-~/.config}/hird/config.toml</code>:</p>

<pre><code><span class="c"># How long a claim survives without a task_update. Default 15.</span>
lease_ttl_minutes = 15

<span class="c"># Whether list and search span every project by default. Default false.
# Explicit --all-projects / all_projects arguments still win.</span>
all_projects_by_default = false

<span class="c"># What to do when a task declares files another agent is already working:
#   "report"  record it and tell the agent who else is in there  (default)
#   "refuse"  reject the claim outright, rolling back anything it took</span>
path_conflicts = <span class="s">"report"</span>

<span class="c"># What a finished dependency under an unfinished review does to its dependents:
#   "clears"  workable at once, told the ground they build on is provisional
#             (default)
#   "holds"   unclaimable until the review delivers its verdict</span>
under_review = <span class="s">"clears"</span>

<span class="c"># Whether task_next passes over tasks whose files overlap live work. Default
# true: when the queue gets to choose, it should not choose a collision.</span>
dispatch_avoids_conflicts = <span class="s">true</span>

<span class="c"># How many recalled assertions a claimed task arrives with. Default 5, and 0
# turns recall off. Keep it small: this lands in an agent's context unasked.</span>
recall_limit = 5

<span class="c"># Whether the queue watches the working tree to see what tasks actually
# change. Needs git, goes quiet by itself where there is none, and costs
# nothing while no task in the project holds a lease. Default true.</span>
witness = true

<span class="c"># Whether an assertion remembers the files it was learned against, so a later
# reader is told when that code has moved. Rides on the same working-tree
# access as `witness` and is off wherever that is. Default true.</span>
memory_footing = true

<span class="c"># Whether the witness keeps the content of the versions it fingerprints, so
# `hird diff` can show what a task changed, reviews carry the diff of the
# work under judgement, and `hird salvage` can recover a version an
# overlapping write discarded. Rides on `witness` and is off wherever that
# is. Default true.</span>
exhibit = true

<span class="c"># A command to run, detached, whenever a task becomes claimable — see
# "The dispatch hook" above. Empty (the default) means no hook.</span>
dispatch_hook = <span class="s">""</span>

<span class="c"># Its twin for the other audience: run, detached, the moment a task raises a
# question and steps out of dispatch to wait on a human. Empty (the default)
# means no hook.</span>
question_hook = <span class="s">""</span></code></pre>

<p>
  Unknown keys are an error rather than a shrug, so a typo is reported instead of
  silently ignored. Agents are told the configured TTL in the MCP handshake and
  asked to check in at half that interval, so raising it here is all that is
  needed to give slow tasks more room.
  <a href="https://github.com/aoprisan/hird/blob/main/examples/config.toml">The annotated example</a>
  lists every key with its default.
</p>

<div class="table-wrap">
<table>
  <thead><tr><th>Variable</th><th>Meaning</th></tr></thead>
  <tbody>
    <tr><td><code>HIRD_HARNESS</code></td><td>This session's harness name. Set it in the MCP registration. Unset, the name the harness’s client gives for itself is used instead.</td></tr>
    <tr><td><code>HIRD_CAPABILITIES</code></td><td>Comma-separated <a href="#capabilities">capabilities</a> this MCP session can satisfy. <code>hird register --capability</code> writes it.</td></tr>
    <tr><td><code>HIRD_PROJECT</code></td><td>Override project detection.</td></tr>
    <tr><td><code>HIRD_DB</code></td><td>Override the database path.</td></tr>
  </tbody>
</table>
</div>

<h3>Projects</h3>

<p>
  Every task and assertion is filed under a project — the canonical path of your
  repository root, found by walking up to the nearest <code>.git</code>. Two
  harnesses opened in the same checkout share a queue; a different checkout gets
  its own. One database holds them all, and <code>--all-projects</code> (or
  <kbd>p</kbd> in the TUI) looks across everything.
</p>
</section>

<section id="examples">
<h2>Examples</h2>

<p>
  The <a href="https://github.com/aoprisan/hird/tree/main/examples">examples
  folder</a> holds runnable versions of everything on this page. Each script
  points <code>HIRD_DB</code> at a temporary file, so running one cannot disturb
  your real queue.
</p>

<div class="table-wrap">
<table>
  <thead><tr><th>File</th><th>What it shows</th></tr></thead>
  <tbody>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/manual-dispatch.sh"><code>manual-dispatch.sh</code></a></td>
      <td>Filing tasks and handing them out by number — the by-hand workflow, end to end.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/swarm-plan.sh"><code>swarm-plan.sh</code></a></td>
      <td>A dependency graph with file scopes, then <code>hird graph</code> and simulated concurrent <code>task_next</code> dispatch.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/plan-file.sh"><code>plan-file.sh</code></a></td>
      <td>The same graph as a <a href="#plan-files">file</a>: read before it is filed, applied in one transaction, then edited and applied again.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/plan.toml"><code>plan.toml</code></a></td>
      <td>The plan format, annotated, every field at work.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/witness.sh"><code>witness.sh</code></a></td>
      <td>Two agents, one checkout, one file — the <a href="#witness">witness</a> catching a lost edit while there is still time to act on it, and a third task that finishes <a href="#footprint">read-only</a>. Makes its own throwaway git repository.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/exhibit.sh"><code>exhibit.sh</code></a></td>
      <td>A finished task's uncommitted diff shown after the tree has moved on, and a written-over version brought back — the <a href="#exhibit">exhibit</a>, end to end. Makes its own throwaway git repository.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/tenure.sh"><code>tenure.sh</code></a></td>
      <td>An agent leaves uncommitted edits and vanishes; the successor's own claim says whose leavings it is standing in, and round one stays diffable after round two writes over it — <a href="#tenure">the tenure</a>. Makes its own throwaway git repository.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/question.sh"><code>question.sh</code></a></td>
      <td>An agent reaches a decision it must not guess, the task stays out of dispatch until the human answers, and the answer rides in the next claim.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/footing.sh"><code>footing.sh</code></a></td>
      <td>A fact recorded against a file, that file rewritten, and every later reader told so — plus the way back to <a href="#footing">firm</a>. Makes its own throwaway git repository.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/review.sh"><code>review.sh</code></a></td>
      <td>Work that files its own <a href="#review">review</a> when it finishes, scoped to what actually moved and barred to the harness that moved it. Makes its own throwaway git repository.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/verdict.sh"><code>verdict.sh</code></a></td>
      <td>The <a href="#verdict">sent-back loop</a>: a verdict reopens the work carrying the findings, the redo files a fresh review, and <code>hird agents --record</code> keeps score. Makes its own throwaway git repository.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/dispatch-hook.sh"><code>dispatch-hook.sh</code></a></td>
      <td>The <a href="#dispatch-hook">dispatch hook</a> hearing about every task that becomes claimable — filed, unblocked, review filed, sent back — with a log file standing in for the multiplexer.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/recess.sh"><code>recess.sh</code></a></td>
      <td><a href="#recess">The queue stood down</a>: claims refused in the human's words, <code>task_next</code> told to stand by rather than "the queue is empty", the dispatch hook quiet, and everything that waited announced on <code>hird resume</code>.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/events.sh"><code>events.sh</code></a></td>
      <td><a href="#events">The board as a log</a>: a follower tails the trail while two harnesses work, then the same record is read after the fact, filtered by kind, and emitted as JSON. Makes its own throwaway git repository.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/protocol.sh"><code>protocol.sh</code></a></td>
      <td><a href="#protocol">MCP 2026-07-28</a> on the wire: <code>server/discover</code>, a task worked without ever calling <code>initialize</code>, and a harness that never set <code>HIRD_HARNESS</code> named by its own client.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/task-body.md"><code>task-body.md</code></a></td>
      <td>A task body worth writing, for <code>--body-file</code>.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/config.toml"><code>config.toml</code></a></td>
      <td>Every configuration key, annotated, at its default.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/tree/main/examples/harness"><code>harness/</code></a></td>
      <td>Drop-in MCP registration for Claude Code, Codex CLI, Copilot in VS&nbsp;Code, the Copilot CLI, the Gemini CLI and OpenCode — what <code>hird register</code> writes, for reading or for pasting somewhere it does not reach.</td>
    </tr>
    <tr>
      <td><a href="https://github.com/aoprisan/hird/blob/main/examples/lib/mcp.sh"><code>lib/mcp.sh</code></a></td>
      <td>The shell helpers the scripts share — a raw MCP session in twenty lines, and the stateless 2026-07-28 form beside it.</td>
    </tr>
  </tbody>
</table>
</div>
</section>

<section id="faq">
<h2>FAQ</h2>

<h3>Can I still dispatch tasks manually?</h3>
<p>
  Yes. <code>hird add</code> then <em>"pick up task 42"</em> is unchanged, and
  <code>task_claim</code> is a first-class tool, not a fallback. Automatic
  dispatch is something an agent opts into by calling <code>task_next</code>;
  if you never ask an agent to work the queue, it never will.
</p>

<h3>Can hird start or prompt agents itself?</h3>
<p>
  Not directly — hird has no daemon and does not own any terminal — but it will
  tell something that does. Set the <a href="#dispatch-hook">dispatch hook</a>
  and hird runs your command whenever a task becomes claimable; point that
  command at a terminal multiplexer that can address agents, such as
  <a href="https://herdr.dev">herdr</a> (<code>herdr agent prompt …</code>),
  and idle agents get summoned to pull work the moment it exists. hird decides
  <em>what</em> is workable and <em>who</em> may take it — and hands the hook
  that second fact too, as <code>HIRD_RECUSED</code>, so a summons for a
  review can be routed away from the harness that wrote the work; the
  multiplexer owns <em>where</em> agents run. Neither replaces the other.
  Under herdr the pairing is one install:
  <code>herdr plugin install aoprisan/hird/herdr-plugin</code> — see
  <a href="https://github.com/aoprisan/hird/tree/main/herdr-plugin">herdr-plugin/</a>.
</p>

<h3>Do I have to declare dependencies or file scopes?</h3>
<p>
  No. Both are optional. A task with no <code>--needs</code> is workable
  immediately, and a task with no <code>--path</code> simply never reports an
  overlap — you lose collision detection for that task, not the ability to
  dispatch it.
</p>

<h3>What happens if an agent dies mid-task?</h3>
<p>
  Its lease lapses after <code>lease_ttl_minutes</code> and the task returns to
  <code>open</code> by itself. There is nothing to restart and nothing to clean
  up. To take it back sooner, <code>hird reopen</code> it.
</p>

<h3>Can two agents work the same file?</h3>
<p>
  Nothing stops them at the filesystem level — hird is a coordinator, not a lock
  manager. What it does is make the overlap visible to both agents and to you
  the moment it is declared, refuse to <em>choose</em> a colliding task during
  automatic dispatch, and, with
  <code>path_conflicts = "refuse"</code>, reject the claim outright.
</p>
<p>
  And when they do it anyway, it tells them. A declared overlap that the
  <a href="#contention">working tree confirms</a> — the file has moved, and the
  two of them disagree about what it now says — is reported to both by name,
  with the one instruction that saves the work: re-read it before you write.
</p>

<h3>Can I have one agent check another's work?</h3>
<p>
  That is what <a href="#review">recusal</a> is for, and hird is the only thing
  positioned to enforce it: a harness cannot see another harness's session, so
  an agent handed "review this" cannot tell whether it wrote it. hird recorded
  who held the lease. Mark work <code>--review</code> and finishing files the
  review itself, scoped to what actually moved — and the queue refuses it to the
  harness that did the moving, in the same transaction as the claim.
</p>

<h3>Does the memory go stale?</h3>
<p>
  It does, and hird is the part that notices. An assertion is stored with its
  <a href="#footing">footing</a> — the files it was read off and what they said
  at the time — so a fact whose code has since been rewritten arrives marked
  <code>shaky</code> instead of arriving indistinguishable from one recorded
  this morning. hird never calls it false; a rename and a rewrite look the same
  from here. It tells you which facts a re-read would pay for, and
  <code>hird mem standing</code> lists them.
</p>
<p>
  Nothing has to be curated. Confirming a fact is the ordinary act of stating
  it: <code>mem_store</code> the same sentence word for word and the original is
  re-anchored to today's code rather than duplicated, with you recorded as
  another voice for it.
</p>

<h3>Does hird know which agent changed a file?</h3>
<p>
  No, and it says so rather than guessing. One checkout has one filesystem and
  no keyboards, so a file that moves while three agents hold leases lands in all
  three footprints. That is why <code>changed</code> is always described as what
  moved <em>while the task was held</em>, and why the sharp warning needs a
  declared scope on both sides — the declaration is the part that says who
  intended to write.
</p>

<h3>Is there a server to run?</h3>
<p>
  No. Every front end opens the same SQLite file in WAL mode. Start a harness
  and it spawns its own short-lived <code>hird mcp</code>; close it and nothing
  is left behind but the database. <a href="#web"><code>hird web</code></a>
  listens on loopback while you have it open, exactly as <code>hird tui</code>
  holds the terminal — it is a screen, not a service, and nothing depends on
  it being up.
</p>
<p>
  There is one you can run <em>on purpose</em>, for harnesses that are not on
  your machine at all: <code>hird-server</code> serves the same queue over MCP
  on HTTP, with a roster file saying which bearer token connects as whom.
  <a href="server.html">How the central queue works</a> walks a request through
  it — token to person, and two agents racing for one task — with the server
  simulated in the page. Nothing local depends on it; the local queue never
  learns to speak HTTP.
</p>

<h3>How do I start over?</h3>
<p>
  Delete the file that <code>hird db-path</code> prints, or point
  <code>HIRD_DB</code> at a new one. Schema migrations run on open, so an
  existing database is upgraded in place when you install a newer build.
</p>
</section>

</main>
</div>

<footer class="page">
  <span>hird — MIT OR Apache-2.0</span>
  <span><a href="https://github.com/aoprisan/hird">github.com/aoprisan/hird</a></span>
</footer>

<script>
  // Theme toggle: follow the OS by default, remember an explicit choice.
  (function () {
    var root = document.documentElement;
    var saved = null;
    try { saved = localStorage.getItem("hird-theme"); } catch (e) {}
    if (saved) root.setAttribute("data-theme", saved);

    document.getElementById("theme").addEventListener("click", function () {
      var dark = root.getAttribute("data-theme") === "dark" ||
        (!root.getAttribute("data-theme") &&
          window.matchMedia("(prefers-color-scheme: dark)").matches);
      var next = dark ? "light" : "dark";
      root.setAttribute("data-theme", next);
      try { localStorage.setItem("hird-theme", next); } catch (e) {}
    });
  })();

  // On a phone the contents fold away, so the page starts at the page. They
  // stay open without JavaScript, which is the safe way round.
  (function () {
    var nav = document.querySelector("nav.toc .nav-body");
    var narrow = window.matchMedia("(max-width: 62rem)");
    if (!nav) return;
    if (narrow.matches) nav.removeAttribute("open");
    nav.addEventListener("click", function (event) {
      if (narrow.matches && event.target.closest("a")) nav.removeAttribute("open");
    });
  })();

  // Highlight the section currently in view in the sidebar.
  (function () {
    var links = Array.prototype.slice.call(
      document.querySelectorAll("nav.toc a[href^='#']"));
    var byId = {};
    links.forEach(function (a) { byId[a.getAttribute("href").slice(1)] = a; });
    var targets = Object.keys(byId)
      .map(function (id) { return document.getElementById(id); })
      .filter(Boolean);
    if (!targets.length || !("IntersectionObserver" in window)) return;

    var visible = new Set();
    var observer = new IntersectionObserver(function (entries) {
      entries.forEach(function (entry) {
        if (entry.isIntersecting) visible.add(entry.target.id);
        else visible.delete(entry.target.id);
      });
      var first = targets.filter(function (t) { return visible.has(t.id); })[0];
      links.forEach(function (a) { a.classList.remove("here"); });
      if (first && byId[first.id]) byId[first.id].classList.add("here");
    }, { rootMargin: "0px 0px -70% 0px" });

    targets.forEach(function (t) { observer.observe(t); });
  })();
</script>
</body>
</html>