Skip to content

AgentProfileDiff: add behavioral axes (carrier, loop, outputContract, verifier, sampling) — measured as the binding constraints #24

Description

@drewstone

Ask

Extend AgentProfileDiff to serialize the behavioral axes the policy compiler already searches but the portable artifact cannot express: carrier (where guidance is injected), loop (maxTurns / retryOnEmptyOutput / verifyEveryTurn / stopRule), outputContract (schema / exact filename / validator), verifier (checks / repairPolicy), sampling (one long run vs k short). Today the diff covers the static surface (prompt, model, tools, mcp, resources, permissions); the compiler optimizes over axes it then can't ship.

Why — measured on two real product domains (deepseek-v4-flash, paired/replicated)

The same executable policy (mounted checker + run-it instruction):

Domain Adoption (agent actually ran it) Score effect Cause
Tax 1040 (guidance via production prompt path) 84–99% flat (+0.002–0.028, p>0.3) adopted; errors are epistemic, invisible to a self-check
Harvey legal (guidance as tail ## Learned guidance) 4% (3/76) flat (+0.021, p=0.75) never adopted; 75% cap-die at the 8192 output cap before any finish gate

Identical content, adoption swung 84%→4% purely by injection point. A chunked-write variant made no difference (still tail-injected). Better policy text cannot fix a delivery problem — carrier and loop are the binding axes, and neither is serializable today.

Each axis + its ablation neutralizer (feeds the ablation-gate spec)

  • carrier: hold text fixed, move to baseline injection point → held score proves content, not placement, mattered
  • loop: revert turns/retries/verify to baseline → held score = loop change inert
  • outputContract: strip specific rules, keep the shell → held score = presence not content
  • verifier: disable the checks → held score = caught nothing real
  • sampling: collapse to k=1 → held score = averaging, not policy, moved the mean

Proving ground is live (verified 2026-07-03)

tax-agent-clean51 run_taxcalc_loop.ts --profile-diff <file.json> applies a typed diff onto the real taxAgentProfile via mergeAgentProfiles, mounts its inline resource files, and records profileDiff.axes+hash for per-axis ablation. A diff-driven run graded by_line 0.632 with the mounted checker executed in-sandbox; a 139-cell 3v3 reproduced parity with the bespoke-flag path at 99% adoption. Ready to be the behavioral-axis test bed the moment the type extends.

Blocker

The diff API (applyAgentProfileDiff, pruneAgentProfileDiff, schemas) is unpublished — registry @tangle-network/agent-interface@0.18.0 ships only mergeAgentProfiles; the full API lives on branch feat/agentprofile-diff (self-labeling 0.18.0 = version collision). Publishing it lets the product consumer swap its thin local adapter for the real import.

Full evidence memo: agent-lab/papers/EVIDENCE-behavioral-axes-2026-07-03.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions