review

작성자: microsoft

자동 PR 리뷰 — diff를 읽고, 지식 베이스를 교차 참조하며, 인라인 코멘트를 작성하고, 최종 평결을 남깁니다.

npx skills add https://github.com/microsoft/powerplatform-build-tools --skill review

Review Agent — Autonomous PR Review

Reads a PR diff, cross-references the full knowledge base, posts inline comments on specific issues, and leaves an overall verdict. Zero user input required.

Invoke as:

  • /review <pr-number-or-url> — review a specific PR
  • /review — review the open PR on the current branch

For creating PRs use /create-pr. For CLI version bumps use /pac-cli-update.


Core rule: never ask, always decide

ConditionAction
Line-level issue (wrong pattern, bug risk, breaking change)Post inline comment on that line
File-level concern (missing test, architecture violation)Post inline comment on first line of file
Overall concern (security, missing checklist item)Add to overall review body
No issues in a sectionSkip the section — don't pad the review

Step 1 — Sync knowledge if stale

grep "## Last sync" memory/ado-knowledge.md 2>/dev/null | tail -1

If last sync was > 7 days ago or file missing: run /knowledge-sync inline, then continue.


Step 2 — Resolve PR and classify type

# Resolve PR number, head SHA, base branch, changed files
gh pr view <number-or-url> --json number,title,body,headRefOid,baseRefName,author,url 2>&1
gh pr checks <number-or-url> 2>&1
gh pr view <number-or-url> --json baseRefName,files,author \
  --jq '{base:.baseRefName, author:.author.login, files:[.files[].path]}' 2>&1

Capture: PR_NUMBER, HEAD_SHA, BASE_BRANCH.

Classify the PR type — determines which checks run:

Changed filesPR typeChecks
nuget.json + extension/overview.md onlyPAC CLI bumpStep 3a
package.json + package-lock.json onlynpm dep updateStep 3b
package.json + ALL task.json filesNode target updateStep 3b + Step 5
src/tasks/*/index.ts or selective task.jsonFeature / new inputStep 5 (full)
Base = release/stable (any type)Release branch PRStep 3c first, then type check

Step 3 — Type-specific checks (run the section matching the PR type)

3a — PAC CLI bump checks (nuget.json changed)

# Verify both packages have the same version
node -e "
const n = require('./nuget.json');
const vers = n.packages.map(p => p.version);
console.log('versions:', [...new Set(vers)].join(', '));
console.log(vers.every(v => v === vers[0]) ? 'OK: match' : 'MISMATCH');
" 2>&1

# Verify the version exists on nuget.org
curl -s "https://api.nuget.org/v3-flatcontainer/microsoft.powerapps.cli/index.json" \
  | node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); \
    const v=require('./nuget.json').packages[0].version; \
    console.log(d.versions.includes(v)?'nuget: found':'nuget: NOT FOUND')" 2>&1

Request changes immediately if:

  • nuget.json packages have mismatched versions
  • Version does not exist on nuget.org
  • overview.md has no entry for the new version
  • {{NextReleaseVersion}} placeholder was removed from overview.md

3b — npm dependency checks (package.json changed)

Check the diff for:

  • No flat minimatch@^3.x override — causes infinite npm resolution loop
  • ajv override stays at ^6.x — v8 breaks ESLint
  • New overrides are at minimum required version (not over-pinned)
  • inBundle: true entries in package-lock.json changes are intentional (overrides can't reach them)
  • No new direct dependency that should be in bundleDependencies

3c — Release/stable branch checks (base == release/stable)

Release PRs must be version bumps only. Request changes immediately if:

  • Contains .ts logic changes (not just version string changes)
  • Adds new dependencies not present in the corresponding main PR
  • No corresponding merged main PR exists with the same changes

Verify the paired main PR exists:

gh search prs --repo microsoft/powerplatform-build-tools \
  --state merged --base main "<version-or-keyword>" 2>&1

Step 4 — Research context

Run in parallel to inform the review:

# Find similar past PRs (2-3 keywords from PR title)
gh search prs --repo microsoft/powerplatform-build-tools \
  --state merged --limit 8 "<keyword1> <keyword2>" 2>&1

# For top matches, read the body:
gh pr view <past-pr-number> --json title,body,mergedAt 2>&1

Also check memory/ado-knowledge.md for related ADO work items. Skip ADO query for pure PAC CLI or dependency PRs — rarely adds value.


Step 5 — File-level review (feature/bug fix PRs, or any PR touching src/)

Fetch the full diff:

gh pr diff <PR_NUMBER> 2>&1

For each changed file apply:

File patternWhat to check
src/tasks/*/index.tstl.getInput() used correctly; errors reach tl.setResult(TaskResult.Failed, ...); no pac args assembled here
src/tasks/*/task.jsonInput names unchanged (renaming breaks customer pipelines); type correct; required set correctly
src/host/BuildToolsHost.tsALL 32 tasks affected — flag blast radius
src/params/auth/getCredentials.tsAll four auth types still work: UsernamePassword, SPN, ManagedIdentity, WorkloadIdentity
src/params/auth/getEnvironmentUrl.ts4-level fallback preserved: task input → pipeline variable → connection → default
extension/task-metadata.jsonLIVE GUIDs must never change
extension/extension-manifest.jsonPublisher and extension ID must not change
gulp/pack.mjstar imported via createRequire, not ESM import
test/unit-test/**New behaviour is tested; mocks use rewiremock

Security (every PR):

  • No secrets, tokens, or credentials committed
  • No --no-verify or commit hook bypasses

Architecture alignment:

  • Pipeline logic stays in build-tools; pac CLI arg construction stays in cli-wrapper
  • New tasks follow IIFE → isRunningOnAgent() → main() → cli-wrapper pattern

Known failure patterns from knowledge base:

  • WhoAmI locale failure (ADO #4846644): flag any change near whoAmI or locale handling
  • AAD/OAuth authority (ADO #4863652): resolveCloudInstance() map must be preserved
  • PVA import failure (IcM 604312672): pac CLI version bumps should reference changelog

Step 6 — Post inline comments

HEAD_SHA=$(gh pr view <PR_NUMBER> --json headRefOid --jq .headRefOid)

gh api repos/microsoft/powerplatform-build-tools/pulls/<PR_NUMBER>/comments \
  --method POST \
  --field body="<comment>" \
  --field commit_id="$HEAD_SHA" \
  --field path="<file-path>" \
  --field line=<line-number> \
  --field side="RIGHT" 2>&1

Format: ⚠️ <risk> / 🚨 Breaking: <impact> / 💡 Suggestion: / ❓ <question>

Max 15 inline comments — consolidate minor points into the overall review body.


Step 7 — Post overall review and verdict

gh pr review <PR_NUMBER> --comment --body "$(cat <<'EOF'
## Review

**Reviewed by:** Claude Code (autonomous review agent)
**PR type:** <PAC CLI bump / npm dep update / feature / release branch>
**Similar PRs:** <titles + numbers, or "none">
**ADO context:** <relevant items, or "none">

### Breaking changes
<task.json, GUID, or interface changes — or "None detected">

### Security
<!-- Omit if no findings -->

### Architecture
<!-- Omit if no findings -->

### Dependencies
<!-- Omit if package files unchanged -->

### Suggestions
<!-- Omit if none -->

### Verdict
**✅ Approve** / **🔄 Request changes** / **💬 Comment** — <one line reason>
EOF
)" 2>&1

# Then execute the verdict:
gh pr review <PR_NUMBER> --approve 2>&1
# or
gh pr review <PR_NUMBER> --request-changes --body "<blocker>" 2>&1

Verdict decision table

ConditionVerdict
LIVE GUID changedRequest changes — critical breaking
task.json input renamedRequest changes — breaks customer pipelines
Secret/credential in diffRequest changes — security
CI failing on non-functional-test stepRequest changes
release/stable PR has logic changesRequest changes — version bumps only on release branch
release/stable PR missing paired main PRRequest changes
nuget.json package version mismatchRequest changes — CLI update incomplete
PAC CLI version not on nuget.orgRequest changes — version doesn't exist
Only non-blocking suggestionsApprove with inline suggestions
PAC CLI bump verified cleanApprove
No findingsApprove
Intent unclearComment

Never:

  • Approve a PR with a LIVE GUID change, renamed input, or committed secret
  • Block a PR because functional tests fail locally (expected — require live credentials)
  • Re-flag elliptic LOW vuln (known accepted risk, no patch exists)

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