Curator definitions: generic engine + tool-carrying passes (code/config sources) #483
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#483
Reference in new issue
Block a user
Close the load-bearing gap that makes every other part of this epic possible: a curator cannot declare a tool set today.
curator.Manifest.Toolsexists andRegistrar.Tools ToolBuilderis declared, but noToolBuilderimplementation exists anywhere in the repo, andbootstrap.gobuilds theRegistrarwithout aToolsfield.registry.gotherefore returns"curator manifest: declares tools but the registrar has no ToolBuilder"for any curator that declares tools, so declaring one fails registration outright. The daemon'scuratorLLMRunneris also text-only:curator.ChatRequestcarriesTools []tools.ToolEntryandMaxSteps, but the adapter passes neither intocore.GenerateOptions.This child also ships the generic engine and the first definition source, so that a curator can be defined as data end to end:
agentexec.BuildToolSetFrom(entries, opts)conversion tocore.ToolSetrather than writing a second converter.curatorLLMRunnerpasses the declared tools and the declared step budget intocore.GenerateOptions(the ai-sdk runtime already executes the tool loop);ChatResultis widened only as needed to attribute what the pass did.Registrar, recording anActionper pass.[[curators]]config definitions: the definition is read from config at startup and registered through the same generic engine, with no defaults injected for interval, cooldown, tools, model, or memory engine.Checkreturns not-due, log the decision, so a healthy-but-idle curator is not invisible (the session-memory curator's hourly pass is the only curator activity ever logged today).Non-goals
Acceptance criteria
tools: ["read", "write"]reaches exactly those tools; a declared name with no implementation fails the pass rather than silently running with fewer tools.ToolBuilderis bound (the existing guard must keep working).curatorLLMRunnerpasses declared tools and step budget to the model runtime; a test proves the tools reachcore.GenerateOptionsand that the text-only path is unchanged when no tools are declared.intervalis refused with a clear error, not defaulted.Checkreturns not-due logs why, so an idle-but-healthy curator is observable.Security and failure paths
Dependencies
docs/prds/dynamic-curators.mdis the settled design.Implementation status (audit-verified 2026-09-12)
Confirms the problem statement above with independently verified evidence:
ToolBuilder: declared atinternal/domain/curator/registrar.go:86. The only other reference repo-wide is the fail-closed guard atinternal/domain/curator/registry.go:123. No implementation exists.bootstrap.go:1000-1022constructs theRegistrarwith noToolsfield.curatorLLMRunneratinternal/app/archied/main.go:551: buildscore.GenerateOptions{Messages: msgs, MaxSteps: max(...)}.curator.ChatRequest.Toolsis never passed. Confirms the text-only path.ToolBuilderalone still produces tool-less passes.skillcurator,sessioncurator) both declare zero tools, so neither exercises the guard — the failure mode is latent, not surfaced by current usage.Merged from the other tracker
Phase 1. Close the load-bearing gap: ToolBuilder implementation (declared tools resolve, nothing outside the set), curatorLLMRunner passes Tools+MaxSteps into core.GenerateOptions, one generic definition-driven engine (Manifest + free-form instructions), curators config definitions, idle logging when Check returns not-due.
Acceptance: a curator declaring tools reaches exactly those; unknown declared name fails the pass; tools-declaring curator still refuses registration with no ToolBuilder bound; a fully config-defined curator runs with no pass-time fallback to a code constant; a definition missing interval is refused, not defaulted.
Security/failure: tool resolution fails closed; generic engine gets only its declared registrar view; a failing pass affects that curator only.
Deps: none shipping (this is the prerequisite). GitHub: #790. Design: docs/prds/dynamic-curators.md.
Notes
CORRECTION (2026-09-12): the 'forge issue tools are a blocker' finding was wrong. No dedicated issue tool exists and no MCP server was ever configured, BUT the chat agent's is unconfined (chat.unrestricted_filesystem=true), so already works. Dedicated tools (#161) are convenience, not a prerequisite. VERIFIED STATE: (1) ToolBuilder has NO implementation anywhere - only the interface decl at domain/curator/registrar.go:86 and the fail-closed guard at registry.go:123; bootstrap.go builds the Registrar with no Tools field. (2) curatorLLMRunner at app/archied/main.go:551 drops ChatRequest.Tools - a SECOND independent blocker; fixing ToolBuilder alone still yields tool-less passes. (3) No definition persistence, no Unregister, no Runtime.Add/Remove. (4) runtime.go:202-211 logs nothing on not-due, so the skill curator's absence from logs is indistinguishable from health. EVIDENCE: standalone prototype at ~/projects/issue-orchestrator drove a real tool loop against live GitHub issues with local model defiant-fable-q6: 3 issues, 2 model steps, ~60s. Proof the loop works on local HW.
Close reason
Shipped in
60f04a35(ancestor of main): all five Phase-1 curator items are live - toolbuilder.New resolves exactly the declared set (internal/infrastructure/toolbuilder/toolbuilder.go:36-48), curatorLLMRunner passes Tools+MaxSteps (app/archied/main.go:533-534), generic definition-driven engine (domain/curator/definition_engine.go), curators config consumed at bootstrap.go:1357-1385, and idle logging when Check reports not-due (runtime.go:211). Tests TestBuilderResolvesExactlyDeclared, TestDefinitionEnginePassReachesExactlyDeclaredTools, TestRuntimeLogsWhenCheckReportsNotDue, TestValidateCurators. Dynamic mutation is carved out to trnd.2/trnd.3.Imported from beads
archie-core-trnd.1· GitHub #799 · body merged from the fuller GitHub #790 · type task · priority P1 · created 2026-09-12 · closed 2026-10-02