Praxis CRUD Drawer Adapter Contract
Use this skill for the thin host adapter seam around CRUD drawer mode. The adapter is an optional shell override, not a second CRUD runtime.
Canonical Boundary
@praxisui/crud owns drawer open-mode orchestration through CrudLauncherService.
CRUD_DRAWER_ADAPTER is the host seam used only when a product must render the CRUD form in its own drawer shell.
- Without an adapter, drawer mode must fall back to the package default:
DialogService.openAsync(DynamicFormDialogHostComponent) with drawer presentation.
- The secondary entrypoint
@praxisui/crud/drawer-adapter is the preferred host import path. It exists to keep bootstrap bundles light and must not pull the full CRUD barrel.
- Hosts may provide visual chrome, telemetry, and layout integration. They must not redefine save/delete/close semantics, operation resolution, form contracts, or CRUD metadata.
Required Inventory
Inspect:
projects/praxis-crud/AGENTS.md
projects/praxis-crud/docs/adr/2026-03-drawer-adapter-light-entrypoint.md
projects/praxis-crud/docs/host-crud-runtime-and-openmode.md
projects/praxis-crud/src/public-api.ts
projects/praxis-crud/drawer-adapter/public-api.ts
projects/praxis-crud/src/lib/drawer.adapter.ts
projects/praxis-crud/drawer-adapter/src/drawer-adapter.ts
projects/praxis-crud/src/lib/crud-launcher.service.ts
projects/praxis-crud/src/lib/dynamic-form-dialog-host.component.ts
- drawer adapter token and launcher specs
Use praxis-crud-runtime-openmodes when the change touches general open-mode precedence or action launch behavior. Use praxis-dialog-overlay-runtime when the default drawer fallback depends on dialog overlay semantics.
Adapter Rules
- Import host adapters from
@praxisui/crud/drawer-adapter, not the root @praxisui/crud barrel.
- Keep root public API and secondary entrypoint intentional. If the secondary entrypoint starts exporting heavy services/components, treat it as an architectural regression.
CrudDrawerOpenConfig must carry the resolved action, metadata, mapped inputs, onClose, and onResult.
CrudDrawerResult is semantic: save, delete, or close, with optional data. The host adapter should propagate these results so PraxisCrudComponent can emit afterSave, afterDelete, afterClose, and refresh.
- Do not make the adapter responsible for schema discovery, submit URL inference, CRUD operation resolution, permissions, or persistence.
- Do not copy the default drawer implementation into hosts just to get basic drawer behavior; use
defaults.openMode = 'drawer' and the built-in fallback.
- If a host drawer is required, prove parity with the default runtime for close, save, delete, dirty/back policy, focus, and responsive sizing.
Aderencia Before Contract Changes
Classify before adding fields or exports:
ja-suportado-so-ux: default drawer works; host only needs presentation/wiring.
ja-suportado-mal-nomeado-ou-mal-materializado: host imports the root barrel or duplicates the default drawer even though the secondary entrypoint exists.
suportado-parcialmente: adapter receives the right contract but misses result propagation, focus, or responsive drawer parity.
lacuna-real-de-contrato: the adapter cannot express a required host drawer lifecycle or semantic result without a new canonical field.
For a real contract gap, update root/secondary public APIs, ADR/docs, launcher specs, drawer token specs, and a host or package consumer proof.
Validation
Use focused checks:
src/lib/drawer-adapter-token.spec.ts
src/lib/crud-launcher.service.spec.ts
src/lib/dynamic-form-dialog-host.component.spec.ts when fallback drawer behavior changes
- build
praxis-crud plus secondary entrypoint packaging when public exports change
- docs/ADR review when import path, bundle boundary, or adapter responsibilities change
State whether docs, public API, examples, and registry artifacts were updated or are unaffected.
1---2name: praxis-crud-drawer-adapter-contract3description: Use when changing or reviewing `@praxisui/crud` drawer mode, `CRUD_DRAWER_ADAPTER`, `CrudDrawerAdapter`, the lightweight `@praxisui/crud/drawer-adapter` secondary entrypoint, default drawer fallback, drawer result callbacks, bundle-entrypoint ADR alignment, or host drawer integration divergence.4metadata:5 source: https://skillmd.com/skills/codexrodrigues/praxis-crud-drawer-adapter-contract6---78# Praxis CRUD Drawer Adapter Contract910Use this skill for the thin host adapter seam around CRUD drawer mode. The adapter is an optional shell override, not a second CRUD runtime.1112## Canonical Boundary1314- `@praxisui/crud` owns drawer open-mode orchestration through `CrudLauncherService`.15- `CRUD_DRAWER_ADAPTER` is the host seam used only when a product must render the CRUD form in its own drawer shell.16- Without an adapter, drawer mode must fall back to the package default: `DialogService.openAsync(DynamicFormDialogHostComponent)` with drawer presentation.17- The secondary entrypoint `@praxisui/crud/drawer-adapter` is the preferred host import path. It exists to keep bootstrap bundles light and must not pull the full CRUD barrel.18- Hosts may provide visual chrome, telemetry, and layout integration. They must not redefine save/delete/close semantics, operation resolution, form contracts, or CRUD metadata.1920## Required Inventory2122Inspect:2324- `projects/praxis-crud/AGENTS.md`25- `projects/praxis-crud/docs/adr/2026-03-drawer-adapter-light-entrypoint.md`26- `projects/praxis-crud/docs/host-crud-runtime-and-openmode.md`27- `projects/praxis-crud/src/public-api.ts`28- `projects/praxis-crud/drawer-adapter/public-api.ts`29- `projects/praxis-crud/src/lib/drawer.adapter.ts`30- `projects/praxis-crud/drawer-adapter/src/drawer-adapter.ts`31- `projects/praxis-crud/src/lib/crud-launcher.service.ts`32- `projects/praxis-crud/src/lib/dynamic-form-dialog-host.component.ts`33- drawer adapter token and launcher specs3435Use `praxis-crud-runtime-openmodes` when the change touches general open-mode precedence or action launch behavior. Use `praxis-dialog-overlay-runtime` when the default drawer fallback depends on dialog overlay semantics.3637## Adapter Rules3839- Import host adapters from `@praxisui/crud/drawer-adapter`, not the root `@praxisui/crud` barrel.40- Keep root public API and secondary entrypoint intentional. If the secondary entrypoint starts exporting heavy services/components, treat it as an architectural regression.41- `CrudDrawerOpenConfig` must carry the resolved action, metadata, mapped inputs, `onClose`, and `onResult`.42- `CrudDrawerResult` is semantic: `save`, `delete`, or `close`, with optional data. The host adapter should propagate these results so `PraxisCrudComponent` can emit `afterSave`, `afterDelete`, `afterClose`, and refresh.43- Do not make the adapter responsible for schema discovery, submit URL inference, CRUD operation resolution, permissions, or persistence.44- Do not copy the default drawer implementation into hosts just to get basic drawer behavior; use `defaults.openMode = 'drawer'` and the built-in fallback.45- If a host drawer is required, prove parity with the default runtime for close, save, delete, dirty/back policy, focus, and responsive sizing.4647## Aderencia Before Contract Changes4849Classify before adding fields or exports:5051- `ja-suportado-so-ux`: default drawer works; host only needs presentation/wiring.52- `ja-suportado-mal-nomeado-ou-mal-materializado`: host imports the root barrel or duplicates the default drawer even though the secondary entrypoint exists.53- `suportado-parcialmente`: adapter receives the right contract but misses result propagation, focus, or responsive drawer parity.54- `lacuna-real-de-contrato`: the adapter cannot express a required host drawer lifecycle or semantic result without a new canonical field.5556For a real contract gap, update root/secondary public APIs, ADR/docs, launcher specs, drawer token specs, and a host or package consumer proof.5758## Validation5960Use focused checks:6162- `src/lib/drawer-adapter-token.spec.ts`63- `src/lib/crud-launcher.service.spec.ts`64- `src/lib/dynamic-form-dialog-host.component.spec.ts` when fallback drawer behavior changes65- build `praxis-crud` plus secondary entrypoint packaging when public exports change66- docs/ADR review when import path, bundle boundary, or adapter responsibilities change6768State whether docs, public API, examples, and registry artifacts were updated or are unaffected.