0Pricing
Claude Architect · 강의

다중 패스 및 독립 검토

새 인스턴스는 작성자가 놓친 문제를 찾아냅니다

다중 패스 및 독립 검토은(는) CoddyKit의 무료 Claude Architect 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Claude Architect 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

The Author's Blind Spot

You ask Claude to generate a function, then ask the same conversation to review it. It says "looks good." Why? Because the author already holds its own reasoning in context — it agrees with itself.

This is same-session self-review, and it is a classic anti-pattern. The model that wrote the code will not genuinely challenge it; it rationalizes the choices it just made.

The fix is independent review: a fresh instance, with no memory of the generation, inspects the output cold. A fresh pair of eyes finds issues the author misses.

Why Fresh Beats Self

A same-session reviewer is biased by the generation context: the justifications, assumptions, and shortcuts it already committed to are still in the message history.

An independent instance receives only the artifact (and the rules), not the author's internal narrative. It evaluates what is actually there, not what the author intended.

  • Author retains reasoning → won't dispute itself.
  • Fresh instance → no sunk-cost loyalty → real scrutiny.

Rule of thumb: independent / fresh-instance review beats same-session self-review.

A Clean Review Request

To run an independent review, start a new request with fresh messages — do not append to the generation history. Pass only the artifact and explicit review criteria.

Notice: no prior assistant turns, no "here's why I wrote it this way." The reviewer sees the code as a stranger would.

import anthropic

client = anthropic.Anthropic()

# Fresh client call — NO generation history attached
review = client.messages.create(
    model="claude-sonnet-4-5",
    max_tokens=2048,
    system=(
        "You are an independent reviewer. You did NOT write this code. "
        "Flag a finding ONLY when the code violates a stated rule or "
        "contradicts its own comments."
    ),
    messages=[
        {"role": "user", "content": f"Review this artifact:\n\n{artifact}"}
    ],
)

Explicit Criteria, Not Vague Pleas

"Be more precise" tells the reviewer nothing. Explicit criteria beat vague instructions.

Give the reviewer concrete, testable rules so its findings are reproducible and low-noise:

  • Vague: "review carefully."
  • Explicit: "flag a comment ONLY when it contradicts the code."

Precise criteria are what separate a reviewer that surfaces real defects from one that floods you with style nitpicks and false positives.

system = (
    "Independent code reviewer. Apply these rules exactly:\n"
    "1. Flag a function that mutates its input without saying so.\n"
    "2. Flag a comment ONLY when it contradicts the code it describes.\n"
    "3. Flag any missing error handling on a network or file call.\n"
    "Do NOT report style preferences. Report nothing if no rule is violated."
)

Multi-Pass: One Lens at a Time

A single pass that tries to check everything at once dilutes attention — the model spreads thin and misses defects.

Better: run multiple focused passes, each with a narrow mandate. One pass for security, one for correctness, one for the public API contract. Each pass attends fully to its lens.

This is the same principle behind multi-pass code review: separating concerns sharpens the model's focus on each one.

Per-File, Then Cross-File

For a multi-file change, do NOT review every file in one giant single pass — that dilutes attention across files.

Use a two-stage structure:

  • Local pass: review each file on its own for internal correctness.
  • Integration pass: a separate pass over how the files fit together — call sites, shared types, contract mismatches.

Single-pass multi-file review is an anti-pattern. Per-file local passes plus a dedicated cross-file integration pass catch what either alone would miss.

passes = [
    {"name": "local", "scope": "one file at a time",
     "focus": "internal correctness, error handling"},
    {"name": "integration", "scope": "all files together",
     "focus": "call sites, shared types, contract drift"},
]

for p in passes:
    run_independent_review(artifact=p["scope"], rules=p["focus"])  # fresh instance each pass

Independent Review in CI/CD

In a pipeline, run the review in an isolated session — separate from whatever generated the change. The isolated reviewer is less biased by the generation context, so it produces fewer rubber-stamps and fewer false positives.

Use non-interactive mode and a parseable format so the pipeline can act on results.

# CI review step: non-interactive, isolated from any generation step
claude -p "Review the staged diff against .claude/rules/review.md. \
  Report only rule violations as JSON." \
  --output-format json \
  > review-findings.json

# Gate the merge on the parsed findings
jq -e '.findings | length == 0' review-findings.json

Re-Runs: Report Only What's New

Reviews iterate. When you re-run a review after the author fixes some findings, do not start blind — and do not re-report everything.

Include the prior results in the new run and instruct the reviewer to report only new or still-unfixed issues. This keeps each iteration signal-rich instead of repeating noise the team already triaged.

review = client.messages.create(
    model="claude-sonnet-4-5",
    max_tokens=2048,
    system=(
        "Independent reviewer, iteration 2. You are given the prior findings. "
        "Report ONLY issues that are new or still unfixed. "
        "Do not repeat findings the author already resolved."
    ),
    messages=[{"role": "user", "content":
        f"PRIOR FINDINGS:\n{prior_findings}\n\nUPDATED ARTIFACT:\n{artifact}"}],
)

Structured Findings, Not Prose

A wall of review prose is hard to gate on. Force the reviewer to emit structured output so the pipeline can route each finding deterministically.

Use tool_choice set to "any" to guarantee the model returns a tool call (structured JSON) rather than free text. Mark a field required ONLY if it is always present — never require an optional field, or the model will fabricate it.

review_tool = {
    "name": "report_findings",
    "description": "Return code-review findings as structured data.",
    "input_schema": {
        "type": "object",
        "properties": {
            "findings": {"type": "array", "items": {
                "type": "object",
                "properties": {
                    "severity": {"type": "string", "enum": ["high", "med", "low"]},
                    "file": {"type": "string"},
                    "rule": {"type": "string"},
                },
                "required": ["severity", "file", "rule"],
            }}
        },
        "required": ["findings"],
    },
}

resp = client.messages.create(
    model="claude-sonnet-4-5", max_tokens=2048,
    tools=[review_tool],
    tool_choice={"type": "any"},  # must call a tool -> structured output
    messages=[{"role": "user", "content": artifact}],
)

Independent Review vs Retry-With-Feedback

Independent review is not the same as a validation retry. Know which tool fits which problem.

  • Retry-with-feedback fixes format, structural, or arithmetic errors: send the original input, the wrong output, and the exact validation error so the model corrects itself.
  • Independent review catches judgment defects: contradicted assumptions, missed edge cases, contract drift — things a validator can't express as a schema rule.

Neither helps when information is simply absent from the source. A retry can't conjure a value that was never there; a reviewer can only flag the gap.

Fresh Session vs Resumed Session

When you reopen a review, beware stale context. Resuming a named session with --resume brings back old tool results — but if the codebase changed since, those results may be stale and the review wrong.

Often a fresh session with a structured summary of the current state beats a resumed one. The fresh instance reads the code as it is now, with no outdated baggage — exactly the independence advantage that makes fresh review powerful.

# Resumed: fast, but tool results can be STALE if files changed
claude --resume code-review-pr-412

# Often better for review: fresh session + verbatim current-state summary
claude -p "$(cat current_state_summary.md)\n\nReview the diff below for rule violations."

Quick Check

An architect has Claude generate a 6-file refactor. To validate it before merge, which review setup is strongest?

Recap: Independence Is the Edge

Key takeaways for multi-pass and independent review:

  • Fresh beats self: independent / fresh-instance review beats same-session self-review — the author won't challenge its own reasoning.
  • Run it isolated: in CI/CD, review in an isolated session for less bias and fewer false positives; use -p and --output-format json.
  • Multi-pass: one lens per pass; for multi-file changes do per-file local passes THEN a separate cross-file integration pass. Single-pass multi-file dilutes attention.
  • Explicit criteria ("flag X only when Y") beat vague ones.
  • Re-runs: include prior results, report only new or unfixed issues.
  • Right tool: retry-with-feedback fixes format/arithmetic errors; review catches judgment defects; neither invents absent info.

자주 묻는 질문

“다중 패스 및 독립 검토” 강의는 무료인가요?

네 — “다중 패스 및 독립 검토” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Claude Architect 강의 전체를 잠금 해제할 수 있습니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

“다중 패스 및 독립 검토”에서 뭘 배우나요?

새 인스턴스는 작성자가 놓친 문제를 찾아냅니다 브라우저에서 직접 실행하는 실습 코드로 Claude Architect을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Claude Architect을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Claude Architect은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“다중 패스 및 독립 검토” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Claude Architect 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Claude Architect 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 재시도가 도움이 될 때와 그렇지 않을 때
  2. 피드백과 함께 재시도하는 프롬프트
  3. 자기 수정
  4. 다중 패스 및 독립 검토
← Claude Architect(으)로 돌아가기