hive-not-swarm
aien-dev/hive-not-swarm
Brought by drakestapleton
hive-not-swarm / build_article.py
| 1 | from pathlib import Path |
| 2 | import math,json,hashlib,csv |
| 3 | import numpy as np |
| 4 | import matplotlib |
| 5 | matplotlib.use('Agg') |
| 6 | import matplotlib.pyplot as plt |
| 7 | from matplotlib.patches import FancyBboxPatch, FancyArrowPatch, Circle |
| 8 | from docx import Document |
| 9 | from docx.shared import Inches, Pt, RGBColor |
| 10 | from docx.enum.text import WD_ALIGN_PARAGRAPH |
| 11 | from docx.enum.table import WD_TABLE_ALIGNMENT, WD_CELL_VERTICAL_ALIGNMENT |
| 12 | from docx.oxml import OxmlElement |
| 13 | from docx.oxml.ns import qn |
| 14 | from docx.opc.constants import RELATIONSHIP_TYPE as RT |
| 15 | ROOT=Path(__file__).resolve().parent |
| 16 | FIG=ROOT/'figures' |
| 17 | TITLE='Hive, not swarm: control, flow and collapse in human-directed coding-agent teams' |
| 18 | AUTHOR='Drake Stapleton' |
| 19 | ORCID='0009-0002-6890-7111' |
| 20 | AFFILIATION='Independent Researcher, AIEN, Springfield, Missouri, USA' |
| 21 | DATE='29 October 2026' |
| 22 | VERSION='Revision 3' |
| 23 | # Optional publication metadata (DOI reserved on Zenodo before publication). Absent file means no DOI line. |
| 24 | PUB=json.loads((ROOT/'publication.json').read_text()) if (ROOT/'publication.json').exists() else {} |
| 25 | BLUE='#173F5F'; TEAL='#087F8C'; ORANGE='#B35D32'; LIGHT='#EAF3F5'; GRAY='#5A6570'; PALE='#F3F5F7'; WARM='#FBF1EA' |
| 26 | plt.rcParams.update({'font.family':'DejaVu Sans','font.size':11,'axes.spines.top':False,'axes.spines.right':False,'axes.labelcolor':'#253342','text.color':'#253342','axes.edgecolor':'#9CA8B1','xtick.color':'#4A5965','ytick.color':'#4A5965','savefig.facecolor':'white','svg.hashsalt':'hive-paper'}) |
| 27 | def setup(w=12,h=6): |
| 28 | fig,ax=plt.subplots(figsize=(w,h));ax.set_xlim(0,12);ax.set_ylim(0,h);ax.axis('off');return fig,ax |
| 29 | |
| 30 | def box(ax,x,y,w,h,title,sub='',color=BLUE,fill=PALE,fs=12): |
| 31 | ax.add_patch(FancyBboxPatch((x,y),w,h,boxstyle='round,pad=0.035,rounding_size=0.10',edgecolor=color,facecolor=fill,lw=1.4)) |
| 32 | ax.text(x+w/2,y+h*.64 if sub else y+h/2,title,ha='center',va='center',weight='bold',fontsize=fs,color=color) |
| 33 | if sub:ax.text(x+w/2,y+h*.27,sub,ha='center',va='center',fontsize=9.3,color=GRAY,linespacing=1.35) |
| 34 | def arrow(ax,a,b,color=GRAY,style='-|>',lw=1.6,rad=0,ls='-'): |
| 35 | ax.add_patch(FancyArrowPatch(a,b,arrowstyle=style,mutation_scale=13,linewidth=lw,color=color,linestyle=ls,connectionstyle=f'arc3,rad={rad}')) |
| 36 | def node(ax,x,y,label,color=TEAL,r=.26,fill=LIGHT,fs=8.5): |
| 37 | ax.add_patch(Circle((x,y),r,edgecolor=color,facecolor=fill,lw=1.4,zorder=3));ax.text(x,y,label,ha='center',va='center',fontsize=fs,color=color,weight='bold',zorder=4) |
| 38 | def savefig(fig,name): |
| 39 | fig.savefig(FIG/(name+'.png'),dpi=260,bbox_inches='tight',pad_inches=.12,metadata={'Software':None}) |
| 40 | fig.savefig(FIG/(name+'.svg'),bbox_inches='tight',pad_inches=.12,metadata={'Date':None});plt.close(fig) |
| 41 | # Fig 1 two-loop architecture |
| 42 | fig,ax=setup(h=6.15) |
| 43 | ax.text(.18,5.92,'HUMAN OUTER LOOP',fontsize=10.5,weight='bold',color=BLUE) |
| 44 | box(ax,.2,4.55,3.2,1.05,'Define the contract','objective · constraints · stop rule',BLUE,LIGHT) |
| 45 | box(ax,4.4,4.55,3.2,1.05,'Authorize and prioritize','scope · resources · risky actions',BLUE,LIGHT) |
| 46 | box(ax,8.6,4.55,3.2,1.05,'Accept or redirect','inspect behavior and evidence',BLUE,LIGHT) |
| 47 | arrow(ax,(3.45,5.07),(4.35,5.07),BLUE);arrow(ax,(7.65,5.07),(8.55,5.07),BLUE) |
| 48 | ax.plot([.17,11.83],[4.05,4.05],ls=(0,(4,4)),color='#AFBDC5',lw=1) |
| 49 | ax.text(.2,3.72,'BOUNDED AGENT INNER LOOP',fontsize=10.5,weight='bold',color=TEAL) |
| 50 | box(ax,.2,1.9,2.45,1.1,'Decompose','freeze interfaces\nassign exclusive paths',TEAL,LIGHT) |
| 51 | box(ax,3.2,1.9,2.45,1.1,'Implement','isolated worktrees\nbounded specialists',TEAL,LIGHT) |
| 52 | box(ax,6.2,1.9,2.45,1.1,'Verify','execute gates\nretain negative results',TEAL,LIGHT) |
| 53 | box(ax,9.2,1.9,2.6,1.1,'Assemble receipt','commit · environment\ncommands · outcomes',TEAL,LIGHT) |
| 54 | for a,b in [(2.7,3.15),(5.7,6.15),(8.7,9.15)]:arrow(ax,(a,2.45),(b,2.45),TEAL) |
| 55 | ax.plot([6,6,1.4],[4.5,3.30,3.30],color=BLUE,lw=1.6);arrow(ax,(1.4,3.30),(1.4,3.06),BLUE);ax.text(3.2,3.42,'delegated scope',fontsize=9,color=BLUE) |
| 56 | arrow(ax,(10.5,3.05),(10.2,4.5),BLUE);ax.text(10.85,3.6,'evidence',fontsize=9,color=BLUE,ha='center') |
| 57 | arrow(ax,(7.4,1.86),(4.45,1.86),ORANGE,rad=-.53) |
| 58 | ax.text(5.95,.65,'Failed or inconclusive gate → diagnose and revise',ha='center',fontsize=10,color=ORANGE) |
| 59 | ax.text(6,.12,'Authority flows down. Evidence flows up. Execution does not confer acceptance.',ha='center',fontsize=10.3,color=GRAY) |
| 60 | savefig(fig,'01_two_loop_architecture') |
| 61 | # Fig 2 hive and swarm control structures |
| 62 | fig,ax=setup(h=6.6) |
| 63 | ax.text(.15,6.38,'A Hive: assigned lanes, owned writes',fontsize=11,weight='bold',color=BLUE) |
| 64 | ax.text(.15,6.02,'one writer per path · at most three children per node',fontsize=9.2,color=GRAY) |
| 65 | ax.text(6.35,6.38,'B Swarm: self-selected work, shared medium',fontsize=11,weight='bold',color=ORANGE) |
| 66 | ax.text(6.35,6.02,'agents pick work from local cues · no acceptance node',fontsize=9.2,color=GRAY) |
| 67 | ax.plot([6.05,6.05],[.35,6.3],color='#D5DDE2',lw=1) |
| 68 | box(ax,1.35,5.0,2.9,.72,'Human','scope · acceptance · stop',BLUE,LIGHT,11) |
| 69 | box(ax,1.75,4.05,2.1,.6,'Coordinator',color=BLUE,fill=PALE,fs=10.5) |
| 70 | arrow(ax,(2.8,4.95),(2.8,4.7),BLUE) |
| 71 | l2=[(.75,3.35),(2.8,3.35),(4.85,3.35)] |
| 72 | for i,(x,y) in enumerate(l2): |
| 73 | node(ax,x,y,'L2',BLUE,.28,PALE);arrow(ax,(2.8,4.0),(x,y+.3),BLUE) |
| 74 | leaves={0:[.25,.75,1.25],1:[2.35,3.25],2:[4.35,4.85,5.35]} |
| 75 | k=0 |
| 76 | for i,xs in leaves.items(): |
| 77 | for x in xs: |
| 78 | k+=1;node(ax,x,2.25,'L3',TEAL,.22,LIGHT,7.5);arrow(ax,(l2[i][0],3.05),(x,2.49),BLUE,lw=1.2) |
| 79 | ax.add_patch(FancyBboxPatch((x-.22,1.22),.44,.42,boxstyle='round,pad=0.01,rounding_size=0.05',edgecolor=TEAL,facecolor='white',lw=1.1));ax.text(x,1.43,chr(64+k),ha='center',va='center',fontsize=8.5,color=TEAL,weight='bold') |
| 80 | ax.plot([x,x],[2.03,1.66],color=TEAL,lw=1.2);ax.plot([x,x],[1.2,.74],ls=(0,(2,3)),color='#AFBDC5',lw=.9,zorder=1) |
| 81 | ax.add_patch(FancyBboxPatch((.05,.2),5.5,.5,boxstyle='round,pad=0.02,rounding_size=0.06',edgecolor='#AFBDC5',facecolor=PALE,lw=1,linestyle=(0,(4,3)))) |
| 82 | ax.text(2.8,.45,'Board: status and pointers, read as data, never as a command',ha='center',va='center',fontsize=9,color=GRAY) |
| 83 | rng=np.random.default_rng(7) |
| 84 | pts=[(6.9,5.3),(8.2,5.65),(9.6,5.25),(11.0,5.55),(7.4,4.25),(8.9,4.45),(10.4,4.15),(11.4,4.6)] |
| 85 | for i in range(len(pts)): |
| 86 | for j in range(i+1,len(pts)): |
| 87 | if rng.random()<.45:ax.plot([pts[i][0],pts[j][0]],[pts[i][1],pts[j][1]],color='#D9C2B2',lw=.9,zorder=1) |
| 88 | for i,(x,y) in enumerate(pts):node(ax,x,y,'a'+str(i+1),ORANGE,.25,WARM,8) |
| 89 | ax.add_patch(FancyBboxPatch((6.6,1.05),5.15,1.45,boxstyle='round,pad=0.03,rounding_size=0.08',edgecolor=ORANGE,facecolor=WARM,lw=1.3)) |
| 90 | ax.text(9.18,2.18,'Shared medium',ha='center',fontsize=10.5,color=ORANGE,weight='bold');ax.text(9.18,1.78,'task files · shared tree · generated state',ha='center',fontsize=9,color=GRAY) |
| 91 | for (x,y),tx in zip(pts,[7.2,8.3,9.25,10.9,7.25,9.25,9.4,11.2]):arrow(ax,(x,y-.27),(tx,2.52),ORANGE,lw=1.0) |
| 92 | ax.text(9.25,2.83,'×',ha='center',va='center',fontsize=19,color='#C0392B',weight='bold') |
| 93 | ax.text(9.18,1.36,'× two writers reached the same place',ha='center',fontsize=9,color='#C0392B') |
| 94 | ax.text(9.18,.45,'the result emerges from the interactions',ha='center',va='center',fontsize=9.2,color=GRAY) |
| 95 | savefig(fig,'02_hive_swarm_structure') |
| 96 | # Fig 3 issue to receipt |
| 97 | fig,ax=setup(h=5.9) |
| 98 | items=[(.2,4.0,'1 Inspect','current source\nexisting work'),(4.4,4.0,'2 Contract','scope · owner\nacceptance gates'),(8.6,4.0,'3 Partition','dependencies\nexclusive write paths'),(8.6,1.7,'4 Implement','branch · pull request\nsmall reviewable change'),(4.4,1.7,'5 Verify','exact commands\noutputs · negative tests'),(.2,1.7,'6 Reconcile','receipt · verdict\naccept or reopen')] |
| 99 | for x,y,t,s in items:box(ax,x,y,3.2,1.1,t,s,BLUE if x==.2 else TEAL,LIGHT,11.8) |
| 100 | for a,b in [((3.45,4.55),(4.35,4.55)),((7.65,4.55),(8.55,4.55)),((10.2,3.95),(10.2,2.85)),((8.55,2.25),(7.65,2.25)),((4.35,2.25),(3.45,2.25))]:arrow(ax,a,b) |
| 101 | ax.text(.2,5.55,'THE ISSUE IS THE CHANGE LEDGER',fontsize=11,weight='bold',color=BLUE) |
| 102 | ax.text(6,3.35,'Every transition retains links to the same bounded acceptance contract',ha='center',fontsize=10,color=GRAY) |
| 103 | ax.text(.2,.98,'Progress status',weight='bold',fontsize=10.2,color=BLUE) |
| 104 | ax.text(.2,.56,'PROPOSED → SCOPED → ACTIVE → IN REVIEW → COMPLETE',fontsize=9.9,color=GRAY) |
| 105 | ax.text(7.1,.98,'Independent qualification verdict',weight='bold',fontsize=10.2,color=ORANGE) |
| 106 | ax.text(7.1,.56,'PASS · FAIL · INCONCLUSIVE · NOT RUN',fontsize=9.9,color=ORANGE) |
| 107 | savefig(fig,'03_issue_to_receipt') |
| 108 | # Fig 4 hive to swarm transition and restoration |
| 109 | fig,ax=setup(h=6.4) |
| 110 | box(ax,.25,2.35,3.3,1.75,'Hive','assigned lanes · owned writes\nnotify ≠ command\nhuman acceptance',BLUE,LIGHT,14) |
| 111 | box(ax,8.45,2.35,3.3,1.75,'Swarm-like','self-assignment · shared writes\nposts acted on as orders\nno one accepts',ORANGE,WARM,14) |
| 112 | ax.text(6,6.12,'DISRUPTION: the directive signal stops reaching the agents',ha='center',fontsize=10.6,weight='bold',color=ORANGE) |
| 113 | mech=['M1 two coordinators claim the same lever','M2 lanes coupled through shared derived state','M3 consumers drift to different tools or configs','M4 communication splits into private channels','M5 supervisor saturated, or coordinator lost','M6 exclusive resource used without its lock','M7 duplicate work accumulates unreconciled'] |
| 114 | for i,m in enumerate(mech):ax.text(3.95,5.65-i*.31,m,fontsize=9.4,color='#253342') |
| 115 | arrow(ax,(3.62,3.5),(8.38,3.5),ORANGE,lw=2,rad=.1) |
| 116 | ax.text(10.1,1.95,'Symptoms',ha='center',fontsize=10,weight='bold',color=ORANGE) |
| 117 | for i,s in enumerate(['duplicated and overwritten work','merge storms · stalled queue','idle or deadlocked workers']):ax.text(10.1,1.6-i*.31,s,ha='center',fontsize=9.1,color=GRAY) |
| 118 | arrow(ax,(8.38,2.6),(3.62,2.6),BLUE,lw=2,rad=.1) |
| 119 | ax.text(6,1.42,'RESTORATION: stop, then rebuild explicitly',ha='center',fontsize=10.6,weight='bold',color=BLUE) |
| 120 | for i,s in enumerate(['stop the line (andon) and freeze new claims','one owner per resource · re-issue lanes from the issue','reconcile the ledger · close duplicates · re-cap children']):ax.text(6,1.05-i*.31,s,ha='center',fontsize=9.3,color='#253342') |
| 121 | ax.text(1.9,1.95,'In control',ha='center',fontsize=10,weight='bold',color=BLUE) |
| 122 | ax.text(1.9,1.6,'variation within gates',ha='center',fontsize=9.1,color=GRAY) |
| 123 | savefig(fig,'04_hive_swarm_transition') |
| 124 | # model and figures |
| 125 | A,S,b,c,r0,r,H,p,eps,P=120,10,.8,.15,3,.5,6,.01,.08,16 |
| 126 | ns=np.arange(1,P+1) |
| 127 | def total(n,c=c):return S+A/n+b*(n-1)+c*n*(n-1)/2+r0+r*n |
| 128 | risk=1-(1-p)**ns;review=r0+r*ns |
| 129 | feasible=(review<=H+1e-9)&(risk<=eps+1e-9) |
| 130 | times=total(ns) |
| 131 | with open(ROOT/'model_grid.csv','w') as f: |
| 132 | w=csv.writer(f);w.writerow(['agents','minutes','review_minutes','failure_probability','feasible']);w.writerows(zip(ns,times,review,risk,feasible)) |
| 133 | fig,axs=plt.subplots(1,2,figsize=(11,4.9),gridspec_kw={'width_ratios':[1.2,1]}) |
| 134 | ax=axs[0];ax.axvspan(6.5,16.5,color='#EDF0F2');ax.plot(ns,times,color='#A6ADB4',lw=1.7);ax.scatter(ns[~feasible],times[~feasible],marker='x',s=45,color=ORANGE,zorder=3);ax.plot(ns[feasible],times[feasible],'-o',color=TEAL,lw=2.3,markersize=5) |
| 135 | ax.scatter([6],[total(6)],color=TEAL,s=100,zorder=4);ax.annotate('Feasible minimum\n6 agents · 42.25 min',(6,total(6)),xytext=(8.9,70),fontsize=10,color=TEAL,arrowprops={'arrowstyle':'->','color':TEAL}) |
| 136 | ax.annotate('Unconstrained integer minimum\n7 agents · 41.59 min',(7,total(7)),xytext=(7.7,113),fontsize=10.5,color=ORANGE,arrowprops={'arrowstyle':'->','color':ORANGE}) |
| 137 | ax.set(xlim=(.5,16.5),ylim=(30,145),xlabel='Concurrent implementation agents n',ylabel='Modeled completion time T(n), minutes');ax.set_xticks([1,2,4,6,8,10,12,14,16]);ax.grid(axis='y',alpha=.16);ax.set_title('A Completion time',loc='left',fontweight='bold',fontsize=12) |
| 138 | ax=axs[1];ax.axhline(1,color=GRAY,lw=1,ls='--');ax.plot(ns,review/H,'-o',color=BLUE,label='Review demand / budget',markersize=3);ax.plot(ns,risk/eps,'-s',color=ORANGE,label='Any essential-output failure / cap',markersize=3);ax.axvspan(.5,6.5,color=LIGHT);ax.set(xlim=(.5,16.5),ylim=(0,2.05),xlabel='Concurrent implementation agents n',ylabel='Constraint utilization');ax.set_xticks([1,4,6,8,12,16]);ax.text(1,.15,'Feasible\nregion',color=TEAL,fontsize=10);ax.text(9,1.05,'limit = 1',fontsize=9,color=GRAY);ax.legend(loc='upper left',frameon=False,fontsize=10.2);ax.set_title('B Review and risk constraints',loc='left',fontweight='bold',fontsize=12);ax.grid(axis='y',alpha=.16) |
| 139 | fig.tight_layout(w_pad=2.2);savefig(fig,'05_constrained_cost') |
| 140 | # sensitivity |
| 141 | hs=np.array([3.5,4,4.5,5,5.5,6,6.5,7,8,10,12]);cs=np.array([0,.05,.10,.15,.25,.4,.6]) |
| 142 | opt=np.empty((len(cs),len(hs)),dtype=int) |
| 143 | for i,cc in enumerate(cs): |
| 144 | for j,hh in enumerate(hs): |
| 145 | cand=ns[(review<=hh+1e-9)&(risk<=eps+1e-9)];opt[i,j]=cand[np.argmin(total(cand,cc))] |
| 146 | fig,ax=plt.subplots(figsize=(11.8,4.5));im=ax.imshow(opt,cmap='YlGnBu',vmin=1,vmax=8,aspect='auto') |
| 147 | for i in range(len(cs)): |
| 148 | for j in range(len(hs)):ax.text(j,i,str(opt[i,j]),ha='center',va='center',fontsize=12,fontweight='bold',color='white' if opt[i,j]>=5 else BLUE) |
| 149 | ax.set_xticks(range(len(hs)),[f'{x:g}' for x in hs]);ax.set_yticks(range(len(cs)),[f'{x:g}' for x in cs]);ax.set_xlabel('Available human review budget H, minutes');ax.set_ylabel('Pairwise coordination coefficient c, minutes');ax.tick_params(length=0);ax.set_title('Illustrative optimal concurrency under the same task and risk assumptions',loc='left',fontsize=12,fontweight='bold',pad=15) |
| 150 | ax.add_patch(plt.Rectangle((5-.5,3-.5),1,1,fill=False,edgecolor='#E68A38',lw=3));cb=fig.colorbar(im,ax=ax,pad=.02);cb.set_label('Optimal feasible n');cb.set_ticks([1,2,3,4,5,6,7,8]);fig.tight_layout();savefig(fig,'06_sensitivity') |
| 151 | with open(ROOT/'sensitivity_grid.csv','w') as f: |
| 152 | w=csv.writer(f);w.writerow(['c\\H']+hs.tolist());w.writerows([[cc]+row.tolist() for cc,row in zip(cs,opt)]) |
| 153 | # References, numbered in order of first citation |
| 154 | REF={ |
| 155 | 'kurtzer':('Kurtzer, G. M. (2026). Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed Agentic Engineering. Technical report, Zenodo.','https://doi.org/10.5281/zenodo.23682548','10.5281/zenodo.23682548'), |
| 156 | 'issuefirst':('AIEN (2026). Issue-first delivery protocol. Snapshot c6512a4c6ae2e8f8babe23fc9f38880d20d25812; process adoption 809ba2c33d22e3680e05d6d73e64130613c4d3bb.','https://github.com/aien-dev/aien-architecture-mv/blob/c6512a4c6ae2e8f8babe23fc9f38880d20d25812/docs/process/ISSUE_FIRST_DELIVERY.md','Pinned source'), |
| 157 | 'bonabeau1999':('Bonabeau, E., Dorigo, M., & Theraulaz, G. (1999). Swarm Intelligence: From Natural to Artificial Systems. Oxford University Press.','https://doi.org/10.1093/oso/9780195131581.001.0001','10.1093/oso/9780195131581.001.0001'), |
| 158 | 'reynolds1987':('Reynolds, C. W. (1987). Flocks, herds and schools: A distributed behavioral model. Computer Graphics, 21(4), 25–34.','https://doi.org/10.1145/37401.37406','10.1145/37401.37406'), |
| 159 | 'dorigo1996':('Dorigo, M., Maniezzo, V., & Colorni, A. (1996). Ant System: Optimization by a colony of cooperating agents. IEEE Transactions on Systems, Man, and Cybernetics B, 26(1), 29–41.','https://doi.org/10.1109/3477.484436','10.1109/3477.484436'), |
| 160 | 'grasse1959':('Grassé, P.-P. (1959). La reconstruction du nid et les coordinations interindividuelles chez Bellicositermes natalensis et Cubitermes sp. La théorie de la stigmergie. Insectes Sociaux, 6(1), 41–80.','https://doi.org/10.1007/BF02223791','10.1007/BF02223791'), |
| 161 | 'theraulaz1999':('Theraulaz, G., & Bonabeau, E. (1999). A brief history of stigmergy. Artificial Life, 5(2), 97–116.','https://doi.org/10.1162/106454699568700','10.1162/106454699568700'), |
| 162 | 'vicsek1995':('Vicsek, T., Czirók, A., Ben-Jacob, E., Cohen, I., & Shochet, O. (1995). Novel type of phase transition in a system of self-driven particles. Physical Review Letters, 75(6), 1226–1229.','https://doi.org/10.1103/PhysRevLett.75.1226','10.1103/PhysRevLett.75.1226'), |
| 163 | 'gregoire2004':('Grégoire, G., & Chaté, H. (2004). Onset of collective and cohesive motion. Physical Review Letters, 92(2), 025702.','https://doi.org/10.1103/PhysRevLett.92.025702','10.1103/PhysRevLett.92.025702'), |
| 164 | 'couzin2002':('Couzin, I. D., Krause, J., James, R., Ruxton, G. D., & Franks, N. R. (2002). Collective memory and spatial sorting in animal groups. Journal of Theoretical Biology, 218(1), 1–11.','https://doi.org/10.1006/jtbi.2002.3065','10.1006/jtbi.2002.3065'), |
| 165 | 'beshers2001':('Beshers, S. N., & Fewell, J. H. (2001). Models of division of labor in social insects. Annual Review of Entomology, 46, 413–440.','https://doi.org/10.1146/annurev.ento.46.1.413','10.1146/annurev.ento.46.1.413'), |
| 166 | 'duarte2012':('Duarte, A., Pen, I., Keller, L., & Weissing, F. J. (2012). Evolution of self-organized division of labor in a response threshold model. Behavioral Ecology and Sociobiology, 66, 947–957.','https://doi.org/10.1007/s00265-012-1343-2','10.1007/s00265-012-1343-2'), |
| 167 | 'winston1987':('Winston, M. L. (1987). The Biology of the Honey Bee. Harvard University Press.','https://www.hup.harvard.edu/books/9780674074095','Publisher record'), |
| 168 | 'seeley2010':('Seeley, T. D. (2010). Honeybee Democracy. Princeton University Press.','https://doi.org/10.1515/9781400835959','10.1515/9781400835959'), |
| 169 | 'seeley2002':('Seeley, T. D. (2002). When is self-organization used in biological systems? The Biological Bulletin, 202(3), 314–318.','https://doi.org/10.2307/1543484','10.2307/1543484'), |
| 170 | 'winston1991':('Winston, M. L., Higo, H. A., Colley, S. J., Pankiw, T., & Slessor, K. N. (1991). The role of queen mandibular pheromone and colony congestion in honey bee (Apis mellifera L.) reproductive swarming. Journal of Insect Behavior, 4(5), 649–660.','https://doi.org/10.1007/BF01048076','10.1007/BF01048076'), |
| 171 | 'parasuraman2000':('Parasuraman, R., Sheridan, T. B., & Wickens, C. D. (2000). A model for types and levels of human interaction with automation. IEEE Transactions on Systems, Man, and Cybernetics A, 30(3), 286–297.','https://doi.org/10.1109/3468.844354','10.1109/3468.844354'), |
| 172 | 'crandall2005':('Crandall, J. W., Goodrich, M. A., Olsen, D. R., Jr., & Nielsen, C. W. (2005). Validating human–robot interaction schemes in multitasking environments. IEEE Transactions on Systems, Man, and Cybernetics A, 35(4), 438–449.','https://doi.org/10.1109/TSMCA.2005.850587','10.1109/TSMCA.2005.850587'), |
| 173 | 'cummings2008':('Cummings, M. L., & Mitchell, P. J. (2008). Predicting controller capacity in supervisory control of multiple UAVs. IEEE Transactions on Systems, Man, and Cybernetics A, 38(2), 451–460.','https://doi.org/10.1109/TSMCA.2007.914757','10.1109/TSMCA.2007.914757'), |
| 174 | 'autogen':('Wu, Q., et al. (2024). AutoGen: Enabling next-gen LLM applications via multi-agent conversation. COLM. Preprint first posted 2023.','https://arxiv.org/abs/2308.08155','arXiv:2308.08155'), |
| 175 | 'chatdev':('Qian, C., et al. (2024). ChatDev: Communicative agents for software development. ACL, 15174–15186.','https://doi.org/10.18653/v1/2024.acl-long.810','10.18653/v1/2024.acl-long.810'), |
| 176 | 'cemri':('Cemri, M., et al. (2025). Why do multi-agent LLM systems fail? Version 3. Preprint.','https://arxiv.org/abs/2503.13657v3','arXiv:2503.13657v3'), |
| 177 | 'kim':('Kim, Y., et al. (2026). Towards a science of scaling agent systems. Version 3; first posted 2025. Preprint.','https://arxiv.org/abs/2512.08296v3','arXiv:2512.08296v3'), |
| 178 | 'anthropic2025':('Anthropic (2025, 13 June). How we built our multi-agent research system. Engineering blog post, not peer reviewed.','https://www.anthropic.com/engineering/multi-agent-research-system','Web page'), |
| 179 | 'carlini2026':('Carlini, N. (2026, 5 February). Building a C compiler with a team of parallel Claudes. Anthropic engineering blog post, not peer reviewed.','https://www.anthropic.com/engineering/building-c-compiler','Web page'), |
| 180 | 'ohno':('Ohno, T. (1988). Toyota Production System: Beyond Large-Scale Production. Productivity Press. ISBN 9780915299140.','https://www.routledge.com/Toyota-Production-System-Beyond-Large-Scale-Production/Ohno/p/book/9780915299140','Publisher record'), |
| 181 | 'aiag':('Automotive Industry Action Group (2008). Advanced Product Quality Planning and Control Plan (APQP). 2nd edition. AIAG.','https://search.worldcat.org/search?q=Advanced+Product+Quality+Planning+and+Control+Plan+AIAG','Library record'), |
| 182 | 'deming':('Deming, W. E. (1986). Out of the Crisis. MIT Center for Advanced Engineering Study.','https://search.worldcat.org/search?q=Deming+Out+of+the+Crisis+1986','Library record'), |
| 183 | 'harry':('Harry, M., & Schroeder, R. (2000). Six Sigma: The Breakthrough Management Strategy Revolutionizing the World’s Top Corporations. Currency Doubleday.','https://search.worldcat.org/search?q=Harry+Schroeder+Six+Sigma+Breakthrough+Management+Strategy','Library record'), |
| 184 | 'shewhart1930':('Shewhart, W. A. (1930). Economic quality control of manufactured product. Bell System Technical Journal, 9(2), 364–389.','https://doi.org/10.1002/j.1538-7305.1930.tb00373.x','10.1002/j.1538-7305.1930.tb00373.x'), |
| 185 | 'goldratt':('Goldratt, E. M., & Cox, J. (1984). The Goal: A Process of Ongoing Improvement. North River Press.','https://search.worldcat.org/search?q=Goldratt+Cox+The+Goal+1984','Library record'), |
| 186 | 'toyota':('Toyota Motor Corporation. Toyota Production System. Official company web page, accessed 29 October 2026.','https://global.toyota/en/company/vision-and-philosophy/production-system/index.html','Web page'), |
| 187 | 'liker':('Liker, J. K. (2004). The Toyota Way: 14 Management Principles from the World’s Greatest Manufacturer. McGraw-Hill.','https://search.worldcat.org/search?q=Liker+The+Toyota+Way+2004','Library record'), |
| 188 | 'couzin2005':('Couzin, I. D., Krause, J., Franks, N. R., & Levin, S. A. (2005). Effective leadership and decision-making in animal groups on the move. Nature, 433(7025), 513–516.','https://doi.org/10.1038/nature03236','10.1038/nature03236'), |
| 189 | 'symphony':('Stapleton, D. (2026). Atlas Symphony. Author’s project page, last updated 28 October 2026. Self-published record.','https://www.aienos.com/engineer/works/atlas-symphony/','Web page'), |
| 190 | 'dhghive':('Stapleton, D. (2026). DHG Hive. Author’s project page, last updated 28 October 2026. Self-published record.','https://www.aienos.com/engineer/works/dhg-hive/','Web page'), |
| 191 | 'board':('AIEN (2026). Synapse swarm board. Snapshot 099a980fedab8a6797bbf0358b8c5502c8045142.','https://github.com/aien-dev/synapse/blob/099a980fedab8a6797bbf0358b8c5502c8045142/docs/SWARM_BOARD.md','Pinned mechanism documentation'), |
| 192 | 'malone1994':('Malone, T. W., & Crowston, K. (1994). The interdisciplinary study of coordination. ACM Computing Surveys, 26(1), 87–119.','https://doi.org/10.1145/174666.174668','10.1145/174666.174668'), |
| 193 | 'conway1968':('Conway, M. E. (1968). How do committees invent? Datamation, 14(4), 28–31. Author’s reprint.','https://www.melconway.com/Home/Committees_Paper.html','Author reprint'), |
| 194 | 'crumb':('AIEN (2026). Crumb protocol RFC 0002. Snapshot c6512a4c6ae2e8f8babe23fc9f38880d20d25812.','https://github.com/aien-dev/aien-architecture-mv/blob/c6512a4c6ae2e8f8babe23fc9f38880d20d25812/docs/CRUMB_PROTOCOL_RFC_0002.md','Pinned source'), |
| 195 | 'oprecord':('Stapleton, D. (2026). AIEN operational record extract, 13–28 October 2026: coordination-board lines and incident handoffs with SHA-256 digests of the full private sources. Included in this article’s source bundle as sources/operational_record_extract.md.',None,None), |
| 196 | 'cudapp':('Stapleton, M. Drake (2026). Reverse Engineering the CUDA Software Stack: An Independently Implemented GPU Machine-Code Toolchain for the NVIDIA GB10. Version 2. Preprint.','https://doi.org/10.5281/zenodo.23677465','10.5281/zenodo.23677465'), |
| 197 | 'little1961':('Little, J. D. C. (1961). A proof for the queuing formula: L = λW. Operations Research, 9(3), 383–387.','https://doi.org/10.1287/opre.9.3.383','10.1287/opre.9.3.383'), |
| 198 | 'synresults':('AIEN (2026). Synapse swarm board benchmark results. Snapshot 099a980fedab8a6797bbf0358b8c5502c8045142.','https://github.com/aien-dev/synapse/blob/099a980fedab8a6797bbf0358b8c5502c8045142/evidence/swarm-board/RESULTS.md','Pinned results'), |
| 199 | 'workplan':('AIEN (2026). Finite swarm integration workstream plan. aien-architecture-mv issue 231. Repository issue, accessed 29 October 2026.','https://github.com/aien-dev/aien-architecture-mv/issues/231','Issue record'), |
| 200 | 'crumbam1':('AIEN (2026). Crumb RFC-0003 amendment 1: derive generated data on demand instead of committing it. aien-architecture-mv pull request 271, merged 18 October 2026 as 12ad0141b41ec67ef5aa51cb4e1815894c1083bb; migration pull requests aien-architecture-mv 272, aegis-runtime-mv 70, aien-protocols-mv 44, physics-mv 72, spark-rsi-mv 63 and synapse 117 merged 19 October 2026; aien-sovereign-core-mv 674 open on 29 October 2026.','https://github.com/aien-dev/aien-architecture-mv/pull/271','Pull request record'), |
| 201 | 'kapoor':('Kapoor, S., Stroebl, B., Siegel, Z. S., Nadgir, N., & Narayanan, A. (2025). AI agents that matter. Transactions on Machine Learning Research.','https://openreview.net/forum?id=Zy4uFzMviZ','Published paper'), |
| 202 | 'hart':('Hart, S. G., & Staveland, L. E. (1988). Development of NASA-TLX: Results of empirical and theoretical research. In Human Mental Workload, 139–183.','https://doi.org/10.1016/S0166-4115(08)62386-9','10.1016/S0166-4115(08)62386-9'), |
| 203 | 'swebench':('Jimenez, C. E., et al. (2024). SWE-bench: Can language models resolve real-world GitHub issues? ICLR.','https://arxiv.org/abs/2310.06770','arXiv:2310.06770'), |
| 204 | 'webarena':('Zhou, S., et al. (2024). WebArena: A realistic web environment for building autonomous agents. ICLR.','https://arxiv.org/abs/2307.13854','arXiv:2307.13854'), |
| 205 | } |
| 206 | ORDER=[] |
| 207 | def C(*keys): |
| 208 | for k in keys: |
| 209 | if k not in REF:raise KeyError(k) |
| 210 | if k not in ORDER:ORDER.append(k) |
| 211 | nums=sorted(ORDER.index(k)+1 for k in keys) |
| 212 | return '['+','.join(str(n) for n in nums)+']' |
| 213 | # DOCX helpers |
| 214 | D=Document();sec=D.sections[0];sec.page_width=Inches(8.5);sec.page_height=Inches(11);sec.top_margin=Inches(.68);sec.bottom_margin=Inches(.65);sec.left_margin=Inches(.82);sec.right_margin=Inches(.82) |
| 215 | for name in ['Normal','Body Text','Title','Subtitle','Heading 1','Heading 2','Heading 3','Caption']: |
| 216 | st=D.styles[name];st.font.name='Liberation Serif';st.font.color.rgb=RGBColor(0,0,0) |
| 217 | D.styles['Normal'].font.size=Pt(11) |
| 218 | D.styles['Normal'].paragraph_format.line_spacing=1.06;D.styles['Normal'].paragraph_format.space_after=Pt(7) |
| 219 | for name,size in [('Title',22),('Heading 1',15),('Heading 2',12),('Caption',9.3)]: |
| 220 | D.styles[name].font.size=Pt(size) |
| 221 | D.styles['Title'].paragraph_format.space_after=Pt(12) |
| 222 | D.styles['Heading 1'].paragraph_format.space_before=Pt(14);D.styles['Heading 1'].paragraph_format.space_after=Pt(8) |
| 223 | D.styles['Heading 2'].paragraph_format.space_before=Pt(10);D.styles['Heading 2'].paragraph_format.space_after=Pt(5) |
| 224 | D.styles['Caption'].font.italic=False;D.styles['Caption'].font.bold=False;D.styles['Caption'].paragraph_format.space_after=Pt(10) |
| 225 | D.core_properties.title=TITLE;D.core_properties.author=AUTHOR;D.core_properties.subject='Hive and swarm structures for coding-agent teams: control, flow, degradation, restoration and a constrained concurrency model' |
| 226 | D.core_properties.keywords='multi-agent systems; swarm intelligence; stigmergy; human supervisory control; agent orchestration; software engineering' |
| 227 | footer=sec.footer.paragraphs[0];footer.alignment=WD_ALIGN_PARAGRAPH.RIGHT |
| 228 | rr=footer.add_run(AUTHOR+' | '+('https://doi.org/'+PUB['doi']+' | ' if PUB.get('doi') else ''));rr.font.size=Pt(8);rr.font.color.rgb=RGBColor.from_string('626262') |
| 229 | fld=OxmlElement('w:fldSimple');fld.set(qn('w:instr'),'PAGE');footer._p.append(fld) |
| 230 | def para(text,style=None,boldlead=None): |
| 231 | p=D.add_paragraph(style=style) |
| 232 | if boldlead and text.startswith(boldlead):p.add_run(boldlead).bold=True;p.add_run(text[len(boldlead):]) |
| 233 | else:p.add_run(text) |
| 234 | return p |
| 235 | |
| 236 | def h(t,level=1):return D.add_heading(t,level=level) |
| 237 | def page():D.add_page_break() |
| 238 | def picture(name,caption,width=6.86): |
| 239 | p=D.add_paragraph();p.paragraph_format.space_after=Pt(3);p.paragraph_format.keep_with_next=True |
| 240 | r=p.add_run();r.add_picture(str(FIG/(name+'.png')),width=Inches(width));r._r.xpath('.//wp:docPr')[0].set('descr',caption) |
| 241 | para(caption,'Caption') |
| 242 | def table(headers,rows,widths,fs=9.3): |
| 243 | t=D.add_table(rows=1,cols=len(headers));t.alignment=WD_TABLE_ALIGNMENT.CENTER;t.autofit=False |
| 244 | for i,w in enumerate(widths):t.columns[i].width=Inches(w) |
| 245 | for i,head in enumerate(headers):t.rows[0].cells[i].text=head |
| 246 | for row in rows: |
| 247 | cs_=t.add_row().cells |
| 248 | for i,val in enumerate(row):cs_[i].text=str(val) |
| 249 | for ri,row in enumerate(t.rows): |
| 250 | for j,cell in enumerate(row.cells): |
| 251 | cell.width=Inches(widths[j]);cell.vertical_alignment=WD_CELL_VERTICAL_ALIGNMENT.CENTER |
| 252 | tcPr=cell._tc.get_or_add_tcPr();shd=OxmlElement('w:shd');shd.set(qn('w:fill'),'173F5F' if ri==0 else ('F2F6F8' if ri%2==0 else 'FFFFFF'));tcPr.append(shd) |
| 253 | mar=OxmlElement('w:tcMar') |
| 254 | for edge,val in [('top','75'),('bottom','75'),('left','95'),('right','95')]: |
| 255 | el=OxmlElement('w:'+edge);el.set(qn('w:w'),val);el.set(qn('w:type'),'dxa');mar.append(el) |
| 256 | tcPr.append(mar);borders=OxmlElement('w:tcBorders') |
| 257 | for edge in ['top','left','bottom','right']: |
| 258 | el=OxmlElement('w:'+edge);el.set(qn('w:val'),'single');el.set(qn('w:sz'),'4');el.set(qn('w:color'),'D9D9D9');borders.append(el) |
| 259 | tcPr.append(borders) |
| 260 | for p_ in cell.paragraphs: |
| 261 | p_.paragraph_format.space_after=Pt(0);p_.paragraph_format.line_spacing=1.02 |
| 262 | for rr_ in p_.runs: |
| 263 | rr_.font.size=Pt(fs);rr_.font.color.rgb=RGBColor(255,255,255) if ri==0 else RGBColor(0,0,0);rr_.bold=ri==0 |
| 264 | trPr=row._tr.get_or_add_trPr();cant=OxmlElement('w:cantSplit');trPr.append(cant) |
| 265 | rep=OxmlElement('w:tblHeader');t.rows[0]._tr.get_or_add_trPr().append(rep) |
| 266 | D.add_paragraph().paragraph_format.space_after=Pt(1) |
| 267 | return t |
| 268 | def tcaption(text): |
| 269 | p=para(text,'Caption');p.paragraph_format.keep_with_next=True;return p |
| 270 | # native OMML simple mathematical tree |
| 271 | M='{http://schemas.openxmlformats.org/officeDocument/2006/math}' |
| 272 | def mr(s): |
| 273 | e=OxmlElement('m:r');t=OxmlElement('m:t');t.text=s;e.append(t);return e |
| 274 | |
| 275 | def frac(a,b): |
| 276 | e=OxmlElement('m:f');num=OxmlElement('m:num');den=OxmlElement('m:den') |
| 277 | for x in a:num.append(x) |
| 278 | for x in b:den.append(x) |
| 279 | e.extend([num,den]);return e |
| 280 | |
| 281 | def sub(a,b): |
| 282 | e=OxmlElement('m:sSub');base=OxmlElement('m:e');base.append(mr(a));ss=OxmlElement('m:sub');ss.append(mr(b));e.extend([base,ss]);return e |
| 283 | |
| 284 | def sup(a,b): |
| 285 | e=OxmlElement('m:sSup');base=OxmlElement('m:e');base.append(mr(a));ss=OxmlElement('m:sup');ss.append(mr(b));e.extend([base,ss]);return e |
| 286 | |
| 287 | def equation(parts,num=None): |
| 288 | p=D.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;p.paragraph_format.space_before=Pt(4);p.paragraph_format.space_after=Pt(9) |
| 289 | om=OxmlElement('m:oMath') |
| 290 | for part in parts:om.append(mr(part) if isinstance(part,str) else part) |
| 291 | p._p.append(om) |
| 292 | if num:p.add_run(' ('+str(num)+')') |
| 293 | return p |
| 294 | |
| 295 | def hyperlink(p,text,url,size=None): |
| 296 | a=OxmlElement('w:hyperlink');a.set(qn('r:id'),p.part.relate_to(url,RT.HYPERLINK,is_external=True));r_=OxmlElement('w:r');pr=OxmlElement('w:rPr');co=OxmlElement('w:color');co.set(qn('w:val'),'173F5F');pr.append(co) |
| 297 | if size:sz=OxmlElement('w:sz');sz.set(qn('w:val'),str(int(size*2)));pr.append(sz) |
| 298 | r_.append(pr);tt=OxmlElement('w:t');tt.text=text;r_.append(tt);a.append(r_);p._p.append(a) |
| 299 | # TITLE BLOCK |
| 300 | para(TITLE,'Title') |
| 301 | p=para(AUTHOR);p.runs[0].bold=True;p.paragraph_format.space_after=Pt(2) |
| 302 | p=D.add_paragraph();p.paragraph_format.space_after=Pt(2) |
| 303 | ic=p.add_run();ic.add_picture(str(ROOT/'assets'/'orcid_id_icon.png'),height=Pt(10));ic._r.xpath('.//wp:docPr')[0].set('descr','ORCID iD') |
| 304 | for side in ('distT','distB','distL','distR'):ic._r.xpath('.//wp:inline')[0].set(side,'0') |
| 305 | p.add_run(' ').font.size=Pt(10);hyperlink(p,'https://orcid.org/'+ORCID,'https://orcid.org/'+ORCID,10) |
| 306 | p=para(AFFILIATION);p.runs[0].font.size=Pt(10.5);p.paragraph_format.space_after=Pt(2) |
| 307 | p=para('Research article | '+VERSION+' | '+DATE);p.runs[0].font.size=Pt(9.5) |
| 308 | if PUB.get('doi'): |
| 309 | p.add_run(' | DOI ').font.size=Pt(9.5);hyperlink(p,PUB['doi'],'https://doi.org/'+PUB['doi'],9.5) |
| 310 | h('Abstract') |
| 311 | para('Multi-agent coding systems are often called swarms. I argue that the arrangement that delivers accountable software is structurally different, and I call it a hive. In a swarm, agents choose their own work from local cues, coordinate through a shared medium, and the result emerges from their interactions. In a hive, every agent holds an assignment, writes only inside an owned lane, reads lateral messages as data rather than commands, and one human holds acceptance and stopping authority. Drawing on swarm intelligence, social-insect biology, supervisory control and manufacturing control, I define the two structures on four axes: who selects work, what lateral signals mean, who may write shared state, and how work ends. Central direction is feasible only while an informed supervisor and a system-wide channel exist. I then examine a dated operational record from my own AIEN agent hive between 13 and 28 October 2026, in which the hive repeatedly degraded into swarm-like behavior. Seven mechanisms recur: overlapping authority, coupling through shared derived state, tool drift, channel fragmentation, supervisor saturation or loss, exclusive-resource breaches and unreconciled duplicate work. Every recorded recovery followed the same sequence: stop, one owner per resource, re-issued lanes and a reconciled ledger. A constrained concurrency model shows how review capacity bounds useful concurrency. The record is retrospective, self-reported and uncontrolled. It supports a mechanism taxonomy and preregisterable hypotheses, including a fault-injection design, not causal claims.') |
| 312 | para('Keywords: multi-agent systems; swarm intelligence; stigmergy; human supervisory control; agent orchestration; coordination; software engineering; reproducibility; theory of constraints; constrained optimization',boldlead='Keywords:') |
| 313 | # 1 |
| 314 | h('1 The engineering question') |
| 315 | para('The practical question is not how many agents can be launched. It is how many can make independent, useful progress while a human can still inspect their evidence, resolve conflicts and decide when the work is acceptable. Parallel implementation creates value only when its outputs can be reconciled into a trustworthy system. Otherwise, apparent throughput may conceal duplicated work, incompatible interfaces, unreviewed assumptions or unverifiable completion claims.') |
| 316 | para('Teams of coding agents are commonly described as swarms. The word promises many workers, no bottleneck and intelligence arising from local interaction; it also implies that no one is responsible for the result. The team I run is deliberately the opposite arrangement, and I call it a hive. I frame the unit of progress as an accepted change with traceable evidence rather than a message, generated line of code or closed issue. This framing builds on Human-Directed Agentic Engineering (HDAE), as documented by Gregory M. Kurtzer with one persistent agent task '+C('kurtzer')+', and on AIEN’s issue-first delivery protocol '+C('issuefirst')+'. Extending the two-loop split from one agent to many concurrent lanes is the contribution of this article, not a claim made by the HDAE report.') |
| 317 | para('The article asks three linked questions. What structurally distinguishes a hive from a swarm? How is a hive controlled, and how does work flow through it? Under what conditions does a hive degrade into a swarm, and how is it restored? It contributes a four-axis definition, an inventory of control mechanisms with their enforcement status, a mechanism taxonomy drawn from a dated operational record, a constrained concurrency model, and an evaluation design that includes deliberate disruption. Each contribution is labeled by the kind of evidence that supports it.') |
| 318 | # 2 |
| 319 | h('2 Position within established work') |
| 320 | h('2.1 Swarms and self-organization',2) |
| 321 | para('Swarm intelligence describes systems “composed of simple interacting agents” in which intelligence “lies in the networks of interactions among individuals and between individuals and the environment”; its models explicitly replace “an emphasis on control, preprogramming, and centralization with designs featuring autonomy, emergence, and distributed functioning” '+C('bonabeau1999')+'. In Reynolds’s flocks, each simulated bird navigates by local perception and the aggregate motion emerges, as an alternative to scripting each path '+C('reynolds1987')+'. Ant System combines positive feedback, distributed computation and probabilistic transitions '+C('dorigo1996')+'. Much of this coordination is stigmergic: workers coordinate by modifying a shared environment rather than by instructing one another '+C('grasse1959','theraulaz1999')+'.') |
| 322 | para('These properties have value. The same literature credits swarms with flexibility and robustness when individual members fail '+C('bonabeau1999')+'. They also explain why swarm outcomes are hard to predict and to attribute. Credit lies in the network rather than in any member; positive feedback and stochastic choice make individual trajectories irreproducible; and collective-motion models show qualitative changes of group state from small changes in individual rules. Vicsek and colleagues reported an order–disorder transition as noise increases '+C('vicsek1995')+'; later work found that onset to be discontinuous '+C('gregoire2004')+'; and Couzin and colleagues found history dependence, or “collective memory,” across such transitions '+C('couzin2002')+'. I use these physical and biological results only as analogies for agent teams. No cited study establishes a phase transition in teams of language-model agents.') |
| 323 | h('2.2 What a biological hive is, and why the word is used anyway',2) |
| 324 | para('The word “hive” is borrowed loosely, and the biology does not support a command metaphor. A honeybee colony is a standard example of self-organization. Division of labor is commonly modeled as emerging from workers responding to local stimuli, although the models remain exploratory '+C('beshers2001','duarte2012')+'. Swarming is a regulated part of the colony’s reproductive cycle, not a failure '+C('winston1987','seeley2010')+'. Here, “hive” names a controlled build of software agents, not a claim about bees.') |
| 325 | para('Biology does state when centralized control replaces self-organization. Seeley argues that self-organization is used when subunits lack the communication or computational abilities to implement central control, which “requires a well informed and highly intelligent supervisor” and a system-wide communication network '+C('seeley2002')+'. He adds that self-organized subunits need not have low cognitive abilities. The case for a software hive therefore cannot rest on agents being incapable. It rests on the supervisor and the channel being available, and on accountability being required.') |
| 326 | para('One finding supplies a precise analogy for degradation. Winston and colleagues found that pheromone treatment delayed swarming in uncongested colonies but not in congested ones, consistent with congestion reducing the transmission of queen mandibular pheromone within the nest and thereby removing its inhibition of queen rearing and swarming '+C('winston1991')+'. The inhibitory signal is still produced; it stops arriving. Section 6 describes the software counterpart, in which assignment and ownership stop reaching the agents and the agents act on local cues.') |
| 327 | h('2.3 Human supervisory control',2) |
| 328 | para('Parasuraman, Sheridan and Wickens separate information acquisition, information analysis, decision and action selection, and action implementation as targets of automation, and warn that automation imposes new coordination demands on the operator '+C('parasuraman2000')+'. The hive automates implementation and much of acquisition and analysis, while keeping acceptance and stopping decisions with the human. Crandall and colleagues use neglect tolerance, the time an autonomous agent can run unattended before its performance decays, to identify the maximum number of robots one person can manage under independence assumptions '+C('crandall2005')+'. Cummings and Mitchell found that predicted operator capacity dropped by up to 67% once wait times were included, with loss of situation awareness the primary source '+C('cummings2008')+'. These results make the supervisor, not the agents, the expected binding constraint.') |
| 329 | h('2.4 Language-model agent teams',2) |
| 330 | para('AutoGen supports conversational agents combining models, tools and human inputs '+C('autogen')+', and ChatDev organizes agents around software-development roles '+C('chatdev')+'. A failure analysis of more than 1,600 annotated traces across seven frameworks attributes many failures to organizational design and coordination rather than to individual agents, including disobeying role specifications, task derailment, unawareness of termination conditions and incomplete verification '+C('cemri')+'. A controlled comparison of 260 configurations found that the effect of coordination depends on the task, ranging from +80.8% on decomposable financial reasoning to −70.0% on sequential planning relative to a single agent. It also found that architectures without centralized verification propagate errors more '+C('kim')+'. The same study found decentralized peer debate competitive with central orchestration on several benchmarks, its orchestrator was itself a model rather than a human, and multi-agent configurations slightly underperformed a strong single agent on SWE-bench Verified. A practitioner report notes that small changes to a lead agent can unpredictably change subagent behavior and that most coding tasks contain fewer truly parallelizable parts than research '+C('anthropic2025')+'.') |
| 331 | para('The closest public example of a coding swarm in the sense used here is Carlini’s compiler experiment. Agents claimed tasks by writing lock files to a shared repository, with no orchestration agent, and each picked the “next most obvious” problem. When the work became one coupled task, compiling the Linux kernel, “every agent would hit the same bug, fix that bug, and then overwrite each other’s changes”; progress resumed when a reference compiler was used as an oracle to split the work again '+C('carlini2026')+'. The swarm delivered a working compiler, so the example shows that swarms can deliver with a strong oracle and independent tasks. It also shows how they stall when work couples.') |
| 332 | h('2.5 Manufacturing lineage',2) |
| 333 | para('The protocol did not come from the agent literature. It came from my years as a chemist and manufacturing engineer, where I worked with Six Sigma, DMAIC, kaizen, line balancing, standard work and change control, and where an unmeasured change to a running line is not an option. I guide the hive the way I would guide a plant. Each correspondence below is an analogy that motivated a design choice, not evidence that the software process performs like a production line.') |
| 334 | para('The issue contract is standard work and a work instruction: it fixes the starting condition, the steps that are in scope and the observation that ends the job '+C('ohno')+'. The acceptance gates are a control plan: each names the measurement, its pass rule and how an out-of-control result is recorded '+C('aiag')+'. The evidence receipt is a batch record, tied to exact inputs, equipment and operator. Exclusive path ownership is station ownership on a balanced line, and a shared interface that must stay serial is a constraint station. The two loops follow plan-do-check-act '+C('deming')+' and DMAIC '+C('harry')+': the human defines and measures, agents analyze and improve inside the lane, and the human controls through acceptance.') |
| 335 | para('“Control” here carries Shewhart’s meaning: a process is controlled when its variation has been reduced to chance causes so that limits can be set within which it may be expected to remain '+C('shewhart1930')+'. A hive is in control when lane outputs fall within their gates; a swarm, in this vocabulary, is a process with assignable causes acting on it. The theory of constraints supplies the reading of the concurrency model in Section 7 '+C('goldratt')+': adding agents is adding stations, and throughput is set by the slowest step, which in the worked example is human review. Jidoka supplies the stop rule. Toyota describes stopping immediately when abnormalities are detected, so that “people need only respond when there is an abnormality” '+C('toyota','liker')+'. In the hive, any agent that finds a defect it cannot resolve inside its lane stops and reports instead of passing it downstream.') |
| 336 | picture('01_two_loop_architecture','Figure 1. Two-loop architecture. The human owns the objective, constraints, acceptance and stopping decisions. Agents execute bounded implementation and diagnostic loops. This is a normative process model, not evidence that every historical run followed the process.') |
| 337 | # 3 |
| 338 | h('3 Hive and swarm: a structural distinction') |
| 339 | para('The distinction is not between direction and its absence. Couzin and colleagues show that a small informed minority can steer a group accurately without signalling or assigned roles '+C('couzin2005')+'. Nor is it between stigmergy and its absence: a shared repository, a message board and a lock file are stigmergic media in both arrangements. The distinction lies in four structural choices, summarized in Table 1 and Figure 2.') |
| 340 | tcaption('Table 1. Swarm and hive compared on four structural axes, with what each design buys and costs. The AIEN column names the mechanism used in the system examined here.') |
| 341 | table(['Axis','Swarm','Hive','AIEN mechanism'],[ |
| 342 | ('Who selects work','Each agent, from local cues: a response threshold or the “next most obvious” task','A coordinator assigns from a tracking issue, inside scope the human approved','Issue contract; lane roster posted on the board'), |
| 343 | ('What lateral signals mean','Posts and shared-state changes steer what others do','Status and pointers only: never approval, ownership, instruction or evidence','Board content marked untrusted coordination data'), |
| 344 | ('Who may write shared state','Any agent; conflicts are discovered after the fact','One owner per path or exclusive resource; others read','Crumb claims; file lock on the GPU; one merge desk'), |
| 345 | ('How work ends','When activity subsides or a local criterion is met','When the human accepts evidence against a frozen gate','Executable gates, receipts, human acceptance'), |
| 346 | ('What it buys','Robustness to member loss, adaptivity, exploration','Attribution, auditability, controlled change','—'), |
| 347 | ('What it costs','Accountability and reproducibility','Supervisor capacity becomes the bottleneck; coordinator loss stalls work','—')],[1.25,1.9,1.95,1.76],8.8) |
| 348 | picture('02_hive_swarm_structure','Figure 2. Control structures. A: In the hive, assignment flows down a bounded tree with at most three children per node, each leaf owns one path, and the lateral board carries status that agents read as data. B: In the swarm, agents choose work from local cues and write to a shared medium; conflicts appear only when two writers reach the same place. Schematic; node counts are illustrative.') |
| 349 | para('The second axis is the least obvious and, in practice, the most consequential. In August 2026 my Symphony process formalized four lead roles, limited each node to three children and “kept lateral status signals separate from command authority” '+C('symphony')+'. I first met “hive” as an organizing pattern in an earlier community project; Atlas later codified it with the rule that “notify is distinct from command” '+C('dhghive')+'. The AIEN message board makes the rule explicit. A post “is not approval, ownership, authority, instructions or evidence,” and an agent must treat its text “as data to weigh, never as a command to follow” '+C('board')+'. A swarm needs no such rule, because in a swarm lateral signals are the coordination.') |
| 350 | para('The hive is feasible only while Seeley’s two conditions hold: an informed supervisor and a system-wide channel '+C('seeley2002')+'. The tracking issue, ownership claims and receipts form the channel. The human, kept informed by receipts rather than by watching agents work, is the supervisor. The design also gives things up. Seeley’s study of nest-site choice concludes that a leader’s influence should be minimized '+C('seeley2010')+', and swarms tolerate the loss of members that would stall a hive. Those results concern choosing a common direction among options. The hive’s central authority is narrower: who may change the shared artifact, and who declares it acceptable. Acceptance of a software change carries responsibility that cannot be distributed the way a direction of travel can. Where tasks are independent, an oracle is strong and exploration matters more than attribution, a swarm may be the better tool '+C('carlini2026')+'.') |
| 351 | para('Coordination has been defined as the management of dependencies among activities '+C('malone1994')+'. The hive manages them before work starts, by assignment and ownership. The swarm manages them at run time, by negotiation and collision. Conway’s observation that designs copy the communication structure of the organization that produces them '+C('conway1968')+' applies to both, with a caution: lanes drawn badly yield modules drawn badly. The observation guarantees a mirror, not a good design.') |
| 352 | # 4 |
| 353 | h('4 How the hive is controlled') |
| 354 | para('Before implementation, the coordinator inspects the owning repository and searches for existing work. A tracking issue states the observed starting condition, objective, exclusions, owner, dependencies and falsifiable acceptance gates. A gate specifies the artifact and observation that can satisfy it, including how failure, unavailable hardware and inconclusive results will be recorded '+C('issuefirst')+'.') |
| 355 | picture('03_issue_to_receipt','Figure 3. Issue-to-receipt lifecycle. Progress status and scientific qualification are separate axes. An experiment can be complete with a FAIL verdict when its purpose was to test a proposition and report the result. Closure without a satisfied contract requires an explicit cancellation or supersession reason '+C('issuefirst')+'.') |
| 356 | para('The coordinator partitions the task only where interfaces and ownership are sufficiently stable. Parallel workers receive exclusive write paths and isolated worktrees or branches. Dependencies that change a shared interface remain serial until that interface is agreed. “One writer per path” constrains implementation conflicts; it does not prohibit multiple readers or guarantee semantic consistency across different files. Each node directs at most three children, and agents report to their parent in short structured messages rather than broadcasting instructions to peers '+C('symphony')+'.') |
| 357 | para('Every implementation pull request references its tracking issue and advances a bounded gate. Verification preserves exact commands, outputs, commit identities, machine conditions and negative tests. A separate reviewer can inspect the evidence, but independence must be established through access, environment and information boundaries rather than assumed from a different agent name. The policy explicitly allows UNISOLATED or INCONCLUSIVE reporting where independent qualification has not occurred '+C('issuefirst')+'. Reconciliation updates the ledger with merged identities, evidence and remaining defects. A closed issue or green check is insufficient to establish a scientific discovery, security property or hardware qualification.') |
| 358 | h('4.1 Control levers and their enforcement',2) |
| 359 | para('A control is only as strong as its enforcement. Table 2 lists the levers used in AIEN and states, for each, whether the record shows technical enforcement or only policy.') |
| 360 | tcaption('Table 2. Hive control levers in AIEN and the enforcement observed. Policy-only levers depend on agents and reviewers following the rule.') |
| 361 | table(['Lever','Implementation','Enforcement observed'],[ |
| 362 | ('Assignment','Tracking issue and lane roster; pull requests reference the issue '+C('issuefirst'),'Policy. The protocol states that it must not be described as technically enforced merely because templates exist.'), |
| 363 | ('Exclusive write paths','Crumb claim refuses a held directory; isolated worktrees '+C('crumb'),'Technical for agents that call the claim tool; direct edits bypass it.'), |
| 364 | ('Exclusive hardware','A file lock serializes GPU use; time-capped pauses of the live model '+C('oprecord'),'Technical when the lock is taken; one unlocked run was self-reported on 27 October.'), |
| 365 | ('Bounded span','At most three children per node; one owner per lever after incidents '+C('symphony','oprecord'),'Policy, restated in each restoration.'), |
| 366 | ('Lateral semantics','Board posts carry an untrusted-data notice '+C('board'),'The label is technical; reading posts as data is policy.'), |
| 367 | ('Gates and receipts','Executable gates; operator merges pinned to the judged commit '+C('oprecord'),'Technical: a moved head is refused. Gate configuration changes need a human operator run.'), |
| 368 | ('Stop rule','Halt and report on abnormality; human-only hardware and release decisions','Policy, exercised repeatedly in the record.')],[1.35,2.85,2.66],8.8) |
| 369 | para('Repository counts show why the policy-only levers matter. In aien-dev/aien-architecture-mv, 184 pull requests were opened between the repository’s first pull request on 23 September and the issue-first adoption on 12 October 2026, and 62 on or after it, through 28 October. GitHub’s formal closing-issue link was present on 4 of the earlier and 2 of the later pull requests; a looser match for any issue number in the title or body found 106 and 39. These are descriptive counts from one repository under one query, not an estimate of the protocol’s effect: the protocol asks intermediate pull requests to reference an issue and reserves closing keywords for completed work, which GitHub’s closing-link field does not capture. The data and recount script are in the source bundle.') |
| 370 | h('4.2 Minimum evidence receipt',2) |
| 371 | para('A receipt should preserve the issue and gate identity; immutable source and patch identities; execution command and relevant configuration; machine, model and tool versions; start and end times; outputs and errors; expected and observed results; negative controls; reviewer identity and independence boundary; and a qualification verdict. Content hashes detect changes to recorded artifacts. Without an authenticated signing process, they are integrity references rather than cryptographic signatures proving who produced the result '+C('cudapp')+'.') |
| 372 | # 5 |
| 373 | h('5 Hive dynamics: how work flows') |
| 374 | para('Viewed as a production line, each lane is a station, open lanes are work in process, and human acceptance is the designed constraint. Little’s law states that, for a stationary system with finite means, average work in process equals throughput multiplied by average time in the system '+C('little1961')+'. Read for a hive, and subject to those conditions, a fixed acceptance rate means that every additional open lane lengthens the average time from assignment to acceptance. Open lanes are inventory. The concurrency model in Section 7 makes the same point from the review budget.') |
| 375 | para('Lateral flow is the second channel. The board lets agents publish completions, blockers and pointers to receipts once, so that parents and siblings can find them without the coordinator reposting each message. Its benchmark measured writers, messages and storage operations on one shared host, one run per condition, with different durability contracts between compared mechanisms '+C('synresults','board')+'. It is useful implementation evidence, but it does not measure complete engineering tasks or establish an optimal agent count. Similarly, a seven-lane work plan is a decomposition into workstreams; it does not show that seven models ran concurrently or that seven was optimal '+C('workplan')+'. A local shared-filesystem convention such as the Crumb protocol is not a distributed coordination service across machines '+C('crumb')+'.') |
| 376 | para('The third property, independence of lanes, is what makes a hive more than a queue. Lanes are independent when merging one does not invalidate another. The record shows how that independence is lost. AIEN once committed directory summaries that rolled up the whole tree below them, so “any two PRs rewrite the same lines,” and every merge forced every other open pull request to rebase, recompile and be judged again '+C('oprecord')+'. Exclusive ownership of source paths did not prevent this, because the coupling ran through derived state that every lane carried. In flow terms, parallel stations became a single coupled station: the condition Carlini describes for a swarm stuck on one coupled task. The chosen cure was structural: stop committing derived data and compute it on demand. The amendment merged on 18 October and six repositories merged their migrations by 19 October; the core repository’s migration was still open on 29 October '+C('crumbam1')+'. On 24 October that repository had 30 of 53 open pull requests in conflict, and a rebase train was installed to keep refreshing them '+C('oprecord')+'. A structural fix restores independence only where it has landed.') |
| 377 | para('Flow also depends on continuity at the top. When a coordinator session ends, its children’s reports can arrive at a session that no longer exists. The record shows takeovers in which a new coordinator watched for the old one’s files, and an order that every worker keep a restartable state file and report in at most 150 words '+C('oprecord')+'. Handoff discipline is part of the hive’s channel, not an administrative extra.') |
| 378 | # 6 |
| 379 | h('6 From hive to swarm: an operational record') |
| 380 | h('6.1 Source and method',2) |
| 381 | para('The source is the AIEN coordination board, an append-only text log in which agent sessions and coordinators post status lines, together with four handoff notes written at the end of incidents. All were copied read-only on 29 October 2026. I searched them for entries describing duplicated work, collisions, overlapping control, stalled merges, rule breaches and their resolution, and kept entries whose text states both what happened and what was done. The extract in the source bundle quotes each line used, gives its file and line number, and records the SHA-256 digest of each full source file '+C('oprecord')+'. Most entries were written by AI agents and coordinators, some quoting me. The record is retrospective, selected by the author and self-reported. It has no denominators and no control period. Counts are those printed in the entries, not recounted.') |
| 382 | h('6.2 Episodes',2) |
| 383 | tcaption('Table 3. Disruption episodes in the AIEN record, 13–28 October 2026. Mechanism codes follow Section 6.3. Sources: H13, H16, H18 and H19 are handoff notes of those dates; B is the board line number '+C('oprecord')+'.') |
| 384 | table(['Date','What the record shows','Mech.','Restoration recorded'],[ |
| 385 | ('13 Oct','Three main sessions “had split the same levers between them and all helpers died mid-task” (H13)','M1','One session named single owner; one worker per lever; restartable state files; at most two sub-workers'), |
| 386 | ('14 Oct','A seal script followed a shared pointer into another lane’s folder and rewrote its checksums; a second model server ran beside the live one for about two minutes, recorded as a rule breach; a coordinator session ended mid-task (H13)','M6, M5','Lane re-sealed; scripts fixed; new coordinator took over from files'), |
| 387 | ('16 Oct','69 of 73 open pull requests stuck; another session rebasing the same repository concurrently; the operator wrote “I don’t know what I’m looking for” (H16)','M1, M2, M5','Two independent reviews per sensitive change; one command with pinned commits for the operator'), |
| 388 | ('18–19 Oct','70 failed directory-summary checks; 93 open pull requests conflicted only on generated files; four consumers chose the checking tool four different ways (H18, H19)','M2, M3','Stop committing derived data (amendment accepted, migrations opened); one tool for every consumer; drift alarm'), |
| 389 | ('21 Oct','A test harness read a process-id file another lane had overwritten, stopped the wrong process and left a server holding a lock for about 30 minutes while 10 jobs queued (B26)','M6','Orphan stopped; harness changed to stop the process it started'), |
| 390 | ('22 Oct','Agent fleet down at a weekly usage cap; no worker processes; next merge train never built (B162)','M5','Critical path carried in a separate session; no live changes without the coordinator chain'), |
| 391 | ('24 Oct','141 open pull requests and zero clean; 15 of 20 sampled conflicted only on generated files; branch owners unavailable (B179)','M2, M5','Rebase train; then “single desk restored” (B180–181)'), |
| 392 | ('25 Oct','Consolidation: “no duplicates, everyone in one direction”; nine dormant sessions and a duplicate gate run stopped (B436–438)','M7','Each live session given only named lanes'), |
| 393 | ('25 Oct','Seven collaboration rooms opened automatically; the team “was talking in seven private rooms” (B513)','M4','One room; automatic room creation disabled'), |
| 394 | ('26 Oct','An agent retiring a duplicate watch stopped a full qualification sweep by mistake (B597)','M7','Sweep re-queued; no result recorded from the aborted run'), |
| 395 | ('27 Oct','A chip test ran without the GPU lock; self-reported as an incident (B1045)','M6','Output not used as a receipt; locked rerun required'), |
| 396 | ('28 Oct','Duplicate pull requests closed; 625 open pull requests in the initial inventory, not yet reviewed (B1757)','M7','Inventory and batch triage begun')],[.62,3.0,.62,2.62],8.4) |
| 397 | h('6.3 Seven mechanisms',2) |
| 398 | para('The episodes group into seven mechanisms. Each removes one of the conditions that make central direction feasible: an informed supervisor, a working channel, exclusive ownership of the shared medium, or a single authority per resource.') |
| 399 | para('M1, overlapping authority. Two or more coordinators act on the same resource. On 13 October three sessions each directed work on the same performance levers, and their helpers stalled together. In MAST terms this resembles disobeyed role specifications and derailment '+C('cemri')+', but the root cause sat above the agents, in the allocation of authority.',boldlead='M1, overlapping authority.') |
| 400 | para('M2, coupling through shared derived state. Lanes that own disjoint source paths still conflict when they all carry generated state. This is stigmergic coupling the ownership map did not cover, and it turned every merge into a disturbance for every other lane.',boldlead='M2, coupling through shared derived state.') |
| 401 | para('M3, tool and configuration drift. Consumers of the same rule chose different tool builds, so one pull request could be stale to one judge and current to another. Drift splits a single control plan into several, which is how a controlled process acquires assignable causes.',boldlead='M3, tool and configuration drift.') |
| 402 | para('M4, channel fragmentation. When each session opened its own room, the system-wide channel Seeley identifies as a precondition for central control was replaced by private ones.',boldlead='M4, channel fragmentation.') |
| 403 | para('M5, supervisor saturation or loss. The operator’s capacity to judge is finite '+C('cummings2008')+', and so is a coordinator session’s context and usage budget. When either is exhausted, work waits or proceeds unsupervised. This is the software counterpart of congestion blocking the inhibitory signal '+C('winston1991')+'.',boldlead='M5, supervisor saturation or loss.') |
| 404 | para('M6, exclusive-resource breach. A shared pointer, a shared process-id file or an unlocked device turns an owned resource into a common one. Each breach in the record was small and quickly reported; each was also a point at which one lane silently changed another’s state.',boldlead='M6, exclusive-resource breach.') |
| 405 | para('M7, unreconciled duplicate work. Sessions that outlive their assignments, or start without checking existing claims, duplicate one another. The duplicates also generate collateral damage when they are cleaned up.',boldlead='M7, unreconciled duplicate work.') |
| 406 | picture('04_hive_swarm_transition','Figure 4. Hive-to-swarm degradation and restoration as observed in the AIEN record. Disruption mechanisms M1–M7 remove the conditions for central direction; recovery in every recorded case was an explicit rebuild, not a spontaneous return. Process diagram, not a measured state space.',5.9) |
| 407 | h('6.4 Restoration is explicit',2) |
| 408 | para('Every restoration in Table 3 had the same shape: stop the affected work, name one owner per resource, re-issue lanes from the issue, and reconcile the ledger by closing duplicates and recording what was lost. None of the records describes a hive that reassembled itself once the disturbance passed. This matches the history dependence reported for collective motion '+C('couzin2002')+', again as analogy only. Restoring the coordinator does not by itself restore the assignments the agents last acted on. It also matches jidoka: the line is stopped, the abnormality is resolved, and the line restarts in a known state '+C('toyota')+'.') |
| 409 | h('6.5 A note on the word “swarm” in the record',2) |
| 410 | para('The record uses “swarm” loosely, and honesty requires saying so. A workstream plan is titled “Finite swarm integration” '+C('workplan')+', the message board is called a swarm board '+C('board')+', and on 27 October the coordinator logged “swarm restarted Omega-first, max 100 agents” with eight lanes, “each with at most 3 children” '+C('oprecord')+'. These labels predate the distinction drawn here. By the definition in Section 3, a configuration with assigned lanes, a branching cap and human acceptance is a hive whatever it is called. The episodes in Table 3 are the moments when it behaved like a swarm.') |
| 411 | h('6.6 Observable indicators of hive integrity',2) |
| 412 | para('The mechanisms suggest indicators that can be logged prospectively rather than reconstructed afterwards: the number of active owners per resource; writes outside an agent’s claimed paths; uses of an exclusive resource without its lock; duplicate claims or duplicate pull requests for the same change; merge conflicts confined to derived or generated files; open work in process and its age at the acceptance station; and the number of active coordinators and channels per mission. In a hive the first five should stay at or near zero and the last two should stay bounded. Their joint growth is the signature of degradation. These indicators are proposed, not yet measured in a controlled way.') |
| 413 | # 7 |
| 414 | h('7 A constrained model of useful concurrency') |
| 415 | para('Let n be the number of concurrently active implementation agents assigned genuinely parallel-safe work, not the count of issue lanes or named roles. I use a deliberately simple model of elapsed completion time. Duration parameters are nonnegative and expressed in minutes; A > 0 and n is dimensionless.') |
| 416 | equation(['T(n) = S + ',frac([mr('A')],[mr('n')]),' + b(n − 1) + ',frac([mr('cn(n − 1)')],[mr('2')]),' + ',sub('r','0'),' + rn'],1) |
| 417 | para('S represents work that remains serial; A is the parallelizable work at unit-agent speed; b captures linear launch and integration overhead; c assigns an average cost to potential pairwise coordination; and r₀ + rn models fixed and per-agent review. The additive form treats these overheads as serial contributions to the critical path. If review overlaps execution or work is unbalanced, this approximation must be replaced or empirically corrected.') |
| 418 | equation(['n = 1, 2, …, P; ',sub('r','0'),' + rn ≤ H, 1 − ',sup('(1 − p)','n'),' ≤ ε'],2) |
| 419 | para('P is the available number of independent implementation slots, H is the human review budget, p is a residual failure probability for each essential output, and ε is the tolerated probability of at least one such failure. The last expression assumes independent, equally risky outputs and that every assigned output is required. It does not describe redundant agents voting on the same answer. Correlated errors, heterogeneous difficulty and task-dependent p require a different reliability model. In the language of Section 6, H is the supervisor’s capacity: exceeding it is mechanism M5, and the coupling of M2 raises the effective c.') |
| 420 | tcaption('Table 4. Hypothetical inputs for the worked example. These values are selected for illustration, not estimated from AIEN or CUDA++ execution logs.') |
| 421 | table(['Quantity','Value','Meaning'],[ |
| 422 | ('S and A','10 and 120 min','Serial work and parallelizable work'), |
| 423 | ('b and c','0.8 and 0.15 min','Linear and pairwise coordination coefficients'), |
| 424 | ('r₀ and r','3 and 0.5 min','Fixed and per-agent review time'), |
| 425 | ('H and P','6 min and 16','Review budget and implementation-slot cap'), |
| 426 | ('p and ε','0.01 and 0.08','Per-output residual risk and aggregate risk cap')],[1.3,1.6,3.96]) |
| 427 | h('7.1 Feasibility before optimization',2) |
| 428 | para('For r > 0, review permits at most floor((H − r₀)/r) agents. For 0 < p < 1 and 0 ≤ ε < 1, the independence model permits at most floor(log(1 − ε)/log(1 − p)) agents. The feasible upper bound is the smallest of those bounds and P. If it is below one, the problem is infeasible; the correct response is to change the work contract or resources, not silently discard a constraint.') |
| 429 | para('Under Table 4, review permits six agents and the risk constraint permits eight. Consequently, the feasible set is {1, …, 6}. The review budget is the binding constraint in this example. The counts are properties of the chosen inputs and assumptions, not recommended defaults for real work. When independence is unavailable, np ≤ ε is a conservative sufficient constraint by the union bound, provided each output has failure probability at most p.') |
| 430 | # 8 |
| 431 | h('8 Analytic and numerical consequences') |
| 432 | para('For positive n and A > 0 with c ≥ 0, the continuous relaxation has strictly positive second derivative. This supplies a single basin for the time objective, while the actual decision remains integer-valued.') |
| 433 | equation(['T′(n) = −',frac([mr('A')],[sup('n','2')]),' + b + c(n − ½) + r'],3) |
| 434 | equation(['T″(n) = ',frac([mr('2A')],[sup('n','3')]),' + c > 0'],4) |
| 435 | para('The exact change when adding one agent is particularly interpretable. Another worker helps the time objective only while the saved parallel work exceeds the marginal coordination and review cost.') |
| 436 | equation(['T(n + 1) − T(n) = −',frac([mr('A')],[mr('n(n + 1)')]),' + b + cn + r'],5) |
| 437 | picture('05_constrained_cost','Figure 5. Hypothetical model evaluation. A: The feasible minimum is six agents at 42.25 min. The unconstrained integer minimum, seven agents at approximately 41.59 min, exceeds the review budget. B: Normalized review and risk utilization show why feasibility must be checked separately from the time curve. Lines interpolate discrete counts; no measurements are plotted.') |
| 438 | para('At n = 6, the model gives 6.0 min of review and an aggregate essential-output failure probability of approximately 5.852%. At n = 7, review rises to 6.5 min, above the 6 min limit, although modeled completion time is lower. T(1) = 133.5 min, so the feasible model ratio T(1)/T(6) is approximately 3.160. The continuous stationary point is n ≈ 7.2124. That ratio is a consequence of the toy model, not a measured speedup or a claim about real development productivity.') |
| 439 | para('Selected one-factor checks further illustrate the conditional result. Raising H to 10 min admits n = 7 at 41.59 min. Doubling p to 0.02 instead limits the optimum to n = 4 at 48.30 min. Raising c to 0.6 min yields n = 5 at 48.70 min. All other inputs remain fixed.') |
| 440 | # 9 |
| 441 | h('9 Sensitivity and operational interpretation') |
| 442 | picture('06_sensitivity','Figure 6. Sensitivity of the optimal feasible integer count to review budget H and pairwise coordination coefficient c. All other inputs remain as in Table 4. Each cell is an exact enumeration of feasible n = 1,…,16 under the hypothetical model. The orange outline marks the Table 4 setting. The fixed risk assumption caps feasible concurrency at eight.') |
| 443 | para('The sensitivity grid demonstrates why a single preferred count is not a scientific conclusion. At low review budgets, adding available compute does not improve feasibility. Once the review constraint relaxes, coordination cost can become limiting. With negligible pairwise cost, the fixed risk cap still prevents unlimited concurrency. The diagram is a model response surface, not a fitted map of AIEN behavior.') |
| 444 | h('9.1 Scheduling should follow task structure',2) |
| 445 | para('The same integer n can represent very different systems. Independent tests across disjoint modules may expose substantial parallel work; repeated modification of a shared schema may expose almost none. The coordinator should therefore estimate parallel-safe work and dependencies before selecting n, and revise the estimate when interface conflicts or review queues accumulate. This is line balancing applied to agent lanes: work is divided so that no station waits on another, and the review station is sized before more implementation stations are added. Model parameters should be calibrated on held-out traces rather than chosen to rationalize a favored team size.') |
| 446 | para('Potential pairwise edges grow as n(n − 1)/2, but actual communication can be sparse. A bounded tree with at most three children per node limits each coordinator’s direct reports regardless of n, at the cost of more levels. A well-designed coordinator may reduce c by limiting unnecessary cross-talk, yet create its own bottleneck. If structured handoffs lower review time, they can improve both the objective and the feasible region. Those are testable mechanisms, not assumed benefits.') |
| 447 | h('9.2 Model boundaries',2) |
| 448 | para('The model omits model heterogeneity, unequal subtask duration, delayed failures, correlated errors, retries, task reallocation, context growth, token costs, queues and changing human fatigue. It is also static: it cannot represent the degradation and restoration of Section 6, in which the parameters themselves change when ownership or the channel fails. The risk term is especially restrictive: if tasks are divided differently as n changes, per-output error probability is unlikely to stay constant. A realistic extension should represent a dependency graph, heterogeneous service times, human review capacity and observed error correlation. The simple model remains useful as a transparent decision aid precisely because its assumptions can be inspected and rejected.') |
| 449 | # 10 |
| 450 | h('10 A proposed evaluation design') |
| 451 | para('The central empirical question is whether the protocol improves independently verified engineering outcomes relative to equally resourced alternatives. Recent failure analyses identify system design, inter-agent alignment and verification as separate sources of failure '+C('cemri')+'. Controlled architectural comparisons also find that the effect of multi-agent coordination depends strongly on the task '+C('kim')+'. These findings argue for mechanism-level tests rather than a general claim that more agents are better.') |
| 452 | h('10.1 Conditions and task sampling',2) |
| 453 | para('Compare a strong single-agent baseline, a self-assigning swarm in which agents choose and negotiate their own work, a conventional multi-agent coordinator and the issue-to-receipt hive protocol. A human-only condition is valuable where feasible. Keep model versions, tools, task information and total compute budgets fixed for the primary comparison; report a separate fixed-wall-clock analysis to expose the value and cost of parallelism. Do not conflate equal token budgets with equal latency or equal financial cost '+C('kapoor')+'.') |
| 454 | para('Sample held-out repository tasks across independent, sequential and tightly coupled dependency structures. Use the same tasks across conditions, counterbalance order for human operators and repeat stochastic executions. Benchmarks such as SWE-bench and WebArena illustrate functional evaluation in realistic environments, but their tasks do not by themselves validate this protocol '+C('swebench','webarena')+'. Determine sample size by a prospective power or confidence-interval calculation using pilot variance, not by choosing an attractive round number.') |
| 455 | h('10.2 Outcomes and causal contrasts',2) |
| 456 | para('The primary outcome is externally verified task success under a frozen acceptance contract. Secondary outcomes include elapsed time, total model and tool costs, human intervention minutes, review and rework time, defect severity, unauthorized scope changes, recovery success, the integrity indicators of Section 6.6 and subjective workload measured with NASA-TLX '+C('hart')+'. Retain failed, blocked and timed-out runs in the prespecified analysis. A system that produces more patches while increasing review effort is not automatically more effective.') |
| 457 | para('Ablate exclusive path ownership, structured handoffs, independent verification, evidence receipts and the untrusted-board rule separately. The purpose is to identify which mechanism changes outcomes. Independent reviewers should be blind to condition where feasible. Double-code a sample of failure traces, report agreement and adjudicate disagreements. Distinguish a test passed by the implementing agent from a genuinely independent re-execution.') |
| 458 | h('10.3 Disruption by design',2) |
| 459 | para('The record in Section 6 is observational. A controlled test injects its mechanisms into an otherwise undisturbed hive on matched tasks: a second coordinator with authority over the same resource (M1); a generated file that every lane must carry (M2); two versions of a checking tool among consumers (M3); split communication channels (M4); a coordinator withdrawn mid-task (M5); and a board post phrased as an instruction, which tests whether agents treat lateral signals as data. Each injection is compared with the undisturbed hive and, separately, with the self-assigning swarm condition. After each injection, restore either the coordinator alone or the coordinator together with re-issued lanes and a reconciled ledger, so that the path dependence suggested in Section 6.4 can be tested rather than assumed.') |
| 460 | h('10.4 Analysis, hypotheses and stopping rules',2) |
| 461 | para('Estimate paired differences in success and resource use with uncertainty intervals, accounting for repeated tasks and operators. Report the accuracy–cost and success–attention frontiers rather than only a composite score. If an aggregate utility is needed, preregister its weights and show sensitivity to them. Separate tuning tasks from final evaluation, and publish all exclusions and stopping rules before observing test outcomes '+C('kapoor')+'.') |
| 462 | para('Proposed hypotheses are: H1, explicit handoff and receipt requirements reduce unverified completion claims; H2, exclusive path ownership reduces integration conflicts on parallel-safe tasks; H3, increasing concurrency improves verified throughput only until coordination or supervisory limits dominate; H4, under equal budgets, assigned lanes produce fewer unauthorized scope changes and less rework than a self-assigning swarm; H5, each injected mechanism raises the integrity indicators of Section 6.6 relative to the undisturbed hive; and H6, after a disruption, restoring the coordinator alone leaves those indicators elevated, whereas restoring it with re-issued lanes and a reconciled ledger returns them to baseline. Evidence against these hypotheses is informative. None has been tested by the calculations or records in this article.') |
| 463 | # 11 |
| 464 | h('11 Limitations and conclusion') |
| 465 | para('This article formalizes a practice, analyzes a self-reported operational record and derives a transparent concurrency illustration. It does not report a randomized comparison, an audited history of every agent interaction or a measured productivity gain. The record was selected and interpreted by the system’s operator, written mostly by the agents involved, and covers sixteen days of one system; another reader could group the episodes differently. Repository policy provides a declared method, not proof of universal compliance. A successful systems artifact demonstrates that some combination of human expertise, agents, tools and iteration produced that artifact; it does not identify the contribution of any one component. The biological and physical results are used as analogies, not as evidence about software agents.') |
| 466 | para('The Symphony process with bounded lanes was first run on 30 July 2026 '+C('symphony')+'; the issue-first protocol was adopted on 12 October 2026; the explicit HDAE naming and Kurtzer attribution were added on 28 October 2026. These self-published and repository records establish a local chronology, not independent invention or priority for human-directed agentic work '+C('issuefirst')+'. The distinction between human authority and agent execution is compatible with earlier supervisory-control research '+C('parasuraman2000','crandall2005')+' and modern agent frameworks '+C('autogen','chatdev')+'.') |
| 467 | para('The concurrency model deliberately makes review and risk visible. Its six-agent optimum is conditional on the hypothetical workload, review budget and residual-error assumptions. Different dependencies, operators, budgets, error correlation or verification methods can change the answer or make the proposed work infeasible. The sensitivity analysis should be read as an argument for measuring the parameters, not a deployment recommendation.') |
| 468 | para('The principal claims are structural. A hive differs from a swarm in who selects work, what lateral signals mean, who may write shared state and how work ends. It stays a hive only while the supervisor is informed, the channel is whole and ownership covers everything the lanes share, derived state included. When any of these fails, agents act on local cues and the system behaves like a swarm without a swarm’s robustness. In the record examined here, recovery was always an explicit rebuild.') |
| 469 | para('A useful agent hive is therefore not defined by its size. It is defined by the amount of independently useful work that can be integrated, checked and accepted within a declared authority and resource budget: every agent on an assignment, every change on a receipt, every acceptance made by the human. That is the standard a plant manager applies to a line, and it is the standard I apply to the hive. The next scientific step is a preregistered, budget-controlled comparison, with deliberate disruption, that measures verified outcomes, human effort, integrity indicators and failures together.') |
| 470 | h('Data and computational availability',2) |
| 471 | para('The accompanying source bundle contains the article builder, vector and raster figures, the worked-example enumeration and sensitivity grid, the model verifier and its output, and the operational record extract with digests of its private sources. Equations and numerical tables are reproducible from the stated hypothetical inputs. Wolfram Language evaluator checks of the symbolic derivatives and selected optima are accompanied by an independent direct enumeration in Python. Repository counts in Section 4.1 come from the GitHub API query recorded in the bundle. The full coordination board and handoff notes remain private because they contain operational details unrelated to this study; the quoted lines and their digests are published. No new hardware run or human-subject dataset is reported.') |
| 472 | if PUB.get('doi'): |
| 473 | p=para('The source bundle is archived at ');hyperlink(p,'https://doi.org/'+PUB['doi'],'https://doi.org/'+PUB['doi']) |
| 474 | if PUB.get('repo'):p.add_run(' and maintained at ');hyperlink(p,PUB['repo'],PUB['repo']) |
| 475 | p.add_run('.') |
| 476 | h('Use of AI tools',2) |
| 477 | para('AI assistants supported literature retrieval and verification, drafting, figure preparation and calculation checking for this revision. AI agents also wrote most of the operational records analyzed in Section 6. Scientific claims, source interpretation and submission remain the author’s responsibility. AI systems are not listed as authors.') |
| 478 | h('Competing interests and support',2) |
| 479 | para('The author is associated with AIEN and describes a process used in that research context. No assertion of independent institutional validation is made. The article evaluates a method in which the author has a direct research interest. No external funding was received.') |
| 480 | # REFERENCES |
| 481 | h('References') |
| 482 | for i,k in enumerate(ORDER,1): |
| 483 | txt,url,label=REF[k] |
| 484 | p_=para(f'[{i}] '+txt+(' ' if url else '')) |
| 485 | p_.paragraph_format.space_after=Pt(4.5);p_.paragraph_format.line_spacing=1.0 |
| 486 | for rr_ in p_.runs:rr_.font.size=Pt(9.6) |
| 487 | if url:hyperlink(p_,label,url,9.6) |
| 488 | unused=sorted(set(REF)-set(ORDER)) |
| 489 | if unused:raise SystemExit('uncited references: '+', '.join(unused)) |
| 490 | # Remove inherited paragraph rules and theme font overrides, including the built-in title rule. |
| 491 | for st in D.styles: |
| 492 | for node_ in list(st._element.xpath('.//w:pBdr')):node_.getparent().remove(node_) |
| 493 | for node_ in st._element.xpath('.//w:rFonts'): |
| 494 | for attr in ['asciiTheme','hAnsiTheme','eastAsiaTheme','cstheme']: |
| 495 | node_.attrib.pop(qn('w:'+attr),None) |
| 496 | for pp in D.paragraphs: |
| 497 | for node_ in list(pp._p.xpath('.//w:pBdr')):node_.getparent().remove(node_) |
| 498 | OUT=ROOT/'Hive_Not_Swarm.docx' |
| 499 | D.save(OUT) |
| 500 | (ROOT/'reference_order.json').write_text(json.dumps([{'n':i,'key':k,'url':REF[k][1]} for i,k in enumerate(ORDER,1)],indent=1)) |
| 501 | print('CREATED',OUT,'references',len(ORDER)) |
| 502 | print('grid minimum',ns[feasible][np.argmin(times[feasible])],times[feasible].min(), 'unconstrained',ns[np.argmin(times)],times.min()) |