协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
code-review【开发与工程】Use after completing implementation steps and before merging — reviews against plan and HOTL contracts.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
User-facing entry point for getting a code review. Dispatches the full code-reviewer agent by default; falls back to inline review when subagents aren't available.
Resolve base branch (fallback ladder — use the first that succeeds):
gh pr view --json baseRefNamegit symbolic-ref refs/remotes/origin/HEADmainmasterResolve review scope:
base...HEAD), plus staged and unstaged local changes when presentHEAD~1..HEADDetect workflow file:
docs/plans/*-workflow.mdhotl-workflow-*.md in project rootExtract contracts from workflow frontmatter if available (intent, constraints, success_criteria, risk_level).
Gather verification evidence:
.hotl/state/*.json and .hotl/reports/*.md — most recent artifacts if presentIf subagents are available (Claude Code, Codex):
Dispatch the code-reviewer role as a subagent via the Agent tool. Use the structured dispatch template from requesting-code-review:
directIf subagents are not available (Cline, weaker runtimes):
Run inline review in the current session using the same output contract. See "Inline Fallback" below.
receiving-code-reviewreceiving-code-reviewDirect reviews use the final-review verdict model:
code-review = user-facing entry point for getting a review
requesting-code-review = internal executor/orchestration entry point
receiving-code-review = follow-up handler for acting on findings
Both dispatched and inline reviews must conform to docs/contracts/code-review-output.md. Every review must contain these 6 sections in order: Scope (with verification evidence), Reviewed Dimensions, Findings, What Was Not Covered, Residual Risks, Verdict.
When the platform emits platform-native annotations for localized findings (e.g., ::code-comment in Codex, inline GitHub review comments), do not restate those findings verbatim in the Findings section. Instead, use the grouped one-liner format defined in the output contract.
When subagents are not available, run the review inline using the same output contract. The inline review must produce identical 6-section structure — not a weaker format.
Plan alignment (when workflow provided):
When no workflow: state "Plan alignment: skipped (no workflow provided)"
Code quality and design:
docs/checklists/architecture-and-design.md for SOLID and architecture smell heuristics. If the checklist file is not available, continue with best-effort review.Security and reliability:
docs/checklists/security-and-reliability.md for expanded security heuristics.Performance and boundary conditions:
docs/checklists/performance-and-boundary-conditions.md for performance and boundary condition heuristics.Removal and simplification:
docs/checklists/removal-and-simplification.md for dead code and simplification heuristics.HOTL governance:
Every finding must include:
- [SEVERITY]: file/path:line — description
Why: [why this matters]
Fix: [expected remediation direction]
For localized issues: file:line is required. For scope-level findings: provide the narrowest evidence available.
BLOCK issues must be resolved before claiming done.
Per the output contract, when a dimension has no findings it must still state what was checked, what was not covered, and residual risks. Additionally, the review must always include sections 4 (What Was Not Covered) and 5 (Residual Risks) even when no individual dimension has findings.