Repository navigation
Description
Problem or use case
urlcode init <site> --with presents a set of extensions, but the current implementation treats the flag sequence as host setup and activation order. That leaks a hidden implementation constraint into the declarative authoring path:
packages/store/src/scaffold.tsrefuses--with store,auth; it requiresauth,storeonly because store emits a bareprojectSha256reference that auth happens to declare first.packages/ui/src/host/scaffold.tsdocuments that UI must be named first forui,auth,admin;packages/admin/src/scaffold.tsrefuses UI after admin because activation needs the kit.src/init-with.tscalls scaffolds and renders imports, setup and extension entries in the user-supplied order.
An authoring agent has no semantic reason to distinguish store,auth from auth,store, and a growing ecosystem will make prescribed permutations an unreliable, non-composable interface. The dependency/activation ordering is real; making the CLI spelling carry it is the problem.
Proposed behavior and alternatives
Treat --with as an unordered requested set. Extend the scaffold contract (or normalize host fragments) with explicit, declarative ordering requirements/provided capabilities, then topologically order host setup, activation entries, README sections and close hooks deterministically. Keep the runtime activation requirements strict: for example, a presentation-dependent extension still activates after UI.
Acceptance:
--with auth,storeand--with store,authboth create an equivalent site with the same extension behavior and revision pin.--with ui,auth,adminworks in any input permutation that contains all required extensions; emitted host order is canonical and reviewable.- A missing requirement, conflict or cycle refuses before writing, naming the extension and dependency instead of prescribing a magic flag order.
- Preserve standalone extension use, exact pins and core’s no-build-time-import boundary. Do not auto-add auth/UI or infer security policy from the requested set.
A smaller alternative is requiring each scaffold to use namespaced, self-contained host bindings, but activation order still needs an explicit contract once third-party extensions depend on capabilities. This should stay an extension composition contract, not route YAML.
Activity
jimhoyd commentedon Sep 20, 2026
Progress: an agent has started on this; a PR will be linked here when it opens.
Make init --with composition independent of argument order (refs #337)
Make init --with composition independent of argument order (refs #337) (
jimhoyd commentedon Sep 20, 2026
Fixed in #342: --with is an unordered set. Scaffolds declare provides, requires, after and conflicts; init-with orders them canonically, so auth,store and store,auth (and any ui,auth,admin permutation) produce the same site and revision pin. A missing requirement, conflict or cycle refuses before anything is written and names the extensions. Store now reads its pin as storeProjectSha256. Capability names (ui.kit, auth.service, store.collections) are a proposal; initAdministration and initAuthentication still hard-code ui-first composition.