@henryqw/pi-subagent 27.4.3 → 27.4.4
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.
- package/README.md +13 -18
- package/docs/orchestration-architecture.html +125 -225
- package/docs/orchestration-architecture.svg +134 -188
- package/docs/worker-lifecycle.html +12 -7
- package/docs/worker-lifecycle.svg +24 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,11 +13,7 @@ pi install npm:@henryqw/pi-task-models
|
|
|
13
13
|
pi install npm:@henryqw/pi-subagent
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Upgrade from 26.x
|
|
19
|
-
|
|
20
|
-
Version 27.0.0 requires direct tasks to declare `access` and rejects unknown Role frontmatter keys. The library replaces `loadRoles` with `loadRoleCatalog` and `findRole`. Read [Migrate from 26.x to 27.0.0](./docs/migration.md).
|
|
16
|
+
Configure the profiles that your Roles use in `/task-models`. Direct writer termination proof requires native `lsof`.
|
|
21
17
|
|
|
22
18
|
## Works with
|
|
23
19
|
|
|
@@ -48,7 +44,7 @@ Commands and UI are for you. Tools and the packaged skill are for Main, except `
|
|
|
48
44
|
| Direct status widget (`D`) | ui | Show direct references, names, Role badges, status, routes, elapsed time, measured task tokens, and tool activity in the TUI. |
|
|
49
45
|
| Isolated status widget (`I`) | ui | Show recorded task state, Role/model-class badges, and retained workspaces in the TUI. Readiness does not mean promotion. |
|
|
50
46
|
|
|
51
|
-
`delegate_task`, `subagent_resume`, `subagent_stage`, `subagent_integrate`, and `subagent_abort` are model-only. Main must make these decisions visibly; `codemode` scripts can call only `subagent_status`.
|
|
47
|
+
`delegate_task`, `subagent_resume`, `subagent_stage`, `subagent_integrate`, and `subagent_abort` are model-only. Main must make these decisions visibly; `codemode` scripts can call only `subagent_status`.
|
|
52
48
|
|
|
53
49
|
### Direct workflow
|
|
54
50
|
|
|
@@ -76,9 +72,7 @@ Every task requires `access: "read"` or `access: "write"`. Declare `write` for f
|
|
|
76
72
|
|
|
77
73
|
Read requests run parallel tasks up to `maxSubagents`. Chains run in order, replace literal `{previous}` with the preceding successful answer, and stop on failure. Any `write` task makes the whole request serial and reserves checkout admission until all owned workers stop.
|
|
78
74
|
|
|
79
|
-
Direct writes change Main's checkout immediately, including dirty checkouts
|
|
80
|
-
|
|
81
|
-
While admission is held, competing direct writers and Main writes fail. A direct writer also cannot start during a Main call that can write, including Bash or nested `codemode` writes. Main calls do not block each other; reads never wait. Use isolated mode to keep Main free to write.
|
|
75
|
+
Direct writes change Main's checkout immediately, including dirty checkouts, and have no automatic checks or rollback. Preserve unrelated edits. See [Direct contract](./docs/orchestration.md#direct-contract) for write scope and checkout-admission rules.
|
|
82
76
|
|
|
83
77
|
Tasks in write requests must return one JSON completion object:
|
|
84
78
|
|
|
@@ -94,6 +88,8 @@ To continue a finished worker, add `"continueFrom": "D7.1"` with the same `role`
|
|
|
94
88
|
|
|
95
89
|
### Isolated workflow
|
|
96
90
|
|
|
91
|
+

|
|
92
|
+
|
|
97
93
|
Use isolated mode for checked implementation. An isolated request has one durable ID, one goal, and 1 to 8 text or changeset tasks:
|
|
98
94
|
|
|
99
95
|
```json
|
|
@@ -120,13 +116,14 @@ Use isolated mode for checked implementation. An isolated request has one durabl
|
|
|
120
116
|
|
|
121
117
|
Workers use Main's pinned committed branch, HEAD, and tree, not staged, unstaged, or untracked edits. Branch or HEAD changes block new waves. Candidates must be committed with no tracked or untracked changes. Ignored generated files permit candidacy but prevent automatic cleanup.
|
|
122
118
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
Keep the durable ID; Main can work or end its turn without polling. Inspect ready candidates with `subagent_status`.
|
|
120
|
+
|
|
121
|
+
- `subagent_stage` stages exact candidates while siblings run; resolve conflicts in the integration checkout.
|
|
122
|
+
- `subagent_integrate advance` runs dependents on a staged snapshot.
|
|
123
|
+
- `subagent_integrate validate` checks the combined integration tip after the wave settles, with final checks and any final judgment.
|
|
124
|
+
- `subagent_integrate promote` explicitly promotes passing work.
|
|
128
125
|
|
|
129
|
-
Checks and judgments bind to exact Git identities. Staging, combined validation, and promotion require clean Main at the pinned identity. Changed identities, conflicts, or uncertain outcomes block promotion and preserve evidence. A definitive combined check or review failure permits one committed integration correction and another validation.
|
|
126
|
+
Readiness requires preliminary checks and any task `judgment`; it does not permit promotion. Checks and judgments bind to exact Git identities. Staging, combined validation, and promotion require unchanged, clean Main at the pinned identity. Changed identities, conflicts, or uncertain outcomes block promotion and preserve evidence. A definitive combined check or review failure permits one committed integration correction, recorded with `subagent_integrate correct`, and another validation.
|
|
130
127
|
|
|
131
128
|
The extension sends follow-ups when a candidate becomes ready, a worker needs attention, and the wave finishes. A missed follow-up does not authorize replay. Read [Isolated contract](./docs/orchestration.md#isolated-contract) and [Exact integration actions](./docs/orchestration.md#exact-integration-actions) for graph, judgment, revision, refresh, and release details.
|
|
132
129
|
|
|
@@ -134,9 +131,7 @@ The extension sends follow-ups when a candidate becomes ready, a worker needs at
|
|
|
134
131
|
|
|
135
132
|
Open `/subagent` to browse direct work on this session branch and isolated requests in the current canonical Git checkout, including other sessions. **Refresh** reloads saved status without recovery or mutation. Invalid state IDs stay preserved with a warning. Direct recovery remains available outside Git or without isolated inventory.
|
|
136
133
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
For locally active unsealed changesets, **Send follow-up instructions** queues a revision. **Edit queued instructions** withdraws all pending instructions before opening the editor; cancel leaves them removed. Already-claimed instructions cannot be recalled. Submission queues one replacement, and late submissions can fail after sealing. Read [Inspect and revise active work](./docs/orchestration.md#inspect-and-revise-active-work) before editing queued instructions.
|
|
134
|
+
Inspection needs a Herdr pane, the configured `scout` Role, and the `fast` route. If it cannot start, the request stays unchanged; Main can use `subagent_status` to read state. See [Inspect and revise active work](./docs/orchestration.md#inspect-and-revise-active-work) for inspection and follow-up details.
|
|
140
135
|
|
|
141
136
|
See [Status widgets](./docs/orchestration.md#status-widgets) for reference numbering, token counts, and activity metrics, and [Choose a delegation mode](./docs/orchestration.md#choose-a-delegation-mode) for routing guidance.
|
|
142
137
|
|
|
@@ -3,236 +3,136 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Pi Subagent
|
|
7
|
-
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
6
|
+
<title>Pi Subagent isolated workflow</title>
|
|
7
|
+
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
8
8
|
<style>
|
|
9
|
-
|
|
10
|
-
:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
body {
|
|
16
|
-
min-height: 100vh;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
padding: 48px 32px;
|
|
21
|
-
background: var(--paper);
|
|
22
|
-
color: var(--ink);
|
|
23
|
-
font-family: 'Geist', sans-serif;
|
|
24
|
-
}
|
|
25
|
-
.frame { width: 100%; max-width: 1280px; }
|
|
26
|
-
.eyebrow {
|
|
27
|
-
margin-bottom: 8px;
|
|
28
|
-
color: var(--muted);
|
|
29
|
-
font: 500 8px 'Geist Mono', monospace;
|
|
30
|
-
letter-spacing: .18em;
|
|
31
|
-
text-transform: uppercase;
|
|
32
|
-
}
|
|
33
|
-
h1 {
|
|
34
|
-
margin-bottom: 24px;
|
|
35
|
-
color: var(--ink);
|
|
36
|
-
font: 400 28px 'Instrument Serif', serif;
|
|
37
|
-
letter-spacing: -.02em;
|
|
38
|
-
line-height: 1.15;
|
|
39
|
-
}
|
|
40
|
-
svg { display: block; width: 100%; height: auto; }
|
|
9
|
+
* { box-sizing: border-box; }
|
|
10
|
+
body { margin: 0; padding: 32px; background: #f0eee9; color: #101828; font-family: 'Geist', sans-serif; }
|
|
11
|
+
.frame { width: 100%; max-width: 1280px; margin: auto; }
|
|
12
|
+
h1 { margin: 0 0 24px; font: 400 28px 'Instrument Serif', serif; }
|
|
13
|
+
.diagram-scroll { overflow-x: auto; }
|
|
14
|
+
svg { display: block; width: 100%; min-width: 1280px; height: auto; }
|
|
41
15
|
</style>
|
|
42
16
|
</head>
|
|
43
17
|
<body>
|
|
44
18
|
<main class="frame">
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
</
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
<rect class="node-mask" x="656" y="336" width="240" height="112" rx="6"/>
|
|
163
|
-
<rect class="node-mask" x="656" y="472" width="240" height="72" rx="6"/>
|
|
164
|
-
<rect class="node-mask" x="992" y="472" width="216" height="88" rx="6"/>
|
|
165
|
-
|
|
166
|
-
<!-- Request -->
|
|
167
|
-
<rect class="node-input" x="40" y="160" width="176" height="112" rx="6"/>
|
|
168
|
-
<rect class="tag" x="52" y="172" width="40" height="16" rx="2"/>
|
|
169
|
-
<text class="tag-text" x="72" y="184">INPUT</text>
|
|
170
|
-
<text class="name" x="128" y="216">Checked request</text>
|
|
171
|
-
<text class="sub" x="128" y="240">TASK DAG · CHECKS · BUDGET</text>
|
|
172
|
-
|
|
173
|
-
<!-- Main control plane -->
|
|
174
|
-
<rect class="node-focal" x="280" y="160" width="280" height="112" rx="6"/>
|
|
175
|
-
<rect class="tag-focal" x="292" y="172" width="40" height="16" rx="2"/>
|
|
176
|
-
<text class="tag-text-focal" x="312" y="184">MAIN</text>
|
|
177
|
-
<text class="name" x="420" y="212">Pi Subagent</text>
|
|
178
|
-
<text class="sub" x="420" y="236">PREFLIGHTS ROLE + MODEL PAIRS</text>
|
|
179
|
-
<text class="sub" x="420" y="252">RESOLVES AGAIN AT LAUNCH</text>
|
|
180
|
-
|
|
181
|
-
<rect class="node-store" x="280" y="400" width="280" height="112" rx="6"/>
|
|
182
|
-
<rect class="tag" x="292" y="412" width="48" height="16" rx="2"/>
|
|
183
|
-
<text class="tag-text" x="316" y="424">AUDIT</text>
|
|
184
|
-
<text class="name" x="420" y="452">Durable request state</text>
|
|
185
|
-
<text class="sub" x="420" y="476">CONFIG/PI-SUBAGENT/STATE</text>
|
|
186
|
-
<text class="sub" x="420" y="492">STRICT SCHEMA · RECOVERY EVIDENCE</text>
|
|
187
|
-
|
|
188
|
-
<!-- Task-selected Role and execution channels -->
|
|
189
|
-
<rect class="node" x="656" y="160" width="240" height="112" rx="6"/>
|
|
190
|
-
<rect class="tag" x="668" y="172" width="40" height="16" rx="2"/>
|
|
191
|
-
<text class="tag-text" x="688" y="184">ROLE</text>
|
|
192
|
-
<text class="name" x="776" y="212">Current configured Role</text>
|
|
193
|
-
<text class="sub" x="776" y="236">TASK-SELECTED · RESOLVED JIT</text>
|
|
194
|
-
<text class="sub" x="776" y="252">TOOLS · SKILLS · MCP POLICY</text>
|
|
195
|
-
|
|
196
|
-
<rect class="node-store" x="656" y="336" width="240" height="112" rx="6"/>
|
|
197
|
-
<rect class="tag" x="668" y="348" width="56" height="16" rx="2"/>
|
|
198
|
-
<text class="tag-text" x="696" y="360">CHANNEL</text>
|
|
199
|
-
<text class="name" x="776" y="388">Text or changeset execution</text>
|
|
200
|
-
<text class="sub" x="776" y="412">BOUNDED TEXT · ISOLATED HERDR</text>
|
|
201
|
-
<text class="sub" x="776" y="428">MAIN DRIFT FAILS CLOSED</text>
|
|
202
|
-
|
|
203
|
-
<!-- Live-worker changeset gate -->
|
|
204
|
-
<rect class="node" x="656" y="472" width="240" height="72" rx="6"/>
|
|
205
|
-
<rect class="tag" x="668" y="484" width="40" height="16" rx="2"/>
|
|
206
|
-
<text class="tag-text" x="688" y="496">CHECK</text>
|
|
207
|
-
<text class="name" x="776" y="508">Changeset checks + judgment</text>
|
|
208
|
-
<text class="sub" x="776" y="528">LIVE WORKER · REBASE · EXACT PATCH</text>
|
|
209
|
-
|
|
210
|
-
<!-- Protected Main repository -->
|
|
211
|
-
<rect class="node-focal" x="992" y="472" width="216" height="88" rx="6"/>
|
|
212
|
-
<rect class="tag-focal" x="1004" y="484" width="40" height="16" rx="2"/>
|
|
213
|
-
<text class="tag-text-focal" x="1024" y="496">GATE</text>
|
|
214
|
-
<text class="name" x="1100" y="520">Guarded Main integration</text>
|
|
215
|
-
<text class="sub" x="1100" y="544">IDENTITY FENCE · DECLARED ORDER</text>
|
|
216
|
-
|
|
217
|
-
<!-- Legend -->
|
|
218
|
-
<line x1="40" y1="640" x2="1240" y2="640" stroke="#101828" stroke-opacity=".141" stroke-width=".8"/>
|
|
219
|
-
<text class="legend-label" x="40" y="672">LEGEND</text>
|
|
220
|
-
|
|
221
|
-
<line class="edge-approved" x1="136" y1="668" x2="184" y2="668"/>
|
|
222
|
-
<text class="legend" x="200" y="672">approved checked path</text>
|
|
223
|
-
|
|
224
|
-
<line class="edge-audit" x1="396" y1="668" x2="444" y2="668"/>
|
|
225
|
-
<text class="legend" x="460" y="672">durable audit record</text>
|
|
226
|
-
|
|
227
|
-
<line class="edge-blocked" x1="660" y1="668" x2="700" y2="668"/>
|
|
228
|
-
<circle class="stop" cx="708" cy="668" r="8"/>
|
|
229
|
-
<line class="stop-mark" x1="704" y1="664" x2="712" y2="672"/>
|
|
230
|
-
<line class="stop-mark" x1="712" y1="664" x2="704" y2="672"/>
|
|
231
|
-
<text class="legend" x="728" y="672">blocked before boundary</text>
|
|
232
|
-
|
|
233
|
-
<rect class="zone-protected" x="988" y="660" width="32" height="16" rx="4"/>
|
|
234
|
-
<text class="legend" x="1036" y="672">trust boundary</text>
|
|
235
|
-
</svg>
|
|
19
|
+
<h1>Stage ready candidates before all workers finish</h1>
|
|
20
|
+
<div class="diagram-scroll">
|
|
21
|
+
<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">
|
|
22
|
+
<title id="orchestration-architecture-title">Pi Subagent isolated workflow</title>
|
|
23
|
+
<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>
|
|
24
|
+
<defs>
|
|
25
|
+
<style>
|
|
26
|
+
.section { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; letter-spacing: .12em; }
|
|
27
|
+
.node { fill: #ffffff; stroke: #101828; stroke-width: 1; }
|
|
28
|
+
.input { fill: #e6e4de; stroke: #6a7282; stroke-width: 1; }
|
|
29
|
+
.focal { fill: #1d4ed8; fill-opacity: .08; stroke: #1d4ed8; stroke-width: 1.2; }
|
|
30
|
+
.optional { fill: #101828; fill-opacity: .02; stroke: #4c5665; stroke-width: 1; stroke-dasharray: 4 3; }
|
|
31
|
+
.tag { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; }
|
|
32
|
+
.name { fill: #101828; font: 600 12px 'Geist', sans-serif; text-anchor: middle; }
|
|
33
|
+
.detail { fill: #4c5665; font: 400 12px 'Geist', sans-serif; text-anchor: middle; }
|
|
34
|
+
.code { fill: #4c5665; font: 400 8px 'Geist Mono', monospace; text-anchor: middle; }
|
|
35
|
+
.edge { fill: none; stroke: #4c5665; stroke-width: 1.2; marker-end: url(#arrow); }
|
|
36
|
+
.branch { fill: none; stroke: #4c5665; stroke-width: 1; stroke-dasharray: 5 4; marker-end: url(#arrow); }
|
|
37
|
+
.approved { fill: none; stroke: #1d4ed8; stroke-width: 1.2; marker-end: url(#arrow-accent); }
|
|
38
|
+
.label-mask { fill: #f0eee9; }
|
|
39
|
+
.label { fill: #4c5665; font: 500 8px 'Geist Mono', monospace; text-anchor: middle; }
|
|
40
|
+
.note-title { fill: #101828; font: 600 12px 'Geist', sans-serif; }
|
|
41
|
+
.note { fill: #4c5665; font: 400 12px 'Geist', sans-serif; }
|
|
42
|
+
.key { fill: #4c5665; font: 400 12px 'Geist', sans-serif; }
|
|
43
|
+
</style>
|
|
44
|
+
<marker id="arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
|
|
45
|
+
<polygon points="0 0,8 3,0 6" fill="#4c5665"/>
|
|
46
|
+
</marker>
|
|
47
|
+
<marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
|
|
48
|
+
<polygon points="0 0,8 3,0 6" fill="#1d4ed8"/>
|
|
49
|
+
</marker>
|
|
50
|
+
</defs>
|
|
51
|
+
<rect width="1280" height="720" fill="#f0eee9"/>
|
|
52
|
+
<text class="section" x="40" y="120">CANDIDATE PRODUCTION</text>
|
|
53
|
+
<text class="section" x="40" y="320">MAIN'S EXPLICIT ACTIONS</text>
|
|
54
|
+
|
|
55
|
+
<!-- Draw connectors and their labels before nodes. -->
|
|
56
|
+
<line class="edge" x1="256" y1="208" x2="304" y2="208"/>
|
|
57
|
+
<line class="edge" x1="560" y1="208" x2="608" y2="208"/>
|
|
58
|
+
<line class="edge" x1="880" y1="208" x2="928" y2="208"/>
|
|
59
|
+
<line class="edge" x1="1064" y1="272" x2="1064" y2="344"/>
|
|
60
|
+
<line class="edge" x1="928" y1="408" x2="880" y2="408"/>
|
|
61
|
+
<line class="approved" x1="568" y1="408" x2="472" y2="408"/>
|
|
62
|
+
<line class="branch" x1="1064" y1="472" x2="1064" y2="520"/>
|
|
63
|
+
<path class="branch" d="M1200 564 H1224 Q1232 564 1232 556 V96 Q1232 88 1224 88 H440 Q432 88 432 96 V144"/>
|
|
64
|
+
<rect class="label-mask" x="884" y="388" width="40" height="12" rx="2"/>
|
|
65
|
+
<text class="label" x="904" y="396">SETTLED</text>
|
|
66
|
+
<rect class="label-mask" x="500" y="388" width="40" height="12" rx="2"/>
|
|
67
|
+
<text class="label" x="520" y="396">PASS</text>
|
|
68
|
+
<rect class="label-mask" x="1072" y="488" width="72" height="12" rx="2"/>
|
|
69
|
+
<text class="label" x="1108" y="496">DEPENDENTS</text>
|
|
70
|
+
<rect class="label-mask" x="716" y="68" width="80" height="12" rx="2"/>
|
|
71
|
+
<text class="label" x="756" y="76">STAGED BASE</text>
|
|
72
|
+
|
|
73
|
+
<rect class="input" x="40" y="144" width="216" height="128" rx="6"/>
|
|
74
|
+
<text class="tag" x="56" y="168">MAIN</text>
|
|
75
|
+
<text class="name" x="148" y="200">Start isolated request</text>
|
|
76
|
+
<text class="code" x="148" y="224">delegate_task · mode: isolated</text>
|
|
77
|
+
<text class="detail" x="148" y="248">Keep the durable request ID.</text>
|
|
78
|
+
|
|
79
|
+
<rect class="node" x="304" y="144" width="256" height="128" rx="6"/>
|
|
80
|
+
<text class="tag" x="320" y="168">WORKERS</text>
|
|
81
|
+
<text class="name" x="432" y="200">Commit candidates</text>
|
|
82
|
+
<text class="detail" x="432" y="224">Use owned worktrees.</text>
|
|
83
|
+
<text class="detail" x="432" y="248">No tracked or untracked changes.</text>
|
|
84
|
+
|
|
85
|
+
<rect class="node" x="608" y="144" width="272" height="128" rx="6"/>
|
|
86
|
+
<text class="tag" x="624" y="168">RUNNER</text>
|
|
87
|
+
<text class="name" x="744" y="200">Run preliminary checks</text>
|
|
88
|
+
<text class="detail" x="744" y="224">Include optional task judgment.</text>
|
|
89
|
+
<text class="detail" x="744" y="248">Bind evidence to the exact candidate.</text>
|
|
90
|
+
|
|
91
|
+
<rect class="node" x="928" y="144" width="272" height="128" rx="6"/>
|
|
92
|
+
<text class="tag" x="944" y="168">RUNNER → MAIN</text>
|
|
93
|
+
<text class="name" x="1064" y="200">Send ready follow-up</text>
|
|
94
|
+
<text class="detail" x="1064" y="224">Readiness is not promotion.</text>
|
|
95
|
+
<text class="code" x="1064" y="248">subagent_status</text>
|
|
96
|
+
|
|
97
|
+
<rect class="focal" x="928" y="344" width="272" height="128" rx="6"/>
|
|
98
|
+
<text class="tag" x="944" y="368">MAIN · INTEGRATION CHECKOUT</text>
|
|
99
|
+
<text class="name" x="1064" y="400">Stage exact candidates</text>
|
|
100
|
+
<text class="code" x="1064" y="424">subagent_stage</text>
|
|
101
|
+
<text class="detail" x="1064" y="448">Stage while siblings run.</text>
|
|
102
|
+
|
|
103
|
+
<rect class="node" x="568" y="344" width="312" height="128" rx="6"/>
|
|
104
|
+
<text class="tag" x="584" y="368">MAIN · AFTER THE WAVE SETTLES</text>
|
|
105
|
+
<text class="name" x="724" y="400">Validate the exact combined tip</text>
|
|
106
|
+
<text class="code" x="724" y="424">subagent_integrate validate</text>
|
|
107
|
+
<text class="detail" x="724" y="448">Final checks and optional final judgment</text>
|
|
108
|
+
|
|
109
|
+
<rect class="focal" x="160" y="344" width="312" height="128" rx="6"/>
|
|
110
|
+
<text class="tag" x="176" y="368">MAIN · EXPLICIT PROMOTION</text>
|
|
111
|
+
<text class="name" x="316" y="400">Promote passing work</text>
|
|
112
|
+
<text class="code" x="316" y="424">subagent_integrate promote</text>
|
|
113
|
+
<text class="detail" x="316" y="448">Main must be unchanged and clean.</text>
|
|
114
|
+
|
|
115
|
+
<rect class="optional" x="928" y="520" width="272" height="88" rx="6"/>
|
|
116
|
+
<text class="name" x="1064" y="544">Advance dependent tasks</text>
|
|
117
|
+
<text class="code" x="1064" y="564">subagent_integrate advance</text>
|
|
118
|
+
<text class="detail" x="1064" y="588">Run from the selected staged snapshot.</text>
|
|
119
|
+
|
|
120
|
+
<!-- Safety details remain in the README as text. -->
|
|
121
|
+
<text class="note-title" x="40" y="536">Blocked promotion preserves evidence.</text>
|
|
122
|
+
<text class="note" x="40" y="560">Failures, conflicts, changed identities, or uncertain</text>
|
|
123
|
+
<text class="note" x="40" y="580">outcomes require inspection, not replay.</text>
|
|
124
|
+
<text class="note-title" x="520" y="536">One combined correction</text>
|
|
125
|
+
<text class="note" x="520" y="560">After a definitive combined check or review failure,</text>
|
|
126
|
+
<text class="note" x="520" y="580">commit one correction, record it, then validate again.</text>
|
|
127
|
+
|
|
128
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="#101828" stroke-opacity=".141"/>
|
|
129
|
+
<line class="edge" x1="40" y1="672" x2="88" y2="672"/>
|
|
130
|
+
<text class="key" x="104" y="676">Checked sequence</text>
|
|
131
|
+
<line class="branch" x1="304" y1="672" x2="352" y2="672"/>
|
|
132
|
+
<text class="key" x="368" y="676">Dependent wave, if needed</text>
|
|
133
|
+
<text class="key" x="704" y="676">Staging, validation, and promotion require exact, clean Main.</text>
|
|
134
|
+
</svg>
|
|
135
|
+
</div>
|
|
236
136
|
</main>
|
|
237
137
|
</body>
|
|
238
138
|
</html>
|
|
@@ -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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<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&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&family=Noto+Serif:ital@0;1&family=Noto+Sans+KR:wght@400;500;600&family=Noto+Serif+KR:wght@400&family=Noto+Sans+TC:wght@400;500;600&family=Noto+Serif+TC:wght@400&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
|
|
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&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&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="
|
|
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="
|
|
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="
|
|
82
|
-
<text x="873" y="540">No guaranteed message</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="
|
|
86
|
-
<text x="
|
|
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
|
|
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&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&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="
|
|
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="
|
|
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="
|
|
70
|
-
<text x="873" y="540">No guaranteed message</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="
|
|
74
|
-
<text x="
|
|
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>
|