test-generator
Auto-generate Vitest unit tests and Playwright e2e tests from product spec acceptance criteria using TDD. Use when writing tests before implementation, generating test stubs from acceptance criteria, enforcing TDD red-green workflow, evaluating test quality for brittleness or looseness, or gating features on code coverage thresholds.
- License 许可
- GPL-3.0
- 最近更新
- 2026-04-24
- Stars
- ★ 1
- Forks
- 3
01 前言 Front Matter
- name
- test-generator
- next
- [ "verify", "ultraqa", "ci-cd-pipeline" ]
- group
- build
- workflows
- [ "ship-feature", "full-startup" ]
- description
- Auto-generate Vitest unit tests and Playwright e2e tests from product spec acceptance criteria using TDD. Use when writing tests before implementation, generating test stubs from acceptance criteria, enforcing TDD red-green workflow, evaluating test quality for brittleness or looseness, or gating features on code coverage thresholds.
- prerequisites
- [ "sprint-contracts" ]
- user-invocable
- true
03 SKILL.md 正文
Test Generator
Criteria Extraction
- Parse the product spec or feature checklist to extract testable acceptance criteria.
- Classify each criterion as unit-testable (logic, data transforms, validation) or e2e-testable (user flows, page interactions, navigation).
Test Generation
- For unit criteria, generate Vitest test files with descriptive names derived from the acceptance criteria text.
- For e2e criteria, generate Playwright test files covering happy path and key error paths.
- Generate mock fixtures and test doubles for external dependencies (APIs, databases, third-party services).
TDD Enforcement
- Verify all generated tests fail before implementation begins (red phase). Block implementation if any test already passes.
- Hand off to the coding agent for implementation until all tests pass (green phase).
Test Quality Evaluation
- Brittle tests: Flag tests asserting on DOM structure, exact string matches, or timing-dependent values.
- Loose tests: Flag tests checking only truthy values, lacking meaningful assertions, or missing edge case coverage.
Coverage and Reporting
- Measure code coverage (line, branch, function); compare against thresholds in
stacks.yml. - Block feature completion if coverage drops below the configured minimum.
- Generate a test report: pass/fail/skip counts with links to originating acceptance criteria.
- Update the feature checklist to auto-check items when corresponding tests pass.
04 同仓库更多 Skills
writer-memory
Agentic memory system for writers - track characters, relationships, scenes, and themes
wiki
LLM Wiki — persistent markdown knowledge base that compounds across sessions (Karpathy model)
website-creation
Build production-quality SaaS websites with opinionated design presets. Use when creating any startup website. The user MUST pick a design style before building. Enforces shadcn/ui, Figma design principles, specific CSS values per style, and anti-AI-writing. Load alongside anti-ai-writing skill. LIGHT MODE ONLY.
visual-verdict
Structured visual QA verdict for screenshot-to-reference comparisons
visual-qa-pipeline
Screenshot every page with Playwright, feed to visual QA agent for design evaluation, report results to Slack. Use after every build phase to verify UI matches the chosen design preset. Integrates with the Playwright skill and the website-creation preset system.
verify
Verify that a change really works before you claim completion