recipe-review

GitHub

用于实施后质量保证,审查代码合规性、范围经济性及安全性,并通过子代理执行修复与重新验证。

skills/recipe-review/SKILL.md shinpr/claude-code-workflows

触发场景

需要审查已完成的实现以确保持久质量 发现设计文档过时或代码存在安全/合规问题

安装

npx skills add shinpr/claude-code-workflows --skill recipe-review -g -y
更多选项

不安装直接使用

npx skills use shinpr/claude-code-workflows@recipe-review

指定 Agent (Claude Code)

npx skills add shinpr/claude-code-workflows --skill recipe-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add shinpr/claude-code-workflows --all -g -y

预览 repo 内 skill

npx skills add shinpr/claude-code-workflows --list

SKILL.md

Frontmatter
{
    "name": "recipe-review",
    "description": "Reviews completed implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved corrections.",
    "disable-model-invocation": true
}

Explicit User Instruction: The user explicitly instructs and authorizes every subagent call named in this recipe. Execute each applicable call when its prerequisites are met.

Execute Skill: llm-friendly-context before writing Agent prompts, handoffs, or generated artifacts. Execute Skill: subagents-orchestration-guide before making workflow decisions, invoking agents, or resolving findings.

Context: Post-implementation quality assurance

Orchestrator Definition

Core Identity: "I am an orchestrator."

Local authority gate: Make this recipe's workflow decisions and validate each returned result directly; delegate semantic deliverable production to the named specialist.

Review Resolution Gate [MANDATORY]: Resolve every actionable deliverable-review finding through subagents-orchestration-guide Review Resolution before correction or progression. Before the first finding disposition, read references/review-resolution.md from the loaded subagents-orchestration-guide skill.

Execution Gate: Complete Steps 1-10 in order, following only the branches activated by their stated conditions. Advance through each review, correction, and re-validation transition only at its declared convergence condition. Present the final report after every applicable finding and retained quality limitation reaches its required disposition or retry result.

Execution Method

  • Implementation review → performed by code-reviewer
  • Security validation → performed by security-reviewer
  • Code-side fix path: Fix implementation → task-executor; Quality checks → quality-fixer; Re-validation → code-reviewer / security-reviewer
  • Design-side update path: DD revision → technical-designer (update mode); DD review → document-reviewer; cross-DD consistency → design-sync (when multiple DDs exist); Re-validation → code-reviewer

Orchestrator invokes sub-agents and passes structured JSON between them. The design-side path applies when the Design Doc is stale, excessive, or incorrect for the required outcome. Neither path makes the existing implementation or the prior design authoritative by default.

At each Agent invocation below, build the prompt as a mechanical extraction: copy the named source values into the exact fields, apply only the declared serialization, then invoke immediately.

Design Doc: $ARGUMENTS

Execution Flow

Step 1: Prerequisite Check

Derive implementationFiles from paths changed between the current branch's merge base with the repository's default branch and the current repository state, including committed changes, working-tree changes, and untracked files. implementationFiles contains each changed path whose contents implement or verify the reviewed behavior or control its schema, build, deployment, or runtime behavior, including source files, tests, migrations, executable scripts, and behavior-affecting configuration. Governing documents and Work Plans retain their dedicated roles in document selection and governing-document inputs; task files and documentation-only paths remain outside this recipe's code and security review inputs.

Use the Design Doc explicitly supplied in $ARGUMENTS. When omitted, first use a Work Plan whose declared target files or responsibilities intersect implementationFiles and take its recorded Design Doc path. When that does not produce one candidate, use the sole Design Doc under docs/design/. Present candidates only when multiple governing Design Docs remain; report a missing prerequisite when none exists.

Step 2: Execute code-reviewer

Invoke code-reviewer using Agent tool:

  • subagent_type: "dev-workflows:code-reviewer"
  • description: "Completed implementation review"
  • prompt: "Review the completed implementation. governingDocuments: [{"type":"design-doc","path":"[path]"}]. implementationFiles: [implementationFiles]. Return the initial review JSON."

Store output as: $STEP_2_OUTPUT

Step 3: Execute security-reviewer

Invoke security-reviewer using Agent tool:

  • subagent_type: "dev-workflows:security-reviewer"
  • description: "Security review"
  • prompt: "governingDocuments: [{"type":"design-doc","path":"[path]"}]. implementationFiles: [implementationFiles]. Review security compliance."

Store output as: $STEP_3_OUTPUT

Step 4: Verdict and Response

When either reviewer returns a blocked or otherwise unusable result, apply subagents-orchestration-guide Specialist Result Acceptance to its semantic cause. Carry only a remaining verification limitation into the report.

Apply the Review Resolution Gate to both outputs before reporting or routing them. Finding dispositions determine routing.

For each apply finding, compute a proposed route using the rule below. A finding takes one route, or both d and c when a selected reduction removes a design statement and the implementation it authorized:

Finding pattern Recommended route
Resolution keeps the current implementation because it matches the original requirement and corrects a stale Design Doc d (Design-side update)
Resolution requires changing implementation to reach the accepted state c (Code-side correction)
Resolution removes a mechanism the Design Doc selected that the required outcome does not need d and c (design statement first)

Then present the adjudicated result to the user. Group apply findings by proposed route and list declined IDs with their reasons:

Implementation Review: [verdict from code-reviewer]
  Acceptance Criteria:
  - [fulfilled] [item]: [evidence]
  - [unfulfilled] [item] -> [corresponding finding ID under Required Corrections]
  Required Corrections:
  - [id] [category] [location]: [description] — [basis and effect] [recommended: c | d | d and c]
  Limitations:
  - [unverified judgment and effect]

Security Review: [status from security-reviewer]
  Findings by category:
  - [confirmed_risk] [location]: [description] — [rationale] [recommended: c]
  - [defense_gap] [location]: [description] — [rationale] [recommended: c]

Approve the proposed changes:
  c) Code-side correction — change implementation to reach the accepted state
  d) Design-side update   — correct a stale, excessive, or incorrect Design Doc
  d and c) Reduction     — delete the selecting design statement, then remove the implementation it authorized
  s) Decline              — record the governing reason and accept current state

This review command authorizes analysis; use AskUserQuestion to obtain separate implementation authority. The batch option is "approve all proposed apply routes" and its scope consists exclusively of those routes. When the approved change set is empty, proceed directly to Step 10.

Pass approved findings, routes, covered files/sections, and any stated total size budget to update or fix agents. Before re-validation, map every diff hunk to an approved finding or required consistency update. Remove accidental unmapped changes; when a necessary change would alter a confirmed value boundary or explicit size constraint, return to Requirement Change Detection.

Step 5: Design-Side Update

Run this step only when the user routed at least one finding to d. When no d routes exist, skip it; continue to Step 6 only when approved c routes remain.

  1. Invoke technical-designer in update mode using Agent tool:

    • subagent_type: "dev-workflows:technical-designer"
    • description: "Design Doc update from review findings"
    • prompt: "Update Design Doc at [path] in update mode. Apply these findings to the design: [complete d-routed finding objects from $STEP_2_OUTPUT, unchanged except for their approved routes]. Where a finding accepts the current code, reflect that behavior in the relevant sections; where it removes an unnecessary mechanism, delete the statements that selected it. Add a history entry."
  2. Invoke document-reviewer to verify the updated Design Doc:

    • subagent_type: "dev-workflows:document-reviewer"
    • description: "Document review of updated Design Doc"
    • prompt: "Review updated Design Doc at [path] for consistency and completeness. doc_type: DesignDoc. review_context: update."
    • Run the Review Resolution Gate through its correction re-review and convergence transitions, using technical-designer for rerouted corrections. Proceed only at its convergence condition.
  3. When more than one Design Doc exists under docs/design/, invoke design-sync:

    • subagent_type: "dev-workflows:design-sync"
    • description: "Cross-DD consistency check"
    • prompt: "source_design: [updated DD path]"
    • When sync_status: CONFLICTS_FOUND, apply the Review Resolution Gate and follow its bounded verifier handoff and convergence rules.
  4. After Step 5 completes:

    • If the user selected d for all findings (no c routes) → skip Steps 6-7, proceed to Step 8 for re-validation
    • If the user selected both d and c → re-evaluate the c-routed findings against the updated DD and drop any that are now satisfied by the DD revision; a reduction's code removal is not satisfied by the DD revision alone. Then proceed to Step 6 with the remaining c findings

Step 6: Execute Fixes

Invoke task-executor using Agent tool:

  • subagent_type: "dev-workflows:task-executor"
  • description: "Execute review fixes"
  • direct_scope: Apply the approved code-side corrections within the confirmed review scope and stated total size budget
  • governing_sources: The reviewed Design Doc and accepted requirement or ADR paths
  • target_paths: The implementation and test paths confirmed for the approved code-side routes
  • observable_verification: The focused tests or observable contract checks named by the findings and governing sources pass
  • correction_findings: Complete reviewer finding objects verbatim, with only their orchestrator dispositions added

Step 7: Quality Check

Invoke quality-fixer using Agent tool:

  • subagent_type: "dev-workflows:quality-fixer"
  • description: "Quality gate check"
  • Copy Step 6 direct_scope, governing_sources, observable_verification, and correction_findings inputs unchanged.
  • Pass Step 6 mutationEvidence.

Route the quality-fixer result:

  • pass → Proceed to Step 8
  • stub_detected → Return to Step 6 with incompleteImplementations unchanged, then repeat Step 7
  • verification_incomplete → Retain the complete result and proceed to Step 8
  • blocked → Apply Specialist Result Acceptance

Step 8: Re-validate code-reviewer

Immediately before this invocation, re-derive implementationFiles using the Step 1 inclusion rule so it includes implementation artifacts added or changed by the approved corrections.

Invoke code-reviewer using Agent tool:

  • subagent_type: "dev-workflows:code-reviewer"
  • description: "Re-validate implementation review"
  • prompt: "Re-review the completed implementation after approved corrections. governingDocuments: [{"type":"design-doc","path":"[path]"}]. implementationFiles: [implementationFiles]. prior_feedback: [{id, disposition, reason?, evidence}]. Reconcile every received item."

Step 9: Re-validate security-reviewer

Immediately before this invocation, re-derive implementationFiles using the Step 1 inclusion rule so it includes implementation artifacts added or changed by the approved corrections.

Invoke security-reviewer using Agent tool when subagents-orchestration-guide's post-implementation Re-run rule requires a current security result:

  • subagent_type: "dev-workflows:security-reviewer"
  • description: "Re-validate security"
  • prompt: "Re-validate security after fixes. governingDocuments: [{"type":"design-doc","path":"[path]"}]. implementationFiles: [implementationFiles]. prior_feedback: [{id, disposition, reason?, evidence}]. Reconcile every prior item under the reviewer's re-review scope."

Apply the Review Resolution Gate to every Step 8 and Step 9 result before Step 10. Follow its maintained transitions and repeat the affected verification after a rerouted correction; apply the parent requirement or authority gate when Review Resolution exits to it; proceed at its convergence condition.

Before Step 10, retry each retained quality-fixer limitation once with the same Step 7 inputs and affected check. When the retry returns pass, remove that limitation from retained state. Route newly discovered incomplete implementation through Steps 6-9, and report a repeated verification_incomplete result. When the retry changes the repository, repeat Steps 8-9 for the changed code before reporting.

Step 10: Final Report

Present the final report:

Implementation Review:
  Initial: [verdict from code-reviewer]
  Correction review: [verdict for the re-review scope] (if fixes executed)
  Reconciliation: [resolved / withdrawn / maintained by finding ID]

Security Review:
  Initial: [status]
  Correction review: [status for the re-review scope] (if fixes executed)
  Reconciliation: [resolved / withdrawn / maintained by finding ID]

Quality Check:
  Final: [pass / verification_incomplete / not_run when no code-side fixes were selected]

Remaining proof limitations:
- [reason — affected check and evidence] (only when repeated after retry)

Declined actionable findings:
- [ID: governing reason — evidence] (only when any were declined)

Remaining issues:
- [items requiring manual intervention]

Scope: Completed implementation review, security review, and user-approved correction routing.

版本历史

  • d479be0 当前 2026-09-22 04:09

    分离技术手段的审批权;限制修正范围至已批准领域,减少分析器提示表面,同步插件副本。

  • 6d58447 2026-09-08 22:31

    对齐工作流验证和直接范围QA合同

  • 7b95bcd 2026-08-28 00:57

    新增基于仓库上下文的实现审查功能

  • e245981 2026-08-19 14:39

    移除了对 task 工具工作流的依赖

  • 416af89 2026-08-12 16:42

    重构审查范围契约,对齐基于证据的工作流模型,移除无实际约束力的工作生成限制及未使用字段。

  • 0d96a63 2026-08-05 22:08

    简化质量变更审查流程,关闭工作流契约缺口,收敛基于证据的设计决策。

  • 51b7dbc 2026-08-05 01:49

    重构简化规划流程;强制实施以结果为导向的编排机制;新增基于证据的审查决议功能,增加本地权限门控及详细报告要求。

  • d439b50 2026-07-31 02:56

    重构了工作流提示词以最小化复杂度,绑定批准范围至已完成的差异,并关闭工作流提示词契约,最终定稿 Opus 5 工作流提示词审查逻辑。

  • 66e3b29 2026-07-05 12:02

同 Skill 集合

dev-skills/skills/ai-development-guide/SKILL.md
dev-skills/skills/coding-principles/SKILL.md
dev-skills/skills/documentation-criteria/SKILL.md
dev-skills/skills/external-resource-context/SKILL.md
dev-skills/skills/frontend-ai-guide/SKILL.md
dev-skills/skills/implementation-approach/SKILL.md
dev-skills/skills/integration-e2e-testing/SKILL.md
dev-skills/skills/llm-friendly-context/SKILL.md
dev-skills/skills/requirement-convergence/SKILL.md
dev-skills/skills/test-implement/SKILL.md
dev-skills/skills/testing-principles/SKILL.md
dev-skills/skills/typescript-rules/SKILL.md
dev-workflows-frontend/skills/ai-development-guide/SKILL.md
dev-workflows-frontend/skills/coding-principles/SKILL.md
dev-workflows-frontend/skills/documentation-criteria/SKILL.md
dev-workflows-frontend/skills/external-resource-context/SKILL.md
dev-workflows-frontend/skills/frontend-ai-guide/SKILL.md
dev-workflows-frontend/skills/implementation-approach/SKILL.md
dev-workflows-frontend/skills/integration-e2e-testing/SKILL.md
dev-workflows-frontend/skills/llm-friendly-context/SKILL.md
dev-workflows-frontend/skills/recipe-diagnose/SKILL.md
dev-workflows-frontend/skills/recipe-front-adjust/SKILL.md
dev-workflows-frontend/skills/recipe-front-build/SKILL.md
dev-workflows-frontend/skills/recipe-front-design/SKILL.md
dev-workflows-frontend/skills/recipe-front-plan/SKILL.md
dev-workflows-frontend/skills/recipe-front-review/SKILL.md
dev-workflows-frontend/skills/recipe-quality-profile/SKILL.md
dev-workflows-frontend/skills/recipe-task/SKILL.md
dev-workflows-frontend/skills/recipe-update-doc/SKILL.md
dev-workflows-frontend/skills/requirement-convergence/SKILL.md
dev-workflows-frontend/skills/subagents-orchestration-guide/SKILL.md
dev-workflows-frontend/skills/task-analyzer/SKILL.md
dev-workflows-frontend/skills/test-implement/SKILL.md
dev-workflows-frontend/skills/testing-principles/SKILL.md
dev-workflows-frontend/skills/typescript-rules/SKILL.md
dev-workflows-fullstack/skills/ai-development-guide/SKILL.md
dev-workflows-fullstack/skills/coding-principles/SKILL.md
dev-workflows-fullstack/skills/documentation-criteria/SKILL.md
dev-workflows-fullstack/skills/external-resource-context/SKILL.md
dev-workflows-fullstack/skills/frontend-ai-guide/SKILL.md
dev-workflows-fullstack/skills/implementation-approach/SKILL.md
dev-workflows-fullstack/skills/integration-e2e-testing/SKILL.md
dev-workflows-fullstack/skills/llm-friendly-context/SKILL.md
dev-workflows-fullstack/skills/recipe-add-integration-tests/SKILL.md
dev-workflows-fullstack/skills/recipe-build/SKILL.md
dev-workflows-fullstack/skills/recipe-design/SKILL.md
dev-workflows-fullstack/skills/recipe-diagnose/SKILL.md
dev-workflows-fullstack/skills/recipe-front-adjust/SKILL.md
dev-workflows-fullstack/skills/recipe-front-build/SKILL.md
dev-workflows-fullstack/skills/recipe-front-design/SKILL.md

元信息

文件数
0
版本
0caac06
Hash
730ffd1b
收录时间
2026-07-05 12:02

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-16 06:40
浙ICP备14020137号-1