Repository navigation
Description
Depends on: #2829 merged, then the agentdef module tagged
Problem
The agent definition parser exists twice: in the new agentdef module, which the identity broker's definition loader uses (#2829), and in the engine's engine/adapter/agentfs, which the harness uses. The engine is a separately published module and its standalone check builds without the workspace, so it cannot import agentdef until agentdef has a published version. Until then a parity test (internal/app/agentdef_parity_test.go) keeps the two copies reading every file the same way, but any parser change has to be made twice.
What
- Tag the
agentdefmodule (agentdef/vX.Y.Z) through the release process, from the merged commit onmain(docs/module-development.md, "Merge and release dependencies first"). - Add the published
agentdefversion toengine/go.mod; it becomes the engine's first same-repository dependency. Updatedocs/module-development.md's module table, and the rootgo.modto the published version if the localreplaceis dropped. - Build
agentfsonagentdef:parseAgentDefcallsagentdef.Parseand maps the result totool.AgentDef; the frontmatter types, list splitting,mcpServershandling, and the carried helpers indiscover.goandcarry.gogo away.tool.MaxAgentDescriptionBytesandtool.MaxAgentBodyBytesstay equal toagentdef's limits, with a test. - Delete the parity test, and move the engine semantic matrix's accept/reject check for agent frontmatter into
agentdef, soagentdefkeeps that coverage on its own. - Allow
github.com/stacklok/mecatl/agentdefin theagentfsdepguard rule (andengine/arch/layering_test.goif it applies).
Follow the cross-module workflow in docs/module-development.md: the engine change waits for the published agentdef version, and its standalone checks must pass against it.
How it fits
One parser for agent definitions, shared by the broker and the harness, so the definition the broker records and the one the harness runs cannot be read differently.
Done when
agentfsparses withagentdef, andengine/adapter/agentfsno longer has its own frontmatter parser.- The parity test is gone, and
agentdefchecks the semantic matrix's agent frontmatter cases itself. task test:engine-standalonepasses against the publishedagentdefversion.
Activity
refactor(agentfs): parse agent definitions with agentdef
rdimitrov commentedon Nov 18, 2026
What landed differs from "What" in three places, all on purpose (#2864):
carry.gostays.rulesfsandskillfskeep byte-identical copies of it, and a test enforces that.NormalizeHeadersandNormalizeHooksstay exported inagentfs, becauseadapters/grpcdriverapplies them to driver definitions.replaceforagentdef, so its requirement moved tov0.1.0but it still builds from the checkout.The next
engine/vX.Y.Ztag is the first to requireagentdef. Modules that pin a published engine version pick it up when they bump.