Skip to content

refactor(driver): roles become data — delete the role-builder, retire divergent trace ids - #522

Merged
drewstone merged 1 commit into
mainfrom
feat/694-agent-eval-retirements
Aug 2, 2026
Merged

refactor(driver): roles become data — delete the role-builder, retire divergent trace ids#522
drewstone merged 1 commit into
mainfrom
feat/694-agent-eval-retirements

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

What (agent-runtime#694 kill-list, agent-eval's share)

  1. buildWorkerDriverSystemPrompt deleted. A role expressed as a function can't be versioned, swept as a matrix cell, or optimized — the mechanism behind a consumer's optimizable surface being one sentence while 200 lines of doctrine sat hardcoded. Zero external callers (re-measured across every dependent repo's source and dist). Its knowledge survives as seed data: WORKER_DRIVER_DOCTRINE + HARNESS_BRIEFS, for driver profiles to seed from and GEPA/DSPy to improve away from. Kill-tested: re-adding the export fails the suite.
  2. AgentDriver / ProductClient / decideNextUserTurn / buildDriverSystemPrompt deprecated (warn-once), not deleted — measurement found real external callers, including a live ProductClient construction the issue's "0 constructions" claim missed (creative-agent). Removal is a major; this PR makes the exits visible.
  3. Both padTraceId derivations retired for deriveHexId (@tangle-network/agent-trace-contract@^1.0.2). The two produced different trace ids for one run id, and one emitted invalid hex embedding the raw run id in the wire id. Valid W3C ids pass through unchanged (join-preserving). Wire-format change, stated plainly: ids emitted before this PR do not match ids after. Kill-tested: resurrecting the old padding fails 2 tests.
  4. MultishotShape accepts a pure profile — the builder callbacks are optional with profile-derived defaults; a driver can now be described as data alone.

Verification

  • Suite: 4672 passed / 0 failed (baseline 4656/0); tsc, examples tsc, pnpm build, verify:package, biome — all clean.
  • Every zero-caller claim re-measured immediately before its deletion; every deletion ships with a discriminating test.
  • Adversarial audit: SHIP (ledger: agent-runtime#694).

… divergent trace ids

Four items from agent-runtime#694's kill-list, each measured before acting:

buildWorkerDriverSystemPrompt is deleted. A role expressed as a function cannot
be versioned, swept, or optimized — the reason a consumer's optimizable surface
was one sentence while its doctrine sat hardcoded. Zero external callers
(re-measured across every dependent repo, source and dist). Its knowledge ships
as seed data instead: WORKER_DRIVER_DOCTRINE and HARNESS_BRIEFS, ready for a
driver profile to seed from and an optimizer to improve away from. The
discriminating test fails if the export ever returns.

AgentDriver, ProductClient, decideNextUserTurn, buildDriverSystemPrompt are
deprecated with a once-per-process warning, not deleted: measurement found real
external callers (gtm-agent, legal-agent, creative-agent — including a live
ProductClient construction the issue's '0 constructions' claim missed). Removal
is a major.

Both padTraceId derivations are retired for deriveHexId from
@tangle-network/agent-trace-contract. The two produced different trace ids for
one run, and one emitted invalid hex embedding the raw run id in the wire id.
Wire-format change, stated plainly: previously emitted ids do not match new
ones. Kill-tested — resurrecting the old padding fails 2 tests.

MultishotShape accepts a pure profile: buildOpener/buildDriverSystemPrompt are
optional with profile-derived defaults, so a caller can describe the driver as
data alone. Callbacks kept for compat.

Suite: 4672 passed / 0 failed. tsc, examples tsc, build, verify:package, biome
all clean.
@drewstone
drewstone merged commit 7344cab into main Aug 2, 2026
2 checks passed
@drewstone
drewstone deleted the feat/694-agent-eval-retirements branch August 2, 2026 00:07
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.

1 participant