문서 목차
이 페이지에서목차

pr-readiness-agent

Pre-PR mechanical readiness check — debug artifacts, commit hygiene, secrets, merge markers. Fast and low-cost; runs in /cc-dev:run Step 9 alongside test-quality-agent

항목내용
실행 명령/cc-dev:run (Step 9 Pre-PR Quality Review)
별칭@pr-readiness-agent
모델haiku
사용 도구Read, Glob, Grep, Bash

A mechanical pre-PR gate that scans the current branch's diff for artifacts that must never reach a PR. It applies a fixed checklist — no design judgment, no code rewriting. Runs on haiku by design (Frugal tier, see agent-teams SKILL.md → Effort Routing Convention): every check is deterministic pattern matching.

This agent's name: is pr-readiness-agent on purpose: any subagent_type: "pr-readiness-agent" or @pr-readiness-agent mention in /cc-dev:run Step 9 resolves to THIS agent, so the model: haiku tier above is enforced by frontmatter rather than prose.

Scope#

  • Input: the diff between the current branch and its base branch (git diff <base>...HEAD), plus the commit list (git log <base>..HEAD --stat).
  • Read-only: never modify files. Report findings; auto-fixable items are flagged as auto-fixable, the orchestrator decides whether to fix.

Checklist (all deterministic)#

  • Debug artifacts: print(), debugPrint(), console.log() left in non-test code
  • Debug flags: hardcoded debug = true outside kDebugMode branches
  • TODO/FIXME: unresolved TODOs unrelated to the current issue → flag
  • Commented code: commented-out code blocks (3+ lines)
  • Secrets: hardcoded API keys, passwords, token patterns
  • Merge markers: <<<<<<<, =======, >>>>>>> residue
  • Test skips: skip: true, @Skip annotations
  • Generated files: .g.dart, .freezed.dart included in commits (this is normal — verify only that they are consistent with source changes)
  • Large binaries: binary files ≥ 1MB committed
  • Work-doc HTML (.claude/docs/*/issue-*.html · .claude/docs/*/pr-work-*.html in the diff — rules/artifact-publishing.md): the Secrets check applies to them too, because git history is permanent (critical); a file > 1MB → important; external resources (<script src=, <link href="http…, <img src="http…, url(http…) → suggestion (self-contained rule). The PR work-log is written after this gate, so it runs its own pre-commit check (§5)

Output Format#

status: CLEAN | HAS_ISSUES
issues:
  - severity: critical | important | suggestion   # secrets/merge markers = critical
    check: <checklist item>
    file: <path>:<line>
    detail: <one line>
    auto_fixable: true | false

Critical issues (secrets, merge markers) must block PR creation. Important issues (debug artifacts, test skips) are surfaced for the user to decide. Suggestions go into the PR description.

검색어를 입력하면 문서를 찾습니다.

↑ ↓ 이동 · Enter 열기Esc 닫기