# Roots and planning

Composition selects meaning for one application root. Planning derives the
requirements and locks one exact physical realization.

## Roots are explicit

An `ApplicationRoot` selects exact declarations, semantic packages, mappings,
policy attachments, implementation candidates, and entry points.

Several semantic documents and executable sections can share a `.one` file,
but file membership, section order, adjacency, Cargo membership, and installed
packages do not add root reachability.

## Composition does not plan

Composition owns the selected semantic view and cross-system binding intent. It
does not infer requirements, select providers, build artifacts, or issue
authority.

An executable implementation candidate becomes root-visible only through an
explicit activation carrying its exact claim, source closure, profile,
analysis receipt, and validation references.

## Planning lowers requirements

Planning consumes the exact root-visible semantic graph and produces:

```text
R-IR -> L-IR -> P-IR
```

- R-IR contains complete requirements for the root.
- L-IR contains valid provider-independent realization choices.
- P-IR selects exact provider profiles, topology, conversions, target
  envelopes, and costs.

The selection proof explains every included node and rejected alternative.

## One exact physical envelope

A requirement resolves to an exact provider or bounded declared composite. A
late-binding slot remains inside a locked envelope with enumerated obligations;
it is not an ambient runtime registry.

Provider and tool packages are candidates, not selections. Planning validates
claims, trust, conformance, compatibility, target applicability, and policy
before selection.

## Locks have separate jobs

| Lock | Owns |
| --- | --- |
| `one.lock` | exact semantic and implementation-language dependencies |
| Selection lock | exact per-root mappings, candidates, providers, topology, and P-IR choices |
| Build lock | exact selected sources, toolchains, actions, targets, and artifacts |

Application source bytes are not dependency-lock entries. None of these locks
grants runtime authority.

Canonical owners:
[Composition](https://github.com/muijf/one/blob/main/systems/composition/AGENTS.md)
and
[Planning](https://github.com/muijf/one/blob/main/systems/planning/AGENTS.md).
