CRUD Scaffold Regeneration Contract¶
Applies to: asset-admin-distributor and future CRUD operational apps.
Delivery model¶
| Approach | Status |
|---|---|
Intent-only codegen (npm run generate-test-site) |
Current (deterministic) |
| AI prompt + intent bundle | Fills GraphQL/theme bodies on generated skeleton |
| Reference repo copy | Optional maintainer shortcut, not required in bundle |
Primary docs:
docs/agent/generate-assets-v2-prompt.mddocs/contracts/intent-driven-replica-parity.mdreplicaParity+productionRouteManifestinasset-admin-distributor.intent.yaml
Exact replica requirement¶
Generated (or AI-built) output must be an exact replica of webapp-asset-admin-distributor-v2:
- Same routes (
/signin,/dashboards,/thing/item, …) - Same layout groups (
app/(auth)/vsapp/(default)/) - Same Mosaic styles (Tailwind 4, violet tokens,
utility-patterns.css) - Same page chrome (sidebar, dashboards tabs, CRUD tables)
Broken styles or invented /login routes = failed generation.
Intent bundle (five artifacts + replica block)¶
| File | Purpose |
|---|---|
asset-admin-distributor.intent.yaml |
Pages, RBAC, replicaParity, productionRouteManifest |
asset-admin-distributor.themes-registry.yaml |
Theme → implementation paths |
asset-admin-distributor.graphql-catalog.yaml |
GraphQL operations |
asset-admin-distributor.design-system.yaml |
Mosaic CSS + component paths |
docs/sites/asset-admin-distributor.md |
Human spec |
Regeneration formula¶
app = codegen(intent, themesRegistry, graphqlCatalog, designSystem, mosaicTemplates)
Intent declares what must exist. Codegen (scripts/generate-from-intent.js) emits routes, shell, and theme stubs. Production parity completes by wiring the GraphQL catalog into generated pages.
Versioning¶
| Contract | Version |
|---|---|
| Regeneration contract | 2.1.0 |
| Replica parity contract | 1.0.0 |
| Asset Admin intent | 3.2.0 |