Skip to content

feat: support per-repo AI prompt for test oracle via ORACLE.md #1003

@myakove

Description

@myakove

Description

Support a per-repository AI prompt file for the test oracle integration. If an ORACLE.md file exists in the repository root, its content is read and sent to the oracle server as the prompt for AI analysis.

This allows each repository to customize the AI's behavior when analyzing PRs for test recommendations (e.g., specific testing conventions, framework-specific instructions, areas to focus on).

Requirements

  • Check if ORACLE.md exists in the repository root (use the cloned repo path)
  • If found, read its content and include it in the /analyze request payload
  • If not found, omit the prompt (oracle server uses its default prompt)
  • The oracle server's /analyze endpoint needs to support a prompt field (may require upstream changes to pr-test-oracle)

Deliverables

  • Check upstream pr-test-oracle API for prompt field support (may need to add it)
  • Read ORACLE.md from cloned repo in call_test_oracle()
  • Pass prompt content in the analyze payload
  • Add tests for ORACLE.md present/absent scenarios
  • Document ORACLE.md in README and CLAUDE.md

Notes

  • The repository is already cloned before handlers run (except for check_run events)
  • The cloned repo path is available via github_webhook context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions