Slice · AI prompt
Three AI surfaces behind one slug — chat FAB, generation studio, agent runner. Install one variant or all.
# Install `ai-workspace` — AI Workspace — chat · studio · agents
> Three AI surfaces behind one slug — chat FAB, generation studio, agent runner. Install one variant or all.
📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail : https://resource.rahmanef.com/slices/ai-workspace
🧠 JSON catalog : https://resource.rahmanef.com/api/knowledge?slice=ai-workspace
🔗 Source : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/ai-workspace
## 1. Install
```bash
npx rr add ai-workspace <chat|studio|agents> [--framework sveltekit]
# alias: npx rr add ai-workspace
```
The CLI copies `frontend/slices/ai-workspace/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.
## 2. What it ships
- npm: `lucide-react`
- shadcn primitives: `avatar`, `badge`, `button`, `card`, `progress`, `scroll-area`, `select`, `separator`, `slider`, `switch`, `table`, `tabs`, `textarea`, `tooltip`
- convex feature paths: `convex/features/aiChat`
## 3. Wire it up
Run `npx rr add ai-workspace <chat|studio|agents>` for React/default or append `--framework sveltekit`; omit the variant for all three. chat alone pulls the Convex aiChat backend + Anthropic runtime/key. studio and agents are frontend-only scaffolds. Wire chat via AiChatFab chat callback, studio via aiStudioTools, and agents via createAgentRunner(host).
## Rules of engagement
- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice
The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.