Repository navigation
Description
Problem
Three places choose tools for a model that works on the project, and none shares a definition:
- the stage planner (
stage_tools.py, nine tools, to become 12 in feat(roadmap): the stage planner gets references, read_issue and find_issues, chosen by a toolset setting #3238), - the implement step (its own agent tools),
- the MCP role servers of feat(mcp): serve role-scoped tool sets over authenticated HTTP #3219 (a table of tool names for
planning,implementationandreview).
A tool that fixes a defect in one place stays missing in the others. The planning role of #3219 lists 28 tools and does not include the stage tools, and the implement step cannot use the MCP tools without staging them in the runner container.
Proposed change
- List the tools of the implement and review jobs in a table of the same shape as the stage toolsets (a name, a one-line purpose, read-only or not).
- Add
roadmap.implement.toolsetandroadmap.review.toolsetwith abasevalue that equals today. - Choose one definition for a read-only tool that two jobs use. Preferred: the tool is a plain function with a typed argument, wrapped for pydantic-ai in the job and for FastMCP in the role server, so the code exists once.
- Make the
planningrole table of feat(mcp): serve role-scoped tool sets over authenticated HTTP #3219 name the stage tools as the same functions. - Extend the comparison of feat(roadmap): add toolset comparison to stage planner eval #3239 to these jobs: one
compareform for each job.
Acceptance criteria
- Each of the three jobs has a toolset setting with a documented
basevalue. - A test fails when a tool is in a role table or a toolset and not in the registry.
- The stage tools of feat(roadmap): the stage planner gets references, read_issue and find_issues, chosen by a toolset setting #3238 are available through the MCP planning role from the same functions.
- No tool is defined twice.
Notes
Start with the design as a comment on this issue: the list of the implement step tools today, and the code that would be shared. Do not start before #3238 and the MCP server PR (#3233) merge.
Related: #3238, #3219, #3233, #3239.
Dependencies
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
Proposed design
Problem statement
Three places choose tools for a model that works on the project: the stage planner, the implement job and the MCP role servers. Each keeps its own list, so a tool that one place fixes stays missing in the others. The stage toolset names nine tools, and the implement and review jobs have no toolset setting at all. This change gives each job a toolset setting from one registry, defines each read-only tool once, and adds a test that fails when a table names a tool that the registry lacks.
Acceptance criteria
Requirement: Shared tool registry
The project SHALL keep one tool registry, and each entry SHALL hold a name, a one-line purpose, a read-only flag, the job or role that holds the tool, and the function.
Scenario: Registry entry fields
- WHEN a test reads every entry of the registry
- THEN each entry has a non-empty name, a one-line purpose, a boolean read-only flag, at least one job or role name and a callable function
Requirement: Toolset settings of the implement and review jobs
The settings roadmap.implement.toolset and roadmap.review.toolset SHALL exist, and each base value SHALL equal the tools that its job holds today.
Scenario: Default toolsets match today's tools
- WHEN a test reads the default
basevalue of both settings - THEN each value lists exactly the tool names that its job holds today
Requirement: Stage toolset from the registry
The roadmap.stage.toolset setting SHALL keep its base and extended values, and each name in either value SHALL be an entry of the registry.
Scenario: Stage toolset names
- WHEN a test reads the
baseandextendedvalues of the stage toolset - THEN every name is a key of the registry, and
basestill lists the nine tools that it lists today
Requirement: Registry check
A test MUST fail when a role table or a toolset names a tool that the registry does not hold.
Scenario: Unknown tool name
- WHEN a role table or a toolset names a tool that is absent from the registry
- THEN the test fails and its message names the table and the missing tool
Requirement: Single tool definition
Each tool MUST have exactly one function definition, and the job wrapper and the role server MUST wrap that function.
Scenario: Duplicate definition check
- WHEN a test compares the function of each registry entry with the function that the job and the role server wrap
- THEN each tool name maps to one function object, and no wrapper holds a second definition
Existing Tool Considered
No alternatives check has run. The libraries pydantic-ai (https://ai.pydantic.dev/tools/) and FastMCP (https://gofastmcp.com/servers/tools) wrap a plain Python function as a tool, so each covers the wrapping. Neither library gives a shared tool registry, per-job toolset settings or a cross-check test, so the change builds those. The written cost is about 40,000 tokens to build the registry, the two wrappers, the settings and the tests. The cost to keep and fix that code is about 8,000 tokens each month, and the elapsed time is about 16 hours.
Key questions
- Where does the shared tool registry live?: Put the registry in a new module,
src/devops_cli/roadmap/tools.py. Both the roadmap jobs and the MCP server import it, and the MCP package stays one consumer. (best practice) [sources: src/devops_cli/ai/mcp/roles.py, src/devops_cli/ai/mcp/server.py, src/devops_cli/config/settings.py]- Chosen: New module
src/devops_cli/roadmap/tools.py. Both the roadmap jobs and the MCP server import it, and the MCP package stays one consumer of the registry. - Rejected: Extend
src/devops_cli/ai/mcp/roles.py. The roadmap jobs would import the MCP server package for their own tools. - Rejected: Extend
src/devops_cli/roadmap/stage_tools.py. The implement and review tools are no stage tools, and the stage job loads only its own set.
- Chosen: New module
- What does one entry of the registry hold?: A table with one entry for each tool: a name, a one-line purpose, a read-only flag, the job or role that holds the tool, and the function. The stage toolsets use the same shape. (best practice) [sources: src/devops_cli/ai/mcp/roles.py, src/devops_cli/config/settings.py]
- Chosen: A table with one entry for each tool. One table holds the name, the purpose, the read-only flag and the holder, as the stage toolsets do.
- Rejected: A dictionary of name to function. It holds no purpose, no read-only flag and no holder, so the toolset defaults need a second source.
- Rejected: One class for each tool. It adds more code than a table entry for the same data.
- How does each toolset
basevalue stay equal to the registry?: Each registry entry names the job or role that holds it, and the default toolset reads that list. No list is copied into the settings defaults. (best practice) [sources: src/devops_cli/config/settings.py, src/devops_cli/config/defaults.py]- Chosen: Derive the value from the registry holder tags. One table is the source, so a new tool cannot miss a toolset.
- Rejected: Copy the tool names into
src/devops_cli/config/defaults.py. Two lists drift, and that drift is the defect that this issue fixes. - Rejected: Read the tool names from the agent at run time. The agent holds wrapped functions, so it gives no stable names for a setting.
- Which definition shares a read-only tool between a job and the MCP role server?: Use one plain function with typed arguments in the shared registry. Wrap it with pydantic-ai in the job and with FastMCP in the role server.
src/devops_cli/ai/mcp/server.pyalready wrapsscan_uv_audit,scan_osvandcheck_threat_intelthis way. (best practice) [sources: src/devops_cli/ai/mcp/server.py, src/devops_cli/ai/mcp/roles.py]- Chosen: One plain function, wrapped in each host. The function exists once, and pydantic-ai and FastMCP both wrap a plain function with typed arguments.
- Rejected: One copy in the job and one in the role server. The two copies drift, and the acceptance criterion forbids a second definition.
- Rejected: The job calls the MCP server over HTTP. The runner container must then stage the MCP server, which is the problem that this issue removes.
- How does a test find a tool that a role table or a toolset names and the registry lacks?: One parametrized test reads every role table and every toolset value, and asserts that each name is a registry key. The failure names the table and the missing tool. (best practice) [sources: tests/ai/mcp/test_mcp_roles.py, src/devops_cli/ai/mcp/roles.py, tests/roadmap/test_roadmap_stage_plan.py]
- Chosen: One parametrized test over every table and toolset. It checks all tables in one place and names the failing table.
- Rejected: A run-time check when the MCP server starts. It misses the job toolsets, and it fails after the process starts.
- Rejected: A test and a run-time check. The test gives the same guard, and the second check adds code and a failure mode.
- Which toolset settings exist at this commit, and how many stage tools do they name?: The stage job has
roadmap.stage.toolset. Itsbasevalue names nine read-only tools, and itsextendedvalue addsreferences,read_issueandfind_issues. The implement job and the review job have no toolset setting, so this change adds both. The three tools of feat(roadmap): the stage planner gets references, read_issue and find_issues, chosen by a toolset setting #3238 are absent, so no criterion names them. [sources: src/devops_cli/config/settings.py] - Why does the
planningrole table not name the stage tools today?: The role tables name only tools that need nothing from the files of the job. On the server, a path that the model gives is a path of the server. The stage tools read the staged checkout at paths that the model gives, so the planning role cannot serve them without a server that reads the job's checkout. [sources: src/devops_cli/ai/mcp/roles.py, src/devops_cli/roadmap/stage_tools.py] - Do the MCP server and its job role tables exist at this commit?: Yes.
src/devops_cli/ai/mcp/server.pybuilds the FastMCP server, andsrc/devops_cli/ai/mcp/roles.pyholds theplanning,implementationandreviewtables. The change builds on both and needs no new server. [sources: src/devops_cli/ai/mcp/server.py, src/devops_cli/ai/mcp/roles.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Alternatives check of 2026-11-06: in-use.
The item already names this tool.
Tool: pydantic/pydantic-ai (https://github.com/pydantic/pydantic-ai), MIT, last activity 2026-11-06, maintained.
Activity
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It depends on #3238 and #3233 merging and prevents tool drift but does not block a release.It stops tool definitions from diverging across three jobs, reducing defects from missing tools.It requires new settings, a shared tool wrapper, test updates, and extending the compare form to two more jobs.Both extend toolset comparison, but #3239 covers only the stage planner while the candidate adds implement and review jobs plus a single tool definition source.devops-cli-service commentedon Nov 2, 2026
Status set to Ready at 56c702a (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
placeholder
30 remaining items
devops-cli-service commentedon Nov 7, 2026
The runner Job devops-cli-runner-20261107-155352-cc61 ended: succeeded.
Image digest: sha256:a749ebb3536caecc7657f0f63ce4640b04998bf6789935093570c9f5034ffab0
The last lines of its log:
docs(openspec): plan #3244 Add one tool registry for jobs and roles (#…
devops-cli-service commentedon Nov 13, 2026
Cleared the stop at group 2 by the rule
digest: the runner image changed since the stop, from sha256:a749ebb3536caecc7657f0f63ce4640b04998bf6789935093570c9f5034ffab0 to sha256:d1e93fe46eb1c1dca8c811f1b2a15213cab1a175349a07ec786e31bc88dc0226, and the classci_infraof the stop is one that a new attempt can fix. The item is Planned again, and the Service takes it in the next round. The Service clears at most 2 for each class and 6 for each item by digest. A stop of another class, a new stop on this image, and a stop over a limit wait for a commentimplement: retry.dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.
devops-cli-service commentedon Nov 23, 2026
Released in v0.197.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.197.0
devops-cli-service commentedon Nov 23, 2026
Live since 2026-11-23 01:38 UTC