Skip to content

feat(supervise): analyst-as-node — tool-equipped analysts as pinned, budgeted, traced workers; watchWorkers on runGraph - #713

Merged
drewstone merged 2 commits into
mainfrom
feat/graph-analyst-nodes
Aug 3, 2026
Merged

feat(supervise): analyst-as-node — tool-equipped analysts as pinned, budgeted, traced workers; watchWorkers on runGraph#713
drewstone merged 2 commits into
mainfrom
feat/graph-analyst-nodes

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Closes the top capability gap from the #694 audit: the trace analyst can now be a full agent.

  • analyst-as-node: an analyzes edge may name a graph NODE as its analyst. On each matching settle, the analyst's pinned profile is spawned through the SAME scope.spawn/makeWorkerAgent seam (no second spawn path) with the edge directive + the settled worker's trace evidence as its task. Its settlement IS the findings — same canonicalization, same ledger rows, routed per route.to. Spend reserves from the graph's conserved pool (asserted in tests); trace join and journal come free. Failures are observable, never silent (analystSpawnRefused / analystRunFailed findings).
  • Refusals (validateGraph, all tested): ambiguous analyst id (node AND registry lens), analyst node as a delegates target (oracle doctrine, structural), root-as-analyst, unknown reference, analyzes-over-an-analyst.
  • watchWorkers passthrough on RunGraphOptions — online detector findings reach the driver with zero leaf-seam wiring; watchdog-steer example rewritten accordingly.
  • New example examples/graphs/analyst-agent-review.ts (21-LOC topology): a reviewer NODE analyzing an implementer, findings ledgered delivered to the driver.

Adversarially audited SHIP: interception, refusal, and passthrough all micro-revert-falsified; neighboring classes probed (failed analyst observable; nested-undefined canonicalized; duplicate analyst-node edges refused; admission caps hold for analyst spawns).

Known limit (documented at the in-flight map + CHANGELOG): durable-run resume does not yet compose with analyst-node graphs.

0.124.0 + CHANGELOG. Suite 2355; typecheck/lint/build/docs-freshness/version-gate green.

…kers passthrough

An analyzes edge may now name a graph NODE as its analyst: on each matching
settle the node's pinned profile is spawned as a real worker (scope.spawn +
the makeWorkerAgent seam) whose task is the edge directive plus the settled
worker's trace evidence and whose settle output IS the findings, published
and routed per the edge destination with the same ledger rows and
canonicalization as registry-analyst findings. Spend lands in the graph's
one conserved pool; oracle doctrine is enforced structurally (delegates
target, root, ambiguous, and analyzed-analyst references are refused).

AnalyzeOnSettleRoute gains agent?: AgentProfile (lens routes still require
the analysts registry; agent routes do not), WorkerSpawnContext gains the
runtime-authored analyst marker, and analyst-run settlements never enter
the settled ledger or re-fire the analyst hook.

RunGraphOptions gains watchWorkers (forwarded to supervise verbatim), so
the online detector panel runs under runGraph with no leaf-seam wiring;
examples/graphs/watchdog-steer.ts now uses the passthrough and the new
examples/graphs/analyst-agent-review.ts shows a tool-equipped reviewer
node analyzing an implementer.

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — a18abeda

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-08-03T07:28:33Z

@drewstone
drewstone merged commit 852273e into main Aug 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants