Skip to content

Home Information - Your home, your data, organized.

Python
4.5 KB
Raw Blame

allowed-tools: Bash, Read, Write, TodoWrite, Grep, Glob description: Pick up a GitHub issue — prepare branch, investigate, and produce a proposed phased work breakdown for review argument-hint: [issue-number]

Pick up GitHub issue #$0

Prepare an issue for supervised, incremental implementation. This command sets up the branch, investigates the codebase, and produces a proposed phased work breakdown that you will review and refine before any implementation begins.

This command does NOT write code, commit, or push implementation changes. For ballistic (single-PR) implementation, use /execute instead. For multi-issue implementation in one PR, use /implement after planning. For supervised incremental implementation after this command, proceed conversationally (e.g., "go to the next step").

Workflow

  1. Load context. Read docs/CLAUDE.md for development philosophy and standards. Use TodoWrite to track pickup steps.

  2. Read the issue body AND every comment. Comments often carry decisive design refinements; never plan from the body alone.

    Use a JSON projection so the GitHub Projects-classic deprecation warning (which makes gh issue view --comments exit non-zero on some repos) cannot mask comment retrieval:

    gh issue view $0 --json title,body,state,labels,assignees,comments
    

    If the JSON command itself fails for any reason, fall back to fetching body and comments as two separate calls and confirm BOTH succeeded before proceeding:

    gh issue view $0 --json title,body,state,labels,assignees
    gh api repos/{owner}/{repo}/issues/$0/comments
    

    Do not substitute gh api repos/.../issues/$0 alone — that endpoint returns only the body, not the comments thread, and silently produces an incomplete picture.

    Before moving to step 3, verify the comments array was retrieved (it may legitimately be empty; an empty array is OK, a missing field is not). If any comment is present, read it in full and treat its content as authoritative alongside the body.

  3. Safety check. Run git status; abort if the working tree is not clean.

  4. Prepare staging branch.

    • git checkout staging
    • git pull origin staging
    • Verify clean state
  5. Assign and branch.

    • gh issue edit $0 --add-assignee @me
    • Determine branch type (feature/bugfix/docs/ops/refactor) per issue labels/content
    • git checkout -b <type>/$0-<mnemonic>
    • git push -u origin <branch>
  6. Investigate (read-only):

    • Identify affected apps, modules, and file groups
    • Note existing patterns and utilities the work should follow
    • Identify dependencies between parts of the work
    • Flag ambiguities or gaps in the issue
  7. Produce a proposed phased work breakdown.

    Segment implementation into phases suitable for independent review. Each phase should be a coherent, reviewable chunk that respects dependencies (e.g., DB migration before code using the new field). Simple issues yield a one-phase plan; complex issues yield multiple phases.

    Each phase specifies:

    • Title and brief intent
    • Files expected to be modified or created
    • Tests to add or update
    • Manual verification notes (what the user can check after this phase)
    • Dependencies on prior phases
  8. Persist the plan in two places.

    GitHub issue comment via gh issue comment $0 --body-file <path>, preceded by:

    PROPOSED WORK BREAKDOWN — pending user review

    Generated by /pickup. Phases may be added, removed, merged, reordered, or rewritten by the user before implementation begins.

    Local working copy at .claude/state/$0-plan.md (create .claude/state/ if needed). Same content as the GH comment, minus the header.

  9. Report and stop.

    Summarize: branch created, investigation findings, plan posted and written locally. State clearly that the next step is for the user to review and refine the proposed breakdown. Do NOT begin implementation. Do NOT make code changes.

Critical requirements

  • Branch creation MUST precede investigation
  • NO code implementation in this command — investigation and planning only
  • The plan is PROPOSED; the user is expected to review and may substantially revise it
  • Phase definitions must support independent review and manual verification
  • Follow branch naming and workflow conventions in docs/dev/workflow/workflow-guidelines.md

Issue to pick up: #$0

Begin pickup now. Stop after the plan is posted and await user review of the work breakdown.