Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions content/docs/getting-started/build-with-claude-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ The thing you end up with isn't just an app — it's an app that AI can *operate
because the same metadata generates an MCP server.

<Callout type="info">
Want to understand the pieces the agent writes before you review them?
[Anatomy of an ObjectStack App](/docs/getting-started/quick-start) is a tour of
the metadata — objects, actions, views — and how to read it. This page is the
workflow; that one is the map.
**The agent path** from [Start here](/docs/getting-started): an agent writes the
app, and you verify it. Want to write it by hand and understand every file
instead → [Your First Project](/docs/getting-started/your-first-project). To
understand the pieces the agent writes before you review them, keep
[Anatomy of an ObjectStack App](/docs/getting-started/quick-start) beside this
page: this page is the workflow; that one is the map.
</Callout>

## The build loop
Expand Down Expand Up @@ -155,8 +157,10 @@ export const ResolveTicketAction = defineAction({
label: 'Resolve',
objectName: 'support_desk_ticket',
icon: 'check-circle',
type: 'script',
target: 'resolveTicket',
// What the click does: write `status: 'resolved'` to this ticket. No handler
// to write or register; the platform performs the update.
operation: 'update',
patch: { status: 'resolved' },
locations: ['record_header', 'list_item'],
// Only offer "Resolve" on tickets that aren't already resolved or closed.
// Predicates are CEL, record-scoped — `record.status`, never bare `status`.
Expand Down Expand Up @@ -223,6 +227,17 @@ export const SupportApp = defineApp({
});
```

The **Resolve** action is a *declarative field write*: `operation: 'update'` with
`patch: { status: 'resolved' }` sets the ticket's status when it is clicked.
There is no handler to write or register, and the update runs as the signed-in
user, so their permissions and the object's validations apply exactly as they
would to an edit. An action that runs code of its own names a handler in
`target` instead, and then something must register that handler: `os validate`
passes an unregistered one, the `os dev` boot log warns
`[action-governance] declared script actions with NO handler`, and the button
fails when clicked (the
[two paths](/docs/ui/actions#give-it-server-behavior--two-paths) a handler takes).

The agent also **exports each new file from its directory's barrel** — the object
from `src/objects/index.ts`, and the action, view and app from
`src/actions/index.ts`, `src/views/index.ts` and `src/apps/index.ts`. The
Expand Down Expand Up @@ -320,9 +335,12 @@ as the dev admin the server seeds on an empty database
(`admin@objectos.ai` / `admin123`). Then drive the app like a user:

- Create a ticket. Confirm the fields, labels, and picklist colors match intent.
- Check the **Resolve** action shows on an open ticket — and **disappears** once
the ticket is resolved (that's the `record.status` predicate doing its job).
- Open the **Support → Open** nav item; confirm the filter shows only open tickets.
- Open your ticket and click **Resolve** in its header. You should see the
*Ticket resolved.* toast, the status change to **Resolved**, and the
**Resolve** button disappear — the `patch` wrote the status, and the
`record.status` predicate now hides the action. Back in **Support → Open**,
the ticket is no longer listed.

{/* screenshot placeholder: /_console/ ticket list with the Support nav group */}
{/* screenshot placeholder: ticket record with the Resolve action in the header */}
Expand Down
11 changes: 9 additions & 2 deletions content/docs/getting-started/how-ai-development-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ description: "How building with ObjectStack splits the work: AI writes the typed
ObjectStack is built for a specific way of working: **an AI agent writes the
application; a human verifies it in a visual UI; and a stack of guardrails keeps
the AI from shipping mistakes.** This page explains why that division of labor is
both *fast* and *safe*. For the hands-on walkthrough, see
[Build with Claude Code](/docs/getting-started/build-with-claude-code).
both *fast* and *safe*.

<Callout type="info">
**The why, not a starting point.** To build, take a path from
[Start here](/docs/getting-started): want an agent to write the app →
[Build with Claude Code](/docs/getting-started/build-with-claude-code); want to
write it by hand and understand every file →
[Your First Project](/docs/getting-started/your-first-project).
</Callout>

## The division of labor

Expand Down
7 changes: 7 additions & 0 deletions content/docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ description: ObjectStack is the AI-native business backend for structured, audit

import { Database, Layout, Cog } from 'lucide-react';

<Callout type="info">
**Start here:** want an agent to write the app →
[Build with Claude Code](/docs/getting-started/build-with-claude-code); want to
write it by hand and understand every file →
[Your First Project](/docs/getting-started/your-first-project).
</Callout>

**ObjectStack** is not just a framework; it is an **AI-native business backend protocol** for building enterprise software. It decouples the *Business Intent* (defined as typed metadata) from the *Technical Execution* (handled by the Kernel), so APIs, UI metadata, workflows, and agent tools can all derive from the same source of truth.

## How you'll build
Expand Down
27 changes: 17 additions & 10 deletions content/docs/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ page is a tour of the pieces so you can review an agent's work with confidence
and catch the things the [validation gate](/docs/deployment/validating-metadata)
can't.

<Callout type="tip">
Want to *build* something, not just read about the pieces? Follow
[Build with Claude Code](/docs/getting-started/build-with-claude-code) — it runs
the whole loop (describe → agent authors → validate → verify) on a live app. New
here? The [Example Apps](/docs/getting-started/examples) are working code you can
run today.
<Callout type="info">
**The map, not a starting point.** This page is for reading metadata, whether an
agent wrote it or you are about to. To build, take a path from
[Start here](/docs/getting-started): want an agent to write the app →
[Build with Claude Code](/docs/getting-started/build-with-claude-code); want to
write it by hand and understand every file →
[Your First Project](/docs/getting-started/your-first-project). Working code to
run today: the [Example Apps](/docs/getting-started/examples).
</Callout>

## What you build
Expand Down Expand Up @@ -112,7 +114,12 @@ reviewing an agent's work, these are the two things most worth a close read:
`has(record.status) && record.status != 'sent'` — because a list row carries
only the columns that view projects, and reading an absent one faults and
hides the button. See [Actions](/docs/ui/actions) for when the guard needs
`&& record.x != null` on top.
`&& record.x != null` on top. Then check what a click **does**: a declarative
`operation: 'update'` with a `patch` (the tutorial's Resolve action), an
inline `body`, or a `target` naming a handler that something registers. A
`script` action whose `target` nothing registers passes `os validate` and
fails only when clicked; the `os dev` boot log names it under
`[action-governance] declared script actions with NO handler`.
- **Views & Apps** (`defineView`, `App.create`) — the list/form lenses and the
navigation. Reading these tells you what the user will actually see and click.

Expand Down Expand Up @@ -240,9 +247,9 @@ npx os dev --ui # boot the app, then open http://localhost:3000/_console/
```

`os validate` proves the metadata is *well-formed*; the **Console** at `/_console/`
proves it does what you *meant* — create a record, watch an action show/hide,
confirm the nav and filters. That visual check is the human's half of every build
loop. See [Validating Metadata](/docs/deployment/validating-metadata) for what
proves it does what you *meant* — create a record, click an action and check
what it changed, watch an action show/hide, confirm the nav and filters. That
visual check is the human's half of every build loop. See [Validating Metadata](/docs/deployment/validating-metadata) for what
the gate catches, and [Build with Claude Code](/docs/getting-started/build-with-claude-code)
for the full describe → author → validate → verify cycle.

Expand Down
10 changes: 5 additions & 5 deletions content/docs/getting-started/your-first-project.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ minutes you will scaffold a project, run it, add a field by hand, call the
generated REST API, and compile the artifact you would deploy.

<Callout type="info">
**Two ways to build.** ObjectStack is designed AI-first: normally
[an agent authors the metadata and you verify it](/docs/getting-started/build-with-claude-code).
This page walks the same ground *manually* so you understand every file the
agent would touch — useful for evaluating the platform, wiring CI, or working
without an agent. The two paths produce identical projects.
**The by-hand path** from [Start here](/docs/getting-started): you write every
file yourself, so you understand each one the agent would touch — useful for
evaluating the platform, wiring CI, or working without an agent. Want an agent
to write the app instead → [Build with Claude Code](/docs/getting-started/build-with-claude-code).
The two paths produce identical projects.
</Callout>

## Prerequisites
Expand Down
Loading