Skip to content

feat(ai): agentic information foraging & scent tracker (devops ai research forage) #274

Closed

Description

@dan-petty

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 forage is 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: Running devops ai research forage --help shows 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 --json variant) 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 --json flag emits the same data as structured JSON.
    Verification: Running the command with --json on a fixture produces valid JSON parseable by python -m json.tool containing keys for path, scores, ledger, and backtracking events.

Key questions

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.
[end-marker]

Activity

  1. added this to the v0.2.21 milestone on Sep 19, 2026
  2. added
    type/feature
    scope/ai
    priority/p0-critical
    on Sep 19, 2026
  3. modified the milestones: v0.2.21, on Sep 19, 2026
  4. modified the milestones: , v0.2.33 on Oct 4, 2026
  5. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    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

    1. 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 or devops 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.

    2. 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.

    3. 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].

      • Edges: Python imports (stdlib 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 (GitPython iter_commits).
      • Scoring: BM25 (ai/lexical.py).
      • Search: best-first with heapq and a visited-set ledger. It backtracks to the next-best frontier node when the score falls below a threshold.
      • Output: a ranked trail, as Rich or JSON.
      • Acceptance criteria: on a tmp_path fixture repository, the anchor reaches the expected file within N hops; no node is visited twice; output is deterministic; zero network calls; the new tests add under 1 s.
    4. Defer, and file only on request:

    5. feat(ai): syntopical dialectical synthesis engine (devops ai research syntopical) #273, or a small precursor, creates the devops ai research group 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-run previews for delegated commands #412.

  6. modified the milestones: v0.2.33, v0.2.34 on Oct 9, 2026
  7. dan-petty-bot commented on Oct 9, 2026

    @dan-petty-bot
    Collaborator

    Status set to Ready at b5ea6ff (see proposed design in issue body).

  8. dan-petty commented on Oct 11, 2026

    @dan-petty
    OwnerAuthor

    Merged

  9. added a commit that references this issue on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p0-criticalscope/aitype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions