Skip to content

Make the providers load the context and apply it for code review

While testing the local code-reviews providing different contexts through the md and mdc files, I realized that the providers are unable to apply the context until specifically prompted to do so. This behavior is very consistent when I tested locally using Gemini and claude cli, where even after the agents recognize the context files, they were not actually applying it until prompted to do so. With ai-code-review it was same. The provider therefore would need an additional prompt where it is asked to apply the guidelines in the context. This was tested locally with gemini and claude providers with providing specific contexts and checking the results.

I tested it locally through the --context-file option ai-code-review --local --context-file ~/projects/contcert/foa_validators/product-build-analysis/.GEMINI.md

In future we can add some integration tests to reflect the exact behavior

Why this is important

  • We are planning to use ai-code-review for the FoA validators project where we provide specific context for the agents/providers to consider while reviewing the code
Edited by Rajesh Kumar Srivastava

Merge request reports

Loading