Repository navigation
Description
Context & Rationale
Implements Pirolli & Card's Information Foraging Theory. Rather than executing disjointed keyword grep searches, the agent follows relational "information scent" across codebases and repositories.
Scope & Deliverables
- Context & Rationale*: Implements Pirolli & Card's Information Foraging Theory. Rather than executing disjointed keyword grep searches, the agent follows relational "information scent" across codebases and repositories.
- Breadcrumb Relational Crawler*: Traverses outbound cues from a starting anchor (error traceback, failing test, or feature keyword) across symbol imports, call hierarchies, git blame history, PR discussions, and markdown references.
- Heuristic Scent Scoring & Backtracking*: Scores edges based on semantic relevance to the inquiry; maintains an explicit traversal ledger that detects circular paths and systematically backtracks when an information trail grows cold.
Strategic Alignment
- Milestone:
v0.2.21(Deep Cognitive Information Foraging, Syntopical Reading & Epistemic Research Engine) - Roadmap Reference:
docs/ROADMAP.md
Proposed design
Problem statement
The devops-cli AI research surface has no command that follows relational information trails across a codebase. When investigating an error traceback, a failing test, or a feature keyword, a user must manually grep for related symbols, trace imports, read git blame, and scan PR discussions. This issue adds devops ai research forage, an agentic command grounded in Pirolli & Card's Information Foraging Theory, that starts from a given anchor, traverses outbound cues (symbol imports, call hierarchies, git blame history, PR discussions, markdown references), scores each edge for semantic relevance to the inquiry, detects circular paths via an explicit traversal ledger, and backtracks when the best remaining edge falls below a relevance threshold.
Acceptance criteria
- Criterion 1: The command
devops ai research forageis registered in the CLI and accepts a starting anchor of type error-traceback, failing-test, or feature-keyword via a positional argument or flag.
Verification: Runningdevops ai research forage --helpshows the anchor argument and its accepted types; running it with a sample traceback string exits 0 and produces output. - Criterion 2: The crawler traverses at least five edge types from the anchor: symbol imports, call hierarchies, git blame history, PR discussions, and markdown references.
Verification: A test fixture repository containing a known import chain, a call site, a blame entry, a PR discussion thread, and a markdown cross-reference produces a traversal that visits nodes reachable through all five edge types. - Criterion 3: Each traversed edge carries a numeric relevance score computed from semantic similarity to the inquiry, and the score is visible in the output.
Verification: The command output (or a--jsonvariant) lists each edge with its score; a unit test asserts that a semantically related edge scores higher than an unrelated one. - Criterion 4: The traversal ledger records every visited node and edge, and the crawler detects and skips circular paths rather than looping.
Verification: A test fixture with a two-node import cycle (A imports B, B imports A) produces a traversal that visits each node exactly once and reports the cycle in the ledger. - Criterion 5: When the highest-scoring unvisited edge falls below a configurable threshold, the crawler backtracks to the next-best branch and records the backtracking decision.
Verification: A test with a deliberately low-relevance branch asserts that the crawler abandons that branch, backtracks, and the output shows the backtracking event with the threshold that triggered it. - Criterion 6: The command output presents the full traversal path with per-node findings, edge scores, and backtracking decisions in a human-readable form, and a
--jsonflag emits the same data as structured JSON.
Verification: Running the command with--jsonon a fixture produces valid JSON parseable bypython -m json.toolcontaining keys for path, scores, ledger, and backtracking events.
Key questions
- Does the
devops ai researchcommand group already exist in the CLI, or must this issue create it alongside the sibling commands (feat(ai): syntopical dialectical synthesis engine (devops ai research syntopical) #273, feat(ai): active marginalia & epistemic scratchpad (devops ai read annotate) #275–feat(ai): living mental model synthesizer & causal graph distiller (devops ai research model) #278)?: The roadmap lists sixdevops ai research */devops ai read *commands in v0.2.33 (feat(ai): syntopical dialectical synthesis engine (devops ai research syntopical) #273–feat(ai): living mental model synthesizer & causal graph distiller (devops ai research model) #278) with no earlier release containing them, and the context shows no existingresearchsubcommand underdevops ai. The command group must be created as part of the first of these items to land; this issue should create or extend the group registration. [sources: docs/ROADMAP.md] - What model or scoring mechanism provides the 'semantic relevance' score for each edge?: The issue body does not specify a concrete model or algorithm. The project already has an LLM client seam (referenced in ADR 0005 and the backlog's refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001 refactor) and a RAG subsystem. The scoring should use the existing model client to compute a relevance score per edge, with a deterministic fallback (e.g., token-overlap or AST-distance) when no model is available. This is a design decision the implementer must make. (proposed) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
- What is the default relevance threshold below which the crawler backtracks?: Not specified in the issue body. A reasonable default is a configurable setting (e.g.,
ai.research.forage_min_score) with a default of 0.3 on a 0–1 scale, overridable via a--min-scoreflag. This is a design decision. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
[end-marker]
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 9, 2026
Rescheduled from v0.2.33 (owner, 2026-10-09): not ready to be worked
The v0.2.33 assessment and its challenge both found this item cannot be built as written. It shows Ready on the board but was never refined (no design section), so refine never reached it. The owner asked to implement what is ready and reschedule the rest, so it moves to v0.2.34 and back to New for refinement (#1515 makes refine reach Ready-but-unrefined items).
Findings and the questions refinement must answer
Don't build feat(ai): agentic information foraging & scent tracker (
devops ai research forage) #274 as written. Set its board Status from Ready back to New, since it was never refined and refine skips Ready items. Then refine it, either through feat(roadmap): refine runs every hour and readies the new items of every planned release, nearest first, before that release starts #1515's hourly refine ordevops roadmap refine --item 274, and put the owner's answers in the body as acceptance criteria. Remove the stale "Milestone v0.2.21" line at the same time.Leave placement to the owner and the roadmap tooling. The owner said to continue with the milestone's items. feat(roadmap): a release keeps 4 slots above its cap of 12, so a start still fills to 12 and nothing is trimmed or descoped until it holds more than 16 #1514 trims v0.2.33 only above 16, and it holds 17.
Narrow v1 to a deterministic, local-only crawler with no LLM, no network and no file writes:
devops ai research forage <path-or-keyword> --query TEXT [--max-nodes N] [--json].ast, plus a resolver the owner picks, such as grimp; no hand-written module-to-path mapping), markdown links (markdown-it-py), and git co-change (GitPythoniter_commits).ai/lexical.py).heapqand a visited-set ledger. It backtracks to the next-best frontier node when the score falls below a threshold.Defer, and file only on request:
--dry-runpreviews for delegated commands #412's dry-run rules;feat(ai): syntopical dialectical synthesis engine (
devops ai research syntopical) #273, or a small precursor, creates thedevops ai researchgroup and settles the research settings first. feat(ai): agentic information foraging & scent tracker (devops ai research forage) #274-feat(ai): living mental model synthesizer & causal graph distiller (devops ai research model) #278 rebase on it and regenerate the docs after feat(cli): reachable--dry-runpreviews for delegated commands #412.dan-petty-bot commentedon Oct 9, 2026
Status set to Ready at b5ea6ff (see proposed design in issue body).
feat(ai): agentic information foraging & scent trails (#274) (#1553)
dan-petty commentedon Oct 11, 2026
Merged
feat(release): v0.2.34 (#1566)