small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
albedo robot-docs contributing.md

# Change Albedo These project rules guide implementation changes. The linked feature pages describe current behavior and its limits. ## Choose the owning layer Add capabilities through typed [plugins](plugins.md). Keep HTTP admission and wire encoding in daemon adapters, composition and kernel lifecycle in the [runtime](runtime.md), and feature state with its owning extension. The interfaces are defined in [`extension.gleam`](../src/albedo/harness/sdk/extension.gleam). Use the command's `Context.state` operations, typed SDK session operations, or supplied session callbacks to reach session behavior. Do not mutate a session's state from an extension. Resolve cross-extension dependencies from the applicable active selection, using [`host.Context`](../src/albedo/harness/sdk/host.gleam) or `extension.Daemon` rather than a captured installation registry. See [commands](commands.md) and [extensions](extensions.md). Add an actor when ordering, concurrency, or resource lifetime requires one. A plugin declaration alone does not require a process. ## Keep typed and native responsibilities separate Keep process state, ports, monitors, external-term handling, and native binary operations in their Erlang owners. Reuse Gleam functions for validation and text projection. Keep typed values through internal operations and encode JSON at the wire boundary. Do not encode an observation to JSON and parse it again to add fields. See [`command.StateOp`](../src/albedo/harness/sdk/command.gleam). Keep unfinished-output projection policy in [`active_output.gleam`](../src/albedo/daemon/active_output.gleam). Its [native helper](../src/albedo/daemon/albedo_active_output.erl) owns spill-file operations. Do not reconstruct output by replaying events when a typed projection is available. ## Reuse runtime helpers For extension imports and native bindings, follow the [SDK import contract](extensions.md#sdk-imports-and-native-bindings). Keep shared extension helpers under `albedo/harness/sdk/` and call their Gleam APIs. Use [`clock`](.…