review-multi-perspective

작성자: microsoft

네 명의 병렬적 건설적 리뷰어(보수적, 보안, 사용성, 속도)를 사용한 다중 관점 코드 리뷰 후 순차적 적대적...

npx skills add https://github.com/microsoft/trieste --skill review-multi-perspective

Multi-Perspective Code Review

When to Use

  • Reviewing code changes before merging
  • Auditing a module, file, or subsystem for issues
  • Evaluating a new implementation for correctness and quality
  • Performing a thorough review of security-critical code
  • Any situation where the user asks for a code review

Overview

This skill runs four independent constructive reviewer subagents in parallel, each applying a distinct lens with a two-phase inventory-then-assess approach for systematic coverage. Their findings are synthesized and then passed to a sequential adversarial reviewer that performs gap analysis on what the constructive reviewers missed. The combined findings are deduplicated, verified where possible, and presented as a single prioritized remediation plan. Large review targets are chunked into segments to ensure every section receives full attention.

Reviewer Perspectives

ReviewerFocus
Conservative (conservative-lens)Unnecessary new abstractions, changes that could have reused existing infrastructure, public API surface growth, backwards compatibility risks, ripple effects on downstream WF specs, over-engineering
Security (security-lens)Unbounded recursion/iteration, missing validation at boundaries, unsafe node access across rewrite boundaries, missing Error nodes for failure paths, overly broad symbol visibility, inadequate fuzz coverage, regex safety
Usability (usability-lens)Unclear naming, passes doing multiple things, imprecise WF specs, inconsistent patterns, poor error messages, hard-to-follow control flow, missing or misleading documentation
Speed (speed-lens)Unnecessary allocations, redundant traversals, suboptimal pattern dispatch, pass count bloat, missing dir::once, cache-unfriendly access patterns, algorithmic complexity issues
Adversarial (adversarial-lens)Hidden failure modes, wrong assumptions, untested preconditions, scope traps, gaps the other four reviewers share. Runs sequentially after the constructive reviewers.

Procedure

Step 1 — Establish the Review Target

Determine what is being reviewed. This could be:

  • Specific file(s) or line ranges
  • A module or subsystem
  • A diff or set of changes
  • A specific implementation concern described by the user

Read all target files and relevant surrounding context (callers, tests, WF specs, token definitions) before launching reviewers.

Step 2 — Gather Context

Before spawning reviewers, collect:

  • The full content of the files under review
  • Relevant WF specs and token definitions
  • Related tests
  • Any pass pipeline context if applicable

This context will be provided verbatim to each reviewer subagent.

Step 2b — Chunk Large Targets

If the code under review exceeds ~300 lines, split it into logical segments (by file, pass, or function group) and run Steps 3–5 independently on each segment. After all segments are reviewed, merge and deduplicate findings across segments before the final report.

This ensures every section receives full attention. Do not skip this step for large targets — reviewer quality degrades significantly when a single prompt must cover hundreds of lines.

Step 3 — Launch Four Constructive Reviewer Subagents in Parallel

Spawn four fresh subagents using the named agents: conservative-lens, security-lens, usability-lens, and speed-lens. Each agent's .agent.md already defines its identity, mission, focus areas, and guardrails — do not restate these. Each receives the same prompt (below) with the code, context, and shared review protocol.

Do NOT include the adversarial reviewer in this step. It runs later in Step 4b.

Each subagent is independent — do not allow one reviewer's output to influence another.

Shared Review Prompt

Send this prompt to each of the four subagents, substituting {code} and {context}:

TASK: Code review. Apply your perspective (per your agent definition) to the
code below.

Your goal is to find ALL issues, not just prominent ones. A review that finds
8 real issues is better than one that finds 3 obvious ones.

=== PHASE 1 — INVENTORY ===
Before writing findings, list every function, rewrite rule, pass definition,
match arm, and significant code block in the code. Number them. This ensures
systematic coverage.

=== PHASE 2 — ASSESS ===
For each inventory item, check it against your focus areas. If no issues,
write "No issues." Do not skip items.

Additionally, for rewrite rules verify:
- Pattern matches are specific enough (not overly broad)
- WF spec consistency with the rule's output
- Fixed-point convergence (rules that always match must make progress)
- Error handling produces proper Error nodes
- Symbol table interactions are safe

=== FINDING FORMAT ===
For each issue:
- ID: a short identifier (e.g., SPD-1, SEC-3, USA-2, CON-1)
- Describe the issue concretely
- Quote the specific code
- Severity: CRITICAL / HIGH / MEDIUM / LOW
- Suggest a specific fix
- For bugs: provide a minimal test case, input, or execution trace that
  demonstrates the issue. If you cannot construct one, mark as UNVERIFIED.

Severity scale:
- CRITICAL: Silent wrong output, unbounded resource consumption, or
  exploitable vulnerability
- HIGH: Crash, assert failure, or data corruption on reachable input
- MEDIUM: Incorrect error message, suboptimal performance, edge case drift,
  or defence-in-depth concern
- LOW: Style, hardening opportunity, or micro-optimization

CODE UNDER REVIEW:
{code}

CONTEXT:
{context}

Step 4 — Synthesize Constructive Findings

After all four constructive reviewers return, synthesize their outputs:

  1. Deduplicate — merge issues raised by multiple reviewers into a single entry, noting which perspectives flagged it.
  2. Classify each unique issue by type: Security, Correctness, Performance, Quality.
  3. Assign final severity using this priority order:
    • CRITICAL: Exploitable vulnerabilities, or silent wrong output
    • HIGH: Likely crashes, data corruption, or significant code quality problems
    • MEDIUM: Defence-in-depth concerns, edge-case issues, moderate quality issues, measurable performance problems
    • LOW: Hardening opportunities, style issues, micro-optimizations

Step 4b — Adversarial Gap-Analysis Pass

After synthesizing the four constructive reviewers' findings, spawn a fresh adversarial-lens subagent. Its agent definition already provides identity, mission, and adversarial focus including gap-analysis mode instructions — do not restate these. Provide it:

  • The full code under review (verbatim)
  • The context
  • The complete synthesized findings from Step 4 so it knows what was already found

Use this prompt:

TASK: Adversarial gap-analysis code review. Four other reviewers (conservative,
security, usability, performance) have already reviewed this code. Their
findings are listed below under EXISTING FINDINGS. Your job is to find what
they MISSED. Follow the Gap-Analysis Mode instructions in your agent definition.

Do NOT re-report existing findings. Only report NEW issues.

CODE UNDER REVIEW:
{code}

CONTEXT:
{context}

EXISTING FINDINGS:
{synthesized_findings_from_step_4}

Merge the adversarial reviewer's new findings into the synthesized list, then proceed to verification.

Step 5 — Verify Issues

For issues rated CRITICAL or HIGH:

  1. Attempt reproduction — write or describe a minimal test case, code path, or input that demonstrates the issue. Use the Explore subagent or terminal to check whether the issue is real.
  2. Cross-reference the relevant WF specs and pass definitions to confirm whether the behavior is actually wrong.
  3. Mark each issue as:
    • Verified — reproduced or confirmed by code inspection
    • Likely — strong evidence but not yet reproduced
    • Unverified — plausible but needs investigation

Downgrade or remove issues that cannot be substantiated after reasonable investigation.

Step 6 — Present the Review Report

Present findings in this structure:

## Code Review: {target description}

### Summary
{One paragraph overview: what was reviewed, key findings, overall assessment}

### Critical & High Issues
{Table or numbered list, each with: description, location, severity,
verification status, which reviewer(s) flagged it}

### Medium Issues
{Same format}

### Low Issues
{Same format, can be briefer}

### Remediation Plan
{Ordered list of recommended fixes, grouped by priority, with specific code
changes or next steps for each}

### Positive Observations
{Brief note of things done well — reviewers should acknowledge good patterns}

Severity Tiebreaker

When severity is ambiguous, resolve using the project's decision priorities:

  1. Correctness
  2. Security
  3. Usability / Maintainability
  4. Performance

Guardrails

  • Each reviewer subagent must be a fresh instance — no context contamination between reviewers.
  • Do not skip the verification step for CRITICAL/HIGH issues. Unverified critical findings must be explicitly marked as such.
  • Do not propose fixes that would change pass pipeline semantics without explicit callout.
  • Prefer concrete code suggestions over vague recommendations.
  • The adversarial reviewer runs AFTER the constructive reviewers, not in parallel. It receives the synthesized findings to avoid duplicate work and focus on gaps.

microsoft의 다른 스킬

oss-growth
microsoft
OSS 성장 해커 페르소나
agent-framework-azure-ai-py
microsoft
Microsoft Agent Framework Python SDK(agent-framework-azure-ai)를 사용하여 Azure AI Foundry 에이전트를 구축합니다. AzureAIAgentsProvider로 지속적 에이전트를 만들 때, 호스팅 도구(코드 인터프리터, 파일 검색, 웹 검색)를 사용할 때, MCP 서버를 통합할 때, 대화 스레드를 관리할 때, 또는 스트리밍 응답을 구현할 때 사용합니다. 함수 도구, 구조화된 출력, 다중 도구 에이전트를 다룹니다.
development
airunway-aks-setup
microsoft
AKS에서 AI Runway 설정 — 빈 클러스터에서 실행 중인 모델까지. 클러스터 검증, 컨트롤러 설치, GPU 평가, 공급자 설정, 첫 배포를 다룹니다. 시기: "AI Runway 설정", "AKS 클러스터 온보딩", "AI Runway 설치", "airunway 설정", "AKS에 모델 배포", "AKS에서 GPU 추론", "AKS에서 KAITO 설정", "AKS에서 LLM 실행", "AKS에서 vLLM", "AKS에서 모델 서빙 설정", "AI Runway 컨트롤러".
devops
appinsights-instrumentation
microsoft
Azure Application Insights로 웹앱을 계측하기 위한 지침입니다. 원격 분석 패턴, SDK 설정, 구성 참조를 제공합니다. WHEN: 앱 계측 방법, App Insights SDK, 원격 분석 패턴, App Insights란 무엇인가, Application Insights 지침, 계측 예시, APM 모범 사례.
devops
applicationinsights-web-ts
microsoft
브라우저/웹 앱을 Application Insights JavaScript SDK(@microsoft/applicationinsights-web)로 계측합니다. Real User Monitoring(RUM) — 페이지 뷰, 클릭, AJAX/fetch 종속성, 예외, 사용자 지정 이벤트, 백엔드 OpenTelemetry 트레이스와 상관관계가 있는 브라우저 측 GenAI 에이전트 트레이스에 사용합니다. SDK Loader Script 및 npm 설정, 프레임워크 확장(React, React Native, Angular), Click Analytics, 텔레메트리 이니셜라이저, 브라우저에서 생성된 에이전트/도구/모델 스팬에 대한 OTel GenAI 의미론적 규칙을 다룹니다.
devops
azure-ai-anomalydetector-java
microsoft
Azure AI Anomaly Detector SDK for Java로 이상 탐지 애플리케이션을 구축하세요. 단변량/다변량 이상 탐지, 시계열 분석 또는 AI 기반 모니터링을 구현할 때 사용하세요.
development
azure-ai-language-conversations-py
microsoft
azure-ai-language-conversations Python SDK를 사용하여 대화형 언어 이해(CLU)를 구현합니다. ConversationAnalysisClient로 대화 의도와 엔터티를 분석하거나, NLP 기능을 구축하거나, 애플리케이션에 언어 이해를 통합할 때 사용합니다.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python. ML 작업 영역, 작업, 모델, 데이터 세트, 컴퓨팅 및 파이프라인에 사용합니다. 트리거: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development