Skip to main content

Spec-driven code generation framework: write intent as decorated Python stubs, generate implementations and tests with LLMs.

Project description

Jaunt

Jaunt is a small Python library + CLI for spec-driven code generation:

  • Write implementation intent as normal Python stubs decorated with @jaunt.magic(...).
  • Optionally write test intent as stubs decorated with @jaunt.test(...).
  • Jaunt generates real modules under __generated__/ using an LLM backend (OpenAI or Anthropic).

Installation

pip install jaunt[openai]      # for OpenAI
pip install jaunt[anthropic]   # for Anthropic/Claude
pip install jaunt[all]         # both providers

Quickstart (This Repo)

Prereqs: uv installed.

uv sync
export OPENAI_API_KEY=...   # or ANTHROPIC_API_KEY for Claude
uv run jaunt --version

See docs-site/ for rendered docs, or DOCS.md for a plain-text walkthrough.

All examples live under examples/. See examples/README.md for the full list.

Hackathon Demo (JWT Auth)

Headline demo: JWT auth (the "wow gap" example: short spec, real generated glue + tests).

# Generate implementations for @jaunt.magic specs.
uv run jaunt build --root examples/jwt_auth

# Generate pytest tests for @jaunt.test specs and run them.
PYTHONPATH=examples/jwt_auth/src uv run jaunt test --root examples/jwt_auth

Eval Suite

Run the built-in eval suite against your configured backend:

uv run jaunt eval
uv run jaunt eval --model gpt-4o
uv run jaunt eval --provider anthropic --model claude-sonnet-4-5-20250929

Compare explicit provider/model targets:

uv run jaunt eval --compare openai:gpt-4o anthropic:claude-sonnet-4-5-20250929

Eval outputs are written under .jaunt/evals/<timestamp>/.

Prompt snapshots:

uv run pytest tests/test_prompt_snapshots.py --snapshot-update

Auto-Generate PyPI Skills (Build)

jaunt build includes a best-effort pre-build step that auto-generates “skills” for external libraries your project imports and injects them into the build prompt.

What happens:

  • Scan paths.source_roots for import ... / from ... import ... (ignores stdlib, internal modules, and relative imports).
  • Resolve imports to installed PyPI distributions + versions from the current environment.
  • Ensure a skill exists per distribution at:
    • <project_root>/.agents/skills/<dist-normalized>/SKILL.md
  • If missing/outdated, fetch the exact PyPI README for <dist>==<version> and generate SKILL.md using the configured LLM provider.
  • Inject the concatenated skills text into the build LLM prompt.

Overwrite rules:

  • Jaunt only overwrites a skill if it was previously Jaunt-generated (it has a <!-- jaunt:skill=pypi ... --> header) and the installed version changed.
  • If the header is missing, the file is treated as user-managed and will never be overwritten.

Failure mode: warnings to stderr, and the build continues without missing skills.

Docs Site (Fumadocs)

The repository includes a Fumadocs (Next.js) documentation site under docs-site/.

cd docs-site
npm run dev

Publish to PyPI

If you keep your token in .env as UV_PUBLISH_TOKEN=..., load it into your shell first:

set -a
source .env
set +a

Build and validate artifacts:

uv build
uvx twine check dist/*

Upload to PyPI:

uv publish --check-url https://pypi.org/simple/

Dev

uv run ruff check .
uv run ty check
uv run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaunt-0.2.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jaunt-0.2.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file jaunt-0.2.0.tar.gz.

File metadata

  • Download URL: jaunt-0.2.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jaunt-0.2.0.tar.gz
Algorithm Hash digest
SHA256 02dbf6b1913072882185bf3545ead2cbbc1e425b781b6c3d0d779df9dca353cb
MD5 c8ce3b1553c87464400a9e1d21a90179
BLAKE2b-256 6222002f213cbe9e2b937fd407d76645cd869c43da22673684a872398a49a469

See more details on using hashes here.

File details

Details for the file jaunt-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: jaunt-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jaunt-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fea7e6fd621c30ad0825b502cc29d46886428398d1e25dd0f5095b46499bd1f
MD5 27834895c6faeb54a7a1eb7f33d5ff3e
BLAKE2b-256 8932982bf368f8dcc1809978833199100047da5a7938fd5b7b17b364b591437a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page