Skip to content

id: implement the feature-composition plan — cargo-feature catalogue, named build profiles, Roc composer as a feature (succeeds #5788) #14056

Backlog

Description

@developing-today-fleet

What this is

The implementation home for the feature-composition plan for the ID binary, prioritized by Drew 2026-11-23 (~21:27 CST) together with the Roc platform composer design it builds on.

Plan of record (landed): doc/2026-11-24T03-36-48Z_design_id-feature-composition/ — https://github.com/developing-today/code/tree/main/doc/2026-11-24T03-36-48Z_design_id-feature-composition (record PR #14055, merged 6b1f96b9).

Premise check: the existing feature-architecture design home is #5788 ("feature-leveled build variants on the crate split"), closed 2026-11-05 after its design task completed. This plan succeeds it — it keeps #5788's four levels as the founding profiles and revises what that design left open (§0.2 of the record). This issue is the open implementation tracker; #5788 stays closed as the predecessor record.

Shape of the plan

  • Core: a plain, dumb client — local identity, basic store, provider link, CLI — with everything else behind features (§3 of the record).
  • Feature catalogue: curated opt-in features with declared dependencies and exclusivity groups; alternate stores are the named mutually exclusive group (§4).
  • Profiles: plain (the user download), full (curated all-on server build — a profile, not --all-features), basement (headless), embedded (library only), plus served-environment compositions composer-host, alt-store-node, hosted-edge; every build is named by its composition hash (§5–§6).
  • The Roc platform composer is one feature of this binary (roc-composer), with its own Rust plan at §8 of the record: manifest schema + canonical CBOR/BLAKE3 hashing first, per-target composability certification, the universal host never a production artefact, registry graduation/revocation at the grant layer.

Slices (§10 of the record — plan output, NOT yet queued)

  • S1 — Catalogue + manifest + hash, as a design-of-record
  • S2 — Feature hygiene
  • S3 — The world split
  • S4 — The plain profile
  • S5 — The full profile + composition stamping
  • S6 — Store exclusivity, first alternate
  • S7 — id-compose build tool + registry
  • S8 — CI matrix + cross-profile conformance
  • S9 — Measurement + budgets
  • S10 — Roc Composer v0
  • S11 — Roc Composer v1
  • S12 — Transport adapter features
  • S13 — Hosted/alt-store served profiles

Slices get packetised from this issue when the programme is scheduled; the plan itself enqueues nothing.

Links

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T03:45:35Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 24, 2026

    @developing-today
    Contributor
  2. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    ContributorAuthor

    Amendment — Drew's refinements to the feature-composition plan (2026-11-23)

    Recorded from Drew's direction in the main chat, 2026-11-23 ~22:02 CST, confirming the plan's reading and extending it. These points amend the plan of record (doc/2026-11-24T03-36-48Z_design_id-feature-composition/, PR #14055); the dated record is not rewritten — this comment is the amendment of record.

    1. Features gate three distinct acts, not one

    The plan's catalogue splits by role, because three different binaries (or three modes of one binary) need three different feature sets:

    • Compile a platform. The compiling ID binary needs the composer feature (Drew's words named a prerequisite feature for compiling at all — spoken as "the rest feature"; reading: the composer/host compile prerequisite, exact name to be pinned when the catalogue is written) plus the per-capability features for whatever the platform's manifest selects — his example: a rust feature may need to be enabled to compile a platform carrying a capability that needs it.
    • Run a platform (server side). The running ID binary needs the appropriate features enabled for that platform's capabilities — the run-side implementations.
    • Run the client half. The client needs all the appropriate client-side capabilities/features enabled to run its half. Server and client feature sets are selected independently.

    2. Build/run asymmetry is first-class, in both directions

    What a binary needs to build a platform and what it needs to run one are different sets, and neither implies the other:

    • Build without run: a binary can compile a platform yet be unable to run it — it holds the interface/source side but cannot link the actual implementations.
    • Run without build: a binary can run a platform because it holds the real implementations of that platform's features, while the source the platform was built from is not in its binary at all. The compiling server had that part; the runner works because the artefact is self-contained.
    • The DLL shape: a backend compiled with all major features enabled can emit a platform as a DLL that another server runs directly, or that the compiling server runs itself. In the DLL scenario the running server may need no capability features of its own — only the ability to act as a platform (host) — because the DLL carries all its needed parts built in.

    3. Permissions inside ID: three request kinds

    Authority lives inside the ID system as app permissions, separate from composability:

    • Request to run a world.
    • Request to precompile a specific platform.
    • Request to use a specific platform that is already compiled.

    Each needs its app permission. A user requesting an app with a specific feature set needs permission to do so, and the feature set must be valid — composable as a platform under the catalogue's rules. Permission and validity are independent checks; either one failing stops the request. (This is the grant side of the composer's narrowing: composition ⊇ declaration ⊇ grant.)

    4. Expected deployment shapes (the common cases stay simple)

    Most scenarios are one of: (a) servers carrying just what their platform(s) need; (b) servers with everything enabled, able to launch any platform, running many different platforms across many clients; or (c) a mix of the two. Client builds mirror the same selection: e.g. ID as an Android app bakes in the Android platform capability and carries only compatibility layers to run as a terminal, while the ID executable in client form would carry nothing able to execute the Android platform.

    5. Game-engine platforms go either way

    For engine platforms (the Odin engine platform; the Bevy-based one): either the ID binary runs on the platform — the platform opens the appropriate protocol and has the API client built in, with whatever the capability needs enabled (e.g. physics) — or ID runs as a service and a separate game executable connects to it. The Bevy code itself contains nothing about platforms or Roc: platform handling is handed off to a service (on a laptop or elsewhere), or the platform component is built right into the Bevy app, in which case the ID executable is not used at all.

    6. Precompile-first posture, dynamic as the escape hatch

    For performance: precompile. ~90% of the time, runs use a preset list of precompiled platforms — hosted by the user, or accessed as hosted environments. Fully dynamic generation must nevertheless be possible end to end: dynamically generate a platform, execute a world against it, and dynamically execute sandboxed Roc code the world app was built for — via a compiled DLL of the client-side code built directly from the Roc code, compiled by us (a trusted backend), never by the submitting client — to prevent any hijinks.

    7. The strategy-ID tick model (automated / AI-controlled competitive games)

    • Users precompile a variety of strategies (Roc code) and have them all cached up front. Per tick, the world is simply told which ID to execute, as the strategies unfold — so the per-tick input is minimal: a simple command, a hash, or a number, with only that latency. Users may also run their own code locally.
    • For a situation they could not predict: generate new Roc code and submit it on a separate channel to my backend, or to a backend trusted by the world server; it is compiled there, and the user then says "use this ID." If they reference it before compilation completes, they do nothing — or sit in an error state locally, for their user only — for all ticks until it is compiled.
    • World code exposes standard switch functions for this: "when this is available, switch to it"; "if I'm on ID 123 and ID 345 becomes available, switch to it immediately"; presets A, B, C — however the world decides to use its fuel.
  3. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    ContributorAuthor

    Plan amendment — profile naming + open profile sets (Drew, 2026-11-23 23:21 CST)

    Two changes to the plan's profile section (§6), in Drew's words: "make basement an alias for headless profile or something and allow simple config/way to make new profile sets."

    1. headless is the canonical profile name; basement is an alias.

    • The headless server profile is named headless. basement resolves to it as an alias, so anything written against basement keeps working.
    • Aliases are a general mechanism, not a one-off: a profile may declare alias names, and an alias is accepted anywhere a profile name is (build commands, served-environment configs, composition references) and resolves to the canonical profile before hashing/resolution — an alias never changes a composition hash.

    2. Profile sets are open — defining a new profile is a config act, not a code act.

    • A simple declarative config lets a user define a new named profile: a set of catalogue features (dependency and exclusivity rules still enforced at resolution, same as built-ins), optionally extending an existing profile.
    • The built-ins (plain, full, headless, embedded) are expressed in the same config format, so built-in and user-defined profiles share one definition mechanism, one validation path, and one composition-hash treatment — a user profile's builds are named by their composition hash exactly like a built-in's.
    • Aliases (point 1) are declared in the same config, for user profiles as well as built-ins.

    Plan impact: §6 gains alias resolution + the profile-definition config; the §10 slices that touch the catalogue/profiles carry both. Nothing else in the plan changes; the slices remain deliberately unqueued.

  4. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    ContributorAuthor

    Amendment 3 — "server" and "client" are roles, not kinds of node (Drew, 2026-11-23)

    Recorded from Drew's direction in chat, 2026-11-23 ~23:38 CST: "server and client is sort of arbitrary they are kind of all servers and can be clients etc p2p. but practically it's good to treat them as different in many cases."

    What this changes in the plan:

    • Roles, not node classes. "Server" and "client" name roles a node plays in a given interaction, not kinds of binary or machine. The base shape is peer-to-peer: any node can host a platform for others (server role), consume a hosted platform or world (client role), or do both at once.
    • The feature matrix applies per role, and roles compose in one binary. A node's feature set is the union of what its roles need — compile features, run-side (host) features, and consume-side (client) features can coexist in a single build. Nothing in the design may assume a node is only ever one role. The three ID-side app permissions (run a world / precompile a platform / use an already-compiled platform) attach to the acting identity in whichever role it is acting, not to a machine class.
    • Mutual hosting is normal. A node can serve a platform to peers while itself being a client of another node's platform; chains and meshes of hosting are ordinary cases, not exceptions. The build/run asymmetry of Amendment 1 therefore also runs peer-to-peer: a node may compile for a peer, host for a peer, or consume from a peer, in any combination its features and permissions allow.
    • The practical distinction stays, deliberately. Deployment shapes (just-enough, everything-servers, headless hosts, thin clients) still treat the roles differently — feature selection, permission scoping, and precompile placement are decided per role, because in practice a given deployment usually emphasises one role. The distinction is an operational lens, kept on purpose; it is not an architectural boundary.

    This amends the framing of Amendment 1's three-sided matrix (compile / run a platform / run the client half): the three sides stand, but they are per-role feature sets that any node may hold in any combination.

  5. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    ContributorAuthor

    Amendment 4 — the strategy-model behaviours are conventions, not hard-coded semantics (Drew, 2026-11-23)

    Recorded from Drew's direction in chat, 2026-11-23 ~23:42 CST: "the waiting idling error worldside etc are examples of common conventions one might expect but aren't hard coded, world's might do all sorts of things but often these kinds of things."

    This corrects the framing of Amendment 1's strategy model (comment 7121662656):

    • Conventions, not semantics. The behaviours recorded there — a user idling or sitting in a local-only error state while a referenced strategy is not yet compiled, world-side switch functions ("when X is available, switch", "123 → 345 on availability", presets) — are examples of common conventions: the kinds of things worlds will often do. They are not hard-coded behaviour of the platform, the composer, or ID, and no part of the design may treat them as mandated.
    • Worlds decide. On a strategy being unavailable (or becoming available), a world might idle the user, raise a local-only error, substitute a fallback strategy, continue under a default, pause, or do something else entirely — whatever the world's author chooses. The same applies to availability-driven switching: a common pattern, expressed in world code, not a built-in platform feature with fixed semantics.
    • What stays platform-level is the mechanism: strategies precompiled and addressed by ID; per-tick input reduced to a command, hash, or number; new code compiled by a world-trusted backend and then referenced by ID; the availability of a compiled strategy being knowable; fuel accounting for world code. The behaviour layered on those mechanisms belongs to the world.
    • Design consequence: the composer/ID surface must expose the signals (availability, compile completion, fuel) without baking in one convention as the only outcome — e.g. the runtime must not force an error state on an uncompiled reference. Wherever the plan's wording reads as mandating one of these behaviours, read it as describing the common case.
  6. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    ContributorAuthor

    Amendment 5 — correction: "the rest feature" is the rust feature (Drew, 2026-11-23)

    Resolves the one open term from Amendment 1 (comment 7121662656), where dictation rendered the compile-prerequisite feature's name as "the rest feature." Drew's correction, 2026-11-23 ~23:50 CST: "For the IDE [the ID binary] to even be able to compile a platform, it needs the rust feature, and depending on what's needed, the rust feature might need to be enabled in order to compile a platform with that capability."

    What the record now says:

    • The compile prerequisite is the rust feature. ID needs the rust feature enabled to compile platforms at all — it is the baseline prerequisite for the compile act, alongside the composer feature (roc-composer).
    • The same feature is also a per-capability requirement. Depending on what a manifest selects, the rust feature may be needed for that capability's sake: where a capability's platform implementation is Rust-based, compiling a platform that selects it requires the rust feature. So one feature can appear in both roles — global prerequisite for an act, and capability-conditional requirement — and the catalogue's dependency modelling must allow that (a feature is not confined to a single role or a single side of the matrix).
    • Read Amendment 1's rust example in this light: the per-capability features a compile needs are the features of the selected capabilities, and for Rust-implemented capabilities that set includes rust itself — on top of its baseline role.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions