Const ExperimentalExperimentalRenamed to experimental_agent — the shape is not settled. Removed one major AFTER the one that introduces it.
vigiles:experimental-name-ok this IS the old spelling — prefixing a deprecated alias would defeat the alias, which exists precisely so code written against the unprefixed name keeps compiling for one major. It carries the tag because it is the same function, and the tag is what the deprecation notice points at.
Define a subagent specification (compiles to
agents/<name>.md).// agents/reviewer.md.spec.ts export default experimental_agent({ name: "reviewer", description: "Review a diff for correctness. Dispatch PROACTIVELY after edits.", model: "sonnet", tools: ["Read", "Grep", "Bash"], body: prose
Review the diff. Run ${cmd("npm test")} first., rules: { "no-floating": enforce("@typescript-eslint/no-floating-promises", "Await promises."), }, });Generic over a tool
Vocabulary(defaultOpenToolVocabulary— no constraint). A harness adapter re-exports a vocabulary-boundagent(e.g.vigiles/claude-code) sopurity: "pure"+ a side-effecting tool is atscerror at edit time; the bare coreexperimental_agent()accepts any tools, as before.Also generic over the result's
Ok/Errshapes, inferred fromoutput: result(...). The returned value is aTypedAgentSpec<Ok, Err>— anAgentSpecthat carries those shapes at the type level, so a typedpipecan cross-reference the handoff. With nooutputthe shapes default to the erasedShape, and the value is still a plainAgentSpec— backwards-compatible.The SHAPE is not settled — the author is unsure of the design, which is exactly what this marker promises: the form may change. It is NOT a claim that the surface is unproven. Measured 2026-06-20: real Claude Code loaded a compiled
agents/code-reviewer.md, dispatched to it and read it, 100% of trials — stronger end-to-end evidence thanexperimental_skillhas.