feat(skill): union-of-scopes детект изменений для code-режима
- Зачем:
- типичный PR-флоу: ветка ahead of base + (часто) локальный твик поверх. Прежняя логика смотрела только unstaged/staged и пропускала коммиты ветки, давая пустое или неполное ревью.
- Что:
- Step 1 auto-detect: добавлен третий независимый scope `git diff <base>...HEAD` с резолвом base (`symbolic-ref refs/remotes/origin/HEAD` → `origin/main` → `origin/master` → `main` → `master`).
- Step 2 dispatch: briefing для `code` и `code-vs-plan` переписан с fallback на union трёх скоупов, явное "do not skip branch-vs-base because working tree is non-empty".
- reviewer-prompt.md: `{ARTIFACT}` placeholder теперь спеллует все три scope (a)(b)(c) с инструкцией про labeling mixed-state.
- README.md: таблица "Three modes" и пояснение синхронизированы с union-семантикой.
- Проверка:
- на ветке feat/cross-platform-receiving-review одновременно непустые `git diff` и `git diff origin/main...HEAD` — финальная формулировка прошла Codex review (3 раунда, VERDICT: APPROVED).
This commit is contained in:
@@ -73,14 +73,21 @@ runs without operator access conclude unverified.
|
||||
|
||||
### Three modes
|
||||
|
||||
| Mode | What it reviews | When to use |
|
||||
|----------------|------------------------------------|--------------------------|
|
||||
| `plan` | Implementation plan | Before writing code |
|
||||
| `code` | Git diff (unstaged, staged, branch)| After writing code |
|
||||
| `code-vs-plan` | Code changes against the plan | Verify implementation |
|
||||
| Mode | What it reviews | When to use |
|
||||
|----------------|------------------------------------------|--------------------------|
|
||||
| `plan` | Implementation plan | Before writing code |
|
||||
| `code` | Working-tree, staged, and branch changes | After writing code |
|
||||
| `code-vs-plan` | Code changes against the plan | Verify implementation |
|
||||
|
||||
Mode is auto-detected from context, or you can force it with an argument.
|
||||
|
||||
For `code` mode, "branch changes" means commits on the current branch
|
||||
since it diverged from its base (`main`, `master`, or the remote
|
||||
default). The three scopes (unstaged, staged, branch-vs-base) are
|
||||
reviewed as a union, not a fallback chain — so the typical PR case
|
||||
(committed changes on the branch plus an in-progress local tweak) is
|
||||
covered without an explicit flag.
|
||||
|
||||
### Language
|
||||
|
||||
The skill detects the operator's session language from recent
|
||||
|
||||
Reference in New Issue
Block a user