Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsProject layout and modules · rule

layout.promotion_required

Declaration is used beyond the file that holds it.

Area 1, Project layout and modules; not declinable; the next step is usually the agent's.

example
use planning/actions { SnoozeDays }action postpone_all(days: SnoozeDays) -> Unit {}
example
type SnoozeDays = Int {    min: 1    max: 30}action snooze_todo(days: SnoozeDays) -> Unit {}
jadpo checkcheck failed: 1 error, 3 files

error SnoozeDays is used beyond this file

--> domains/planning/actions/snooze_todo.jadpo:1:6

  |1 | type SnoozeDays = Int {  |      ^^^^^^^^^^ used by another file
reason
A type used by one file lives in it; once another file uses it, it moves to a file of its own in domains/planning/types/. domains/planning/actions/postpone_all.jadpo uses it too.
next
Move SnoozeDays to domains/planning/types/snooze_days.jadpo, or run jadpo fmt --layout, which moves it and updates the imports (agent)
rule
layout.promotion_required
help
https://jadpo.dev/docs/errors/layout.promotion_required

Moving to the right folder is not enough: a second declaration in a file moves to a file of its own once another file uses it, so every name a use line brings in is <folder>/<name>.jadpo. The edit makes the move, and jadpo fmt --layout makes it and updates the imports:

example
type DiscountCode = Text {    max_length: 12}type Basket = Object {    code: DiscountCode}
jadpo checkcheck failed: 1 error, 3 files

error DiscountCode is used beyond this file

--> domains/sales/types/basket.jadpo:1:6

  |1 | type DiscountCode = Text {  |      ^^^^^^^^^^^^ used by another file
reason
A declaration another file uses has a file of its own named after it, so its use line says where it is; DiscountCode is in basket.jadpo, named after another declaration, and moves to domains/sales/types/. domains/sales/actions/apply_code.jadpo uses it too.
next
Move DiscountCode to domains/sales/types/discount_code.jadpo, or run jadpo fmt --layout, which moves it and updates the imports (agent)
rule
layout.promotion_required
help
https://jadpo.dev/docs/errors/layout.promotion_required
example
use sales/types { Basket, DiscountCode }action apply_code(basket: Basket, code: DiscountCode) -> Unit {}

A move whose new file would carry another declaration's name too is left for you: ListBooks's own file would be list_books.jadpo, action list_books's name, which is naming.folded_collision. The error says to rename the type first, and jadpo fmt --layout refuses the move until then:

example
use shop/actions { ListBooks }action browse_books(filter: ListBooks) -> Unit {}
example
type ListBooks = Input {    page_size: PageSize {        default: 25    }}action list_books(filter: ListBooks) -> Unit {}
jadpo checkcheck failed: 1 error, 3 files

error ListBooks is used beyond this file

--> domains/shop/actions/list_books.jadpo:1:6

  |1 | type ListBooks = Input {  |      ^^^^^^^^^ used by another file
reason
A type used by one file lives in it; once another file uses it, it moves to a file of its own in domains/shop/types/. domains/shop/actions/browse_books.jadpo uses it too. Its own file would be list_books.jadpo, the file name of list_books, an action in domains/shop/actions/list_books.jadpo.
next
Rename ListBooks first, so its file name differs from list_books's, then move it to domains/shop/types/ (agent)
rule
layout.promotion_required
help
https://jadpo.dev/docs/errors/layout.promotion_required

Markdown for agents: /docs/errors/layout.promotion_required.md.Built from Jadpo main at aee2e8f.