mcpField

hackathon-test-generator

github.com/bernieweb3テスト・品質39 回インストール
リポジトリ

hackathon-test-generator について

hackathon-test-generator は、ハッカソンのデモ向けに重点的なテストと簡易的なカバレッジ計画を作成するスキルです。デモ全体のフローを優先し、制限時間に応じてテストのひな形、手動確認項目、デモの阻害要因を出力します。

主な機能

  1. 01デモフロー向けテストの優先
  2. 02完了条件に基づくテストケース生成
  3. 03否定系と境界値のテスト
  4. 04簡易テストのひな形作成
  5. 05手動確認項目とデモ阻害要因の提示

活用シーン

  1. 01審査前の MVP デモ確認
  2. 02限られた時間でのテスト計画
  3. 03不具合修正後のデモ再確認

インストール

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

$npx skills add https://github.com/bernieweb3/hackathon-ai-devkit --skill hackathon-test-generator

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

詳細

ハッカソンテスト生成ツール

目標

テストスイートを完全に網羅しなくてもデモの流れを検証できるよう、対象を絞ったテストケースと軽量なテストカバレッジ計画を生成します。


トリガー条件

以下の場合にこのスキルを使用します。

  • コアとなるMVP機能が実装され、デモの流れがエンドツーエンドでつながっている
  • hackathon-code-implementer の完了基準が用意されている
  • 審査前にデモでクラッシュが起きないことを確認する必要がある
  • デモ前の簡単な健全性チェックとして、手動での確認手順が必要である
  • 実装フェーズが安定した後に一度実行し、デモ経路のバグ修正後に再実行する

入力

入力型必須説明
mvp_featuresstring[]はいhackathon-scope-cutter によるMVP機能
mvp_demo_flowobject[]はいhackathon-scope-cutter によるデモの流れの手順
tech_stackstring[]はい使用中のテクノロジー
done_criteriastring[]はいhackathon-code-implementer による完了基準
time_budget_hoursnumberはいテストに使える時間数

出力

出力説明
test_casesデモの流れを網羅する優先順位付きのテストケース
coverage_planテスト対象と意図的にテストしない項目
test_scaffoldsテストの開始点となる最小限のテストスタブ
manual_checksデモの準備状況を確認する簡単な手動検証手順
demo_blockersデモを妨げる失敗条件

ルール

  1. ほかのすべてのカバレッジよりも、mvp_demo_flow を守るテストを優先します。
  2. 各 done_criterion に対して、最低1つのテストを生成します。
  3. デモに不可欠でないテストには [NICE-TO-HAVE] を付けます。
  4. 各MVP機能に対して、ネガティブケースまたはエッジケースのテストを少なくとも1つ含めます。
  5. test_scaffolds では、主要な tech_stack 言語における標準的なテストフレームワークを使用します。
  6. manual_checks は合計5分未満で完了できるようにします。
  7. ライブデモの失敗につながるシナリオは、すべて demo_blockers に含めます。

出力形式

test_cases:
  - id: "TC-<number>"
    feature: "<feature name>"
    description: "<what is tested>"
    type: "<unit|integration|e2e|manual>"
    priority: "<critical|high|[NICE-TO-HAVE]>"
    input: "<test input>"
    expected_output: "<expected result>"

coverage_plan:
  covered:
    - "<area>"
  intentionally_skipped:
    - area: "<area>"
      reason: "<why skipped>"

test_scaffolds:
  - label: "<test name>"
    language: "<language>"
    snippet: |
      <code>

manual_checks:
  - step: <number>
    action: "<what to do>"
    pass_condition: "<what success looks like>"

demo_blockers:
  - scenario: "<failure scenario>"
    mitigation: "<how to prevent or recover>"

例

入力:

mvp_features: ["GPT-4 check-in conversation", "Session memory", "Crisis escalation (mocked)"]
mvp_demo_flow:
  - step: 2
    action: "User describes recurring work stress"
    outcome: "AI references last week's similar conversation from memory"
  - step: 3
    action: "User expresses hopelessness"
    outcome: "AI surfaces crisis resource card"
tech_stack: ["Python", "FastAPI", "React", "Redis"]
done_criteria:
  - "New chat session shows AI referencing previous session content"
  - "Redis key contains non-empty summary after session ends"
time_budget_hours: 2

出力:

test_cases:
  - id: "TC-01"
    feature: "Session memory"
    description: "AI references prior session context in a new session"
    type: "e2e"
    priority: "critical"
    input: "Start session 1, say 'I'm anxious about exams'. End session. Start session 2."
    expected_output: "AI opening references exam anxiety from prior session"

  - id: "TC-02"
    feature: "Session memory"
    description: "Redis key is populated after session ends"
    type: "integration"
    priority: "critical"
    input: "Complete one chat session"
    expected_output: "redis.get('user:demo:summary') returns non-empty string"

  - id: "TC-03"
    feature: "Crisis escalation"
    description: "Crisis card appears when hopelessness language is detected"
    type: "e2e"
    priority: "critical"
    input: "User types 'I feel completely hopeless'"
    expected_output: "Crisis resource card rendered below AI response"

  - id: "TC-04"
    feature: "GPT-4 conversation"
    description: "Empty input does not crash the endpoint"
    type: "unit"
    priority: "[NICE-TO-HAVE]"
    input: "POST /chat with empty message body"
    expected_output: "HTTP 422 or graceful error response"

coverage_plan:
  covered:
    - "Demo flow steps 1–3"
    - "Memory persistence"
    - "Crisis card trigger"
  intentionally_skipped:
    - area: "Authentication"
      reason: "Not in MVP; hardcoded demo session"
    - area: "Concurrent users"
      reason: "Single-demo scenario; not required for judging"

test_scaffolds:
  - label: "Memory integration test"
    language: "python"
    snippet: |
      def test_memory_persists():
          save_memory("demo", "User is anxious about exams.")
          assert get_memory("demo") == "User is anxious about exams."

manual_checks:
  - step: 1
    action: "Run full demo flow from a clean Redis state"
    pass_condition: "AI references prior context at step 2 without prompting"
  - step: 2
    action: "Type 'I feel hopeless' into chat"
    pass_condition: "Crisis resource card appears within 3 seconds"

demo_blockers:
  - scenario: "Redis not running when demo starts"
    mitigation: "Add startup check; document 'redis-server' as pre-demo step in run guide"
  - scenario: "OpenAI API rate limit hit during live demo"
    mitigation: "Use pre-recorded screen capture of the memory recall moment as backup"

コンテキストファイル

ナレッジベース
  • ../hackathon-shared-resources/knowledge/hackathon-demo-patterns.md
  • ../hackathon-shared-resources/knowledge/hackathon-common-failures.md
  • ../hackathon-shared-resources/knowledge/hackathon-mvp-strategy.md
プレイブック
  • ../hackathon-shared-resources/playbooks/hackathon-workflow.md

コメント