# NEXT temporary contract 3.13 — Environment management: one package system, explicit targets {#root}

@status:impl/plan

[p01] @fact:NEXT-A13-SCOPE Temporary normative staging unit. Its body is the accepted architecture from refined plan revision 4, section 3.13. Before production code cites this law, promote the relevant clauses into permanent specifications. This file is consumed only after semantic coverage, implemented behavior and retained evidence are accepted. The task/retirement checker cannot perform semantic acceptance. @status:spec/done

[p02] @fact:NEXT-A13-U001 **Owner mandate D-020/D-021:** VibeVM развивается в менеджер пакетов и окружений: личная система пользователя в $HOME и сборка Docker/OCI-образов обязательны в одной отдельной фазе. Будущий Linux-дистрибутив — направление дизайна; tools/install interfaces должны подходить и для него. Это расширяет прежний non-goal OS management. Собственный privilege broker, ядро, загрузчик и замена всех сторонних package engines сейчас не требуются. Архитектурные seams M-14 входят раньше consumers; практическая фаза M-15 не прячется в defer table. @status:spec/done

[p03] @fact:NEXT-A13-U002 Один authored environment manifest использует существующие package identities, requires и feature/choice algebra. Он может жить в репозитории образа или в пользовательском каталоге без Git и без coding project. Environment — deployable consumer context, не новый package kind, change или personal stewardship plan. tool уже существует как kind; installable payload, service и OCI image — capabilities/artifacts. Не добавлять kind=os/docker для каждой формы доставки и не заменять npm/Cargo resolution их внутренностей. @status:spec/done

[p04] @fact:NEXT-A13-U003 Разделить пять объектов: @status:spec/done

[p05] @fact:NEXT-A13-U004 Requirement: | Object | Meaning / identity | |---|---| | EnvironmentDefinition | Переносимый desired composition: roots, choices, target constraints, tool/service exports, runtime bindings по именам; без machine paths/credentials | | EnvironmentLock | Exact selected Vibe captures/configuration + external backend closures + build/runtime dependency roles + target ABI; derived once per environment domain | | ExecutionContext | Где исполняется конкретная операция: Windows host, Linux BuildKit worker, local Linux process; admitted executor/tool/provider identity, network/mount/principal capabilities | | TargetBinding | Stable environment instance ID, generation, target OS/arch/ABI/libc constraints, offline/live mode, filesystem roots/prefix, target principal/home и storage backend; local physical binding отдельно от portable definition | | EnvironmentGeneration | Realized payload inventory/metadata, dependency closure, generated boot/adapters/service catalog и activation links, связанные с lock/recipes; mutable data и secrets не часть immutable generation | @status:spec/done

[p06]
```text
| Object | Meaning / identity |
|---|---|
| EnvironmentDefinition | Переносимый desired composition: roots, choices, target constraints, tool/service exports, runtime bindings по именам; без machine paths/credentials |
| EnvironmentLock | Exact selected Vibe captures/configuration + external backend closures + build/runtime dependency roles + target ABI; derived once per environment domain |
| ExecutionContext | Где исполняется конкретная операция: Windows host, Linux BuildKit worker, local Linux process; admitted executor/tool/provider identity, network/mount/principal capabilities |
| TargetBinding | Stable environment instance ID, generation, target OS/arch/ABI/libc constraints, offline/live mode, filesystem roots/prefix, target principal/home и storage backend; local physical binding отдельно от portable definition |
| EnvironmentGeneration | Realized payload inventory/metadata, dependency closure, generated boot/adapters/service catalog и activation links, связанные с lock/recipes; mutable data и secrets не часть immutable generation |
```

[p07] @fact:NEXT-A13-U005 Для compiler toolchain отдельны build machine, machine where produced tool runs и, если сам tool является compiler, emitted-code target. Native Vibe extension ABI всегда относится к executor, а не устанавливаемому Linux binary. OS-only when guard не описывает архитектуру/libc. Existing host-based guard migrates to an explicit compatibility interpretation; target predicates не переключаются молча. Feature selected world и boot conditions получают target context. Windows host не должен выбирать Windows launcher для Linux image. @status:spec/done

[p08] @fact:NEXT-A13-U006 Target kinds: workspace projection, user profile, offline Linux rootfs/image и future live Linux system. Поддержка описывается capabilities; M-14 implements existing local binding and explicit unsupported responses for future operations, M-15 delivers home/rootfs/OCI execution. Не требуется умение всех providers работать со всеми target kinds. Unsupported target/ABI/metadata отказывает при plan, не после partial installation. @status:spec/done

[p09] @fact:NEXT-A13-U007 Root paths передаёт trusted surface; provider не читает ambient HOME/PATH, чтобы заново выбрать destination. Root-relative resource identity включает environment instance/root/principal и case/path policy. Physical locks additionally recognize aliased roots across instances. Clone/image instantiation получает новую instance binding; generation content identity переиспользуется. Move/relocate/adopt — explicit validated operation, прежняя receipt не даёт права на случайный новый каталог по тому же path. @status:spec/done

[p10] @fact:NEXT-A13-U008 Layout remains centralized per PROP-052. Existing project vibevm/ tree не переезжает. Новая environment layout table владеет отдельными configuration/store/profile/state/cache roots; proposed home defaults under existing Vibe settings/data configuration фиксируются M-14-A, а не размазываются literals по providers. Пользователь может выбрать весь prefix под своим HOME. Stewardship state не становится environment package DB. @status:spec/done

