Skip to content

M3: Add local AI provider interface and Claude adapter #10

@dbrosio3

Description

@dbrosio3

Goal

Move local AI review behind a provider interface and migrate the current Claude path into the first provider adapter.

User value

Teams can keep the existing Claude review behavior while Pushgate gains a stable boundary for GitHub Copilot and future AI providers.

Implementation notes

  • Define the provider contract: review input payload, timeout behavior, exit codes, failure categories, and structured output handed to Pushgate.
  • Use the provider selection/config extension points frozen in the v2 schema work.
  • Implement the Claude adapter first so Claude is no longer hard-coded in the core runner path.
  • Keep provider invocation isolated from local deterministic checks.
  • Keep GitHub Copilot implementation in its own provider-adapter task so this interface work does not silently stop at naming Copilot in config.

Risks / tradeoffs

  • Provider CLIs vary in auth, streaming, JSON support, and model naming.
  • Abstracting too early can overfit to imagined providers.

Suggested priority

P1

Milestone

M3: Local AI review

TBD considerations

  • Whether a custom command or OpenAI-compatible adapter follows the Copilot adapter.
  • BYOK timing and expected auth model for future providers.

Acceptance criteria

  • Local AI invocation flows through a provider interface.
  • Existing Claude review behavior flows through a Claude adapter instead of a core-hook hard-code.
  • The provider contract is exercised with tests or stubs independently from deterministic checks.
  • Provider failures respect the configured local AI mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    M3Milestone M3: optional local AIP1Priority P1: important follow-upenhancementNew feature or requestv2ai-pushgate v2 roadmap

    Type

    No type
    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