T-W3KP-promote-ontogen-admin-layer-to-packages-ts
Status: planning/draft · Impact: medium · Complexity: medium
Promote pumice’s @ontogen/admin-layer (Nuxt CRUD layer) and
@ontogen/admin-types from apps/pumice/packages/* to the workspace’s
packages/ts/ tree, so they are shared libraries rather than app-local ones —
the clearest Phase-2 extraction candidate from D-0016-pumice-app-integration.
The two packages are already extracted within pumice and self-describe as
generic: @ontogen/admin-layer’s Nuxt config comment reads “Provides a generic
CRUD admin interface for ontogen-powered apps.” They are consumed by
apps/pumice/src-nuxt via file: deps.
| Location | Role today |
|---|---|
apps/pumice/packages/nuxt_admin_layer | @ontogen/admin-layer — generic CRUD Nuxt layer |
apps/pumice/packages/admin-types | @ontogen/admin-types — shared admin field types |
apps/pumice/src-nuxt (file: deps) | Consumer |
packages/ts/ | Shared TS library home (D-0012-monorepo-tooling) |
apps/dashboard | Vue-based — a plausible second consumer of a generic admin layer |
Proposed
Section titled “Proposed”Move both packages to packages/ts/ as workspace members, repoint pumice’s
consumption, and keep a clean dependency direction. Gated on the Bun migration
so the packages and their consumer share one package manager.
Approach
Section titled “Approach”- Gate on
T-M7QX. Do NOT move while pumice is still pnpm — thepackages/ts/*tree is a Bun workspace (root package.jsonworkspaces), and a pnpm consumer of a Bun-workspace package reintroduces the split D-0012-monorepo-tooling closed. After T-M7QX, pumice is Bun too. - Move the packages.
packages/ts/ontogen-admin-layerandpackages/ts/ontogen-admin-types(or keep the@ontogen/*names). Register as Bun workspace members. - Repoint pumice. Replace
src-nuxt’sfile:deps with the workspace protocol; verify the Nuxt layer resolves. - Confirm genericity / second consumer. Only keep them in
packages/ts/if genuinely reused (pumice + a plausible dashboard consumer) per S-0001-co-locate-first-promote-when-shared; otherwise leave app-local. - Verify.
bun install, Nuxt build + typecheck of pumice; ensure the admin layer still renders.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
packages/ts/ontogen-admin-layer/** | new | Promoted Nuxt layer |
packages/ts/ontogen-admin-types/** | new | Promoted types package |
apps/pumice/packages/* | delete | Remove the app-local copies |
apps/pumice/src-nuxt/package.json | edit | file: deps → workspace protocol |
root package.json / workspace config | edit | Register the new members if needed |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
@ontogen/admin-layerand@ontogen/admin-typeslive underpackages/ts/as workspace members. - AC-2: pumice consumes them via the workspace protocol;
bun install, Nuxt build, and typecheck pass. - AC-3: The admin layer still renders in pumice (no regression).
- AC-4: Dependency direction obeys S-0008-apps-consume-substrate-through-published-surfaces.
Out of scope
Section titled “Out of scope”- Adopting the admin layer in the dashboard — a separate follow-up once a concrete need exists.
- Rust crate promotion —
T-X8CF.
Dependencies
Section titled “Dependencies”T-M7QX(hard): the Bun migration must land first to avoid a pnpm/Bun split between the packages and their consumer.
Depends on
Section titled “Depends on”T-M7QX