# What is built

The compiler builds this layout, with each rule's real output under
[Errors](/docs/project-layout-and-modules.md).

| Feature | Status |
|---|---|
| Root, domains and their folders | Partly built: a file where the layout has no place for it is `layout.unknown_location`, and a declaration in the wrong folder `layout.wrong_folder`; a folder or file with no `app.jadpo` above it is checked as loose files. A domain created needs an [acceptance](/docs/acceptances.md). Not built yet: `jadpo domain rename`, `split` and `merge`; the `documents` capability, so a file in `documents/` is `layout.unknown_location` until it is. |
| Files and names | Built: one primary declaration per file, named after it; names unique project-wide; the round-trip and folded-collision rules, with the exception for a type folding to its callable's name. |
| Names per domain | Partly built: private functions and types unique only within their domain, each domain's code reading its own; their identity keys carrying the domain, with promotion to `shared/` writing a registry line; `semantic.duplicate_declaration` saying copy or clash and listing the names in use with the same words. `jadpo rename` is not built yet ([Commands for looking into and changing code](/docs/commands-for-looking-into-and-changing-code.md)). |
| Order independence | Built: declaration and file order never matter. |
| Domains, `public` and calls | Built: owner-qualified calls and per-declaration `public`, with `visibility.private_cross_domain`, `visibility.public_not_allowed` and `visibility.public_unused`. |
| Reserved words | Built: a reserved word names only a field or an enum variant ([Names from reserved words](/docs/objects.md#names-from-reserved-words)). |
| Comments | Built: `//` and `///` documentation comments. |
| Similar helpers | Partly built: `library.similar_exists`, a declinable error. Not built yet: `jadpo impact`. |
| Declinable errors | Partly built: no warning severity; the `decline <rule>: "<reason>"` line with `decline.unused`, `decline.not_declinable` and `decline.no_reason`; the catalogue's security rules, whose decline needs an [acceptance](/docs/acceptances.md); `jadpo declines list` and `clear`; the editor's "Decline with a reason" and "Remove decline"; and the date rule for an expired [feature flag](/docs/feature-flags.md), `flag.expired`, judged at today by `check` and at the commit's date by `build`. `jadpo approval` lists them ([Review and records](/docs/records-and-manifest.md)). |
| Constants | Built: `constant` as a reserved word and a declaration placed and shared as helper functions are, a private one unique within its domain, `constant.similar_exists`, and a top-level `var` pointed at `constant` ([Constants](/docs/constants.md)). |
| Imports | Built: `use <folder> { Names }` and `use <domain>`, with `import.missing`, `import.unknown`, `import.unused`, `import.unneeded` and `import.duplicate`; `jadpo fmt` adds, removes and sorts imports, `jadpo fmt --layout` makes promotion moves, and go to definition works from every use of a name, a `use` line's included. |
| A file holds only what its primary declaration uses | Built: `layout.unused_declaration` for a supporting declaration the primary declaration doesn't use, directly or through one another. |
| Definition before use | Built: `jadpo fmt` writes each file's declarations before the first one that uses them, and `jadpo fmt --check` fails on a file out of that order. |
| Referenced assets | Not built yet: `layout.asset_unreferenced` waits for the ways [External services](/docs/external-services.md) and [Built-in services](/docs/built-in-services.md) refer to files that aren't Jadpo. |
| Jadpo version | Built: `application { jadpo: "X.Y" }`, with `toolchain.version_newer` refusing a project on a later line, `toolchain.version_older` one on an earlier line, each naming the release to install, and `toolchain.version_invalid`; the installed `jadpo` runs the release the line or `jadpo.lock`'s pin names ([Which jadpo runs](/docs/which-jadpo-runs.md)). `jadpo new` writes the line of the `jadpo` that ran it. |
| `application { }`'s sections | Partly built: the one list of sections ([What `application { }` holds](/docs/application-sections.md)), `semantic.application_section_unknown` for any other, with the edit to the section a near miss meant. Not built yet: the seven more it names, each `toolchain.not_built_yet` where it is written. |
| Packages | Built: the root `packages/` and `jadpo.lock`, `shared/providers/`, packages checked as `shared/` is, `use packages/<name>`, and the reachable-from-public rule (`visibility.public_reaches_private`) in domains and packages; [External services](/docs/external-services.md) records the choices. |
