# Praxis Crud AI Authoring

> Use when changing or validating `@praxisui/crud` authoring and AI surfaces, including `CrudAuthoringDocument`, `CrudMetadataEditorComponent`, `PraxisCrudWidgetConfigEditor`, `openCrudMetadataEditor`, `PRAXIS_CRUD_AUTHORING_MANIFEST`, `CRUD_AI_CAPABILITIES`, CRUD context packs, resource/list/create/edit/view/delete operations, permissions, dialog defaults, child-operation delegation, registry ingestion, and authoring round-trip.

- Skill: `codexrodrigues/praxis-crud-ai-authoring` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add codexrodrigues/praxis-crud-ai-authoring`
- Raw SKILL.md: https://api.skillmd.com/api/skills/codexrodrigues/praxis-crud-ai-authoring/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: codexrodrigues (https://skillmd.com/u/codexrodrigues)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/codexrodrigues/praxis-crud-ai-authoring

---


# Praxis CRUD AI Authoring

Use this skill for governed CRUD authoring. CRUD AI edits must compile to manifest-backed operations over `CrudMetadata`; they must not emit free JSON patches or redefine table, form, dialog, or settings-panel child contracts.

Pair with `praxis-crud-drawer-adapter-contract` for drawer adapter/public entrypoint work and with `praxis-crud-dialog-form-host-lifecycle` for modal/drawer form-host lifecycle, semantic result propagation, and refresh behavior.

## Required Source Audit

Inspect:

- `projects/praxis-crud/AGENTS.md`
- `src/lib/ai/praxis-crud-authoring-manifest.ts`
- `src/lib/ai/crud-ai-capabilities.ts`
- `src/lib/ai/crud-ai.adapter.ts`
- `src/lib/ai/crud-context-pack.ts`
- `src/lib/crud-authoring-document.model.ts`
- `src/lib/crud-editor-capability.ts`
- `src/lib/crud-metadata-editor.component.ts`
- `src/lib/praxis-crud-widget-config-editor.ts`
- `src/lib/open-crud-metadata-editor.ts`
- README, docs manifest, public API, and focused specs

## Authoring Boundary

CRUD authoring owns:

- resource binding
- list surface orchestration
- create/edit/view/delete action binding
- open mode defaults and dialog host defaults
- permissions/capability policy references
- child-operation delegation
- CRUD authoring document persistence events

Delegate child details to their owners:

- table operations to table skills/manifests
- form config, field metadata, submit, and rules to dynamic-form/metadata-editor skills
- dialog shell details to dialog skills
- Settings Panel protocol to settings-panel skills

## Editor Diagnostics As Cockpit

Treat `CrudMetadataEditorComponent` and `validateCrudAuthoringDocument(...)` as
the first cockpit for authoring health before manually editing JSON.

- Normalize seeds through `parseLegacyOrCrudDocument(...)` /
  `normalizeCrudAuthoringDocument(...)`; do not preserve legacy shapes just
  because a host supplied them.
- Use section health (`connection`, `defaults`, `actions`, `table`) and
  `nextFocus*` guidance to decide the next authoring move before touching raw
  metadata.
- For each canonical action, resolve the blocking group in this order:
  binding, schema, submit, then API. Do not treat a flat diagnostic list as the
  only troubleshooting surface.
- Inferred canonical modal/drawer actions may be accepted without `formId` when
  the runtime resolver can derive the form contract; custom actions still need
  explicit bindings.
- Keep diagnostics tied to canonical paths such as `metadata.actions.create.form`
  so shell summaries, JSON validation, and persistence events stay aligned.

## Schema Lookup And Draft Custody

- Give schema discovery an editor-local `GenericCrudService` with the canonical DI dependencies; never reconfigure the shared runtime client to inspect another resource. Missing transport may leave offline authoring available, but a provided `API_URL={}` is not an absent provider.
- Use the same identity for requests and inherited columns: trimmed resource path, trimmed endpoint key and `apiUrlEntry ?? null`. A resource change or clearing (including through Reset), or owner destruction, cancels/invalidates the old lookup before the next render; stale callbacks cannot replace fields or alter the current busy state. Editorial seed changes with the same tuple preserve the request. Validate callbacks against generation/current tuple and the captured external resource or its echo of the edited resource, not the entire serialized document.
- Keep a provided `effectiveTableConfig` snapshot bound to the external resource observed when that snapshot is received. Reusing the same snapshot while replacing seed A with B must not relabel A's columns as B; editing B and resetting to A preserves A's snapshot owner. The host must supply a fresh snapshot with its coherent seed. Without a public resource identity in that snapshot, the editor cannot infer provenance from inputs delivered in separate cycles; do not invent one from column names. Materialized columns remain transient evidence; preserve authored `metadata.table.columns: []` until explicit customization.
- Invalid KPI-filter JSON is an unsaved draft even when the canonical document has not changed. Combine it with dirty/valid shell state so Apply/Save stays blocked until repair or explicit Reset. An equivalent valid correction clears that draft without creating a false document change. Prove scope/late-response/empty/error/reset/destroy cases, coherent snapshot replacement and raw-draft repair in the focused metadata-editor spec; keep consumer persistence evidence separate.

## Manifest Rules

Use `PRAXIS_CRUD_AUTHORING_MANIFEST` as executable source.

- `resource.bind` must validate canonical resource path/key, id field, schema path, api metadata, and capabilities.
- `list.surface.configure` may patch CRUD list orchestration but must delegate table semantics.
- `surface.create|edit|view.configure` must produce complete route/modal/drawer bindings.
- Drawer bindings configure CRUD orchestration only; host drawer shell overrides remain adapter contracts and must not be authored as freeform component patches.
- `delete.enabled.set` requires explicit confirmation/capability policy when destructive.
- `dialog.size.set` or dialog defaults must remain shell-level and delegate dialog details.
- `form.childOperation.delegate` is required when the user asks to change form fields, rules, layout, or submit behavior.

Do not materialize Domain Catalog governance rules into `CrudMetadata` as a shortcut. Store only declared lightweight references/probes when the contract supports them.

## Validation

Minimum gates:

- manifest: `src/lib/ai/praxis-crud-authoring-manifest.spec.ts`
- adapter/context: `src/lib/ai/crud-ai.adapter.spec.ts`
- editor capability: `src/lib/crud-editor-capability.spec.ts`
- metadata editor/widget editor: focused editor specs
- authoring entrypoint: `src/lib/praxis-crud.authoring-entrypoint.spec.ts`
- compile: `npm run build:praxis-crud`
- registry/docs: `npm run generate:registry:ingestion` when component docs or AI assets change

Pair with `praxis-crud-runtime-openmodes` for runtime launcher behavior and `praxis-angular-validation-gates` for validation scope.

