Skip to content

Commit bfef3fb

Browse files
os-zhuangclaude
andauthored
docs: replace the unmeasured ~1% claim with the measurement we can actually make (#3154)
The blog post that landed in #3141 deliberately declined to use "~1% code surface" — the traditional implementation it would be measured against doesn't exist, so the ratio is a counterfactual nobody has measured. That left the site arguing two things at once: the blog saying the number isn't sourceable, the homepage and README still leading with it. Worse, concepts/metadata-driven.mdx headed a section "~100× Less Code" and then, two lines down, gave its own evidence: ~300 lines → ~30 lines. The heading was 10× its own example. So all four surfaces now carry the fact instead of the ratio. examples/app-crm — six objects, views, a dashboard, a lead-conversion flow, permission sets, actions, translations — is 31 files, 1,792 lines, ~16k tokens: the whole business system in about 8% of a 200k-token window. It ships in this repo, and both docs pages give the one-line command to recount it. This is a stronger claim, not a weaker one. "Less code" is an efficiency argument a competitor can copy; "the agent can hold the entire dependency graph, so it can answer *what breaks if I change this?*" is a capability argument that depends on the system actually being that small. Both docs pages already made the context-window point — it was buried under the invented multiple. - homepage: lead + `~1% code surface` chip → `Fits in an agent's context` - README: same, with the CRM measurement and the recount command - metadata-driven.mdx: section retitled off the ratio; per-feature 300→30 kept as an aside, app-level measurement made the headline - how-ai-development-works.mdx: "two orders of magnitude" → the measurement Not touched: www.objectos.ai still carries ~1% / ~100x across eight locales. That's a sister-site call, not a unilateral one. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent dd355a7 commit bfef3fb

4 files changed

Lines changed: 57 additions & 26 deletions

File tree

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
>
99
> The open target format and runtime for AI-written business apps. Your coding
1010
> agent writes models, UI, workflows, and permissions as compact typed metadata —
11-
> often around 1% of a traditional codebase — and strict TypeScript, Zod schemas,
12-
> and a validation gate catch its mistakes at authoring time. The runtime derives
13-
> the database, REST API, UI, and MCP server, and enforces permissions and audit
14-
> on every call.
11+
> [a complete CRM is under 2,000 lines](#why-the-mistakes-dont-ship), so the whole
12+
> app fits in the agent's context — and strict TypeScript, Zod schemas, and a
13+
> validation gate catch its mistakes at authoring time. The runtime derives the
14+
> database, REST API, UI, and MCP server, and enforces permissions and audit on
15+
> every call.
1516
16-
`~1% code surface` · `Typed, validated, governed` · `Self-host anywhere` · Apache-2.0
17+
`Fits in an agent's context` · `Typed, validated, governed` · `Self-host anywhere` · Apache-2.0
1718

1819
<p align="center">
1920
<img src="docs/screenshots/architecture.png" width="940" alt="ObjectStack architecture: author typed Zod metadata (objects, flows, views, policies); the microkernel compiles it into a versioned JSON artifact and loads plugins, drivers, and services; it generates a REST API, client SDK, Console and Studio UI, and MCP tools used by developers and AI agents, governed by Auth, RBAC, RLS, FLS, and audit, over PostgreSQL, MySQL, SQLite, or MongoDB">
@@ -121,11 +122,20 @@ The reason this works is the same reason TypeScript was the right host language:
121122
**an agent's errors become located, corrective text it can read and fix itself**,
122123
in seconds — instead of a silent runtime failure nobody traces back.
123124

124-
And because the whole business system is a few hundred lines of typed metadata
125-
rather than tens of thousands of lines of CRUD and glue, it **fits in an agent's
126-
context window** — so the agent can load it end-to-end, reason about every
127-
dependency, and refactor across data, API, UI, and permissions in one change.
128-
That's the difference between AI as autocomplete and AI as a co-maintainer.
125+
The other half is size. The CRM in this repo — [`examples/app-crm`](./examples/app-crm):
126+
six objects, views, a dashboard, a lead-conversion flow, permission sets, actions,
127+
translations — is **31 files, 1,792 lines, roughly 16k tokens**. That's the whole
128+
business system, in about 8% of a 200k-token context window. Count it yourself:
129+
130+
```bash
131+
find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l
132+
```
133+
134+
Because it **fits in an agent's context window**, the agent can load it
135+
end-to-end, reason about every dependency, and refactor across data, API, UI, and
136+
permissions in one change — it can answer *"what breaks if I change this?"*
137+
instead of grepping and hoping. That's the difference between AI as autocomplete
138+
and AI as a co-maintainer.
129139

130140
> Your objects, permissions, and flows are your business ontology — and the
131141
> definition layer of the AI era should be an open protocol you own.

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const metadata: Metadata = {
2121
absolute: 'ObjectStack — AI writes the app. ObjectStack is what it writes.',
2222
},
2323
description:
24-
'The open target format and runtime for AI-written business apps. Agents write compact typed metadata — often ~1% of a traditional codebase — strict TypeScript, Zod, and a validation gate catch mistakes at authoring time, and the runtime derives the database, REST API, UI, and MCP server. Your business ontology as an open protocol.',
24+
'The open target format and runtime for AI-written business apps. Agents write compact typed metadata — a complete CRM is under 2,000 lines, so the whole app fits in an agent\'s context — strict TypeScript, Zod, and a validation gate catch mistakes at authoring time, and the runtime derives the database, REST API, UI, and MCP server. Your business ontology as an open protocol.',
2525
};
2626

2727
const VOCABULARY: { tag: string; title: string; copy: string }[] = [
@@ -121,11 +121,11 @@ export default function HomePage() {
121121
</h1>
122122
<p className="mt-6 max-w-xl text-lg text-fd-muted-foreground text-pretty">
123123
The open target format and runtime for AI-written business apps. Your coding agent
124-
writes models, UI, workflows, and permissions as compact typed metadata — often
125-
around 1% of a traditional codebase — and strict TypeScript, Zod schemas, and a
126-
validation gate catch its mistakes at authoring time. The runtime derives the
127-
database, REST API, UI, and MCP server, and enforces permissions and audit on
128-
every call.
124+
writes models, UI, workflows, and permissions as compact typed metadata — a
125+
complete CRM is under 2,000 lines, so the whole app fits in the agent's context —
126+
and strict TypeScript, Zod schemas, and a validation gate catch its mistakes at
127+
authoring time. The runtime derives the database, REST API, UI, and MCP server,
128+
and enforces permissions and audit on every call.
129129
</p>
130130
<div className="mt-8 flex flex-wrap items-center gap-3">
131131
<Link
@@ -154,7 +154,7 @@ export default function HomePage() {
154154
className="mt-8 flex flex-wrap items-center gap-x-3 gap-y-2 text-[13px] text-fd-muted-foreground"
155155
style={{ fontFamily: 'var(--l-mono)' }}
156156
>
157-
<span>~1% code surface</span>
157+
<span>Fits in an agent's context</span>
158158
<span aria-hidden className="text-fd-border">|</span>
159159
<span>Typed, validated, governed</span>
160160
<span aria-hidden className="text-fd-border">|</span>

content/docs/concepts/metadata-driven.mdx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,34 @@ Node.js Python
205205
React Flutter
206206
```
207207

208-
### 4. ~100× Less Code — Sized for AI Agents
208+
### 4. Small Enough to Fit in an Agent's Context
209209

210-
**Traditional:** ~300 lines of code for a simple CRUD feature
211-
**ObjectStack:** ~30 lines of metadata
210+
A simple CRUD feature that takes ~300 lines of hand-written code is ~30 lines of
211+
metadata. But per-feature ratios are the least interesting part. Here is the
212+
measurement that matters — the CRM bundled in this repo
213+
([`examples/app-crm`](https://github.com/objectstack-ai/framework/tree/main/examples/app-crm):
214+
six objects, views, a dashboard, a lead-conversion flow, permission sets,
215+
actions, translations):
212216

213-
For a complete enterprise module (CRM, ticketing, approvals, …) the gap typically widens to **roughly two orders of magnitude** — tens of thousands of lines of hand-written CRUD, forms, validation, and API glue collapse into a few hundred lines of typed metadata.
217+
| | |
218+
| :--- | :--- |
219+
| Files | 31 |
220+
| Lines | 1,792 |
221+
| Approximate tokens | ~16,000 |
214222

215-
The point isn't lines of code. The point is **fit in an agent's context window.** When the entire business system is small, typed, and declarative, an AI agent can load it end-to-end, reason about every dependency, and safely refactor across data, API, UI, and permissions in a single change. That turns AI from an autocomplete tool into a real co-maintainer.
223+
That's the **whole business system** — about 8% of a 200k-token context window.
224+
Count it yourself:
225+
226+
```bash
227+
find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l
228+
```
229+
230+
The point isn't lines of code. The point is **fit in an agent's context window.**
231+
When the entire business system is small, typed, and declarative, an AI agent can
232+
load it end-to-end, reason about every dependency, and safely refactor across
233+
data, API, UI, and permissions in a single change — it can answer *"what breaks
234+
if I change this?"* instead of grepping and hoping. That turns AI from an
235+
autocomplete tool into a real co-maintainer.
216236

217237
```typescript
218238
// All you need:

content/docs/getting-started/how-ai-development-works.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ build the thing I actually meant?*
2525

2626
## Why it's fast
2727

28-
A typical enterprise app is tens of thousands of lines of CRUD, forms, queries,
29-
permissions, and API glue spread across dozens of files. ObjectStack collapses the
30-
same surface into **a few hundred lines of typed metadata** — roughly two orders
31-
of magnitude less code to read, write, and maintain.
28+
A typical enterprise app spreads CRUD, forms, queries, permissions, and API glue
29+
across dozens of files. ObjectStack keeps only the part that's yours: the CRM
30+
bundled in this repo — six objects, views, a dashboard, a lead-conversion flow,
31+
permission sets, actions, translations — is **1,792 lines across 31 files, about
32+
16k tokens**. That's the entire business system, not a module of it.
3233

3334
The point isn't lines of code; it's **fit in an agent's context window.** When the
3435
entire business system is small, typed, and declarative, an agent can load it

0 commit comments

Comments
 (0)