The Habitat Layer: Multi-Organism Infrastructure and Isolation

A habitat is the root DNA organism shipped with the Hale toolchain (spec/habitat.md). Its role is to provision, supervise, and place infrastructure…

A habitat is the root DNA organism shipped with the Hale toolchain (spec/habitat.md). Its role is to provision, supervise, and place infrastructure allocations (Postgres memory, NATS JetStream nerves, Prometheus senses stores, and vault roles) for child organisms. Every project organism is born as a child of the habitat via hale habitat graft—the habitat itself is the only organism booted without a parent (hale habitat up). A program that is not an organism needs no habitat: Running Without a Habitat.

Terminal window
# 1. Start the local habitat organism, its Compose services, and its operator UI
# (named at its birth; `local` when no --name is given, and kept after)
hale habitat up --name homelab
# 2. Graft a new application, or a sapling from a nursery the habitat trusts
hale habitat graft my-service
hale habitat nursery add https://github.com/hale-lang/voice
hale habitat graft voice
# 3. Inspect all running allocations, schema versions, and host placements
hale habitat status

More than one habitat on a machine

Section titled “More than one habitat on a machine”

A laptop can administer several habitats: a home one and a work one, a throwaway habitat to try a branch beside the real one, or a laptop-only habitat beside one on a server. Each lives in a directory of its own under ${XDG_DATA_HOME:-~/.local/share}/hale/habitat/, and one of them is current: the one every hale habitat and hale dna verb acts on.

Terminal window
hale habitat up --name work # born beside the first habitat, and now current
hale habitat list # each habitat: * current, where it runs, whether its head answers
hale habitat use home # make another current
hale habitat --habitat work status # one command on another habitat
HALE_HABITAT=work hale dna show # the same, for a script

A machine with one habitat needs nothing of this: with no current habitat named, every verb acts on local, the directory a machine’s first habitat has always had, and a habitat born --name home there is still reached as home. up --host <h> --name <name> keeps the pointer to a habitat on another machine in that name’s directory, so a machine can point at several. The habitats share nothing on the machine: each has its own directory, compose project and record.


How the Habitat Organism Works

Section titled “How the Habitat Organism Works”

Unlike an application organism that supervises a user-written application heart, the habitat’s heart slot is empty: what it keeps alive are the infrastructure backends and bodies of its child organisms.


Hosts, Placement Providers, and Saplings

Section titled “Hosts, Placement Providers, and Saplings”

Hosts and Providers (compose and ssh)

Section titled “Hosts and Providers (compose and ssh)”

In habitat commands, a host always refers to a physical or virtual machine where allocations can be placed. Providers discover hosts, allocate roles for organisms, render and apply service definitions on a target host, and observe live health (up, degraded, or down). Every host, allocation, and role-to-provider policy is stored as a row in the habitat’s record and exposed on the habitat head’s surface (Commands::hosts, Commands::allocations, Commands::policy).

Provider / Verb Behavior
compose provider (local profile) Produces the local host (advertising compose) and runs all habitat and child organism allocations (memory-<id>, nerves-<id>, senses-<id>, forge, and the habitat’s body and face) as Docker Compose services on the local machine. The forge’s Forgejo image is pulled from ghcr.io/hale-lang/forgejo, the project’s mirror of codeberg.org/forgejo/forgejo at the same pinned digest.
hale habitat host add <name> [--user <u>] [--port <n>] Probes a LAN machine over SSH using the habitat’s vault-held SSH keypair, pins the first-seen host key in the record (refusing any subsequent host-key mismatch), and, over your own SSH login and with your sudo, makes the habitat an account of its own on <name> (hale-<id>: no sudo, in the docker group, which is root-equivalent on the host) holding its public key, then probes it ready. --user <u> puts the key in that account instead. When your login does not reach <name>, it prints what to do there and marks the host pending-key.
hale habitat host join <name> Run on the machine joining a habitat that runs elsewhere (your laptop, say): records it as a joined host by a name the habitat’s machine reaches it at. The habitat never logs in there (no key, no account, no SSH); it reaches the machine on its services’ ports only, scraping the exporters join installs. Placements there run from the machine itself (--host local on it).
hale habitat host probe <name> Re-probes <name> over SSH. Once ~/.ssh/authorized_keys is updated, transitions the host from pending-key to ready and records its capabilities (docker compose, systemd-user, OS, and CPU architecture). A host left pending-key (an add interrupted, or a login that did not reach it) has its setup finished by the probe, as add does it.
hale habitat host remove <name> [--plan] Removes a registered host from the habitat record, planned first: on a host with allocations the plan lists each one and what stops or is deleted there, and the removal waits for the host’s name typed back at a terminal (--plan prints the plan and exits).

Machine Readings and Dashboards (node exporters, Grafana)

Section titled “Machine Readings and Dashboards (node exporters, Grafana)”

The habitat reads every machine it runs on. hale habitat up (on this machine, or on the machine --host names, over your SSH login) and hale habitat host add (on the new host) install a Prometheus node exporter on :9100: on Linux the container hale-node-exporter, on macOS the release’s own node_exporter under launchd (a LaunchAgent when you are logged in at the Mac, otherwise a LaunchDaemon, for which sudo asks once at your terminal). A container on a Mac would read the VM docker runs in, not the Mac. If an exporter already answers on :9100, the habitat scrapes it as it is and never touches it. host remove and down --forget take the habitat’s own exporter off again, unless another habitat on the machine reads it too: the exporters are the machine’s, shared, and each habitat records itself as an owner, so the last one to leave takes them off.

The habitat’s senses’ store (its Prometheus) scrapes each machine as the job host, with a host label naming the machine. The habitat keeps the target list in step with its hosts: adding or removing a host rewrites it.

A Grafana runs behind the face at /grafana/ (the dashboards link in the operator face), signed in as you through the face’s own sign-in: there is no Grafana login. Its home dashboard, Hosts, opens on a table with one row per machine: its memory and main disk, each total, in use and free and the share used, how busy its CPU has been over the last 5 minutes, and its NVIDIA GPUs: how busy, their memory and memory in use, temperature and power draw (blank on a machine without one). Each share used or busy is a percent with a gauge beside it (amber from 75%, red from 90%), the gauges of a column lined up row under row. Below it, it shows whether each machine answers, its uptime, CPUs and memory, and over time CPU busy, load per core, memory used, disk used, network and disk throughput, for Linux and macOS machines alike, plus a Linux machine’s CPU frequency. up and status print its address:

grafana http://<habitat>:<port>/grafana/ (compose service grafana, behind the face's sign-in; started at its first use, stopped after 15 minutes unused)
node local: node_exporter 1.11.1 on :9100, a container of the habitat's (hale-node-exporter)

Working on the face against a running habitat. The face reads its browser assets once at start, from the toolchain’s embedded copy. To try a checkout’s dna/face/web on a habitat without rebuilding the image, copy it to <habitat directory>/face-web/ (the directory the face service has as its home) and docker compose restart face; the face’s log says it is serving the override. Remove the directory and restart to return to the embedded assets. HALE_FACE_WEBROOT names any other directory.

Grafana runs only while someone uses it. up creates its service without starting it; the first time you open /grafana/, the face starts it and shows a “starting the habitat’s dashboards” page that reloads itself every few seconds until Grafana answers (if Grafana does not come up within a minute, the page says why and stops reloading; reload it to try again). Once nobody has used it for 15 minutes, the face stops it again. A dashboard left open in a browser tab refreshes itself every 30 seconds, and that counts as use. HALE_DNA_GRAFANA=on keeps Grafana running from up to down instead. The dashboards come with the toolchain: when an up brings dashboards that changed, Grafana shows the new ones from then on (it reads its dashboard files again every 10 seconds, and up restarts a Grafana it leaves running when they changed); an up that changed none restarts nothing.

Beside each node exporter runs a container exporter (cAdvisor, the container hale-cadvisor; on a Mac, inside docker’s VM), and Grafana’s Services dashboard shows what runs where, whatever a machine’s system: every container on every machine with the organism and part it is, its image, uptime, CPU, memory and network, and the restarts and out-of-memory kills in the window, and in the same table and graphs every service the habitat placed on a host with organism place (kind systemd or launchd), read from its own readings: whether it answers (one that does not shows as down), its uptime, memory and CPU. Every container the habitat runs is labelled hale.habitat, hale.organism and hale.role (an organism’s own compose services through an override of the habitat’s, never by editing its files), so the dashboard shows the habitat’s containers by default, organism by organism, with show: everything on the host for whatever else a machine runs beside them.

Every exporter download rides out a short network blip (curl retries the macOS archive, and docker’s image pulls are tried five times). One that still fails says why on the exporter’s own line, never as a stray line of curl’s or docker’s, and what retries it:

node local: no exporter: the download from github.com failed (curl 56: Connection died, tried 5 times before giving up); `hale habitat up` again retries it

A Linux machine with an NVIDIA GPU (where nvidia-smi -L lists one) also runs a GPU exporter, nvidia_gpu_exporter (the container hale-gpu-exporter on :9835, its image pinned by digest), which reads nvidia-smi through docker’s NVIDIA runtime, so the machine needs the NVIDIA Container Toolkit; without it, the install says so and runs none. Macs and machines without such a GPU run none and say nothing of it. The senses scrape it as the job gpus: the hosts whose probe found a GPU (a host added before this release is looked at again by hale habitat host probe <name>), a machine that joins with one, and the habitat’s own machine while an exporter answers there. A GPU whose memory is the machine’s (a GB10’s) reports no memory of its own, and the Now table leaves its GPU memory blank rather than invent one: its use shows in the machine’s memory columns.

gpus gpu-box: nvidia_gpu_exporter 1.17.0 on :9835, a container of the habitat's (hale-gpu-exporter)

HALE_DNA_NODE_EXPORTER=off (all three exporters) and HALE_DNA_GRAFANA=off leave either out of a run (spec/habitat.md, Readings).

Reflexes and Alerts

Section titled “Reflexes and Alerts”

An organism declares what it watches for in its readings as reflexes, under [dna.reflex.<name>] in its manifest: a PromQL condition, how long it must hold, a severity and a summary. They render to standard Prometheus alerting rules, so the same declarations work in a habitat and in a heart you run yourself. Every habitat watches its machines’ disks, memory and CPU by default: a disk more than 90% full for ten minutes, or one that fills within a day at its recent rate; memory more than 90% in use for fifteen minutes; CPUs more than 90% busy for fifteen minutes. The operator face’s alerts screen shows what is firing, and what is about to.

An Organism’s Own Host Commands (organism place)

Section titled “An Organism’s Own Host Commands (organism place)”

An organism can declare commands of its own for the habitat to run on a host, in its manifest under [dna.host.<name>]. voice declares node, which turns a machine into a voice node: it installs what the machine needs to serve models, outside compose, and registers it with voice’s api.

Terminal window
hale habitat organism place voice node --host gpu-1.lan --plan # what would run, and where
hale habitat organism place voice node --host gpu-1.lan # asks for the host's sudo password here, when it needs one
hale habitat organism unplace voice node --host gpu-1.lan

A command declared root = true, and the packages a host lacks, run under your sudo on the host. When that sudo needs a password, place asks for it here before anything runs, as sudo password for you@gpu-1.lan:, on your terminal even when the command’s output is piped or logged, checks it (a wrong one is asked again, three times), and hands it to the host’s sudo over the SSH session’s stdin: never on a command line, in a variable or in a file. Off a terminal (a script, a CI job) a host whose sudo needs a password is refused at once, naming the host; give the login a NOPASSWD rule there, or run it at a terminal. Before each install starts, a line says which host it is on and that it may build for a few minutes, so a long quiet build is not taken for a hang.

local is always the machine you type on. With the habitat on this machine, that is the habitat’s own machine, the host its rows call local: on a laptop with no other hosts, --host local places the command right there, without enabling SSH to yourself or adding the laptop as a host. Every script runs on this machine with sh, as you (sudo asks at this terminal). With the habitat on another machine (up --host rack-a.lan), --host local is still this machine: once you have added it as a host (hale habitat host add <its name>, a name the habitat’s machine reaches it at), its scripts run here and the placement is recorded under that name; until then it is refused, naming that command. The habitat’s own machine is then --host rack-a.lan (or --host rack-a), reached over the login the pointer names. A placement on the habitat’s own machine has the {id} of its name’s first label (local for a habitat on this machine) unless --id says otherwise, its {api_url} the address the services allocation publishes (the loopback is right for a node on the same machine), and it is recorded under local, its readings scraped at host.docker.internal:

Terminal window
hale habitat organism place voice node --host local --plan # a native GPU node on this machine, outside docker

The command runs in the organism’s own source at the revision the habitat pins, over your SSH login. The host clones that source itself, so a sapling added from a local checkout (hale habitat nursery add /path/to/checkout, whose repository is that path) places only on the machine the path is on, where its scripts run here (--host local); on any other host, the habitat’s own machine through a pointer included (it holds only the nursery’s mirror), place refuses before it runs anything, and says to push the commit and add the nursery as <url>#<commit> (hale habitat nursery add https://…#<sha>). The habitat provisions what it needs to run at all: it installs what the host lacks of hale’s build prerequisites (git, curl, tar, clang, OpenSSL’s and zlib’s headers) with the host’s package manager, and the hale release the organism declares ([dna] toolchain = "v0.30.1" in its hale.toml; else the habitat’s own) into a directory of its own on the host. A declaration’s requires (docker, systemd, nvidia-gpu, apple-silicon, gpu, which an NVIDIA GPU, an Apple Silicon Mac, or on Linux an AMD or Intel GPU meets; a list, or a table by platform such as { linux = ["docker", "gpu"], macos = ["gpu"] }) is checked against the host before anything is installed; --plan shows all of it. Its inputs are the host’s {id} and the {api_url} its api_service publishes. A secret the seed declares with host.<command> among its readers ([dna.secrets.<name>], The Skin) is read from the habitat’s vault (on the habitat’s machine, through a pointer), written over your SSH login’s stdin into ~/.local/share/hale/hosted/<organism>.vault/ on the host (mode 700, each entry 600), handed to the command as HALE_VAULT_DIR and HALE_SECRET_<NAME> through env (so sudo keeps them), and removed when it ends; every run is also handed the habitat’s name as HALE_DNA_HABITAT_NAME, and HALE_DNA_HOST_RESERVED_BYTES, the memory the habitat’s own containers on that host may hold (the sum of their compose mem_limits: on the habitat’s own machine its memory, nerves, senses’ store, forge and Grafana, which counts though it starts on demand; on any host the organisms’ allocations applied there; 0 when it runs nothing there that declares one), which a provider’s node subtracts from the memory it offers models, so a node on the habitat’s own machine does not promise models what the habitat may take (--plan names it on its reserve line); a value is never on a command line or this machine’s disk. --plan names each secret it would hand over, a family with its members’ labels, and each it skips; place refuses while a required slot is unfilled or a required family has no member, an optional = true one is done without (an unset slot not handed, a family with none handed empty), and unplace is never refused for a missing secret. The old operator_token key and {operator_token_file} input are refused: declare the token as a drawn secret instead. When the declaration names its service (voice’s is voice-node-<id>, a systemd unit on Linux and a launchd service on macOS), place ends by asking the host’s service manager that it runs, and unplace that it is gone (spec/habitat.md, Host commands).

The habitat remembers what it placed: place records a habitat.placed row through the head once the service runs (unplace a habitat.unplaced one), and hale habitat status lists each placement under its host. A declaration that says where its service serves its readings watches it without polling anything:

[dna.host.node]
service = "voice-node-{id}"
readings = 9464 # the service's std::observe::Scrape port

--plan and place name the endpoint (http://gpu-1.lan:9464/metrics), which the head registers with the habitat’s senses as it records the placement; every Hale program serving a std::observe::Scrape carries the runtime’s own memory, CPU time and start time, which the Services dashboard charts. Removing the host, the organism or the whole habitat runs each placement’s own uninstall first, over your SSH login (sudo asks at your terminal), and then removes the organism’s checkout and the toolchain it installed there once nothing placed there uses them; a placement it cannot take off is named with the exact unplace that does, and the rest goes on.

Saplings and Nurseries (hale habitat nursery / graft <sapling>)

Section titled “Saplings and Nurseries (hale habitat nursery / graft <sapling>)”

While a pack is a reusable template of rows adopted inside an existing organism (positions, mandates, practices, knowledge), a sapling is a complete, prebuilt organism template published in a nursery and pinned by repository URL, Git revision, file tree SHA-256 digest, and default packs.

Terminal window
hale habitat nursery list
hale habitat nursery add https://example.com/nursery.git
hale habitat nursery refresh
hale habitat nursery ratify <sapling>
hale habitat nursery add https://github.com/hale-lang/voice # voice is its own nursery, at its default branch
hale habitat nursery add https://github.com/hale-lang/voice#v0.1.4 # or pinned at a release tag (or a commit)
hale habitat graft voice --host rack-a.lan --plan # the plan, part by part; nothing grafted
hale habitat graft voice --host rack-a.lan # prints the plan and asks

A graft plans each body part first. The organism plane (its record in memory, its nerves, its senses) reuses the habitat’s, on the habitat’s machine; --own memory=rack-b.lan gives it a server of its own on a host instead. The application plane is the organism’s own: its compose services on the --host machine (with no --host, the habitat’s own machine, exactly as --host local places them there; the graft says where they went), and the database or broker it brings ([dna] brings in its hale.toml, as voice brings its own Postgres and NATS); --reuse database has the habitat provision one instead.

The habitat runs a sapling’s body. An organism grafted from a sapling lives in the habitat’s store, where nobody runs hale dna dev for it, so the habitat does: its body is an allocation (<key>/body) on the habitat’s own machine, a compose service body-<key> beside the habitat’s own body, from the same image and with the same mounts and environment, running hale dna dev <its directory> --no-iris. That is what runs its organization, so the verdicts its graft recorded (its packaging ratified) are executed and its Reviews settle with no hand step. The graft starts it (body its body (<key>/body) on <machine>); up and apply bring it back and record it for an organism grafted before bodies were kept; organism upgrade restarts it on the new revision; down stops it, drained, and organism remove and down --forget remove it. hale habitat status shows it under the organism (body body-<key> up (…)), and hale dna status in the organism’s directory says running. Its face and head run beside it as face-<key> (hale dna head <its directory>, on the ports its graft recorded, signing in through the habitat’s identity), so the face and head the habitat’s Organization screen lists for it answer; they come and go with the body. Both are told the habitat they live in, HALE_DNA_HABITAT_NAME and HALE_DNA_HABITAT_FACE (the habitat face’s origin, http://<address>:<port>, as hale habitat status prints it on its face line), so the organism’s own face knows its habitat: its org read (Commands::org, what its Organization screen draws) answers habitat: { name, face }, from which the face links back through <face>/organisms/<name>/face. Both are "" on the habitat’s own face and for an organism you run outside a habitat. Its face lists the habitat’s other organizations too: the face’s Index read carries organizations, the habitat first and then each organism with the link that hands you into its face (its own entry marked current: true), which its head reads from the habitat’s head at most every 30 seconds (showing a proof of its own launch token, which only the faces the habitat keeps hold). The list is empty while the habitat does not answer, and the read answers anyway. It stays on the habitat’s machine wherever the organism’s services go (moving it is not built), and a habitat started with up --no-body runs none. A directory you graft from your own checkout is yours to run.

The habitat tells the application’s compose which of those roles it runs itself: every time it brings the compose project up (at the graft, apply, a host’s re-apply, an upgrade) it sets COMPOSE_PROFILES to database, broker, both (database,broker) or none, from the graft’s choices. Put the application’s own Postgres under profiles: ["database"] and its own NATS under profiles: ["broker"], and they run only when the application provides that role; services with no profiles: always run. The habitat’s value wins over a COMPOSE_PROFILES in a .env at the application’s root, so a .env saying COMPOSE_PROFILES=database,broker is a safe default for an older hale that sets none. With --reuse database (or broker), the habitat hands the application’s compose HALE_DNA_DATABASE_DSN (or HALE_DNA_BROKER_URL, _USER, _VAULT, _SUBJECTS, _NODE_USER, _NODE_VAULT), puts the passwords those name in the reader vault HALE_VAULT_DIR names, and joins the habitat’s Postgres and NATS to a network of the application’s own as hale-database:5432 and hale-broker:4222, which its services join. That is for services on the habitat’s own machine; a graft whose services go on another machine is refused --reuse of a role it brings. --reuse is also refused, before anything is made, when the compose file never reads HALE_DNA_DATABASE_DSN (or HALE_DNA_BROKER_URL): the habitat’s server would sit unused beside the application’s own. --own database keeps the application’s own.

  1. Grafting by name (hale habitat graft <sapling>): Pass a bare sapling name (hale, the one the toolchain carries, or one a trusted nursery offers, such as voice; ./<name> denotes a local directory). A repository can be its own nursery: a nursery.toml at its root whose [[sapling]] says repo = "." (and no revision or digest) offers the repository itself, pinned at the commit the habitat reads. That is how hale-lang/voice is offered; the toolchain bundles no application. The habitat fetches the pinned revision into <habitat>/saplings/<name>, verifies its file digest against the nursery pin (aborting on any mismatch), grafts it as a child of the habitat, proposes its bundled packs, and records the sapling name, revision, and digest on the graft row. The hale sapling (the organism that works on the Hale toolchain) is a tree the toolchain itself carries, with no remote. hale habitat graft hale makes it the organism’s own repository in the habitat and checks its digest the same way. Like every graft, it mirrors that repository to the habitat’s Forgejo; nothing of an organism’s own goes to GitHub unless its Board allocates GitHub later.

  2. A genome’s codebases attach at its graft: a [[dna.codebase]] list in the sapling’s hale.toml (each with name, repo, branch, build, test, toolchain) becomes codebase.attached rows of the grafted organism’s record, once each; nothing is cloned until a leg works one. The toolchain nursery’s hale sapling is the hale organism: its genome is its own small repository, and its codebases are hale-lang/hale and hale-lang/voice.

  3. Updating sapling pins (refresh and ratify): Running hale habitat nursery refresh (also run during hale habitat up) inspects all trusted nurseries. Newly discovered saplings are pinned automatically; if an already-pinned sapling offers a newer revision, the habitat files it for the Board without moving existing organisms. Run hale habitat nursery ratify <sapling> to pin the newer revision for future grafts. A git nursery can be trusted at a revision (<url>#<tag-or-commit>); adding the same repository again at another revision re-pins it (the earlier source is retired, so refresh reads the revision named last), which is how an organism grafted from one release moves to the next without a reset:

    Terminal window
    hale habitat nursery add https://github.com/hale-lang/voice#v0.1.4
    hale habitat nursery refresh && hale habitat nursery ratify voice
    hale habitat organism upgrade voice
  4. Moving a grafted organism to the ratified revision (organism upgrade): an organism already grafted stays where it was grafted until you move it, keeping its record, its data and its allocations:

    Terminal window
    hale habitat organism upgrade voice --plan # from -> to, the migrations, the services rebuilt, the placements re-run
    hale habitat organism upgrade voice

    The upgrade fetches the pinned revision into <habitat>/saplings/<name> and checks its digest exactly as a graft does (a mismatch moves nothing), checks the organism’s tree out there with what its graft wrote carried (the record’s pin in its hale.toml, the tables and .gitignore lines the graft added), re-materializes vendor/dna, runs the heart’s declared migrations, re-applies its services allocation (its images pulled for the new revision, or built from the new tree when it publishes none; see below), and records a habitat.organism.upgraded row. Anything else changed in that checkout is carried only when it applies cleanly at the new revision; otherwise the upgrade refuses before anything moves. Last, each host command placed for it (organism place) that is behind the pinned revision runs its install again at it, over your SSH logins. A placement records the revision it installed once its install succeeds, so if an upgrade stops part way (a host that does not answer, a build that fails, Ctrl-C), running hale habitat organism upgrade <name> again re-places only the placements it did not reach; --plan lists them, and hale habitat status shows a placement’s revision when it is not its organism’s. A placement recorded before placements named their revision is re-placed when the organism moves, and named with its place line otherwise. An organism already at the pinned revision with nothing behind is refused, naming a newer revision that waits for ratify. Through a pointer, everything but the placements runs on the habitat’s machine.

  5. A nursery in a local directory: hale habitat nursery add ./my-nursery trusts a directory as a nursery. Its saplings are pinned at the directory’s committed HEAD, never its working tree: commit first, since uncommitted changes and untracked files are not part of any sapling. The habitat stages a copy of the nursery and a mirror of each sapling repository on your machine under its own directory (nurseries/<key> and nurseries/repos/<key>), and grafts and upgrades fetch from that mirror. This works for a habitat on another machine too (one you brought up with hale habitat up --host <machine>): nursery add stages the directory on your machine, then ships the staged copy and its mirrors to the habitat’s machine over the same SSH login the pointer uses, into the habitat’s directory there, before the Board trusts it. A later commit reaches the habitat through nursery refresh, which stages and ships every trusted directory nursery again before it reads them, so the new commit is filed for the Board to ratify:

    Terminal window
    hale habitat nursery add ./my-nursery # staged here, shipped there, trusted, read
    git -C ./my-nursery commit -am "next" # a new revision of its own sapling
    hale habitat nursery refresh # shipped again; the new commit filed for the Board
    hale habitat nursery ratify my-app && hale habitat organism upgrade my-app

Released Organisms Run from Published Images

Section titled “Released Organisms Run from Published Images”

An organism’s compose services are applied with HALE_DNA_REVISION set to the full commit its sapling is pinned at (its host commands and heart migrations get it too). A compose file that names its images by it, beside its build:,

services:
api:
build: .
image: ghcr.io/hale-lang/voice:${HALE_DNA_REVISION:-dev}

is applied without --build: compose pulls the revision’s published image and builds from the context only when none is published, so an organism grafted at a release comes up with nothing compiled on the host. An image named by its revision is that revision’s, so nothing stale under one tag is reused; a compose file that does not name its images this way is built from its context at every apply, as before. voice publishes ghcr.io/hale-lang/voice:<commit> for every commit on its main branch and every tag, for linux/amd64 and linux/arm64, and its node install fetches a prebuilt voice-node the same way. Build what you publish with hale build (portable by default since v0.32.1; --target-cpu native only for a binary that runs where it is built).


The Habitat’s Models

Section titled “The Habitat’s Models”

The default model backend of every organism the habitat grafts is the habitat’s own: an organism that declares in its hale.toml that it provides models (voice does), with no person minting a key. No hosted placeholder is written at graft: an organism grafted with no model key in the vault gets no hosted backend at all (a harness on PATH, else the desk), and hale dna secrets lists no model key for it.

[dna.provides.models]
service = "api" # the compose service that serves it
path = "/v1/chat/completions" # the default
models_path = "/v1/models" # the default
key = "tenant-key" # a drawn family: a member per tenant
[dna.secrets.tenant-key]
kind = "drawn"
family = true
readers = ["api"]

Once the provider’s services are applied (a sapling grafted, on its --host or the habitat’s own machine), for every organism the habitat holds, the provider among them, and for the habitat itself (its own infrastructure, whose key is labelled habitat):

The graft does this, and grafting the provider does it for every organism already there (and so does hale habitat apply when it applies the provider’s services). The habitat never grants an account at the provider: who pays is yours to decide. So when the provider serves an organism nothing yet, the graft (or the apply) ends in a next line in the provider’s words (its grant, where {organism} stands for the organism and {habitat} for the habitat’s name), naming where the provider answers. Voice gives a new tenant no accounts until its operator does, and every tenant inherits the habitat’s own project, so a first graft of voice ends:

next voice serves no model to voice and habitat yet, and who pays is yours to decide: grant home-habitat's project accounts in voice's admin UI (Projects) (voice answers at http://<habitat>:<port>/), then `hale habitat models --all`

hale habitat status asks the provider too, with the habitat’s own key, and says the same next line while it serves the habitat nothing. Once an account is granted (and a model placed), hale habitat models <organism>|--all [--plan] does it again. hale dna secret rotate tenant-key --member <organism> in the provider draws an organism’s key anew (the habitat updates its copy), and removing an organism removes its key. A habitat holds one models provider: grafting a second is refused, naming the first. --all includes the habitat itself, and hale habitat models habitat maps it alone. A provider names what it keeps for each tenant by its label (voice’s projects are <habitat>-<label>, the habitat’s name from HALE_DNA_HABITAT_NAME), so no organism may be called habitat: grafting one (a directory or a sapling of that name) is refused.

Every organism the habitat grafted has its services handed the habitat’s name as HALE_DNA_HABITAT_NAME (what hale habitat up --name named it; local by default), wherever they run, and so does a repository body’s compose when the habitat grafted it. As with its secrets, the compose file passes it to the services that read it:

services:
api:
environment:
HALE_DNA_HABITAT_NAME: "${HALE_DNA_HABITAT_NAME}"

Pairing an Agent with a Person (MCP)

Section titled “Pairing an Agent with a Person (MCP)”

The habitat’s head serves its command surface over MCP as well as over its socket and its HTTP commands port, with the same bearer and the same roles. hale habitat status prints the endpoint as mcp://127.0.0.1:<port>. An agent’s host connects with the person’s ID token, the bearer their face session holds:

Terminal window
HALE_API_TOKEN=<the person's ID token> hale mcp --app mcp://127.0.0.1:<port>

The agent’s tools are the head’s rows that person may call (Commands__hosts, Commands__add_host, …). A row they may not call is refused unauthorized, exactly as the face is refused, and every act is a row in their name. hale habitat brief (the row Commands__brief) is where such an agent starts: the Board’s charter, the rules it works by, and the live state. agents/operator.md is the agent’s own brief: the words, the rules, and which rows read, act or propose.

Publishing to GitHub (hale habitat forge publish)

Section titled “Publishing to GitHub (hale habitat forge publish)”

Work on an organism lands and is reviewed at the habitat’s own Forgejo. GitHub, when you want the code there too, is a sink you feed explicitly and in batches: each publish is one pull request on GitHub, from your own token.

Terminal window
# once: where the organism's main goes, and the vault slot of the token
hale habitat forge shop github --repo acme/shop --publish # --key-vault <slot>; forge-token by default
hale dna secret set FORGE_TOKEN # in the organism's directory: fills forge-token
# then, whenever you want GitHub to catch up
hale habitat forge publish shop --dry-run # what it would push, and the pull request's body
hale habitat forge publish shop # push sync/<today> and open (or update) the pull request

--publish leaves the organism’s forge alone: the Forgejo stays where reviews happen, and the setting only says where a publish goes (none --publish stops publishing). A publish pushes the internal main to GitHub as the branch sync/<YYYY-MM-DD> (UTC; --branch <name> for another) and opens one pull request against GitHub’s main. Its body lists the internal pull requests merged since the last publish, by title and internal number, with no links into the private forge; the first publish lists everything since GitHub’s main. Publishing again the same day moves the branch forward and updates that pull request instead of opening a second one.

Internal titles are made inert on the way: a zero-width joiner follows every # and @, so #12 links none of GitHub’s issues and @alice notifies no one, though both read as written.

A publish never force-pushes and never touches the internal main. When GitHub’s main has commits the internal one lacks (its merge queue merges the last publish’s pull request with a merge commit), the branch it pushes is a merge of the internal main and GitHub’s, authored as the owner of the GitHub token; if the two conflict, it stops and names the files, to be resolved in the internal forge. It also stops, saying what to do, when the organism has no Forgejo allocation, names no GitHub repository, or the vault holds no GitHub token. With a habitat on another machine (up --host), the publish runs there, in the habitat’s toolchain image, where its vault and Forgejo are; you see its output here.

Walkthrough: Deploying and Querying voice in a Habitat

Section titled “Walkthrough: Deploying and Querying voice in a Habitat”

This walkthrough covers taking a machine with hale, docker compose, git, and a browser from a cold start to streaming an LLM completion response through voice, grafted from its own repository as a nursery.

1. Start the Habitat and Inspect Status

Section titled “1. Start the Habitat and Inspect Status”
Terminal window
hale habitat up
hale habitat status

hale habitat up initializes the root habitat organism (if not already initialized), starts its Postgres (memory), NATS JetStream (nerves), Prometheus (senses), and Forgejo (forge) containers alongside the habitat’s body and face containers under a single Docker Compose project, registers the local host, and records the head’s URL on the profile row and in head.url (override on any hale habitat or hale dna verb with --head <url> or HALE_DNA_HEAD_URL). status prints the genome, body status, active allocations, and operator face URL:

face http://127.0.0.1:<port>/ (up, ...)

2. Sign In to the Operator Face

Section titled “2. Sign In to the Operator Face”

Open the face URL in your browser. On a local habitat, the head redirects through the local OIDC identity provider, signs you in automatically as local-sub (mapped to your local user for an 8-hour session with no password setup required), and displays the four screens: habitat (its name, and the web UIs of every organism with their links: Web UIs on the Home Screen), hardware, infrastructure, and organisms (The head and the face), with links to the organization shell and the habitat’s dashboards (Grafana).

3. Graft the voice Sapling (Local or LAN Host)

Section titled “3. Graft the voice Sapling (Local or LAN Host)”

Trust voice’s repository as a nursery (it offers itself), then graft it onto the local machine:

Terminal window
hale habitat nursery add https://github.com/hale-lang/voice
hale habitat nursery list
hale habitat graft voice

graft fetches the pinned revision of voice into <habitat>/saplings/voice, verifies its SHA-256 tree digest, grafts it as a child organism of the habitat, and allocates its requested roles (memory, nerves, heart database, and broker).

To place voice onto a remote LAN host over SSH instead (register the host with host add and host probe first):

Terminal window
# Register the LAN host; over your own SSH login it authorizes the habitat's key there and probes it:
hale habitat host add rack-a.lan --user ops
# Verify SSH connectivity and host capabilities (docker compose, OS, arch):
hale habitat host probe rack-a.lan
# Graft voice onto rack-a.lan:
hale habitat graft voice --host rack-a.lan

4. Apply Allocations and Start voice Services

Section titled “4. Apply Allocations and Start voice Services”

hale habitat apply materializes each placed allocation on its target host via that host’s provider and reports live health (up, degraded, or down):

Terminal window
# Materialize placed allocations and print health pulse:
hale habitat apply

Where each allocation runs is a row the Board writes: hale habitat place <key>/<role> <host>. hale habitat apply makes it so. It takes each moved allocation down where it ran and brings it up on its new host with that host’s provider, then prints what each allocation looks like now (up, degraded or down). An allocation on another machine is reached at that machine’s name and the port it publishes there, so the DSN and the nerves’ URL follow it.

The habitat keeps what it applies running. Every long-running service gets the restart policy unless-stopped: the memory, nerves, senses’ store and forge it writes itself, and an organism’s own compose services through an override file of the habitat’s (the organism’s compose file is never edited). A crash is a restart docker makes, and so is a reboot of the host; a service the habitat stops or withdraws stays stopped. A policy the organism’s compose file states (restart: or deploy.restart_policy) is left as it is, and a one-shot, a service another waits on with condition: service_completed_successfully (a migration), gets none, so it never runs again after it finished. A one-shot nothing waits on looks long-running to the habitat: give it restart: "no" in your compose file.

hale habitat status and apply say what a crash left. A service that exited is named with its code, degraded (3 of 4 running; not running: api (exited 139)); one docker is restarting with its code and count, api (restarting, exited 139, 7 restarts); one running again after docker restarted it with its count, restarted: api (2 restarts). A service that came back only seconds ago keeps the allocation degraded, so a crash loop never reads as up.

A moved memory starts empty, because nothing migrates. A memory that holds its organism’s record moves only with hale habitat apply --fresh, and the habitat’s own memory does not move at all. hale habitat graft <sapling> --host <name> grafts an organism straight onto a host: its memory, nerves and services run there from the start, and its record is born there.

(To move an allocation to another host before applying: hale habitat place <key>/<role> <host>, then hale habitat apply. Moving a stateful memory allocation across hosts requires hale habitat apply --fresh, which initializes a fresh store on the destination host.)

voice’s image downloads the released Hale toolchain itself when it is built (its Dockerfile), so the first apply needs the network and takes a few minutes; nothing is staged by hand. The head runs the apply in a process of its own, so the face and every other command keep answering while it builds; hale habitat apply follows it, says which allocation it is applying, and prints the pulse when it ends. One apply runs at a time: a second apply while one runs follows the running one and says so.

The operator face’s organisms screen lists each of voice’s allocations with what its services publish: a link where the port is reachable from your machine (api opens voice’s console, its admin UI served at the api’s /), and loopback only on <host> for a port bound to that host’s loopback.

Web UIs on the Home Screen

Section titled “Web UIs on the Home Screen”

A link to a grafted organism’s face from the habitat’s org chart goes through the habitat head’s /organisms/<name>/face, which hands you in signed in (the organism’s face has its own launch-token gate, as every face does). The operator face’s first screen, habitat, lists the web UIs across all your organisms: each organism’s face (voice face), and each UI an organism declares in its hale.toml, with its label, its organism, its link and how to sign in:

[dna.ui.console]
label = "voice console" # what the home screen calls it
service = "api" # the compose service that serves it
path = "/" # where under that service's address (default "/")
login = "operator-token" # optional: a declared secret (person = "read") you sign in with

The link is the address the organism’s services publish for that service, as the organisms screen links it, with path after it; a service published only on its host’s loopback is shown as loopback only on <host>. A UI with a login says which command prints the secret from your machine, hale habitat organism <organism> dna secret show <login> (the secret must be declared under [dna.secrets.<login>] with person = "read", The Skin); the value itself is never shown. The declaration is read from the organism’s directory each time the screen asks, so an upgrade’s is the one listed. hale habitat graft refuses a manifest whose UIs are refused (an unknown key, no label or service, a path not starting with /, a login naming no readable declared secret), and hale dna declared-uis prints the declaration as the toolchain reads it.

voice’s Compose definition publishes its api (port 8080) and its NATS (port 4222) on the listen address of the host it is placed on (HALE_DNA_HOST_LISTEN), so a browser or a node on another machine reaches them at the host’s name; on this machine they stay on 127.0.0.1. Every plane of the api takes a bearer, so nothing rests on loopback: a project key on /v1, a node’s enrollment token on /node/v1, and the operator token on /admin/v1. Name the api’s address once (localhost:8080 when voice runs on this machine, rack-a.lan:8080 when it is placed there) and check that it answers:

Terminal window
api=http://rack-a.lan:8080 # or http://localhost:8080 on this machine
curl $api/healthz

voice mints its operator token on its first start and keeps it in its Postgres; it is never in the environment or a log. Print it on the host running voice (use docker compose ls there to find the compose project name; its api container is <project>-api-1):

Terminal window
(umask 077; ssh ops@rack-a.lan docker exec <project>-api-1 voice-api admin-token > admin.token) # created mode 600

The console (the api’s /, the organisms screen’s api link) asks for this token once and keeps it in the browser.

5. Configure a Model, Project Key, and Node Seat on voice

Section titled “5. Configure a Model, Project Key, and Node Seat on voice”

Configure a model (echo-1), billing account, project API key, and worker node seat via voice’s admin API (or via the console at $api/, which asks for the operator token). Every admin call presents the operator token, here from a header file so it is on no command line. Using the built-in static engine requires no external weights or GPU:

Terminal window
json='content-type: application/json'
(umask 077; printf 'Authorization: Bearer %s\n' "$(cat admin.token)" > admin.h)
curl -X POST $api/admin/v1/models -H @admin.h -H "$json" -d '{"id": "echo-1"}'
curl -X POST $api/admin/v1/accounts -H @admin.h -H "$json" -d '{"id": "static", "name": "Static"}'
curl -X POST $api/admin/v1/projects -H @admin.h -H "$json" -d '{"id": "work", "name": "Work"}'
curl -X POST $api/admin/v1/projects/work/keys -H @admin.h -H "$json" -d '{"name": "laptop"}'
curl -X POST $api/admin/v1/nodes -H @admin.h -H "$json" -d '{"id": "local"}'
curl -X POST $api/admin/v1/nodes/local/seats -H @admin.h -H "$json" -d '{
"id": "static", "engine": "static", "account": "static",
"serves": [{"model": "echo-1"}], "config": {"text": "hello from voice"}}'
Terminal window
# on the host running voice:
VOICE_ENROLLMENT_TOKEN=vn-... docker compose -p <project> up -d node

(To serve a live local LLM, replace "engine": "static" with an "openai-compatible" seat pointed at a local Ollama or vLLM endpoint.)

6. Point Every Organism’s Model Map at voice

Section titled “6. Point Every Organism’s Model Map at voice”

voice provides the habitat’s models (The Habitat’s Models): its graft keyed every organism the habitat holds and mapped each one’s model map at it, or said that it serves none yet. Once the seat above serves echo-1, map them again and probe one:

Terminal window
hale habitat models --all
hale habitat model-probe voice think.standard

A map you point elsewhere by hand is kept: hale habitat model-map <organism> think.standard <model> --endpoint <url> --key-vault <slot>, the key in a vault slot (hale dna secret set <SLOT> in the organism’s directory).

7. Send a Streaming Completion Request

Section titled “7. Send a Streaming Completion Request”

Query voice’s OpenAI-compatible /v1/chat/completions endpoint directly with curl -N:

Terminal window
curl -N $api/v1/chat/completions \
-H 'Authorization: Bearer vk-...' \
-H 'content-type: application/json' \
-d '{"model": "echo-1", "stream": true, "messages": [{"role": "user", "content": "hi"}]}'

voice streams back Server-Sent Event chunks (data: {...} with chat.completion.chunk) terminated by data: [DONE], and records usage under GET /admin/v1/usage (under the operator token).

Operational Notes

Section titled “Operational Notes”

Running on a Small Machine

Section titled “Running on a Small Machine”

A habitat fits on a laptop. Measured on a running habitat (docker stats), with Grafana stopped, which is how it spends most of its time:

Service Memory
face (the face, the head and its children) about 105 MiB
forge (Forgejo) about 98 MiB
body about 91 MiB
the habitat’s memory (Postgres) about 81 MiB
the habitat’s senses (Prometheus) about 45 MiB
hale-cadvisor (the container exporter) about 20 MiB
the habitat’s nerves (NATS) about 7 MiB
the habitat about 450 MiB
grafana, while someone uses it about 170 MiB more (capped at 384 MiB)

Before Grafana ran on demand and was trimmed, it alone held about 500 MiB, half the habitat.

An organism grafted with the habitat’s defaults adds no server of its own for its record or its nerves: its record is a schema on the habitat’s Postgres and its organization an account on the habitat’s NATS. It adds only its own services (voice’s coordinator holds about 200 MiB). An organism grafted with --own memory or --own nerves, or one that needs senses of its own, adds that server: a Postgres about 80 MiB, a NATS under 10 MiB, a Prometheus about 45 MiB.

On a Mac, the containers run inside Docker Desktop’s VM, so the VM’s memory is the habitat’s budget. 3 GB is enough for the habitat, a few organisms and the VM’s own needs (Docker Desktop → Settings → Resources → Memory). A model served by a node outside Docker (voice’s node placed on the Mac itself, for example) uses the Mac’s unified memory directly, not the VM’s, so leave room for it outside the VM: on a 16 GB MacBook Air, a 3 GB VM leaves the rest for macOS and the model.

Two things need more than that, once:


Multi-Record Isolation, Sharing, and Identity

Section titled “Multi-Record Isolation, Sharing, and Identity”

Records as the Unit of Isolation

Section titled “Records as the Unit of Isolation”

The fundamental unit of isolation in DNA is a record: an append-only chain of cryptographically signed rows stored in a dedicated Postgres schema (dna_<record-identity>) paired with isolated NATS JetStream, secret vault, and Prometheus senses allocations. A Git repository is the genome whose hale.toml ([dna] record) pins which record it belongs to.

Deliberate Cross-Record Publication (connect and handoff)

Section titled “Deliberate Cross-Record Publication (connect and handoff)”

Two organizations never merge their private records or read each other’s database schemas. Instead, cross-organization collaboration works through deliberate publication:

Enforced Visibility and Sealed Protected Evidence

Section titled “Enforced Visibility and Sealed Protected Evidence”

Because any principal with read access to record_rows or ledger_rows can read row payloads in plaintext, view-level filtering is never used for confidentiality. Sensitive payloads—along with derived artifacts such as summaries, embeddings, prompts, and worker context hats—are stored outside the row stream as protected evidence (customer or confidential receipts), encrypted at rest in the record’s Postgres memory under HALE_DNA_RECEIPT_KEY, and accessed strictly through an audited, principal-checked boundary (hale dna receipt disclose / show).

Orthogonal Deployment and Trust Axes

Section titled “Orthogonal Deployment and Trust Axes”

Every organism independently configures three operational axes:

Axis Supported Options
Participation Single individual; a team sharing one record; multiple firms collaborating via a shared record (dna.owner)
Deployment Local workstation (local); remote server body (remote-body); multi-node fleet (hale node)
Principal Source Explicit local UID trust (dna.trust = local, dna.unix.member); verified OpenID Connect provider (dna.principal = oidc)

Layered Structural Operations

Section titled “Layered Structural Operations”

As an organization evolves, capabilities routinely move across process boundaries, ownership boundaries inside an organism, or record boundaries across a habitat. Every structural refactoring operation follows three invariants:

  1. One operation = one Review: The Board votes on the high-level operation (for example, extracting a service), while the resulting low-level graph rows serve as the execution receipt.
  2. Explicit change class: Each operation maps to a change class that determines its required ratification authority.
  3. Pre-proposal invariant checks: Operations validate their preconditions upfront and refuse invalid cuts with a specific diagnostic before opening a Review.
Layer Boundary Moved Operations
1. Hale Program Process & thread placement (code behavior unchanged) Serve (place a locus subtree behind unix, http, or nats RPC via its api surface), Unserve (return a remote surface in-process), Place (move a locus between thread pools or binaries within the same organism).
2. Single Organism Responsibility & contract ownership within one record (hale dna apply) Open (open), Fill / Vacate (fill, vacate), Merge (merge), Split (split), Assign (assign), Adopt / Retire Pack (hale dna pack apply|retire), Expose (expose), Depend (depend), Externalize (externalize), Internalize (internalize).
3. Multi-Record Habitat Ownership across separate records (parent/child organisms) Graft (hale habitat graft), Extract (externalize a part in the source organism and birth a child organism from the copied subgraph with provenance), Absorb (internalize a child organism’s contract back into its parent and retire the child), Re-parent (move a child organism under a new parent ceiling and Board).

Note that Externalize requires only a single organism: once a capability is externalized (externalize seed:<name>), the organism depends solely on its contract:<path> regardless of whether that contract is served by a sibling organism, a third-party SaaS API, or another internal team.


Authority in the Compiler Graph (runs_under) and Financial Books

Section titled “Authority in the Compiler Graph (runs_under) and Financial Books”

Principal-Typed Authority (runs_under Design)

Section titled “Principal-Typed Authority (runs_under Design)”

While the compiler today tracks locus ownership (the Σ-tower) and reachable effect classes (@effects), the authority architecture extends the compiler graph with a runs_under(locus, principal) relation (where each locus inherits its parent’s principal unless narrowed, and no locus may claim a principal its owner does not hold):

  1. Static Principal Claims: Secret slot accesses carry the principal they require, enabling compile-time constitutional claims such as “only code running under the reviewer principal may reach FORGE_TOKEN” (Claims & the law).
  2. Generated Backend Policies: Vault policies, Postgres roles, NATS account ACLs, and GitHub team permissions become deterministic projections of each principal’s reachable closure rendered at placement time, rather than hand-edited configuration files.
  3. Dynamic Per-Attachment Credentials: In the record, holding a position is an appointment row (holds), while a live worker process or browser session acting under that seat is a time-bounded attachment. Short-lived credentials are minted for the specific attachment (narrowed to the attachment’s scope and revoked when the attachment ends), and every runtime effect is logged against its attachment ID.

Replaceable Providers and Financial Discipline

Section titled “Replaceable Providers and Financial Discipline”

Providers are replaceable

Section titled “Providers are replaceable”

External dependencies—LLM backends, databases, OIDC issuers, communication channels, payment rails, accounting ledgers, and compute hosts—bind through Hale interfaces (Interfaces & Contracts). Each provider capability tracks three distinct states: implemented in code, available on the current account, and authorized by grant. Swapping a provider preserves the organization’s record, authority structure, and history.

Financial Capture and Books (Design)

Section titled “Financial Capture and Books (Design)”

Financial operations follow four structural rules:


Implementation Status

Section titled “Implementation Status”
Capability Status in the Repository Today
Per-repository append-only signed record Built: Memory and the record
Deliberate cross-record publication (connect & handoff) Built: hale dna connect and hale dna handoff (Memory and the record)
Sealed protected evidence (customer, confidential) Built: hale dna receipt encrypted in Postgres memory (Memory and the record)
Deployment profiles (local, remote-body) Built: hale habitat graft --profile local|remote-body and hale dna profile (Getting started)
Root habitat organism (hale habitat up, status, down) Built: the local profile (Docker Compose body and face services), on this machine or another (up --host); --backends operator adopts an existing Postgres and NATS
Habitat child birth & role allocation (hale habitat graft) Built: Allocates [dna] needs (memory, nerves, senses, heart database), links parent genesis, and proposes standard pack
Habitat standard & operator browser face (/index, /app/) Built: Started automatically by hale habitat up (The head and the face)
Hosts, compose provider, and ssh host registration Built: compose provider places on local; hale habitat host add|probe|remove registers LAN hosts over SSH and placing allocations on them is built (hale habitat place, apply, graft --host)
An agent pairing with a person (MCP, hale habitat brief) Built: the head’s commands over mcp::Rpc under the person’s bearer and roles (hale mcp --app, the endpoint hale habitat status prints), every act a row in their name; agents/operator.md
Saplings & nurseries (hale habitat graft <sapling>, nursery) Built: Digest-pinned [[sapling]] entries, hale habitat nursery add|refresh|list|ratify; a repository as its own nursery (repo = "."), as hale-lang/voice is
Verified OIDC principal source Built: git config dna.principal oidc (The head and the face, The skin)
Per-client backend roles (Postgres, NATS, Vault) Built: Separate owner, spine, head, reflexes, and per-app roles (The skin)
Monetary grant reservations & window enforcement Built: spend.reserved, spend.settled, spend.compensated (The spine)
Serving API surfaces & locus placement Built: api::serve over Unix/HTTP (API) and placement { } (Concurrency & placement)
Opening and filling positions (position open, fill, vacate) Built: Board-ratified graph nodes, mandates, and holds edges (Positions and fill)
Atomic structural batches (hale dna apply) Built: open, fill, fill *, vacate, practice, law, idea, assign, close, merge, split, expose, depend, externalize, internalize
Adopting and retiring nursery packs (hale dna pack) Built: hale dna pack list|show|apply|retire and hale dna nursery add|list
runs_under principal graph, projected ACLs, attachment tokens Not built (tracked in compiler registry design)
Cross-record habitat operations (extract, absorb, re-parent) Not built
Standard equipment libraries & financial books Not built (standard nursery pack is built and proposed at graft)