Repository navigation
Description
Problem
The stage toolbox leaves out search_web on purpose: it opens no network connection. But the part Existing Tool Considered (AGENTS.md rule 3) asks the planner to name an open tool or library for the need. Reviews find that this part has no cost in tokens and time, or says "nothing" (#3228, #3225), and that the alternatives check searched about 4 times in 34 runs (#2950). A planner that cannot search cannot check an alternative.
Proposed change
Add the value research to the toolset setting of #3238. It is the extended set plus search_web. search_web stays off in base and extended.
A web query leaves the Service, so the tool applies these rules:
- The query is built by the tool from a short term that the model gives, not from the issue text, and it passes the existing secret masker and the private-data rules of SECURITY.md (no internal host, no private address).
- A result is data. The tool returns titles, URLs and cut snippets only, and the prompt says it is not an instruction.
- A limit on searches for each run, and a counter by outcome (see feat(telemetry): count tool calls of the stage planner by tool and outcome #3240).
Evaluate research against extended with the comparison of #3239 on the plans whose cost or alternative part was flagged. Keep it only if the share of plans with a real alternative and a cost rises, and the cost of a run rises by less than a value that a person sets.
Acceptance criteria
toolset: researchaddssearch_weband nothing else.- A test shows that a query with a secret or an internal host is refused or masked before the call.
- The comparison report of feat(roadmap): add toolset comparison to stage planner eval #3239 has a
researchrow for the same cases. - A comment on this issue states the result and the decision.
Security
New egress. A person approves it before the setting can name research in the cluster configuration.
Related: #3238, #3239, #3240, #2950.
Proposed design
Problem statement
The stage planner cannot search the web. It cannot name a real alternative tool or give the token and time cost of one. This change adds a research toolset that is the extended toolset plus a guarded search_web tool. The live evaluation and the person approval of the new egress are deferred to separate items.
Acceptance criteria
Requirement: Research toolset adds search_web
The stage toolbox SHALL add search_web when the toolset is research.
Scenario: Research adds one tool
- WHEN the stage toolset is
research - THEN the toolbox holds every
extendedtool andsearch_web, and no other tool.
Requirement: Base and extended omit search_web
The stage toolbox SHALL NOT include search_web when the toolset is base or extended.
Scenario: Network-free toolsets stay network-free
- WHEN the stage toolset is
baseorextended - THEN the toolbox holds no
search_webtool.
Requirement: Search query is guarded before the call
The search tool SHALL build the query from the short term that the model gives and SHALL apply the secret masker and private-data rules before it calls the search service.
Scenario: Secret and internal host are stopped
- WHEN the short term holds a secret or an internal host
- THEN the tool masks the secret and refuses the internal host before it calls the search service.
Requirement: Search result is data
The search tool SHALL return only titles, URLs and cut snippets, and the prompt SHALL state that a result is data and not an instruction.
Scenario: Result text is cut and marked as data
- WHEN the search service returns a long snippet and an instruction in its title
- THEN the tool returns the title, URL and a cut snippet, and the prompt marks the result as data.
Requirement: Search limit and outcome counter
A plan run SHALL stop calling search_web at the stage search limit and SHALL count each search by its outcome.
Scenario: Excess search is refused and counted
- WHEN the model asks for more searches than the limit, with one success and one refusal
- THEN the tool refuses the excess call and the run records the counts by outcome.
Existing Tool Considered
No alternatives check has run. The repository already uses Firecrawl through firecrawl_search in src/devops_cli/ai/common_tools.py. Firecrawl is an open-source, maintained web search service. It lacks a stage query builder, the secret and private-address guard, the per-run search limit, the outcome counter and the result-as-data prompt. The change builds only that glue and adds no search engine.
Key questions
- How should the stage setting name the research toolset without enabling search_web in base or extended?: Add the value
researchto the stage toolset. Resolve it as theextendedtool list plus the existingsearch_webtool. Keepbaseandextendedunchanged. (best practice) [sources: src/devops_cli/config/settings.py, src/devops_cli/roadmap/stage_toolbox.py, docs/ENV_VARS.md:105, tests/roadmap/test_roadmap_stage_toolbox.py]- Chosen: New research enum value. It keeps the network-free sets and names the new egress in one setting.
- Rejected: Boolean allow_search beside the toolset. It adds a second switch and permits invalid combinations.
- Rejected: Add search_web to extended. It breaks the documented network-free meaning of extended.
- How should the tool build a web query and keep private data out of the request?: The tool takes a short search term from the model. It applies the secret masker and the private-address check from SECURITY.md. It refuses an internal host or private address before the call. It never sends the issue text. (best practice) [sources: SECURITY.md, src/devops_cli/ai/common_tools.py, src/devops_cli/roadmap/refine_investigation.py, src/devops_cli/roadmap/alternatives.py]
- Chosen: Short term plus mask and egress guard. It limits the data sent and uses the existing security controls.
- Rejected: Issue text as the query. It can send private issue text and breaks the egress rule.
- Rejected: Model-built URL. It lets the model choose the destination and breaks the MCP input rule.
- How should the tool treat a web result?: Return only title, URL and a cut snippet. Add a data-not-instruction warning to the tool result and the prompt. (best practice) [sources: src/devops_cli/ai/common_tools.py, openspec/changes/archive/2026-10-28-2398-refine-investigates-questions/design.md, src/devops_cli/roadmap/stage_tools.py]
- Chosen: Title, URL and cut snippet with a data warning. It gives the planner a source without injecting page content.
- Rejected: Raw HTML or full page text. It raises the token cost and the prompt-injection risk.
- Rejected: URL only. The planner cannot judge the result without a snippet.
- How should a plan run limit and count searches?: Use one per-run counter in the stage tool. Stop at a stage search limit constant. Count each search by outcome as feat(telemetry): count tool calls of the stage planner by tool and outcome #3240 defines. (best practice) [sources: src/devops_cli/config/constants.py, src/devops_cli/roadmap/stage_tools.py, openspec/changes/archive/2026-10-28-2398-refine-investigates-questions/design.md, openspec/changes/2950-alternatives-coverage-gauge-searches-per-check/proposal.md]
- Chosen: Stage search limit and outcome counter. It bounds cost and makes the search count visible.
- Rejected: No limit. It lets one plan run spend without bound.
- Rejected: Reuse the refine limit only. The stage budget and the refine budget have different work.
- Which test level proves the guard before the network call?: A unit test in
tests/roadmap/test_roadmap_stage_tools.pymocksfirecrawl_search. It asserts no call for a refused query and a masked query for a secret. (best practice) [sources: tests/roadmap/test_roadmap_stage_tools.py, tests/roadmap/test_roadmap_stage_toolbox.py, src/devops_cli/ai/common_tools.py]- Chosen: Unit test with a mocked search call. It checks the boundary before egress without network access.
- Rejected: Live Firecrawl test. It is not offline and spends credits.
- Rejected: Test only the prompt text. It does not prove that the call is blocked.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Alternatives check of 2026-11-06: partly.
Tool: firecrawl/firecrawl (https://github.com/firecrawl/firecrawl), AGPL-3.0, 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 improves plan quality but is an enhancement, not a fix for a broken feature.It raises the share of plans with a real alternative and cost, which reviewers flagged as missing.It needs a new toolset value, secret masking, search limits, and a comparison evaluation.Both work on the stage planner toolset, but #3037 adds read-only file tools while the candidate adds a research toolset with search_web.docs(openspec): plan #2950 Add alternatives coverage metrics and alert (
devops-cli-service commentedon Nov 2, 2026
Status set to Ready at dc26693 (see proposed design in issue body).
Moved to new items: #3290, #3291.
dan-petty commentedon Nov 4, 2026
#3290 moves into #3291, and #3291 is now the one post-merge issue of the
researchtoolset. The recordrefine.deferredon this item still names 3290 and 3291. Read both numbers as #3291. This item stays the code-only item, and its merge does not end that work.Correction of the section
Securityof this item. The stage row runs in the Service, in the job clone, and not in a Job (src/devops_cli/roadmap/run.py:555-572). The search goes from the Service to the Firecrawl service that refine already calls (src/devops_cli/roadmap/refine_investigation.py:106). What is new is a query term that the plan model chooses, not a new destination. A person approves the search by the merge of the pull request of #3291 that setstoolset: research. This comment adds no scope to this item.devops-cli-service commentedon Nov 6, 2026
Alternatives check: partly
Tool: firecrawl/firecrawl (https://github.com/firecrawl/firecrawl)
Covers:
Lacks:
researchtoolset value; the toolset setting, the toolbox wiring and the unit test that proves the guard before egress are repository work, not library work.extendedon the flagged plans; that evaluation and the person approval of the new egress are separate items.Searches run:
Sources:
Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.
[-]feat(roadmap): evaluate a research toolset with web search for the stage planner[/-][+]feat(roadmap): Evaluate a research toolset with web search for the planner[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 65 characters, and the limit is 60. The type and the scope stay.
feat(roadmap): evaluate a research toolset with web search for the stage plannerfeat(roadmap): Evaluate a research toolset with web search for the plannerdan-petty commentedon Nov 7, 2026
Plan note of 2026-11-07, from the owner's request to add a local SearXNG and the Brave Search API.
The tool search_web of the research toolset calls the shared web_search of the chain item (feat(ai): search the web through a chain of providers). It adds no search client of its own.
Acceptance criterion 2 (a query with a secret or an internal host is refused or masked) is met by the guard in web_search, which refuses the query before any provider runs. This item adds a test that the research toolset reaches the guard, and no second guard.
The new egress that a person approves covers the whole chain: the Service reaches SearXNG in the cluster (no external address), and sends the query text to the engines of SearXNG (DuckDuckGo, Wikipedia, GitHub, PyPI, Stack Overflow, arXiv), to api.search.brave.com, to html.duckduckgo.com and to api.firecrawl.dev. The planner's results are transient. The planner keeps no result in a store, so Brave may serve it (keep=False).
dan-petty commentedon Nov 7, 2026
Plan note of 2026-11-07 (owner decision): the Brave Search API is not used. Its terms (1 Sep 2026) forbid storing results and it has no free tier. This replaces the part of the earlier plan note that mentions Brave:
searxng,duckduckgo,firecrawl. There is no keyed provider for now, and noBRAVE_SEARCH_API_KEY.keepparameter and theallows_keepflag are dropped from the design of the chain (they existed only because of the Brave terms). Every provider's hits may be kept.feat(ai): add the fetch-page command and MCP tool (#3982)
devops-cli-service commentedon Nov 8, 2026
Released in v0.96.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.96.0
devops-cli-service commentedon Nov 8, 2026
Live since 2026-11-08 23:37 UTC