Skip to content

feat(roadmap): find symbol definitions with tree-sitter tags #4638

Closed

Description

@dan-petty

Problem or Motivation

  • src/devops_cli/roadmap/refine/refine.py:761 sets SYMBOL_PATHSPEC = '*.py'.
  • src/devops_cli/roadmap/premise.py:31-39 finds a definition only with a Python def, class or assignment regex.
  • The stage probe (src/devops_cli/roadmap/stage/stage_probe.py:270 and :282) and the implement premise check (src/devops_cli/roadmap/implement/implement_run.py:167) call it.
  • So the code reports a Rust function that a dreamscaper issue cites as undefined. This is false premise evidence.
  • TreeSitterEngine (src/devops_cli/ai/ast/engine.py:17-113) maps 14 languages. The installed grammars (pyproject.toml:55-69) give TAGS_QUERY with @definition captures. In the roadmap, only stage_tools.py uses them.

Proposed Solution & Architectural Design

  • Find the candidate files with git grep -w <name> over the extensions of EXT_TO_LANG at the commit.
  • Confirm a definition with the TAGS_QUERY @definition captures of the grammar for the language of the file.
  • Python gives the same result as today.
  • Add no project artifact and no LanguageAnalyzer protocol.
  • Test names, test selection and the stage test checks stay Python-only until a runner can run tests of another language.

Target Subsystem

SDLC, Git & PR Governance (src/devops_cli/roadmap/premise.py and src/devops_cli/roadmap/refine/refine.py).

Existing Tool Considered

tree-sitter tag queries are the standard for symbol definitions (GitHub code navigation uses them). The grammars are already installed. universal-ctags is not in the runner image and adds a program. Cost of the wiring: about 100 lines and 6 tests, about 350,000 tokens and 3 hours to build.

Acceptance Criteria

  • A test with a Rust fixture: definition_lines('scout_reaches_target') finds the fn line.
  • A test with a shell fixture finds a function definition.
  • The existing premise and refine tests pass with no change in their expected output.
  • A refine run on a dreamscaper item that cites a Rust function gives a symbol section with its file and line.

Dependencies

None.

Source: #4627

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It fixes false premise evidence for non-Python symbols but does not block the primary Python workflow.
    • Value: Medium. Multi-language repos get correct symbol definitions, but Python-only repos are unaffected.
    • Effort: Low. The body scopes it to about 100 lines, 6 tests, and 3 hours of work.
    • Related: feat(ai): integrate tree-sitter multilingual ast graph and code intelligence engine #74, which asks for a different change. Both use TreeSitterEngine, but #74 builds the engine while this candidate uses its tag queries in the roadmap premise and refine stages.
  4. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  5. removed
    status/in-progress
    owner/agent
    on Nov 12, 2026
  6. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 04:08 UTC

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

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions