Scaffold a new resource with shared type, delta-doc doc, and JSX view
Scaffold a new resource for the Paintbrush app using delta-doc.
Ask the user for (skip if provided as arguments):
Use {name} for lowercase singular, {Name} for PascalCase, {names} for lowercase plural.
Before generating any code, read these files to learn the exact patterns:
In this skill folder (adaptation guides):
Living reference (the actual working code):
resources/message/message-api.ts — shared type (singleton)resources/message/message-view.tsx — singleton view with delta-docresources/graph/graph-api.ts — shared types (multi-entity)resources/graph/graph.tsx — complex view with list() and atomic opslib/delta-doc.ts — hub (server) + connect/open/call (client)server.ts — where to register docs and methodsapp.tsx — where to wire client routes and view importsresources/sample.html — CSS class reference for UI (/sample route)Each resource is a subfolder under resources/:
resources/{name}/{name}-api.ts — shared type (imported by both server and client)resources/{name}/{name}-view.tsx — JSX view using hub.open() for docsserver.ts — register doc with hub.doc<T>(name, opts), import shared typeapp.tsx — import view component(s), add client routesbunx tsc --noEmit — must be clean