Skip to content

Graduated lazy-retrieval ladder (card → skeleton → hot-path → policy-gated full source) #28

Description

@100yenadmin

Prior art: SDL-MCP (https://github.com/GlitterKill/sdl-mcp) — its "Iris Gate Ladder."

Gap in GitNexus: query/context return bounded slices, but retrieval isn't framed as an explicit budget-aware escalation. An agent gets a slice and either has enough or falls back to reading whole files — there's no cheapest-sufficient ladder.

Proposed feature — a 4-rung graduated retrieval where an agent climbs only as far as it needs:

  1. Symbol card (~100 tok) — compact per-symbol record: name, signature, kind, file:line, 1-line summary, key edges. Precomputable at index time.
  2. Skeleton (~300 tok) — signatures + docstrings, no bodies.
  3. Hot-path excerpt (~600 tok) — only the matched/targeted lines, not the whole function.
  4. Full sourcepolicy-gated: agent must supply a reason + expected identifiers + expected line count; denials return next-best-action guidance.

Value: turns "read the file" into a cheapest-sufficient escalation. SDL self-reports 4–20× fewer tokens on signature/shape queries. Attacks the dominant coding-token sink (file reads) while keeping a justified escape hatch to ground truth — the agent is never blocked, just must justify the expensive read. The ~100-tok card is the highest-leverage rung.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions