name: vw-issue description: "壁打ち結果やリサーチレポートをGitHub Issueに変換。リサーチファイルや新アイデアからIssueを生成し、壁打ちで内容を磨く。" disable-model-invocation: true argument-hint: [file_path_or_topic] allowed-tools: Bash(gh issue create:), Bash(gh issue view:), AskUserQuestion, Task, Read, Glob
統一Issueフォーマット(5セクション固定)
すべてのIssueは以下の5セクションで構成する。空セクションも削除せず維持する。
## 概要
<!-- 1-2文で背景と目的 -->
## 現状の問題
<!-- 箇条書きで課題・Pain Points -->
-
## 検討事項
<!-- 決めるべきこと、調査項目 -->
-
## 参考
<!-- API、ドキュメント、関連情報 -->
-
## 関連ファイル
<!-- コードリンク -->
-
タイトル生成ルール
内容タイプに応じてプレフィックスを付与:
| タイプ | フォーマット | 例 |
|---|---|---|
| リサーチ | [Research] {topic} |
[Research] gh CLIでのIssue作成 |
| アイディア | [Idea] {summary} |
[Idea] 壁打ち結果のIssue化 |
| 技術検討 | [Tech] {subject} |
[Tech] chatRoute移行検討 |
| バグ報告 | [Bug] {description} |
[Bug] ログイン画面クラッシュ |
ラベル提案
| 内容タイプ | 推奨ラベル |
|---|---|
| リサーチ結果 | research |
| 新しいアイディア | idea |
| 改善提案 | enhancement |
| 検討事項 | question |
| バグ報告 | bug |
| パフォーマンス | performance |
リサーチファイルからの変換ルール
.brain/thoughts/shared/research/ のリサーチドキュメントをIssue化する場合:
| リサーチセクション | Issueセクション |
|---|---|
| サマリー | 概要 |
| 詳細な調査結果 | 現状の問題 / 検討事項 |
| 結論 / 次のステップ | 検討事項 |
| 参考(URL等) | 参考 |
| 関連ファイル | 関連ファイル |
品質基準
必須
- 5セクションすべてが存在する
- 概要は1-2文に収める
- タイトルに適切なプレフィックスがある
推奨
- 関連ファイルにfile:line参照を含める
- 参考セクションにURLを含める
- 検討事項は箇条書きで整理
Eval Mode
If $ARGUMENTS contains --eval: Skip ALL AskUserQuestion calls. Do NOT use AskUserQuestion tool. Output formatted content directly as Markdown text. Skip Phase 4 (user confirmation) and Phase 5 (gh issue create). Generate Issue preview as text output only.
Phase 1: 入力ソース決定
If $ARGUMENTS is file path (contains / or .md):
- Read the specified file using Read tool
- Parse frontmatter and extract topic
- Proceed to Phase 2
If $ARGUMENTS is topic keyword:
- Search
.brain/thoughts/shared/research/for related files using Glob - If multiple matches, use AskUserQuestion to let user select
- Proceed to Phase 2
If NO argument provided:
- List recent research files (last 5) from
.brain/thoughts/shared/research/ - Use AskUserQuestion:
AskUserQuestion:
questions:
- question: "どのリサーチをIssue化しますか?"
header: "選択"
multiSelect: false
options:
- label: "{recent_file_1}"
description: "{topic_from_frontmatter_1}"
- label: "{recent_file_2}"
description: "{topic_from_frontmatter_2}"
- label: "新しいアイディアを入力"
description: "会話からIssueを作成"
- If user selects file → Read and proceed to Phase 2
- If user selects "新しいアイディア" → Ask for idea description, proceed to Phase 2
Phase 2: コンテンツ収集
If source is research file:
- Parse frontmatter (date, topic, tags)
- Extract key sections:
- サマリー → 概要セクション
- 詳細な調査結果 → 現状の問題 / 検討事項
- 結論 / 次のステップ → 検討事項
- 参考 → 参考セクション
If source is new idea (no file):
Optionally spawn sub-agents for context:
Task(subagent_type="hl-thoughts-analyzer", prompt="Find related research for: {idea}")
Task(subagent_type="hl-codebase-locator", prompt="Find related code for: {idea}")
Phase 3: Issue形式変換
Step 3.1: フォーマット適用
Generate Markdown with 5 fixed sections (空セクションも維持).
Follow the
Step 3.2: タイトル・ラベル生成
Based on content type, apply title prefix and labels from
Phase 4: ユーザー確認
Step 4.1: プレビュー表示
## Issue プレビュー
**Title**: {generated_title}
**Labels**: {suggested_labels}
**Repository**: {current_repo from git remote}
---
{generated_body}
---
Step 4.2: 確認
AskUserQuestion:
questions:
- question: "このIssueを作成しますか?"
header: "確認"
multiSelect: false
options:
- label: "このまま作成"
description: "プレビュー内容でIssueを作成"
- label: "タイトルを変更"
description: "タイトルを編集"
- label: "ラベルを変更"
description: "ラベルを追加・削除"
- label: "壁打ちで磨く"
description: "アイディアをさらに深掘り"
分岐:
- "このまま作成" → Phase 5
- "タイトルを変更" → Ask for new title, return to Step 4.1
- "ラベルを変更" → Ask for labels, return to Step 4.1
- "壁打ちで磨く" → Phase 4.5
Phase 4.5: 壁打ち(オプション)
Step 4.5.1: 深掘り観点選択
AskUserQuestion:
questions:
- question: "どの観点で深掘りしますか?"
header: "壁打ち"
multiSelect: true
options:
- label: "なぜ必要か(目的・動機)"
description: "このアイデアが必要な理由を明確化"
- label: "代替案の検討"
description: "他のアプローチとの比較"
- label: "制約・スコープ"
description: "何をやらないか、前提条件"
- label: "次のステップ"
description: "具体化に向けたアクション"
Step 4.5.2: ソクラテス式質問
Based on selected focus, ask probing questions using AskUserQuestion:
- 目的・動機: "この機能がないと誰が困りますか?"
- 代替案: "他にどのような解決方法が考えられますか?"
- 制約: "これは絶対にやらない、というスコープ外は何ですか?"
- 次のステップ: "最初の1歩として何ができますか?"
Step 4.5.3: 本文更新
- Incorporate brainstorming insights into Issue body
- Update relevant sections (概要, 検討事項, etc.)
- Return to Phase 4 Step 4.1 for re-confirmation
Phase 5: Issue作成
Step 5.1: ghコマンド実行
gh issue create \
--title "$TITLE" \
--body-file - \
--label "$LABELS" << 'EOF'
$BODY
EOF
Step 5.2: 結果表示
On success:
Issue作成完了
URL: {issue_url}
Title: {title}
Labels: {labels}
On error:
Issue作成失敗
Error: {error_message}
考えられる原因:
- ghがログインしていない → `gh auth login`
- リポジトリが見つからない → カレントディレクトリを確認
Step 5.3: フォローアップ
AskUserQuestion:
questions:
- question: "次はどうしますか?"
header: "次へ"
multiSelect: false
options:
- label: "別のIssueを作成"
description: "続けて別のリサーチをIssue化 → Phase 1へ"
- label: "完了"
description: "このセッションを終了"
Be Interactive
- Get user confirmation at each major step
- Use AskUserQuestion for all choices (never plain text questions)
- Allow course corrections (title, labels, content)
Issue Quality
- Keep 概要 to 1-2 sentences
- Use bullet points for 現状の問題 and 検討事項
- Include file:line references when available
- Empty sections should remain (don't delete)
Error Handling
- Check gh authentication before creating
- Provide clear error messages with solutions
- Offer retry option on failure
Brainstorming Loop
- Phase 4.5 can loop multiple times
- Each iteration refines the Issue content
- User decides when to exit loop