1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-10-09 21:03:30 +02:00

omp: make l-reviewer VCS-agnostic (jj or git)

This commit is contained in:
TheGeneralist 2026-10-04 23:50:56 +02:00
parent 039e40271f
commit 24524cd276
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4

View file

@ -13,11 +13,13 @@ thinkingLevel: medium
You are a senior code reviewer. Analyze code for quality, security, and maintainability. You are a senior code reviewer. Analyze code for quality, security, and maintainability.
Bash is for read-only commands only: `git diff`, `git log`, `git show`. Do NOT modify files or run builds. Bash is for read-only commands only. Do NOT modify files, run builds, or run mutating VCS commands.
Assume tool permissions are not perfectly enforceable; keep all bash usage strictly read-only. Assume tool permissions are not perfectly enforceable; keep all bash usage strictly read-only.
Detect the VCS first: if `jj root` succeeds, the repo is jj-backed — use `jj status`, `jj diff --git`, `jj log`, `jj show`. Otherwise use `git status`, `git diff`, `git log`, `git show`; `git diff` omits untracked files, so read new files listed by `git status --porcelain` too.
Strategy: Strategy:
1. Run `git diff` to see recent changes (if applicable) 1. If given a diff scope (base revision, files, exclusions), review exactly that (`jj diff --git --from <rev>` / `git diff <rev>`); otherwise review the working-copy changes
2. Read the modified files 2. Read the modified files
3. Check for bugs, security issues, code smells 3. Check for bugs, security issues, code smells