Skip to content

Discovery Engine — Phase 2: nav-sweep (deterministic imperative-nav traversal) #127

Description

@badchars

Part of the Discovery Engine epic #125. Addresses the imperative-nav half of #120.

Scope — deterministic nav traversal (hybrid)

Button/router-nav SPAs expose no <a href>, so route discovery falls to the LLM per-page (budgeted, no global memory) → shallow crawls. Add a deterministic nav backbone that guarantees every nav entry point is traversed once.

  • Gather (deterministic): scan inChrome nav-landmark clickables (nav, [role=navigation], [role=menu], sidebars) into a global, label/target-deduped nav checklist (crawl-wide, not per-page).
  • Judge (existing LLM, no prompt change): unvisited nav items become high-priority candidates in the existing findUnexploredElements/planUnexploredElements flow.
  • Fallback (deterministic): items the LLM skips stay on the global checklist → eventually clicked. Guard with SKIP_AUTO_DISCOVERY (logout/destructive).
  • Visit via the existing executor (keeps ingest trigger-correlation) → url-change → enqueue route.

Constraints

  • No prompt/snapshot change; additive; global-dedup prevents navbar re-click spam; guarded against logout.
  • Generic (semantic landmarks, framework-agnostic); apps without semantic nav fall back to the existing LLM exploration.

Commits (granular)

Global nav-checklist state → inChrome gather → dedup keying → guard (SKIP_AUTO_DISCOVERY) → priority wiring into unexplored flow → executor-reuse visit → url-change enqueue → deterministic fallback → tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions