|
1 | 1 | --- |
2 | 2 | name: review-feature-branch |
3 | | -description: Orchestrate a comprehensive feature branch review that combines AI code review (peer review), PR comment analysis, findings evaluation, and optional implementation finishing. Use when the user asks to "review feature branch", "review branch against main", "run full review", "check my branch before merging", or "review everything on this branch". |
| 3 | +description: Orchestrate a comprehensive feature branch review with AI code review, findings evaluation, and optional finalization. Use when the user asks to "review feature branch", "review branch against main", "run full review", "check my branch before merging", or "review everything on this branch". |
4 | 4 | --- |
5 | 5 |
|
6 | | -# Reviewing Feature Branch |
| 6 | +# Review Feature Branch |
7 | 7 |
|
8 | | -Orchestrate a comprehensive feature branch review by running AI code review, fetching PR comments, evaluating all findings, and optionally finishing implementation. |
| 8 | +Orchestrate a feature branch review by running code review, evaluating findings, and optionally finishing with `/finalize`. |
9 | 9 |
|
10 | 10 | ## Task Tracking |
11 | 11 |
|
12 | 12 | At the start, use `TaskCreate` to create a task for each phase: |
13 | 13 |
|
14 | | -1. Peer review |
15 | | -2. Review PR comments |
16 | | -3. Evaluate findings |
17 | | -4. Confirm implementation |
18 | | -5. Finish implementation |
| 14 | +1. Code review |
| 15 | +2. Confirm implementation |
| 16 | +3. Finalize implementation |
19 | 17 |
|
20 | | -## Phase 1: Peer Review |
| 18 | +## Phase 1: Code Review |
21 | 19 |
|
22 | | -Run `/peer-review` skill to review the feature branch against the base branch. Capture the full output for evaluation in Phase 3. |
| 20 | +Run the `/code-review` skill to review the feature branch against the base branch. |
23 | 21 |
|
24 | | -If the branch should be compared against a different base, the user will specify it. Default to the repository's default branch (detect via `gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'`). |
| 22 | +## Phase 2: Confirm Implementation |
25 | 23 |
|
26 | | -## Phase 2: Review PR Comments |
| 24 | +After the code review summary, use `AskUserQuestion` to ask whether to proceed with finalization: |
27 | 25 |
|
28 | | -Check whether a PR exists for the current branch: |
| 26 | +- **Proceed** — continue to Phase 3 |
| 27 | +- **Skip** — stop here, leave changes as-is for manual review |
29 | 28 |
|
30 | | -```bash |
31 | | -gh pr view --json number,title,url 2>/dev/null |
32 | | -``` |
33 | | - |
34 | | -- **PR exists**: Run the `/fetch-pr-comments` skill to fetch and display unresolved review threads. Retain the output for evaluation in Phase 3. |
35 | | -- **No PR exists**: Note that no PR was found and proceed to Phase 3 with only the codex review output. |
36 | | - |
37 | | -## Phase 3: Evaluate Findings |
38 | | - |
39 | | -Run the `/evaluate-findings` skill on the combined output from Phases 1 and 2. |
40 | | - |
41 | | -If both phases produced zero actionable findings, report that the branch looks clean and skip to the end. |
42 | | - |
43 | | -## Phase 4: Confirm Implementation |
44 | | - |
45 | | -After the evaluate-findings summary, use `AskUserQuestion` to ask whether to proceed with finishing the implementation: |
46 | | - |
47 | | -- **Proceed** -- continue to Phase 5 |
48 | | -- **Skip** -- stop here, leave changes as-is for manual review |
49 | | - |
50 | | -## Phase 5: Finalize Implementation |
| 29 | +## Phase 3: Finalize Implementation |
51 | 30 |
|
52 | 31 | Run the `/finalize` skill. |
53 | 32 |
|
54 | 33 | ## Rules |
55 | 34 |
|
56 | | -- If the peer review tool is not available or returns malformed output, report the error and stop. |
57 | 35 | - If any phase fails, run the `/investigate` skill to diagnose the failure, apply the suggested fix, and retry. If investigation cannot identify a root cause, stop and report with investigation findings. Do not skip ahead. |
58 | | -- Process findings in file order to minimize context switching. |
0 commit comments