hackathon-test-generator について
hackathon-test-generator は、ハッカソンのデモ向けに重点的なテストと簡易的なカバレッジ計画を作成するスキルです。デモ全体のフローを優先し、制限時間に応じてテストのひな形、手動確認項目、デモの阻害要因を出力します。
主な機能
- 01デモフロー向けテストの優先
- 02完了条件に基づくテストケース生成
- 03否定系と境界値のテスト
- 04簡易テストのひな形作成
- 05手動確認項目とデモ阻害要因の提示
活用シーン
- 01審査前の MVP デモ確認
- 02限られた時間でのテスト計画
- 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_features | string[] | はい | hackathon-scope-cutter によるMVP機能 |
mvp_demo_flow | object[] | はい | hackathon-scope-cutter によるデモの流れの手順 |
tech_stack | string[] | はい | 使用中のテクノロジー |
done_criteria | string[] | はい | hackathon-code-implementer による完了基準 |
time_budget_hours | number | はい | テストに使える時間数 |
出力
| 出力 | 説明 |
|---|---|
test_cases | デモの流れを網羅する優先順位付きのテストケース |
coverage_plan | テスト対象と意図的にテストしない項目 |
test_scaffolds | テストの開始点となる最小限のテストスタブ |
manual_checks | デモの準備状況を確認する簡単な手動検証手順 |
demo_blockers | デモを妨げる失敗条件 |
ルール
- ほかのすべてのカバレッジよりも、
mvp_demo_flowを守るテストを優先します。 - 各
done_criterionに対して、最低1つのテストを生成します。 - デモに不可欠でないテストには
[NICE-TO-HAVE]を付けます。 - 各MVP機能に対して、ネガティブケースまたはエッジケースのテストを少なくとも1つ含めます。
test_scaffoldsでは、主要なtech_stack言語における標準的なテストフレームワークを使用します。manual_checksは合計5分未満で完了できるようにします。- ライブデモの失敗につながるシナリオは、すべて
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
コメント
Markdown 対応