Generate deterministic test suites from markdown specs
The agent creates a complete, typed test suite (Vitest or Jest) from a Markdown business rule spec, eliminating boilerplate and ensuring tests reflect actual requirements without hallucination.
How it works
The agent connects to the 3TG MCP server and receives a Markdown table defining business rules or component behavior. It processes this spec to generate corresponding TypeScript test files using Vitest or Jest. The agent ensures the generated code includes proper imports, describe/it blocks, and assertions that map directly to the input/output rows in the spec. Before committing, the user should review the generated test file to ensure the logic matches the intended business rules, as the spec is the source of truth.
Prompt
Paste this into an agent that has the servers below connected. Adjust the names and dates to your own.
Generate a deterministic test suite for the following business rule spec using Vitest. Ensure the output is valid TypeScript and covers all rows in the table.
# isAdult(age: number)
| test name | age | isAdult |
| ----------- | --- | ------------------- |
| is NaN | NaN | throw 'Invalid age' |
| is negative | -1 | throw 'Invalid age' |
| is zero | 0 | false |
| is below | 17 | false |
| is exactly | 18 | true |
| is above | 19 | true |MCP servers it needs
Source
The vendor page this playbook is drawn from, and the passage that supports it.
3TG turns the business rules you write in clean Markdown tables into a complete, deterministic test suite — generated right inside VS Code and IntelliJ.3TG — Tested codebase, zero boilerplate