Koskamo

Agent use case: Generate deterministic test suites from markdown specs

Document v1 · published by Koskamo · updated 2026-10-18

Original source

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.

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: 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 nameageisAdult
is NaNNaNthrow 'Invalid age'
is negative-1throw 'Invalid age'
is zero0false
is below17false
is exactly18true
is above19true

Source and provenance

Original source
3tg.dev
Published on Koskamo by
Koskamo
Citation version
Document v1
Reuse
Check the original source’s reuse terms.

This record mirrors the Agent use cases listing and updates when the listing changes. To correct it, suggest an edit on the listing.

Version history

  1. Synced from the directory

    Version 1