Skip to content

feat(review): import-driven ast prompt grounding and api contract injection #78

Closed

Description

@dan-petty

Problem or Motivation

Third-party API hallucinations account for significant reviewer friction. Providing exact API contract context during review prompt generation eliminates guesswork.

Proposed Solution & Architectural Design

  • Statically parse AST import statements from modified review files in ReviewPipelineOrchestrator.
  • Query devops_libraries and Valkey symbol store for imported modules and symbols.
  • Automatically inject verified API contracts into LLM reviewer prompts (prompt.md, ReviewPayload), grounding model reasoning in verified signatures.

Acceptance Criteria

  • Imports detected in diffs automatically trigger contract lookups.
  • Contract context safely injected into reviewer prompt boundaries.
  • Unit tests in tests/test_contract_injection.py pass with >= 90% coverage.

Activity

  1. added this to the v0.2.14 milestone on Sep 9, 2026
  2. added
    type/feature
    scope/review
    priority/p1-high
    on Sep 9, 2026
  3. added a commit that references this issue on Sep 9, 2026
    841fd80
  4. dan-petty commented on Sep 9, 2026

    @dan-petty
    OwnerAuthor

    Resolved in commit 841fd80 on branch release/v0.2.14. Import-driven AST prompt grounding and API contract injection implemented in review pipeline with fallback to Valkey L1 / Qdrant / offline JSON contracts, tested in tests/test_contract_injection.py.

  5. added a commit that references this issue on Sep 10, 2026
    ee87b4a
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

    priority/p1-highscope/reviewtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions