Repository navigation
Description
Problem
Research in the roadmap jobs is thin: one web search tool (Firecrawl, with a DuckDuckGo fallback after this item's sibling), a code search of the repository, and the RAG index of the project. Refine, the alternatives check and the stage planner each ask the same kinds of questions: Which open tool covers this need? What does this library do in this version? Does this string or API exist upstream? Nothing keeps the answers. The same question is searched again every round, and a result is lost when the job ends.
Expected
An investigation, written as an ADR in docs/adr/ with the evidence, of an open web research agent for the project. It compares open implementations and libraries and decides which one to use, or that none fits. It covers:
- Several technical research tools in one agent: web search (DuckDuckGo, SearXNG, Firecrawl), page fetch and extraction, search of package indexes and code hosts, upstream documentation, and the repository's own code.
- String match over the fetched text (exact and regular-expression search over results and documents), so that a claim such as "this flag exists" is checked on the text and not on a model summary.
- RAG ingestion of the results and of the research data into the project index (Qdrant, with a collection for research), with the source URL, the fetch date, a content hash, an expiry and the question that found it. A later question reads the index first and searches the web only for what is missing or stale.
- The limits: egress and private data (SECURITY.md rule 13: no private code or secret in a query), the per-item and per-day budget (feat(roadmap): cost and token budgets per item and per day #3066), the request budget of the Service, and the quality of the result (a measure on real questions of the alternatives and refine jobs).
Acceptance criteria
- The ADR names at least four open implementations or libraries that were read in source or docs (for example GPT Researcher, the open deep research agent of LangChain, STORM, Crawl4AI, SearXNG, pydantic-ai tools) with what each lacks for this project.
- The ADR states the decision, the rejected options, the design of the research index (fields, expiry, deduplication), and the string-match tool (which existing tool, for example ripgrep or a Python regex over stored text).
- A measure: the candidate runs on 10 recorded questions from the alternatives and refine comments of the last 30 days, and the ADR gives the hit rate and the cost per question against today's Firecrawl search.
- A person has approved the ADR in a comment on this issue.
- The follow-up implementation issues exist and name the ADR.
Existing tool considered
Open research agents and tools (GPT Researcher, open deep research, STORM, Crawl4AI, SearXNG), pydantic-ai tools and capabilities, ddgs, the project's own RAG index and devops ai rag-query. The investigation decides; it writes no feature code.
Related
Related: #3243 (a research toolset for the planner), #2398 (refine investigation), #2650 (alternatives), #3220 and #3221 (MCP server for the jobs), #3066 (budgets), #1389 and #1653 (RAG index of managed repositories).
Proposed design
Problem statement
The roadmap jobs search the web with one thin tool and lose each answer. Refine, the alternatives check and the stage planner ask the same research questions every round. The project needs an ADR that compares open research agents and tools, chooses one design or none, and defines a Qdrant research index with string match, expiry and budgets.
Acceptance criteria
Requirement: Open tool comparison
The ADR SHALL name at least four open research tools or libraries that were read in source or docs, each with what it lacks for this project.
Scenario: Four tools with gaps
- WHEN A reader checks the comparison section of the ADR.
- THEN It finds at least four named open tools, and each entry states a gap.
Requirement: Decision and rejected options
The ADR SHALL state one chosen design and at least two rejected options, each with the evidence for its rejection.
Scenario: Chosen design and rejections
- WHEN A reader checks the decision section of the ADR.
- THEN It finds one chosen design and at least two rejected options with reasons.
Requirement: Research index design
The ADR SHALL define the research index fields, expiry, deduplication, and the page-text storage rule.
Scenario: Index fields and expiry
- WHEN A reader checks the research index section of the ADR.
- THEN It finds the source URL, fetch date, content hash, expiry and question fields, and no search-result field.
Requirement: String-match tool
The ADR SHALL name the existing tool for exact and regular-expression search over fetched text.
Scenario: String-match tool named
- WHEN A reader checks the string-match section of the ADR.
- THEN It finds ripgrep or a named Python regex library, with the reason for the choice.
Requirement: Search chain and Brave rejection
The ADR SHALL record the search chain searxng, duckduckgo, firecrawl, the rejection of the Brave Search API, and the absence of a keep parameter.
Scenario: Search chain recorded
- WHEN A reader checks the search section of the ADR.
- THEN It finds the three providers in that order, the Brave rejection with its terms reason, and no keep or allows_keep field.
Requirement: Ten-question measure
The ADR SHALL report the hit rate and cost per question for 10 recorded questions from the last 30 days against the SearXNG and DuckDuckGo baseline.
Scenario: Ten-question baseline
- WHEN A reader checks the measure section of the ADR.
- THEN It finds 10 question IDs, the hit rate, the cost per question, and the baseline providers.
Requirement: Limits recorded
The ADR SHALL record the SECURITY.md rule 13 egress rule, the per-item and per-day budget (#3066), the Service request budget, and the quality measure.
Scenario: Limits with sources
- WHEN A reader checks the limits section of the ADR.
- THEN It finds each of the four limits with a source.
Requirement: Follow-up work listed
The ADR SHALL list the follow-up implementation work that its decision requires.
Scenario: Follow-up work listed
- WHEN A reader checks the end of the ADR.
- THEN It finds a list of follow-up work items, and each names the ADR path.
Requirement: ADR location
The ADR SHALL be a numbered Markdown file under docs/adr/ with a status and a date.
Scenario: ADR file exists
- WHEN A reader lists docs/adr/.
- THEN It finds a new numbered ADR file with a status and a date.
Existing Tool Considered
No alternatives check has run. No single open tool covers the whole need: GPT Researcher and LangChain open deep research cover agent orchestration but not the project Qdrant research schema, exact string match, egress rules and budgets. Crawl4AI covers page fetch and extraction, SearXNG covers search, ripgrep covers exact and regular-expression match, and Qdrant covers the index. This item writes an ADR and no feature code, so no build cost applies.
Key questions
- Which open research agent or library should the project adopt?: No single agent. The ADR should compose maintained parts: SearXNG for search, Crawl4AI for fetch and extraction, ripgrep for string match, Qdrant for the research index, and pydantic-ai for tool orchestration. It rejects GPT Researcher, LangChain open deep research and STORM as the main agent because each lacks the project exact-match, egress and budget controls. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, src/devops_cli/ai/web_search.py, SECURITY.md]
- Chosen: Compose SearXNG, Crawl4AI, ripgrep and Qdrant with pydantic-ai. Each part is open and maintained, and each covers one need without a home-grown agent.
- Rejected: GPT Researcher. Covers research orchestration but lacks the project Qdrant schema, exact string match, egress rules and budgets.
- Rejected: LangChain open deep research. Adds a large dependency and a model-summary path, not exact string match.
- Rejected: STORM. Generates long articles and does not check a narrow claim on fetched text.
- Which search providers form the chain?: The chain is searxng, duckduckgo, firecrawl, with failover. The Brave Search API is not used because its terms forbid storing results and it has no free tier. There is no keep parameter and no allows_keep flag. (best practice) [sources: src/devops_cli/ai/web_search.py, src/devops_cli/config/defaults.py]
- Chosen: searxng, duckduckgo, firecrawl. Owner decision of 2026-11-07; one settings list makes the chain cheap to reverse.
- Rejected: Add Brave Search API. Its terms forbid storing results and it has no free tier.
- Rejected: Firecrawl only. It answers HTTP 402 and gives no baseline.
- What should the research index store?: Fetched page text only, with the source URL taken from the fetch, the fetch date, a content hash, an expiry and the question that found it. It stores no search-result field such as title, snippet, rank or age. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
- Chosen: Fetched page text with fetch metadata. Stores pages, not search results, and gives the URL from the fetch.
- Rejected: Search-result fields such as title and snippet. The index stores pages, not search results.
- Rejected: Model summaries of pages. A summary cannot prove that an exact string exists.
- Which string-match tool should the ADR choose?: ripgrep for exact and regular-expression search over stored text, with a Python re fallback for in-memory text. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
- Chosen: ripgrep. Open, maintained, fast, and returns the matching line and file.
- Rejected: Python re only. Works on in-memory text but needs custom file walking and binary handling.
- Rejected: Model summary check. A summary is not the text and can miss an exact string.
- What baseline should the measure use?: Use 10 recorded questions from the alternatives and refine comments of the last 30 days. Report hit rate and cost per question against the SearXNG and DuckDuckGo baseline; Firecrawl answers HTTP 402 and gives no baseline. The measure may use any provider of the chain. (best practice) [sources: src/devops_cli/ai/web_search.py]
- Chosen: SearXNG and DuckDuckGo baseline. Both answer, and Firecrawl answers HTTP 402.
- Rejected: Firecrawl baseline. It answers HTTP 402 and gives no result.
- Rejected: Brave baseline. The owner rejected Brave.
- Which limits must the ADR record?: SECURITY.md rule 13, the per-item and per-day budget (feat(roadmap): cost and token budgets per item and per day #3066), the Service request budget, and the quality measure. [sources: SECURITY.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-08: not-applicable.
Class: docs, no search.
Tool: none found.
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
docsprefix of the title gives the type.(ai)scope of the title gives the scope.It is a prerequisite for future research features but does not block current work.It guides the choice of research agent and RAG design, saving later rework, but delivers no direct user-facing change.It requires reading four or more open-source projects, designing a RAG schema, running ten measured questions, and writing the ADR.Both deal with web research for the project, but #3243 adds a search_web tool to the planner toolset while the candidate writes an ADR comparing open research agents and designing a RAG ingestion index.dan-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 ADR of this item must record these points. Each has its evidence in the follow-up issues.
The list of open tools in the ADR adds SearXNG (read in source, commit 629368e40) and the Brave Search API (terms read 2026-11-07).
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.devops-cli-service commentedon Nov 7, 2026
Status set to Ready at 5520193 (see proposed design in issue body).
Moved to new items: #4014, #4015.
devops-cli-service commentedon Nov 8, 2026
Alternatives check: not-applicable
Class: docs. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-08. A person decides what this means for the item. The check changes no label and closes no issue.
2 remaining items
docs(openspec): plan #3877 Record the research agent decision in an A…
devops-cli-service commentedon Nov 17, 2026
Pull request #6147 is ready for review. The checks passed.
Spend: 74 model requests, 9216968 input tokens, 50957 output tokens.
devops-cli-service commentedon Nov 17, 2026
The runner Job devops-cli-implement-devops-cli-3877-875d54 ended: succeeded.
Image digest: sha256:95f28df9348d9893cd7358c761ef7e7b14ba47b34327348c513f291af629febf
The last lines of its log:
docs(openspec): plan #3906 again: follow ADR 0028 for the research in…
feat(research): Store fetched research pages in Qdrant (#6301)