ADL 5 · Part I — Documents and conformance

0.5.1 baseline + 0.6 edition note

Suites and domains

ADL 0.6.0 reference · Review draft 1 · November 14, 2026.

Contents · Source map · Evidence

The 0.6 edition note

This chapter retains the detailed language contract and its source-specific observations. Its chapter number and numbered sections remain stable. The 0.6 additions do not by themselves change this subject’s defaults or supply fresh execution evidence for it.

Reverification should cover suite-root and member admission, independent submission, and capability grants. Use the original examples and evidence links below to recover the earlier test context. The new edition’s source map records this chapter as inherited detail; the current draft does not claim those historical tests were rerun.

Retained reference detail

The numbered sections below are carried from 05-suites-and-domains.md. Their original baseline and evidence remain attached to the source. Statements about “current” or “checked” behavior in this retained text refer to those original observations unless the edition note explicitly updates them. This is a consolidated draft, not a claim of complete re-verification.

5.1 Package, domain, and deployment

A suite is a set of domains published and versioned together. It supplies package identity and a membership list. A domain declares a model and has its own name and version. A site is a deployment of one or more suites on a kalosd instance. Deploying the same suite twice creates two sites, not two different package identities.

The governing provisions are Draft 05 §§1–2, the A1/A2 amendments, and the later R0-a/D4-1 version and root rulings. Draft 05 §§10–11 establish the co-location and activation boundaries used here. There is no converted v0.5.0 ADL 5 chapter to carry forward; the revision record maps the new text to its sources.

QuestionOwning reference
How are documents decoded and composed?ADL 4
Which language versions and domain majors are admitted?ADL 6
How does an address identify a suite or domain?ADL 7
How are external packages loaded and pinned?ADL 8
How are canonical digests calculated?ADL 9
What do references and derivation mean?ADL 12, ADL 14
How are migrations and removals performed?ADL 17
Which identity and permissions reach a running operation?ADL 3, ADL 21

A suite boundary is neither a database boundary nor a permission grant. Draft 05 §10.1 places all domains in a site in one application database. Co-location, rather than common suite membership alone, determines the local reference/storage contract. References across sites have no shared foreign key, join, cascade, or transaction. ADL 12 owns their representation and resolution.

5.2 Begin with one member

An explicit suite containing one domain is the form Draft 05 §2.3 recommends teaching first. It establishes the package boundary without requiring several business domains.

# Illustrative complete suite root: single-suite.yaml
adl: "0.5.1"
suite:
  name: bookshop
  version: "1.0.0"
  domains: [./catalog.yaml]

The referenced member is a complete domain document in suite context:

# Illustrative member: catalog.yaml
domain:
  name: catalog
  version: "1.0.0"
  resources:
    Product:
      object:
        id: { type: uuid, primaryKey: true }
        name: { type: string, required: true }

bookshop identifies the package; catalog identifies this member domain. The member inherits adl: "0.5.1". Its own version: "1.0.0" is an application version, not an inherited language version or an alias for the suite version. A suite can contain members with different domain versions.

The older Draft 05 suite examples declare "0.5.0". The later R0-a ruling requires "0.5.1" for explicit suite grammar. This chapter applies that correction; a server’s acceptance of baseline 0.5.0 documents does not admit suite grammar under that declaration.

5.2.1 The permanent suite-of-one form

A standalone {adl, domain} document is permanent sugar for a suite named and versioned by its single domain. The checked standalone.yaml declares adl: "0.5.0" because its resource uses only baseline grammar.

That standalone document’s implicit suite is catalog, not bookshop. Its resource address is adl.catalog.catalog.Product. In the explicit example, the address is adl.bookshop.catalog.Product. Equal resource definitions do not make differently named packages address-equivalent.

To package a bare domain explicitly without changing its suite name, name the suite after the domain. ADL 4 explains the document forms; this semantic equivalence does not require identical serialized bytes or registry rows. The checked host stores a bare domain without a separate suite row.

5.3 Suite declaration vocabulary

The suite body is a mapping with this closed key set:

KeyValueRequirement and meaning
nameStringRequired package name; matches ns-segment and is not reserved
versionQuoted exact semver stringRequired package version; subject to monotonicity
descriptionStringOptional descriptive metadata
licenseStringOptional license identifier; §5.8
capabilitiesSequence of stringsOptional declarations from the closed vocabulary; §5.9
domainsSequence of member-path stringsRequired membership list; at least one member in the checked parser

adl belongs beside suite, not inside it. resources belongs inside a member domain, not inside the suite. A misspelling does not create a vendor field: the checked parser rejects an unknown suite-body key with UNKNOWN_KEY. ADL 4’s domain extension mechanism does not open this suite key set.

For a suite name, Draft 05’s ns-segment begins with an ASCII letter and continues with letters, digits, _, or -. Reserved names are rejected under §16; the registry and complete address grammar belong to Appendix C and ADL 7. Quote all version strings and use exact versions, not ranges or release-cut tags. ADL 6 owns detailed version acceptance.

Checked admission gap. Suite metadata validation currently accepts the reserved name adl and the malformed name not a namespace in isolated parser probes. These are deliberate discrepancy cases, not accepted authoring examples. The namespace and reserved-name requirements remain in force.

5.4 Membership and address identity

Each entry in suite.domains identifies one member document. The entry is a locator; domain.name inside that document establishes its domain identity. Renaming catalog.yaml to another filename does not rename catalog in ADL addresses.

A member MUST have a domain root and MUST NOT declare adl, even if its declaration would match the suite. Admitting it directly without inherited context rejects as ADL_VERSION_MISSING; admitting it as a member with adl rejects as ADL_VERSION_MEMBER_FORBIDDEN. A nested suite is not a member domain. The obsolete SUITE_ROOT_MISSING diagnostic is retired.

The checked parser rejects duplicate path strings and two members with the same declared domain name as SUITE_DUPLICATE_MEMBER. The submit handler additionally rejects case-only member-name collisions as ADDRESS_AMBIGUOUS. Do not use case to distinguish domains whose addresses are matched without case sensitivity.

The same pathname spelling is used as the member key in a self-contained submission. ./catalog.yaml and catalog.yaml should not be substituted for one another in that request’s member map. The parser’s literal duplicate-path check is not a guarantee that every filesystem alias is canonicalized.

Within the checked registry, a domain already assigned to another explicit suite produces SUITE_DOMAIN_CONFLICT. Membership is not a mechanism for installing two unrelated models with the same registry identity. Domain-major coexistence and migration remain ADL 6/17 subjects; a parser accepting two suite documents independently does not establish simultaneous host installation.

5.5 Loading the member texts

There are two checked loading surfaces:

SurfaceWhere member text comes from
File bootstrapFiles resolved relative to the suite file’s directory
Self-contained submitA request-level members map keyed by the listed paths

The submit envelope carries the suite text in content and member texts in members. These are transport fields, not ADL suite keys. The example index explains how the verification script builds that envelope from the complete example files. Missing content for a listed path rejects as SUITE_MEMBER_MISSING and names the path.

The bootstrap loader checks for relative member paths and attempts to reject paths escaping the suite directory. This chapter does not claim exhaustive filesystem containment testing. An HTTP client supplies text, not permission to read server files.

Member loading and $include are separate operations. The checked member parser supplies no filesystem base for include expansion, including on the bootstrap path. Flatten a member’s includes before using that path. Use the checked YAML member form: ADL 4 records the JSON-member decoding discrepancy and the limits of the ordinary CLI and adl-ref suite entry points.

5.6 Dependencies determine processing order

The domains list declares membership; its order does not prescribe activation order. Draft 05 §11.2 requires dependency ordering. The complete two-domain suite.yaml deliberately lists the dependent member first:

# Illustrative complete suite root: suite.yaml
adl: "0.5.1"
suite:
  name: bookshop
  version: "1.0.0"
  description: Catalog and orders example.
  domains:
    - ./orders.yaml
    - ./catalog.yaml

Its orders member contains the following reference:

# Illustrative field fragment from orders.yaml.
product:
  type: reference
  references: "adl.bookshop.catalog.Product"

That declaration makes orders depend on catalog. In the checked submission, catalog activates first and orders second. Reversing only the member list and resubmitting at the same suite version produces a NoOp for this example. The reference’s runtime wire value and any physical foreign-key representation are separate ADL 12 matters; this check establishes activation order, not all reference enforcement.

5.6.1 Parsing dependencies and activation dependencies

Some dependencies must be available before a member’s model can be constructed. For example, an intra-suite domain derivation needs its base’s resolved model. The inspected suite parser defers an unavailable sibling base and retries after other members have parsed. Existing derivation tests verify a member extending a sibling listed later. ADL 14 owns the extends grammar, pinning, and override rules; listing files in a convenient order is not a replacement for those rules.

Reference dependencies are also considered by the checked submission handler when ordering activation. Parsing successfully therefore does not imply that activation order equals parser visitation order.

Cycle boundary. The checked derivation parser reports EXTENDS_CYCLE when it cannot make progress; its message also covers a sibling base absent from the suite. That result alone does not prove a graph-theoretic cycle. The activation handler has a separate fallback for remaining reference dependencies and relies on later DDL handling. The checks here do not establish a complete cycle policy for every database or dependency kind.

An address naming another suite is not an instruction to add that target to this membership list or fetch it during parsing. External loading belongs to ADL 8; unresolved-address handling belongs to ADL 4/7. Co-location and access authority still have to be established at the appropriate load or call boundary.

5.7 Suite and member versions advance independently

Draft 05 §2.1 applies the domain monotonicity rule to the suite’s canonical digests. An identical resubmission at the current version is a NoOp. At an equal version, changed source or resolved content rejects. A lower suite version also rejects. Increasing the suite version does not waive a member’s own version requirements.

ChangeAuthoring consequence
Resubmit identical content at identical versionsNoOp; no version increment required
Change a member’s modelIncrease that domain’s version and the enclosing suite version
Change suite metadata, such as license or capabilitiesIncrease the suite version; unchanged members keep their versions
Change only member-list orderingDoes not establish a new package meaning; the checked example remains a NoOp
Remove a member pathChanges the package; does not establish that the deployed domain has been safely removed

In the worked checks, adding note to orders at suite version 1.0.0 rejects at the suite gate. Bumping only the suite permits processing to reach the member gate, where unchanged orders.version still rejects. Increasing the changed member versions and suite version to 1.0.1 succeeds.

The checked suite digest incorporates member digests as well as the suite root’s metadata. The source digest includes license and capabilities; neither can be stripped while preserving that package identity. ADL 9 owns the canonical encoding and package-file coverage. This chapter does not infer digest equality from equal filenames or from equal resource counts.

Domain removal belongs to the site migration contract. In particular, a remaining foreign key can block removal under Draft 05 §11.4. The inspected suite submit path stamps the listed members; it is not a complete reconciliation or domain-removal operation for members omitted from a later manifest.

5.8 License declarations

suite.license is an optional SPDX license identifier or a LicenseRef-* identifier for other terms. It identifies terms; it does not contain them.

# Illustrative metadata fragment, not a complete distributable package.
suite:
  license: "LicenseRef-Bookshop-1.0"

Draft 05 §2.4 requires the license text in the package file set, never inline in the manifest. An invalid identifier rejects as LICENSE_IDENTIFIER_INVALID. The parser assigns the license no enforcement semantics: the value does not grant an entitlement, authenticate a publisher, or implement a commercial restriction. Publisher signing is not specified by this declaration.

Checked validation boundary. MIT is accepted, and a value containing spaces such as not a license is rejected. The implementation uses a permissive identifier-pattern check, not a license-catalog lookup. It also accepts LicenseRef- with no following identifier, a discrepancy retained in the verification record. Parser acceptance is not evidence that the package contains the required license text. No license-text packaging audit was performed here.

5.9 Capability declarations and operator grants

Capabilities declare the privileged runtime surfaces required by a suite’s scripts. The vocabulary is closed:

CapabilitySurface named by Draft 05 §2.5
rawSqlLua’s raw SQL write surface, otherwise gated by scripting.lua.allow_raw_sql
httpOutbound HTTP from Lua
filesystemScoped filesystem access from Lua
envReading the process environment from Lua

An unrecognized entry MUST reject as CAPABILITY_UNKNOWN. network is not an alternative spelling of http. Omitting the declaration retains the ordinary scripting sandbox; it does not request every available capability.

A declaration is not a grant. The package declares what it needs; the operator grants what it may use in host configuration. A declared but ungranted capability MUST fail at install with CAPABILITY_NOT_GRANTED, rather than waiting for its first invocation. Importing or extending another suite MUST NOT inherit that suite’s capabilities: the consuming suite declares its own requirements.

The checked capabilities-suite.yaml declares [http] and contains no script. It parses successfully but fails submission when the configured grant set is empty, before any domain is written. It submits successfully when http is granted. No HTTP operation is executed by either check.

Observed configuration interface. The inspected host reads the deployment’s adl.capabilities array. This is kalosd configuration, not another ADL root key:

{
  "adl": {
    "capabilities": ["http"]
  }
}

The check proves install admission for the tested grant set. It does not prove per-suite runtime isolation, capability non-inheritance across imported packages, or enforcement of all four Lua surfaces. Authentication, resource permissions, and raw SQL policy are additional contracts, not consequences of this metadata.

A historical build-guide default deferred grant checking to Phase-16, while Draft 05 and the ratified rollout requirement require it at install. The decision log flags that disagreement and the implementation retains the install check. This chapter follows the governing requirement and records the actual behavior, rather than copying the deferral comment in the model header.

5.10 Submission, activation, and transaction limits

Draft 05 §11.1 distinguishes domain submission from site-level activation. Activation revalidates the dependency closure and commits it as one transaction; no domain should observe another partway through that migration. Packaging domains in a suite does not shrink this requirement to the manifest alone.

The checked host’s suite-submit operation parses all members, checks grants and identity/version conflicts, orders dependencies, and submits members through the domain path. On successful completion it records an active suite and returns member results. This combined operation is implementation evidence, not a new definition collapsing submission and activation into one language concept.

The scope of failure matters:

Failure boundaryChecked consequence
Missing member or forbidden member adlRejects before member domains or example tables are written
Declared capability ungrantedRejects before domain registration
Member fails after a previous member changedRegistry transaction rolls back; application-schema rollback depends on the store arrangement

5.10.1 Shared store versus separate stores

The rollback probe first installs the example, then adds catalog.Product.sku at domain version 1.0.1. It also changes orders without increasing that domain’s version. The suite itself advances to 1.0.1, so the second member fails after the first member has been processed.

With registry and application data using the same SQLite store/connection, the tested rollback restores suite/member registry versions to 1.0.0 and removes the earlier sku schema change. The DDL and migration executors use savepoints when a transaction is already open.

With separate registry and application stores, the same rejection rolls back the registry but leaves sku in the application table. That observed limit does not satisfy the full site-activation transaction requirement. A successful shared-store test does not establish atomicity for every deployment topology, dependency outside the submitted suite, generated action registration, or external side effect.

The source comment describing all member DDL as outside the transaction is too broad for the shared-store case. The historical Phase-10 status report already distinguishes these arrangements; the new probe provides scoped execution evidence for both. ADL 17 and the platform companion own the complete migration and recovery contract.

5.11 Diagnostics and observable results

The following are the relevant contract or checked implementation diagnostics. ADL 31 owns the full diagnostic envelope and HTTP mapping.

ConditionDiagnostic
Direct input lacks adlADL_VERSION_MISSING
Explicit suite declares an unsupported language versionADL_VERSION_UNSUPPORTED
Member declares adlADL_VERSION_MEMBER_FORBIDDEN
Listed member text unavailableSUITE_MEMBER_MISSING
Member lacks a domain rootSUITE_MEMBER_ROOT_INVALID
Invalid member-path entrySUITE_MEMBER_INVALID
Repeated path or exact duplicate domain nameSUITE_DUPLICATE_MEMBER
Unknown suite-body keyUNKNOWN_KEY
Invalid license identifierLICENSE_IDENTIFIER_INVALID; enforcement gap in §5.8
Unrecognized capabilityCAPABILITY_UNKNOWN
Declared capability lacks a grantCAPABILITY_NOT_GRANTED
Case-only member-name collisionADDRESS_AMBIGUOUS in the submit handler
Domain belongs to another explicit suiteSUITE_DOMAIN_CONFLICT in the submit handler
Equal-version changed content or lower versionDOMAIN_VERSION_NOT_MONOTONIC, also used for suite versions
Registry store cannot start a transactionSUITE_TXN_UNSUPPORTED in the submit handler

The checked successful first submission returns 201; identical resubmission returns 200 with unchanged: true. A suite-version conflict returns 409. The tested member-version conflict returns 422 with the same monotonicity code. Do not infer a universal status solely from the code’s spelling.

On a later member failure, the checked response can list members completed before rollback. That list is processing history, not a list of changes known to have committed. Interpret it with the transaction boundary in §5.10.

5.12 Verification and remaining work

The verification record identifies the checked source context, existing binaries, temporary header snapshot, commands, inputs, and outcomes. The examples exercise production suite parsing and submission against disposable in-memory stores. Four existing targets pass 51 test cases, including suite admission, reference activation order, and intra-suite derivation.

The ordinary CLI’s single-domain validator rejects an explicit suite; adl-ref reports unknown-key warnings without constructing a suite model. Independent modeller agreement is therefore limited to the baseline standalone example. Neither tool’s exit status substitutes for the suite checks in this chapter.

Remaining publication work includes suite-name and license admission, complete dependency-cycle behavior, capability enforcement across runtime/package boundaries, and full site transaction/removal behavior. The draft keeps those limits visible. Continue with ADL 6 for version identity and ADL 7 for address grammar.