ghwf1-kickoff

SKILL.md

Always respond in Japanese. Write all workflow documents (*.md) in Japanese.

/ghwf1-kickoff

GitHub Issue を取得し、ブランチ作成、キックオフドキュメント作成、Draft PR 作成を行う。

Usage

/ghwf1-kickoff <issue-number> [--no-branch]
/ghwf1-kickoff update
/ghwf1-kickoff revise "<instruction>"

Arguments

  • <issue-number>: GitHub Issue 番号 (必須)
  • --no-branch: 現在のブランチを使用 (main/master では不可)

Subcommands

  • update: 対話形式でキックオフ更新
  • revise "<instruction>": 指示に基づいて自動更新

Processing (New)

Phase 1: Workspace Setup

  1. Prerequisites: gh auth status 確認

  2. Fetch Issue:

    gh issue view <number> --json title,body,labels,author,comments
    
    • Include comments as additional context/requirements
  3. Generate work-id:

    • Format: <TYPE>-<issue>-<slug>
    • TYPE: labels から判定 (enhancement→FEAT, bug→FIX, etc.)
    • slug: タイトルから生成 (lowercase, alphanumeric+hyphens, max 40 chars)
  4. Select base branch (priority order):

    1. default_base_branch from config (explicit override)
    2. git symbolic-ref refs/remotes/origin/HEAD (remote default branch)
    3. main (final fallback)
  5. Create work branch:

    • git checkout -b feat/<issue>-<slug> <base_branch>
    • GUARD: main/master では ABORT
  6. Initialize WF directory:

    source "$HOME/.claude/scripts/wf-init.sh" && wf_init_project
    mkdir -p docs/wf/<work-id>/
    

Phase 2: Kickoff Document

  1. Brainstorming dialogue:

    • Goal, Success Criteria, Constraints, Non-goals, Dependencies
  2. Create 01_KICKOFF.md:

    • Template: ~/.claude/templates/01_KICKOFF.md

Phase 3: Git Operations

Execute immediately without confirmation:

  1. Commit:

    git add .wf/ docs/wf/<work-id>/
    git commit -m "docs(wf): create workspace and kickoff <work-id>"
    
  2. Push:

    git push -u origin <branch>
    

Phase 4: Draft PR Creation (NEW)

  1. Create Draft PR:

    gh pr create --draft \
      --title "WIP: <issue-title>" \
      --body "$(cat <<'EOF'
    Closes #<issue-number>
    
    ## Progress
    - [x] ghwf1-kickoff
    - [ ] ghwf2-spec
    - [ ] ghwf3-plan
    - [ ] ghwf4-review
    - [ ] ghwf5-implement
    - [ ] ghwf6-verify
    - [ ] ghwf7-pr (Ready for Review)
    
    ---
    🤖 Generated by ghwf
    EOF
    )"
    
  2. Get PR number:

    PR_NUMBER=$(gh pr view --json number -q '.number')
    

Phase 5: Label Update (NEW)

  1. Update Issue labels:
    gh issue edit <issue-number> \
      --remove-label "ghwf:approve,ghwf:executing" \
      --add-label "ghwf:waiting,ghwf:step-1"
    

Phase 6: State Update

  1. Update state.json:

    {
      "active_work": "<work-id>",
      "works": {
        "<work-id>": {
          "source": {
            "type": "github",
            "issue": <issue-number>,
            "pr": <pr-number>
          },
          "current": "ghwf1-kickoff",
          "next": "ghwf2-spec",
          "last_execution": "<ISO8601>",
          "git": {
            "base": "<base-branch>",
            "branch": "<work-branch>"
          },
          "kickoff": {
            "revision": 1
          }
        }
      }
    }
    
  2. Completion message:

    • Work ID
    • Branch
    • PR URL
    • Next step: /ghwf2-spec or add ghwf:approve label

Revise Processing

For revise subcommand (used by daemon for revision):

  1. Fetch feedback:

    gh pr view <pr> --json reviews,comments
    gh issue view <issue> --json body,comments
    
  2. Filter bot comments:

    • Exclude github-actions[bot]
    • Exclude comments starting with 🤖
  3. Analyze changes:

    • PR review comments
    • Issue body diff
    • New Issue comments since last execution
  4. Update 01_KICKOFF.md

  5. Append to 06_REVISIONS.md:

    ## Revision N (YYYY-MM-DD)
    
    ### Trigger
    - <source of revision>
    
    ### Changes
    - <list of changes>
    
  6. Update state.json:

    • Increment kickoff.revision
    • Set current: "ghwf1-kickoff", next: "ghwf2-spec"
  7. Commit: docs(wf): revise kickoff <work-id> (revision N)

Error Handling

Scenario Behavior
Issue not found Error with issue number
Branch exists Error with branch name
On main/master ABORT
gh not authenticated Error with instructions
Weekly Installs
2
First Seen
14 days ago
Installed on
opencode2
gemini-cli2
codebuddy2
github-copilot2
codex2
kimi-cli2