From 1f0bbe4d1faba05d8c7de0469614dc0ae1f67977 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 10:45:11 +0000 Subject: [PATCH] docs: re-measure the example CRM size and state the commit it was measured at The four pages quoting the bundled example CRM's size (31 files, 1,929 lines, ~18,500 tokens) drifted again: the pages' own count command prints 30 files and 1,844 lines at 7a6ba0310. Re-measure with that command and the bytes / 4 token method the figure was first made with, and state the measuring commit beside each figure, so the next edit to the example leaves the pages dated rather than wrong. The context-window post's Todo and showcase sizes, in the paragraph after the CRM table, had drifted the same way (90 showcase files, not 91) and are re-measured at the same commit under the same pin. Claude-Session: https://claude.ai/code/session_016PVjjuVPte5XEJvaQx1E4t Co-authored-by: Claude --- .../blog/context-window-is-the-constraint.mdx | 18 ++++++++++++------ content/blog/the-ontology-is-the-software.mdx | 5 +++-- content/docs/concepts/metadata-driven.mdx | 11 +++++++---- .../how-ai-development-works.mdx | 6 ++++-- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/content/blog/context-window-is-the-constraint.mdx b/content/blog/context-window-is-the-constraint.mdx index 2b7af959a0f..eead70340b5 100644 --- a/content/blog/context-window-is-the-constraint.mdx +++ b/content/blog/context-window-is-the-constraint.mdx @@ -38,19 +38,25 @@ a dashboard, a lead-conversion flow, permission sets, an action, translations. | | | | :--- | :--- | -| Files | 31 | -| Lines | 1,929 | -| Approximate tokens | ~18,500 | +| Files | 30 | +| Lines | 1,844 | +| Approximate tokens | ~17,500 | That's the **whole example app**. Not a module of it — the data model, the UI, the automation, the access rules, all of it. It fits in about 9% of a 200k-token context window. -The Todo example is ~24.5k tokens. The kitchen-sink showcase app — which -deliberately exercises every metadata type in the protocol, 91 files of it — is -~174k. Even that one, the maximalist case, still fits in a 200k-token window — +The Todo example is ~25k tokens. The kitchen-sink showcase app — which +deliberately exercises every metadata type in the protocol, 90 files of it — is +~175k. Even that one, the maximalist case, still fits in a 200k-token window — about 87% of it, leaving about 13% free for the actual work. +These figures were measured at commit +[`7a6ba0310`](https://github.com/objectstack-ai/objectstack/tree/7a6ba03109dbb7e91359eb0f7f3e64dd1263bca8/examples) +over the non-test `.ts` files in each example's `src/`, with tokens estimated +at four bytes each. The examples keep changing, so today's counts will differ a +little. + Measure your own: ```bash diff --git a/content/blog/the-ontology-is-the-software.mdx b/content/blog/the-ontology-is-the-software.mdx index a3aa97a39cc..dbace3a8e1c 100644 --- a/content/blog/the-ontology-is-the-software.mdx +++ b/content/blog/the-ontology-is-the-software.mdx @@ -116,8 +116,9 @@ pages that is parsed into a UI tree and never executed as code. **The whole system becomes small enough to be held.** The bundled example CRM in this repository — accounts, contacts, leads, opportunities, activities, views, a dashboard, a lead-conversion flow, permission sets, actions, translations — is -31 files and roughly 18,500 tokens. That is the whole application, not -a module of it. An agent can load it end to end, answer *what breaks if I change +30 files and roughly 17,500 tokens, measured at commit +[`7a6ba0310`](https://github.com/objectstack-ai/objectstack/tree/7a6ba03109dbb7e91359eb0f7f3e64dd1263bca8/examples/app-crm). +That is the whole application, not a module of it. An agent can load it end to end, answer *what breaks if I change this*, and refactor across data, API, UI, and permissions in a single change. We wrote about why that number is the one that matters in [The Constraint Isn't Typing Speed. It's the Context Window.](/blog/context-window-is-the-constraint) diff --git a/content/docs/concepts/metadata-driven.mdx b/content/docs/concepts/metadata-driven.mdx index 25e47c9541a..ac017212d88 100644 --- a/content/docs/concepts/metadata-driven.mdx +++ b/content/docs/concepts/metadata-driven.mdx @@ -228,12 +228,15 @@ actions, translations): | | | | :--- | :--- | -| Files | 31 | -| Lines | 1,929 | -| Approximate tokens | ~18,500 | +| Files | 30 | +| Lines | 1,844 | +| Approximate tokens | ~17,500 | That's the **whole example app** — about 9% of a 200k-token context window. -Count it yourself: +These figures were measured at commit +[`7a6ba0310`](https://github.com/objectstack-ai/objectstack/tree/7a6ba03109dbb7e91359eb0f7f3e64dd1263bca8/examples/app-crm), +with tokens estimated at four bytes each. The example keeps changing, so count +it yourself for today's numbers: ```bash find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l diff --git a/content/docs/getting-started/how-ai-development-works.mdx b/content/docs/getting-started/how-ai-development-works.mdx index 43c29b23d95..844a9ace7da 100644 --- a/content/docs/getting-started/how-ai-development-works.mdx +++ b/content/docs/getting-started/how-ai-development-works.mdx @@ -34,8 +34,10 @@ build the thing I actually meant?* 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 bundled example CRM — six objects, views, a dashboard, a lead-conversion flow, -permission sets, actions, translations — is **1,929 lines across 31 files, about -18.5k tokens**. That's the whole example app, not a module of it. +permission sets, actions, translations — is **1,844 lines across 30 files, about +17.5k tokens** (measured at commit +[`7a6ba0310`](https://github.com/objectstack-ai/objectstack/tree/7a6ba03109dbb7e91359eb0f7f3e64dd1263bca8/examples/app-crm)). +That's the whole example app, 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