Skip to content
rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Platform Admin — Control Plane Contract

Framework-neutral privileged control-plane tool contract. The host injects metrics, feature-flag, and tenant-tier operations through PlatformAdminCtx and owns auth, authorization, tenancy, persistence, and audit enforcement; the canonical slice ships no renderer or Convex schema.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
platform-admin.prompt.mdmarkdown
# Install `platform-admin` — Platform Admin — Control Plane Contract

> Framework-neutral privileged control-plane tool contract.

📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail   : https://resource.rahmanef.com/slices/platform-admin
🧠 JSON catalog   : https://resource.rahmanef.com/api/knowledge?slice=platform-admin
🔗 Source         : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/platform-admin

## 1. Install

```bash
npx rahman-resources add platform-admin
# alias: npx rr add platform-admin
```

The CLI copies `frontend/slices/platform-admin/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.

## 3. Wire it up

Run `npx rr add platform-admin` (React/default) or `npx rr add platform-admin --framework sveltekit`. Bind PlatformAdminCtx.metrics/setFeatureFlag/setTier to server-authorized host operations. The slice intentionally does not invent tenant tables, KPI dashboards, routes, or a renderer.

## 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.