Skip to content

Commit fd00ad9

Browse files
committed
docs(getting-started): verify tutorial code end-to-end; add per-domain skills catalog
Every load-bearing claim on build-with-claude-code and your-first-project was re-verified in a freshly scaffolded 16.0.0-rc.1 project: the three tutorial example files pass os validate verbatim, the bare-reference error text matches the real gate output word-for-word, the curl flow (sign-in → create → select/sort/top query) runs as written, and the MCP endpoint/tool table matches the registered tool surface. build-with-claude-code: - prerequisites no longer claim pnpm is required (npm suffices; matches your-first-project); stale 'Create ObjectStack v6.x' banner replaced with the current scaffolder output incl. Next steps - document that the agent wires new files into objectstack.config.ts (actions:/views: arrays + objects barrel) — previously unmentioned, and the first thing to check when authored metadata doesn't show up - new section 'Beyond the first app — one skill per metadata domain': maps all nine skills to the metadata domain they drive with a copy-paste example prompt each, plus the two habits that keep the loop reliable (validate gates every domain; re-run skills add after spec upgrades) - surface the os lint --score quality rubric in the iterate step your-first-project: - surface os lint --score after the validate gate - new section '7. Hand the project to your agent' bridging the manual path to the skills-driven loop with a cross-domain example prompt and a link to the per-domain catalog Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Kj2MJEPXoUXC4LiC3XYJc
1 parent 7d391e0 commit fd00ad9

2 files changed

Lines changed: 79 additions & 5 deletions

File tree

content/docs/getting-started/build-with-claude-code.mdx

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ hand-edits generated glue, and no metadata mistake reaches the browser unchecked
4141

4242
| You need | Why |
4343
|:---|:---|
44-
| **Node.js 18+** and **pnpm** | Runs the scaffolder and the dev server (see [prerequisites](/docs/getting-started#prerequisites)). |
44+
| **Node.js 18+** and npm (pnpm / yarn / bun also work) | Runs the scaffolder and the dev server (see [prerequisites](/docs/getting-started#prerequisites)). |
4545
| **[Claude Code](https://claude.com/claude-code)** (or Cursor / Copilot) | Your agent reads `AGENTS.md` + the ObjectStack skills and authors the metadata. |
4646

4747
## 1. Scaffold the project
@@ -63,10 +63,6 @@ The scaffolder does more than copy files. It:
6363
`npm run validate` after every metadata change*.
6464

6565
```
66-
╔═══════════════════════════════════╗
67-
║ ◆ Create ObjectStack v6.x ║
68-
╚═══════════════════════════════════╝
69-
7066
◆ New Environment
7167
────────────────────────────────────────
7268
Environment: support-desk
@@ -75,6 +71,12 @@ The scaffolder does more than copy files. It:
7571
7672
→ Installing AI skills for your coding agent...
7773
✓ Environment created!
74+
75+
Next steps:
76+
cd support-desk
77+
npm install
78+
npm run dev # Start development server
79+
npm run validate # Verify metadata: schema + predicates + bindings
7880
```
7981

8082
This is why AI authoring is reliable rather than a guessing game: **the agent
@@ -192,9 +194,20 @@ export const TicketViews = defineView({
192194
});
193195
```
194196

197+
The agent also **wires the new files into `objectstack.config.ts`** — the object
198+
through the `src/objects/index.ts` barrel, and the action and view via the
199+
`actions:` / `views:` arrays in `defineStack()`. There is no filename-suffix
200+
magic: metadata exists in the app only if the config imports it, so if a
201+
freshly-authored action doesn't show up, the wiring is the first thing to check.
202+
195203
This is the same metadata that powers the REST API, the Console UI, **and the MCP
196204
tools exposed to AI** — define it once, and ObjectStack derives the rest.
197205

206+
<Callout type="info">
207+
Every example on this page was authored against `@objectstack/spec` 16.x and
208+
passes `os validate` verbatim in a freshly scaffolded project.
209+
</Callout>
210+
198211
## 4. The gate: `os validate` catches AI mistakes
199212

200213
The most common way AI-authored metadata goes wrong is a mistake that **type-checks
@@ -289,6 +302,43 @@ tightening on each pass until the app is right. See
289302
[How AI development works](/docs/getting-started/how-ai-development-works) for why
290303
this stays fast and safe as the app grows.
291304

305+
<Callout type="tip">
306+
Beyond the pass/fail gate there's a **quality rubric**: `npx os lint --score`
307+
prints a 0–100 metadata-quality score (relationship patterns, missing options,
308+
roll-ups, name fields). Ask the agent to keep the project lint-clean — "run
309+
`os lint` and fix the warnings" is a perfectly good prompt.
310+
</Callout>
311+
312+
## Beyond the first app — one skill per metadata domain
313+
314+
The loop above never changes; what changes is **which skill the agent loads**.
315+
The bundle ships nine, one per metadata domain, and the agent picks by task
316+
context (the trigger table lives in your project's `AGENTS.md`). To grow the
317+
support desk into a full application, keep describing — each row is a real
318+
prompt you can give verbatim:
319+
320+
| You want | Skill the agent loads | Say something like |
321+
|:---|:---|:---|
322+
| Data model — objects, fields, relationships, validations, seeds | `objectstack-data` | "Add an `account` object and link tickets to it with a required lookup. Seed three demo accounts." |
323+
| Queries & reports over records | `objectstack-query` | "Show me the count of open tickets per priority, using an aggregation." |
324+
| Views, dashboards, apps, record pages | `objectstack-ui` | "Add a dashboard with a metric for open tickets and a bar chart of tickets by priority." |
325+
| Business automation — flows, approvals, schedules | `objectstack-automation` | "Every day at 9:00, escalate tickets that have been open more than 48 hours." |
326+
| Permissions & row-level security | `objectstack-data` (security sections) | "Members should only see their own tickets; support managers see everything." |
327+
| Formula / conditional-field logic (CEL) | `objectstack-formula` | "Make `resolved_at` required and visible only when status is resolved." |
328+
| AI agents & tools inside your app | `objectstack-ai` | "Add an AI skill that triages new tickets into a priority." |
329+
| REST/auth surface tuning | `objectstack-api` | "Restrict the ticket API to read-only for non-members." |
330+
| Translations | `objectstack-i18n` | "Add a zh-CN translation bundle for the ticket object and app navigation." |
331+
332+
Two habits keep this reliable as the app grows:
333+
334+
- **The gate applies to every domain.** Flows, dashboards, permissions, and
335+
translations all go through the same `npm run validate` — the agent should run
336+
it after each change, exactly as `AGENTS.md` instructs.
337+
- **Keep the skills current.** After upgrading `@objectstack/spec`, re-run
338+
`npx skills add objectstack-ai/framework/skills --all` so the agent authors
339+
against the schemas you actually run. The full catalog is documented in the
340+
[AI Skills Reference](/docs/ai/skills-reference).
341+
292342
## 7. Your app is natively AI-operable (MCP)
293343

294344
Here's the payoff that a hand-built CRUD app doesn't give you for free: because

content/docs/getting-started/your-first-project.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ npm run validate
240240
bindings — the classes of mistakes that otherwise fail *silently* at runtime.
241241
See [Validating Metadata](/docs/getting-started/validating-metadata).
242242

243+
Beyond pass/fail, `npx os lint --score` grades the data model 0–100 against the
244+
platform's design conventions (relationship patterns, missing select options,
245+
roll-ups, name fields) — a quick health check as the model grows.
246+
243247
## 6. Build the deployable artifact
244248

245249
```bash
@@ -258,6 +262,26 @@ Database URL, auth secret, and environment identity stay *outside* the
258262
artifact and are injected at boot via flags or `OS_*` environment variables —
259263
which is exactly what makes it container-friendly.
260264

265+
## 7. Hand the project to your agent
266+
267+
You just did by hand what an agent does in seconds — and the scaffolder already
268+
prepared the project for that handoff: the **skills bundle** is installed (step
269+
1.3) and `AGENTS.md` routes each task to the right skill and enforces the
270+
validate gate. Open the project in Claude Code (or Cursor / Copilot) and
271+
describe the next feature instead of typing it:
272+
273+
> Add a `status` filter to the note list view, a dashboard with a metric of
274+
> published notes, and a daily flow that archives notes older than 90 days.
275+
> Run `npm run validate` when done.
276+
277+
Each of those lands in a different metadata domain (UI, dashboards,
278+
automation) — the agent loads the matching skill per task. The full loop, and a
279+
per-domain prompt catalog, is on
280+
[Build with Claude Code](/docs/getting-started/build-with-claude-code#beyond-the-first-app--one-skill-per-metadata-domain).
281+
If you upgrade `@objectstack/spec` later, re-run
282+
`npx skills add objectstack-ai/framework/skills --all` to keep the agent in
283+
sync with the schemas you run.
284+
261285
## Next steps
262286

263287
<Cards>

0 commit comments

Comments
 (0)