Skip to content

Commit 7d391e0

Browse files
authored
Merge pull request #3374 from objectstack-ai/claude/third-party-skills-review-2r4sj1
skills: third-party developer review — fix fabricated/stale surface across all 9 skills
2 parents d419826 + 408d85c commit 7d391e0

49 files changed

Lines changed: 2471 additions & 1974 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/docs/ai/skills-reference.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ ObjectStack ships **9 domain-specific skills**. Each is self-contained — an AI
4545

4646
| # | Skill | Domain | Path | What it covers |
4747
| :--- | :--- | :--- | :--- | :--- |
48-
| 1 | [Platform](#platform) | `platform` | `skills/objectstack-platform/` | Bootstrap, configure, extend, and operate ObjectStack runtimes. Covers project setup (`defineStack`, drivers, adapters, scaffolding), plugin and service development (PluginContext, DI, kernel hooks like `kernel:ready` and `data:*`), and operations (CLI commands, migrations, deployment, test harnesses via LiteKernel). |
48+
| 1 | [Platform](#platform) | `platform` | `skills/objectstack-platform/` | Bootstrap, configure, extend, and operate ObjectStack runtimes. Covers project setup (`defineStack`, drivers, adapters, scaffolding), plugin and service development (PluginContext, DI, kernel hooks like `kernel:ready`), and operations (CLI commands, migrations, deployment, test harnesses via LiteKernel). |
4949
| 2 | [Data](#data) | `data` | `skills/objectstack-data/` | Design ObjectStack data schemas — objects, fields, field conditional rules, relationships, validations, indexes, lifecycle hooks, permissions, row-level security — and the seeds (`defineSeed()`) that load fixtures and reference data alongside them. |
50-
| 3 | [Query](#query) | `query` | `skills/objectstack-query/` | Construct ObjectQL queries — filters, sorting, pagination, aggregation, joins/expansion, window functions, and full-text search. |
50+
| 3 | [Query](#query) | `query` | `skills/objectstack-query/` | Construct ObjectQL queries — filters, sorting, pagination, aggregation, relation expansion, and full-text search. |
5151
| 4 | [UI](#ui) | `ui` | `skills/objectstack-ui/` | Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages (structured plus the HTML and React source-authoring tiers, ADR-0080/0081), Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`). |
52-
| 5 | [Automation](#automation) | `automation` | `skills/objectstack-automation/` | Design ObjectStack automation — Flows (visual logic), Workflows (declarative rules), Triggers, Approvals, scheduled jobs, and webhooks. |
53-
| 6 | [AI](#ai) | `ai` | `skills/objectstack-ai/` | Design ObjectStack AI agents, tools, skills, conversations, model registry entries, and MCP integrations. |
52+
| 5 | [Automation](#automation) | `automation` | `skills/objectstack-automation/` | Design ObjectStack automation — Flows (visual logic), Triggers, Approvals, state machines, scheduled jobs, and webhooks. |
53+
| 6 | [AI](#ai) | `ai` | `skills/objectstack-ai/` | Design ObjectStack AI skills, tools, knowledge sources, conversations, model registry entries, and MCP integrations. |
5454
| 7 | [API](#api) | `api` | `skills/objectstack-api/` | Design the server-side API surface that an ObjectStack runtime exposes — REST/GraphQL endpoints, auth providers, realtime channels, error envelopes, batch/versioning contracts. |
5555
| 8 | [i18n](#i18n) | `i18n` | `skills/objectstack-i18n/` | Author ObjectStack translation bundles — object/field labels, view text, app navigation strings, automation messages — and configure locale fallback, coverage reporting, and the per-locale source layout. |
5656
| 9 | [Formula](#formula) | `expression` | `skills/objectstack-formula/` | Author CEL expressions used across ObjectStack — formula fields, field conditional rules (`visibleWhen`, `readonlyWhen`, `requiredWhen`), validation / sharing / visibility predicates, flow conditions, and dynamic seed values. |
@@ -61,7 +61,7 @@ ObjectStack ships **9 domain-specific skills**. Each is self-contained — an AI
6161

6262
**Domain** `platform` · **Path** `skills/objectstack-platform/`
6363

64-
Bootstrap, configure, extend, and operate ObjectStack runtimes. Covers project setup (`defineStack`, drivers, adapters, scaffolding), plugin and service development (PluginContext, DI, kernel hooks like `kernel:ready` and `data:*`), and operations (CLI commands, migrations, deployment, test harnesses via LiteKernel).
64+
Bootstrap, configure, extend, and operate ObjectStack runtimes. Covers project setup (`defineStack`, drivers, adapters, scaffolding), plugin and service development (PluginContext, DI, kernel hooks like `kernel:ready`), and operations (CLI commands, migrations, deployment, test harnesses via LiteKernel).
6565

6666
Use when the user is writing `objectstack.config.ts`, building a plugin or driver, wiring a framework adapter, running `os` CLI commands, or planning deployment.
6767

@@ -89,7 +89,7 @@ Do not use for querying data (see objectstack-query) or for plugin / kernel hook
8989

9090
**Domain** `query` · **Path** `skills/objectstack-query/`
9191

92-
Construct ObjectQL queries — filters, sorting, pagination, aggregation, joins/expansion, window functions, and full-text search.
92+
Construct ObjectQL queries — filters, sorting, pagination, aggregation, relation expansion, and full-text search.
9393

9494
Use when the user is writing a query DSL expression, picking pagination strategy, or designing a list view's filter spec.
9595

@@ -117,11 +117,11 @@ Do not use for: data schema (see objectstack-data), interactive screen flows / w
117117

118118
**Domain** `automation` · **Path** `skills/objectstack-automation/`
119119

120-
Design ObjectStack automation — Flows (visual logic), Workflows (declarative rules), Triggers, Approvals, scheduled jobs, and webhooks.
120+
Design ObjectStack automation — Flows (visual logic), Triggers, Approvals, state machines, scheduled jobs, and webhooks.
121121

122-
Use when the user is adding `*.flow.ts` / `*.workflow.ts`, wiring an event-driven rule, or modelling an approval chain.
122+
Use when the user is adding `*.flow.ts`, wiring an event-driven rule, or modelling an approval chain.
123123

124-
Do not use for data lifecycle hooks at the object layer (see objectstack-data) or for kernel / plugin events (see objectstack-platform). CEL expressions in flow conditions / workflow predicates: load objectstack-formula alongside.
124+
Do not use for data lifecycle hooks at the object layer (see objectstack-data) or for kernel / plugin events (see objectstack-platform). CEL expressions in flow conditions / edge guards: load objectstack-formula alongside.
125125

126126
**Tags:** `flow`, `workflow`, `trigger`, `approval`, `state-machine`, `scheduled`, `webhook`
127127

@@ -131,9 +131,9 @@ Do not use for data lifecycle hooks at the object layer (see objectstack-data) o
131131

132132
**Domain** `ai` · **Path** `skills/objectstack-ai/`
133133

134-
Design ObjectStack AI agents, tools, skills, conversations, model registry entries, and MCP integrations.
134+
Design ObjectStack AI skills, tools, knowledge sources, conversations, model registry entries, and MCP integrations.
135135

136-
Use when the user is adding `*.agent.ts` / `*.tool.ts` / `*.skill.ts`, configuring an LLM provider, wiring agent tools, or designing an embedding/RAG flow on top of ObjectStack data.
136+
Use when the user is adding `*.skill.ts` / `*.tool.ts`, configuring an LLM provider, wiring agent tools, or indexing ObjectStack data as a knowledge source for RAG. Agents themselves are platform-internal (`ask` / `build`) — third parties extend them via skills and tools, not by authoring `*.agent.ts`.
137137

138138
Do not use for general LLM prompting questions unrelated to ObjectStack metadata.
139139

packages/spec/scripts/build-react-blocks-contract.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ function dataProps(schema: any, allow?: string[]): Prop[] {
7777
name,
7878
type: renderType(node),
7979
kind: 'data',
80-
required: required.includes(name),
80+
// z.toJSONSchema emits output-io semantics, where a `.default()`-carrying
81+
// prop is always present — so it lands in `required` even though an author
82+
// may omit it. A prop with a default is optional to WRITE, which is what
83+
// this contract documents; only default-less required props stay required.
84+
required: required.includes(name) && node?.default === undefined,
8185
description: clip(node?.description),
8286
}));
8387
}
@@ -101,7 +105,7 @@ const blocks = REACT_BLOCKS.map((b) => {
101105
const contract = {
102106
version: 2,
103107
adr: 'ADR-0081',
104-
source: 'GENERATED from packages/spec/src/ui/react-blocks.ts — data props from the spec zod schemas, binding/controlled/callback from the React overlay.',
108+
source: "GENERATED from the REACT_BLOCKS definition in the '@objectstack/spec/ui' module — data props from the spec zod schemas, binding/controlled/callback from the React overlay.",
105109
note: "Props each component accepts in kind:'react' page source. Reference blocks by their PascalCase tag. kind: data=declarative config (from the spec schema) · binding=connects to data · controlled=React state · callback=React function. These blocks are for DATA. Live data: const adapter = useAdapter(); adapter.find/findOne/create/update. STYLING (ADR-0065) — a page's source is runtime metadata, so the console's build-time Tailwind NEVER scans it: utility classNAMES silently produce no CSS. Do NOT use Tailwind className in page source. (a) Layout/chrome: inline style={} with hsl(var(--token)) theme colors — e.g. color:'hsl(var(--foreground))', background:'hsl(var(--card))', border:'1px solid hsl(var(--border))', and px/flex for layout. (b) Overlays: render <ObjectForm formType='drawer'|'modal' open onOpenChange> (a pre-styled Sheet/Dialog) — never hand-roll a fixed inset-0 backdrop.",
106110
blocks,
107111
};
@@ -112,7 +116,7 @@ const esc = (s: string) => String(s).replace(/\|/g, '\\|');
112116
const L: string[] = [];
113117
L.push('---');
114118
L.push('title: React-tier component contract');
115-
L.push("description: Props each injected component accepts in kind:'react' page source (ADR-0081). GENERATED from packages/spec/src/ui/react-blocks.ts — do not edit by hand.");
119+
L.push("description: Props each injected component accepts in kind:'react' page source (ADR-0081). GENERATED from the REACT_BLOCKS definition in the '@objectstack/spec/ui' module — do not edit by hand.");
116120
L.push('---');
117121
L.push('');
118122
L.push('{/* GENERATED by packages/spec/scripts/build-react-blocks-contract.ts — do not edit. */}');

packages/spec/scripts/build-skill-references.ts

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const SKILL_MAP: Record<string, string[]> = {
5353
'objectstack-query': [
5454
'data/query.zod.ts',
5555
'data/filter.zod.ts',
56+
'data/date-macros.zod.ts',
5657
],
5758
'objectstack-ai': [
5859
'ai/agent.zod.ts',
@@ -62,6 +63,8 @@ const SKILL_MAP: Record<string, string[]> = {
6263
'ai/conversation.zod.ts',
6364
'ai/mcp.zod.ts',
6465
'ai/embedding.zod.ts',
66+
'ai/knowledge-source.zod.ts',
67+
'ai/knowledge-document.zod.ts',
6568
'ai/usage.zod.ts',
6669
],
6770
'objectstack-api': [
@@ -78,11 +81,13 @@ const SKILL_MAP: Record<string, string[]> = {
7881
'objectstack-automation': [
7982
'automation/flow.zod.ts',
8083
'automation/trigger-registry.zod.ts',
84+
'automation/time-relative-trigger.zod.ts',
8185
'automation/approval.zod.ts',
8286
'automation/state-machine.zod.ts',
8387
'automation/execution.zod.ts',
8488
'automation/webhook.zod.ts',
8589
'automation/node-executor.zod.ts',
90+
'data/validation.zod.ts',
8691
],
8792
'objectstack-ui': [
8893
'ui/view.zod.ts',
@@ -95,6 +100,7 @@ const SKILL_MAP: Record<string, string[]> = {
95100
'ui/component.zod.ts',
96101
'ui/report.zod.ts',
97102
'ui/theme.zod.ts',
103+
'ui/dataset.zod.ts',
98104
],
99105
'objectstack-platform': [
100106
// project setup (was objectstack-quickstart)
@@ -115,6 +121,10 @@ const SKILL_MAP: Record<string, string[]> = {
115121
'system/translation.zod.ts',
116122
'ui/i18n.zod.ts',
117123
],
124+
'objectstack-formula': [
125+
'shared/expression.zod.ts',
126+
'data/date-macros.zod.ts',
127+
],
118128
};
119129

120130
// ── Import resolver ──────────────────────────────────────────────────────────
@@ -174,7 +184,13 @@ function resolveAll(entryFiles: string[]): { files: string[]; missing: string[]
174184
if (!visited.has(dep)) queue.push(dep);
175185
}
176186
}
177-
return { files: [...visited].sort(), missing };
187+
// Only `src/**/*.zod.ts` ships in the published package (`files` allowlist in
188+
// package.json) — a pointer to any other src file 404s in a consumer's
189+
// node_modules (#skills-review: lazy-schema.ts, visibility.ts,
190+
// public-auth-features.ts all leaked through transitive imports). Traverse
191+
// through non-shipping files (they may import shipping ones) but never list them.
192+
const shipped = [...visited].filter((rel) => rel.endsWith('.zod.ts'));
193+
return { files: shipped.sort(), missing };
178194
}
179195

180196
// ── JSDoc description extractor ──────────────────────────────────────────────
@@ -213,8 +229,9 @@ function generateIndex(skillName: string, coreFiles: string[], allFiles: string[
213229
const lines: string[] = [
214230
`# ${skillName} — Schema References`,
215231
'',
216-
'> **Auto-generated** by `packages/spec/scripts/build-skill-references.ts`.',
217-
`> Do not edit — re-run \`pnpm --filter ${SPEC_PKG} run gen:skill-refs\` to update.`,
232+
'> **Auto-generated** — do not edit. Maintainers regenerate this in the',
233+
`> framework repo with \`pnpm --filter ${SPEC_PKG} run gen:skill-refs\``,
234+
'> (not runnable in an installed app).',
218235
'',
219236
`Schemas live in the published \`${SPEC_PKG}\` package. Read them directly`,
220237
'from `node_modules` — there is no local copy in the skill bundle.',
@@ -246,8 +263,10 @@ function generateIndex(skillName: string, coreFiles: string[], allFiles: string[
246263
` \`.describe()\` text, enums, and refinements.`,
247264
`2. TypeScript types: \`import type { … } from '${SPEC_PKG}'\` (or the`,
248265
' matching subpath export).',
249-
'3. Runtime values: `import { … } from \'' + SPEC_PKG + '\'` — the package',
250-
' re-exports every schema and helper.',
266+
'3. Runtime values: import from the **matching subpath** shown in the',
267+
` schema's directory (\`'${SPEC_PKG}/data'\`, \`'${SPEC_PKG}/ai'\`, …).`,
268+
' The root barrel re-exports the common factories, but not every symbol —',
269+
' when in doubt, use the subpath.',
251270
'',
252271
);
253272

scripts/role-word-baseline.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
"content/docs/releases/v14.mdx": 5,
3535
"content/docs/releases/v16.mdx": 5,
3636
"content/docs/ui/forms.mdx": 3,
37-
"skills/objectstack-ai/SKILL.md": 8,
37+
"skills/objectstack-ai/SKILL.md": 6,
3838
"skills/objectstack-api/SKILL.md": 1,
3939
"skills/objectstack-automation/SKILL.md": 1,
40-
"skills/objectstack-data/SKILL.md": 8,
40+
"skills/objectstack-data/SKILL.md": 4,
4141
"skills/objectstack-data/rules/relationships.md": 1,
42-
"skills/objectstack-platform/SKILL.md": 3,
42+
"skills/objectstack-platform/SKILL.md": 2,
4343
"skills/objectstack-query/rules/filters.md": 9,
4444
"skills/objectstack-ui/SKILL.md": 2
4545
}

skills/README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# ObjectStack Skills
22

33
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/...`.
4+
working in **any ObjectStack app** — this monorepo *and* third-party projects.
5+
`npm create objectstack` installs them into new apps automatically; existing
6+
projects add (or update) the bundle with:
7+
8+
```bash
9+
npx skills add objectstack-ai/framework/skills --all
10+
```
11+
12+
The `/skills` subpath matters: it is the published catalog boundary — pointing
13+
the skills CLI at the repo root would also pick up repo-internal skills (#3101).
14+
15+
Each skill is self-contained: a `SKILL.md` with YAML frontmatter, plus a
16+
`references/_index.md` that points into the authoritative Zod sources in
17+
`node_modules/@objectstack/spec/src/...` (the published `@objectstack/spec`
18+
package ships these `.zod.ts` sources, so the pointers resolve in consumer
19+
apps too).
720

821
> **Always read the spec source for exact field shapes.** Skills give shape and
922
> intent; the Zod schemas are the truth.
@@ -16,12 +29,12 @@ authoritative Zod sources in `node_modules/@objectstack/spec/src/...`.
1629

1730
| Skill | Domain | What it covers |
1831
|:------|:-------|:---------------|
19-
| [Platform](./objectstack-platform/SKILL.md) | `platform` | Bootstrap, configure, extend, and operate ObjectStack runtimes. Covers project setup (`defineStack`, drivers, adapters, scaffolding), plugin and service development (PluginContext, DI, kernel hooks like `kernel:ready` and `data:*`), and operations (CLI commands, migrations, deployment, test harnesses via LiteKernel). |
32+
| [Platform](./objectstack-platform/SKILL.md) | `platform` | Bootstrap, configure, extend, and operate ObjectStack runtimes. Covers project setup (`defineStack`, drivers, adapters, scaffolding), plugin and service development (PluginContext, DI, kernel hooks like `kernel:ready`), and operations (CLI commands, migrations, deployment, test harnesses via LiteKernel). |
2033
| [Data](./objectstack-data/SKILL.md) | `data` | Design ObjectStack data schemas — objects, fields, field conditional rules, relationships, validations, indexes, lifecycle hooks, permissions, row-level security — and the seeds (`defineSeed()`) that load fixtures and reference data alongside them. |
21-
| [Query](./objectstack-query/SKILL.md) | `query` | Construct ObjectQL queries — filters, sorting, pagination, aggregation, joins/expansion, window functions, and full-text search. |
34+
| [Query](./objectstack-query/SKILL.md) | `query` | Construct ObjectQL queries — filters, sorting, pagination, aggregation, relation expansion, and full-text search. |
2235
| [UI](./objectstack-ui/SKILL.md) | `ui` | Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages (structured plus the HTML and React source-authoring tiers, ADR-0080/0081), Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`). |
23-
| [Automation](./objectstack-automation/SKILL.md) | `automation` | Design ObjectStack automation — Flows (visual logic), Workflows (declarative rules), Triggers, Approvals, scheduled jobs, and webhooks. |
24-
| [AI](./objectstack-ai/SKILL.md) | `ai` | Design ObjectStack AI agents, tools, skills, conversations, model registry entries, and MCP integrations. |
36+
| [Automation](./objectstack-automation/SKILL.md) | `automation` | Design ObjectStack automation — Flows (visual logic), Triggers, Approvals, state machines, scheduled jobs, and webhooks. |
37+
| [AI](./objectstack-ai/SKILL.md) | `ai` | Design ObjectStack AI skills, tools, knowledge sources, conversations, model registry entries, and MCP integrations. |
2538
| [API](./objectstack-api/SKILL.md) | `api` | Design the server-side API surface that an ObjectStack runtime exposes — REST/GraphQL endpoints, auth providers, realtime channels, error envelopes, batch/versioning contracts. |
2639
| [i18n](./objectstack-i18n/SKILL.md) | `i18n` | Author ObjectStack translation bundles — object/field labels, view text, app navigation strings, automation messages — and configure locale fallback, coverage reporting, and the per-locale source layout. |
2740
| [Formula](./objectstack-formula/SKILL.md) | `expression` | Author CEL expressions used across ObjectStack — formula fields, field conditional rules (`visibleWhen`, `readonlyWhen`, `requiredWhen`), validation / sharing / visibility predicates, flow conditions, and dynamic seed values. |
@@ -37,8 +50,13 @@ authoritative Zod sources in `node_modules/@objectstack/spec/src/...`.
3750
```
3851
skills/<skill-name>/
3952
├── SKILL.md # frontmatter + prose guide
40-
└── references/
41-
└── _index.md # pointers into @objectstack/spec sources
53+
├── references/
54+
│ └── _index.md # generated pointers into @objectstack/spec sources
55+
│ # (pnpm --filter @objectstack/spec gen:skill-refs — do not hand-edit)
56+
├── rules/ # (optional) detailed per-topic rule files linked from SKILL.md
57+
├── contracts/ # (optional) generated machine-readable contracts (e.g. react-blocks)
58+
└── evals/ # skill eval fixtures — used by maintainers to score the skill,
59+
# inert (but harmless) in consumer installs
4260
```
4361

4462
`SKILL.md` frontmatter fields:

0 commit comments

Comments
 (0)