|
| 1 | +# ObjectStack Skills |
| 2 | + |
| 3 | +Domain-scoped instructions for AI coding assistants (Claude Code, Copilot, Cursor) |
| 4 | +working in the ObjectStack monorepo. Each skill is self-contained: a `SKILL.md` |
| 5 | +with YAML frontmatter, plus a `references/_index.md` that points into the |
| 6 | +authoritative Zod sources in `node_modules/@objectstack/spec/src/...`. |
| 7 | + |
| 8 | +> **Always read the spec source for exact field shapes.** Skills give shape and |
| 9 | +> intent; the Zod schemas are the truth. |
| 10 | +
|
| 11 | +--- |
| 12 | + |
| 13 | +## Index |
| 14 | + |
| 15 | +| Skill | Use when you are… | |
| 16 | +|:------|:------------------| |
| 17 | +| [objectstack-platform](./objectstack-platform/SKILL.md) | Bootstrapping or operating a runtime — `defineStack`, drivers, adapters, plugins, services, CLI, deploy. | |
| 18 | +| [objectstack-data](./objectstack-data/SKILL.md) | Modelling objects, fields, relationships, validations, indexes, lifecycle hooks, permissions / RLS, or seed datasets. | |
| 19 | +| [objectstack-query](./objectstack-query/SKILL.md) | Writing ObjectQL — filters, sorting, pagination, aggregation, joins, window functions, full-text search. | |
| 20 | +| [objectstack-ui](./objectstack-ui/SKILL.md) | Designing Views, Apps, Pages, Dashboards, Reports, Charts, or Actions. | |
| 21 | +| [objectstack-automation](./objectstack-automation/SKILL.md) | Wiring Flows, Workflows, Triggers, Approvals, scheduled jobs, or webhooks. | |
| 22 | +| [objectstack-ai](./objectstack-ai/SKILL.md) | Designing Agents, Tools, Skills, Conversations, Model Registry entries, or MCP integrations. | |
| 23 | +| [objectstack-api](./objectstack-api/SKILL.md) | Exposing server-side API surface — REST/GraphQL endpoints, auth, realtime, error envelopes. | |
| 24 | +| [objectstack-i18n](./objectstack-i18n/SKILL.md) | Authoring translation bundles, configuring locale fallback, or reading coverage reports. | |
| 25 | +| [objectstack-formula](./objectstack-formula/SKILL.md) | Writing CEL expressions — formula fields, predicates (validation / sharing / visibility), conditions, dynamic seed values. | |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## Skill anatomy |
| 30 | + |
| 31 | +``` |
| 32 | +skills/<skill-name>/ |
| 33 | +├── SKILL.md # frontmatter + prose guide |
| 34 | +└── references/ |
| 35 | + └── _index.md # pointers into @objectstack/spec sources |
| 36 | +``` |
| 37 | + |
| 38 | +`SKILL.md` frontmatter fields: |
| 39 | + |
| 40 | +| Field | Purpose | |
| 41 | +|:------|:--------| |
| 42 | +| `name` | Stable id (matches directory name). | |
| 43 | +| `description` | One paragraph — what the skill is for *and* what it is **not** for. | |
| 44 | +| `license` | `Apache-2.0`. | |
| 45 | +| `compatibility` | Minimum `@objectstack/spec` version. | |
| 46 | +| `metadata.domain` | One of: `platform`, `data`, `query`, `ui`, `automation`, `ai`, `api`, `i18n`, `formula`. | |
| 47 | +| `metadata.tags` | Short comma-separated keywords for retrieval. | |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## Conventions enforced across skills |
| 52 | + |
| 53 | +- **Zod first.** Never invent types — read `node_modules/@objectstack/spec/src/**/*.zod.ts`. |
| 54 | +- **Short object names** (`account`, `task`); no `namespace`, no `tableName`. |
| 55 | +- **CEL for all expressions** — predicates, conditions, schedules. Use the |
| 56 | + `F\`\``, `P\`\``, `cel\`\``, `cron\`\``, `tmpl\`\`` tagged templates from |
| 57 | + `@objectstack/spec`. Legacy `OLD` / `NEW` evaluate to `null` since M9.5. |
| 58 | +- **v5.0 vocabulary** — runtime workspace is `environment`, not `project`. |
| 59 | +- **Singular metadata type names** (`agent`, `view`, `flow`, …); REST resource |
| 60 | + collections are plural (`/api/v1/ai/agents`). |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## Cross-skill routing |
| 65 | + |
| 66 | +A few common decision points where the right skill isn't obvious: |
| 67 | + |
| 68 | +- **Lifecycle hooks on data vs. business automation** — object-level hooks |
| 69 | + (`beforeInsert`, etc.) live in **objectstack-data**; cross-record orchestration, |
| 70 | + approvals, and scheduled work live in **objectstack-automation**. |
| 71 | +- **Screen flows vs. views** — interactive wizards / multi-step forms are |
| 72 | + **automation** (screen flows). Static record / list / dashboard surfaces are |
| 73 | + **ui**. |
| 74 | +- **Any CEL expression** — load **objectstack-formula** alongside the host |
| 75 | + skill (data validations, automation guards, UI visibility, AI tool params). |
| 76 | +- **Kernel / plugin events vs. data lifecycle** — `PluginContext` lifecycle and |
| 77 | + `EventBus` belong to **objectstack-platform**; record-level hooks belong to |
| 78 | + **objectstack-data**. |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +## Related repositories |
| 83 | + |
| 84 | +- [`../objectui`](https://github.com/objectstack-ai/objectui) — Studio UI (separate repo). |
| 85 | +- [`../templates`](https://github.com/objectstack-ai/templates) — template library |
| 86 | + consumed by `create-objectstack` (separate repo). Scaffolds reference these |
| 87 | + skills; keep this index in sync when adding or renaming a skill. |
0 commit comments