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.call_direction

On this page

Code in shared/ uses a declaration that belongs to one domain.

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

Why Jadpo refuses it

shared/ holds the types, failures, libraries and messages that every domain may use. If shared code used one domain's declaration, every domain that used the shared code would depend on that domain too, and a change inside it could break code that never named it.

Jadpo won't choose the fix for you. Either the shared declaration really belongs to the one domain, or the domain's declaration is needed by everyone, and that decides where the code lives.

What it looks like

shared/types/discount_terms.jadpo:

example
type DiscountTerms = Object {    applies_to: OrderTotal}
jadpo checkcheck failed: 1 error, 4 files

error Shared code uses OrderTotal from domain ordering

--> shared/types/discount_terms.jadpo:2:17

  |2 |     applies_to: OrderTotal  |                 ^^^^^^^^^^ domain code
reason
shared/ holds code every domain may use, so it can't depend on any one domain; OrderTotal is a type in domains/ordering/types/order_total.jadpo.
next
Move the shared declaration into ordering, or stop it depending on OrderTotal (human)
rule
layout.call_direction
help
https://jadpo.dev/docs/errors/layout.call_direction

(human) at the end of the next: line tells your coding agent to stop and ask you which fix you want, because the choice is yours to make: it decides whether DiscountTerms belongs to ordering or OrderTotal belongs to every domain.

How to fix it

The question is whether other domains need DiscountTerms.

If only ordering uses it, move DiscountTerms into the domain, to domains/ordering/types/discount_terms.jadpo, and import it from there:

example
use ordering/types { OrderTotal }type DiscountTerms = Object {    applies_to: OrderTotal}

apply_discount now imports it with use ordering/types { DiscountTerms }. DiscountTerms is private to ordering, so another domain can't use it unless ordering marks it public.

If other domains need it too, move OrderTotal to shared/ as well, to shared/types/order_total.jadpo, and import it there:

example
use shared/types { OrderTotal }

Both types are now shared, so any domain may use them, and shared/ depends on no domain.

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