@henryqw/pi-subagent 27.4.3 → 27.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,189 +1,135 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="1280" height="720" viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="orchestration-architecture-title orchestration-architecture-desc">
3
- <title id="orchestration-architecture-title">Pi Subagent checked execution architecture</title>
4
- <desc id="orchestration-architecture-desc">Architecture diagram showing Pi Main resolving each task-selected Role just in time, returning bounded text to durable state, and sending changesets through isolated Herdr work, direct checks, optional judgment, and guarded Main integration.</desc>
5
- <defs>
6
- <style>
7
- .zone { fill: #e6e4de; stroke: #101828; stroke-opacity: .141; stroke-width: 1; }
8
- .zone-protected { fill: #1d4ed8; fill-opacity: .05; stroke: #1d4ed8; stroke-opacity: .50; stroke-width: 1; stroke-dasharray: 4 4; }
9
- .zone-label { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; letter-spacing: .16em; }
10
- .node-mask { fill: #f0eee9; }
11
- .node { fill: #ffffff; stroke: #101828; stroke-width: 1; }
12
- .node-input { fill: #4c5665; fill-opacity: .10; stroke: #6a7282; stroke-width: 1; }
13
- .node-store { fill: #101828; fill-opacity: .05; stroke: #4c5665; stroke-width: 1; }
14
- .node-focal { fill: #1d4ed8; fill-opacity: .08; stroke: #1d4ed8; stroke-width: 1.2; }
15
- .tag { fill: none; stroke: #101828; stroke-opacity: .34; stroke-width: .8; }
16
- .tag-focal { fill: none; stroke: #1d4ed8; stroke-opacity: .55; stroke-width: .8; }
17
- .tag-text { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; letter-spacing: .08em; text-anchor: middle; }
18
- .tag-text-focal { fill: #1d4ed8; font: 500 8px 'Geist Mono', monospace; letter-spacing: .08em; text-anchor: middle; }
19
- .name { fill: #101828; font: 600 12px 'Geist', sans-serif; text-anchor: middle; }
20
- .sub { fill: #4c5665; font: 400 8px 'Geist Mono', monospace; text-anchor: middle; }
21
- .edge { fill: none; stroke: #4c5665; stroke-width: 1.2; marker-end: url(#arrow); }
22
- .edge-approved { fill: none; stroke: #1d4ed8; stroke-width: 1.2; marker-end: url(#arrow-accent); }
23
- .edge-audit { fill: none; stroke: #4c5665; stroke-width: 1; stroke-dasharray: 5 4; marker-end: url(#arrow); }
24
- .edge-blocked { fill: none; stroke: #6a7282; stroke-width: 1; stroke-dasharray: 5 4; }
25
- .label-mask { fill: #f0eee9; }
26
- .label { fill: #4c5665; font: 500 8px 'Geist Mono', monospace; letter-spacing: .04em; text-anchor: middle; }
27
- .label-approved { fill: #1d4ed8; font: 500 8px 'Geist Mono', monospace; letter-spacing: .04em; text-anchor: middle; }
28
- .stop { fill: #f0eee9; stroke: #6a7282; stroke-width: 1.2; }
29
- .stop-mark { stroke: #6a7282; stroke-width: 1.2; }
30
- .legend { fill: #101828; font: 400 12px 'Geist', sans-serif; }
31
- .legend-label { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; letter-spacing: .16em; }
32
- </style>
33
- <marker id="arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
34
- <polygon points="0 0,8 3,0 6" fill="#4c5665"/>
35
- </marker>
36
- <marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
37
- <polygon points="0 0,8 3,0 6" fill="#1d4ed8"/>
38
- </marker>
39
- <marker id="arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
40
- <polygon points="0 0,8 3,0 6" fill="#1d4ed8"/>
41
- </marker>
42
- </defs>
43
-
44
- <rect width="1280" height="720" fill="#f0eee9"/>
45
-
46
- <!-- Trust zones -->
47
- <rect class="zone" x="248" y="96" width="344" height="448" rx="8"/>
48
- <rect class="label-mask" x="260" y="100" width="152" height="16" rx="2"/>
49
- <text class="zone-label" x="268" y="112">MAIN CONTROL PLANE</text>
50
-
51
- <rect class="zone" x="624" y="96" width="304" height="448" rx="8"/>
52
- <rect class="label-mask" x="636" y="100" width="164" height="16" rx="2"/>
53
- <text class="zone-label" x="644" y="112">TASK EXECUTION CHANNELS</text>
54
-
55
- <rect class="zone-protected" x="960" y="96" width="280" height="472" rx="8"/>
56
- <rect class="label-mask" x="972" y="100" width="196" height="16" rx="2"/>
57
- <text class="zone-label" x="980" y="112">PROTECTED MAIN REPOSITORY</text>
58
-
59
- <!-- Approved and audit paths -->
60
- <line class="edge" x1="216" y1="216" x2="280" y2="216"/>
61
- <line class="edge" x1="560" y1="216" x2="656" y2="216"/>
62
- <line class="edge" x1="420" y1="272" x2="420" y2="400"/>
63
- <line class="edge" x1="776" y1="272" x2="776" y2="336"/>
64
- <line class="edge-approved" x1="776" y1="448" x2="776" y2="472"/>
65
- <line class="edge-audit" x1="656" y1="424" x2="560" y2="424"/>
66
- <line class="edge-approved" x1="896" y1="516" x2="992" y2="516"/>
67
- <path class="edge-audit" d="M1068 560 V584 Q1068 592 1060 592 H428 Q420 592 420 584 V512"/>
68
-
69
- <!-- Forbidden routes stop before crossing -->
70
- <path class="edge-blocked" d="M704 272 V296 Q704 304 696 304 H624"/>
71
- <circle class="stop" cx="624" cy="304" r="8"/>
72
- <line class="stop-mark" x1="620" y1="300" x2="628" y2="308"/>
73
- <line class="stop-mark" x1="628" y1="300" x2="620" y2="308"/>
74
-
75
- <line class="edge-blocked" x1="896" y1="420" x2="952" y2="420"/>
76
- <circle class="stop" cx="952" cy="420" r="8"/>
77
- <line class="stop-mark" x1="948" y1="416" x2="956" y2="424"/>
78
- <line class="stop-mark" x1="956" y1="416" x2="948" y2="424"/>
79
-
80
- <!-- Connector labels -->
81
- <rect class="label-mask" x="220" y="196" width="56" height="12" rx="2"/>
82
- <text class="label" x="248" y="204">EXECUTE</text>
83
-
84
- <rect class="label-mask" x="580" y="196" width="56" height="12" rx="2"/>
85
- <text class="label" x="608" y="204">LAUNCH</text>
86
-
87
- <rect class="label-mask" x="428" y="324" width="72" height="12" rx="2"/>
88
- <text class="label" x="464" y="332">CHECKPOINT</text>
89
-
90
- <rect class="label-mask" x="784" y="296" width="72" height="12" rx="2"/>
91
- <text class="label" x="820" y="304">DISPATCH</text>
92
-
93
- <rect class="label-mask" x="788" y="452" width="72" height="12" rx="2"/>
94
- <text class="label-approved" x="824" y="460">CHANGESET</text>
95
-
96
- <rect class="label-mask" x="572" y="400" width="72" height="12" rx="2"/>
97
- <text class="label" x="608" y="408">TEXT RESULT</text>
98
-
99
- <rect class="label-mask" x="916" y="496" width="56" height="12" rx="2"/>
100
- <text class="label-approved" x="944" y="504">VERIFY</text>
101
-
102
- <rect class="label-mask" x="628" y="284" width="96" height="12" rx="2"/>
103
- <text class="label" x="676" y="292">NO CONTROL API</text>
104
-
105
- <rect class="label-mask" x="900" y="400" width="48" height="12" rx="2"/>
106
- <text class="label" x="924" y="408">NO BYPASS</text>
107
-
108
- <rect class="label-mask" x="696" y="572" width="80" height="12" rx="2"/>
109
- <text class="label" x="736" y="580">AUDIT RESULT</text>
110
-
111
- <!-- Opaque node masks -->
112
- <rect class="node-mask" x="40" y="160" width="176" height="112" rx="6"/>
113
- <rect class="node-mask" x="280" y="160" width="280" height="112" rx="6"/>
114
- <rect class="node-mask" x="280" y="400" width="280" height="112" rx="6"/>
115
- <rect class="node-mask" x="656" y="160" width="240" height="112" rx="6"/>
116
- <rect class="node-mask" x="656" y="336" width="240" height="112" rx="6"/>
117
- <rect class="node-mask" x="656" y="472" width="240" height="72" rx="6"/>
118
- <rect class="node-mask" x="992" y="472" width="216" height="88" rx="6"/>
119
-
120
- <!-- Request -->
121
- <rect class="node-input" x="40" y="160" width="176" height="112" rx="6"/>
122
- <rect class="tag" x="52" y="172" width="40" height="16" rx="2"/>
123
- <text class="tag-text" x="72" y="184">INPUT</text>
124
- <text class="name" x="128" y="216">Checked request</text>
125
- <text class="sub" x="128" y="240">TASK DAG · CHECKS · BUDGET</text>
126
-
127
- <!-- Main control plane -->
128
- <rect class="node-focal" x="280" y="160" width="280" height="112" rx="6"/>
129
- <rect class="tag-focal" x="292" y="172" width="40" height="16" rx="2"/>
130
- <text class="tag-text-focal" x="312" y="184">MAIN</text>
131
- <text class="name" x="420" y="212">Pi Subagent</text>
132
- <text class="sub" x="420" y="236">PREFLIGHTS ROLE + MODEL PAIRS</text>
133
- <text class="sub" x="420" y="252">RESOLVES AGAIN AT LAUNCH</text>
134
-
135
- <rect class="node-store" x="280" y="400" width="280" height="112" rx="6"/>
136
- <rect class="tag" x="292" y="412" width="48" height="16" rx="2"/>
137
- <text class="tag-text" x="316" y="424">AUDIT</text>
138
- <text class="name" x="420" y="452">Durable request state</text>
139
- <text class="sub" x="420" y="476">CONFIG/PI-SUBAGENT/STATE</text>
140
- <text class="sub" x="420" y="492">STRICT SCHEMA · RECOVERY EVIDENCE</text>
141
-
142
- <!-- Task-selected Role and execution channels -->
143
- <rect class="node" x="656" y="160" width="240" height="112" rx="6"/>
144
- <rect class="tag" x="668" y="172" width="40" height="16" rx="2"/>
145
- <text class="tag-text" x="688" y="184">ROLE</text>
146
- <text class="name" x="776" y="212">Current configured Role</text>
147
- <text class="sub" x="776" y="236">TASK-SELECTED · RESOLVED JIT</text>
148
- <text class="sub" x="776" y="252">TOOLS · SKILLS · MCP POLICY</text>
149
-
150
- <rect class="node-store" x="656" y="336" width="240" height="112" rx="6"/>
151
- <rect class="tag" x="668" y="348" width="56" height="16" rx="2"/>
152
- <text class="tag-text" x="696" y="360">CHANNEL</text>
153
- <text class="name" x="776" y="388">Text or changeset execution</text>
154
- <text class="sub" x="776" y="412">BOUNDED TEXT · ISOLATED HERDR</text>
155
- <text class="sub" x="776" y="428">MAIN DRIFT FAILS CLOSED</text>
156
-
157
- <!-- Live-worker changeset gate -->
158
- <rect class="node" x="656" y="472" width="240" height="72" rx="6"/>
159
- <rect class="tag" x="668" y="484" width="40" height="16" rx="2"/>
160
- <text class="tag-text" x="688" y="496">CHECK</text>
161
- <text class="name" x="776" y="508">Changeset checks + judgment</text>
162
- <text class="sub" x="776" y="528">LIVE WORKER · REBASE · EXACT PATCH</text>
163
-
164
- <!-- Protected Main repository -->
165
- <rect class="node-focal" x="992" y="472" width="216" height="88" rx="6"/>
166
- <rect class="tag-focal" x="1004" y="484" width="40" height="16" rx="2"/>
167
- <text class="tag-text-focal" x="1024" y="496">GATE</text>
168
- <text class="name" x="1100" y="520">Guarded Main integration</text>
169
- <text class="sub" x="1100" y="544">IDENTITY FENCE · DECLARED ORDER</text>
170
-
171
- <!-- Legend -->
172
- <line x1="40" y1="640" x2="1240" y2="640" stroke="#101828" stroke-opacity=".141" stroke-width=".8"/>
173
- <text class="legend-label" x="40" y="672">LEGEND</text>
174
-
175
- <line class="edge-approved" x1="136" y1="668" x2="184" y2="668"/>
176
- <text class="legend" x="200" y="672">approved checked path</text>
177
-
178
- <line class="edge-audit" x1="396" y1="668" x2="444" y2="668"/>
179
- <text class="legend" x="460" y="672">durable audit record</text>
180
-
181
- <line class="edge-blocked" x1="660" y1="668" x2="700" y2="668"/>
182
- <circle class="stop" cx="708" cy="668" r="8"/>
183
- <line class="stop-mark" x1="704" y1="664" x2="712" y2="672"/>
184
- <line class="stop-mark" x1="712" y1="664" x2="704" y2="672"/>
185
- <text class="legend" x="728" y="672">blocked before boundary</text>
186
-
187
- <rect class="zone-protected" x="988" y="660" width="32" height="16" rx="4"/>
188
- <text class="legend" x="1036" y="672">trust boundary</text>
189
- </svg>
2
+ <svg width="1280" height="720" viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="orchestration-architecture-title orchestration-architecture-desc" id="orchestration-architecture-root">
3
+ <title id="orchestration-architecture-title">Pi Subagent isolated workflow</title>
4
+ <desc id="orchestration-architecture-desc">Workers commit checked candidates for Main to stage while siblings run, advance dependent waves, validate the combined tip, and explicitly promote into unchanged clean Main.</desc>
5
+ <defs>
6
+ <style>@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&amp;family=Geist:wght@400;500;600&amp;family=Geist+Mono:wght@400;500;600&amp;family=Noto+Serif:ital@0;1&amp;family=Noto+Sans+KR:wght@400;500;600&amp;family=Noto+Serif+KR:wght@400&amp;family=Noto+Sans+TC:wght@400;500;600&amp;family=Noto+Serif+TC:wght@400&amp;display=swap');
7
+ #orchestration-architecture-root { color: #101828; font-family: 'Geist', sans-serif; }
8
+ #orchestration-architecture-root .diagram-scroll { overflow-x: auto; }
9
+ #orchestration-architecture-root .section { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; letter-spacing: .12em; }
10
+ #orchestration-architecture-root .node { fill: #ffffff; stroke: #101828; stroke-width: 1; }
11
+ #orchestration-architecture-root .input { fill: #e6e4de; stroke: #6a7282; stroke-width: 1; }
12
+ #orchestration-architecture-root .focal { fill: #1d4ed8; fill-opacity: .08; stroke: #1d4ed8; stroke-width: 1.2; }
13
+ #orchestration-architecture-root .optional { fill: #101828; fill-opacity: .02; stroke: #4c5665; stroke-width: 1; stroke-dasharray: 4 3; }
14
+ #orchestration-architecture-root .tag { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; }
15
+ #orchestration-architecture-root .name { fill: #101828; font: 600 12px 'Geist', sans-serif; text-anchor: middle; }
16
+ #orchestration-architecture-root .detail { fill: #4c5665; font: 400 12px 'Geist', sans-serif; text-anchor: middle; }
17
+ #orchestration-architecture-root .code { fill: #4c5665; font: 400 8px 'Geist Mono', monospace; text-anchor: middle; }
18
+ #orchestration-architecture-root .edge { fill: none; stroke: #4c5665; stroke-width: 1.2; marker-end: url(#orchestration-architecture-arrow); }
19
+ #orchestration-architecture-root .branch { fill: none; stroke: #4c5665; stroke-width: 1; stroke-dasharray: 5 4; marker-end: url(#orchestration-architecture-arrow); }
20
+ #orchestration-architecture-root .approved { fill: none; stroke: #1d4ed8; stroke-width: 1.2; marker-end: url(#orchestration-architecture-arrow-accent); }
21
+ #orchestration-architecture-root .label-mask { fill: #f0eee9; }
22
+ #orchestration-architecture-root .label { fill: #4c5665; font: 500 8px 'Geist Mono', monospace; text-anchor: middle; }
23
+ #orchestration-architecture-root .note-title { fill: #101828; font: 600 12px 'Geist', sans-serif; }
24
+ #orchestration-architecture-root .note { fill: #4c5665; font: 400 12px 'Geist', sans-serif; }
25
+ #orchestration-architecture-root .key { fill: #4c5665; font: 400 12px 'Geist', sans-serif; }</style>
26
+ <style>
27
+ .section { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; letter-spacing: .12em; }
28
+ .node { fill: #ffffff; stroke: #101828; stroke-width: 1; }
29
+ .input { fill: #e6e4de; stroke: #6a7282; stroke-width: 1; }
30
+ .focal { fill: #1d4ed8; fill-opacity: .08; stroke: #1d4ed8; stroke-width: 1.2; }
31
+ .optional { fill: #101828; fill-opacity: .02; stroke: #4c5665; stroke-width: 1; stroke-dasharray: 4 3; }
32
+ .tag { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; }
33
+ .name { fill: #101828; font: 600 12px 'Geist', sans-serif; text-anchor: middle; }
34
+ .detail { fill: #4c5665; font: 400 12px 'Geist', sans-serif; text-anchor: middle; }
35
+ .code { fill: #4c5665; font: 400 8px 'Geist Mono', monospace; text-anchor: middle; }
36
+ .edge { fill: none; stroke: #4c5665; stroke-width: 1.2; marker-end: url(#orchestration-architecture-arrow); }
37
+ .branch { fill: none; stroke: #4c5665; stroke-width: 1; stroke-dasharray: 5 4; marker-end: url(#orchestration-architecture-arrow); }
38
+ .approved { fill: none; stroke: #1d4ed8; stroke-width: 1.2; marker-end: url(#orchestration-architecture-arrow-accent); }
39
+ .label-mask { fill: #f0eee9; }
40
+ .label { fill: #4c5665; font: 500 8px 'Geist Mono', monospace; text-anchor: middle; }
41
+ .note-title { fill: #101828; font: 600 12px 'Geist', sans-serif; }
42
+ .note { fill: #4c5665; font: 400 12px 'Geist', sans-serif; }
43
+ .key { fill: #4c5665; font: 400 12px 'Geist', sans-serif; }
44
+ </style>
45
+ <marker id="orchestration-architecture-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
46
+ <polygon points="0 0,8 3,0 6" fill="#4c5665"/>
47
+ </marker>
48
+ <marker id="orchestration-architecture-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
49
+ <polygon points="0 0,8 3,0 6" fill="#1d4ed8"/>
50
+ </marker>
51
+ </defs>
52
+ <rect width="1280" height="720" fill="#f0eee9"/>
53
+ <text class="section" x="40" y="120">CANDIDATE PRODUCTION</text>
54
+ <text class="section" x="40" y="320">MAIN'S EXPLICIT ACTIONS</text>
55
+
56
+ <!-- Draw connectors and their labels before nodes. -->
57
+ <line class="edge" x1="256" y1="208" x2="304" y2="208"/>
58
+ <line class="edge" x1="560" y1="208" x2="608" y2="208"/>
59
+ <line class="edge" x1="880" y1="208" x2="928" y2="208"/>
60
+ <line class="edge" x1="1064" y1="272" x2="1064" y2="344"/>
61
+ <line class="edge" x1="928" y1="408" x2="880" y2="408"/>
62
+ <line class="approved" x1="568" y1="408" x2="472" y2="408"/>
63
+ <line class="branch" x1="1064" y1="472" x2="1064" y2="520"/>
64
+ <path class="branch" d="M1200 564 H1224 Q1232 564 1232 556 V96 Q1232 88 1224 88 H440 Q432 88 432 96 V144"/>
65
+ <rect class="label-mask" x="884" y="388" width="40" height="12" rx="2"/>
66
+ <text class="label" x="904" y="396">SETTLED</text>
67
+ <rect class="label-mask" x="500" y="388" width="40" height="12" rx="2"/>
68
+ <text class="label" x="520" y="396">PASS</text>
69
+ <rect class="label-mask" x="1072" y="488" width="72" height="12" rx="2"/>
70
+ <text class="label" x="1108" y="496">DEPENDENTS</text>
71
+ <rect class="label-mask" x="716" y="68" width="80" height="12" rx="2"/>
72
+ <text class="label" x="756" y="76">STAGED BASE</text>
73
+
74
+ <rect class="input" x="40" y="144" width="216" height="128" rx="6"/>
75
+ <text class="tag" x="56" y="168">MAIN</text>
76
+ <text class="name" x="148" y="200">Start isolated request</text>
77
+ <text class="code" x="148" y="224">delegate_task · mode: isolated</text>
78
+ <text class="detail" x="148" y="248">Keep the durable request ID.</text>
79
+
80
+ <rect class="node" x="304" y="144" width="256" height="128" rx="6"/>
81
+ <text class="tag" x="320" y="168">WORKERS</text>
82
+ <text class="name" x="432" y="200">Commit candidates</text>
83
+ <text class="detail" x="432" y="224">Use owned worktrees.</text>
84
+ <text class="detail" x="432" y="248">No tracked or untracked changes.</text>
85
+
86
+ <rect class="node" x="608" y="144" width="272" height="128" rx="6"/>
87
+ <text class="tag" x="624" y="168">RUNNER</text>
88
+ <text class="name" x="744" y="200">Run preliminary checks</text>
89
+ <text class="detail" x="744" y="224">Include optional task judgment.</text>
90
+ <text class="detail" x="744" y="248">Bind evidence to the exact candidate.</text>
91
+
92
+ <rect class="node" x="928" y="144" width="272" height="128" rx="6"/>
93
+ <text class="tag" x="944" y="168">RUNNER → MAIN</text>
94
+ <text class="name" x="1064" y="200">Send ready follow-up</text>
95
+ <text class="detail" x="1064" y="224">Readiness is not promotion.</text>
96
+ <text class="code" x="1064" y="248">subagent_status</text>
97
+
98
+ <rect class="focal" x="928" y="344" width="272" height="128" rx="6"/>
99
+ <text class="tag" x="944" y="368">MAIN · INTEGRATION CHECKOUT</text>
100
+ <text class="name" x="1064" y="400">Stage exact candidates</text>
101
+ <text class="code" x="1064" y="424">subagent_stage</text>
102
+ <text class="detail" x="1064" y="448">Stage while siblings run.</text>
103
+
104
+ <rect class="node" x="568" y="344" width="312" height="128" rx="6"/>
105
+ <text class="tag" x="584" y="368">MAIN · AFTER THE WAVE SETTLES</text>
106
+ <text class="name" x="724" y="400">Validate the exact combined tip</text>
107
+ <text class="code" x="724" y="424">subagent_integrate validate</text>
108
+ <text class="detail" x="724" y="448">Final checks and optional final judgment</text>
109
+
110
+ <rect class="focal" x="160" y="344" width="312" height="128" rx="6"/>
111
+ <text class="tag" x="176" y="368">MAIN · EXPLICIT PROMOTION</text>
112
+ <text class="name" x="316" y="400">Promote passing work</text>
113
+ <text class="code" x="316" y="424">subagent_integrate promote</text>
114
+ <text class="detail" x="316" y="448">Main must be unchanged and clean.</text>
115
+
116
+ <rect class="optional" x="928" y="520" width="272" height="88" rx="6"/>
117
+ <text class="name" x="1064" y="544">Advance dependent tasks</text>
118
+ <text class="code" x="1064" y="564">subagent_integrate advance</text>
119
+ <text class="detail" x="1064" y="588">Run from the selected staged snapshot.</text>
120
+
121
+ <!-- Safety details remain in the README as text. -->
122
+ <text class="note-title" x="40" y="536">Blocked promotion preserves evidence.</text>
123
+ <text class="note" x="40" y="560">Failures, conflicts, changed identities, or uncertain</text>
124
+ <text class="note" x="40" y="580">outcomes require inspection, not replay.</text>
125
+ <text class="note-title" x="520" y="536">One combined correction</text>
126
+ <text class="note" x="520" y="560">After a definitive combined check or review failure,</text>
127
+ <text class="note" x="520" y="580">commit one correction, record it, then validate again.</text>
128
+
129
+ <line x1="40" y1="640" x2="1240" y2="640" stroke="#101828" stroke-opacity=".141"/>
130
+ <line class="edge" x1="40" y1="672" x2="88" y2="672"/>
131
+ <text class="key" x="104" y="676">Checked sequence</text>
132
+ <line class="branch" x1="304" y1="672" x2="352" y2="672"/>
133
+ <text class="key" x="368" y="676">Dependent wave, if needed</text>
134
+ <text class="key" x="704" y="676">Staging, validation, and promotion require exact, clean Main.</text>
135
+ </svg>
@@ -13,7 +13,7 @@
13
13
  <body><main><h1>Checked subagent lifecycle and coordinator recovery</h1>
14
14
  <svg xmlns="http://www.w3.org/2000/svg" width="1280" height="720" viewBox="0 0 1280 720" role="img" aria-labelledby="worker-lifecycle-title worker-lifecycle-desc">
15
15
  <title id="worker-lifecycle-title">Checked subagent lifecycle and coordinator recovery</title>
16
- <desc id="worker-lifecycle-desc">Main delegates to the coordinator extension in its own Pi process. The coordinator saves state and launches a Herdr subagent in an isolated worktree. After the subagent commits, the coordinator verifies and saves a checked candidate; Main explicitly stages and promotes only after combined validation. A worker failure waits for the wave to settle before an attention follow-up. If the coordinator process stops, no follow-up is guaranteed; the last durable state remains for status inspection and deliberate recovery without automatic replay.</desc>
16
+ <desc id="worker-lifecycle-desc">Main delegates through its coordinator extension to an isolated Herdr subagent, then stages a checked candidate, validates the combined tip, and promotes only after validation passes; saved worker attention sends a follow-up while siblings may run, the wave reports separately when settled, and a coordinator interruption requires Main to run /subagent recover once and inspect saved state without automatic replay or a guaranteed follow-up.</desc>
17
17
  <defs>
18
18
  <style>@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&amp;family=Geist:wght@400;500;600&amp;family=Geist+Mono:wght@400;500;600&amp;display=swap');</style>
19
19
  <marker id="worker-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0,8 3,0 6" fill="#4c5665"/></marker>
@@ -58,12 +58,14 @@
58
58
  <g fill="#101828" font-family="'Geist',sans-serif" font-size="12" font-weight="600" text-anchor="middle">
59
59
  <text x="149" y="339">Delegate task</text><text x="391" y="339">Save + launch</text>
60
60
  <text x="633" y="339">Implement + commit</text><text x="875" y="339">Check + seal</text>
61
- <text x="1117" y="339">Stage + promote</text>
61
+ <text x="1117" y="325">Stage candidate</text>
62
62
  </g>
63
63
  <g fill="#4c5665" font-family="'Geist',sans-serif" font-size="11" text-anchor="middle">
64
64
  <text x="149" y="370">Bounded request</text><text x="391" y="370">Durable ID + lease</text>
65
65
  <text x="633" y="370">Isolated worktree</text><text x="875" y="370">Clean tip + task checks</text>
66
- <text x="1117" y="370">Combined validation first</text>
66
+ <text x="1117" y="350">Validate combined tip</text>
67
+ <text x="1117" y="374">Promote after passing</text>
68
+ <text x="1117" y="390">validation</text>
67
69
  </g>
68
70
  <!-- Recovery bands: an incomplete worker and a stopped coordinator are distinct. -->
69
71
  <rect x="286" y="468" width="448" height="146" rx="8" fill="#e6e4de"/>
@@ -78,12 +80,15 @@
78
80
  <rect x="994" y="512" width="190" height="68" rx="8"/>
79
81
  </g>
80
82
  <g fill="#101828" font-family="'Geist',sans-serif" font-size="12" font-weight="600" text-anchor="middle">
81
- <text x="405" y="540">No checked candidate</text><text x="622" y="540">Wave needs attention</text>
82
- <text x="873" y="540">No guaranteed message</text><text x="1089" y="540">Inspect saved state</text>
83
+ <text x="405" y="532">No checked candidate</text><text x="622" y="540">Wave result</text>
84
+ <text x="873" y="540">No guaranteed message</text>
83
85
  </g>
84
86
  <g fill="#4c5665" font-family="'Geist',sans-serif" font-size="10" text-anchor="middle">
85
- <text x="405" y="560">Failure retained</text><text x="622" y="560">Follow-up when settled</text>
86
- <text x="873" y="560">Last write survives</text><text x="1089" y="560">Restart; recover deliberately</text>
87
+ <text x="405" y="550">Saved attention → follow-up</text><text x="405" y="566">Siblings may still run</text>
88
+ <text x="622" y="560">Report when settled</text>
89
+ <text x="873" y="560">Last write survives</text>
90
+ <text x="1089" y="540">Run <tspan font-family="'Geist Mono',monospace">/subagent recover</tspan></text>
91
+ <text x="1089" y="560">once; inspect saved state</text>
87
92
  </g>
88
93
  <line x1="48" y1="648" x2="1232" y2="648" stroke="#101828" stroke-opacity="0.12"/>
89
94
  <text x="48" y="675" fill="#6a7282" font-family="'Geist Mono',monospace" font-size="8" letter-spacing="1">GUARD</text>
@@ -1,11 +1,12 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="1280" height="720" viewBox="0 0 1280 720" role="img" aria-labelledby="worker-lifecycle-title worker-lifecycle-desc">
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="1280" height="720" viewBox="0 0 1280 720" role="img" aria-labelledby="worker-lifecycle-title worker-lifecycle-desc" id="worker-lifecycle-root">
3
3
  <title id="worker-lifecycle-title">Checked subagent lifecycle and coordinator recovery</title>
4
- <desc id="worker-lifecycle-desc">Main delegates to the coordinator extension in its own Pi process. The coordinator saves state and launches a Herdr subagent in an isolated worktree. After the subagent commits, the coordinator verifies and saves a checked candidate; Main explicitly stages and promotes only after combined validation. A worker failure waits for the wave to settle before an attention follow-up. If the coordinator process stops, no follow-up is guaranteed; the last durable state remains for status inspection and deliberate recovery without automatic replay.</desc>
4
+ <desc id="worker-lifecycle-desc">Main delegates through its coordinator extension to an isolated Herdr subagent, then stages a checked candidate, validates the combined tip, and promotes only after validation passes; saved worker attention sends a follow-up while siblings may run, the wave reports separately when settled, and a coordinator interruption requires Main to run /subagent recover once and inspect saved state without automatic replay or a guaranteed follow-up.</desc>
5
5
  <defs>
6
+ <style>#worker-lifecycle-root { color: #101828; font-family: 'Geist', sans-serif; }</style>
6
7
  <style>@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&amp;family=Geist:wght@400;500;600&amp;family=Geist+Mono:wght@400;500;600&amp;display=swap');</style>
7
- <marker id="worker-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0,8 3,0 6" fill="#4c5665"/></marker>
8
- <marker id="worker-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0,8 3,0 6" fill="#1d4ed8"/></marker>
8
+ <marker id="worker-lifecycle-worker-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0,8 3,0 6" fill="#4c5665"/></marker>
9
+ <marker id="worker-lifecycle-worker-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0,8 3,0 6" fill="#1d4ed8"/></marker>
9
10
  </defs>
10
11
  <rect width="1280" height="720" fill="#f0eee9"/>
11
12
  <text x="48" y="60" fill="#6a7282" font-family="'Geist Mono',monospace" font-size="8" letter-spacing="1.5">PI SUBAGENT / ONE ISOLATED WORKER</text>
@@ -15,14 +16,14 @@
15
16
  <text x="84" y="181" fill="#101828" font-family="'Geist',sans-serif" font-size="12" font-weight="600">One worker shown; siblings can keep working after this candidate is ready.</text>
16
17
  <text x="84" y="200" fill="#4c5665" font-family="'Geist',sans-serif" font-size="12">State is persisted by the coordinator. Herdr agent status alone does not prove a clean, checked candidate.</text>
17
18
  <!-- Connectors before nodes. Primary rail is the checked path; dashed paths retain uncertainty. -->
18
- <line x1="234" y1="350" x2="306" y2="350" stroke="#4c5665" marker-end="url(#worker-arrow)"/>
19
- <line x1="476" y1="350" x2="548" y2="350" stroke="#4c5665" marker-end="url(#worker-arrow)"/>
20
- <line x1="718" y1="350" x2="790" y2="350" stroke="#4c5665" marker-end="url(#worker-arrow)"/>
21
- <line x1="960" y1="350" x2="1032" y2="350" stroke="#1d4ed8" stroke-width="1.4" marker-end="url(#worker-arrow-accent)"/>
22
- <path d="M633 405 V434 Q633 442 625 442 H408 Q400 442 400 450 V512" fill="none" stroke="#4c5665" stroke-dasharray="5,4" marker-end="url(#worker-arrow)"/>
23
- <line x1="500" y1="546" x2="526" y2="546" stroke="#4c5665" marker-end="url(#worker-arrow)"/>
24
- <line x1="875" y1="405" x2="875" y2="512" stroke="#4c5665" stroke-dasharray="5,4" marker-end="url(#worker-arrow)"/>
25
- <line x1="968" y1="546" x2="994" y2="546" stroke="#4c5665" marker-end="url(#worker-arrow)"/>
19
+ <line x1="234" y1="350" x2="306" y2="350" stroke="#4c5665" marker-end="url(#worker-lifecycle-worker-arrow)"/>
20
+ <line x1="476" y1="350" x2="548" y2="350" stroke="#4c5665" marker-end="url(#worker-lifecycle-worker-arrow)"/>
21
+ <line x1="718" y1="350" x2="790" y2="350" stroke="#4c5665" marker-end="url(#worker-lifecycle-worker-arrow)"/>
22
+ <line x1="960" y1="350" x2="1032" y2="350" stroke="#1d4ed8" stroke-width="1.4" marker-end="url(#worker-lifecycle-worker-arrow-accent)"/>
23
+ <path d="M633 405 V434 Q633 442 625 442 H408 Q400 442 400 450 V512" fill="none" stroke="#4c5665" stroke-dasharray="5,4" marker-end="url(#worker-lifecycle-worker-arrow)"/>
24
+ <line x1="500" y1="546" x2="526" y2="546" stroke="#4c5665" marker-end="url(#worker-lifecycle-worker-arrow)"/>
25
+ <line x1="875" y1="405" x2="875" y2="512" stroke="#4c5665" stroke-dasharray="5,4" marker-end="url(#worker-lifecycle-worker-arrow)"/>
26
+ <line x1="968" y1="546" x2="994" y2="546" stroke="#4c5665" marker-end="url(#worker-lifecycle-worker-arrow)"/>
26
27
  <!-- Transition labels sit above, not on, their strokes. -->
27
28
  <g fill="#4c5665" font-family="'Geist Mono',monospace" font-size="8" text-anchor="middle">
28
29
  <rect x="242" y="324" width="56" height="12" rx="2" fill="#f0eee9"/><text x="270" y="333">START</text>
@@ -46,12 +47,14 @@
46
47
  <g fill="#101828" font-family="'Geist',sans-serif" font-size="12" font-weight="600" text-anchor="middle">
47
48
  <text x="149" y="339">Delegate task</text><text x="391" y="339">Save + launch</text>
48
49
  <text x="633" y="339">Implement + commit</text><text x="875" y="339">Check + seal</text>
49
- <text x="1117" y="339">Stage + promote</text>
50
+ <text x="1117" y="325">Stage candidate</text>
50
51
  </g>
51
52
  <g fill="#4c5665" font-family="'Geist',sans-serif" font-size="11" text-anchor="middle">
52
53
  <text x="149" y="370">Bounded request</text><text x="391" y="370">Durable ID + lease</text>
53
54
  <text x="633" y="370">Isolated worktree</text><text x="875" y="370">Clean tip + task checks</text>
54
- <text x="1117" y="370">Combined validation first</text>
55
+ <text x="1117" y="350">Validate combined tip</text>
56
+ <text x="1117" y="374">Promote after passing</text>
57
+ <text x="1117" y="390">validation</text>
55
58
  </g>
56
59
  <!-- Recovery bands: an incomplete worker and a stopped coordinator are distinct. -->
57
60
  <rect x="286" y="468" width="448" height="146" rx="8" fill="#e6e4de"/>
@@ -66,12 +69,15 @@
66
69
  <rect x="994" y="512" width="190" height="68" rx="8"/>
67
70
  </g>
68
71
  <g fill="#101828" font-family="'Geist',sans-serif" font-size="12" font-weight="600" text-anchor="middle">
69
- <text x="405" y="540">No checked candidate</text><text x="622" y="540">Wave needs attention</text>
70
- <text x="873" y="540">No guaranteed message</text><text x="1089" y="540">Inspect saved state</text>
72
+ <text x="405" y="532">No checked candidate</text><text x="622" y="540">Wave result</text>
73
+ <text x="873" y="540">No guaranteed message</text>
71
74
  </g>
72
75
  <g fill="#4c5665" font-family="'Geist',sans-serif" font-size="10" text-anchor="middle">
73
- <text x="405" y="560">Failure retained</text><text x="622" y="560">Follow-up when settled</text>
74
- <text x="873" y="560">Last write survives</text><text x="1089" y="560">Restart; recover deliberately</text>
76
+ <text x="405" y="550">Saved attention → follow-up</text><text x="405" y="566">Siblings may still run</text>
77
+ <text x="622" y="560">Report when settled</text>
78
+ <text x="873" y="560">Last write survives</text>
79
+ <text x="1089" y="540">Run <tspan font-family="'Geist Mono',monospace">/subagent recover</tspan></text>
80
+ <text x="1089" y="560">once; inspect saved state</text>
75
81
  </g>
76
82
  <line x1="48" y1="648" x2="1232" y2="648" stroke="#101828" stroke-opacity="0.12"/>
77
83
  <text x="48" y="675" fill="#6a7282" font-family="'Geist Mono',monospace" font-size="8" letter-spacing="1">GUARD</text>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-subagent",
3
- "version": "27.4.3",
3
+ "version": "27.4.5",
4
4
  "description": "Delegate bounded direct work or durable checked isolated task graphs to Pi roles.",
5
5
  "keywords": [
6
6
  "pi-package",