协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
senior-review【开发与工程】Pragmatic senior developer code review -- evaluates code quality, risks, and conventions through a team lead lens. Standalone or integrated into /review pipeline.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
!`git rev-parse --is-inside-work-tree 2>/dev/null || echo "NO_GIT"`
!`git branch --show-current 2>/dev/null || echo "NO_GIT"`
!`git log --oneline -10 2>/dev/null || echo "NO_COMMITS"`
Run a pragmatic senior developer code review -- evaluating structural decisions, code quality, risk areas, and language conventions through a team lead lens.
Announce: "Using the senior-review skill for a pragmatic code review."
If any gather-context block above returned NO_GIT, this directory is not a git repository.
Print: > No git repository detected. /senior-review requires a git repo.
Stop here.
If $ARGUMENTS is empty AND there is no conversation context about what to review (no prior diff discussion, no files mentioned), print:
Usage:
/senior-review [--quick] [#PR_NUMBER | PR_URL]Options:
--quick-- Single-pass review (faster, same quality bar)#123or PR URL -- Review a specific pull request- No arguments -- Prompted to select diff source
Stop here.
If $ARGUMENTS is empty but conversation context exists (e.g., user was just discussing a diff), proceed -- use the contextual diff.
Parse $ARGUMENTS:
--quick --> set mode to quick, remove flag from remaining arguments#NNN (hash + digits) --> set source to pr, extract PR numberpr, extract URLIf source was set from Step 1 (PR number or URL), skip to Step 3.
If source is unset, infer from context: "this"/"my changes"/"just made" --> uncommitted; "branch"/"vs main" --> branch. If clear, skip prompt.
Only if intent cannot be inferred, use AskUserQuestion:
What would you like me to review?
Buttons:
uncommittedbranchpr (will prompt for PR number)If user selects "Pull Request" and no PR number was provided, ask:
Enter the PR number or URL:
| Source | Command | Notes |
|---|---|---|
uncommitted | git diff + git diff --staged | Combine both; stop if both empty: "No uncommitted changes found." |
branch | git rev-parse --verify main then git diff main...HEAD | Fall back to master if main missing; stop if empty: "No changes found between current branch and base branch." |
pr | gh pr diff <pr_number_or_url> via Bash tool (not ! block) | Stop if gh fails: "Could not fetch PR diff. Ensure gh CLI is installed and authenticated." |
Also gather the file list: git diff --name-only main...HEAD (for PR source, use gh pr diff --name-only or parse diff headers).
Language detection is handled by the senior-reviewer agent.
If mode is quick, skip this step entirely.
For the detected primary language, query context7 for current conventions. One query, primary language only. Skip if quick mode or context7 unavailable.
Dispatch quiver:senior-reviewer with the following context (in this order):
full or quick.Do NOT pass pipeline context. This is standalone mode -- Phase 5 (meta-review) must not activate.
Present the agent's findings in the terminal.
After presenting findings, use AskUserQuestion:
Review complete. What would you like to do?
Buttons:
.claude/reports/senior-review-{timestamp}.md (use date '+%Y-%m-%d_%H-%M-%S' format). Confirm with: > Report saved to {path}