@tangle-network/agent-runtime 0.126.0 → 0.128.0

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.
Files changed (53) hide show
  1. package/README.md +2 -2
  2. package/dist/agent.d.ts +1 -1
  3. package/dist/agent.js +2 -2
  4. package/dist/{environment-provider-PM9PeW_J.d.ts → environment-provider-CUFsyymu.d.ts} +7 -1
  5. package/dist/environment-provider.d.ts +1 -1
  6. package/dist/{index-EdjCQBV9.d.ts → index-BhZhQw77.d.ts} +198 -20
  7. package/dist/{index-DIV33AF5.d.ts → index-BhuzfG2r.d.ts} +3 -3
  8. package/dist/{index-D_M4d1_B.d.ts → index-DLM0W1h1.d.ts} +5 -5
  9. package/dist/index.d.ts +5 -5
  10. package/dist/index.js +5 -5
  11. package/dist/index.js.map +1 -1
  12. package/dist/intelligence.d.ts +1 -1
  13. package/dist/kernel.d.ts +3 -3
  14. package/dist/kernel.js +3 -3
  15. package/dist/{knowledge-EnuEqm_Y.js → knowledge-DF63xPr4.js} +2 -2
  16. package/dist/{knowledge-EnuEqm_Y.js.map → knowledge-DF63xPr4.js.map} +1 -1
  17. package/dist/knowledge.d.ts +1 -1
  18. package/dist/knowledge.js +1 -1
  19. package/dist/{loop-runner-bin-qwT_4F5I.js → loop-runner-bin-CWqOpCEw.js} +3 -3
  20. package/dist/{loop-runner-bin-qwT_4F5I.js.map → loop-runner-bin-CWqOpCEw.js.map} +1 -1
  21. package/dist/{loop-runner-bin-Bo29_fiD.d.ts → loop-runner-bin-Ckp_9tmD.d.ts} +3 -3
  22. package/dist/loop-runner-bin.d.ts +1 -1
  23. package/dist/loop-runner-bin.js +1 -1
  24. package/dist/mcp/bin.js +1 -1
  25. package/dist/mcp/index.d.ts +3 -7
  26. package/dist/mcp/index.js +3 -3
  27. package/dist/{openai-tools-Bp1KSkP6.js → openai-tools-D3XfrrQ6.js} +2 -2
  28. package/dist/{openai-tools-Bp1KSkP6.js.map → openai-tools-D3XfrrQ6.js.map} +1 -1
  29. package/dist/primeintellect/index.d.ts +1 -1
  30. package/dist/{runtime-BzXz7OjS.js → runtime-5uDVVfER.js} +362 -11
  31. package/dist/runtime-5uDVVfER.js.map +1 -0
  32. package/dist/{supervise-Ds8FtyI9.js → supervise-CsTKbH9R.js} +100 -18
  33. package/dist/supervise-CsTKbH9R.js.map +1 -0
  34. package/dist/testing.js +8 -8
  35. package/package.json +1 -1
  36. package/skills/agent-graphs/IMPROVE.md +58 -0
  37. package/skills/agent-graphs/SKILL.md +140 -0
  38. package/skills/agent-graphs/cases/artifact-mission-release-notes.json +10 -0
  39. package/skills/agent-graphs/cases/audited-single-writer.json +9 -0
  40. package/skills/agent-graphs/cases/cap-as-stop-mistake.json +8 -0
  41. package/skills/agent-graphs/cases/floor-trap-pi.json +11 -0
  42. package/skills/agent-graphs/cases/mission-in-deliverable.json +8 -0
  43. package/skills/agent-graphs/cases/review-pipeline.json +14 -0
  44. package/skills/agent-graphs/cases/runtime-discovered-fanout.json +8 -0
  45. package/skills/agent-graphs/cases/single-agent-suffices.json +7 -0
  46. package/skills/agent-graphs/cases/steer-heavy-drafting.json +9 -0
  47. package/skills/agent-graphs/cases/unmeasured-harness.json +9 -0
  48. package/skills/agent-graphs/generations/gen1-baseline.json +248 -0
  49. package/skills/agent-graphs/generations/gen2.json +375 -0
  50. package/skills/agent-graphs/generations/gen3.json +702 -0
  51. package/skills/build-with-agent-runtime/SKILL.md +1 -0
  52. package/dist/runtime-BzXz7OjS.js.map +0 -1
  53. package/dist/supervise-Ds8FtyI9.js.map +0 -1
@@ -0,0 +1,702 @@
1
+ {
2
+ "generation": 3,
3
+ "date": "2026-08-03T19:49:18.796Z",
4
+ "smoke": false,
5
+ "authorModel": "glm-5.2",
6
+ "authorTemperature": 0.2,
7
+ "proposerModel": "glm-5.2",
8
+ "proposerTemperature": 0.7,
9
+ "split": {
10
+ "train": [
11
+ "floor-trap-pi",
12
+ "review-pipeline",
13
+ "single-agent-suffices",
14
+ "cap-as-stop-mistake",
15
+ "runtime-discovered-fanout",
16
+ "artifact-mission-release-notes",
17
+ "audited-single-writer"
18
+ ],
19
+ "holdout": [
20
+ "mission-in-deliverable",
21
+ "steer-heavy-drafting",
22
+ "unmeasured-harness"
23
+ ]
24
+ },
25
+ "k": 5,
26
+ "seed": 42,
27
+ "surfaces": {
28
+ "v2Sha256": "4c6615b6164f6c5a86efb2596556bdf325d33f08a4e1715cae9d71cb28b6255e",
29
+ "v3Sha256": "54e7b38bc4b4ad22890d8330ac4dc3d39e4e759a384c0afbfe8cc8ea67f0f560",
30
+ "v3Label": "gen3-revision"
31
+ },
32
+ "perCase": {
33
+ "v2": {
34
+ "train": {
35
+ "floor-trap-pi": [
36
+ {
37
+ "rep": 0,
38
+ "score": 1,
39
+ "decision": "graph"
40
+ },
41
+ {
42
+ "rep": 1,
43
+ "score": 1,
44
+ "decision": "graph"
45
+ },
46
+ {
47
+ "rep": 2,
48
+ "score": 1,
49
+ "decision": "graph"
50
+ },
51
+ {
52
+ "rep": 3,
53
+ "score": 1,
54
+ "decision": "graph"
55
+ },
56
+ {
57
+ "rep": 4,
58
+ "score": 1,
59
+ "decision": "graph"
60
+ }
61
+ ],
62
+ "review-pipeline": [
63
+ {
64
+ "rep": 0,
65
+ "score": 0.8,
66
+ "decision": "graph"
67
+ },
68
+ {
69
+ "rep": 1,
70
+ "score": 0.8,
71
+ "decision": "graph"
72
+ },
73
+ {
74
+ "rep": 2,
75
+ "score": 0.4,
76
+ "decision": "graph"
77
+ },
78
+ {
79
+ "rep": 3,
80
+ "score": 0.8,
81
+ "decision": "graph"
82
+ },
83
+ {
84
+ "rep": 4,
85
+ "score": 0.8,
86
+ "decision": "graph"
87
+ }
88
+ ],
89
+ "single-agent-suffices": [
90
+ {
91
+ "rep": 0,
92
+ "score": 1,
93
+ "decision": "single-agent"
94
+ },
95
+ {
96
+ "rep": 1,
97
+ "score": 1,
98
+ "decision": "single-agent"
99
+ },
100
+ {
101
+ "rep": 2,
102
+ "score": 1,
103
+ "decision": "single-agent"
104
+ },
105
+ {
106
+ "rep": 3,
107
+ "score": 1,
108
+ "decision": "single-agent"
109
+ },
110
+ {
111
+ "rep": 4,
112
+ "score": 1,
113
+ "decision": "single-agent"
114
+ }
115
+ ],
116
+ "cap-as-stop-mistake": [
117
+ {
118
+ "rep": 0,
119
+ "score": 1,
120
+ "decision": "graph"
121
+ },
122
+ {
123
+ "rep": 1,
124
+ "score": 1,
125
+ "decision": "graph"
126
+ },
127
+ {
128
+ "rep": 2,
129
+ "score": 1,
130
+ "decision": "graph"
131
+ },
132
+ {
133
+ "rep": 3,
134
+ "score": 1,
135
+ "decision": "graph"
136
+ },
137
+ {
138
+ "rep": 4,
139
+ "score": 1,
140
+ "decision": "graph"
141
+ }
142
+ ],
143
+ "runtime-discovered-fanout": [
144
+ {
145
+ "rep": 0,
146
+ "score": 1,
147
+ "decision": "dynamic-workflow"
148
+ },
149
+ {
150
+ "rep": 1,
151
+ "score": 1,
152
+ "decision": "dynamic-workflow"
153
+ },
154
+ {
155
+ "rep": 2,
156
+ "score": 1,
157
+ "decision": "dynamic-workflow"
158
+ },
159
+ {
160
+ "rep": 3,
161
+ "score": 1,
162
+ "decision": "dynamic-workflow"
163
+ },
164
+ {
165
+ "rep": 4,
166
+ "score": 1,
167
+ "decision": "dynamic-workflow"
168
+ }
169
+ ],
170
+ "artifact-mission-release-notes": [
171
+ {
172
+ "rep": 0,
173
+ "score": 0,
174
+ "decision": "single-agent"
175
+ },
176
+ {
177
+ "rep": 1,
178
+ "score": 0,
179
+ "decision": "single-agent"
180
+ },
181
+ {
182
+ "rep": 2,
183
+ "score": 0,
184
+ "decision": "single-agent"
185
+ },
186
+ {
187
+ "rep": 3,
188
+ "score": 0,
189
+ "decision": "single-agent"
190
+ },
191
+ {
192
+ "rep": 4,
193
+ "score": 0,
194
+ "decision": "single-agent"
195
+ }
196
+ ],
197
+ "audited-single-writer": [
198
+ {
199
+ "rep": 0,
200
+ "score": 1,
201
+ "decision": "graph"
202
+ },
203
+ {
204
+ "rep": 1,
205
+ "score": 1,
206
+ "decision": "graph"
207
+ },
208
+ {
209
+ "rep": 2,
210
+ "score": 1,
211
+ "decision": "graph"
212
+ },
213
+ {
214
+ "rep": 3,
215
+ "score": 1,
216
+ "decision": "graph"
217
+ },
218
+ {
219
+ "rep": 4,
220
+ "score": 1,
221
+ "decision": "graph"
222
+ }
223
+ ]
224
+ },
225
+ "holdout": {
226
+ "mission-in-deliverable": [
227
+ {
228
+ "rep": 0,
229
+ "score": 0,
230
+ "decision": "single-agent"
231
+ },
232
+ {
233
+ "rep": 1,
234
+ "score": 0,
235
+ "decision": "single-agent"
236
+ },
237
+ {
238
+ "rep": 2,
239
+ "score": 0,
240
+ "decision": "single-agent"
241
+ },
242
+ {
243
+ "rep": 3,
244
+ "score": 0,
245
+ "decision": "single-agent"
246
+ },
247
+ {
248
+ "rep": 4,
249
+ "score": 0,
250
+ "decision": "single-agent"
251
+ }
252
+ ],
253
+ "steer-heavy-drafting": [
254
+ {
255
+ "rep": 0,
256
+ "score": 1,
257
+ "decision": "graph"
258
+ },
259
+ {
260
+ "rep": 1,
261
+ "score": 1,
262
+ "decision": "graph"
263
+ },
264
+ {
265
+ "rep": 2,
266
+ "score": 1,
267
+ "decision": "graph"
268
+ },
269
+ {
270
+ "rep": 3,
271
+ "score": 1,
272
+ "decision": "graph"
273
+ },
274
+ {
275
+ "rep": 4,
276
+ "score": 1,
277
+ "decision": "graph"
278
+ }
279
+ ],
280
+ "unmeasured-harness": [
281
+ {
282
+ "rep": 0,
283
+ "score": 1,
284
+ "decision": "graph"
285
+ },
286
+ {
287
+ "rep": 1,
288
+ "score": 1,
289
+ "decision": "graph"
290
+ },
291
+ {
292
+ "rep": 2,
293
+ "score": 1,
294
+ "decision": "graph"
295
+ },
296
+ {
297
+ "rep": 3,
298
+ "score": 0.5,
299
+ "decision": "graph"
300
+ },
301
+ {
302
+ "rep": 4,
303
+ "score": 0.5,
304
+ "decision": "graph"
305
+ }
306
+ ]
307
+ }
308
+ },
309
+ "v3": {
310
+ "train": {
311
+ "floor-trap-pi": [
312
+ {
313
+ "rep": 0,
314
+ "score": 1,
315
+ "decision": "graph"
316
+ },
317
+ {
318
+ "rep": 1,
319
+ "score": 1,
320
+ "decision": "graph"
321
+ },
322
+ {
323
+ "rep": 2,
324
+ "score": 1,
325
+ "decision": "graph"
326
+ },
327
+ {
328
+ "rep": 3,
329
+ "score": 1,
330
+ "decision": "graph"
331
+ },
332
+ {
333
+ "rep": 4,
334
+ "score": 1,
335
+ "decision": "graph"
336
+ }
337
+ ],
338
+ "review-pipeline": [
339
+ {
340
+ "rep": 0,
341
+ "score": 0.6,
342
+ "decision": "graph"
343
+ },
344
+ {
345
+ "rep": 1,
346
+ "score": 0.4,
347
+ "decision": "graph"
348
+ },
349
+ {
350
+ "rep": 2,
351
+ "score": 0.6,
352
+ "decision": "graph"
353
+ },
354
+ {
355
+ "rep": 3,
356
+ "score": 0.6,
357
+ "decision": "graph"
358
+ },
359
+ {
360
+ "rep": 4,
361
+ "score": 0.6,
362
+ "decision": "graph"
363
+ }
364
+ ],
365
+ "single-agent-suffices": [
366
+ {
367
+ "rep": 0,
368
+ "score": 1,
369
+ "decision": "single-agent"
370
+ },
371
+ {
372
+ "rep": 1,
373
+ "score": 1,
374
+ "decision": "single-agent"
375
+ },
376
+ {
377
+ "rep": 2,
378
+ "score": 1,
379
+ "decision": "single-agent"
380
+ },
381
+ {
382
+ "rep": 3,
383
+ "score": 1,
384
+ "decision": "single-agent"
385
+ },
386
+ {
387
+ "rep": 4,
388
+ "score": 1,
389
+ "decision": "single-agent"
390
+ }
391
+ ],
392
+ "cap-as-stop-mistake": [
393
+ {
394
+ "rep": 0,
395
+ "score": 1,
396
+ "decision": "graph"
397
+ },
398
+ {
399
+ "rep": 1,
400
+ "score": 1,
401
+ "decision": "graph"
402
+ },
403
+ {
404
+ "rep": 2,
405
+ "score": 1,
406
+ "decision": "graph"
407
+ },
408
+ {
409
+ "rep": 3,
410
+ "score": 1,
411
+ "decision": "graph"
412
+ },
413
+ {
414
+ "rep": 4,
415
+ "score": 1,
416
+ "decision": "graph"
417
+ }
418
+ ],
419
+ "runtime-discovered-fanout": [
420
+ {
421
+ "rep": 0,
422
+ "score": 1,
423
+ "decision": "dynamic-workflow"
424
+ },
425
+ {
426
+ "rep": 1,
427
+ "score": 1,
428
+ "decision": "dynamic-workflow"
429
+ },
430
+ {
431
+ "rep": 2,
432
+ "score": 1,
433
+ "decision": "dynamic-workflow"
434
+ },
435
+ {
436
+ "rep": 3,
437
+ "score": 1,
438
+ "decision": "dynamic-workflow"
439
+ },
440
+ {
441
+ "rep": 4,
442
+ "score": 1,
443
+ "decision": "dynamic-workflow"
444
+ }
445
+ ],
446
+ "artifact-mission-release-notes": [
447
+ {
448
+ "rep": 0,
449
+ "score": 1,
450
+ "decision": "graph"
451
+ },
452
+ {
453
+ "rep": 1,
454
+ "score": 1,
455
+ "decision": "graph"
456
+ },
457
+ {
458
+ "rep": 2,
459
+ "score": 1,
460
+ "decision": "graph"
461
+ },
462
+ {
463
+ "rep": 3,
464
+ "score": 1,
465
+ "decision": "graph"
466
+ },
467
+ {
468
+ "rep": 4,
469
+ "score": 1,
470
+ "decision": "graph"
471
+ }
472
+ ],
473
+ "audited-single-writer": [
474
+ {
475
+ "rep": 0,
476
+ "score": 1,
477
+ "decision": "graph"
478
+ },
479
+ {
480
+ "rep": 1,
481
+ "score": 1,
482
+ "decision": "graph"
483
+ },
484
+ {
485
+ "rep": 2,
486
+ "score": 1,
487
+ "decision": "graph"
488
+ },
489
+ {
490
+ "rep": 3,
491
+ "score": 1,
492
+ "decision": "graph"
493
+ },
494
+ {
495
+ "rep": 4,
496
+ "score": 1,
497
+ "decision": "graph"
498
+ }
499
+ ]
500
+ },
501
+ "holdout": {
502
+ "mission-in-deliverable": [
503
+ {
504
+ "rep": 0,
505
+ "score": 1,
506
+ "decision": "graph"
507
+ },
508
+ {
509
+ "rep": 1,
510
+ "score": 1,
511
+ "decision": "graph"
512
+ },
513
+ {
514
+ "rep": 2,
515
+ "score": 1,
516
+ "decision": "graph"
517
+ },
518
+ {
519
+ "rep": 3,
520
+ "score": 1,
521
+ "decision": "graph"
522
+ },
523
+ {
524
+ "rep": 4,
525
+ "score": 1,
526
+ "decision": "graph"
527
+ }
528
+ ],
529
+ "steer-heavy-drafting": [
530
+ {
531
+ "rep": 0,
532
+ "score": 1,
533
+ "decision": "graph"
534
+ },
535
+ {
536
+ "rep": 1,
537
+ "score": 1,
538
+ "decision": "graph"
539
+ },
540
+ {
541
+ "rep": 2,
542
+ "score": 1,
543
+ "decision": "graph"
544
+ },
545
+ {
546
+ "rep": 3,
547
+ "score": 1,
548
+ "decision": "graph"
549
+ },
550
+ {
551
+ "rep": 4,
552
+ "score": 1,
553
+ "decision": "graph"
554
+ }
555
+ ],
556
+ "unmeasured-harness": [
557
+ {
558
+ "rep": 0,
559
+ "score": 1,
560
+ "decision": "graph"
561
+ },
562
+ {
563
+ "rep": 1,
564
+ "score": 0.5,
565
+ "decision": "graph"
566
+ },
567
+ {
568
+ "rep": 2,
569
+ "score": 0.5,
570
+ "decision": "graph"
571
+ },
572
+ {
573
+ "rep": 3,
574
+ "score": 1,
575
+ "decision": "graph"
576
+ },
577
+ {
578
+ "rep": 4,
579
+ "score": 0.5,
580
+ "decision": "graph"
581
+ }
582
+ ]
583
+ }
584
+ }
585
+ },
586
+ "aggregates": {
587
+ "v2": {
588
+ "trainMean": 0.8171428571428571,
589
+ "holdoutMean": 0.6
590
+ },
591
+ "v3": {
592
+ "trainMean": 0.9371428571428572,
593
+ "holdoutMean": 0.9
594
+ }
595
+ },
596
+ "trainFailureTallyV2": {
597
+ "floor-trap-pi": {
598
+ "validationError": 4
599
+ },
600
+ "review-pipeline": {
601
+ "nodes": 4,
602
+ "edge": 3,
603
+ "validationError": 1
604
+ },
605
+ "cap-as-stop-mistake": {
606
+ "validationError": 2
607
+ },
608
+ "artifact-mission-release-notes": {
609
+ "correctAnswerIsGraph": 5,
610
+ "nodes": 5,
611
+ "deliverableDescribeCarriesMission": 5
612
+ }
613
+ },
614
+ "degenerateCheck": {
615
+ "single-agent-suffices": {
616
+ "v2": 1,
617
+ "v3": 1
618
+ },
619
+ "runtime-discovered-fanout": {
620
+ "v2": 1,
621
+ "v3": 1
622
+ }
623
+ },
624
+ "retryReceipts": [
625
+ {
626
+ "surfaceSha12": "4c6615b6164f",
627
+ "scenarioId": "runtime-discovered-fanout",
628
+ "rep": 0,
629
+ "attempt": 1,
630
+ "error": "author failed after retry: router HTTP 503: {\"error\":{\"message\":\"Inference temporarily unavailable due to upstream capacity. Please retry shortly.\",\"type\":\"server_error\",\"code\":\"upstream_unavailable\",\"generationId\":\"gen_01KZ4H32JMWZ3ZY2WSQNQ79S",
631
+ "at": "2026-08-03T19:19:59.377Z"
632
+ }
633
+ ],
634
+ "cellFailures": [],
635
+ "worstCaseImputation": {
636
+ "v2TrainMean": 0.8171428571428571,
637
+ "v3TrainMean": 0.9371428571428572,
638
+ "v2HoldoutMean": 0.6,
639
+ "v3HoldoutMean": 0.9,
640
+ "promotedUnderImputation": true,
641
+ "note": "every failed or missing rep scored 0 with denominator k"
642
+ },
643
+ "upstreamGate": {
644
+ "decision": "hold",
645
+ "delta": 0.30000000000000004,
646
+ "reasons": [
647
+ "holdout: winner 0.900 vs baseline 0.600 \u2192 pass",
648
+ "train: v3 unmeasured vs v2 0.817 - 0.05 \u2192 fail",
649
+ "degenerate cases non-regression \u2192 fail"
650
+ ],
651
+ "contributingGates": [
652
+ {
653
+ "name": "holdout-mean-strictly-better",
654
+ "status": "pass",
655
+ "detail": {
656
+ "winnerHoldout": 0.9,
657
+ "baselineHoldout": 0.6
658
+ }
659
+ },
660
+ {
661
+ "name": "train-mean-within-0.05",
662
+ "status": "fail",
663
+ "detail": {
664
+ "v2Train": 0.8171428571428571
665
+ }
666
+ },
667
+ {
668
+ "name": "anti-over-graphing-non-regression",
669
+ "status": "fail",
670
+ "detail": {
671
+ "degenerateIds": [
672
+ "single-agent-suffices",
673
+ "runtime-discovered-fanout"
674
+ ]
675
+ }
676
+ }
677
+ ]
678
+ },
679
+ "upstreamWinnerWasCandidate": true,
680
+ "gateVerdict": "HOLD \u2014 script gate said ship, adversarial verification invalidated it",
681
+ "promoted": false,
682
+ "revisionPromptSha256": "0f05d5c08831e3b5207464aeeaeb38ef9ce400f80898021a667eaf8f077bc608",
683
+ "v3Surface": "---\nname: agent-graphs\ndescription: Author runGraph programs from AgentProfiles and versioned prompt directives.\n---\n\n# Agent graphs\n\nUse this skill when every role is known before execution and the relationship between roles must be reviewable as data.\nThe output is an `AgentGraph` executed by `runGraph`, not a new coordinator or workflow framework.\n\n## Choose the existing entry point\n\n| Need | Use |\n| --- | --- |\n| Known roles with versioned work and analysis instructions | `runGraph` |\n| A standard fixed shape such as parallel attempts, a chain, or a review panel | `fanout`, `pipeline`, `verify`, or `panel` |\n| A model decides which workers to create while it works | `supervise` |\n| One profile can complete the task directly | Run that profile without composition |\n\nDo not force a dynamic task into a static graph.\nDo not use a graph when a smaller shipped primitive already expresses the work.\n\n### Strict authoring decisions (Do not under-graph)\n\n- **Cheapness is not the dialect test:** Do not bail to `single-agent` just because a brief sounds trivial (e.g., \"write a one-line file\"). If the brief implies roles, observers, or a specific tight budget, author the graph.\n- **Independent Checkers:** If a brief requires an artifact to pass an independent check, format checker, or validator (e.g., \"passes our repo format checker\"), you MUST author a graph with an analyst node equipped to perform the check. Do not bail to `single-agent` by assuming it is a trivial file write.\n- **Budget Floor Traps:** If a brief demands an impossibly \"tight\" budget (e.g., a few thousand tokens), do not dodge it by dropping to `single-agent`. Author the graph and explicitly set `budget` to the valid measured executor floor.\n- **Distinct Perspectives and Parallelism:** If a brief requests N parallel instances of the same role, you MUST create N distinct worker nodes and N `delegates` edges. If a brief requests different perspectives (e.g., \"reviewed by two different perspectives\") or a neutral decider, create a distinct node for EACH requested perspective. Do not collapse multiple requested reviewers or distinct roles into a single node.\n- **Mandatory Analysts:** If a brief requires independent observation, review, or post-settle findings (e.g., \"neutral decider\", \"watch the worker\", \"passes format checker\"), you MUST author `analyzes` edges. Do not omit analysts and attempt to merge their logic into the root's prompt.\n- **Caps are not stops:** Do not use an analysis edge `maxTraversals` cap as a global stop condition. To stop after N findings, use `deliverable.check` or `maxTraversals` on a `delegates` edge.\n\n## Author the complete contract\n\nAn `AgentGraph` has four required fields: `nodes`, `edges`, `deliverable`, and `budget`.\n`runGraph(graph, options)` validates graph structure and prompt references before it spends compute.\n\n### Nodes\n\nEach node is `{ id, profile }`, where `profile` is a complete canonical `AgentProfile`.\nSet `profile.name` equal to `id` because Runtime uses that value to select and route the node.\nPut the standing role in `profile.prompt.systemPrompt` and capabilities in the profile's tools, MCP, resources, hooks, and subagents.\nDo not rebuild profile materialization in graph code.\n\n### Delegation edges\n\nA delegation edge is `{ kind: 'delegates', from, to, directive, maxTraversals? }`.\nThe directive is a registered, versioned `PromptHandle`, such as `promptHandle('delegates/research-brief/v1')`.\nEach spawn and each later steer over the same edge consumes one traversal.\nThe default cap is `defaultEdgeTraversalCap`; exhaustion refuses further delegation.\n\nThe current graph form has one root and a static set of worker nodes.\nEvery delegation edge starts at the root, and each worker has exactly one incoming delegation edge.\nUse a new directive version to change a brief instead of adding a second edge to the same worker.\n\n### Analysis edges\n\nAn analysis edge is `{ kind: 'analyzes', analyst, over, to, directive, maxTraversals? }`.\nIt runs after a listed worker settles and routes findings to one node.\n\n`analyst` has two supported forms:\n\n- A lens id from `options.analysts` runs a caller-supplied analysis function.\n- A graph node id runs that node's pinned `AgentProfile` as a tool-equipped analyst.\n\nAn analyst node has no incoming delegation edge, so the root cannot hand it ordinary work.\nAn id cannot be both a registered lens and an analyst node.\n`over` lists delegated worker nodes only; Runtime refuses the root and analyst nodes because neither settles as an ordinary worker.\nAn analysis traversal cap records excess findings as `unpropagated`; it does not stop the run.\n\n### Completion and budget\n\n`deliverable.check(output)` is the independent completion test.\nIt must accept a genuinely complete result and reject junk.\nPut the concrete mission in `deliverable.describe`; Runtime uses that text as the root's task.\n\n`budget` is one conserved pool for the full graph.\nSet `options.perWorker` explicitly from the actual executor cost.\n**Do not mix `runGraph` options with other entry points.** Never emit `supervise`-specific fields like `perWorker.maxIterations` in a `runGraph` graph spec; `runGraph` strictly expects `budget`, `perWorker` token allocations, and traversal caps.\nFor Pi, `WORKER_TOKEN_FLOOR.pi` is 31,211 input tokens before useful work, so a worker allocation below that value is refused. If a brief asks for a budget lower than the floor, do not switch to `single-agent`; output the graph with the floor allocation.\nTreat an unmeasured executor floor as unknown rather than zero.\nAnalyst nodes spend from the same pool and need the same honest accounting as ordinary workers.\n\n## Authoring procedure\n\n1. **Classify correctly:** Verify if this needs `single-agent`, `dynamic-workflow`, or a static `runGraph`. If independent review, parallel workers, or independent validation (e.g. format checkers) are requested, use `runGraph`.\n2. **Define completion first:** Write the completion test and its description.\n3. **Select entry point:** Choose the smallest shipped entry point from the table above.\n4. **Define Roles:** Give every distinct role one complete `AgentProfile`. If N parallel instances or distinct perspectives (e.g., two different reviewers) are requested, create N nodes. Merge roles only if their standing prompts and capabilities are identical.\n5. **Register directives:** Register a versioned directive for every edge.\n6. **Delegate work:** Add one delegation edge per ordinary worker from the root.\n7. **Attach analysts:** Add `analyzes` edges only when findings must be produced independently after a worker settles. Do not skip this if the brief asked for a watcher/reviewer, a neutral decider, or an independent format checker.\n8. **Size the pool:** Set budget, per-worker allocation, traversal caps, time, and concurrency from measured executor behavior. Ensure budgets meet the executor floor. Do not mix `runGraph` options with `supervise` options.\n9. **Prove and inspect:** Run the structure offline, then run the real backend and inspect its result.\n\n## Prove the graph before spending\n\nUse an injected `brain` plus `makeWorkerAgent` to exercise graph structure without a network call.\nCover invalid profiles, unknown directives, impossible analysis routes, traversal exhaustion, successful completion, and rejected junk.\nStart from the runnable programs in `examples/graphs/` rather than creating a second graph runner.\n\nOffline execution proves control flow only.\nA real task must still use the intended backend, profiles, tools, completion test, and budget before claiming the graph solves that task.\n\n## Read the complete result\n\n| Field | Meaning |\n| --- | --- |\n| `result.result.kind` and `reason` | Whether a result won and why execution ended |\n| `result.result.spentTotal` | Tokens and money, including whether each total is known |\n| `result.ledger` | Every delivered, stripped, empty, or unpropagated edge traversal with byte counts |\n| `result.exhaustedEdges` | Every edge whose cap was reached, including normal lifecycle endings |\n| Journal `edge` events | Durable copies of traversal evidence |\n\nZero traversals on an expected edge means the graph did not exercise that relationship.\n`usdKnown: false` means cost is missing, not free.\nA passing completion test proves only what that test checks.\n\n## Common mistakes\n\n- Bailing to `single-agent` because a brief sounds trivial or assumes a file write is simple, instead of respecting requested independent checkers (e.g., \"passes format checker\"), roles, or budget floors.\n- Mixing `runGraph` options with `supervise` options (e.g., emitting `perWorker.maxIterations` in a `runGraph` spec).\n- Collapsing multiple requested reviewers or distinct perspectives into a single worker node.\n- Skipping `analyzes` edges when an observer, reviewer, independent check, or neutral decider is explicitly requested.\n- Putting the task only in a spawn prompt instead of `deliverable.describe`.\n- Giving a node a `profile.name` different from its id.\n- Delegating ordinary work to an analyst node.\n- Listing the root or an analyst node in `analyzes.over`.\n- Using an analysis cap as a stop condition.\n- Allowing a driver-authored spawn profile to add capabilities instead of defining them on the pinned node profile.\n- Reading only thrown cap errors and missing `result.exhaustedEdges` on budget or cancellation endings.\n- Treating unknown spend as zero.\n- Claiming recursive or runtime-discovered structure when the current graph is a static root with workers and analysts.\n\n## Improve only after measurement\n\nRuntime already optimizes one inline skill through `improve(profile, { surface: 'skills', skills: { resourceName }, ... })`.\nPut the exact skill bytes in `profile.resources.skills`, set `profile.resources.failOnError: true`, supply disjoint development and final-test tasks, and pass a complete Agent Eval optimization method.\nDo not create a graph-specific optimizer, campaign runner, candidate store, or promotion path.\n\n## Then consider\n\n- `loop-writer` when the required dynamic structure still cannot be expressed by `supervise` or another shipped primitive; pass the exact missing behavior and the completion test.\n- `verify` before publishing a graph consumer; pass the real backend command, expected result fields, and failure cases.\n",
684
+ "verifierHold": {
685
+ "verdict": "HOLD",
686
+ "reasons": [
687
+ "case-design contamination: train case artifact-mission-release-notes is a template-level paraphrase of holdout mission-in-deliverable, designed from its measured failure; the +0.300 holdout gain rests entirely on that case, so it evidences targeting, not generalization",
688
+ "scorer leniency: a v3-authored graph that runGraph REFUSED offline (invalid perWorker.maxIterations) scored 1.00 because the case scores only deliverableDescribeCarriesMission; validationError must zero a graph decision",
689
+ "gate-record discrepancy: upstreamGate recorded hold (v3 train mean never reached it) while the report claimed ship without disclosing the divergence",
690
+ "revision prompt sha not independently reproducible: per-rep failure inputs not persisted"
691
+ ],
692
+ "standing": "the k=5 measurements remain valid evidence; the promotion claim does not. v2 stays live.",
693
+ "gen4Requirements": [
694
+ "scorer: validationError => score 0 for any graph decision",
695
+ "author JSON contract aligned with the skill text (remove perWorker.maxIterations or lower it correctly)",
696
+ "holdout refresh: cases authored blind by an agent given only the case schema, never failure history; contaminated comparison retired",
697
+ "persist revision-prompt inputs alongside the sha",
698
+ "fix in-loop gate wiring so the upstream record is authoritative",
699
+ "layering doctrine: foundation harnesses ship TRAINED orchestration (Claude Code subagents, codex goal-mode, pi extensions) and prose is its native API \u2014 the graph layer composes ACROSS harnesses (conserved budget, ledger evidence, resume, heterogeneous models), it does not re-choreograph WITHIN one. Outer layer coarse, inner layer maximal: prefer one harness-sized node instructed to use its native fan-out over N externally-choreographed thin nodes. The unmeasured-harness case expectation (nodes=3) and v3's held N-roles-N-nodes lesson are both suspect under this rule; gen4 needs a case whose correct answer is one node + native-fanout instruction, and the harness KB row decides which harnesses qualify"
700
+ ]
701
+ }
702
+ }