The system prompt is currently hardcoded in review/prompt.go. Different repos may want different review styles, focus areas, or output formats.
Proposed Solution
Add a --prompt-file / PROMPT_FILE option that accepts a path to a file containing the system prompt template.
review-bot --prompt-file .review-prompt.md ...
The file could be:
A local path in the repo (loaded during CI)
A path fetched from the repo via Gitea API (like conventions-file already does)
Behavior
If --prompt-file is set, use its contents as the system prompt
The file can reference template variables like {{.Diff}}, {{.Conventions}}, {{.CIStatus}}
If not set, fall back to the built-in default prompt
The conventions file content would still be injected into the prompt context
Use Cases
Elixir repos want OTP-specific review criteria
Go repos want stdlib-idiom focus
Some repos want stricter (any finding = REQUEST_CHANGES) vs lenient (only MAJOR blocks)
Custom output format or severity definitions per project
## Problem
The system prompt is currently hardcoded in `review/prompt.go`. Different repos may want different review styles, focus areas, or output formats.
## Proposed Solution
Add a `--prompt-file` / `PROMPT_FILE` option that accepts a path to a file containing the system prompt template.
```bash
review-bot --prompt-file .review-prompt.md ...
```
The file could be:
- A local path in the repo (loaded during CI)
- A path fetched from the repo via Gitea API (like `conventions-file` already does)
## Behavior
- If `--prompt-file` is set, use its contents as the system prompt
- The file can reference template variables like `{{.Diff}}`, `{{.Conventions}}`, `{{.CIStatus}}`
- If not set, fall back to the built-in default prompt
- The conventions file content would still be injected into the prompt context
## Use Cases
- Elixir repos want OTP-specific review criteria
- Go repos want stdlib-idiom focus
- Some repos want stricter (any finding = REQUEST_CHANGES) vs lenient (only MAJOR blocks)
- Custom output format or severity definitions per project
Since CI runners check out the repo, any file in the repo is available as a local path. The --conventions-file flag additionally fetches from the Gitea API for repo-level conventions without checkout.
Between these two flags, per-repo prompt customization is fully supported.
Closing as implemented. The `--system-prompt-file` / `SYSTEM_PROMPT_FILE` option (added in a prior PR) covers this use case:
```bash
review-bot --system-prompt-file SECURITY_REVIEW.md ...
```
Since CI runners check out the repo, any file in the repo is available as a local path. The `--conventions-file` flag additionally fetches from the Gitea API for repo-level conventions without checkout.
Between these two flags, per-repo prompt customization is fully supported.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
The system prompt is currently hardcoded in
review/prompt.go. Different repos may want different review styles, focus areas, or output formats.Proposed Solution
Add a
--prompt-file/PROMPT_FILEoption that accepts a path to a file containing the system prompt template.The file could be:
conventions-filealready does)Behavior
--prompt-fileis set, use its contents as the system prompt{{.Diff}},{{.Conventions}},{{.CIStatus}}Use Cases
Closing as implemented. The
--system-prompt-file/SYSTEM_PROMPT_FILEoption (added in a prior PR) covers this use case:Since CI runners check out the repo, any file in the repo is available as a local path. The
--conventions-fileflag additionally fetches from the Gitea API for repo-level conventions without checkout.Between these two flags, per-repo prompt customization is fully supported.