Skip to content

feat: parent-child retrieval for AST chunks #146

Description

@Lucas-Bur

Parent

#83

What to build

Add parent-child retrieval on top of AST-aware chunking. Fine-grained child entries are embedded for precise matching, while query results return their complete semantic parent by source range. Parent records are deduplicated by stable parent identity and remain available without embedding every parent body.

Index v2 should reserve the parent identity, source range, and entry-level metadata needed by this slice.

Acceptance criteria

  • Searchable child entries carry a stable parent ID and exact source range
  • A child hit resolves to the complete parent function, class, or declaration
  • Parent bodies are stored or loaded once and deduplicated by parent ID
  • Multiple child hits from one parent do not duplicate returned parent content
  • Unsupported languages retain normal chunk retrieval
  • JSON and human output preserve accurate file and line metadata
  • Tests cover child matching, parent resolution, deduplication, and missing parents

Blocked by

Activity

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

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions