Feature request / documentation gap
best_practices.md is documented at https://qodo-merge-docs.qodo.ai/tools/improve/#best-practices but only loaded by the Qodo Merge SaaS. The open-source pr-agent package on PyPI does not read the file from the repo, so users who follow the public docs and add a best_practices.md see it silently ignored — none of its content reaches the LLM.
(See closed issue #1288 — same confusion.)
Suggested behavior
One of:
- Load it in OSS too — read
best_practices.md from the repo root (or a configurable path) at startup and append its contents to pr_reviewer.extra_instructions and pr_code_suggestions.extra_instructions after the normal apply_repo_settings merge.
- Or explicitly document in the README and the
improve tool docs that best_practices.md is SaaS-only and has no effect in the OSS package, so users do not waste time authoring rules that nothing reads.
Workaround
Wrapping apply_repo_settings and appending the file contents to extra_instructions per call works:
import pr_agent.git_providers.utils as _utils_mod
import pr_agent.agent.pr_agent as _agent_mod
from pathlib import Path
from pr_agent.config_loader import get_settings
original = _utils_mod.apply_repo_settings
appendix = "\n\n" + Path("best_practices.md").read_text()
def _wrapped(pr_url):
original(pr_url)
for section in ("pr_reviewer", "pr_code_suggestions"):
key = f"{section}.extra_instructions"
current = str(get_settings().get(key, "") or "")
if appendix not in current:
get_settings().set(key, current + appendix)
_utils_mod.apply_repo_settings = _wrapped
_agent_mod.apply_repo_settings = _wrapped
Wrapping is required because apply_repo_settings runs per PR and would overwrite a one-shot boot mutation.
Environment
Feature request / documentation gap
best_practices.mdis documented at https://qodo-merge-docs.qodo.ai/tools/improve/#best-practices but only loaded by the Qodo Merge SaaS. The open-sourcepr-agentpackage on PyPI does not read the file from the repo, so users who follow the public docs and add abest_practices.mdsee it silently ignored — none of its content reaches the LLM.(See closed issue #1288 — same confusion.)
Suggested behavior
One of:
best_practices.mdfrom the repo root (or a configurable path) at startup and append its contents topr_reviewer.extra_instructionsandpr_code_suggestions.extra_instructionsafter the normalapply_repo_settingsmerge.improvetool docs thatbest_practices.mdis SaaS-only and has no effect in the OSS package, so users do not waste time authoring rules that nothing reads.Workaround
Wrapping
apply_repo_settingsand appending the file contents to extra_instructions per call works:Wrapping is required because
apply_repo_settingsruns per PR and would overwrite a one-shot boot mutation.Environment