project-workflow-analysis-blueprint-generator について
コードベースのワークフロー文書を生成するためのプロンプト設計図です。既存プロジェクトの実装方法を調べる開発者向けに、入口からデータ層、エラー処理までの分析と再利用可能な実装パターンの記述を導きます。
主な機能
- 01プロジェクト種別と入口に応じた分析設定
- 02代表的なエンドツーエンドのワークフロー整理
- 03各層の実装とデータマッピングの記録
- 04テスト説明とシーケンス図の任意追加
- 05命名規則と実装テンプレートの提示
活用シーン
- 01既存コードベースのワークフロー文書を作成
- 02新機能で踏襲するレイヤーパターンを把握
- 03類似実装向けの再利用可能なテンプレートを作成
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ github/ awesome-copilot --skill project-workflow-analysis-blueprint-generatorインストール後、Claude Code で/project-workflow-analysis-blueprint-generatorを入力して読み込まれたか確認します。
詳細
プロジェクトワークフロー ドキュメントジェネレーター
設定変数
${PROJECT_TYPE="Auto-detect|.NET|Java|Spring|Node.js|Python|React|Angular|Microservices|Other"}
${ENTRY_POINT="API|GraphQL|Frontend|CLI|Message Consumer|Scheduled Job|Custom"}
${PERSISTENCE_TYPE="Auto-detect|SQL Database|NoSQL Database|File System|External API|Message Queue|Cache|None"}
${ARCHITECTURE_PATTERN="Auto-detect|Layered|Clean|CQRS|Microservices|MVC|MVVM|Serverless|Event-Driven|Other"}
${WORKFLOW_COUNT=1-5}
${DETAIL_LEVEL="Standard|Implementation-Ready"}
${INCLUDE_SEQUENCE_DIAGRAM=true|false}
${INCLUDE_TEST_PATTERNS=true|false}
生成されたプロンプト
"Analyze the codebase and document ${WORKFLOW_COUNT} representative end-to-end workflows
that can serve as implementation templates for similar features. Use the following approach:
初期検出フェーズ
${PROJECT_TYPE == "Auto-detect" ?
"Begin by examining the codebase structure to identify technologies:
- Check for .NET solutions/projects, Spring configurations, Node.js/Express files, etc.
- Identify the primary programming language(s) and frameworks in use
- Determine the architectural patterns based on folder structure and key components"
: "Focus on ${PROJECT_TYPE} patterns and conventions"}
${ENTRY_POINT == "Auto-detect" ?
"Identify typical entry points by looking for:
- API controllers or route definitions
- GraphQL resolvers
- UI components that initiate network requests
- Message handlers or event subscribers
- Scheduled job definitions"
: "Focus on ${ENTRY_POINT} entry points"}
${PERSISTENCE_TYPE == "Auto-detect" ?
"Determine persistence mechanisms by examining:
- Database context/connection configurations
- Repository implementations
- ORM mappings
- External API clients
- File system interactions"
: "Focus on ${PERSISTENCE_TYPE} interactions"}
ワークフロードキュメントの手順
システム内で最も代表的な ${WORKFLOW_COUNT} 個のワークフローそれぞれについて:
1. ワークフローの概要
- ワークフローの名前と簡単な説明を提供します
- それが果たすビジネス上の目的を説明します
- トリガーとなるアクションまたはイベントを特定します
- ワークフロー全体に関与するすべてのファイル/クラスを列挙します
2. エントリーポイントの実装
API エントリーポイント:
${ENTRY_POINT == "API" || ENTRY_POINT == "Auto-detect" ?
"- Document the API controller class and method that receives the request
- Show the complete method signature including attributes/annotations
- Include the full request DTO/model class definition
- Document validation attributes and custom validators
- Show authentication/authorization attributes and checks" : ""}
GraphQL エントリーポイント:
${ENTRY_POINT == "GraphQL" || ENTRY_POINT == "Auto-detect" ?
"- Document the GraphQL resolver class and method
- Show the complete schema definition for the query/mutation
- Include input type definitions
- Show resolver method implementation with parameter handling" : ""}
フロントエンド エントリーポイント:
${ENTRY_POINT == "Frontend" || ENTRY_POINT == "Auto-detect" ?
"- Document the component that initiates the API call
- Show the event handler that triggers the request
- Include the API client service method
- Show state management code related to the request" : ""}
メッセージコンシューマー エントリーポイント:
${ENTRY_POINT == "Message Consumer" || ENTRY_POINT == "Auto-detect" ?
"- Document the message handler class and method
- Show message subscription configuration
- Include the complete message model definition
- Show deserialization and validation logic" : ""}
3. サービス層の実装
- 関与する各サービスクラスをその依存関係とともに文書化します
- パラメーターと戻り値の型を含む完全なメソッドシグネチャを示します
- 主要なビジネスロジックを含む実際のメソッド実装を記載します
- 該当する場合はインターフェース定義を文書化します
- 依存性注入の登録パターンを示します
CQRS パターン:
${ARCHITECTURE_PATTERN == "CQRS" || ARCHITECTURE_PATTERN == "Auto-detect" ?
"- Include complete command/query handler implementations" : ""}
クリーンアーキテクチャ パターン:
${ARCHITECTURE_PATTERN == "Clean" || ARCHITECTURE_PATTERN == "Auto-detect" ?
"- Show use case/interactor implementations" : ""}
4. データマッピング パターン
- DTO からドメインモデルへのマッピングコードを文書化します
- オブジェクトマッパーの設定または手動マッピングメソッドを示します
- マッピング中の検証ロジックを記載します
- マッピング中に作成されるドメインイベントを文書化します
5. データアクセスの実装
- リポジトリインターフェースとその実装を文書化します
- パラメーターと戻り値の型を含む完全なメソッドシグネチャを示します
- 実際のクエリ実装を記載します
- すべてのプロパティを含むエンティティ/モデルクラス定義を文書化します
- トランザクション処理パターンを示します
SQL データベース パターン:
${PERSISTENCE_TYPE == "SQL Database" || PERSISTENCE_TYPE == "Auto-detect" ?
"- Include ORM configurations, annotations, or Fluent API usage
- Show actual SQL queries or ORM statements" : ""}
NoSQL データベース パターン:
${PERSISTENCE_TYPE == "NoSQL Database" || PERSISTENCE_TYPE == "Auto-detect" ?
"- Show document structure definitions
- Include document query/update operations" : ""}
6. レスポンスの構築
- レスポンス DTO/モデルクラス定義を文書化します
- ドメイン/エンティティモデルからレスポンスモデルへのマッピングを示します
- ステータスコード選択ロジックを記載します
- エラーレスポンスの構造と生成を文書化します
7. エラーハンドリング パターン
- ワークフローで使用される例外の型を文書化します
- 各層での try/catch パターンを示します
- グローバル例外ハンドラーの設定を記載します
- エラーログの実装を文書化します
- 再試行ポリシーやサーキットブレーカーパターンを示します
- 障害シナリオの補償アクションを記載します
8. 非同期処理パターン
- バックグラウンドジョブのスケジューリングコードを文書化します
- イベント発行の実装を示します
- メッセージキューの送信パターンを記載します
- コールバックまたは Webhook の実装を文書化します
- 非同期操作がどのように追跡および監視されるかを示します
テストアプローチ (任意):
${INCLUDE_TEST_PATTERNS ?
"9. **Testing Approach**
- Document unit test implementations for each layer
- Show mocking patterns and test fixture setup
- Include integration test implementations
- Document test data generation approaches
- Show API/controller test implementations" : ""}
シーケンス図 (任意):
${INCLUDE_SEQUENCE_DIAGRAM ?
"10. **Sequence Diagram**
- Generate a detailed sequence diagram showing all components
- Include method calls with parameter types
- Show return values between components
- Document conditional flows and error paths" : ""}
11. 命名規則
以下について一貫したパターンを文書化します:
- コントローラーの命名 (例:
EntityNameController) - サービスの命名 (例:
EntityNameService) - リポジトリの命名 (例:
IEntityNameRepository) - DTO の命名 (例:
EntityNameRequest、EntityNameResponse) - CRUD 操作のメソッド命名パターン
- 変数の命名規則
- ファイル構成パターン
12. 実装テンプレート
以下に再利用可能なコードテンプレートを提供します:
- パターンに従って新しい API エンドポイントを作成する
- 新しいサービメソッドを実装する
- 新しいリポジトリメソッドを追加する
- 新しいドメインモデルクラスを作成する
- 適切なエラーハンドリングを実装する
テクノロジー固有の実装パターン
.NET 実装パターン (検出された場合):
${PROJECT_TYPE == ".NET" || PROJECT_TYPE == "Auto-detect" ?
"- Complete controller class with attributes, filters, and dependency injection
- Service registration in Startup.cs or Program.cs
- Entity Framework DbContext configuration
- Repository implementation with EF Core or Dapper
- AutoMapper profile configurations
- Middleware implementations for cross-cutting concerns
- Extension method patterns
- Options pattern implementation for configuration
- Logging implementation with ILogger
- Authentication/authorization filter or policy implementations" : ""}
Spring 実装パターン (検出された場合):
${PROJECT_TYPE == "Java" || PROJECT_TYPE == "Spring" || PROJECT_TYPE == "Auto-detect" ?
"- Complete controller class with annotations and dependency injection
- Service implementation with transaction boundaries
- Repository interface and implementation
- JPA entity definitions with relationships
- DTO class implementations
- Bean configuration and component scanning
- Exception handler implementations
- Custom validator implementations" : ""}
React 実装パターン (検出された場合):
${PROJECT_TYPE == "React" || PROJECT_TYPE == "Auto-detect" ?
"- Component structure with props and state
- Hook implementation patterns (useState, useEffect, custom hooks)
- API service implementation
- State management patterns (Context, Redux)
- Form handling implementations
- Route configuration" : ""}
実装ガイドライン
文書化されたワークフローに基づき、新機能を実装するための具体的なガイダンスを提供します:
1. ステップバイステップの実装プロセス
- 類似の機能を追加する際にどこから始めるか
- 実装の順序 (例: モデル → リポジトリ → サービス → コントローラー)
- 既存の横断的関心事とどのように統合するか
2. 避けるべき一般的な落とし穴
- 現在の実装におけるエラーが発生しやすい領域を特定する
- パフォーマンスに関する考慮事項を記録する
- よくあるバグや遭遇する問題をリストアップする
3. 拡張メカニズム
- 既存の拡張ポイントにどのように接続するかを文書化する
- 既存のコードを変更せずに新しい動作を追加する方法を示す
- 設定駆動型の機能パターンを説明する
結論: コードベースとの一貫性を維持するために、新機能を実装する際に従うべき 最も重要なパターンの概要をまとめて締めくくります。"
コメント
Markdown 対応