Skip to content

API Reference parrot.flows.dev_loop.wiki_search

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.flows.dev_loop.wiki_search

View source

DevLoopWikiSearch — opt-in wiki search facade for dev_loop research.

Provides token-budgeted codebase context from the project's LLM Wiki retrieval plane (.parrot/wiki) to the ResearchNode dispatch brief — the same ranked, compact stubs that wikitoolkit query returns, but consumed in-process (no CLI dependency, no PATH issues).

Auto-detected: when .parrot/wiki.json exists and the SQLite plane is built, :meth:DevLoopWikiSearch.from_project returns a ready instance. When the wiki is absent or unbuilt, it returns None — every caller degrades to a no-op (same contract as DevLoopGraphMemory.from_config).

Class DevLoopWikiSearch

Lightweight facade for wiki-backed research context injection.

Construct via :meth:from_project — never directly.

Parameter Type Default Description
store object
wiki_name str
shared_root Optional[Path] None

Method DevLoopWikiSearch.from_project

Auto-detect and open the project wiki if available.

Resolution: finds .parrot/wiki.json by walking up from root (or CWD); checks whether the SQLite plane is built. Returns None on any failure — never raises.

from_project(root: Optional[Path] = None) -> Optional['DevLoopWikiSearch']

Parameter Type Default Description
root Optional[Path] None Explicit project root. When None, uses the wiki project-root discovery (walk-up to .parrot/wiki.json or .git).

Returns: Optional['DevLoopWikiSearch']

Method DevLoopWikiSearch.build_research_context

Search the wiki and return token-budgeted context text.

build_research_context(query: str, budget_tokens: int = _DEFAULT_BUDGET_TOKENS) -> Optional[str]

Parameter Type Default Description
query str Natural-language query (typically the brief summary + affected component).
budget_tokens int _DEFAULT_BUDGET_TOKENS Hard token ceiling for the packed context.

Returns: Optional[str] — Markdown context text ready for prompt injection, or None when nothing relevant was found (or on any internal error — context injection is best-effort, never fatal).

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally