Build with AI
ZeroJ is young, so AI models have little or no training data about it. Without context, an assistant will happily invent classes, reach for BN254 or MiMC, skip range checks, or treat a dev-only trusted setup as production-ready. This site ships everything an agent needs to get ZeroJ right on the first try.
Point your assistant at the AI Starter Pack — or at llms.txt, and let it pull what it needs.
| Artifact | Use it when |
|---|---|
/ai/starter-pack.md | Start here. One file with the rules, idioms, anti-patterns, error→fix table, canonical code and a generated circuit API catalog. Save it as CLAUDE.md, AGENTS.md or a Cursor rule. |
/llms.txt | A compact index of the whole site (llmstxt.org convention) with the key facts an agent must not get wrong. |
/llms-full.txt | Every documentation page concatenated into one Markdown file, for tools that ingest a single URL. |
/ai/catalog.json | Machine-readable catalog of the symbolic circuit API — annotations, Zk* types and gadget adapters — extracted from the Java sources at build time. |
/ai/manifest.json | ZeroJ, JuLC and Cardano Client Lib versions, the source revision, and a SHA-256 for every exported file. |
/ai/pages/<page>.md | A Markdown twin of every page. Use View Markdown or Copy page for AI under any page title. |
All of these are regenerated on every build from the same sources as the HTML pages, so they never drift from what you read here.
Set up your tool
Section titled “Set up your tool”Claude Code
Section titled “Claude Code”Save the starter pack as your project’s CLAUDE.md (Claude Code reads it at the start of every session):
curl -o CLAUDE.md https://zeroj.dev/ai/starter-pack.mdAlready have a CLAUDE.md? Keep the pack beside it and import it:
curl -o docs/zeroj-starter-pack.md https://zeroj.dev/ai/starter-pack.mdecho '@docs/zeroj-starter-pack.md' >> CLAUDE.mdCodex, Jules, Aider and other AGENTS.md tools
Section titled “Codex, Jules, Aider and other AGENTS.md tools”curl -o AGENTS.md https://zeroj.dev/ai/starter-pack.mdCursor
Section titled “Cursor”mkdir -p .cursor/rulescurl -o .cursor/rules/zeroj.mdc https://zeroj.dev/ai/starter-pack.mdGitHub Copilot
Section titled “GitHub Copilot”mkdir -p .githubcurl -o .github/copilot-instructions.md https://zeroj.dev/ai/starter-pack.mdContinue
Section titled “Continue”Add the full docs as a URL context provider in your Continue config:
{ "contextProviders": [ { "name": "url", "params": { "url": "https://zeroj.dev/llms-full.txt" } } ]}ChatGPT, Claude.ai and other chat assistants
Section titled “ChatGPT, Claude.ai and other chat assistants”Start the conversation with:
I'm building with ZeroJ, a Java zero-knowledge proof toolkit for Cardano.Before writing any code, read https://zeroj.dev/llms.txt andhttps://zeroj.dev/ai/starter-pack.md and follow them strictly:Groth16 on BLS12-381, annotation-style circuits (@ZKCircuit),Poseidon with PoseidonParamsBLS12_381T3.INSTANCE, dev-only trustedsetup behind -Dzeroj.allowInsecureTrustedSetup=true, and no APIs thatare not in the docs or the circuit API catalog.If the assistant can’t browse, paste the starter pack (or use Copy page for AI on the pages you need).
Prompts that work well
Section titled “Prompts that work well”Be specific about the statement, what’s secret, what’s public, and ask for tests that try to cheat:
Using ZeroJ, write a @ZKCircuit proving that a secret balance (64-bit)is at least a public threshold. Add JUnit 5 tests with one valid witnessand at least two invalid ones (balance below threshold, balance thatoverflows 64 bits). Then prove with Groth16Keys and verify withGroth16BLS12381PureJavaVerifier. Use only APIs from the starter pack.Review this ZeroJ circuit for soundness: list every relation theapplication relies on and point to the constraint that enforces it.Flag any value that is computed but never constrained, any ZkUIntwithout @UInt(bits), and any Java control flow over secret values.I verify this proof on Cardano with ZeroJ's on-chain Groth16BLS12381Verifiervalidator (org.zeroj.onchain.julc.groth16.validator).Explain how a third party could replay it, and change the design so theproof is bound to the spent UTxO and each user can claim only once.Review what the agent writes
Section titled “Review what the agent writes”AI assistants make the same mistakes in ZK code that humans do — just faster. Before you trust generated code:
- Constraints, not just outputs. A circuit that returns the right answer for honest inputs can still accept a cheater. Insist on invalid-witness tests. See Test your circuits for soundness.
- Ranges. Every
ZkUIntneeds@UInt(bits = N); field arithmetic wraps around. - Curves and hashes. BLS12-381 and Poseidon with explicit BLS12-381 parameters for anything headed to Cardano.
- Setup.
-Dzeroj.allowInsecureTrustedSetup=truebelongs in tests and local demos only. Real keys come from a ceremony. - On-chain policy. A valid proof is not authorization. Check replay protection, nullifiers and
ScriptContextbinding against Secure your ZK application. - PlonK. It is experimental in ZeroJ. If an agent picks PlonK, ask why — Groth16 is the supported path.
What this site does not provide
Section titled “What this site does not provide”These are static context files. There is no hosted MCP server, no remote prover and no signing service. Your proofs, witnesses and keys never leave your machine unless your own code sends them somewhere.
Help improve the context
Section titled “Help improve the context”If your agent keeps getting a ZeroJ pattern wrong, open an issue with the prompt and the bad output. The fix usually belongs in the starter pack, so the next agent doesn’t repeat it.