mcpField
F
feature-analyzer

feature-analyzer

github.com/notedit開発340105 回インストール34 週間前に更新
リポジトリ

feature-analyzer について

Feature Analyzerは、アイデアを機能設計や仕様にまとめるスキルです。段階的な質問、実装案の比較、各設計セクションの確認を通じて、設計文書と実装タスクを作成します。

主な機能

  1. 01コード構成と既存パターンを調査
  2. 02段階的に要件を収集
  3. 03実装アプローチを比較
  4. 04設計をセクションごとに確認
  5. 05設計文書とタスク一覧を作成

活用シーン

  1. 01初期アイデアを明確な要件に整理
  2. 02複数レイヤーにまたがる機能を計画
  3. 03関係者と技術方針を確認
  4. 04実装タスクのチェックリストを作成

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/notedit/happy-skills --skill feature-analyzer

インストール後、Claude Code で/feature-analyzerを入力して読み込まれたか確認します。

詳細

機能アナライザー

構造化された情報収集と共同での検証を通じて、アイデアを十分に練られた設計や仕様にまとめるのを支援します。

開始時に宣言: 「この機能を設計するために、feature-analyzer スキルを使用します。」

フェーズ 1:コンテキストの把握

まず、コードベースを調査して、次の内容を把握します。

  • プロジェクトの構成と技術スタック
  • 既存のパターンと規約
  • 関連する機能やモジュール
  • 関連領域での最近の変更

フェーズ 2:構造化された情報収集

AskUserQuestion を使用して、情報をまとめて効率よく収集します。1 回の呼び出しで最大 4 つの質問をできます。

第 1 ラウンド:主要な要件(4 つの質問)
{
  "questions": [
    {
      "question": "What is the primary goal of this feature?",
      "header": "Goal",
      "multiSelect": false,
      "options": [
        { "label": "New Functionality", "description": "Add entirely new capability to the system" },
        { "label": "Enhancement", "description": "Improve or extend existing feature" },
        { "label": "Bug Fix", "description": "Fix incorrect behavior or issue" },
        { "label": "Refactoring", "description": "Improve code quality without changing behavior" }
      ]
    },
    {
      "question": "Who are the primary users of this feature?",
      "header": "Users",
      "multiSelect": true,
      "options": [
        { "label": "End Users", "description": "External customers using the product" },
        { "label": "Admins", "description": "Internal administrators or operators" },
        { "label": "Developers", "description": "Other developers using APIs or SDKs" },
        { "label": "System", "description": "Automated processes or background jobs" }
      ]
    },
    {
      "question": "What is the expected scope of this feature?",
      "header": "Scope",
      "multiSelect": false,
      "options": [
        { "label": "Small (1-2 days)", "description": "Single component, limited changes" },
        { "label": "Medium (3-5 days)", "description": "Multiple components, moderate complexity" },
        { "label": "Large (1-2 weeks)", "description": "Cross-cutting concerns, significant changes" },
        { "label": "Unsure", "description": "Need to explore further to estimate" }
      ]
    },
    {
      "question": "Are there any hard deadlines or constraints?",
      "header": "Timeline",
      "multiSelect": false,
      "options": [
        { "label": "Urgent", "description": "Need this ASAP, within days" },
        { "label": "This Sprint", "description": "Should be done within current sprint" },
        { "label": "Flexible", "description": "No hard deadline, quality over speed" },
        { "label": "Planning Only", "description": "Just designing now, implementing later" }
      ]
    }
  ]
}
第 2 ラウンド:技術要件(4 つの質問)
{
  "questions": [
    {
      "question": "Which layers of the system will this feature touch?",
      "header": "Layers",
      "multiSelect": true,
      "options": [
        { "label": "Data Model", "description": "Database schema, models, migrations" },
        { "label": "Business Logic", "description": "Services, domain logic, rules" },
        { "label": "API", "description": "REST/GraphQL endpoints, contracts" },
        { "label": "UI", "description": "Frontend components, user interface" }
      ]
    },
    {
      "question": "What are the key quality requirements?",
      "header": "Quality",
      "multiSelect": true,
      "options": [
        { "label": "High Performance", "description": "Must handle high load or be very fast" },
        { "label": "Strong Security", "description": "Sensitive data, auth, access control" },
        { "label": "High Reliability", "description": "Cannot fail, needs redundancy" },
        { "label": "Easy Maintenance", "description": "Needs to be easily understood and modified" }
      ]
    },
    {
      "question": "How should errors be handled?",
      "header": "Errors",
      "multiSelect": false,
      "options": [
        { "label": "Fail Fast", "description": "Stop immediately on any error" },
        { "label": "Graceful Degrade", "description": "Continue with reduced functionality" },
        { "label": "Retry & Recover", "description": "Automatic retry with recovery logic" },
        { "label": "Context Dependent", "description": "Different strategies for different cases" }
      ]
    },
    {
      "question": "What testing approach is preferred?",
      "header": "Testing",
      "multiSelect": false,
      "options": [
        { "label": "TDD (Recommended)", "description": "Write tests first, then implementation" },
        { "label": "Test After", "description": "Implement first, add tests after" },
        { "label": "Minimal Tests", "description": "Only critical path testing" },
        { "label": "No Tests", "description": "Skip testing for this feature" }
      ]
    }
  ]
}
第 3 ラウンド:統合と依存関係(4 つの質問)
{
  "questions": [
    {
      "question": "Does this feature need external integrations?",
      "header": "Integrations",
      "multiSelect": true,
      "options": [
        { "label": "Database", "description": "New tables, queries, or migrations" },
        { "label": "External APIs", "description": "Third-party service calls" },
        { "label": "Message Queue", "description": "Async processing, events" },
        { "label": "None", "description": "No external integrations needed" }
      ]
    },
    {
      "question": "Are there dependencies on other features or teams?",
      "header": "Dependencies",
      "multiSelect": true,
      "options": [
        { "label": "Auth System", "description": "User authentication or authorization" },
        { "label": "Other Features", "description": "Depends on features being developed" },
        { "label": "External Team", "description": "Needs input from another team" },
        { "label": "None", "description": "Fully independent feature" }
      ]
    },
    {
      "question": "How should we handle backwards compatibility?",
      "header": "Compat",
      "multiSelect": false,
      "options": [
        { "label": "Must Maintain", "description": "Cannot break existing clients" },
        { "label": "Version API", "description": "Create new version, deprecate old" },
        { "label": "Breaking OK", "description": "Can make breaking changes" },
        { "label": "Not Applicable", "description": "New feature, no existing users" }
      ]
    },
    {
      "question": "What documentation is needed?",
      "header": "Docs",
      "multiSelect": true,
      "options": [
        { "label": "API Docs", "description": "Endpoint documentation" },
        { "label": "User Guide", "description": "How-to for end users" },
        { "label": "Dev Guide", "description": "Technical implementation details" },
        { "label": "None", "description": "No documentation needed" }
      ]
    }
  ]
}
第 4 ラウンド:確認の質問(状況に応じて)

これまでの回答に基づいて、追加の質問をします。例:

UI レイヤーが選択された場合:

{
  "questions": [
    {
      "question": "What UI framework/approach should we use?",
      "header": "UI Tech",
      "multiSelect": false,
      "options": [
        { "label": "React", "description": "React components with hooks" },
        { "label": "Vue", "description": "Vue.js components" },
        { "label": "Server-Side", "description": "Server-rendered HTML templates" },
        { "label": "Existing Pattern", "description": "Follow current project conventions" }
      ]
    }
  ]
}

高セキュリティが選択された場合:

{
  "questions": [
    {
      "question": "What security measures are required?",
      "header": "Security",
      "multiSelect": true,
      "options": [
        { "label": "Input Validation", "description": "Strict input sanitization" },
        { "label": "Rate Limiting", "description": "Prevent abuse and DoS" },
        { "label": "Audit Logging", "description": "Track all sensitive actions" },
        { "label": "Encryption", "description": "Encrypt data at rest/transit" }
      ]
    }
  ]
}

フェーズ 3:アプローチの検討

要件を収集した後、2~3 個のアプローチを提案します。

## Approach Options

### Option A: [Name] (Recommended)
**Pros:** ...
**Cons:** ...
**Best for:** ...

### Option B: [Name]
**Pros:** ...
**Cons:** ...
**Best for:** ...

### Option C: [Name]
**Pros:** ...
**Cons:** ...
**Best for:** ...

AskUserQuestion を使用して、アプローチを確認します。

{
  "questions": [
    {
      "question": "Which approach would you like to proceed with?",
      "header": "Approach",
      "multiSelect": false,
      "options": [
        { "label": "Option A (Recommended)", "description": "Brief summary of approach A" },
        { "label": "Option B", "description": "Brief summary of approach B" },
        { "label": "Option C", "description": "Brief summary of approach C" }
      ]
    }
  ]
}

フェーズ 4:設計の提示

設計をセクションごとに提示し(各 300~500 語)、各セクションの後に検証します。

  1. アーキテクチャの概要 - 大まかな構造
  2. データモデル - エンティティ、関係、スキーマ
  3. API 設計 - エンドポイント、リクエスト/レスポンス
  4. コンポーネント設計 - 内部モジュール、インターフェース
  5. エラー処理 - エラーケース、復旧戦略
  6. テスト戦略 - テスト対象と方法

各セクションの後に AskUserQuestion を使用します。

{
  "questions": [
    {
      "question": "Does this section look correct?",
      "header": "Review",
      "multiSelect": false,
      "options": [
        { "label": "Looks Good", "description": "Continue to next section" },
        { "label": "Minor Changes", "description": "Small adjustments needed" },
        { "label": "Major Revision", "description": "Significant changes required" },
        { "label": "Questions", "description": "Need clarification before proceeding" }
      ]
    }
  ]
}

フェーズ 5:ドキュメントとタスク

設計ドキュメントの保存

docs/designs/YYYY-MM-DD-<topic>-design.md に書き込みます。

# Feature: [Name]

## Summary
[Brief description]

## Requirements
[From Phase 2 answers]

## Architecture
[From Phase 4]

## Implementation Tasks
[Task checklist]
実装タスクの生成
## Implementation Tasks

- [ ] **Task Title** `priority:1` `phase:model` `time:15min`
  - files: src/file1.py, tests/test_file1.py
  - [ ] Write failing test for X
  - [ ] Run test, verify it fails
  - [ ] Implement minimal code
  - [ ] Run test, verify it passes
  - [ ] Commit

- [ ] **Another Task** `priority:2` `phase:api` `deps:Task Title` `time:10min`
  - files: src/api.py
  - [ ] Write failing test
  - [ ] Implement and verify
  - [ ] Commit

フェーズ 6:実行への引き継ぎ

{
  "questions": [
    {
      "question": "How would you like to proceed with implementation?",
      "header": "Next Step",
      "multiSelect": false,
      "options": [
        { "label": "Execute Now", "description": "Run /feature-pipeline in this session" },
        { "label": "New Session", "description": "Start fresh session for implementation" },
        { "label": "Later", "description": "Save design, implement manually later" },
        { "label": "Revise Design", "description": "Go back and modify the design" }
      ]
    }
  ]
}

主な原則

  • 質問を効率よくまとめる - 適切な場合は 4 つの質問枠をすべて使う
  • 排他的でない選択肢には multiSelect を使う - レイヤー、機能、要件
  • 決定には単一選択を使う - アプローチ、スケジュール、戦略
  • 推奨項目を明示する - 優先する選択肢に「(推奨)」を追加する
  • 段階的に詳細化する - 全般的な質問から具体的な質問へ
  • 段階的に検証する - 各フェーズで理解を確認する
  • YAGNI を徹底する - 設計から不要な機能を取り除く

コメント