Skip to content

Design & implement retrieval / context injection #124

@AlexChesser

Description

@AlexChesser

Summary

Design a first-class retrieval primitive for RAG-style context injection. This is NOT IN SPEC and requires spec authoring.

Parent issue: #105 — Missing Modality C

Why

context: shell: and context: mcp: exist, but there's no first-class retrieval primitive — "search these files/this vector store for content relevant to the prompt and inject it." RAG is the dominant accuracy-improvement technique for LLM applications. A context: retrieve: or context: search: type would be high value.

Design Decisions Needed

  • Step syntax — new context: retrieve: type? context: search:? Both?
  • Search backends — file glob? Full-text search? Vector store? Pluggable?
  • Query source — from the step prompt? From a template variable? Explicit query string?
  • Result format — raw text injection? Structured with source attribution?
  • Result limits — max results? Max tokens? Relevance threshold?
  • Whether this should be a built-in or achieved via MCP tools + context: mcp:

Spec Work Required

New spec section needed or extension to existing context types (§6).

Acceptance Criteria

  • Spec section authored
  • At least one retrieval backend implemented (e.g. file search)
  • Retrieved context is injected into step prompt
  • Retrieval metadata available in template variables

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions