Skip to content

feat(ai): dynamic package introspection and type stub parser for library ingestion #75

Closed

Description

@dan-petty

Problem or Motivation

LLM reviewers frequently hallucinate third-party package APIs, non-existent methods, or deprecated parameter signatures when evaluating complex code diffs. A deterministic contract store of installed package types and signatures is required.

Proposed Solution & Architectural Design

  • Implement devops ai ingest library [OPTIONS] <package_name> to inspect installed packages using Python ast, pkgutil, inspect, and .pyi type stubs.
  • Extract classes, method signatures, parameter types, default values, and docstrings into structured Pydantic v2 schemas (LibraryContract, SymbolSignature).
  • Persist structured contracts in .data/libraries/ and provide --format json output.

Acceptance Criteria

  • devops ai ingest library parses standard and third-party packages into structured contracts.
  • Type stubs (.pyi) are prioritized when available for accurate type annotations.
  • Unit tests in tests/test_library_ingest.py pass with >= 90% code coverage.
  • CLI reference documentation synchronized.

Activity

  1. added this to the v0.2.14 milestone on Sep 9, 2026
  2. added
    type/feature
    scope/ai
    priority/p1-high
    on Sep 9, 2026
  3. dan-petty commented on Sep 9, 2026

    @dan-petty
    OwnerAuthor

    Closed by PR #82 merge into release/v0.2.14.

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/aitype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions