原理稿:主代理与子代理
用一套统一说法讲清这套系统的骨架:一个主代理面对人,多个子代理干活,中间隔一本只有一处能写的账。
全文只用「主代理」「子代理」两个角色名;其余部分(账本、投递、评估入口)是机制,不是代理,文中会明确标出。
一句话
一句话进来,不会让一整队人一起冲上去。主代理先替所有人把话听完、把事定性,然后开一张票,把活交给一个子代理。主代理负责跟人说话,子代理负责干活,两者中间隔着一本只允许一处写的账。
零、先看清两个角色
#mermaid-svg-OYlC0q30BUwCjwin{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-OYlC0q30BUwCjwin .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-OYlC0q30BUwCjwin .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-OYlC0q30BUwCjwin .error-icon{fill:#552222;}#mermaid-svg-OYlC0q30BUwCjwin .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-OYlC0q30BUwCjwin .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-OYlC0q30BUwCjwin .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-OYlC0q30BUwCjwin .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-OYlC0q30BUwCjwin .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-OYlC0q30BUwCjwin .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-OYlC0q30BUwCjwin .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-OYlC0q30BUwCjwin .marker{fill:#333333;stroke:#333333;}#mermaid-svg-OYlC0q30BUwCjwin .marker.cross{stroke:#333333;}#mermaid-svg-OYlC0q30BUwCjwin svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-OYlC0q30BUwCjwin p{margin:0;}#mermaid-svg-OYlC0q30BUwCjwin .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-OYlC0q30BUwCjwin .cluster-label text{fill:#333;}#mermaid-svg-OYlC0q30BUwCjwin .cluster-label span{color:#333;}#mermaid-svg-OYlC0q30BUwCjwin .cluster-label span p{background-color:transparent;}#mermaid-svg-OYlC0q30BUwCjwin .label text,#mermaid-svg-OYlC0q30BUwCjwin span{fill:#333;color:#333;}#mermaid-svg-OYlC0q30BUwCjwin .node rect,#mermaid-svg-OYlC0q30BUwCjwin .node circle,#mermaid-svg-OYlC0q30BUwCjwin .node ellipse,#mermaid-svg-OYlC0q30BUwCjwin .node polygon,#mermaid-svg-OYlC0q30BUwCjwin .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-OYlC0q30BUwCjwin .rough-node .label text,#mermaid-svg-OYlC0q30BUwCjwin .node .label text,#mermaid-svg-OYlC0q30BUwCjwin .image-shape .label,#mermaid-svg-OYlC0q30BUwCjwin .icon-shape .label{text-anchor:middle;}#mermaid-svg-OYlC0q30BUwCjwin .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-OYlC0q30BUwCjwin .rough-node .label,#mermaid-svg-OYlC0q30BUwCjwin .node .label,#mermaid-svg-OYlC0q30BUwCjwin .image-shape .label,#mermaid-svg-OYlC0q30BUwCjwin .icon-shape .label{text-align:center;}#mermaid-svg-OYlC0q30BUwCjwin .node.clickable{cursor:pointer;}#mermaid-svg-OYlC0q30BUwCjwin .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-OYlC0q30BUwCjwin .arrowheadPath{fill:#333333;}#mermaid-svg-OYlC0q30BUwCjwin .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-OYlC0q30BUwCjwin .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-OYlC0q30BUwCjwin .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-OYlC0q30BUwCjwin .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-OYlC0q30BUwCjwin .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-OYlC0q30BUwCjwin .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-OYlC0q30BUwCjwin .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-OYlC0q30BUwCjwin .cluster text{fill:#333;}#mermaid-svg-OYlC0q30BUwCjwin .cluster span{color:#333;}#mermaid-svg-OYlC0q30BUwCjwin div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-OYlC0q30BUwCjwin .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-OYlC0q30BUwCjwin rect.text{fill:none;stroke-width:0;}#mermaid-svg-OYlC0q30BUwCjwin .icon-shape,#mermaid-svg-OYlC0q30BUwCjwin .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-OYlC0q30BUwCjwin .icon-shape p,#mermaid-svg-OYlC0q30BUwCjwin .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-OYlC0q30BUwCjwin .icon-shape .label rect,#mermaid-svg-OYlC0q30BUwCjwin .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-OYlC0q30BUwCjwin .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-OYlC0q30BUwCjwin .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-OYlC0q30BUwCjwin :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
子代理(多个,一票一个)
派活
派活
派活
报告
报告
报告
回话
唯一接触面
开票 + 写授权
主代理(只有一个)
听懂话
定性:该不该做
决定:交给谁
什么时候开口回话
人群里说一句 / 开个 PR / 留条评论
子代理 A票 #1 的活
子代理 B票 #2 的活
子代理 C票 #3 的活
共享账本(机制,不是代理)票 / 授权 / 订阅 / 回执
投递(机制)每句话一张回执
三条不能越过的线:
| 人 | 提要求、拍板、叫停 | 直接指挥某个子代理 |
| 主代理 | 判断该不该做、交给谁、什么时候开口 | 亲自把活干完 |
| 子代理 | 在自己那张票里干活 | 绕过主代理直接占用人的注意力 |
一、一条消息走一圈
上面讲"谁站在哪一层",这张讲"一条消息实际怎么走"。
#mermaid-svg-ZNKZB5hSDIAufOCG{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-ZNKZB5hSDIAufOCG .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-ZNKZB5hSDIAufOCG .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-ZNKZB5hSDIAufOCG .error-icon{fill:#552222;}#mermaid-svg-ZNKZB5hSDIAufOCG .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ZNKZB5hSDIAufOCG .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-ZNKZB5hSDIAufOCG .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ZNKZB5hSDIAufOCG .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ZNKZB5hSDIAufOCG .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-ZNKZB5hSDIAufOCG .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ZNKZB5hSDIAufOCG .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ZNKZB5hSDIAufOCG .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ZNKZB5hSDIAufOCG .marker.cross{stroke:#333333;}#mermaid-svg-ZNKZB5hSDIAufOCG svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ZNKZB5hSDIAufOCG p{margin:0;}#mermaid-svg-ZNKZB5hSDIAufOCG .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-ZNKZB5hSDIAufOCG .cluster-label text{fill:#333;}#mermaid-svg-ZNKZB5hSDIAufOCG .cluster-label span{color:#333;}#mermaid-svg-ZNKZB5hSDIAufOCG .cluster-label span p{background-color:transparent;}#mermaid-svg-ZNKZB5hSDIAufOCG .label text,#mermaid-svg-ZNKZB5hSDIAufOCG span{fill:#333;color:#333;}#mermaid-svg-ZNKZB5hSDIAufOCG .node rect,#mermaid-svg-ZNKZB5hSDIAufOCG .node circle,#mermaid-svg-ZNKZB5hSDIAufOCG .node ellipse,#mermaid-svg-ZNKZB5hSDIAufOCG .node polygon,#mermaid-svg-ZNKZB5hSDIAufOCG .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-ZNKZB5hSDIAufOCG .rough-node .label text,#mermaid-svg-ZNKZB5hSDIAufOCG .node .label text,#mermaid-svg-ZNKZB5hSDIAufOCG .image-shape .label,#mermaid-svg-ZNKZB5hSDIAufOCG .icon-shape .label{text-anchor:middle;}#mermaid-svg-ZNKZB5hSDIAufOCG .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-ZNKZB5hSDIAufOCG .rough-node .label,#mermaid-svg-ZNKZB5hSDIAufOCG .node .label,#mermaid-svg-ZNKZB5hSDIAufOCG .image-shape .label,#mermaid-svg-ZNKZB5hSDIAufOCG .icon-shape .label{text-align:center;}#mermaid-svg-ZNKZB5hSDIAufOCG .node.clickable{cursor:pointer;}#mermaid-svg-ZNKZB5hSDIAufOCG .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-ZNKZB5hSDIAufOCG .arrowheadPath{fill:#333333;}#mermaid-svg-ZNKZB5hSDIAufOCG .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-ZNKZB5hSDIAufOCG .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-ZNKZB5hSDIAufOCG .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ZNKZB5hSDIAufOCG .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-ZNKZB5hSDIAufOCG .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ZNKZB5hSDIAufOCG .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-ZNKZB5hSDIAufOCG .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-ZNKZB5hSDIAufOCG .cluster text{fill:#333;}#mermaid-svg-ZNKZB5hSDIAufOCG .cluster span{color:#333;}#mermaid-svg-ZNKZB5hSDIAufOCG div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-ZNKZB5hSDIAufOCG .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-ZNKZB5hSDIAufOCG rect.text{fill:none;stroke-width:0;}#mermaid-svg-ZNKZB5hSDIAufOCG .icon-shape,#mermaid-svg-ZNKZB5hSDIAufOCG .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ZNKZB5hSDIAufOCG .icon-shape p,#mermaid-svg-ZNKZB5hSDIAufOCG .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-ZNKZB5hSDIAufOCG .icon-shape .label rect,#mermaid-svg-ZNKZB5hSDIAufOCG .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ZNKZB5hSDIAufOCG .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-ZNKZB5hSDIAufOCG .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-ZNKZB5hSDIAufOCG :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
机制:不是代理,是规则和账
入口:消息从哪来
一条事件
一条事件
候选:这事要不要做
上下文,不含指令
接受 / 忽略 / 叫停
开票 + 写授权
进展 / 结果 / 卡住
回话
回话
GitHubPR / Issue / 评论
飞书群消息
主代理听懂 · 定性 · 回一句人话
账本唯一写者
评估入口只摊材料,不给指令
投递只负责把话送出去
子代理一票一个,各自独立
看图注意三件事:
二、主代理为什么必须「薄」
主代理的工具箱刻意很小:读材料、定性、路由、管理票据、重新评估、回话、改配置。它不写代码。
这不是能力不足,是设计选择。系统里有一条硬限制:主代理发起的 shell 命令和任务等待被压得很短——不允许用 sleep 干等,单条命令超时上限卡在几十秒,查看后台任务也只给几秒。
道理很直白:主代理在等,人就在等。 报告和结果会自动送上来,主代理主动去等只会把新到的消息挡在门外。
#mermaid-svg-MWyyoSijKlMfP1rX{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-MWyyoSijKlMfP1rX .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-MWyyoSijKlMfP1rX .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-MWyyoSijKlMfP1rX .error-icon{fill:#552222;}#mermaid-svg-MWyyoSijKlMfP1rX .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-MWyyoSijKlMfP1rX .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-MWyyoSijKlMfP1rX .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-MWyyoSijKlMfP1rX .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-MWyyoSijKlMfP1rX .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-MWyyoSijKlMfP1rX .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-MWyyoSijKlMfP1rX .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-MWyyoSijKlMfP1rX .marker{fill:#333333;stroke:#333333;}#mermaid-svg-MWyyoSijKlMfP1rX .marker.cross{stroke:#333333;}#mermaid-svg-MWyyoSijKlMfP1rX svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-MWyyoSijKlMfP1rX p{margin:0;}#mermaid-svg-MWyyoSijKlMfP1rX .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-MWyyoSijKlMfP1rX .cluster-label text{fill:#333;}#mermaid-svg-MWyyoSijKlMfP1rX .cluster-label span{color:#333;}#mermaid-svg-MWyyoSijKlMfP1rX .cluster-label span p{background-color:transparent;}#mermaid-svg-MWyyoSijKlMfP1rX .label text,#mermaid-svg-MWyyoSijKlMfP1rX span{fill:#333;color:#333;}#mermaid-svg-MWyyoSijKlMfP1rX .node rect,#mermaid-svg-MWyyoSijKlMfP1rX .node circle,#mermaid-svg-MWyyoSijKlMfP1rX .node ellipse,#mermaid-svg-MWyyoSijKlMfP1rX .node polygon,#mermaid-svg-MWyyoSijKlMfP1rX .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-MWyyoSijKlMfP1rX .rough-node .label text,#mermaid-svg-MWyyoSijKlMfP1rX .node .label text,#mermaid-svg-MWyyoSijKlMfP1rX .image-shape .label,#mermaid-svg-MWyyoSijKlMfP1rX .icon-shape .label{text-anchor:middle;}#mermaid-svg-MWyyoSijKlMfP1rX .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-MWyyoSijKlMfP1rX .rough-node .label,#mermaid-svg-MWyyoSijKlMfP1rX .node .label,#mermaid-svg-MWyyoSijKlMfP1rX .image-shape .label,#mermaid-svg-MWyyoSijKlMfP1rX .icon-shape .label{text-align:center;}#mermaid-svg-MWyyoSijKlMfP1rX .node.clickable{cursor:pointer;}#mermaid-svg-MWyyoSijKlMfP1rX .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-MWyyoSijKlMfP1rX .arrowheadPath{fill:#333333;}#mermaid-svg-MWyyoSijKlMfP1rX .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-MWyyoSijKlMfP1rX .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-MWyyoSijKlMfP1rX .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-MWyyoSijKlMfP1rX .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-MWyyoSijKlMfP1rX .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-MWyyoSijKlMfP1rX .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-MWyyoSijKlMfP1rX .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-MWyyoSijKlMfP1rX .cluster text{fill:#333;}#mermaid-svg-MWyyoSijKlMfP1rX .cluster span{color:#333;}#mermaid-svg-MWyyoSijKlMfP1rX div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-MWyyoSijKlMfP1rX .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-MWyyoSijKlMfP1rX rect.text{fill:none;stroke-width:0;}#mermaid-svg-MWyyoSijKlMfP1rX .icon-shape,#mermaid-svg-MWyyoSijKlMfP1rX .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-MWyyoSijKlMfP1rX .icon-shape p,#mermaid-svg-MWyyoSijKlMfP1rX .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-MWyyoSijKlMfP1rX .icon-shape .label rect,#mermaid-svg-MWyyoSijKlMfP1rX .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-MWyyoSijKlMfP1rX .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-MWyyoSijKlMfP1rX .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-MWyyoSijKlMfP1rX :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
主代理不做
写代码
长时间等待
直接改子代理正在干的活
替人做需要人拍板的决定
主代理能做
读材料
定性:接受 / 忽略 / 叫停 / 转给别的票
回一句人话
改配置、同步白名单
一句话:主代理是「决定在哪停」的角色,不是「把活干完」的角色。 局部小改动可以一路做到可评审的结果;需要做设计决定的事,就停下来问一句具体的问题。
三、子代理怎么分工
子代理不是一个"更大的 AI",而是各自独立的执行单元:一票一个会话、一票一个工作目录。彼此看不见对方的对话。
#mermaid-svg-sIldTj7Z8s1z9tmu{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-sIldTj7Z8s1z9tmu .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-sIldTj7Z8s1z9tmu .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-sIldTj7Z8s1z9tmu .error-icon{fill:#552222;}#mermaid-svg-sIldTj7Z8s1z9tmu .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-sIldTj7Z8s1z9tmu .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-sIldTj7Z8s1z9tmu .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-sIldTj7Z8s1z9tmu .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-sIldTj7Z8s1z9tmu .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-sIldTj7Z8s1z9tmu .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-sIldTj7Z8s1z9tmu .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-sIldTj7Z8s1z9tmu .marker{fill:#333333;stroke:#333333;}#mermaid-svg-sIldTj7Z8s1z9tmu .marker.cross{stroke:#333333;}#mermaid-svg-sIldTj7Z8s1z9tmu svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-sIldTj7Z8s1z9tmu p{margin:0;}#mermaid-svg-sIldTj7Z8s1z9tmu .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-sIldTj7Z8s1z9tmu .cluster-label text{fill:#333;}#mermaid-svg-sIldTj7Z8s1z9tmu .cluster-label span{color:#333;}#mermaid-svg-sIldTj7Z8s1z9tmu .cluster-label span p{background-color:transparent;}#mermaid-svg-sIldTj7Z8s1z9tmu .label text,#mermaid-svg-sIldTj7Z8s1z9tmu span{fill:#333;color:#333;}#mermaid-svg-sIldTj7Z8s1z9tmu .node rect,#mermaid-svg-sIldTj7Z8s1z9tmu .node circle,#mermaid-svg-sIldTj7Z8s1z9tmu .node ellipse,#mermaid-svg-sIldTj7Z8s1z9tmu .node polygon,#mermaid-svg-sIldTj7Z8s1z9tmu .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-sIldTj7Z8s1z9tmu .rough-node .label text,#mermaid-svg-sIldTj7Z8s1z9tmu .node .label text,#mermaid-svg-sIldTj7Z8s1z9tmu .image-shape .label,#mermaid-svg-sIldTj7Z8s1z9tmu .icon-shape .label{text-anchor:middle;}#mermaid-svg-sIldTj7Z8s1z9tmu .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-sIldTj7Z8s1z9tmu .rough-node .label,#mermaid-svg-sIldTj7Z8s1z9tmu .node .label,#mermaid-svg-sIldTj7Z8s1z9tmu .image-shape .label,#mermaid-svg-sIldTj7Z8s1z9tmu .icon-shape .label{text-align:center;}#mermaid-svg-sIldTj7Z8s1z9tmu .node.clickable{cursor:pointer;}#mermaid-svg-sIldTj7Z8s1z9tmu .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-sIldTj7Z8s1z9tmu .arrowheadPath{fill:#333333;}#mermaid-svg-sIldTj7Z8s1z9tmu .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-sIldTj7Z8s1z9tmu .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-sIldTj7Z8s1z9tmu .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-sIldTj7Z8s1z9tmu .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-sIldTj7Z8s1z9tmu .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-sIldTj7Z8s1z9tmu .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-sIldTj7Z8s1z9tmu .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-sIldTj7Z8s1z9tmu .cluster text{fill:#333;}#mermaid-svg-sIldTj7Z8s1z9tmu .cluster span{color:#333;}#mermaid-svg-sIldTj7Z8s1z9tmu div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-sIldTj7Z8s1z9tmu .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-sIldTj7Z8s1z9tmu rect.text{fill:none;stroke-width:0;}#mermaid-svg-sIldTj7Z8s1z9tmu .icon-shape,#mermaid-svg-sIldTj7Z8s1z9tmu .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-sIldTj7Z8s1z9tmu .icon-shape p,#mermaid-svg-sIldTj7Z8s1z9tmu .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-sIldTj7Z8s1z9tmu .icon-shape .label rect,#mermaid-svg-sIldTj7Z8s1z9tmu .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-sIldTj7Z8s1z9tmu .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-sIldTj7Z8s1z9tmu .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-sIldTj7Z8s1z9tmu :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
子代理 C(票 #3)
自己的会话
自己的工作目录
只看见自己这张票的材料
子代理 B(票 #2)
自己的会话
自己的工作目录
只看见自己这张票的材料
子代理 A(票 #1)
自己的会话
自己的工作目录
只看见自己这张票的材料
账本票 #1 / 票 #2 / 票 #3
这样切的理由很实际:
| 谁在干什么 | 分不清谁改了什么 | 目录隔离,改动可归属 |
| 撞车 | 三个人同时改同一个文件 | 各在自己的目录里 |
| 谁拍板 | 都以为别人接了,或者都接了 | 只有主代理能开票 |
唯一的共享物是账本。 而账本只允许一处写。
为什么强调"一处写":多个地方同时写,就会出现两个子代理各自以为自己拿到过授权。这种错事后极难发现,所以干脆在结构上不允许。
四、一张票的一生
「票」是最基本的工作单元。一条消息不会直接变成活,而是先变成"候选",由主代理定性后才开票。
#mermaid-svg-uX4K46SWvaHe7YCD{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-uX4K46SWvaHe7YCD .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-uX4K46SWvaHe7YCD .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-uX4K46SWvaHe7YCD .error-icon{fill:#552222;}#mermaid-svg-uX4K46SWvaHe7YCD .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-uX4K46SWvaHe7YCD .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-uX4K46SWvaHe7YCD .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-uX4K46SWvaHe7YCD .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-uX4K46SWvaHe7YCD .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-uX4K46SWvaHe7YCD .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-uX4K46SWvaHe7YCD .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-uX4K46SWvaHe7YCD .marker{fill:#333333;stroke:#333333;}#mermaid-svg-uX4K46SWvaHe7YCD .marker.cross{stroke:#333333;}#mermaid-svg-uX4K46SWvaHe7YCD svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-uX4K46SWvaHe7YCD p{margin:0;}#mermaid-svg-uX4K46SWvaHe7YCD defs #statediagram-barbEnd{fill:#333333;stroke:#333333;}#mermaid-svg-uX4K46SWvaHe7YCD g.stateGroup text{fill:#9370DB;stroke:none;font-size:10px;}#mermaid-svg-uX4K46SWvaHe7YCD g.stateGroup text{fill:#333;stroke:none;font-size:10px;}#mermaid-svg-uX4K46SWvaHe7YCD g.stateGroup .state-title{font-weight:bolder;fill:#131300;}#mermaid-svg-uX4K46SWvaHe7YCD g.stateGroup rect{fill:#ECECFF;stroke:#9370DB;}#mermaid-svg-uX4K46SWvaHe7YCD g.stateGroup line{stroke:#333333;stroke-width:1;}#mermaid-svg-uX4K46SWvaHe7YCD .transition{stroke:#333333;stroke-width:1;fill:none;}#mermaid-svg-uX4K46SWvaHe7YCD .stateGroup .composit{fill:white;border-bottom:1px;}#mermaid-svg-uX4K46SWvaHe7YCD .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px;}#mermaid-svg-uX4K46SWvaHe7YCD .state-note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-uX4K46SWvaHe7YCD .state-note text{fill:black;stroke:none;font-size:10px;}#mermaid-svg-uX4K46SWvaHe7YCD .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5;}#mermaid-svg-uX4K46SWvaHe7YCD .edgeLabel .label rect{fill:#ECECFF;opacity:0.5;}#mermaid-svg-uX4K46SWvaHe7YCD .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-uX4K46SWvaHe7YCD .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-uX4K46SWvaHe7YCD .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-uX4K46SWvaHe7YCD .edgeLabel .label text{fill:#333;}#mermaid-svg-uX4K46SWvaHe7YCD .label div .edgeLabel{color:#333;}#mermaid-svg-uX4K46SWvaHe7YCD .stateLabel text{fill:#131300;font-size:10px;font-weight:bold;}#mermaid-svg-uX4K46SWvaHe7YCD .node circle.state-start{fill:#333333;stroke:#333333;}#mermaid-svg-uX4K46SWvaHe7YCD .node .fork-join{fill:#333333;stroke:#333333;}#mermaid-svg-uX4K46SWvaHe7YCD .node circle.state-end{fill:#9370DB;stroke:white;stroke-width:1.5;}#mermaid-svg-uX4K46SWvaHe7YCD .end-state-inner{fill:white;stroke-width:1.5;}#mermaid-svg-uX4K46SWvaHe7YCD .node rect{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-uX4K46SWvaHe7YCD .node polygon{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-uX4K46SWvaHe7YCD #statediagram-barbEnd{fill:#333333;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-cluster rect{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-uX4K46SWvaHe7YCD .cluster-label,#mermaid-svg-uX4K46SWvaHe7YCD .nodeLabel{color:#131300;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-cluster rect.outer{rx:5px;ry:5px;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-state .divider{stroke:#9370DB;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-state .title-state{rx:5px;ry:5px;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-cluster.statediagram-cluster .inner{fill:white;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-cluster.statediagram-cluster-alt .inner{fill:#f0f0f0;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-cluster .inner{rx:0;ry:0;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-state rect.basic{rx:5px;ry:5px;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#f0f0f0;}#mermaid-svg-uX4K46SWvaHe7YCD .note-edge{stroke-dasharray:5;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-note rect{fill:#fff5ad;stroke:#aaaa33;stroke-width:1px;rx:0;ry:0;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-note rect{fill:#fff5ad;stroke:#aaaa33;stroke-width:1px;rx:0;ry:0;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-note text{fill:black;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram-note .nodeLabel{color:black;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagram .edgeLabel{color:red;}#mermaid-svg-uX4K46SWvaHe7YCD #dependencyStart,#mermaid-svg-uX4K46SWvaHe7YCD #dependencyEnd{fill:#333333;stroke:#333333;stroke-width:1;}#mermaid-svg-uX4K46SWvaHe7YCD .statediagramTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-uX4K46SWvaHe7YCD :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
入口收到一条消息
主代理判断不用做
主代理接受并写下授权范围
子代理接手
报告卡住或失败
人回了一句
报告进展后这一回合结束
报告完成
人叫停
授权仍有效时有人又说话了
候选
已忽略
已开票
在做
等人
已结束
三个容易被忽略的点:
- 开票和写授权是同一件事。不是先开票、稍后补授权,而是在同一个动作里把"你能做到哪一步"定死。不存在"票开了但没人知道它能干多少"的中间状态。
- 「为了上下文关注」不等于「有资格处理」。一张票可以订阅另一条线只为了看消息,但那条线上的话不会让它获得处理权,也不会把它的子代理叫醒。
- 结束不等于忘掉。票结束后仍记着它是谁、为什么结束、什么结果。只要授权还在,那条线再来人说话,它能被重新叫起来。这也是为什么"叫停"必须真的撤销授权——否则停了也会被重新唤醒。
五、谁能对谁说话
每个角色拿到的是一份只包含自己那几项操作的接口,不是完整权限。
#mermaid-svg-GHmRMH3b6MX8wYqR{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-GHmRMH3b6MX8wYqR .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-GHmRMH3b6MX8wYqR .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-GHmRMH3b6MX8wYqR .error-icon{fill:#552222;}#mermaid-svg-GHmRMH3b6MX8wYqR .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-GHmRMH3b6MX8wYqR .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-GHmRMH3b6MX8wYqR .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-GHmRMH3b6MX8wYqR .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-GHmRMH3b6MX8wYqR .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-GHmRMH3b6MX8wYqR .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-GHmRMH3b6MX8wYqR .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-GHmRMH3b6MX8wYqR .marker{fill:#333333;stroke:#333333;}#mermaid-svg-GHmRMH3b6MX8wYqR .marker.cross{stroke:#333333;}#mermaid-svg-GHmRMH3b6MX8wYqR svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-GHmRMH3b6MX8wYqR p{margin:0;}#mermaid-svg-GHmRMH3b6MX8wYqR .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-GHmRMH3b6MX8wYqR .cluster-label text{fill:#333;}#mermaid-svg-GHmRMH3b6MX8wYqR .cluster-label span{color:#333;}#mermaid-svg-GHmRMH3b6MX8wYqR .cluster-label span p{background-color:transparent;}#mermaid-svg-GHmRMH3b6MX8wYqR .label text,#mermaid-svg-GHmRMH3b6MX8wYqR span{fill:#333;color:#333;}#mermaid-svg-GHmRMH3b6MX8wYqR .node rect,#mermaid-svg-GHmRMH3b6MX8wYqR .node circle,#mermaid-svg-GHmRMH3b6MX8wYqR .node ellipse,#mermaid-svg-GHmRMH3b6MX8wYqR .node polygon,#mermaid-svg-GHmRMH3b6MX8wYqR .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-GHmRMH3b6MX8wYqR .rough-node .label text,#mermaid-svg-GHmRMH3b6MX8wYqR .node .label text,#mermaid-svg-GHmRMH3b6MX8wYqR .image-shape .label,#mermaid-svg-GHmRMH3b6MX8wYqR .icon-shape .label{text-anchor:middle;}#mermaid-svg-GHmRMH3b6MX8wYqR .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-GHmRMH3b6MX8wYqR .rough-node .label,#mermaid-svg-GHmRMH3b6MX8wYqR .node .label,#mermaid-svg-GHmRMH3b6MX8wYqR .image-shape .label,#mermaid-svg-GHmRMH3b6MX8wYqR .icon-shape .label{text-align:center;}#mermaid-svg-GHmRMH3b6MX8wYqR .node.clickable{cursor:pointer;}#mermaid-svg-GHmRMH3b6MX8wYqR .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-GHmRMH3b6MX8wYqR .arrowheadPath{fill:#333333;}#mermaid-svg-GHmRMH3b6MX8wYqR .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-GHmRMH3b6MX8wYqR .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-GHmRMH3b6MX8wYqR .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-GHmRMH3b6MX8wYqR .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-GHmRMH3b6MX8wYqR .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-GHmRMH3b6MX8wYqR .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-GHmRMH3b6MX8wYqR .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-GHmRMH3b6MX8wYqR .cluster text{fill:#333;}#mermaid-svg-GHmRMH3b6MX8wYqR .cluster span{color:#333;}#mermaid-svg-GHmRMH3b6MX8wYqR div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-GHmRMH3b6MX8wYqR .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-GHmRMH3b6MX8wYqR rect.text{fill:none;stroke-width:0;}#mermaid-svg-GHmRMH3b6MX8wYqR .icon-shape,#mermaid-svg-GHmRMH3b6MX8wYqR .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-GHmRMH3b6MX8wYqR .icon-shape p,#mermaid-svg-GHmRMH3b6MX8wYqR .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-GHmRMH3b6MX8wYqR .icon-shape .label rect,#mermaid-svg-GHmRMH3b6MX8wYqR .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-GHmRMH3b6MX8wYqR .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-GHmRMH3b6MX8wYqR .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-GHmRMH3b6MX8wYqR :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
子代理
主代理
人
叫停一张票
让失败的票重试
重新评估一条消息
取消订阅某条线
给一条消息定性
把消息转给某张票
问子代理现在什么状态
给子代理递背景信息只给信息,不给权限
接下这活
报告:进展 / 完成 / 卡住 / 失败
把不属于自己的线摘掉并说明理由
交还一条消息每条只交还一次
账本所有改动都从这里过
注意子代理那四个动作里没有「找人问一句」。子代理不能直接给人发消息,必须在报告里带一个具体问题,由账本转成通知,主代理决定怎么开口。
这是一条硬边界:干活的一方不能绕过主代理直接占用人的注意力。
六、一次请求的完整时序
子代理账本主代理人子代理账本主代理人#mermaid-svg-ddv44S4KPuoI0rj0{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-ddv44S4KPuoI0rj0 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-ddv44S4KPuoI0rj0 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-ddv44S4KPuoI0rj0 .error-icon{fill:#552222;}#mermaid-svg-ddv44S4KPuoI0rj0 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ddv44S4KPuoI0rj0 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-ddv44S4KPuoI0rj0 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ddv44S4KPuoI0rj0 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ddv44S4KPuoI0rj0 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-ddv44S4KPuoI0rj0 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ddv44S4KPuoI0rj0 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ddv44S4KPuoI0rj0 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ddv44S4KPuoI0rj0 .marker.cross{stroke:#333333;}#mermaid-svg-ddv44S4KPuoI0rj0 svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ddv44S4KPuoI0rj0 p{margin:0;}#mermaid-svg-ddv44S4KPuoI0rj0 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-ddv44S4KPuoI0rj0 text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-ddv44S4KPuoI0rj0 .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-ddv44S4KPuoI0rj0 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-ddv44S4KPuoI0rj0 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-ddv44S4KPuoI0rj0 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-ddv44S4KPuoI0rj0 #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-ddv44S4KPuoI0rj0 .sequenceNumber{fill:white;}#mermaid-svg-ddv44S4KPuoI0rj0 #sequencenumber{fill:#333;}#mermaid-svg-ddv44S4KPuoI0rj0 #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-ddv44S4KPuoI0rj0 .messageText{fill:#333;stroke:none;}#mermaid-svg-ddv44S4KPuoI0rj0 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-ddv44S4KPuoI0rj0 .labelText,#mermaid-svg-ddv44S4KPuoI0rj0 .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-ddv44S4KPuoI0rj0 .loopText,#mermaid-svg-ddv44S4KPuoI0rj0 .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-ddv44S4KPuoI0rj0 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-ddv44S4KPuoI0rj0 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-ddv44S4KPuoI0rj0 .noteText,#mermaid-svg-ddv44S4KPuoI0rj0 .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-ddv44S4KPuoI0rj0 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-ddv44S4KPuoI0rj0 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-ddv44S4KPuoI0rj0 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-ddv44S4KPuoI0rj0 .actorPopupMenu{position:absolute;}#mermaid-svg-ddv44S4KPuoI0rj0 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-ddv44S4KPuoI0rj0 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-ddv44S4KPuoI0rj0 .actor-man circle,#mermaid-svg-ddv44S4KPuoI0rj0 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-ddv44S4KPuoI0rj0 :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}在群里说了一句1存一条记录,判断该不该现在评估2递上候选:这条话要不要做3接受,同时写下授权范围4开票 + 建授权 + 派第一个子代理,一次做完5派活,材料随活一起到6在自己的目录里干活7报告进展8转成一条通知,攒着9报告结果10结票,记下结果11回一句话12该说话时说话,不该说话时沉默13
两个细节:
- 通知是攒着的。一次回合进行中到达的消息不会一条条打断,等这一步走完一次性交给主代理。为的是不把主代理切碎。
- 「回话」和「通知」是两条路。发给人的消息走投递,每条留一张回执;给主代理看的通知走另一条路,不影响投递记录。
七、为什么不让一队人一起上
最常见的疑问:既然有能干活的队伍,为什么不让所有子代理一起看这条消息、谁有想法谁上?
因为那会同时坏三件事:
| 谁拍板 | 都以为别人接了,或者都接了 | 只有主代理能开票 |
| 重复劳动 | 同时读同一个 PR、改同一个文件 | 各在自己的目录里 |
| 人的注意力 | 每条消息都变成一次打扰 | 人只跟主代理打交道 |
还有一条更隐蔽的:定性和干活需要的材料不一样。 评估入口拿到的是一份裁剪过的材料——最多几千字原文、前后几条上下文、几张相关票的摘要。这套裁剪本身就是规则的一部分。让子代理拿这份裁剪件,它会缺细节;让评估拿全部原文,它会被淹掉。
八、三个常见误解
误解一:主代理是个"总调度",什么都归它管。
不是。主代理没有写代码的能力,也不能直接改子代理正在做的事。它做的是定性(该不该做)和路由(交给谁)。真正的约束写在账本里,不在主代理的脑子里。
误解二:子代理是一个大模型分饰多角。
不是。每个子代理有独立会话和独立工作目录,彼此看不见对方的对话。唯一的共享物是账本。
误解三:票结束就完事了。
不是。结束的票仍带着授权和结果活着。只要授权还在,那条线再来人说话,它可以被重新叫起来。
九、这套结构的代价
诚实地说,不是免费的:
| 多一次往返 | 消息要先变候选、再被定性、才能开票。对"顺手就能做完"的小事,流程显得笨重 |
| 状态多 | 票、授权、订阅、执行回执、投递回执各是一份状态,任一份出问题都要单独排查 |
| 权限边界靠人守 | 工具是按角色分的,但如果给子代理加了不该有的工具,绕过主代理的通道就出现了 |
| 表变长 | 一张票从开到结会累积不少字段,读起来不直观 |
换来的是:人只需要看一个地方,而且那个地方说的每句话都有出处。
附:说法与实现的对应
| 主代理 | 主控会话,带一组固定的编排工具 |
| 子代理 | 执行会话,一票一个,配独立工作目录 |
| 账本 | 核心引擎的五个部件:收件、排队与时效、票据、执行回执、回话 |
| 评估入口 | 主控会话里的评估入口,只给上下文、不给指令 |
| 入口 | 来源适配层(GitHub / 飞书),把原始事件翻译成一条统一记录 |
| 投递 | 投递队列,每句话一张回执 |
本稿只讲结构,不讲实现细节和参数。


