iterative-review
Use when a human-approved draft-PR review inside a Devin harness needs legacy subagent assistance because the orchestrator is not known to be frontier-capable. Do not use with a harness-designated frontier model (Sol, Astra, Fable, or Opus) or outside a Devin harness.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- iterative-review
- license
- MIT
- metadata
- { "owner": "Harley Bartles", "scope": "Human-approved legacy review assistance for orchestrators not known to be frontier-capable reviewing a draft PR inside a Devin harness.", "status": "active", "use_when": [ "the session runs in a Devin harness.", "the human explicitly approves this workflow for the current PR.", "the orchestrator is non-frontier, or its classification is unknown and the human approves after being told that limitation." ], "source-id": "iterative-review", "source-path": "skills/iterative-review/SKILL.md", "related_skills": [ "requesting-code-review", "receiving-code-review", "handoff-gates", "selecting-a-subagent", "dispatching-parallel-agents" ], "do_not_use_when": [ "the session is not running in a Devin harness; the skill is inert there.", "the orchestrator is a harness-designated frontier model (currently gpt-5.6-sol, gpt-6-astra, claude-fable, or claude-opus) or another model the harness designates as frontier-capable; use ordinary self-review and canonical validation instead.", "Do not start the graph when model capability is unknown or human approval is absent.", "the PR has no changes to review.", "a substitute for the repo's canonical CI preflight." ], "provenance-name": "Iterative Review first-party skill", "source-category": "first_party" }
- description
- Use when a human-approved draft-PR review inside a Devin harness needs legacy subagent assistance because the orchestrator is not known to be frontier-capable. Do not use with a harness-designated frontier model (Sol, Astra, Fable, or Opus) or outside a Devin harness.
02 资源文件 86
- 参考文档agents/openai.yaml591 B
- 脚本assets/hooks/gate_review_paths.py5.3 KB
- 资产文件assets/hooks/hooks.v1.json508 B
- 脚本assets/hooks/record_posttool.py3.8 KB
- 脚本assets/hooks/record_pretool.py3.8 KB
- 参考文档references/authority-discovery-policy.v1.json805 B
- 参考文档references/harness-capability-floor.md12.6 KB
- 参考文档references/hypothesis-derivation-policy.v1.json4.2 KB
- 参考文档references/node-blocked.md1.4 KB
- 参考文档references/node-closeout.md2.7 KB
- 参考文档references/node-fast-fix.md815 B
- 参考文档references/node-final-strong.md3.1 KB
- 参考文档references/node-finding-fix.md3.9 KB
- 参考文档references/node-lens-dispatch.md2.2 KB
- 参考文档references/node-lens-triage.md2.4 KB
- 参考文档references/node-metrics-track.md1.1 KB
- 参考文档references/node-next-node.md1.4 KB
- 参考文档references/node-normalize-inputs.md632 B
- 参考文档references/node-preflight.md1.5 KB
- 参考文档references/node-re-preflight.md1.7 KB
- 参考文档references/node-ready.md1.2 KB
- 参考文档references/node-regression-scan.md2.4 KB
- 参考文档references/node-resolved-ledger.md2.2 KB
- 参考文档references/node-reviewer-fast.md2.1 KB
- 参考文档references/node-reviewer-fixes.md4.7 KB
- 参考文档references/node-scope-honesty.md1.8 KB
- 参考文档references/node-setup.md1.4 KB
- 参考文档references/review-assignment-policy.v1.json2.9 KB
- 参考文档references/review-log-implementer-brief-template.md944 B
- 参考文档references/review-log-resolved-ledger.md299 B
- 参考文档references/review-metrics-schema.json3.7 KB
- 参考文档references/review-state-graph.md19.7 KB
- 参考文档references/review-state-schema.json1.3 KB
- 参考文档references/review-state-v2.schema.json36.2 KB
- 参考文档references/trustworthy-green-invariants.md9.4 KB
- 脚本scripts/check_scope_honesty.py6.0 KB
- 脚本scripts/compile_metrics.py4.2 KB
- 脚本scripts/diff_slicer.py5.5 KB
- 脚本scripts/next_node.py23.1 KB
- 脚本scripts/normalize_review_inputs.py4.1 KB
- 脚本scripts/record_blocker.py4.3 KB
- 脚本scripts/record_finding.py4.1 KB
- 脚本scripts/record_regression.py4.3 KB
- 脚本scripts/record_resolution.py4.4 KB
- 脚本scripts/resolved_ledger.py3.1 KB
- 脚本scripts/review_core/__init__.py227 B
- 脚本scripts/review_core/acquisition.py36.7 KB
- 脚本scripts/review_core/assignment_policy.py13.8 KB
- 脚本scripts/review_core/context_package.py12.5 KB
- 脚本scripts/review_core/discovery_policy.py13.8 KB
- 脚本scripts/review_core/engine.py43.4 KB
- 脚本scripts/review_core/feedback_policy.py9.2 KB
- 脚本scripts/review_core/hypothesis_policy.py6.9 KB
- 脚本scripts/review_core/model.py78.0 KB
- 脚本scripts/review_core/policy.py133.9 KB
- 脚本scripts/review_core/report.py18.0 KB
- 脚本scripts/review_core/store.py20.4 KB
- 脚本scripts/review_core/surfaces.py10.3 KB
- 脚本scripts/review_core/witness_log.py19.2 KB
- 脚本scripts/reviewctl.py30.0 KB
- 脚本scripts/select_lenses.py8.0 KB
- 脚本scripts/start_review.py11.0 KB
- 脚本scripts/update_review_metrics.py1.9 KB
- 脚本tests/behavior/test_iterative_review_entry_gate.py353 B
- 参考文档tests/scripts/fixtures/review-v2-canonical-vectors.json5.4 KB
- 脚本tests/scripts/review_v2_helpers.py114.3 KB
- 脚本tests/scripts/test_compile_metrics.py4.0 KB
- 脚本tests/scripts/test_diff_slicer.py8.5 KB
- 脚本tests/scripts/test_next_node.py10.7 KB
- 脚本tests/scripts/test_record_scripts.py5.2 KB
- 脚本tests/scripts/test_review_acquisition_v2.py54.0 KB
- 脚本tests/scripts/test_review_assignment_policy_v2.py9.1 KB
- 脚本tests/scripts/test_review_context_package_v2.py10.2 KB
- 脚本tests/scripts/test_review_discovery_v2.py15.8 KB
- 脚本tests/scripts/test_review_doctor_v2.py23.8 KB
- 脚本tests/scripts/test_review_hypothesis_policy_v2.py6.2 KB
- 脚本tests/scripts/test_review_invariants_v2.py34.1 KB
- 脚本tests/scripts/test_review_model_v2.py20.7 KB
- 脚本tests/scripts/test_review_outcomes_v2.py21.2 KB
- 脚本tests/scripts/test_review_policy_v2.py58.0 KB
- 脚本tests/scripts/test_review_report_v2.py15.3 KB
- 脚本tests/scripts/test_review_store_v2.py21.1 KB
- 脚本tests/scripts/test_review_surfaces_v2.py6.1 KB
- 脚本tests/scripts/test_review_witness_v2.py20.3 KB
- 脚本tests/scripts/test_reviewctl_v2.py94.3 KB
- 脚本tests/scripts/test_select_lenses.py3.9 KB
03 SKILL.md 正文
Interim boundary
The current version-1 workflow is review assistance, not proof of reviewed green. Version-1 workspaces cannot produce a trustworthy-green seal. The experimental version-2 kernel is not the user entrypoint until the trustworthy-green roadmap reaches cutover.
Version-2 status: on Devin Desktop with the hooks pack installed, reviewctl can freeze and refresh an immutable snapshot through the witnessed two-command acquisition flow (enumerate then complete --acquired, or the freeze / refresh aliases that refuse a stale enumeration). The recall engine is landed: plan-coverage emits the deterministic obligations payload from the impact-map union and package materializes the digest-bound reviewer context package under the scratch store. Live dispatch, frontier, and seal lanes remain unbuilt, and green stays unavailable until the later roadmap plans land.
Provenance
This skill is a first-party skill authored for this repository. It is not derived from an upstream snapshot.
Mandatory entry gate
Run this gate before reading graph recipes, creating review state, dispatching a subagent, or invoking any script in this skill.
- If this session is not running in a Devin harness, stop and do not use this skill. The graph assumes Devin's transcript, subagent, and scratch surfaces; outside them it is inert.
- Determine the orchestrator's effective model classification from trusted harness context. Do not infer strength from marketing language or a profile name.
- If the orchestrator is a harness-designated frontier model (currently
gpt-5.6-sol,gpt-6-astra,claude-fable, orclaude-opus) or another model the harness explicitly designates as frontier-capable, stop and do not use this skill. Perform ordinary whole-change self-review and the repository's canonical validation. - If the orchestrator is non-frontier or its classification is unknown, tell the human that this is the legacy review-assistance graph: it can add useful review coverage, but it is not proof of exhaustive review or trustworthy green. Ask whether they want it used for this PR.
- Continue only after a new affirmative answer for this PR. Silence, prior use on another PR, general autonomy, or merely discovering this skill is not approval. If approval is declined or unavailable, use ordinary self-review and canonical validation instead.
The graph's terminal ready value means only that the legacy sequence completed. It does not authorize a reviewed-green claim or independently authorize moving the PR out of draft.
Quick start after approval
After the entry gate permits use, do not read the whole graph reference before starting. next_node.py constrains graph sequencing, but it does not prove that the review was complete or that every issue was found.
- Identify the PR number.
- From the branch worktree, run:
py -3 <runtime-skill-path-for-iterative-review>/scripts/start_review.py --pr <pr_number> --apply - The script prints the one allowed next node, the recipe file to read, and the command to authorize it.
- Open that one
references/node-<node>.mdfile and follow it. - When the recipe says "next check", run
next_node.pyagain. It will tell you the next node. - Continue until
next_node.pyprintsreadyorblocked. Treatreadyas legacy-loop completion only.
start_review.py performs the setup and normalize-inputs nodes and leaves the graph pointing at preflight.
Iterative Review
Bundled helper paths
Resolve scripts and references under the skill directory supplied by the active runtime. In examples, <runtime-skill-path-for-iterative-review> means that runtime-provided directory. Never infer a consumer .agents/skills/ projection. When the runtime provides no usable location for a helper required by this workflow, stop and report the unavailable helper instead of assuming a consumer copy exists.
Run the legacy review-assistance graph on a draft PR only after the mandatory entry gate permits it.
When to Use
Use only when the current human explicitly approves the legacy graph for a non-frontier or unknown-capability orchestrator. Frontier orchestrators do not use this workflow.
Core Pattern
Follow the review-state-graph.md reference one node at a time, driven by next_node.py. The graph routes the orchestrator through deterministic preflight, scope-honesty, parallel lens-dispatch (which starts with the cheap reviewer-fast pre-lens), lens-triage, fast finding-fix by an implementer for blocking/important lens findings, re-preflight, lens-aware reviewer-fixes, resolved-ledger, conditional regression-scan, and a final reviewer-strong final-strong pass. trivial/deferred findings are left for final-strong instead of forcing an early whole-branch review. Every finding records the node and round that discovered it. There are no fixed "Round N" steps.
Just-in-time reading
Read only the one references/node-<node>.md file that next_node.py tells you to read. The only files to read ahead of time are:
- this
SKILL.md(this file) references/review-state-graph.mdif you want the full map (optional; do not study it before starting)
selecting-a-subagent is used by lens-dispatch and finding-fix nodes; read it when next_node.py sends you there. The relevant reviewer-*.md lens profiles are discovered at lens-dispatch time.
The Devin Desktop agents search path is: user-global ~/.config/devin/agents/ (or %APPDATA%\devin\agents\ on Windows), then .devin/agents/, then .agents/agents/. Discover reviewer-*.md files from that combined path; .devin/agents/ and .agents/agents/ take precedence over user-global.
Following the graph
- Run
start_review.py --pr <pr_number> --applyfrom the branch worktree. It creates the off-repo scratch workspace, materializes the diff and PR context, runsnormalize-inputs, and advancesreview-state.jsontonormalize-inputs. - Run
next_node.pyto discover the single allowed next node:
Capture the first line of output aspy -3 <runtime-skill-path-for-iterative-review>/scripts/next_node.py --state <scratch_dir>/review-state.json<node>. - Open
references/node-<node>.mdand follow that one recipe. - When the recipe says "next check", run
next_node.pyagain. - Validate and advance the router to the discovered node before running its recipe:
py -3 <runtime-skill-path-for-iterative-review>/scripts/next_node.py --propose <node> --state <scratch_dir>/review-state.json - Stop when
next_node.pyprintsreadyorblocked; neither value proves exhaustive review, andreadydoes not itself authorize a green claim.
Recording review-metrics.json
At every metrics-track and at ready, resolved-ledger, or blocked, write or update review-metrics.json in the off-repo scratch. The schema is in references/review-metrics-schema.json. This file is evidence for:
- Fast catch:
findings_by_node.preflightshould dominate. - Early catch: most lens/strong findings should appear at low
discovered_at_roundvalues. - No sloppy fixes:
regressionsshould be low relative torounds_per_finding. - Tunable regressions: the
regression_classdistribution tells us whether late findings are due to weak lens review (outside-blast-radius), shoddy same-lens fixes (same-lens-blast-radius), or cross-cutting regressions (cross-lens-blast-radius).
For every post-fix finding, set regression_class from the decision table in the design spec (## Concrete regression_class assignment). Also set regression_of on the rounds_per_finding entry for the new finding.
Inputs the orchestrator must provide
<base>and<branch>(or<head_sha>)<pr_number>or<pr_description>
Invariants
- Follow the graph in
references/review-state-graph.md. Do not follow a round list. - Read only the
node-<node>.mdfile named bynext_node.py. Do not read ahead. - The
final-strongpass is reachable only throughlens-triageor after allblocking/importantfindings are resolved; there is no edge fromsetup,preflight,fast-fix, orscope-honestydirectly tofinal-strong. Iflens-dispatchis skipped, unavailable, or produces no logs, the review isblocked. - This skill does not modify review files or PR state beyond the scope-honesty preflight.
- The orchestrator owns the scope-honesty preflight, all verification, the
resolved-ledger, and the final decision to flip the PR to ready.implementersubagents own the fix edits under the orchestrator's brief. The cheapreviewer-fastpre-lens is a subagent; the orchestrator does not perform it by hand. - All review inputs, logs, metrics, and fix-diffs are written to the off-repo scratch directory; they are never committed to the repo.
- CI must pass before leaving draft.
Lens re-run scope
lens-dispatch runs at most once per review cycle. It dispatches every lens whose ## Applies to rules match the PR.
When a finding is fixed, finding-fix -> re-preflight -> reviewer-fixes re-runs only the originating lens for that finding. Do not re-dispatch all lenses after a single fix; that is unnecessary churn and can introduce unrelated feedback late in the cycle.
Machine-managed files
The following files in the off-repo scratch must be written only through the provided scripts. The orchestrator must not use write or edit on them:
review-state.json- written bynext_node.py --proposeornext_node.py --resync --apply.findings.jsonl,resolutions.jsonl,regressions.jsonl,blockers.jsonl- written byrecord_*.pyscripts.lenses.jsonl- written byselect_lenses.py --apply.review-log-reviewer-fast.md- written by thereviewer-fastsubagent as the pre-lens report.review-metrics.json- written bycompile_metrics.py.
Lens subagents write their own review-log-<lens>.md files with write and end them with a one-line status. The write tool warning applies to orchestrator-authored files; it causes IDE buffer contention when a file is also open or being updated by a script.
Common Mistakes
- Treating the skill as a fixed list of rounds. Use the graph.
- Reading
references/review-state-graph.mdor allnode-*.mdfiles before starting. Only read the one nodenext_node.pynames. - Treating
reviewer-fastas a pass that allows skippinglens-dispatch,lens-triage, orfinal-strong. It is a cheap pre-filter, not a substitute for deep review. - Running
lens-dispatchwithoutreviewer-fastin the selection. Thereviewer-fastpre-lens is mandatory and is always included byselect_lenses.py. - Claiming subagents are unavailable and proceeding to
readywithoutlens-dispatchorfinal-strong. Ifrun_subagentcannot be used, the review isblocked. - Skipping
re-preflightafter a fix. A fix can re-introduce deterministic issues. - Skipping
regression-scanfor a non-trivial fix. A fix can cause a new issue in an adjacent area. - Letting
reviewer-fixesdrift into a full branch review. Keep the input tightly scoped to the fix. - Blindly applying reviewer findings without verification. Use
receiving-code-reviewfor each finding. - Skipping CI after the reviewer loop. The reviewer "green" signal is not the draft/ready gate.
- Treating tracked planning artifacts as an automatic Ready blocker, without checking repository policy and each artifact's whole scope. Preserve completing-slice artifacts through merge when the repo adopts the two-slice custody standard.
04 同仓库更多 Skills
writing
Use when drafting, revising, or reviewing prose for human readers and clarity, an authorised voice, or reader-fatigue concerns may interact.
writing-with-clarity
Use when drafting, revising, or reviewing prose intended for human readers, including documentation, README files, reports, explanations, UI copy, errors, comments, commit messages, and pull request text.
writing-style
Use when revising or reviewing human-facing prose against an authorised voice card or a contextual reader-fatigue profile.
skill
暂无简介
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment.
writing-roadmaps
Use when a goal is too large for one writing-plans plan and requires a sequenced roadmap of consecutive plans.