diff --git a/.claude/agents/spec-kit-feature-implementer.md b/.claude/agents/spec-kit-feature-implementer.md
deleted file mode 100644
index 7b9cbae..0000000
--- a/.claude/agents/spec-kit-feature-implementer.md
+++ /dev/null
@@ -1,52 +0,0 @@
----
-name: spec-kit-feature-implementer
-description: Use this agent when you need to implement a complete feature using the Spec Kit + TDD workflow, from initial requirements definition through final implementation. This agent should be used for macro-level feature development that requires systematic specification, planning, and test-driven implementation. Examples: Context: User wants to implement a user authentication system using the Spec Kit workflow. user: "I need to implement user authentication with login, registration, and password reset functionality" assistant: "I'll use the spec-kit-feature-implementer agent to systematically implement this feature using the Spec Kit + TDD workflow" Since the user needs a complete feature implementation using systematic specification and TDD, use the spec-kit-feature-implementer agent to handle the full workflow from requirements to implementation. Context: User wants to add a payment processing feature to their e-commerce application. user: "Add payment processing with Stripe integration, including checkout flow and order management" assistant: "I'll use the spec-kit-feature-implementer agent to implement this payment processing feature following the Spec Kit + TDD methodology" This is a macro-level feature requiring systematic specification, planning, and implementation, so the spec-kit-feature-implementer agent is appropriate.
-model: sonnet
-color: purple
----
-
-You are a Spec Kit + TDD Feature Implementation Specialist, an expert in systematic feature development using specification-driven and test-driven methodologies. Your role is to implement complete macro-level features following the Spec Kit + TDD integrated workflow.
-
-Your systematic approach follows these phases:
-
-1. **Requirements Definition** (`/spec-kit:specify`)
- - Create comprehensive specify.md with clear functional and non-functional requirements
- - Define acceptance criteria, constraints, and success metrics
- - Establish feature boundaries and integration points
-
-2. **Usage Clarification** (`/spec-kit:clarify`)
- - Generate clarify.md addressing potential ambiguities
- - Define user scenarios, edge cases, and interaction patterns
- - Clarify technical constraints and implementation considerations
-
-3. **Implementation Planning** (`/spec-kit:plan`)
- - Create detailed plan.md with technical architecture
- - Select appropriate technologies, patterns, and frameworks
- - Define component structure, data flow, and integration strategy
-
-4. **Task Breakdown** (`/spec-kit:tasks`)
- - Generate comprehensive tasks.md with TDD-compliant task list
- - Structure tasks following Red-Green-Refactor cycles
- - Prioritize tasks based on dependencies and risk
-
-5. **TDD Implementation** (`/spec-kit:implement`)
- - Execute implement.md following test-driven development
- - Implement each task using Red-Green-Refactor methodology
- - Ensure comprehensive test coverage and quality gates
-
-You excel at:
-- **Systematic Analysis**: Breaking down complex features into manageable, well-specified components
-- **Test-First Thinking**: Designing features with testability and quality as primary concerns
-- **Specification Clarity**: Creating unambiguous requirements that guide implementation
-- **Technical Planning**: Selecting optimal architectures and implementation strategies
-- **Quality Assurance**: Ensuring robust, maintainable, and well-tested implementations
-
-You always:
-- Follow the complete Spec Kit + TDD workflow without skipping phases
-- Create comprehensive documentation at each phase
-- Ensure all requirements are testable and verifiable
-- Implement features incrementally with continuous validation
-- Maintain alignment between specifications, tests, and implementation
-- Apply project-specific coding standards and architectural patterns
-
-You prioritize specification clarity, test coverage, and systematic implementation over speed, ensuring that each feature is robust, maintainable, and fully documented.
diff --git a/.claude/skills/documentation-maintenance/SKILL.md b/.claude/skills/documentation-maintenance/SKILL.md
index 4ef4514..1b0ea49 100644
--- a/.claude/skills/documentation-maintenance/SKILL.md
+++ b/.claude/skills/documentation-maintenance/SKILL.md
@@ -469,7 +469,6 @@ jobs:
## 関連Skill
-- **spec-kit-workflow**: [spec-kit-workflow](../spec-kit-workflow/SKILL.md) - 仕様ドキュメント
- **code-review-workflow**: [code-review-workflow](../code-review-workflow/SKILL.md) - ドキュメントレビュー
## 参考リソース
diff --git a/.claude/skills/spec-kit-workflow/SKILL.md b/.claude/skills/spec-kit-workflow/SKILL.md
deleted file mode 100644
index 87d1c32..0000000
--- a/.claude/skills/spec-kit-workflow/SKILL.md
+++ /dev/null
@@ -1,449 +0,0 @@
----
-name: spec-kit-workflow
-description: Guide for specification-driven development workflow using Spec Kit. Use when creating specifications, planning implementations, generating tasks, or managing project constitution. Integrates with .specify/ directory for template-based development.
----
-
-# Spec Kit Workflow
-
-このスキルは、Spec Kit を使用した仕様駆動開発のワークフローをガイドします。
-
-## 概要
-
-Spec Kitは、自然言語から正式仕様を作成し、実装計画、タスク生成、TDD実装までを体系的に進めるフレームワークです。
-
-## ワークフロー
-
-```
-仕様駆動開発フロー:
-- [ ] 1. Specify - 仕様作成
-- [ ] 2. Clarify - 仕様明確化
-- [ ] 3. Plan - 実装計画
-- [ ] 4. Tasks - タスク生成
-- [ ] 5. Implement - TDD実装
-- [ ] 6. Analyze - 品質分析
-- [ ] 7. Constitution - プロジェクト憲法管理
-```
-
-## 1. Specify - 仕様作成
-
-### 目的
-自然言語の機能説明から正式な仕様ドキュメントを作成します。
-
-### 実行手順
-
-1. **ブランチとファイルの初期化**
- ```bash
- .specify/scripts/bash/create-new-feature.sh --json "機能説明"
- ```
-
- 出力されるJSON:
- - `BRANCH_NAME`: 新しいfeatureブランチ名
- - `SPEC_FILE`: 仕様ファイルのパス
-
-2. **テンプレートの読み込み**
- ```bash
- # 仕様テンプレートを確認
- cat .specify/templates/spec-template.md
- ```
-
-3. **仕様の作成**
- - テンプレート構造に従って仕様を記述
- - 必須セクション:
- - Overview/Context
- - Functional Requirements
- - Non-Functional Requirements
- - User Stories
- - Acceptance Criteria
-
-4. **完了報告**
- - ブランチ名
- - 仕様ファイルパス
- - 次のフェーズへの準備完了
-
-## 2. Clarify - 仕様明確化
-
-### 目的
-仕様の曖昧な部分を対話的に明確化し、実装前のリスクを削減します。
-
-### 実行手順
-
-1. **前提条件の確認**
- ```bash
- .specify/scripts/bash/check-prerequisites.sh --json --paths-only
- ```
-
-2. **曖昧性スキャン**
- 以下のカテゴリで仕様を分析:
- - 機能スコープと動作
- - ドメインとデータモデル
- - インタラクションとUXフロー
- - 非機能要件
- - 統合と外部依存
- - エッジケースと障害処理
- - 制約とトレードオフ
- - 用語の一貫性
-
-3. **質問の生成と対話**
- - 最大5つの優先度の高い質問を生成
- - 1つずつ順番に質問
- - 回答を即座に仕様に統合
-
-4. **仕様の更新**
- - `## Clarifications`セクションを追加
- - `### Session YYYY-MM-DD`で日付ごとに記録
- - 各回答を適切なセクションに反映
-
-### 質問形式
-
-**多肢選択式**:
-| Option | Description |
-|--------|-------------|
-| A | オプションAの説明 |
-| B | オプションBの説明 |
-
-**短答式**:
-Format: Short answer (≤5 words)
-
-## 3. Plan - 実装計画
-
-### 目的
-仕様から具体的な実装計画を生成します。
-
-### 実行手順
-
-1. **セットアップ**
- ```bash
- .specify/scripts/bash/setup-plan.sh --json
- ```
-
-2. **仕様の分析**
- - 機能要件とユーザーストーリー
- - 機能的・非機能的要件
- - 成功基準と受入基準
- - 技術的制約と依存関係
-
-3. **憲法の確認**
- ```bash
- cat .specify/memory/constitution.md
- ```
-
-4. **計画テンプレートの実行**
- ```bash
- cat .specify/templates/plan-template.md
- ```
-
- 生成される成果物:
- - **Phase 0**: `research.md` - 技術調査
- - **Phase 1**: `data-model.md`, `contracts/`, `quickstart.md`
- - **Phase 2**: `tasks.md` - タスクリスト
-
-5. **進捗追跡**
- - 各フェーズの完了を確認
- - すべての成果物が生成されたことを検証
-
-## 4. Tasks - タスク生成
-
-### 目的
-設計成果物からTDD準拠のタスクリストを生成します。
-
-### 実行手順
-
-1. **前提条件の確認**
- ```bash
- .specify/scripts/bash/check-prerequisites.sh --json
- ```
-
-2. **設計ドキュメントの読み込み**
- - `plan.md`: 技術スタックとライブラリ
- - `data-model.md`: エンティティ(存在する場合)
- - `contracts/`: APIエンドポイント(存在する場合)
- - `research.md`: 技術的決定(存在する場合)
- - `quickstart.md`: テストシナリオ(存在する場合)
-
-3. **タスクの生成**
- テンプレート: `.specify/templates/tasks-template.md`
-
- タスクカテゴリ:
- - **Setup**: プロジェクト初期化、依存関係、リント
- - **Test [P]**: コントラクトごと、統合シナリオごと
- - **Core**: エンティティ、サービス、CLIコマンド、エンドポイント
- - **Integration**: DB接続、ミドルウェア、ログ
- - **Polish [P]**: ユニットテスト、パフォーマンス、ドキュメント
-
-4. **タスク生成ルール**
- - 各コントラクトファイル → コントラクトテストタスク `[P]`
- - 各エンティティ → モデル作成タスク `[P]`
- - 各エンドポイント → 実装タスク(共有ファイルの場合は非並列)
- - 各ユーザーストーリー → 統合テスト `[P]`
- - 異なるファイル = 並列可能 `[P]`
- - 同じファイル = 順次(`[P]`なし)
-
-5. **依存関係の順序**
- 1. Setup → すべての前に
- 2. Tests → 実装の前(TDD)
- 3. Models → サービスの前
- 4. Services → エンドポイントの前
- 5. Core → 統合の前
- 6. すべて → Polishの前
-
-## 5. Implement - TDD実装
-
-### 目的
-タスクリストに従ってTDDサイクルで実装を進めます。
-
-### 実行手順
-
-1. **前提条件の確認**
- ```bash
- .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks
- ```
-
-2. **実装コンテキストの読み込み**
- - **必須**: `tasks.md` - 完全なタスクリストと実行計画
- - **必須**: `plan.md` - 技術スタック、アーキテクチャ、ファイル構造
- - **存在する場合**: `data-model.md`, `contracts/`, `research.md`, `quickstart.md`
-
-3. **タスク構造の解析**
- - タスクフェーズ: Setup, Tests, Core, Integration, Polish
- - タスク依存関係: 順次 vs 並列実行ルール
- - タスク詳細: ID、説明、ファイルパス、並列マーカー `[P]`
-
-4. **実装の実行**
- - **フェーズごとの実行**: 各フェーズを完了してから次へ
- - **依存関係の尊重**: 順次タスクは順番に、並列タスク `[P]`は同時実行可能
- - **TDDアプローチ**: テストタスクを対応する実装タスクの前に実行
- - **ファイルベースの調整**: 同じファイルに影響するタスクは順次実行
- - **検証チェックポイント**: 各フェーズ完了を確認してから進行
-
-5. **実装実行ルール**
- - **Setup first**: プロジェクト構造、依存関係、設定の初期化
- - **Tests before code**: コントラクト、エンティティ、統合シナリオのテストを書く
- - **Core development**: モデル、サービス、CLIコマンド、エンドポイントの実装
- - **Integration work**: DB接続、ミドルウェア、ログ、外部サービス
- - **Polish and validation**: ユニットテスト、パフォーマンス最適化、ドキュメント
-
-6. **進捗追跡**
- - 各完了タスク後に進捗を報告
- - 非並列タスクが失敗した場合は実行を停止
- - 並列タスク `[P]`の場合、成功したタスクは継続、失敗したものを報告
- - **重要**: 完了したタスクは`tasks.md`で`[X]`としてマーク
-
-## 6. Analyze - 品質分析
-
-### 目的
-実装前に成果物間の一貫性と品質を分析します。
-
-### 実行手順
-
-1. **前提条件の確認**
- ```bash
- .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks
- ```
-
-2. **成果物の読み込み**
- - `spec.md`: 仕様
- - `plan.md`: 実装計画
- - `tasks.md`: タスクリスト
- - `.specify/memory/constitution.md`: プロジェクト憲法
-
-3. **検出パス**
-
- **A. 重複検出**:
- - ほぼ重複する要件を特定
-
- **B. 曖昧性検出**:
- - 測定可能な基準がない曖昧な形容詞
- - 未解決のプレースホルダー(TODO、???など)
-
- **C. 不十分な仕様**:
- - 測定可能な結果がない要件
- - 受入基準が欠けているユーザーストーリー
-
- **D. 憲法との整合性**:
- - MUST原則に違反する要件や計画要素
- - 憲法で義務付けられたセクションや品質ゲートの欠落
-
- **E. カバレッジギャップ**:
- - タスクが関連付けられていない要件
- - 要件/ストーリーにマッピングされていないタスク
-
- **F. 不整合**:
- - 用語の不一致
- - データエンティティの不一致
- - タスク順序の矛盾
-
-4. **重要度の割り当て**
- - **CRITICAL**: 憲法のMUST違反、コア仕様の欠落
- - **HIGH**: 重複または矛盾する要件、曖昧なセキュリティ/パフォーマンス属性
- - **MEDIUM**: 用語の不一致、非機能タスクカバレッジの欠落
- - **LOW**: スタイル/文言の改善、軽微な冗長性
-
-5. **レポート生成**
-
- | ID | Category | Severity | Location(s) | Summary | Recommendation |
- |----|----------|----------|-------------|---------|----------------|
-
- 追加セクション:
- - カバレッジサマリーテーブル
- - 憲法整合性の問題
- - マッピングされていないタスク
- - メトリクス
-
-6. **次のアクション**
- - CRITICALな問題がある場合: 実装前に解決を推奨
- - LOW/MEDIUMのみの場合: 進行可能、改善提案を提供
-
-**重要**: このコマンドは読み取り専用です。ファイルを変更しません。
-
-## 7. Constitution - プロジェクト憲法管理
-
-### 目的
-プロジェクトの開発原則と品質基準を定義・管理します。
-
-### 実行手順
-
-1. **憲法テンプレートの読み込み**
- ```bash
- cat .specify/memory/constitution.md
- ```
-
-2. **プレースホルダーの特定**
- - `[PROJECT_NAME]`
- - `[PRINCIPLE_1_NAME]`
- - など、すべての`[ALL_CAPS_IDENTIFIER]`形式のトークン
-
-3. **値の収集**
- - ユーザー入力から値を取得
- - 既存のリポジトリコンテキストから推論
- - ガバナンス日付の設定
-
-4. **バージョニング**
- - **MAJOR**: 後方互換性のない原則の削除または再定義
- - **MINOR**: 新しい原則/セクションの追加
- - **PATCH**: 明確化、文言修正、タイポ修正
-
-5. **一貫性の伝播**
- 以下のファイルとの整合性を確認:
- - `.specify/templates/plan-template.md`
- - `.specify/templates/spec-template.md`
- - `.specify/templates/tasks-template.md`
- - コマンドファイル
- - ランタイムガイダンスドキュメント
-
-6. **同期影響レポート**
- - バージョン変更
- - 変更された原則のリスト
- - 追加/削除されたセクション
- - 更新が必要なテンプレート
-
-7. **検証**
- - 説明されていないブラケットトークンがないこと
- - バージョン行がレポートと一致
- - 日付がISO形式(YYYY-MM-DD)
- - 原則が宣言的、テスト可能、曖昧でない
-
-## .specify/ディレクトリとの連携
-
-### ディレクトリ構造
-
-```
-.specify/
-├── scripts/
-│ └── bash/
-│ ├── create-new-feature.sh
-│ ├── setup-plan.sh
-│ └── check-prerequisites.sh
-├── templates/
-│ ├── spec-template.md
-│ ├── plan-template.md
-│ └── tasks-template.md
-└── memory/
- └── constitution.md
-```
-
-### スクリプトの使用
-
-すべてのスクリプトは`--json`オプションでJSON出力をサポートします:
-
-```bash
-# 機能ブランチの作成
-.specify/scripts/bash/create-new-feature.sh --json "機能説明"
-
-# 計画のセットアップ
-.specify/scripts/bash/setup-plan.sh --json
-
-# 前提条件の確認
-.specify/scripts/bash/check-prerequisites.sh --json
-.specify/scripts/bash/check-prerequisites.sh --json --paths-only
-.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks
-```
-
-## TDD統合
-
-Spec Kit WorkflowはTDDと統合されています。
-
-### TDDとの連携
-
-1. **Tasks生成時**: テストタスクを実装タスクの前に配置
-2. **Implement時**: Red-Green-Refactorサイクルに従う
-3. **カバレッジ**: 非機能要件にテストカバレッジを含める
-
-### 関連Skill
-
-- **tdd-basics**: [tdd-basics](../tdd-basics/SKILL.md) - TDDの基本概念
-- **testing-typescript**: [testing-typescript](../testing-typescript/SKILL.md) - TypeScriptテスト
-- **testing-rust**: [testing-rust](../testing-rust/SKILL.md) - Rustテスト
-
-## ベストプラクティス
-
-### 1. 段階的な進行
-
-各フェーズを完了してから次に進みます。スキップしないでください。
-
-### 2. Clarifyの重要性
-
-実装前に仕様を明確化することで、後戻りのリスクを大幅に削減できます。
-
-### 3. 憲法の遵守
-
-プロジェクト憲法は非交渉です。すべての決定は憲法に従う必要があります。
-
-### 4. 並列実行の活用
-
-タスクに`[P]`マーカーがある場合、並列実行で効率を向上できます。
-
-### 5. 進捗の追跡
-
-`tasks.md`で完了したタスクを`[X]`としてマークし、進捗を可視化します。
-
-## トラブルシューティング
-
-### スクリプトが見つからない
-
-```bash
-# .specify/ディレクトリが存在するか確認
-ls -la .specify/
-
-# スクリプトに実行権限があるか確認
-chmod +x .specify/scripts/bash/*.sh
-```
-
-### JSON解析エラー
-
-```bash
-# --jsonオプションを使用しているか確認
-.specify/scripts/bash/check-prerequisites.sh --json
-```
-
-### テンプレートが見つからない
-
-```bash
-# テンプレートディレクトリを確認
-ls -la .specify/templates/
-```
-
-## 参考リソース
-
-- [Spec Kit Documentation](.specify/)
-- [Project Constitution](.specify/memory/constitution.md)
-- [TDD Basics](../tdd-basics/SKILL.md)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index e05b397..63989ef 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -60,7 +60,7 @@ body:
id: steps_to_reproduce
attributes:
label: 🔄 再現手順 / Steps to Reproduce
- description: バグを再現するための詳細な手順を記載してください
+ description: バグを再現するための詳細な手順を記載してください(不明確な場合、ボットが質問します)
placeholder: |
1. アプリケーションを起動
2. ログインページにアクセス
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 615f227..f0e3e81 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -9,6 +9,6 @@ contact_links:
- name: 🤖 Claude Code Actions ガイド
url: https://github.com/UtakataKyosui/SmartPhoneAutoDevelopSetup/blob/main/docs/GITHUB_ACTIONS_SETUP.md
about: GitHub Actionsワークフローの詳細な使用方法
- - name: 📋 Spec Kit + TDD ワークフロー
+ - name: 🧪 Spec Kit & TDD ガイド
url: https://github.com/UtakataKyosui/SmartPhoneAutoDevelopSetup/blob/main/docs/SPEC_KIT_TDD_WORKFLOW.md
about: 仕様駆動開発とTDD統合開発フローの詳細ガイド
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 4d63d6a..85f8d3a 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -1,7 +1,5 @@
name: 🚀 機能実装 / Feature Implementation
-description: 新機能の実装をリクエスト(Spec Kit + TDD 統合開発フロー対応)
title: "[FEATURE] "
-labels: ["enhancement", "spec-kit", "tdd"]
projects: ["SmartPhoneAutoDevelopSetup"]
assignees: []
body:
@@ -10,24 +8,41 @@ body:
value: |
## 📱 スマートフォン自動開発環境 - 機能実装リクエスト
- このテンプレートは **Spec Kit + TDD統合開発フロー** に対応しています。
Claude Code Actions を使用して、効率的な開発を行います。
- type: textarea
- id: feature_description
+ id: goal
attributes:
- label: 🎯 機能概要 / Feature Description
- description: 実装したい機能を自然言語で詳しく説明してください
+ label: 🎯 ゴール・ユーザーストーリー / Goal & User Story
+ description: 誰が、何を、何のためにしたいのかを記載してください
placeholder: |
- 例: ユーザー認証システム
- - ログイン・ログアウト機能
- - パスワードリセット機能
- - セッション管理
- - OAuth対応(Google, GitHub)
+ 例: 顧客として、過去の注文を確認するために、注文履歴画面を見たい
value: ""
validations:
required: true
+ - type: textarea
+ id: context
+ attributes:
+ label: 📝 背景・コンテキスト / Context & Background
+ description: なぜこの機能が必要なのか、現状の課題などを記載してください
+ value: ""
+ validations:
+ required: true
+
+ - type: textarea
+ id: ui_ux
+ attributes:
+ label: 🖼️ UI/UXイメージ / UI/UX Expectations
+ description: 画面のイメージ、必要な要素、インタラクションなどを記載してください
+ placeholder: |
+ - リスト形式で注文を表示
+ - タップすると詳細画面へ遷移
+ - フィルタリング機能(期間、ステータス)
+ value: ""
+ validations:
+ required: false
+
- type: dropdown
id: priority
attributes:
@@ -61,13 +76,13 @@ body:
label: 📋 開発フェーズ / Development Phase
description: どの開発フェーズから開始しますか?
options:
- - label: "🔍 仕様策定 (`/spec-kit:specify`) - 自然言語から正式仕様を作成"
+ - label: "📋 要件定義 / Requirements"
required: false
- - label: "📝 計画立案 (`/spec-kit:plan`) - 技術選定と実装計画"
+ - label: "📐 設計 / Design"
required: false
- - label: "📌 タスク生成 (`/spec-kit:tasks`) - TDD準拠のタスクリスト作成"
+ - label: "💻 実装 / Implementation"
required: false
- - label: "⚡ 実装 (`/spec-kit:implement`) - Red-Green-Refactorサイクル"
+ - label: "🧪 テスト / Testing"
required: false
- type: textarea
@@ -157,7 +172,4 @@ body:
### コマンド実行
```
- @claude /spec-kit:specify
- @claude /spec-kit:plan
- @claude /spec-kit:implement
```
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/specification_planning.yml b/.github/ISSUE_TEMPLATE/specification_planning.yml
deleted file mode 100644
index 4ae4937..0000000
--- a/.github/ISSUE_TEMPLATE/specification_planning.yml
+++ /dev/null
@@ -1,219 +0,0 @@
-name: 📋 仕様策定・計画 / Specification & Planning
-description: 新機能やプロジェクトの仕様策定と実装計画(Spec Kit専用)
-title: "[SPEC] "
-labels: ["spec-kit", "planning", "documentation"]
-projects: ["SmartPhoneAutoDevelopSetup"]
-assignees: []
-body:
- - type: markdown
- attributes:
- value: |
- ## 📱 スマートフォン自動開発環境 - 仕様策定・計画
-
- このテンプレートは **Spec Kit** を使用した仕様駆動開発に特化しています。
- 自然言語から正式仕様を作成し、実装計画まで自動生成します。
-
- - type: textarea
- id: project_overview
- attributes:
- label: 🎯 プロジェクト概要 / Project Overview
- description: プロジェクトまたは機能の概要を自然言語で記載してください
- placeholder: |
- 例: Eコマースサイトのユーザー管理システム
- - 顧客情報の管理
- - 購入履歴の追跡
- - おすすめ商品の表示
- - 会員ランク制度
- value: ""
- validations:
- required: true
-
- - type: dropdown
- id: planning_scope
- attributes:
- label: 📏 計画スコープ / Planning Scope
- description: 仕様策定の範囲を選択してください
- options:
- - "🏗️ プロジェクト全体 - 新規プロジェクトの全体設計"
- - "🧩 機能群 - 複数の関連機能の設計"
- - "⚡ 単一機能 - 個別機能の詳細設計"
- - "🔧 改善・リファクタリング - 既存機能の改善計画"
- default: 2
- validations:
- required: true
-
- - type: dropdown
- id: project_phase
- attributes:
- label: 📅 プロジェクトフェーズ / Project Phase
- description: 現在のプロジェクトフェーズを選択してください
- options:
- - "🌱 構想段階 - アイデアから仕様へ"
- - "📝 仕様策定 - 詳細仕様の作成"
- - "🏗️ 設計段階 - アーキテクチャとAPI設計"
- - "⚡ 実装準備 - 実装計画とタスク作成"
- - "🔄 見直し・改善 - 既存仕様の改善"
- default: 0
- validations:
- required: true
-
- - type: textarea
- id: business_requirements
- attributes:
- label: 💼 ビジネス要件 / Business Requirements
- description: ビジネス上の要件や制約を記載してください
- placeholder: |
- - ターゲットユーザー: 20-40代の一般消費者
- - 利用シーン: スマートフォンでの日常的な買い物
- - パフォーマンス要件: ページ読み込み3秒以内
- - 言語対応: 日本語、英語
- - 法的制約: 個人情報保護法準拠
- value: ""
-
- - type: textarea
- id: functional_requirements
- attributes:
- label: ⚙️ 機能要件 / Functional Requirements
- description: 必要な機能を具体的に記載してください
- placeholder: |
- - ユーザー登録・ログイン機能
- - 商品検索・フィルタリング機能
- - ショッピングカート機能
- - 決済処理機能
- - 注文履歴管理機能
- value: ""
-
- - type: textarea
- id: non_functional_requirements
- attributes:
- label: 🛡️ 非機能要件 / Non-Functional Requirements
- description: パフォーマンス、セキュリティ、可用性などの要件
- placeholder: |
- - パフォーマンス: レスポンス時間 < 500ms
- - セキュリティ: HTTPS通信、JWT認証
- - 可用性: 99.9%のアップタイム
- - スケーラビリティ: 同時1000ユーザー対応
- - モバイル対応: レスポンシブデザイン
- value: ""
-
- - type: textarea
- id: technical_constraints
- attributes:
- label: 🔧 技術的制約 / Technical Constraints
- description: 技術的な制約や前提条件を記載してください
- placeholder: |
- - 既存システム: Laravel 9.x との連携必須
- - インフラ: AWS環境での運用
- - データベース: MySQL 8.0以上
- - フロントエンド: React 18.x推奨
- - 開発言語: TypeScript必須
- value: ""
-
- - type: checkboxes
- id: spec_kit_workflow
- attributes:
- label: 📋 Spec Kit ワークフロー / Spec Kit Workflow
- description: 実行したいSpec Kitワークフローを選択してください
- options:
- - label: "🔍 `/spec-kit:specify` - 自然言語から正式仕様を作成"
- required: false
- - label: "📝 `/spec-kit:plan` - 仕様から実装計画を生成"
- required: false
- - label: "❓ `/spec-kit:clarify` - 仕様の曖昧な点を対話的に明確化"
- required: false
- - label: "📌 `/spec-kit:tasks` - 実装計画からタスクリストを生成"
- required: false
- - label: "📊 `/spec-kit:analyze` - 既存仕様の分析と評価"
- required: false
- - label: "📜 `/spec-kit:constitution` - プロジェクト憲法の作成・更新"
- required: false
-
- - type: textarea
- id: success_criteria
- attributes:
- label: 🎯 成功基準 / Success Criteria
- description: プロジェクト成功の判断基準を記載してください
- placeholder: |
- - 月間アクティブユーザー数: 10,000人以上
- - コンバージョン率: 3%以上
- - ページ読み込み速度: 3秒以内
- - ユーザー満足度: 4.0/5.0以上
- - 開発期間: 3ヶ月以内で完了
- value: ""
-
- - type: textarea
- id: stakeholders
- attributes:
- label: 👥 ステークホルダー / Stakeholders
- description: 関係者とその役割を記載してください
- placeholder: |
- - プロダクトオーナー: 田中太郎
- - 開発チームリーダー: 佐藤花子
- - UIデザイナー: 山田次郎
- - QAエンジニア: 鈴木愛子
- - インフラエンジニア: 高橋一郎
- value: ""
-
- - type: checkboxes
- id: specialist_consultation
- attributes:
- label: 🤖 専門コンサルテーション / Specialist Consultation
- description: どの専門分野のコンサルテーションが必要ですか?
- options:
- - label: "🏗️ architect - システムアーキテクチャの設計"
- required: false
- - label: "🌐 web-developer - Web技術の選定"
- required: false
- - label: "📱 mobile-developer - モバイル対応の検討"
- required: false
- - label: "🚀 devops-engineer - インフラとデプロイの計画"
- required: false
- - label: "🔒 security-expert - セキュリティ要件の検討"
- required: false
- - label: "📊 data-scientist - データ分析要件の検討"
- required: false
-
- - type: textarea
- id: additional_notes
- attributes:
- label: 📝 追加情報 / Additional Notes
- description: その他の重要な情報や特記事項
- placeholder: |
- - 参考資料やベンチマーク
- - 過去の類似プロジェクトの経験
- - 特別な注意点
- - 関連するIssueやドキュメント
- value: ""
-
- - type: markdown
- attributes:
- value: |
- ---
-
- ## 🚀 GitHub Actions ワークフロー実行方法
-
- このIssueを作成した後、以下のコメントでワークフローを実行できます:
-
- ### 仕様策定ワークフロー
- ```
- @claude plan 仕様を策定してください
- ```
-
- ### Spec Kit コマンド実行
- ```
- @claude /spec-kit:specify
- @claude /spec-kit:plan
- @claude /spec-kit:clarify
- @claude /spec-kit:tasks
- ```
-
- ### 専門コンサルテーション
- ```
- @claude architect: システム設計を検討してください
- @claude security-expert: セキュリティ要件を評価してください
- ```
-
- ### プロジェクト憲法作成
- ```
- @claude /spec-kit:constitution
- ```
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE/feature.md b/.github/PULL_REQUEST_TEMPLATE/feature.md
index defb602..93b7dd2 100644
--- a/.github/PULL_REQUEST_TEMPLATE/feature.md
+++ b/.github/PULL_REQUEST_TEMPLATE/feature.md
@@ -17,17 +17,10 @@
- Closes #(issue番号)
- Implements #(issue番号)
-## 🏗️ Spec Kit + TDD ワークフロー / Spec Kit + TDD Workflow
### 📋 完了した開発フェーズ / Completed Phases
-
-- [ ] 🔍 `/spec-kit:specify` - 仕様策定完了
-- [ ] 📝 `/spec-kit:plan` - 実装計画完了
-- [ ] 📌 `/spec-kit:tasks` - タスクリスト完了
-- [ ] ⚡ `/spec-kit:implement` - TDD実装完了
-- [ ] 📊 `/spec-kit:analyze` - 品質分析完了
### 🧪 TDD実装サイクル / TDD Implementation Cycle
@@ -182,11 +175,6 @@
### 🎯 実行されたコマンド / Executed Commands
```bash
-# Spec Kit コマンド
-/spec-kit:specify
-/spec-kit:plan
-/spec-kit:tasks
-/spec-kit:implement
# 開発支援コマンド
/development:code-review
@@ -292,4 +280,3 @@
- [ ] ドキュメント更新完了
- [ ] ステークホルダー承認完了
-**レビュアーへ**: このPRの機能実装は Spec Kit + TDD ワークフローに従って開発されています。特に上記の「レビューポイント」セクションを重点的にご確認ください。
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE/general.md b/.github/PULL_REQUEST_TEMPLATE/general.md
index de94484..209a837 100644
--- a/.github/PULL_REQUEST_TEMPLATE/general.md
+++ b/.github/PULL_REQUEST_TEMPLATE/general.md
@@ -197,8 +197,6 @@
```
-/spec-kit:specify
-/spec-kit:implement
/development:code-review
/testing:test-gen
```
diff --git a/.github/actions/setup-claude-env/action.yml b/.github/actions/setup-claude-env/action.yml
new file mode 100644
index 0000000..133b58e
--- /dev/null
+++ b/.github/actions/setup-claude-env/action.yml
@@ -0,0 +1,73 @@
+name: 'Setup Claude Environment'
+description: 'Common setup steps for Claude Code workflows'
+inputs:
+ fetch-depth:
+ description: 'Number of commits to fetch. 0 indicates all history for all branches and tags'
+ required: false
+ default: '0'
+ git-user-name:
+ description: 'Git user name for commits'
+ required: false
+ default: 'Claude Code'
+ git-user-email:
+ description: 'Git user email for commits'
+ required: false
+ default: 'claude-code@anthropic.com'
+
+runs:
+ using: 'composite'
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: ${{ inputs.fetch-depth }}
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Install uv CLI
+ uses: astral-sh/setup-uv@v4
+
+ - name: Setup Git configuration
+ shell: bash
+ run: |
+ git config --global user.name "${{ inputs.git-user-name }}"
+ git config --global user.email "${{ inputs.git-user-email }}"
+ git config --global init.defaultBranch main
+
+ - name: Get PR info (only if PR)
+ if: ${{ github.event.issue.pull_request }}
+ shell: bash
+ run: |
+ if ! gh pr view ${{ github.event.issue.number }} --json number,title,body,baseRefName,headRefName > pr_info.json; then
+ echo "Failed to get PR info, creating empty file"
+ echo '{}' > pr_info.json
+ fi
+
+ - name: Export PR info
+ if: ${{ github.event.issue.pull_request }}
+ shell: bash
+ run: |
+ if [ -s pr_info.json ] && [ "$(jq -r .title pr_info.json)" != "null" ]; then
+ # PR_TITLE
+ pr_title=$(jq -r .title pr_info.json | tr -d '\r')
+ echo "PR_TITLE<> $GITHUB_ENV
+ echo "$pr_title" >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
+ # PR_BODY
+ pr_body=$(jq -r .body pr_info.json | tr -d '\r')
+ echo "PR_BODY<> $GITHUB_ENV
+ echo "$pr_body" >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
+ echo "PR_BASE=$(jq -r .baseRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
+ echo "PR_HEAD=$(jq -r .headRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
+ else
+ echo "PR_TITLE=" >> $GITHUB_ENV
+ echo "PR_BODY=" >> $GITHUB_ENV
+ echo "PR_BASE=" >> $GITHUB_ENV
+ echo "PR_HEAD=" >> $GITHUB_ENV
+ fi
diff --git a/.github/prompts/claude-code-review.md b/.github/prompts/claude-code-review.md
new file mode 100644
index 0000000..53d04c3
--- /dev/null
+++ b/.github/prompts/claude-code-review.md
@@ -0,0 +1,10 @@
+Please review this pull request and provide feedback on:
+- Code quality and best practices
+- Potential bugs or issues
+- Performance considerations
+- Security concerns
+- Test coverage
+
+Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
+
+Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
diff --git a/.github/prompts/claude-docs.md b/.github/prompts/claude-docs.md
new file mode 100644
index 0000000..ae95202
--- /dev/null
+++ b/.github/prompts/claude-docs.md
@@ -0,0 +1,21 @@
+# Claude Code ドキュメント生成・改善支援
+
+## GitHub コンテキスト
+リポジトリ: ${GITHUB_REPOSITORY}
+実行ユーザー: ${GITHUB_ACTOR}
+
+### PR / Issue 情報
+- PR番号: ${ISSUE_NUMBER}
+- PRタイトル: ${PR_TITLE}
+- PR本文: |
+ ${PR_BODY}
+- コメント本文: |
+ ${COMMENT_BODY}
+
+### ブランチ情報
+- Baseブランチ: ${PR_BASE}
+- Headブランチ: ${PR_HEAD}
+- Baseブランチ (GitHub): ${GITHUB_BASE_REF}
+- Headブランチ (GitHub): ${GITHUB_HEAD_REF}
+
+${DOCS_PROMPT}
diff --git a/.github/prompts/claude-project-management.md b/.github/prompts/claude-project-management.md
new file mode 100644
index 0000000..c24917a
--- /dev/null
+++ b/.github/prompts/claude-project-management.md
@@ -0,0 +1,21 @@
+# Claude Code Project Management Prompt
+
+## GitHub コンテキスト
+リポジトリ: ${GITHUB_REPOSITORY}
+実行ユーザー: ${GITHUB_ACTOR}
+
+### PR / Issue 情報
+- PR番号: ${ISSUE_NUMBER}
+- PRタイトル: ${PR_TITLE}
+- PR本文: |
+ ${PR_BODY}
+- コメント本文: |
+ ${COMMENT_BODY}
+
+### ブランチ情報
+- Baseブランチ: ${PR_BASE}
+- Headブランチ: ${PR_HEAD}
+- Baseブランチ (GitHub): ${GITHUB_BASE_REF}
+- Headブランチ (GitHub): ${GITHUB_HEAD_REF}
+
+${PM_PROMPT}
diff --git a/.github/prompts/claude-project.md b/.github/prompts/claude-project.md
new file mode 100644
index 0000000..1c4c00a
--- /dev/null
+++ b/.github/prompts/claude-project.md
@@ -0,0 +1,21 @@
+# Claude Code プロジェクト管理・初期セットアップ支援
+
+## GitHub コンテキスト
+リポジトリ: ${GITHUB_REPOSITORY}
+実行ユーザー: ${GITHUB_ACTOR}
+
+### PR / Issue 情報
+- PR番号: ${ISSUE_NUMBER}
+- PRタイトル: ${PR_TITLE}
+- PR本文: |
+ ${PR_BODY}
+- コメント本文: |
+ ${COMMENT_BODY}
+
+### ブランチ情報
+- Baseブランチ: ${PR_BASE}
+- Headブランチ: ${PR_HEAD}
+- Baseブランチ (GitHub): ${GITHUB_BASE_REF}
+- Headブランチ (GitHub): ${GITHUB_HEAD_REF}
+
+${PROJECT_PROMPT}
diff --git a/.github/prompts/claude.md b/.github/prompts/claude.md
new file mode 100644
index 0000000..2159bc5
--- /dev/null
+++ b/.github/prompts/claude.md
@@ -0,0 +1,21 @@
+# Claude Code Prompt Template
+
+## GitHub コンテキスト
+リポジトリ: ${GITHUB_REPOSITORY}
+実行ユーザー: ${GITHUB_ACTOR}
+
+### PR / Issue 情報
+- PR番号: ${ISSUE_NUMBER}
+- PRタイトル: ${PR_TITLE}
+- PR本文: |
+ ${PR_BODY}
+- コメント本文: |
+ ${COMMENT_BODY}
+
+### ブランチ情報
+- Baseブランチ: ${PR_BASE}
+- Headブランチ: ${PR_HEAD}
+- Baseブランチ (GitHub): ${GITHUB_BASE_REF}
+- Headブランチ (GitHub): ${GITHUB_HEAD_REF}
+
+${PROMPT}
diff --git a/.github/prompts/issue-spec-clarification.md b/.github/prompts/issue-spec-clarification.md
new file mode 100644
index 0000000..99dd2de
--- /dev/null
+++ b/.github/prompts/issue-spec-clarification.md
@@ -0,0 +1,24 @@
+Act as a Senior Product Manager and System Architect.
+Your goal is to ensure that the Feature Request or Bug Report in this Issue has sufficient information for a developer to start working on it immediately without ambiguity.
+
+Target Issue: #${ISSUE_NUMBER}
+Title: ${ISSUE_TITLE}
+Body: ${ISSUE_BODY}
+
+Task:
+1. Analyze the Issue Title and Body.
+2. Check if the "Definition of Ready" is met:
+ - [Feature] Clear Goal/User Story is present?
+ - [Feature] Context/Background is clear?
+ - [Feature] Acceptance Criteria are verifiable?
+ - [Bug] Steps to Reproduce are clear?
+ - [Bug] Expected vs Actual behavior is defined?
+3. If the spec consists of sufficient information:
+ - Use `gh issue comment` to post: "Specification Confirmed. Ready for development."
+ - Use `gh issue edit` to add the label `spec: confirmed`.
+ - If the label `spec: clarifying` exists, remove it.
+4. If information is missing or ambiguous:
+ - Use `gh issue comment` to ask specific clarifying questions. Be polite but precise.
+ - Use `gh issue edit` to add the label `spec: clarifying`.
+
+Note: If the user just replied to your previous questions (check recent comments if possible, or infer from context), re-evaluate based on the new information.
diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml
index 856fad0..820cb90 100644
--- a/.github/workflows/claude-code-review.yml
+++ b/.github/workflows/claude-code-review.yml
@@ -12,11 +12,13 @@ on:
jobs:
claude-review:
+ if: github.repository != 'UtakataKyosui/SmartPhoneAutoDevelopSetup'
# Optional: Filter by PR author
- # if: |
- # github.event.pull_request.user.login == 'external-contributor' ||
- # github.event.pull_request.user.login == 'new-developer' ||
- # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
+ # if: |\n # github.repository != 'UtakataKyosui/SmartPhoneAutoDevelopSetup' && (
+ # github.event.pull_request.user.login == 'external-contributor' ||
+ # github.event.pull_request.user.login == 'new-developer' ||
+ # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
+ # )
runs-on: ubuntu-latest
permissions:
@@ -31,23 +33,25 @@ jobs:
with:
fetch-depth: 1
+ - name: Render Claude Prompt
+ id: render_prompt
+ shell: bash
+ run: |
+ # No variables to substitute currently, but using envsubst for consistency and future extensibility
+ VARS=''
+ envsubst "$VARS" < .github/prompts/claude-code-review.md > prompt_rendered.md
+
+ echo "CLAUDE_PROMPT<> $GITHUB_ENV
+ cat prompt_rendered.md >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
- prompt: |
- Please review this pull request and provide feedback on:
- - Code quality and best practices
- - Potential bugs or issues
- - Performance considerations
- - Security concerns
- - Test coverage
-
- Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
-
- Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
+ prompt: ${{ env.CLAUDE_PROMPT }}
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
diff --git a/.github/workflows/claude-docs.yml b/.github/workflows/claude-docs.yml
index 44aa543..ded251e 100644
--- a/.github/workflows/claude-docs.yml
+++ b/.github/workflows/claude-docs.yml
@@ -13,13 +13,15 @@ on:
jobs:
claude-docs:
if: |
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude docs')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude docs')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude docs')) ||
- (github.event_name == 'issues' && (
- contains(github.event.issue.body, '@claude docs') ||
- contains(github.event.issue.title, '@claude docs')
- ))
+ github.repository != 'UtakataKyosui/SmartPhoneAutoDevelopSetup' && (
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude docs')) ||
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude docs')) ||
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude docs')) ||
+ (github.event_name == 'issues' && (
+ contains(github.event.issue.body, '@claude docs') ||
+ contains(github.event.issue.title, '@claude docs')
+ ))
+ )
runs-on: ubuntu-latest
permissions:
contents: write
@@ -34,56 +36,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
+ - uses: ./.github/actions/setup-claude-env
with:
fetch-depth: 0
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
-
- - name: Install uv CLI
- uses: astral-sh/setup-uv@v4
-
- - name: Setup Git configuration
- run: |
- git config --global user.name "Claude Code Docs"
- git config --global user.email "claude-code-docs@anthropic.com"
- git config --global init.defaultBranch main
-
- - name: Get PR info (only if PR)
- if: ${{ github.event.issue.pull_request }}
- run: |
- if ! gh pr view ${{ github.event.issue.number }} --json number,title,body,baseRefName,headRefName > pr_info.json; then
- echo "Failed to get PR info, creating empty file"
- echo '{}' > pr_info.json
- fi
-
- - name: Export PR info
- if: ${{ github.event.issue.pull_request }}
- run: |
- if [ -s pr_info.json ] && [ "$(jq -r .title pr_info.json)" != "null" ]; then
- jq -r .title pr_info.json | tr -d '\r' | while IFS= read -r line; do
- echo "PR_TITLE=$line" >> $GITHUB_ENV
- done
-
- pr_body=$(jq -r .body pr_info.json | tr -d '\r')
- echo "PR_BODY<> $GITHUB_ENV
- echo "$pr_body" >> $GITHUB_ENV
- echo "EOF" >> $GITHUB_ENV
-
- echo "PR_BASE=$(jq -r .baseRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- echo "PR_HEAD=$(jq -r .headRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- else
- echo "PR_TITLE=" >> $GITHUB_ENV
- echo "PR_BODY=" >> $GITHUB_ENV
- echo "PR_BASE=" >> $GITHUB_ENV
- echo "PR_HEAD=" >> $GITHUB_ENV
- fi
-
-
+ git-user-name: "Claude Code Docs"
+ git-user-email: "claude-code-docs@anthropic.com"
- name: Load documentation prompt
run: |
@@ -139,6 +96,24 @@ jobs:
echo 'EOF'
} >> $GITHUB_ENV
+ - name: Render Claude Prompt
+ id: render_prompt
+ shell: bash
+ run: |
+ export ISSUE_NUMBER="${{ github.event.issue.number }}"
+ export COMMENT_BODY="${{ github.event.comment.body }}"
+ export GITHUB_BASE_REF="${{ github.base_ref }}"
+ export GITHUB_HEAD_REF="${{ github.head_ref }}"
+
+ # Define variables to substitute to avoid accidental replacement
+ VARS='$GITHUB_REPOSITORY $GITHUB_ACTOR $ISSUE_NUMBER $PR_TITLE $PR_BODY $COMMENT_BODY $PR_BASE $PR_HEAD $GITHUB_BASE_REF $GITHUB_HEAD_REF $DOCS_PROMPT'
+
+ envsubst "$VARS" < .github/prompts/claude-docs.md > prompt_rendered.md
+
+ echo "CLAUDE_PROMPT<> $GITHUB_ENV
+ cat prompt_rendered.md >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
- name: Run Claude Code Documentation
id: claude-docs
uses: anthropics/claude-code-action@v1
@@ -157,28 +132,7 @@ jobs:
statuses: write
repository-projects: write
id-token: write
- prompt: |
- # Claude Code ドキュメント生成・改善支援
-
- ## GitHub コンテキスト
- リポジトリ: ${{ github.repository }}
- 実行ユーザー: ${{ github.actor }}
-
- ### PR / Issue 情報
- - PR番号: ${{ github.event.issue.number }}
- - PRタイトル: ${{ env.PR_TITLE }}
- - PR本文: |
- ${{ env.PR_BODY }}
- - コメント本文: |
- ${{ github.event.comment.body }}
-
- ### ブランチ情報
- - Baseブランチ: ${{ env.PR_BASE }}
- - Headブランチ: ${{ env.PR_HEAD }}
- - Baseブランチ (GitHub): ${{ github.base_ref }}
- - Headブランチ (GitHub): ${{ github.head_ref }}
-
- ${{ env.DOCS_PROMPT }}
+ prompt: ${{ env.CLAUDE_PROMPT }}
- name: Post completion status
if: success()
diff --git a/.github/workflows/claude-project-management.yml b/.github/workflows/claude-project-management.yml
index 693380c..eb3710d 100644
--- a/.github/workflows/claude-project-management.yml
+++ b/.github/workflows/claude-project-management.yml
@@ -13,13 +13,15 @@ on:
jobs:
claude-project-management:
if: |
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude spec')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude spec')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude spec')) ||
- (github.event_name == 'issues' && (
- contains(github.event.issue.body, '@claude spec') ||
- contains(github.event.issue.title, '@claude spec')
- ))
+ github.repository != 'UtakataKyosui/SmartPhoneAutoDevelopSetup' && (
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude manage')) ||
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude manage')) ||
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude manage')) ||
+ (github.event_name == 'issues' && (
+ contains(github.event.issue.body, '@claude manage') ||
+ contains(github.event.issue.title, '@claude manage')
+ ))
+ )
runs-on: ubuntu-latest
permissions:
# リポジトリのコードやファイルへのアクセス権を付与
@@ -40,56 +42,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 👈 GH_TOKEN を追加して .mcp.json と一致させる
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
+ - uses: ./.github/actions/setup-claude-env
with:
fetch-depth: 0
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
-
- - name: Install uv CLI
- uses: astral-sh/setup-uv@v4
-
- - name: Setup Git configuration
- run: |
- git config --global user.name "Claude Code PM"
- git config --global user.email "claude-code-pm@anthropic.com"
- git config --global init.defaultBranch main
-
- - name: Get PR info (only if PR)
- if: ${{ github.event.issue.pull_request }}
- run: |
- if ! gh pr view ${{ github.event.issue.number }} --json number,title,body,baseRefName,headRefName > pr_info.json; then
- echo "Failed to get PR info, creating empty file"
- echo '{}' > pr_info.json
- fi
-
- - name: Export PR info
- if: ${{ github.event.issue.pull_request }}
- run: |
- if [ -s pr_info.json ] && [ "$(jq -r .title pr_info.json)" != "null" ]; then
- # PR_TITLE
- jq -r .title pr_info.json | tr -d '\r' | while IFS= read -r line; do
- echo "PR_TITLE=$line" >> $GITHUB_ENV
- done
-
- # PR_BODY
- pr_body=$(jq -r .body pr_info.json | tr -d '\r')
- echo "PR_BODY<> $GITHUB_ENV
- echo "$pr_body" >> $GITHUB_ENV
- echo "EOF" >> $GITHUB_ENV
-
- echo "PR_BASE=$(jq -r .baseRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- echo "PR_HEAD=$(jq -r .headRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- else
- echo "PR_TITLE=" >> $GITHUB_ENV
- echo "PR_BODY=" >> $GITHUB_ENV
- echo "PR_BASE=" >> $GITHUB_ENV
- echo "PR_HEAD=" >> $GITHUB_ENV
- fi
+ git-user-name: "Claude Code PM"
+ git-user-email: "claude-code-pm@anthropic.com"
- name: Load project management prompt from file
run: |
@@ -100,14 +57,6 @@ jobs:
## 実行可能なコマンド
- ### Spec Kit統合コマンド(仕様駆動開発)
- - \\`/spec-kit:specify\\` - 自然言語から仕様作成
- - \\`/spec-kit:plan\\` - 仕様から実装計画作成
- - \\`/spec-kit:clarify\\` - 仕様の対話的明確化
- - \\`/spec-kit:tasks\\` - TDD準拠のタスクリスト生成
- - \\`/spec-kit:implement\\` - TDDサイクルでの実装
- - \\`/spec-kit:analyze\\` - 既存仕様の分析
- - \\`/spec-kit:constitution\\` - プロジェクト憲法管理
### プロジェクト管理
- \\`/project-management:setup-project\\` - プロジェクトの初期セットアップ
@@ -130,6 +79,24 @@ jobs:
echo 'EOF'
} >> $GITHUB_ENV
+ - name: Render Claude Prompt
+ id: render_prompt
+ shell: bash
+ run: |
+ export ISSUE_NUMBER="${{ github.event.issue.number }}"
+ export COMMENT_BODY="${{ github.event.comment.body }}"
+ export GITHUB_BASE_REF="${{ github.base_ref }}"
+ export GITHUB_HEAD_REF="${{ github.head_ref }}"
+
+ # Define variables to substitute to avoid accidental replacement
+ VARS='$GITHUB_REPOSITORY $GITHUB_ACTOR $ISSUE_NUMBER $PR_TITLE $PR_BODY $COMMENT_BODY $PR_BASE $PR_HEAD $GITHUB_BASE_REF $GITHUB_HEAD_REF $PM_PROMPT'
+
+ envsubst "$VARS" < .github/prompts/claude-project-management.md > prompt_rendered.md
+
+ echo "CLAUDE_PROMPT<> $GITHUB_ENV
+ cat prompt_rendered.md >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
- name: Run Claude Code Project Management
id: claude-pm
uses: anthropics/claude-code-action@v1
@@ -148,28 +115,7 @@ jobs:
statuses: write
repository-projects: write
id-token: write
- prompt: |
- # Claude Code Project Management Prompt
-
- ## GitHub コンテキスト
- リポジトリ: ${{ github.repository }}
- 実行ユーザー: ${{ github.actor }}
-
- ### PR / Issue 情報
- - PR番号: ${{ github.event.issue.number }}
- - PRタイトル: ${{ env.PR_TITLE }}
- - PR本文: |
- ${{ env.PR_BODY }}
- - コメント本文: |
- ${{ github.event.comment.body }}
-
- ### ブランチ情報
- - Baseブランチ: ${{ env.PR_BASE }}
- - Headブランチ: ${{ env.PR_HEAD }}
- - Baseブランチ (GitHub): ${{ github.base_ref }}
- - Headブランチ (GitHub): ${{ github.head_ref }}
-
- ${{ env.PM_PROMPT }}
+ prompt: ${{ env.CLAUDE_PROMPT }}
- name: Post completion status
if: success()
diff --git a/.github/workflows/claude-project.yml b/.github/workflows/claude-project.yml
index 61ac8f9..ab2cc3c 100644
--- a/.github/workflows/claude-project.yml
+++ b/.github/workflows/claude-project.yml
@@ -13,13 +13,15 @@ on:
jobs:
claude-project:
if: |
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude setup')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude setup')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude setup')) ||
- (github.event_name == 'issues' && (
- contains(github.event.issue.body, '@claude setup') ||
- contains(github.event.issue.title, '@claude setup')
- ))
+ github.repository != 'UtakataKyosui/SmartPhoneAutoDevelopSetup' && (
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude project')) ||
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude project')) ||
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude project')) ||
+ (github.event_name == 'issues' && (
+ contains(github.event.issue.body, '@claude project') ||
+ contains(github.event.issue.title, '@claude project')
+ ))
+ )
runs-on: ubuntu-latest
permissions:
contents: write
@@ -34,55 +36,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
+ - uses: ./.github/actions/setup-claude-env
with:
fetch-depth: 0
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
-
- - name: Install uv CLI
- uses: astral-sh/setup-uv@v4
-
- - name: Setup Git configuration
- run: |
- git config --global user.name "Claude Code Project"
- git config --global user.email "claude-code-project@anthropic.com"
- git config --global init.defaultBranch main
-
- - name: Get PR info (only if PR)
- if: ${{ github.event.issue.pull_request }}
- run: |
- if ! gh pr view ${{ github.event.issue.number }} --json number,title,body,baseRefName,headRefName > pr_info.json; then
- echo "Failed to get PR info, creating empty file"
- echo '{}' > pr_info.json
- fi
-
- - name: Export PR info
- if: ${{ github.event.issue.pull_request }}
- run: |
- if [ -s pr_info.json ] && [ "$(jq -r .title pr_info.json)" != "null" ]; then
- jq -r .title pr_info.json | tr -d '\r' | while IFS= read -r line; do
- echo "PR_TITLE=$line" >> $GITHUB_ENV
- done
-
- pr_body=$(jq -r .body pr_info.json | tr -d '\r')
- echo "PR_BODY<> $GITHUB_ENV
- echo "$pr_body" >> $GITHUB_ENV
- echo "EOF" >> $GITHUB_ENV
-
- echo "PR_BASE=$(jq -r .baseRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- echo "PR_HEAD=$(jq -r .headRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- else
- echo "PR_TITLE=" >> $GITHUB_ENV
- echo "PR_BODY=" >> $GITHUB_ENV
- echo "PR_BASE=" >> $GITHUB_ENV
- echo "PR_HEAD=" >> $GITHUB_ENV
- fi
-
+ git-user-name: "Claude Code Project"
+ git-user-email: "claude-code-project@anthropic.com"
- name: Load project management prompt
run: |
@@ -130,6 +88,24 @@ jobs:
echo 'EOF'
} >> $GITHUB_ENV
+ - name: Render Claude Prompt
+ id: render_prompt
+ shell: bash
+ run: |
+ export ISSUE_NUMBER="${{ github.event.issue.number }}"
+ export COMMENT_BODY="${{ github.event.comment.body }}"
+ export GITHUB_BASE_REF="${{ github.base_ref }}"
+ export GITHUB_HEAD_REF="${{ github.head_ref }}"
+
+ # Define variables to substitute to avoid accidental replacement
+ VARS='$GITHUB_REPOSITORY $GITHUB_ACTOR $ISSUE_NUMBER $PR_TITLE $PR_BODY $COMMENT_BODY $PR_BASE $PR_HEAD $GITHUB_BASE_REF $GITHUB_HEAD_REF $PROJECT_PROMPT'
+
+ envsubst "$VARS" < .github/prompts/claude-project.md > prompt_rendered.md
+
+ echo "CLAUDE_PROMPT<> $GITHUB_ENV
+ cat prompt_rendered.md >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
- name: Run Claude Code Project Management
id: claude-project
uses: anthropics/claude-code-action@v1
@@ -148,28 +124,7 @@ jobs:
statuses: write
repository-projects: write
id-token: write
- prompt: |
- # Claude Code プロジェクト管理・初期セットアップ支援
-
- ## GitHub コンテキスト
- リポジトリ: ${{ github.repository }}
- 実行ユーザー: ${{ github.actor }}
-
- ### PR / Issue 情報
- - PR番号: ${{ github.event.issue.number }}
- - PRタイトル: ${{ env.PR_TITLE }}
- - PR本文: |
- ${{ env.PR_BODY }}
- - コメント本文: |
- ${{ github.event.comment.body }}
-
- ### ブランチ情報
- - Baseブランチ: ${{ env.PR_BASE }}
- - Headブランチ: ${{ env.PR_HEAD }}
- - Baseブランチ (GitHub): ${{ github.base_ref }}
- - Headブランチ (GitHub): ${{ github.head_ref }}
-
- ${{ env.PROJECT_PROMPT }}
+ prompt: ${{ env.CLAUDE_PROMPT }}
- name: Post completion status
if: success()
diff --git a/.github/workflows/claude-spec.yml b/.github/workflows/claude-spec.yml
deleted file mode 100644
index f5c1fa9..0000000
--- a/.github/workflows/claude-spec.yml
+++ /dev/null
@@ -1,162 +0,0 @@
-name: Claude Code Specification
-
-on:
- issue_comment:
- types: [created]
- pull_request_review_comment:
- types: [created]
- issues:
- types: [opened, assigned]
- pull_request_review:
- types: [submitted]
-
-jobs:
- claude-spec:
- if: |
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude plan')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude plan')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude plan')) ||
- (github.event_name == 'issues' && (
- contains(github.event.issue.body, '@claude plan') ||
- contains(github.event.issue.title, '@claude plan')
- ))
- runs-on: ubuntu-latest
- permissions:
- contents: write
- pull-requests: write
- issues: write
- actions: read
- statuses: write
- repository-projects: write
- id-token: write
- env:
- TZ: Asia/Tokyo
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
-
- - name: Install uv CLI
- uses: astral-sh/setup-uv@v4
-
- - name: Setup Git configuration
- run: |
- git config --global user.name "Claude Code Spec"
- git config --global user.email "claude-code-spec@anthropic.com"
- git config --global init.defaultBranch main
-
- - name: Get PR info (only if PR)
- if: ${{ github.event.issue.pull_request }}
- run: |
- if ! gh pr view ${{ github.event.issue.number }} --json number,title,body,baseRefName,headRefName > pr_info.json; then
- echo "Failed to get PR info, creating empty file"
- echo '{}' > pr_info.json
- fi
-
- - name: Export PR info
- if: ${{ github.event.issue.pull_request }}
- run: |
- if [ -s pr_info.json ] && [ "$(jq -r .title pr_info.json)" != "null" ]; then
- jq -r .title pr_info.json | tr -d '\r' | while IFS= read -r line; do
- echo "PR_TITLE=$line" >> $GITHUB_ENV
- done
-
- pr_body=$(jq -r .body pr_info.json | tr -d '\r')
- echo "PR_BODY<> $GITHUB_ENV
- echo "$pr_body" >> $GITHUB_ENV
- echo "EOF" >> $GITHUB_ENV
-
- echo "PR_BASE=$(jq -r .baseRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- echo "PR_HEAD=$(jq -r .headRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- else
- echo "PR_TITLE=" >> $GITHUB_ENV
- echo "PR_BODY=" >> $GITHUB_ENV
- echo "PR_BASE=" >> $GITHUB_ENV
- echo "PR_HEAD=" >> $GITHUB_ENV
- fi
-
- - name: Load specification prompt
- run: |
- if [ -f docs/spec-prompt.md ]; then
- PROMPT_CONTENT="$(cat docs/spec-prompt.md)"
- else
- PROMPT_CONTENT="# 仕様定義・計画・実装支援
-
- ## Agent Skills利用可能
-
- Agent Skillsを参照してください
-
- ## 実行ガイドライン
-
- 1. **Spec Kit + TDD統合開発フロー**を採用
- 2. **Issue Driven開発**でIssueに紐づけて進める
- 3. **MCPツール**を優先使用
- 4. **プロジェクト憲法**への準拠を確認
-
- コメント内容から適切な作業を判断し、Agent Skillsのガイドラインに従って実行してください。"
- fi
- {
- echo 'SPEC_PROMPT<> $GITHUB_ENV
-
- - name: Run Claude Code Specification
- id: claude-spec
- uses: anthropics/claude-code-action@v1
- with:
- claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
- anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
- settings: ".claude/settings.json"
- track_progress: true
- branch_prefix: feature/spec-
- use_sticky_comment: true
- additional_permissions: |
- actions: read
- contents: write
- pull-requests: write
- issues: write
- statuses: write
- repository-projects: write
- id-token: write
- prompt: |
- # Claude Code 仕様定義・計画・実装支援
-
- ## GitHub コンテキスト
- リポジトリ: ${{ github.repository }}
- 実行ユーザー: ${{ github.actor }}
-
- ### PR / Issue 情報
- - PR番号: ${{ github.event.issue.number }}
- - PRタイトル: ${{ env.PR_TITLE }}
- - PR本文: |
- ${{ env.PR_BODY }}
- - コメント本文: |
- ${{ github.event.comment.body }}
-
- ### ブランチ情報
- - Baseブランチ: ${{ env.PR_BASE }}
- - Headブランチ: ${{ env.PR_HEAD }}
- - Baseブランチ (GitHub): ${{ github.base_ref }}
- - Headブランチ (GitHub): ${{ github.head_ref }}
-
- ${{ env.SPEC_PROMPT }}
-
- - name: Post completion status
- if: success()
- run: |
- echo "✅ Claude Code Specification completed successfully"
-
- - name: Post failure status
- if: failure()
- run: |
- echo "❌ Claude Code Specification failed"
- exit 1
\ No newline at end of file
diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml
index b3e01a1..2384d9c 100644
--- a/.github/workflows/claude.yml
+++ b/.github/workflows/claude.yml
@@ -13,10 +13,12 @@ on:
jobs:
claude:
if: |
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
- (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
+ github.repository != 'UtakataKyosui/SmartPhoneAutoDevelopSetup' && (
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
+ )
runs-on: ubuntu-latest
permissions:
# リポジトリのコードやファイルへのアクセス権を付与
@@ -37,56 +39,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 👈 GH_TOKEN を追加して .mcp.json と一致させる
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
+ - uses: ./.github/actions/setup-claude-env
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- - name: Install uv CLI
- uses: astral-sh/setup-uv@v4
-
- - name: Setup Git configuration
- run: |
- git config --global user.name "Claude Code"
- git config --global user.email "claude-code@anthropic.com"
- git config --global init.defaultBranch main
-
- - name: Get PR info (only if PR)
- if: ${{ github.event.issue.pull_request }}
- run: |
- if ! gh pr view ${{ github.event.issue.number }} --json number,title,body,baseRefName,headRefName > pr_info.json; then
- echo "Failed to get PR info, creating empty file"
- echo '{}' > pr_info.json
- fi
-
- - name: Export PR info
- if: ${{ github.event.issue.pull_request }}
- run: |
- if [ -s pr_info.json ] && [ "$(jq -r .title pr_info.json)" != "null" ]; then
- # PR_TITLE
- jq -r .title pr_info.json | tr -d '\r' | while IFS= read -r line; do
- echo "PR_TITLE=$line" >> $GITHUB_ENV
- done
-
- # PR_BODY
- pr_body=$(jq -r .body pr_info.json | tr -d '\r')
- echo "PR_BODY<> $GITHUB_ENV
- echo "$pr_body" >> $GITHUB_ENV
- echo "EOF" >> $GITHUB_ENV
-
- echo "PR_BASE=$(jq -r .baseRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- echo "PR_HEAD=$(jq -r .headRefName pr_info.json | tr -d '\r')" >> $GITHUB_ENV
- else
- echo "PR_TITLE=" >> $GITHUB_ENV
- echo "PR_BODY=" >> $GITHUB_ENV
- echo "PR_BASE=" >> $GITHUB_ENV
- echo "PR_HEAD=" >> $GITHUB_ENV
- fi
-
- name: Load prompt from file
run: |
if [ -f docs/prompt.md ]; then
@@ -105,6 +61,24 @@ jobs:
echo 'EOF'
} >> $GITHUB_ENV
+ - name: Render Claude Prompt
+ id: render_prompt
+ shell: bash
+ run: |
+ export ISSUE_NUMBER="${{ github.event.issue.number }}"
+ export COMMENT_BODY="${{ github.event.comment.body }}"
+ export GITHUB_BASE_REF="${{ github.base_ref }}"
+ export GITHUB_HEAD_REF="${{ github.head_ref }}"
+
+ # Define variables to substitute to avoid accidental replacement
+ VARS='$GITHUB_REPOSITORY $GITHUB_ACTOR $ISSUE_NUMBER $PR_TITLE $PR_BODY $COMMENT_BODY $PR_BASE $PR_HEAD $GITHUB_BASE_REF $GITHUB_HEAD_REF $PROMPT'
+
+ envsubst "$VARS" < .github/prompts/claude.md > prompt_rendered.md
+
+ echo "CLAUDE_PROMPT<> $GITHUB_ENV
+ cat prompt_rendered.md >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
@@ -124,25 +98,4 @@ jobs:
statuses: write
repository-projects: write
id-token: write
- prompt: |
- # Claude Code Prompt Template
-
- ## GitHub コンテキスト
- リポジトリ: ${{ github.repository }}
- 実行ユーザー:`${{ github.actor }}
-
- ### PR / Issue 情報
- - PR番号: ${{ github.event.issue.number }}
- - PRタイトル: ${{ env.PR_TITLE }}
- - PR本文: |
- ${{ env.PR_BODY }}
- - コメント本文: |
- ${{ github.event.comment.body }}
-
- ### ブランチ情報
- - Baseブランチ: ${{ env.PR_BASE }}
- - Headブランチ: ${{ env.PR_HEAD }}
- - Baseブランチ (GitHub): ${{ github.base_ref }}
- - Headブランチ (GitHub): ${{ github.head_ref }}
-
- ${{ env.PROMPT }}
+ prompt: ${{ env.CLAUDE_PROMPT }}
diff --git a/.github/workflows/issue-spec-clarification.yml b/.github/workflows/issue-spec-clarification.yml
new file mode 100644
index 0000000..76f5747
--- /dev/null
+++ b/.github/workflows/issue-spec-clarification.yml
@@ -0,0 +1,48 @@
+name: Issue Spec Clarification
+
+on:
+ issues:
+ types: [opened, edited]
+ issue_comment:
+ types: [created]
+
+jobs:
+ clarify-spec:
+ if: |
+ (github.event_name == 'issues' && !contains(github.event.issue.labels.*.name, 'spec: confirmed')) ||
+ (github.event_name == 'issue_comment' && !contains(github.event.issue.labels.*.name, 'spec: confirmed') && github.event.issue.user.login == github.event.comment.user.login)
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ issues: write
+ pull-requests: read
+ id-token: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Render Claude Prompt
+ id: render_prompt
+ shell: bash
+ run: |
+ export ISSUE_NUMBER="${{ github.event.issue.number }}"
+ export ISSUE_TITLE="${{ github.event.issue.title }}"
+ export ISSUE_BODY="${{ github.event.issue.body }}"
+
+ # Define variables to substitute
+ VARS='$ISSUE_NUMBER $ISSUE_TITLE $ISSUE_BODY'
+
+ envsubst "$VARS" < .github/prompts/issue-spec-clarification.md > prompt_rendered.md
+
+ echo "CLAUDE_PROMPT<> $GITHUB_ENV
+ cat prompt_rendered.md >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
+ - name: Run Claude Spec Clarification
+ uses: anthropics/claude-code-action@v1
+ with:
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
+ prompt: ${{ env.CLAUDE_PROMPT }}
+ claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh issue list:*),Bash(gh issue comment:*),Bash(gh issue edit:*)"'
diff --git a/CLAUDE.md b/CLAUDE.md
index 0f30cd0..d064f36 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -2,7 +2,6 @@
## プロジェクト概要
このリポジトリは、スマートフォンからClaude Code Actionsを使って自動開発を行うためのテンプレートリポジトリです。
-Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高いソフトウェア開発を実現します。
### 主要な特徴
- **スマホ対応開発環境**: モバイルデバイスから本格的な開発作業が可能
@@ -14,18 +13,15 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
### 基本原則
- **共通ルール**: 変数命名、コードスタイル、コメントの書き方はプロジェクト内で統一
-- **Spec Kit + TDD統合開発**: 仕様駆動開発とテスト駆動開発を組み合わせた開発フロー
- **Issue Driven 開発**: すべての開発はIssueから開始し、Issueに紐づけて進行
- **MCPツールの使用必須**: 開発作業は基本的にMCPのツールを使用
- **Formatter/Linter実行**: コード整形や静的解析はClaude CodeのHooksから自動実行
- **プロジェクト憲法遵守**: 開発原則の一貫した適用と品質ゲートの確実な実行
-### Spec Kit + TDD 統合開発フロー
-1. **仕様作成** (`/spec-kit:specify`) - 自然言語から正式仕様を作成
-2. **計画立案** (`/spec-kit:plan`) - 技術選定と実装計画
-3. **タスク生成** (`/spec-kit:tasks`) - TDD準拠のタスクリスト作成
-4. **TDD実装** (`/spec-kit:implement`) - Red-Green-Refactorサイクル
-5. **品質確認** (`/development:code-review`, `/spec-kit:constitution`) - 品質とプロジェクト憲法への準拠確認
+### TODO管理
+機能開発、バグ修正、リファクタリングなどを行う際は、作業開始前に「何をどうやって進めるか」のTODOリストを詳細に作成します。
+このTODOリストは進行状況に合わせて都度更新(チェックを入れる)し、Rate Limit等で中断しても再開時に進捗が明確になるように管理します。
+
## プロジェクト構成
@@ -49,7 +45,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
│ ├── claude-code-review.yml # コードレビュー
│ ├── claude-docs.yml # ドキュメント生成
│ └── claude-project-management.yml # 高度なプロジェクト管理
-├── .specify/ # Spec Kit設定・テンプレート・実行スクリプト
├── docs/ # プロジェクトドキュメント
├── .mcp.json # MCP設定(context7, magic, github)
├── CLAUDE.md # このファイル
@@ -85,7 +80,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
- ライブラリ比較・評価
- 調査結果のドキュメント化
-6. **spec-kit-workflow**: Spec Kitワークフロー
- 仕様作成(Specify)
- 仕様明確化(Clarify)
- 実装計画(Plan)
@@ -125,7 +119,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
### ドキュメント
- `docs/SKILLS.md` : Agent Skills詳細ガイド
- `docs/AGENTS.md` : サブエージェント詳細ガイド
-- `docs/SPEC_KIT_TDD_WORKFLOW.md` : Spec Kit + TDD統合ワークフロー
- `docs/GITHUB_ACTIONS_SETUP.md` : GitHub Actions設定ガイド
- `docs/prompt.md` : カスタムプロンプト定義
@@ -146,7 +139,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
#### 3. claude-spec.yml - 仕様策定・計画
**トリガー**: `@claude plan` を含むコメント・Issue・PR
**用途**: 仕様作成、実装計画、アーキテクチャ設計
-**利用可能コマンド**: Spec Kit統合コマンド群
#### 4. claude-code-review.yml - コードレビュー
**トリガー**: `@claude review` を含むコメント・Issue・PR
@@ -251,18 +243,13 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
@claude /project-management:setup-project
# プロジェクトの初期セットアップを自動実行
-#### Spec Kit統合コマンド
```markdown
-@claude /spec-kit:specify "ユーザー認証システム"
# 自然言語から正式仕様を作成
-@claude /spec-kit:plan
# 仕様から実装計画を生成
-@claude /spec-kit:tasks
# TDD準拠のタスクリストを生成
-@claude /spec-kit:implement
# TDDサイクルで実装を進行
```
diff --git a/README.md b/README.md
index 2afb631..dab256e 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,10 @@
# SmartPhoneAutoDevelopSetup
スマホでClaude Code Actionsを動かして自動開発するためのテンプレートリポジトリ。
-Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高いソフトウェア開発を実現します。
## 🚀 特徴
- **スマホ対応開発環境**: スマートフォンからClaude Code Actionsで開発可能
-- **Spec Kit + TDD統合**: 仕様駆動開発とテスト駆動開発を組み合わせた開発フロー
- **Issue Driven開発**: すべての開発はIssueから開始し、体系的に管理
- **Agent Skills**: 10個の特化したSkillによる効率的なガイダンス
- **最適化されたMCP**: 必要最小限のMCPサーバで効率的な開発
@@ -28,7 +26,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
│ │ └── library-research/ # ライブラリ調査
│ └── hooks/ # コード検証・整形スクリプト
├── .github/workflows/ # GitHub Actions
-├── .specify/ # Spec Kit設定・テンプレート
├── docs/ # プロジェクトドキュメント
├── .mcp.json # MCP設定(context7, magic, github)
├── CLAUDE.md # Claude Codeへの詳細指示
@@ -37,12 +34,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
## 🛠️ 開発フロー
-### Spec Kit + TDD 統合開発
-1. **仕様作成** (`/spec-kit:specify`) - 自然言語から正式仕様を作成
-2. **計画立案** (`/spec-kit:plan`) - 技術選定と実装計画
-3. **タスク生成** (`/spec-kit:tasks`) - TDD準拠のタスクリスト作成
-4. **TDD実装** (`/spec-kit:implement`) - Red-Green-Refactorサイクル
-5. **品質確認** (`/development:code-review`, `/spec-kit:constitution`) - 品質とプロジェクト憲法への準拠確認
@@ -75,7 +66,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
- ライブラリ比較・評価
- 調査結果のドキュメント化
-### 6. spec-kit-workflow - Spec Kitワークフロー
- 仕様作成(Specify)
- 仕様明確化(Clarify)
- 実装計画(Plan)
@@ -166,11 +156,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
```
**利用可能なコマンド**:
-- `/spec-kit:specify` - 自然言語から正式仕様を作成
-- `/spec-kit:plan` - 仕様から実装計画を生成
-- `/spec-kit:clarify` - 仕様の対話的明確化
-- `/spec-kit:tasks` - TDD準拠のタスクリスト生成
-- `/spec-kit:implement` - TDDサイクルでの実装
### スラッシュコマンドの詳細使用方法
@@ -262,7 +247,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
- **claude.yml** - 基本的なClaude Code実行
- **claude-project.yml** - プロジェクト管理ワークフロー
-- **claude-spec.yml** - Spec Kit統合ワークフロー
- **claude-code-review.yml** - 自動コードレビュー
- **claude-docs.yml** - ドキュメント生成
- **claude-project-management.yml** - プロジェクト管理
@@ -271,7 +255,6 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
- [SKILLS.md](docs/SKILLS.md) - Agent Skills詳細ガイド
- [AGENTS.md](docs/AGENTS.md) - サブエージェント詳細ガイド
-- [SPEC_KIT_TDD_WORKFLOW.md](docs/SPEC_KIT_TDD_WORKFLOW.md) - Spec Kit + TDD統合ワークフロー
- [GITHUB_ACTIONS_SETUP.md](docs/GITHUB_ACTIONS_SETUP.md) - GitHub Actions設定ガイド
- [CLAUDE.md](CLAUDE.md) - Claude Codeへの詳細指示
@@ -292,5 +275,4 @@ Spec Kit + TDD統合開発フローを採用し、Issue Drivenで品質の高い
## 📚 参考リンク
- [Claude Code Actions Usage](https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md)
-- [Spec Kit Documentation](.specify/)
- [プロジェクト憲法](.specify/memory/constitution.md)
diff --git a/docs/CLAUDE_GITHUB_ACTIONS_SPECS.md b/docs/CLAUDE_GITHUB_ACTIONS_SPECS.md
index 7617657..ccf248c 100644
--- a/docs/CLAUDE_GITHUB_ACTIONS_SPECS.md
+++ b/docs/CLAUDE_GITHUB_ACTIONS_SPECS.md
@@ -1,7 +1,6 @@
# Claude Code GitHub Actions 仕様書
## 概要
-このドキュメントは、仕様駆動開発(Spec Kit)およびテスト駆動開発(TDD)のための Claude Code と GitHub Actions の統合仕様を定義します。
## 1. 基本ワークフロー構成
@@ -46,8 +45,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- # 2. Spec Kit準備
- - name: Setup Spec Kit
run: |
# .specify/ ディレクトリの確認・作成
mkdir -p .specify/{templates,specs,outputs}
@@ -82,7 +79,6 @@ jobs:
### 2.3 コマンド仕様
```yaml
-# 利用可能なSpec Kitコマンド
commands:
- /specify # 自然言語から仕様作成
- /clarify # 仕様の対話的明確化
@@ -181,7 +177,6 @@ jobs:
## 4. 統合ワークフロー
-### 4.1 Spec Kit + TDD統合
```yaml
name: Integrated Spec-Driven TDD
diff --git a/docs/GITHUB_ACTIONS_SETUP.md b/docs/GITHUB_ACTIONS_SETUP.md
index a0cc09e..2d08fe8 100644
--- a/docs/GITHUB_ACTIONS_SETUP.md
+++ b/docs/GITHUB_ACTIONS_SETUP.md
@@ -241,4 +241,3 @@ GitHub Actions設定により以下が実現されます:
- ✅ **カスタマイズ**: プロジェクト固有の設定対応
- ✅ **可視性**: 実行ログとステータス追跡
-この設定により、Spec Kit + TDD統合開発フローが GitHub Actions上で確実に動作します。
\ No newline at end of file
diff --git a/docs/SKILLS.md b/docs/SKILLS.md
index 1cca274..5567d94 100644
--- a/docs/SKILLS.md
+++ b/docs/SKILLS.md
@@ -13,7 +13,6 @@ Agent Skillsは以下のディレクトリ構成で管理されています:
├── testing-rust/ # Rustテスト
├── ci-cd-setup/ # CI/CD設定
├── library-research/ # ライブラリ調査
-├── spec-kit-workflow/ # Spec Kitワークフロー
├── code-review-workflow/ # コードレビューワークフロー
├── debugging-workflow/ # デバッグワークフロー
├── refactoring-workflow/ # リファクタリングワークフロー
@@ -106,11 +105,9 @@ Agent Skillsは以下のディレクトリ構成で管理されています:
---
-### 6. Spec Kitワークフロー(spec-kit-workflow)
**概要**: 仕様駆動開発の完全なワークフロー
-**トリガー**: 「仕様作成」「Spec Kit」「実装計画」
**主な内容**:
1. **Specify**: 仕様作成
@@ -121,7 +118,6 @@ Agent Skillsは以下のディレクトリ構成で管理されています:
6. **Analyze**: 品質分析
7. **Constitution**: プロジェクト憲法
-**参照**: [spec-kit-workflow/SKILL.md](../.claude/skills/spec-kit-workflow/SKILL.md)
---
@@ -201,7 +197,6 @@ Skillsは、会話の内容に基づいて自動的にトリガーされます
```
「tdd-basicsのガイドに従ってテストを書きたい」
-「spec-kit-workflowで仕様を作成してください」
「code-review-workflowのチェックリストを使ってレビューしてください」
```
@@ -210,7 +205,6 @@ Skillsは、会話の内容に基づいて自動的にトリガーされます
Skillsは相互に連携して、効率的な開発をサポートします:
- **tdd-basics** ↔ **testing-typescript/rust**: TDDの実践
-- **spec-kit-workflow** ↔ **tdd-basics**: 仕様からTDD実装へ
- **code-review-workflow** ↔ **testing-typescript/rust**: テストカバレッジレビュー
- **debugging-workflow** ↔ **testing-typescript/rust**: デバッグテストの作成
- **refactoring-workflow** ↔ **tdd-basics**: テストファーストリファクタリング
@@ -225,5 +219,4 @@ Skillsは相互に連携して、効率的な開発をサポートします:
## 関連ドキュメント
- [AGENTS.md](./AGENTS.md) - サブエージェント詳細ガイド
-- [SPEC_KIT_TDD_WORKFLOW.md](./SPEC_KIT_TDD_WORKFLOW.md) - Spec Kit + TDD統合ワークフロー
- [GITHUB_ACTIONS_SETUP.md](./GITHUB_ACTIONS_SETUP.md) - GitHub Actions設定ガイド
diff --git a/docs/SPEC_KIT_TDD_WORKFLOW.md b/docs/SPEC_KIT_TDD_WORKFLOW.md
deleted file mode 100644
index d08bc93..0000000
--- a/docs/SPEC_KIT_TDD_WORKFLOW.md
+++ /dev/null
@@ -1,200 +0,0 @@
-# Spec Kit + TDD 統合ワークフロー
-
-本ドキュメントでは、仕様駆動開発(Spec Kit)とテスト駆動開発(TDD)を組み合わせた開発フローについて説明します。このワークフローにより、確実なVibe-Codingを実現できます。
-
-## 概要
-
-Spec Kit + TDD ワークフローは以下の原則に基づいています:
-
-1. **仕様ファースト**: 機能実装前に明確な仕様を作成
-2. **テストファースト**: 実装前にテストコードを作成
-3. **段階的実装**: 仕様 → テスト → 実装 → 検証のサイクル
-4. **プロジェクト憲法遵守**: 開発原則の一貫した適用
-
-## ワークフローの全体像
-
-```mermaid
-graph TD
- A[機能要求] --> B[/specify: 仕様作成]
- B --> C[/clarify: 仕様明確化]
- C --> D[/plan: 実装計画]
- D --> E[/tasks: タスク生成]
- E --> F[/implement: TDD実装]
- F --> G[検証・テスト]
- G --> H{品質OK?}
- H -->|Yes| I[機能完了]
- H -->|No| J[/debug-help: デバッグ]
- J --> F
-```
-
-## フェーズ詳細
-
-### フェーズ 0: 仕様作成(Specification)
-
-#### `/specify` コマンド
-自然言語の機能説明から正式な仕様を作成します。
-
-```bash
-@claude /specify ユーザー登録機能を追加したい。メールアドレスとパスワードで登録でき、重複チェックも行う
-```
-
-**出力例:**
-- ブランチ作成: `005-user-registration`
-- 仕様ファイル: `.specify/specs/005-user-registration/spec.md`
-
-#### `/clarify` コマンド
-仕様の曖昧な点を対話的に明確化します。
-
-```bash
-@claude /clarify パスワードの複雑性要件は?メール認証は必要?
-```
-
-### フェーズ 1: 実装計画(Planning)
-
-#### `/plan` コマンド
-仕様から具体的な実装計画を作成します。
-
-```bash
-@claude /plan
-```
-
-**生成される成果物:**
-- `plan.md` - 全体設計と技術選定
-- `research.md` - 技術調査結果
-- `data-model.md` - データモデル設計
-- `contracts/` - API契約定義
-- `quickstart.md` - 検証手順
-
-### フェーズ 2: タスク生成(Task Generation)
-
-#### `/tasks` コマンド
-実装計画からTDD準拠のタスクリストを生成します。
-
-```bash
-@claude /tasks
-```
-
-**生成されるタスクの特徴:**
-- テスト優先順序(TDD準拠)
-- 並列実行可能タスクのマーク `[P]`
-- 依存関係の明確化
-- ファイルパス指定による具体性
-
-### フェーズ 3: 実装(Implementation)
-
-#### `/implement` コマンド
-TDDサイクルに従った実装を実行します。
-
-```bash
-@claude /implement
-```
-
-**TDDサイクル:**
-1. **Red**: テストを書く(失敗する)
-2. **Green**: テストを通す最小限の実装
-3. **Refactor**: コード改善
-
-### フェーズ 4: 検証・デバッグ
-
-#### `/debug-help` コマンド
-実装時のエラー解析とデバッグ支援。
-
-```bash
-@claude /debug-help テストが失敗している
-```
-
-#### `/code-review` コマンド
-コード品質の分析とレビュー。
-
-```bash
-@claude /code-review src/models/user.rs
-```
-
-## プロジェクト憲法との統合
-
-### 憲法チェック
-各フェーズで `/constitution` コマンドにより開発原則への準拠を確認:
-
-```bash
-@claude /constitution
-```
-
-### 主要原則
-1. **ライブラリファースト**: 機能をライブラリとして設計
-2. **CLIインターフェース**: すべての機能にCLI提供
-3. **テストファースト**: TDD厳格遵守
-4. **統合テスト**: 契約テストとサービス間通信テスト
-5. **観測可能性**: ログ・メトリクス・トレーシング
-
-## 専門エージェントとの連携
-
-### 言語・技術別エージェント
-特定の技術領域では専門エージェントを活用:
-
-```bash
-@claude rust-expert: 所有権エラーを修正してください
-@claude web-developer: レスポンシブデザインを実装してください
-@claude security-expert: 脆弱性を検査してください
-```
-
-### エージェント選択指針
-- **rust-expert**: Rust特有の問題(所有権、async等)
-- **web-developer**: フロントエンド・Web API開発
-- **mobile-developer**: モバイルアプリ開発
-- **devops-engineer**: CI/CD・インフラ設定
-- **data-scientist**: データ分析・機械学習
-- **security-expert**: セキュリティ監査・脆弱性対応
-
-## ベストプラクティス
-
-### 1. 仕様品質の確保
-- 機能要求は具体的に記述
-- 受入条件を明確化
-- エッジケースも考慮
-
-### 2. テスト戦略
-- 契約テスト(API仕様テスト)
-- 統合テスト(ユーザーシナリオテスト)
-- 単体テスト(ロジック検証)
-
-### 3. 段階的実装
-- 最小機能から開始
-- 段階的機能追加
-- 継続的品質確認
-
-### 4. 品質ゲート
-- 各フェーズでの憲法チェック
-- コードレビューの実行
-- 自動化テストの通過
-
-## トラブルシューティング
-
-### よくある問題と解決策
-
-#### 1. 仕様が曖昧
-**問題**: `[NEEDS CLARIFICATION]` マーカーが残る
-**解決**: `/clarify` コマンドで対話的明確化
-
-#### 2. テストが複雑すぎる
-**問題**: テスト作成が困難
-**解決**: 仕様を単純化、段階的実装
-
-#### 3. 実装が憲法違反
-**問題**: 複雑性が増しすぎる
-**解決**: 設計の見直し、原則回帰
-
-#### 4. 依存関係エラー
-**問題**: タスク実行順序の問題
-**解決**: 依存関係の再確認、並列実行の見直し
-
-## まとめ
-
-Spec Kit + TDD ワークフローは以下を実現します:
-
-- ✅ **品質確保**: 仕様とテストによる品質担保
-- ✅ **開発効率**: 段階的・体系的な開発プロセス
-- ✅ **保守性**: 明確な仕様とテストによる保守容易性
-- ✅ **拡張性**: モジュラー設計による機能拡張
-- ✅ **一貫性**: プロジェクト憲法による開発原則統一
-
-このワークフローにより、確実で効率的なVibe-Codingが可能になります。
\ No newline at end of file