|
| 1 | +--- |
| 2 | +description: Finish a task by running local gates, CodeRabbit review, a fix-review loop, and PR preparation. |
| 3 | +--- |
| 4 | + |
| 5 | +// turbo-all |
| 6 | + |
| 7 | +Use this workflow before final completion of code-changing tasks, and when the user asks to finish, ship, run CodeRabbit, start a review loop, or make a PR. |
| 8 | + |
| 9 | +1. Inspect the current branch and dirty tree: |
| 10 | + git status --short --branch |
| 11 | + |
| 12 | +2. Keep all work on the current branch unless the user explicitly approves creating or switching branches. If the current branch is main or master and a PR is required, pause for branch approval before committing. Never stash. Do not discard unrelated edits. |
| 13 | + |
| 14 | +3. Identify the files owned by the current task. If unrelated dirty edits exist, exclude them from staging, commits, and review scope. If the task changes cannot be isolated cleanly, ask before continuing. |
| 15 | + |
| 16 | +4. Run the relevant local gates for the changed surface: |
| 17 | + just verify-specs |
| 18 | + just verify-agents |
| 19 | + pnpm smoke |
| 20 | + pnpm -r build |
| 21 | + cargo check -p <crate> --all-targets |
| 22 | + |
| 23 | +5. If contracts changed, run: |
| 24 | + cargo run -p actant-contracts -- check-compat |
| 25 | + cargo run -p actant-contracts -- codegen-ts |
| 26 | + |
| 27 | +6. If code changed and graphify-out/graph.json exists, run: |
| 28 | + graphify update . |
| 29 | + |
| 30 | +7. Verify CodeRabbit is installed and authenticated: |
| 31 | + coderabbit --version |
| 32 | + coderabbit auth status --agent |
| 33 | + |
| 34 | +8. Run CodeRabbit with repository guidance only after the user has asked for this finish/review/PR workflow. If the task-owned files can be committed without including unrelated dirty edits, commit those files by explicit path first, then review the committed diff: |
| 35 | + coderabbit review --agent -c AGENTS.md -t committed |
| 36 | + |
| 37 | + If the task-owned files must remain uncommitted, use uncommitted mode with explicit scoping so unrelated dirty edits are not reviewed: |
| 38 | + coderabbit review --agent -c AGENTS.md -t uncommitted |
| 39 | + |
| 40 | + If the worktree has no uncommitted changes and the branch has local commits to review, also use: |
| 41 | + coderabbit review --agent -c AGENTS.md -t committed |
| 42 | + |
| 43 | + When using uncommitted mode in a dirty worktree, add CodeRabbit scoping flags such as: |
| 44 | + coderabbit review --agent -c AGENTS.md -t uncommitted --dir .codex |
| 45 | + |
| 46 | +9. Parse CodeRabbit NDJSON findings by severity. Fix every actionable issue in the current branch, then rerun the relevant local gates. |
| 47 | + |
| 48 | +10. Repeat the CodeRabbit review and fix cycle until CodeRabbit raises 0 actionable issues, or until the remaining issues are non-actionable and the user agrees to carry them. |
| 49 | + |
| 50 | +11. Stage files by explicit path, commit the finished work, and prepare a PR summary with: |
| 51 | + - What changed |
| 52 | + - Local gates run |
| 53 | + - CodeRabbit review result |
| 54 | + |
| 55 | +12. Pause for explicit approval before pushing or opening the PR. After approval, push the current branch and create the PR with gh. |
0 commit comments