Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e15b73a23 | |||
| 006b7a3b27 | |||
| 230419f0e2 |
@@ -208,7 +208,7 @@ AI Core handles OAuth token management and deployment discovery automatically. M
|
||||
| `patterns-files` | No | `README.md` | Files/directories to fetch from pattern repos |
|
||||
| `system-prompt-file` | No | `""` | Local file with additional system prompt instructions |
|
||||
| `persona` | No | `""` | Built-in persona name (security, architect, docs) |
|
||||
| `persona-file` | No | `""` | Path to persona JSON file with custom review focus |
|
||||
| `persona-file` | No | `""` | Path to persona file (YAML or JSON) with custom review focus |
|
||||
| `temperature` | No | `0` | LLM temperature (0 = server default) |
|
||||
| `timeout` | No | `300` | LLM request timeout in seconds |
|
||||
| `dry-run` | No | `false` | Print review to stdout instead of posting |
|
||||
@@ -408,32 +408,38 @@ Each persona posts independently with its own sentinel, so reviews don't interfe
|
||||
|
||||
### Custom Personas
|
||||
|
||||
Create a JSON file with your domain-specific review focus:
|
||||
Create a YAML file with your domain-specific review focus:
|
||||
|
||||
```json
|
||||
// .review/personas/trading.json
|
||||
{
|
||||
"name": "trading",
|
||||
"display_name": "Trading Domain Expert",
|
||||
"identity": "You are a trading systems expert reviewing code for correctness.\n\nYour expertise:\n- Order lifecycle and state machines\n- Fill handling and partial fills\n- Position tracking and P&L calculations\n- Event sourcing invariants",
|
||||
"focus": [
|
||||
"Order state machine correctness",
|
||||
"Fill handling edge cases (partial, overfill)",
|
||||
"Position and P&L calculation accuracy",
|
||||
"Event replay determinism",
|
||||
"Decimal precision for money"
|
||||
],
|
||||
"ignore": [
|
||||
"Code style",
|
||||
"General performance",
|
||||
"Documentation formatting"
|
||||
],
|
||||
"severity": {
|
||||
"major": "Bugs that cause incorrect positions, fills, or money calculations",
|
||||
"minor": "Edge cases that could cause issues under unusual conditions",
|
||||
"nit": "Clarity improvements for domain logic"
|
||||
}
|
||||
}
|
||||
```yaml
|
||||
# .review/personas/trading.yaml
|
||||
name: trading
|
||||
display_name: Trading Domain Expert
|
||||
|
||||
identity: |
|
||||
You are a trading systems expert reviewing code for correctness.
|
||||
|
||||
Your expertise:
|
||||
- Order lifecycle and state machines
|
||||
- Fill handling and partial fills
|
||||
- Position tracking and P&L calculations
|
||||
- Event sourcing invariants
|
||||
|
||||
focus:
|
||||
- Order state machine correctness
|
||||
- Fill handling edge cases (partial, overfill)
|
||||
- Position and P&L calculation accuracy
|
||||
- Event replay determinism
|
||||
- Decimal precision for money
|
||||
|
||||
ignore:
|
||||
- Code style
|
||||
- General performance
|
||||
- Documentation formatting
|
||||
|
||||
severity:
|
||||
major: "Bugs that cause incorrect positions, fills, or money calculations"
|
||||
minor: "Edge cases that could cause issues under unusual conditions"
|
||||
nit: "Clarity improvements for domain logic"
|
||||
```
|
||||
|
||||
Use it in CI:
|
||||
@@ -442,17 +448,24 @@ Use it in CI:
|
||||
- uses: rodin/review-bot/.gitea/actions/review@v1
|
||||
with:
|
||||
reviewer-name: trading
|
||||
persona-file: .review/personas/trading.json
|
||||
persona-file: .review/personas/trading.yaml
|
||||
...
|
||||
```
|
||||
|
||||
YAML is the recommended format for personas because it supports:
|
||||
- Multi-line strings with `|` blocks (cleaner identity definitions)
|
||||
- Comments for documentation
|
||||
- More readable arrays and nested structures
|
||||
|
||||
JSON is also supported for backwards compatibility—just use `.json` extension.
|
||||
|
||||
|
||||
### Persona vs system-prompt-file
|
||||
|
||||
| Feature | `persona` / `persona-file` | `system-prompt-file` |
|
||||
|---------|---------------------------|----------------------|
|
||||
| Replaces base prompt | Yes | No (appends) |
|
||||
| Structured format | Yes (JSON) | No (freeform) |
|
||||
| Structured format | Yes (YAML/JSON) | No (freeform) |
|
||||
| Focus/ignore lists | Yes | Manual |
|
||||
| Severity calibration | Yes | Manual |
|
||||
| Header display name | Yes | No |
|
||||
|
||||
Reference in New Issue
Block a user