review
Mandatory outside review of high-risk work units, by lens agents the hooks feed and record, plus the dual blind review on request. Trigger: a unit whose Risk names an item is ready to publish, the publication gate denied a push, PR, or release, or the user asks for a review, a dual review, or an adversarial review.
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- review
- license
- MIT
- metadata
- { "author": "Construct", "version": "2.0" }
- description
- Mandatory outside review of high-risk work units, by lens agents the hooks feed and record, plus the dual blind review on request. Trigger: a unit whose Risk names an item is ready to publish, the publication gate denied a push, PR, or release, or the user asks for a review, a dual review, or an adversarial review.
- allowed-tools
- Bash(node "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/skill-context.mjs" *)
- user-invocable
- false
02 资源文件 2
- 参考文档references/dual-review.md3.5 KB
- 参考文档references/security-checklist.md2.1 KB
03 SKILL.md 正文
Current state
!node "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/skill-context.mjs" review
When
Run this when a unit whose Risk names an item is ready, when publication-gate blocked a git push, gh pr create, or gh release create, and also whenever the user requests one. A unit with Risk none is not reviewed unless the user asks. For a dual or adversarial review of a concrete target, or a check of a plan or claim, see dual review; it replaces the lens review for that target, never both.
Which lenses
The required lenses are the union of the rows for every Risk item in the feature documents the branch changed (publication-gate reads the Risk column of the Tasks tables) and in the risk floor: items the gate adds from the diff paths (migrations and *.sql 1; auth, secrets, .env* 2; lockfiles, CI workflows, Dockerfile, install.sh 5, plus the globs of .vault/risk-paths/ at the merge-base and the default branch tip). A lower declared Risk, or none, does not remove them.
| Risk item | Lenses |
|---|---|
| 1 | review-risk, review-resilience |
| 2 | review-risk |
| 3 | review-reliability |
| 4 | review-reliability, review-resilience |
| 5 | review-risk, review-resilience |
| 6 | review-reliability |
review-readability is opt-in: launch it only when the user asks, and it never gates publication. The agents are construct:review-risk, construct:review-reliability, construct:review-resilience, and construct:review-readability.
Run it
- Run the project's formatters first, then review; no commit is needed. The head under review is a snapshot of the working tree (tracked and untracked, not ignored), so any later edit is a new subject. A commit with exactly the reviewed content keeps the approval.
- Find the base: the merge-base of
HEADwith the default branch. The gate's denial prints it. - Launch every required lens in parallel with the
Agenttool. Each prompt holds exactly one line,Review subject: <base>, and nothing else is needed. - Wait for all of them, read each verdict, and fix what a lens rejected (see Verdicts).
What the hooks do
review-context(PreToolUse onAgent) replaces the lens prompt with the evidence: the binding, changed-path manifest, name-status, numstat, one patch per path (a deleted path, or a vendored file listed with its sha256 inreview-context.mjswhose content in the head tree matches that pin, gets a marker instead of its content; any other path, a new file undervendor/included, keeps its full diff), the branch's## Specs(quoted evidence) and the locked oracles the diff touches, and forreview-riskthe security checklist. It records the lens as pending. It denies a prompt with no subject line, a range containing.., a base starting with-, a ref that does not resolve, and two equal trees. It denies a context over 400 KB: split the delivery into smaller pull requests.review-capture(SubagentStop) checks the lens reply against the binding and writes the verdict. An invalid reply is blocked with the reason, and the lens resends only the corrected complete JSON, at most twice; then the pending record is cleared and no verdict exists, so launch the lens again. A reply naming no pending subject is ignored unless the session has exactly one pending record of that lens.review-store-guarddenies Write, Edit, and Bash commands that touch the review store or run the review hooks. Lenses never write evidence or verdicts, and neither do you.publication-gate(PreToolUse on Bash) reads the verdicts at publication. It names the missing lenses, the subject line, and this skill in its denial.
Verdicts
- Approved: the inspection completed and no finding is BLOCKER or CRITICAL. WARNING and SUGGESTION still approve.
- Rejected: any BLOCKER or CRITICAL. A rejection stands for that lens and that tree and is never replaced by an approval. Fix with a new commit through
construct:worker, with the finding locations as the spec, then review again. Never resubmit the same subject. - Incomplete: the lens could not inspect everything and says why in
evidence. No verdict is recorded; launch the lens again.
Approval is necessary, never sufficient: commit, push, PR, and merge stay the user's decisions.
Follow-ups and memory
A finding outside the specs is a follow-up, except security and correctness defects. Advisory findings (WARNING, SUGGESTION) become follow-up rows in the feature document. Save a deferred advisory as a decision and a rejection's root cause as a bugfix with mem_save.
Report
Give the subject line, each lens with its verdict, the blocking findings, and the follow-ups.
04 同仓库更多 Skills
workflow
The ADD protocol for every implementation request, feature plan, resume, task sizing, and the closing Risk line.
sources
Ground version-dependent code in official documentation. Use when you name a specific uncertainty about a library or framework API, a version-dependent pattern, or a deprecation. Skip when the repository already shows the pattern.
migration
Plan and verify risky migrations and removals. Use when changing a schema or stored data, removing or renaming a public API, flag, config format, or export, replacing a system, or when the task's Risk names item 1 or 3.
delivery
Plan commits, branches, and pull requests as reviewable units. Use when deciding commit contents, opening or preparing a PR, splitting large work into sub-branches of a feature branch, or preparing a release.
delegation
When and how the ADD orchestrator delegates to construct agents: role mapping, allowed edit surfaces, parallel writers, verifier timing, handoff prompts, and relaying a subagent's blocking question or choice menu. Trigger: deciding to delegate, launching an agent, writing a handoff, or a subagent or tool returns a question, menu, or consent request.
debugging
Root-cause debugging for failures and unexpected behavior: stop the line, reproduce, localize, reduce, fix the cause, guard with a RED-first regression test, resume only after the verifier passes. Trigger: failing tests, broken build, a regression, an error or stack trace, or behavior that differs from what was expected. Load it before diagnosing.