qualify
Qualify an open issue or PR against requirements and Python SDK parity before /tdd
Autonomous TDD development cycle for GitHub issues with quality gates
How it fires
How this command gets triggered: by you, by Claude, or both.
/tddContext preview
What this command does when you run it.
Autonomous TDD development cycle for GitHub issues with quality gates
argument-hint: <issue-number> description: Autonomous TDD development cycle for GitHub issues with quality gates
Execute complete TDD workflow for GitHub issue #$ARGUMENTS with built-in quality gates and Python SDK parity checks.
Verify the development environment is ready:
1. **Check working directory status** - Ensure no uncommitted changes exist 2. **Verify current branch** - Should be on `main` branch 3. **Pull latest changes** - Run `git pull` to sync with remote 4. **Check for existing PRs** - Search for open PRs linked to issue #$ARGUMENTS to avoid duplicate work 5. **Verify Go environment** - Run `go version` and ensure toolchain is available 6. **Sync Python SDK** - Run `git -C ../claude-agent-sdk-python pull origin main` to ensure local Python SDK reference is current 7. **Check for blocking dependencies** - Read issue body and look for "Depends on" or "Blocked by" sections
**STOP and report to user if any check fails** - Don't proceed until issues are resolved.
---
Retrieve and analyze issue #$ARGUMENTS:
1. **Fetch issue details** - Get title, body, labels, milestone, state via `gh issue view` 2. **Read all comments** - Check for additional context or decisions made 3. **Validate issue completeness** - Check if issue contains:
**If incomplete:** Report gaps to user and ask if should proceed anyway. **If complete:** Display issue summary and continue.
---
**Enter plan mode for this entire phase.** Call `EnterPlanMode` at the start of Phase 3 so all discovery, design decisions, and parity tradeoffs are captured as a plan the user approves before any code is written. The phase ends with `ExitPlanMode` at the *Critical Checkpoint* below. If already in plan mode, `EnterPlanMode` is a no-op — proceed.
This work passes through **two co-equal mandatory gates**. Both must pass. Neither compensates for the other:
1. **Observable-behavior parity with Python SDK** — JSON wire format, public API surface, CLI flags, message shapes, and semantics exposed to consumers. This is the *contract* the SDK delivers. 2. **Idiomatic Go delivery** — the *shape* of the code that delivers that contract: nil-safety, context-first, `fmt.Errorf` with `%w` wrapping, zero-value usability, small focused interfaces, gofmt/golangci-lint conformance, gocyclo under 15, channel-based concurrency, no unnecessary exports. The Go shape is itself a parity gate, not a polish step applied after the fact.
Parity is the *what*. Idiomatic Go is the *how*. A faithful translation of Python internals that violates Go idiom is a Gate-2 failure even if the wire format is exact. Conversely, a beautifully idiomatic Go API that drifts from the wire contract is a Gate-1 failure.
**Internal mechanics** (private struct layout, helper return types, control flow shape, dispatch strategy) are **not** parity targets. When a Go idiom and a Python internal shape conflict, choose the Go idiom and record the deliberate divergence in the plan (and later in the commit message + PR description — never in source comments). The plan presented at `ExitPlanMode` must name each divergence explicitly so the user approves it up front rather than discovering it in review.
Understand existing patterns to match the project's conventions:
1. **Review Python SDK Reference:**
2. **Discover Existing Patterns:**
3. **Identify Files to Modify:**
4. **Review Related Context:**
Based on exploration and issue requirements, create detailed plan with:
1. **RED Phase - Tests First:**
Unofficial Go SDK for Claude Code CLI integration. Build production-ready applications that leverage Claude's advanced code understanding, secure file operations, and external tool integrations through a clean, idiomatic Go API with comprehensive error
Qualify an open issue or PR against requirements and Python SDK parity before /tdd
Parity-focused review using grumpy-gopher to verify a branch faithfully implements a Python SDK PR with idiomatic Go
Comprehensive code review using team-based specialized agents with self-coordination