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
Prerequisites: gh auth status 確認
Fetch Issue:
gh issue view <number> --json title,body,labels,author,comments
-
Include comments as additional context/requirements
Generate work-id:
-
Format: <TYPE>-<issue>-<slug>
-
TYPE: labels から判定 (enhancement→FEAT, bug→FIX, etc.)
-
slug: タイトルから生成 (lowercase, alphanumeric+hyphens, max 40 chars)
Select base branch (priority order):
-
default_base_branch from config (explicit override)
-
git symbolic-ref refs/remotes/origin/HEAD (remote default branch)
-
main (final fallback)
Create work branch:
-
git checkout -b feat/<issue>-<slug> <base_branch>
-
GUARD: main/master では ABORT
Initialize WF directory:
source "$HOME/.claude/scripts/wf-init.sh" && wf_init_project mkdir -p docs/wf/<work-id>/
Phase 2: Kickoff Document
Brainstorming dialogue:
-
Goal, Success Criteria, Constraints, Non-goals, Dependencies
Create 01_KICKOFF.md:
- Template: ~/.claude/templates/01_KICKOFF.md
Phase 3: Git Operations
Execute immediately without confirmation:
Commit:
git add .wf/ docs/wf/<work-id>/ git commit -m "docs(wf): create workspace and kickoff <work-id>"
Push:
git push -u origin <branch>
Phase 4: Draft PR Creation (NEW)
Create Draft PR:
gh pr create --draft
--title "WIP: <issue-title>"
--body "$(cat <<'EOF'
Closes #<issue-number>
Progress
- ghwf1-kickoff
- ghwf2-spec
- ghwf3-plan
- ghwf4-review
- ghwf5-implement
- ghwf6-verify
- ghwf7-pr (Ready for Review)
🤖 Generated by ghwf EOF )"
Get PR number:
PR_NUMBER=$(gh pr view --json number -q '.number')
Phase 5: Label Update (NEW)
- 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
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 } } } }
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):
Fetch feedback:
gh pr view <pr> --json reviews,comments gh issue view <issue> --json body,comments
Filter bot comments:
-
Exclude github-actions[bot]
-
Exclude comments starting with 🤖
Analyze changes:
-
PR review comments
-
Issue body diff
-
New Issue comments since last execution
Update 01_KICKOFF.md
Append to 06_REVISIONS.md:
Revision N (YYYY-MM-DD)
Trigger
- <source of revision>
Changes
-
<list of changes>
Update state.json:
-
Increment kickoff.revision
-
Set current: "ghwf1-kickoff" , next: "ghwf2-spec"
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