スキル一覧に戻る
hohai99

self-test-generator

by hohai99

0🍴 1📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: self-test-generator description: Generates tests directly from specifications and tasks. Use immediately after implementing a task. triggers: [task-complete, pre-review] outputs: [test-suite, coverage-report] depends_on: [no-guess-implementation]

Self Test Generator

Purpose

Generates behavior-based tests directly from specifications, not from code intuition. Tests are derived from what the spec says, not what the code does.

When to Use

  • After completing an implementation task
  • Before any manual review
  • When spec changes require test updates

Generation Steps

  1. Read Spec Sections: Identify all spec clauses relevant to the implemented task.
  2. Map Spec to Test Cases: Generate happy path, edge case, error case, and constraint tests.
  3. Write Behavior-Based Tests: Implement tests using relevant frameworks (JEST, PyTest, etc.).
  4. Reference Spec in Tests: Every test MUST reference its source spec clause (e.g., // Spec: AUTH-001).

Decision Tree

flowchart TD
    A[Start Test Gen] --> B{Spec ID found?}
    B -->|No| C[Stop - Refine Spec first]
    B -->|Yes| D{Multiple clauses?}
    D -->|Yes| E[Group tests by Spec ID]
    D -->|No| F[Create single test suite]
    E --> G{Complex logic?}
    F --> G
    G -->|Yes| H[Add extra edge case coverage]
    G -->|No| I[Happy path + basic error cases]
    H --> J[Verify Traceability]
    I --> J

Review Checklist

  1. Traceability: Does every test link back to a valid Spec ID?
  2. Isolation: Do tests avoid depending on implementation internals?
  3. Completeness: Are edge cases and error states covered as per spec?
  4. Determinism: Are tests reliable and independent of environment?

How to provide feedback

  • Be specific: "The test for 'Login' fails to assert the 24h expiry requirement from AUTH-001."
  • Explain why: "Without checking expiry, the test doesn't actually prove the spec is fully implemented."
  • Suggest alternatives: "Recommend adding expect(token.expiry).toBe(86400) to the test."

Tests are spec enforcement, not code validation.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です