Skip to content

Commit 5bb7a65

Browse files
os-zhuangclaude
andauthored
docs: reframe getting-started around the AI build/verify loop (#2666)
* chore: bump objectui to c27bd3264f39 feat(studio): per-object API / Hooks / Actions tabs + Data-pillar polish (#2330) objectui@c27bd3264f394bec5f5f71326118bfb115fbe884 * docs: reframe getting-started around the AI build/verify loop Center the docs on the actual ObjectStack workflow: an AI agent (Claude Code) authors typed metadata, a validation gate catches silent-at-runtime mistakes, the human verifies in the visual Console, and the built app is itself AI-operable over MCP. - New flagship tutorial "Build with Claude Code" — the whole loop on a live-built Support Desk app, grounded in real `os` CLI output. - New concept page "How AI Development Works" — why the loop is fast and safe (skills+AGENTS.md, os validate, contract-first, draft-gating, worktree). - Repurpose the old hand-authoring Quick Start into "Anatomy of an ObjectStack App" (read-to-verify); keep the /quick-start slug so inbound links survive. - Front-load the "your app is an MCP server" story: env-var value-prop, a dedicated api/index section + request-path diagram, deployment pointer. - Reframe by real development layering (Data / Automation / Interface / Access / AI) instead of the ObjectQL/ObjectOS/ObjectUI protocol trinity. - Add Mermaid diagrams (build loop, AI architecture, protocol stack, MCP request path) using the site's existing Mermaid support. - Docs-site chrome: drop the meaningless "Documentation" self-link, fix the UI Engine icon (deprecated `Layout` -> `LayoutDashboard`), hide the single-language switcher. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f85635e commit 5bb7a65

21 files changed

Lines changed: 803 additions & 192 deletions

apps/docs/app/[lang]/docs/layout.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ export default async function Layout({
1313
const { lang } = await params;
1414

1515
return (
16-
<DocsLayout
17-
tree={source.pageTree[lang]}
16+
<DocsLayout
17+
tree={source.pageTree[lang]}
1818
{...baseOptions()}
19-
i18n
2019
>
2120
{children}
2221
</DocsLayout>

apps/docs/lib/layout.shared.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ export function baseOptions(): BaseLayoutProps {
2222
</div>
2323
),
2424
},
25-
links: [
26-
{
27-
text: 'Documentation',
28-
url: '/docs/',
29-
active: 'nested-url',
30-
},
31-
],
3225
githubUrl: `https://github.com/${gitConfig.user}/${gitConfig.repo}`,
3326
};
3427
}

content/docs/ai/actions-as-tools.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: Expose declarative Action metadata as AI-callable tools with explic
77

88
Part of the [AI module](/docs/ai) — how existing Action metadata becomes LLM-callable, and the guardrails around it.
99

10+
This is what makes the app you built **AI-operable**: connect an MCP client (Claude Code, Cursor, …) and your business Actions become callable tools — so an agent can "resolve this ticket" or "convert this lead" through the same logic and permissions as the Console button.
11+
1012
Any business `Action` you already have — a `script` action or a Flow — can be
1113
reached by an LLM as a callable tool. On the **open edition** this happens
1214
through [`@objectstack/mcp`](/docs/ai): your own AI (Claude, Cursor, any MCP

content/docs/ai/agents.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ skills are **typed metadata**: you author them as source with `defineAgent` /
1111
external AI client (Claude, Cursor, a local model — any MCP client) reaches your
1212
objects, queries, and business **Actions** through `@objectstack/mcp` (BYO-AI),
1313
all governed by RLS. This page describes that metadata and the `AgentSchema` it
14-
validates against.
14+
validates against. Like the rest of your metadata, you don't hand-write agents —
15+
Claude Code authors them from the `objectstack-ai` [skill](/docs/ai/skills); you
16+
`os validate` and test the tools in the Console
17+
([the loop](/docs/getting-started/build-with-claude-code)).
1518

1619
<Callout type="info">
1720
**Cloud / Enterprise — the in-product chat runtime.** The authoring format on

content/docs/ai/index.mdx

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ description: Complete guide to leveraging AI agents, RAG pipelines, and intellig
77

88
AI in ObjectStack is a **cross-protocol capability layer**: agents, tools, and knowledge retrieval sit on top of the same objects, actions, permissions, and automation that power the rest of the platform. This module covers the architecture and each of its moving parts.
99

10+
<Callout type="info">
11+
**Two different "AI" stories — don't confuse them:**
12+
- **AI *builds* your app** (authoring) — Claude Code writes the typed metadata; you verify in the Console. That's the [Build with Claude Code](/docs/getting-started/build-with-claude-code) workflow, in *Get Started* — a different thing from this section.
13+
- **Your app *exposes/uses* AI** (runtime) — agents, tools, RAG, natural-language queries, and an MCP server that let an AI operate the app you built, under the same permissions. **This section covers that.**
14+
</Callout>
15+
1016
<Callout type="info">
1117
**The open framework does AI bring-your-own-AI** — your keys, your models, zero platform AI cost. Everything on this page is part of the open edition unless a section is explicitly marked **cloud / Enterprise**:
1218

@@ -34,20 +40,11 @@ The **cloud / Enterprise** tier adds an in-product chat *runtime* on top of thes
3440

3541
ObjectStack provides a comprehensive AI platform:
3642

37-
```
38-
┌─────────────────────────────────────┐
39-
│ AI Agents │ ← Persona + skills/tools
40-
│ Skills & Tools │ ← Actions/Flows exposed to the LLM
41-
├─────────────────────────────────────┤
42-
│ Knowledge Protocol │ ← search_knowledge via adapters
43-
│ - memory / ragflow / custom │
44-
│ - Permission-aware retrieval │
45-
├─────────────────────────────────────┤
46-
│ Model Registry │ ← LLM management
47-
│ - openai, azure_openai, │
48-
│ anthropic, local │
49-
│ - Token accounting / cost │
50-
└─────────────────────────────────────┘
43+
```mermaid
44+
flowchart TD
45+
A["<b>AI Agents</b> — persona + skills/tools"] --> T["<b>Skills &amp; Tools</b><br/>Actions / Flows exposed to the LLM"]
46+
T --> K["<b>Knowledge Protocol</b> — search_knowledge via adapters<br/>memory / ragflow / custom · permission-aware retrieval"]
47+
K --> R["<b>Model Registry</b> — LLM management<br/>openai · azure_openai · anthropic · local · token accounting / cost"]
5148
```
5249

5350
---

content/docs/ai/skills.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Bot, Brain, Cpu, Database, Globe, Layout, Shield, Workflow, Wrench, Lan
77

88
# AI Skills System
99

10-
ObjectStack introduces a **Skills System** — structured, domain-specific knowledge modules that enable AI assistants (GitHub Copilot, Claude Code, Cursor, etc.) to understand and generate protocol-compliant code.
10+
ObjectStack introduces a **Skills System** — structured, domain-specific knowledge modules that enable AI assistants (GitHub Copilot, Claude Code, Cursor, etc.) to understand and generate protocol-compliant code. Skills are what make [building with Claude Code](/docs/getting-started/build-with-claude-code) reliable: they teach the agent the protocol's rules up front, so it authors correct metadata instead of guessing.
1111

1212
<Callout type="info">
1313
Skills are **not runtime code**. They are machine-readable knowledge definitions that teach AI assistants the ObjectStack protocol — its schemas, patterns, constraints, and best practices.
@@ -186,6 +186,10 @@ Read skills/objectstack-query/SKILL.md and help me build a query
186186
that filters opportunities by stage and aggregates revenue by quarter.
187187
```
188188

189+
For the end-to-end workflow — scaffold, let Claude Code author the metadata,
190+
validate, and verify in the Console — follow
191+
[Build with Claude Code](/docs/getting-started/build-with-claude-code).
192+
189193
### With Cursor
190194

191195
Add the skill files to your Cursor rules or reference them in prompts:
@@ -224,4 +228,4 @@ The `evals/` directory in each skill is reserved for test cases that validate an
224228
- [AI Skills Reference](/docs/ai/skills-reference) — Detailed guide to each skill with usage examples
225229
- [AI Capabilities](/docs/ai) — AI agents, RAG pipelines, and intelligent automation
226230
- [Plugin Development](/docs/plugins/development) — Build custom plugins
227-
- [Quick Start](/docs/getting-started/quick-start) — Build your first ObjectStack app
231+
- [Build with Claude Code](/docs/getting-started/build-with-claude-code) — Build your first ObjectStack app with an agent

content/docs/api/index.mdx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,40 @@ ObjectStack exposes a fully typed REST API. All endpoints use JSON request/respo
2323
**Base URL**: Configurable, defaults to `/api/v1`. All paths below are relative to the base URL.
2424
</Callout>
2525

26+
## Your app as an MCP server
27+
28+
REST and GraphQL are how *code* consumes your app. **MCP is how *AI* consumes it.**
29+
Because every object and action is typed metadata, ObjectStack can expose the whole app
30+
as a [Model Context Protocol](https://modelcontextprotocol.io) server — so an AI client
31+
(Claude Code, Claude Desktop, Cursor, a local model) can inspect and *operate* the app
32+
you built, under the same permissions and RLS as the UI. Enable it with
33+
`OS_MCP_SERVER_ENABLED=true` (see [environment variables](/docs/deployment/environment-variables#mcp-server)).
34+
35+
The generated tools mirror the surfaces you already defined:
36+
`list_objects` / `describe_object` (discover the schema), `query_records` / `get_record`
37+
(read), `create_record` / `update_record` / `delete_record` (write), and
38+
`list_actions` / `run_action` (invoke your business actions by name). Every call runs as
39+
the caller — RBAC, RLS, and field-level security all apply.
40+
41+
```mermaid
42+
sequenceDiagram
43+
participant AI as AI client (Claude / Cursor)
44+
participant MCP as MCP server (@objectstack/mcp)
45+
participant Eng as Action / ObjectQL engine
46+
participant Sec as RBAC · RLS · FLS
47+
participant DB as Data
48+
49+
AI->>MCP: run_action("resolve", { recordId })
50+
MCP->>Eng: dispatch as the caller's principal
51+
Eng->>Sec: check permissions on this record
52+
Sec-->>Eng: allowed (or denied — fail-closed)
53+
Eng->>DB: apply the change
54+
DB-->>AI: result, same as the Console would return
55+
```
56+
57+
See [Actions as Tools](/docs/ai/actions-as-tools) for the `run_action` bridge and the
58+
[MCP reference](/docs/references/ai/mcp) for binding external MCP servers into your agents.
59+
2660
## What's in this module
2761

2862
- [Data API](/docs/api/data-api) — CRUD, batch operations, record cloning, and analytics queries

content/docs/concepts/architecture.mdx

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ import { Database, Layout, Cpu, ArrowRight, CheckCircle, Workflow, Bot, Cloud }
99

1010
The architecture is built on foundational protocols that work together as a unified system:
1111

12+
<Callout type="info">
13+
**This is the engine-level view.** When you *build*, you work by area — data,
14+
automation, interface, access, AI (see [What you build](/docs/getting-started/quick-start#what-you-build)).
15+
This page zooms one level down, into the runtime engines that implement those areas:
16+
**ObjectQL** (data), **ObjectOS** (control — automation, access, governance), and
17+
**ObjectUI** (interface). You rarely think in these three while building; they're the
18+
machinery underneath.
19+
</Callout>
20+
1221
<Cards>
1322
<Card
1423
icon={<Database />}
@@ -48,25 +57,22 @@ Traditional applications tightly couple data, business logic, and presentation.
4857

4958
ObjectStack enforces **Separation of Concerns** through protocol boundaries:
5059

60+
```mermaid
61+
flowchart TD
62+
UI["<b>UI Protocol &amp; AI Protocol</b><br/>Apps · Views · Dashboards · Agents · RAG<br/><i>How do users and agents interact?</i>"]
63+
OS["<b>System · Automation · Cloud Protocol</b><br/>Auth · Permissions · Orchestration · Multi-tenancy<br/><i>Who / what can do what, when, and where?</i>"]
64+
DATA["<b>Data Protocol</b><br/>Objects · Fields · Queries · Drivers<br/><i>What is the data structure?</i>"]
65+
UI -->|Interface| OS
66+
OS -->|Control| DATA
5167
```
52-
┌───────────────────────────────────────────────────────────┐
53-
│ UI Protocol & AI Protocol │
54-
│ Apps, Views, Dashboards, Agents, RAG │
55-
│ "How do users and agents interact?" │
56-
└───────────────────────────┬───────────────────────────────┘
57-
│ Interface
58-
┌───────────────────────────┴───────────────────────────────┐
59-
│ System Protocol & Automation Protocol & Cloud Protocol │
60-
│ Auth, Permissions, Orchestration, Multi-tenancy │
61-
│ "Who/What can do what, when, and where?" │
62-
└───────────────────────────┬───────────────────────────────┘
63-
│ Control
64-
┌───────────────────────────┴───────────────────────────────┐
65-
│ Data Protocol │
66-
│ Objects, Fields, Queries, Drivers │
67-
│ "What is the data structure?" │
68-
└───────────────────────────────────────────────────────────┘
69-
```
68+
69+
<Callout type="info">
70+
**Who writes this?** In practice, Claude Code authors across every area from your
71+
description — data (objects), automation (flows), access (permissions), and interface
72+
(views, apps) — guided by the matching [skills](/docs/ai/skills). Each passes
73+
`os validate` before you review it in the Console. See
74+
[How AI Development Works](/docs/getting-started/how-ai-development-works).
75+
</Callout>
7076

7177
## Layer 1: ObjectQL (Data Protocol)
7278

content/docs/concepts/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,5 +187,5 @@ ObjectStack enforces strict naming rules for consistency:
187187
## Next Steps
188188

189189
- [Architecture](/docs/concepts/architecture) — How the protocol layers work together
190-
- [Quick Start](/docs/getting-started/quick-start) — Build your first app in 5 minutes
190+
- [Build with Claude Code](/docs/getting-started/build-with-claude-code) — Build your first app end-to-end with an agent
191191
- [Glossary](/docs/getting-started/glossary) — Key terminology

content/docs/concepts/metadata-driven.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ import { Database, Code, Link, Laptop } from 'lucide-react';
99

1010
Metadata-driven development is a paradigm shift where **business intent is defined by declarative, analyzable metadata instead of scattered imperative code.**
1111

12+
<Callout type="info">
13+
This is also what makes ObjectStack **AI-native**: because the whole app is a few hundred
14+
lines of typed, analyzable metadata — not tens of thousands of lines of glue — it fits in
15+
an agent's context window. Claude Code authors it, `os validate` catches mistakes, and you
16+
verify in the Console. See [How AI Development Works](/docs/getting-started/how-ai-development-works).
17+
</Callout>
18+
1219
## The Problem with Code-First
1320

1421
In traditional development, the "Intent" (e.g., *"This field is a required email address"*) is scattered across multiple layers:

0 commit comments

Comments
 (0)