Spec-driven code generation for Python and TypeScript

Describe what you want. Jaunt writes the implementation.

Python specs are typed stubs governed by jaunt.magic_module. TypeScript specs are private *.jaunt.ts[x] files analyzed by the project-local @usejaunt/ts worker. Jaunt drives the OpenAI Codex CLI, validates each candidate with the target's own toolchain, and commits ordinary reviewable source to your repo.

jaunt version on PyPI@usejaunt/ts next version on npm

A Python module of intent in, working code out

The module on the left is what you commit: one magic_module call, a docstring-only Email class, a function stub, and a handwritten helper, all in one file. On the right is the parse_email jaunt generated on a real run. It also designed the Email class and the header-parsing helpers this calls, and left ADDR_RE and _render_debug alone. None of it is hand-edited.

Spec — you write this
import re

import jaunt

jaunt.magic_module(__name__, prompt="All parsers are RFC 5322 strict.")

ADDR_RE = re.compile(r"[^@\s]+@[^@\s]+")   # handwritten constant


class Email:
    """An email message with from_, to, subject, and body string fields.

    Validate on construction: from_ and to must each look like an address.
    """


def parse_email(raw: str) -> Email:
    """Parse a raw RFC 5322 payload into an Email. Read the From, To, and
    Subject headers and the body after the first blank line. Raise ValueError
    on malformed input."""
    ...


def _render_debug(email: Email) -> str:      # real body → handwritten
    return f"<{email.from_} -> {email.to}>"
Generated — jaunt writes this
def parse_email(raw: str) -> Email:
    raw_text = _require_string("raw", raw)
    header_text, body = _split_headers_body(raw_text)
    headers = _parse_headers(header_text)

    from_ = _required_header(headers, "From", allow_empty=False)
    to = _required_header(headers, "To", allow_empty=False)
    subject = _required_header(headers, "Subject", allow_empty=True)

    try:
        return Email(from_, to, subject, body)
    except ValueError as exc:
        raise ValueError(f"Malformed email: {exc}") from exc

Jaunt builds Jaunt

Since 1.5.2 the framework is its own adopter. The jaunt guard hook, held-out test redaction, jaunt migrate, and the contract-mode machinery are docstring specs — generated exactly like the demo above, their bodies shipped in the wheel you install. The build-critical core runs committed contract batteries, and jaunt check gates Jaunt's own drift on every pull request.

7
framework modules generated from their own docstring specs
31
committed contract batteries on 15 core modules, derived at $0
exit 0
jaunt check on Jaunt itself, in CI, no API key

Parallel, DAG-scheduled builds

Modules build over the dependency graph, critical path first. A module starts the instant its dependencies finish, up to [build] jobs at once, and a failure skips only its dependents. No wave barriers.

Learn more

Change detection that reads the contract

Digests hash the AST-normalized contract, so reformatting and comment edits rebuild nothing. Staleness follows the graph, and a small judge re-freezes reworded docstrings instead of paying for a rebuild.

Learn more

Contract mode

Keep hand-written code canonical and let jaunt derive a committed pytest or Vitest battery from its contract. The inverse of magic, for code you already trust.

Learn more

Built for coding agents

jaunt instructions prints a project-aware primer, every command speaks --json, jaunt check gates drift with no API key, and a guard hook warns agents off editing generated files.

Learn more

What it costs, where it breaks

Generation spends real tokens, and jaunt is a poor fit for throwaway scripts or hot-path code you would hand-tune anyway. The trade-offs are written down before you commit to them.