一键导入
adversarial-review-lenses
Use when a reviewer agent must produce an adversarial verdict via 4 independent lenses and weighted synthesis (Genesis A7 pattern)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when a reviewer agent must produce an adversarial verdict via 4 independent lenses and weighted synthesis (Genesis A7 pattern)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | adversarial-review-lenses |
| description | Use when a reviewer agent must produce an adversarial verdict via 4 independent lenses and weighted synthesis (Genesis A7 pattern) |
Reviewer agents use this procedure to produce an independent, defensible verdict on a phase artifact. Pattern derived from Genesis Step 7 (Adversarial Review).
Every SKRAFT phase reviewer (backlog-discoverer-reviewer, backlog-planner-reviewer, solution-architect-reviewer, acceptance-designer-reviewer, software-engineer-reviewer) invokes this skill once per review pass, after reading the upstream phase artifact(s) and the relevant *-review-criteria skill.
The number of lenses actually executed is governed by the repo-wide depth tier (held in skraft-config.json; read with config.mjs get --key depthTier, or taken from the orchestrator's dispatch payload):
| Depth tier | Lenses required |
|---|---|
basic | 1 (Completeness only) |
standard | 2 (Completeness + Business Fit) |
comprehensive (default) | 4 (all lenses) |
custom | as configured in userPreferences.customDepth.reviewerLenses, minimum 1 |
Each lens is executed in isolation. The reviewer must not let observations from one lens influence another. Run them in this order, recording each lens's findings independently before computing the synthesis.
Does the artifact cover every input that fed into the phase?
*-review-criteria skill all present and non-empty?Output: a list of completeness findings, each tagged MISSING, THIN, or OK.
Does the artifact correctly reflect the business intent?
business-lexicon.instructions.md when present).Output: a list of business-fit findings, each tagged MISALIGNED, AMBIGUOUS, or OK.
Is the artifact internally consistent and well-structured?
Output: a list of quality findings, each tagged BROKEN, INCONSISTENT, or OK.
What could go wrong downstream because of this artifact?
skraft-difficulty-routing respected (TDD, Clean Architecture boundaries, test integrity, dated paths, reviewers read-only)?Output: a list of risk findings, each tagged INVARIANT_VIOLATION, HIDDEN_COUPLING, AMBIGUOUS_ASSUMPTION, or OK.
While executing a lens, do not consult findings from another lens. Write the lens's findings to its own section in the review file before starting the next lens. If a finding seems to apply to multiple lenses, record it under each lens independently with the appropriate tag — do not merge.
After all required lenses have run, compute the verdict using fixed lens weights:
| Lens | Weight |
|---|---|
| Completeness | 0.30 |
| Business Fit | 0.30 |
| Quality | 0.15 |
| Risk | 0.25 |
Per-lens score in {0, 0.5, 1}:
1.0 — all findings are OK.0.5 — at least one finding is non-OK but none are INVARIANT_VIOLATION or BROKEN.0.0 — at least one finding is INVARIANT_VIOLATION, BROKEN, or MISSING.Weighted sum maps to the verdict:
| Weighted sum | Verdict |
|---|---|
>= 0.85 and no lens scored 0.0 | APPROVED |
>= 0.55 | NEEDS_REWORK |
< 0.55, or any lens scored 0.0 on an invariant | REJECTED |
A single INVARIANT_VIOLATION finding in Lens 4 forces REJECTED regardless of the weighted sum.
Write the review under reviews/{YYYY-MM-DD}/{phase}-{slug}-review.md. Begin the file with <!-- markdownlint-disable-file -->, then the following structure:
<!-- markdownlint-disable-file -->
# {Phase} Review — {slug}
**Verdict:** APPROVED | NEEDS_REWORK | REJECTED
**Depth tier:** basic | standard | comprehensive | custom
**Lenses executed:** N
**Weighted score:** 0.XX
**Reviewed artifacts:** {relative paths}
## Lens 1 — Completeness
- finding 1 [TAG] — short description
- ...
## Lens 2 — Business Fit
- ...
## Lens 3 — Quality
- ...
## Lens 4 — Risk
- ...
## Synthesis
{2–4 sentences explaining the verdict, the dominant lens, and the required next actions if any}
## Required actions before next attempt
- {bulleted list — present only when verdict is NEEDS_REWORK or REJECTED}
The reviewer writes only this file. It never modifies upstream artifacts and never edits state.json — the orchestrator records state.json::verdicts[phase] from the verdict line above via state.mjs record-verdict.
Review artifact location and naming follow the HVE convention documented in .copilot-tracking/reviews/code-reviews/review-artifacts.instructions.md (resolved via the HVE-Core fallback path when the file is absent locally). SKRAFT places its reviews under .copilot-tracking/skraft-plans/{slug}/reviews/{YYYY-MM-DD}/ rather than reviews/code-reviews/, but the metadata schema and verdict normalization are identical.
Use when reviewing DISTILL artefacts (Gherkin scenarios, test plans, implementation plans) for quality, completeness, and alignment. Contains the gate definitions and scoring rubric for the acceptance-designer-reviewer lenses.
Use when reviewing DESIGN artefacts (event models, ADRs, component diagrams, context maps, interface contracts) for quality, DDD compliance, and architectural correctness. Contains gate definitions and scoring rubric for the solution-architect-reviewer lenses.
Use when capturing E2E test evidence (screenshots, videos, traces) and storing them in .copilot-tracking/skraft-plans/{projectSlug}/changes/{date}/evidence/{story}/evidence/ for agents to consume. Covers Playwright setup, on-failure capture, trace collection, and evidence manifest generation.
Use when writing, reviewing, or structuring BDD scenarios in Gherkin format. Covers Given/When/Then conventions, scenario outline patterns, background usage, tag strategies, and domain language alignment. Load before any Gherkin authoring.
Use when designing test coverage matrices, assigning tests to Clean Architecture layers, planning the outside-in implementation order, or applying the Walking Skeleton strategy. Ensures every behaviour is tested at the right level with no redundancy. Load after writing Gherkin scenarios.
Use when completing a TDD phase or before committing — self-discipline checkpoints the software-engineer runs against their own output. Not a review contract. The reviewer verifies artifacts independently.