Skip to content

feat(mcp): deferred tool loading for the remaining subagent roles (self-review, scouts, goal assessor, review team, merge flow) #333

Description

@OGtwelve

Problem

#119 mounted the deferred MCP surface on the Worker and Reviewer; #193 added the CI-fix Worker and the Planner. Five roles still resolve their fixed slots only, so any surplus tool a domain server exports is dropped for them:

Role Site
self-review Worker run-loop-adapter.ts, the runSelfReviewSession wiring (resolveWorkerTools with no mountDeferredTools)
scout survey lead + scouts planner-wiring.ts, surveyRepoForPlanner
goal assessor planner-wiring.ts, defaultAssessGoal
review team lead + investigators review-team-wiring.ts, investigateReviewThreads
merge / take-over Worker merge-flow-adapter.ts

self-review postdates #193's text, which is why it was not named there.

What

Decide each role on its merits rather than mounting all five reflexively — #193 left them out deliberately, not by oversight:

  • self-review is the closest call: it reviews a real diff adversarially and could plausibly want the domain server. Likely a yes.
  • scouts survey local repo layout; their whole prompt is about structure, and a name-only index plus tool_search is prompt weight for a question they do not ask.
  • goal assessor returns a short verdict; the same argument, more so.
  • review team / merge flow — no strong case either way yet; measure before mounting.

The machinery is already in place and composes in three steps (extraTools, appendIndexBlock, withActiveTools), so each inclusion is small. withActiveTools already accepts an absent base step (#193), which is what these roles need.

Constraints (per CLAUDE.md)

Portable ESM, strict TS, paired *.test.ts; aitm is an MCP client only.

Acceptance criteria

  • Each of the five roles is either mounted, with a test proving name-only + working tool_search activation, or has a one-line reason recorded in the code for staying out.
  • Byte-identical behavior for every role when nothing is deferred.
  • bun test + node --test + biome + tsc green in both packages.

Follow-up to #193, which closed the #119 follow-up for the two roles it named. Part of #196.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions