--- name: resources description: "Create and maintain Pai Console project Resources: typed pages, canvas view blocks, HTML prototypes, Excalidraw whiteboards, live Knowledge projections, attributes and filters, notes, folders, suggestions, comments, image/video assets, and files. Use for documents, reports, PRDs/SOWs, dashboards, mockups, editable diagrams, page approval/ownership/filtering, suggestions, comments, uploads, asset reuse/deletion, or moving/restoring/deleting pages and empty folders." argument-hint: "[project] [topic or resource type]" compatibility: "Pai 0.2.5+ (MCP corp)" --- # Resources: pages, views, whiteboards, images, files Read shared `pai-console` first through the current client's skill mechanism. Replies follow the user's language; preserve Mexican Spanish business formatting, MXN amounts, and `America/Mexico_City` dates where required. Spanish section identifiers, server errors, and established paths quoted here are intentional contract exceptions. **References:** contract-generated `references/page-types.md` for built-in sections, blocks, limits, and rules; **`views`** for `pai-view@1` catalogs/recipes. Prefer these over the ~35 KB `page_catalog`; call `page_catalog`/`page_types` only for a suspected version difference or organization/project custom types. ## 1. Choose the resource | Need | Resource | |---|---| | Known document structure (note, guide, decision, report, process, overview, PRD, SOW, architecture, discovery, design inventory) | `layout: "document"` page **with built-in `typeSlug`**; required sections govern | | Dashboard, visual report, screen mockup, freeform Pai components | `layout: "canvas"` page with **`view`**, **without `typeSlug`**; no built-in type allows it | | Free JavaScript, simulation, interactive/pixel-precise mockup | **`html`** block (§3), **without `typeSlug`**; no built-in type allows it. **Not a screen prototype:** screens require `view` (`screens`) | | Manually editable brainstorming, flow, map, draft architecture, Mermaid flowchart | **Whiteboard** (`whiteboard_create`, §3), collaborative Excalidraw in Resources, embedded through `whiteboard`. For display only, use `Flow` (`views`) | | Existing Knowledge (C4, ERD, screens, flows, decisions, risks, glossary…) | Live **`projection`** in a v2 page (§3), resolved at read time rather than copied | | Quick Markdown, including client-authored notes | Note (`note_create`, §9) | | PDF, spreadsheet, contract, binary | Resources file (§6), not a page | | Atomic decision, rule, entity, component | Knowledge node (`knowledge`), not a page | A **page is read continuously; a node is queried, linked, and superseded**. Pages cite nodes; nodes cite pages through `sources: [{type:"page", pageId}]`. ## 2. Create a page 1. **Search:** `page_search` by topic and `page_list` following `nextCursor` for paths. Update equivalents (§4). 2. **Choose type:** `references/page-types.md`, or `page_types {slug}` for full `authoringGuide` and example. 3. **Choose path:** English kebab-case folders, no extension/dates except series: `architecture/payments`, `reports/checkout-performance`, `dashboards/project-status`, `guides/deploy-staging`, `reports/2026-10-weekly`. 4. **Compose:** ```json { "schemaVersion": 1, "componentSetVersion": "pai-core-v1", "layout": "document", "sections": [ { "id": "resumen", "title": "Summary", "blocks": [ { "id": "intro", "type": "text", "markdown": "…" } ] } ] } ``` - Section IDs match the type (`resumen`, `hallazgos`) in its order. - Block IDs match `^[a-zA-Z][a-zA-Z0-9_-]{0,79}$`, unique page-wide; use meaningful names (`summaryCallout`, not `b1`). - Limits: 40 sections, 200 blocks, 500 000 JSON characters. 5. **`page_validate {content, typeSlug}`** until no `issues`. Check contract, missing/misordered sections, prohibited blocks, and quality (dated URL sources, minimum text). 6. **`page_create`** with: - `path`, Spanish business `title`, `description`, `typeSlug`; - `audience`: `internal` (team) or `client`. Ask if unspecified; absent a decision, use `internal`; - `content`, commit-style `summary` (≤80); - stable `idempotencyKey`: `page--`. 7. Inspect `warnings`, `document.revision`; return path/revision and response `url` prefixed by the Portal host (`https://app.pai.lat` production; staging Portal in staging). Validated report with five required sections: `examples/report-page.json`. Canvas examples: `../views/examples/`. ## 3. Views, HTML, projections, whiteboards Choose `view` for Pai component dashboards/data; `html` for free JavaScript/pixel-precise interactions; `projection` for live Knowledge; `embed` for Figma/Slides/Miro/YouTube/Loom **https URLs only**, never HTML or `