Repository navigation
Description
What happened
The Service runs on the claim that the repository's own tooling makes code work verified. But the tools the implement agent and the stage planner get are fewer than the tools of the devcontainer:
- The stage job gives the planner the issue and a list of tracked file names, and no tool to read code (the toolbox of feat(roadmap): the stage job plans with a read-only investigation toolbox #3037 is planned and not built). Blind judges scored the first-reply plans of 7 models, 1 local and 6 hosted, between 1.4 and 2.2 of 5 on the 40-case golden set (
tests/fixtures/roadmap_eval/stage). Their findings repeat: a path that does not exist at the base commit, a field that already exists, a command that was never run. - The implement agent has file read, search, write and edit tools, and a shell that runs a table of programs.
git grepoversrc/devops_cli/roadmap/implement_*.pyandstage*.pyfinds no use of the AST graph, the repository map, the RAG index of the knowledge base,ai_read, ordevops review. ThedevopsMCP server (ai_ast_graph,ai_repomap,ai_rag_query,ai_pack_context,review_path) exists and a person in the devcontainer has it; the Job has none of it.
What should happen
The Job gives its agents the same code-intelligence tools that a person has, read-only where the job should not write:
- Stage planner: the toolbox of feat(roadmap): the stage job plans with a read-only investigation toolbox #3037, built on the AST graph and the repository map.
- Implement agent: read-only tools for the AST graph (callers and callees of a symbol), the repository map, and the RAG index of the project documents, through the existing code and not through a second implementation. Prefer the existing MCP server tools over new tool code (AGENTS.md rule 3).
- A measure for each:
devops roadmap eval stageandeval implementbefore and after, on the same fixtures.
Acceptance criteria
- The implement step lists the tools it offers, and the PR comment of a Job shows which tool calls it made.
-
devops roadmap eval implementstates its score with and without the tools on the same fixtures. - A tool that the agent has cannot write a file or reach the network.
Alternatives check of 2026-11-05: partly.
Tool: modelcontextprotocol/python-sdk (https://github.com/modelcontextprotocol/python-sdk), MIT, last activity 2026-11-03, maintained.
Proposed design
Problem statement
The implement step's agent reads and edits code with fewer code-intelligence reads than a person in the devcontainer, and nothing states which tools it has. The step already reads its own checkout with read_file, list_files, grep, run_command, uv run devops ai ast graph and uv run devops ai repomap, but the prompt lists those tools only in prose, the Job log has no test that a remote MCP tool call is recorded, and devops roadmap eval implement cannot score the step without its remote tools. The RAG index of the project documents stays out until a scoped credential exists (#3563).
Acceptance criteria
Requirement: Implement tool list
The implement step SHALL list the tools it offers in its prompt, taken from the one registry that tool_names(HOLDER_IMPLEMENT) returns.
Scenario: The prompt holds the registry names
- WHEN a test builds the step prompt with the MCP switch off
- THEN the prompt holds each name that
tool_names(HOLDER_IMPLEMENT)gives and holds no tool name that the registry lacks
Requirement: Remote tool call in the Job log
The implement step SHALL write one line to the Job log for each remote MCP tool call, with the tool name and the outcome and no argument.
Scenario: A remote call is logged
- WHEN the step runs against the in-process fake MCP server and the agent calls
pr_describeonce - THEN the standard error stream holds the line
Tool call: pr_describe, ok.and holds neither the issue number nor any other argument
Requirement: Code intelligence through the existing commands
The implement step MUST reach the AST graph and the repository map through the existing devops ai ast graph and devops ai repomap commands and MUST add no second code-intelligence implementation.
Scenario: The read forms of the AST graph and the map
- WHEN a test reads
LOCAL_COMMANDSand the modules undersrc/devops_cli/roadmap/implement/ - THEN the table holds
ai repomapand the printed formai ast graphwith no--output, and no module of that folder importsdevops_cli.ai.repomapordevops_cli.ai.ast.graph
Requirement: Implementation role holds no write or path tool
The implementation role MUST offer only tools that the exposure table marks read-only and MUST NOT offer a tool that takes a file path.
Scenario: A write tool and a path tool are dropped
- WHEN a test calls
tools_for_role("implementation", catalogue)with a catalogue that holds a write tool and a tool with a path parameter - THEN neither tool is in the returned list, and no returned name has an entry in
PATH_CONFINEMENTS
Requirement: Eval implement measures both tool modes
devops roadmap eval implement SHALL accept --no-tools, which runs the same selected fixtures with the step's remote MCP tools off, and SHALL record the tool mode in its report.
Scenario: One fixture set in both modes
- WHEN a test runs
devops roadmap eval implement --dry-runand--dry-run --no-toolson one fixture - THEN both runs name the same fixture and base commit, and a run report holds the tool mode in a field beside the model
Existing Tool Considered
The alternatives check names modelcontextprotocol/python-sdk (MIT, last activity 2026-11-03, maintained). The project already reaches the devops MCP server through pydantic_ai.mcp.MCPToolset in RoadmapMcpToolset (src/devops_cli/roadmap/mcp.py:55), which the spec requires (openspec/specs/roadmap-mcp-client/spec.md:16); the SDK is its transport and gives list_tools() and call_tool(). It lacks a read-only guarantee: it is a client, so the server's role table (src/devops_cli/ai/mcp/roles.py:100) and path confinement (src/devops_cli/ai/mcp/path_confinement.py:23) enforce that. It holds no code-intelligence implementation of its own: the AST graph and the repository map come from the existing devops ai ast graph and devops ai repomap commands in the job's own checkout, because on the server a path is a path of the server (src/devops_cli/ai/mcp/roles.py:8). It has no devops roadmap eval implement tool-mode score, no list of the implement step's tools, and no record of the step's tool calls; the Job log and the eval are the project's own code.
Key questions
- Which MCP client connects the implement agent to the existing devops MCP server?: The step already uses
RoadmapMcpToolset, apydantic_ai.mcp.MCPToolsetover streamable HTTP, built bybuild_roadmap_mcp_toolset(ROLE_IMPLEMENTATION); the spec requires the pydantic-ai MCP client. No new client is needed. [sources: src/devops_cli/roadmap/mcp.py:55, src/devops_cli/roadmap/mcp.py:145, src/devops_cli/roadmap/implement/implement_step.py:1951, openspec/specs/roadmap-mcp-client/spec.md:16] - Which code-intelligence tools does the implement agent get, and from where?: The AST graph and the repository map come from the existing
uv run devops ai ast graph(printed, no--output) anduv run devops ai repomapcommands in the step's shell, beside the harness readsread_file,list_filesandgrep. They do not come from the MCP server: its role tables name only tools that need nothing from the files of the job, because on the server a path is the server's tree, and a stage tool reads the path of the job's checkout. The RAG index waits on feat(roadmap): allow scoped review and RAG calls from the implement shell #3563. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:295, docs/ROADMAP_WORKFLOW.md:300, docs/ROADMAP_WORKFLOW.md:301, src/devops_cli/roadmap/implement/implement_shell_policy.py:164, src/devops_cli/ai/mcp/roles.py:8, openspec/changes/3244-add-toolsets-for-implement-and-review/proposal.md:45]- Chosen: The existing devops ai commands in the step's shell. They run on the job's checkout at HEAD, including the agent's uncommitted edits, they are the code the devcontainer uses, and the recorded rule keeps path tools off a network role.
- Rejected: The MCP role's ai_ast_graph, ai_repomap and ai_rag_query. The server would read its own tree, not the job's checkout; the role tables deliberately name no path tool, and the RAG query needs a scoped credential (feat(roadmap): allow scoped review and RAG calls from the implement shell #3563).
- Rejected: New in-process AST graph and repository map tools in the implement step. It is a second implementation of code the project already ships, which AGENTS.md rule 3 and the issue forbid.
- How does the change keep an offered tool read-only?: The server's role table keeps only tools that the exposure table marks read-only and names no path tool, and path confinement refuses a value outside the work tree. In the job, the harness file tools resolve under the workspace. The shell is not the guarantee: the project states that the shell is no security boundary and that the runner is the sandbox, and
LOCAL_COMMANDSis prompt text that the shell does not read. (best practice) [sources: src/devops_cli/ai/mcp/roles.py:100, src/devops_cli/ai/mcp/path_confinement.py:23, src/devops_cli/roadmap/implement/implement_step.py:663, openspec/specs/roadmap-implement-step/shell/spec.md:9, src/devops_cli/roadmap/implement/implement_shell_policy.py:10]- Chosen: Server role table and path confinement, plus the workspace root of the file tools. The server holds the tool metadata and the path rules, a caller cannot bypass them, and the step's file tools are confined to the checkout.
- Rejected: Client-side filter of the tool list only. A caller can bypass the filter, and the MCP SDK gives no read-only guarantee.
- Rejected: The access class of the shell's local-command table. The table is prompt text and the shell does not read it, so it cannot enforce a read.
- Rejected: A runner network policy only. It stops a network call but not a file write.
- Where does the Job record the tool calls that the implement agent makes?: In the Job log:
ToolCallLogwrites one line to the standard error stream for each tool call, with the tool name, the program of a shell command and the outcome, and it writes no argument, path or file content, because an argument can hold a secret. The step's outcome and its comment carry the counts, not the arguments, so the PR comment is not the record. [sources: src/devops_cli/roadmap/implement/implement_tool_log.py:4, src/devops_cli/roadmap/implement/implement_tool_log.py:8, openspec/specs/roadmap-implement-step/trace/spec.md:88, openspec/specs/roadmap-implement-step/trace/spec.md:9] - How does
devops roadmap eval implementcompare tool modes?: With a--no-toolsoption that mirrors--no-toolboxofdevops roadmap eval stage: a person runs the same model on the same selected fixtures twice and states both scores, and the report records the tool mode so the two reports compare. The command has no such option today. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:332, docs/ROADMAP_WORKFLOW.md:341, docs/CLI_REFERENCE.md:7155, docs/CLI_REFERENCE.md:7159, src/devops_cli/commands/roadmap_eval_implement.py:103, openspec/specs/roadmap-eval-implement/spec.md:4]- Chosen: A --no-tools option, two runs of one model on the same set. It mirrors the stage eval's --no-toolbox, keeps the fixture set and the scoring path the same, and leaves the model spend to the person who runs it.
- Rejected: One invocation that runs both modes. It doubles the model spend with no person's choice and departs from the command the stage eval already uses.
- Rejected: Two separate commands. A person can compare runs on different fixtures, and nothing states the mode.
- Rejected: A single score with the tools on. It does not state the effect of the tools.
- Does the stage planner still need a read-only code toolbox (feat(roadmap): the stage job plans with a read-only investigation toolbox #3037)?: No. The toolbox is built:
StageToolsholds the nine tools ofbaseand the three ofextended, includingfile_symbols,callersandrepo_map,ToolboxClientruns them, anddevops roadmap eval stage --no-toolboxcompares the score with and without them. The proposal's deferred item for it is dropped, not refiled. [sources: src/devops_cli/roadmap/stage/stage_tools.py:1, src/devops_cli/roadmap/stage/stage_toolbox.py:1, src/devops_cli/roadmap/tools.py:79, docs/ROADMAP_WORKFLOW.md:332, docs/ROADMAP_WORKFLOW.md:337]
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty 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 improves plan and implementation quality scored 1.4 to 2.2 of 5, but the tools already exist and the gap is wiring, not a broken feature.Blind-judged plans score below 2.2 of 5 without these tools, so adding them raises the quality of automated roadmap work.The MCP server and code-intelligence backends exist; the work is exposing them to two agents and adding two eval commands on existing fixtures.Both give the implement agent access to the AST graph, repomap, and RAG tools, but #3041 adds devops ci, review, and a full tool catalog with budgets, while the candidate adds the stage planner toolbox and eval score measures.devops-cli-service commentedon Nov 2, 2026
Refine cannot set this item to Ready at ac16675 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
devops-cli-service commentedon Nov 5, 2026
Alternatives check: partly
Tool: modelcontextprotocol/python-sdk (https://github.com/modelcontextprotocol/python-sdk)
Covers:
Lacks:
devops roadmap eval implementscore, no before/after measurement on the golden fixtures, and no stage-planner toolbox (the feat(roadmap): the stage job plans with a read-only investigation toolbox #3037 work).Searches run:
Sources:
Checked on 2026-11-05. A person decides what this means for the item. The check changes no label and closes no issue.
[-]feat(roadmap): the implement agent gets the read-only code-intelligence tools of devops[/-][+]feat(roadmap): Give the implement agent read-only code tools[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 72 characters, and the limit is 60. The type and the scope stay.
feat(roadmap): the implement agent gets the read-only code-intelligence tools of devopsfeat(roadmap): Give the implement agent read-only code toolsdevops-cli-service commentedon Nov 12, 2026
Status set to Ready at 2c0fe36 (see proposed design in issue body).
Moved to new items: #5190.
6 remaining items
docs(openspec): plan #3148 Give the implement agent read-only code to…
fix(openspec): resolve requirement overlap in inputs delta (#5693)
feat(roadmap): give the implement agent read-only code tools (#3148)
devops-cli-service commentedon Nov 19, 2026
Released in v0.180.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.180.0
devops-cli-service commentedon Nov 19, 2026
Live since 2026-11-19 12:49 UTC