From c8cd8d1ceca0578ee391ec391d7c87c3b529beaa Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Fri, 17 Jul 2026 22:25:21 +0800 Subject: [PATCH] docs: replace the unmeasured ~1% claim with the measurement we can actually make MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Claude Fable 5 --- README.md | 30 ++++++++++++------- apps/docs/app/[lang]/page.tsx | 14 ++++----- content/docs/concepts/metadata-driven.mdx | 30 +++++++++++++++---- .../how-ai-development-works.mdx | 9 +++--- 4 files changed, 57 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 6b949820de..88580e3901 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,13 @@ > > The open target format and runtime for AI-written business apps. Your coding > agent writes models, UI, workflows, and permissions as compact typed metadata — -> often around 1% of a traditional codebase — and strict TypeScript, Zod schemas, -> and a validation gate catch its mistakes at authoring time. The runtime derives -> the database, REST API, UI, and MCP server, and enforces permissions and audit -> on every call. +> [a complete CRM is under 2,000 lines](#why-the-mistakes-dont-ship), so the whole +> app fits in the agent's context — and strict TypeScript, Zod schemas, and a +> validation gate catch its mistakes at authoring time. The runtime derives the +> database, REST API, UI, and MCP server, and enforces permissions and audit on +> every call. -`~1% code surface` · `Typed, validated, governed` · `Self-host anywhere` · Apache-2.0 +`Fits in an agent's context` · `Typed, validated, governed` · `Self-host anywhere` · Apache-2.0

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: **an agent's errors become located, corrective text it can read and fix itself**, in seconds — instead of a silent runtime failure nobody traces back. -And because the whole business system is a few hundred lines of typed metadata -rather than tens of thousands of lines of CRUD and glue, it **fits in an agent's -context window** — so the agent can load it end-to-end, reason about every -dependency, and refactor across data, API, UI, and permissions in one change. -That's the difference between AI as autocomplete and AI as a co-maintainer. +The other half is size. The CRM in this repo — [`examples/app-crm`](./examples/app-crm): +six objects, views, a dashboard, a lead-conversion flow, permission sets, actions, +translations — is **31 files, 1,792 lines, roughly 16k tokens**. That's the whole +business system, in about 8% of a 200k-token context window. Count it yourself: + +```bash +find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l +``` + +Because it **fits in an agent's context window**, the agent can load it +end-to-end, reason about every dependency, and refactor across data, API, UI, and +permissions in one change — it can answer *"what breaks if I change this?"* +instead of grepping and hoping. That's the difference between AI as autocomplete +and AI as a co-maintainer. > Your objects, permissions, and flows are your business ontology — and the > definition layer of the AI era should be an open protocol you own. diff --git a/apps/docs/app/[lang]/page.tsx b/apps/docs/app/[lang]/page.tsx index e91f0bfa75..a1009e6937 100644 --- a/apps/docs/app/[lang]/page.tsx +++ b/apps/docs/app/[lang]/page.tsx @@ -21,7 +21,7 @@ export const metadata: Metadata = { absolute: 'ObjectStack — AI writes the app. ObjectStack is what it writes.', }, description: - '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.', + '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.', }; const VOCABULARY: { tag: string; title: string; copy: string }[] = [ @@ -121,11 +121,11 @@ export default function HomePage() {

The open target format and runtime for AI-written business apps. Your coding agent - writes models, UI, workflows, and permissions as compact typed metadata — often - around 1% of a traditional codebase — and strict TypeScript, Zod schemas, and a - validation gate catch its mistakes at authoring time. The runtime derives the - database, REST API, UI, and MCP server, and enforces permissions and audit on - every call. + writes models, UI, workflows, and permissions as compact typed metadata — a + complete CRM is under 2,000 lines, so the whole app fits in the agent's context — + and strict TypeScript, Zod schemas, and a validation gate catch its mistakes at + authoring time. The runtime derives the database, REST API, UI, and MCP server, + and enforces permissions and audit on every call.

- ~1% code surface + Fits in an agent's context | Typed, validated, governed | diff --git a/content/docs/concepts/metadata-driven.mdx b/content/docs/concepts/metadata-driven.mdx index b0f9c58355..ce8571a80b 100644 --- a/content/docs/concepts/metadata-driven.mdx +++ b/content/docs/concepts/metadata-driven.mdx @@ -205,14 +205,34 @@ Node.js Python React Flutter ``` -### 4. ~100× Less Code — Sized for AI Agents +### 4. Small Enough to Fit in an Agent's Context -**Traditional:** ~300 lines of code for a simple CRUD feature -**ObjectStack:** ~30 lines of metadata +A simple CRUD feature that takes ~300 lines of hand-written code is ~30 lines of +metadata. But per-feature ratios are the least interesting part. Here is the +measurement that matters — the CRM bundled in this repo +([`examples/app-crm`](https://github.com/objectstack-ai/framework/tree/main/examples/app-crm): +six objects, views, a dashboard, a lead-conversion flow, permission sets, +actions, translations): -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. +| | | +| :--- | :--- | +| Files | 31 | +| Lines | 1,792 | +| Approximate tokens | ~16,000 | -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. +That's the **whole business system** — about 8% of a 200k-token context window. +Count it yourself: + +```bash +find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l +``` + +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 — it can answer *"what breaks +if I change this?"* instead of grepping and hoping. That turns AI from an +autocomplete tool into a real co-maintainer. ```typescript // All you need: diff --git a/content/docs/getting-started/how-ai-development-works.mdx b/content/docs/getting-started/how-ai-development-works.mdx index 3043dc806f..2d407c9527 100644 --- a/content/docs/getting-started/how-ai-development-works.mdx +++ b/content/docs/getting-started/how-ai-development-works.mdx @@ -25,10 +25,11 @@ build the thing I actually meant?* ## Why it's fast -A typical enterprise app is tens of thousands of lines of CRUD, forms, queries, -permissions, and API glue spread across dozens of files. ObjectStack collapses the -same surface into **a few hundred lines of typed metadata** — roughly two orders -of magnitude less code to read, write, and maintain. +A typical enterprise app spreads CRUD, forms, queries, permissions, and API glue +across dozens of files. ObjectStack keeps only the part that's yours: the CRM +bundled in this repo — six objects, views, a dashboard, a lead-conversion flow, +permission sets, actions, translations — is **1,792 lines across 31 files, about +16k tokens**. That's the entire business system, not a module of it. The point isn't lines of code; it's **fit in an agent's context window.** When the entire business system is small, typed, and declarative, an agent can load it