# Use Jadpo with a coding agent

Jadpo is an experimental programming language for web backends. Use it with a coding agent such as [Claude Code](https://code.claude.com/docs/en/quickstart) or [OpenAI Codex](https://developers.openai.com/codex). Jadpo is new, so your agent learns it from these docs, in order. When a compiler error needs a decision only you can make, such as making a route public, it says so, and your agent asks you.

## Paste this prompt

The prompt has your agent read the primer, install the CLI and start a project. It installs software, so read it before you paste it. [Install](/install) shows the same steps for doing it yourself.

`Paste into your agent`:

```text
Help me try Jadpo, an experimental language for AI-written backends. It's new and changes between versions, so don't rely on what you remember about it. Start at https://jadpo.dev/llms.txt and read https://jadpo.dev/docs/primer.md before writing any Jadpo.

Install the Jadpo CLI as https://jadpo.dev/install.md describes, start a project with jadpo new, then run jadpo check and jadpo test in it.

When an error's next step ends in (human), stop and ask me before changing anything. For other errors, read the error's page, fix it, and tell me what the compiler caught.
```

To explore the language and how it works instead, use this prompt. It works from a local copy of the repository.

`Explore the language`:

```text
Help me explore Jadpo, an experimental language for web backends: https://github.com/jadpo-dev/jadpo

1. Fetch https://jadpo.dev/install.md and follow it to install the Jadpo CLI, the jadpo command that checks and tests Jadpo projects.
2. Clone the repository at the release I installed, so its docs and examples match the CLI: git clone --branch v0.1.0 https://github.com/jadpo-dev/jadpo
3. Read README.md and docs/language/README.md. Then explain why Jadpo exists, what it can build, what its compiler checks before code runs, and which features aren't built yet. Cite the files you read.
4. Walk me through the first example project, examples/01-first-project, including its source and tests. Run jadpo check, which runs the compiler's checks, and jadpo test on it.
5. Suggest a small change and make it in a copy of the example. Run jadpo check and jadpo test again, and explain what they report.

If a tool is missing, tell me what to install and why, and don't install anything else without asking.
```

If your agent can't open web pages, the same docs are in [Jadpo's repository on GitHub](https://github.com/jadpo-dev/jadpo).

## How an agent should read the docs

1.  [`/llms.txt`](/llms.txt)
    
    What Jadpo is, where the primer is, how to find any page.
    
2.  [`/docs/primer.md`](/docs/primer.md)
    
    Once per session. Layout, syntax and the constructs nearly every app uses.
    
3.  [`/learn.md`](/learn.md)
    
    When teaching a person, or building a first app with them: the Learn path's outline, then each page at `/learn/<id>.md` in order. Each one adds a step to one todo app.
    
4.  [`/docs/index.json`](/docs/index.json)
    
    One entry per page: id, kind, title, summary and token count. Pick pages from it.
    
5.  Only the `.md` pages the task needs
    
    A topic is at `/docs/<id>.md`, for example [`/docs/tenancy.md`](/docs/tenancy.md). [Tools for agents](/docs/tools-for-agents) shows how an agent can look things up with the `jadpo` command instead.
    
6.  An error's page, by its rule
    
    Every error names its rule, such as `policy.public_grant_missing`. Read the rule's page only when the error's own reason and next step aren't enough: `/docs/errors/<rule>.md`.
    

These docs follow Jadpo's `main` branch. Each released version's docs are at the same paths under `/v/<major>.<minor>/`, starting at [`/v/0.1/llms.txt`](/v/0.1/llms.txt).

## `(agent)` and `(human)`

Every error ends its next step with who acts. `(agent)` is a fix the agent can make. `(human)` is a decision for a person, such as making a route public, so the agent stops and asks you.

Output of `jadpo check`, check failed: 1 error, 1 file:

error `GET /articles/{article_id}` lets anyone call it, but not everyone may read `Article`

- **next:** Add `Access.public` to `Article`'s `read:`, or remove `authentication: RouteAuthentication.none` from the route (human)
- **rule:** [policy.public\_grant\_missing](/docs/errors/policy.public_grant_missing)

**Your call:** should anyone on the internet be able to read articles? The agent asks.

Real output from [policy.public\_grant\_missing](/docs/errors/policy.public_grant_missing), shortened: the source excerpt and the reason are left out.

`(human)` is an instruction your agent follows, not a block: the compiler accepts the change if the agent makes it. That's why the prompt and the AGENTS.md section tell it to stop and ask.

## Add this to your AGENTS.md

Many agents, Codex among them, load `AGENTS.md` on their own. Claude Code reads `CLAUDE.md`, so add the line `@AGENTS.md` to it, which tells Claude Code to read that file too.

The section names no version, so it stays right when you upgrade. Your agent reads the docs for the Jadpo you have installed. Each minor version, such as 0.3, keeps its own copy of the docs at `/v/<major>.<minor>/`, such as `/v/0.3/`, updated with that version's fixes. Without one, your agent reads these pages, which are always the newest docs.

`AGENTS.md` (paste into your project):

```text
## Jadpo

The backend in this project is written in Jadpo, an experimental language for web backends. It's new and changes between versions, so don't rely on what you remember about it or guess its syntax. Work from the docs for the Jadpo installed here.

- Find the docs. Run `jadpo version --json` for the installed version, and use its major and minor numbers as the docs' base address: for 0.3.2, that's https://jadpo.dev/v/0.3/. If <base>/llms.txt doesn't exist, use https://jadpo.dev/ as the base instead. Those are the newest docs, and they may describe things your installed Jadpo can't do yet.
- Read <base>/llms.txt, then <base>/docs/primer.md once per session. To teach me Jadpo step by step, follow <base>/learn.md. For a task, pick pages from <base>/docs/index.json and fetch only the .md pages it needs.
- After every change, run `jadpo check --json`, then `jadpo test --json`. Every jadpo command accepts --json.
- Each error's next step ends in (agent) or (human). Do what an (agent) step says. When it ends in (human), stop and ask me before making that change. Never widen who may read or change data, or make a route public, just to get the build to pass.
- If an error's reason and next step aren't enough, read its rule's page: <base>/docs/errors/<rule>.md, for example <base>/docs/errors/policy.public_grant_missing.md.
```

## JSON output for agents

Every `jadpo` command accepts `--json`. With it, the command prints JSON instead of text written for a person, in one documented shape that carries a schema version number. An agent can read that reliably, without having to pick facts out of sentences.

For example, `jadpo check --json` gives each error as fields: where it is, the reason, the next step, whether the agent or a person should act, and the rule's name, which is also the name of its page. `jadpo help --json` describes every command and every rule the compiler checks. See [`jadpo check`](/docs/jadpo-check) and [error messages](/docs/error-messages).

[Read the primer](/docs/primer)[Learn it yourself](/learn)[Install the CLI](/install)

## Not built yet

-   The compiler doesn't enforce `(human)`: it accepts the change if your agent makes it. Tell your agent to stop and ask, as the prompt and the AGENTS.md section do.
