Skip to content

Commit c8bb3c8

Browse files
docs: re-measure the example CRM size on the four pages that state it (31 files, 1,929 lines, ~18.5k tokens) (#22267)
Fixes #22248 Clause-②: no ## What this changes Four content pages state the size of the bundled example CRM (`examples/app-crm`) as 31 files, 1,792 lines, about 16k tokens, about 8% of a 200k-token window. The concepts page prints the command that reproduces the line count and invites the reader to run it ("Count it yourself"). Run against this PR's base it answers 1,929, not 1,792. This PR re-measures the figure with the page's own command and re-derives the token and percentage estimates by the method the original figure was made with. Only the figures change; nothing else on any page does. | Page | Location | Before | After | |:--|:--|:--|:--| | `content/docs/concepts/metadata-driven.mdx` | table, section 4 | Lines 1,792 · ~16,000 tokens · "about 8%" | Lines 1,929 · ~18,500 tokens · "about 9%" | | `content/blog/context-window-is-the-constraint.mdx` | table + next sentence | Lines 1,792 · ~16,000 tokens · "about 8%" | Lines 1,929 · ~18,500 tokens · "about 9%" | | `content/docs/getting-started/how-ai-development-works.mdx` | prose, "Why it's fast" | "1,792 lines across 31 files, about 16k tokens" | "1,929 lines across 31 files, about 18.5k tokens" | | `content/blog/the-ontology-is-the-software.mdx` | prose, one sentence | "31 files and roughly sixteen thousand tokens" | "31 files and roughly 18,500 tokens" | The file count (31) is unchanged and still correct on all four. ### The fourth page The card names three pages. A grep of the whole tracked tree (release notes and CHANGELOGs, which record history, excluded; case-insensitive; every spelling of the line, token and percentage figures) found one more restatement of the same measurement inside `content/**`: the ontology post, which says "roughly sixteen thousand tokens" for the same 31 files. Left alone it would contradict the three corrected pages by 13%, so it is part of this card (nothing outside `content/**` carries the figures; the root README already carries the command only, with no number). No open PR touches any of the four files (10 open PRs' file lists read at base). ## Measured at the PR's base Base: `origin/main` 3513ac7, in this PR's worktree. `origin/main` has since moved to 9f0de32; the diff between the two over `examples/app-crm/src` and the four pages is empty, so the figures hold at the tip as well. ```text $ find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l 1929 $ find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | wc -l 31 $ find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -c 73889 ``` ### How the token and percentage figures were re-derived Neither page states how tokens were estimated, so the method was recovered from the figure's origin rather than assumed. The page figure was first written in the commit that added the context-window post (parent tree `a6058728de00816279204adb6579ba6797a156e0`). Counting that tree with the same command, filters and glob gives: ```text a605872: 31 files, 1,792 lines, 63,993 bytes 63,993 / 4 = 15,998 -> "~16,000"; 16,000 / 200,000 = 8% ``` So the method is **bytes divided by 4** (the repo's own rule of thumb, as in `scripts/check-skills-token-ratchet.mjs`), not a fixed tokens-per-line ratio. The same method reproduces the post's other two figures at that tree: the Todo example (25 files, 58,255 bytes, 14,564, "~14.5k") and the showcase (83 files, 405,447 bytes, 101,362, "~101k"). Applied at this base: ```text 73,889 bytes / 4 = 18,472 -> "~18,500" (nearest 500, the precision the post already uses for "~14.5k") 18,500 / 200,000 = 9.25% -> "about 9%" ``` A fixed per-line ratio (1,929 x 16,000/1,792 = 17,223) would have understated it: the average line grew from 35.7 to 38.3 bytes. ## Verification Docs-only, no executable code. The gate list was derived from the actual diff at the head commit with `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` (no path arguments; 4 paths against merge base 3513ac7), every command run with its exit code recorded to a file before any pipe, and the record reconciled with `--ran`: ```text ✓ dispatch-gates --ran: 40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED (a DERIVED zero — all 40 recorded an exit code and none of them is 3). ``` All 40 exit 0 at head 35744bd (including `check:docs-single-h1`, `check:doc-authoring`, `check:doc-anchors`, `check:docs-transcript-drift`, `check:nul-bytes`, `check:corpus-claim-drift`, the doc-frontmatter and doc-route-spelling gates and their self-tests). Five of them (`check:doc-formula-expressions`, `check:doc-security-posture`, `check:docs`, `check:skill-examples`, `check:docs-transcript-drift`) first refused on a fresh worktree because their built inputs did not exist (exit 3, or exit 1 for the missing `packages/spec/json-schema`); the first-pass record was kept, the dependency closures were built (`@objectstack/lint...` and `@objectstack/client-react...`, under the shared verify lock) and those five were re-run and exit 0. A refusal to measure is not a finding and is not counted as a pass. No changeset: no published package ships `content/**` (69 non-private `package.json` files scanned; none references the root `content/` tree in `files` or `scripts`; the same pattern matches a known-true control string). The PR carries `skip-changeset`. ## Acceptance notes - **Sibling figures on the context-window post are stale by the same method and are not touched.** The post's next paragraph says "The Todo example is ~14.5k tokens. The kitchen-sink showcase app ... 83 files of it ... is ~101k. Even that one ... leaves half a modern context window free". At this base, bytes / 4 gives Todo 27 files, 95,787 bytes, ~23.9k tokens; showcase 91 files, 695,310 bytes, ~173.8k tokens, which leaves about 13% of a 200k window, not half. The card says whether that post gets a fuller rewrite is a separate maintainer decision, and "nothing else on the pages changes", so this is reported, not edited. - **The figure will drift again** with every change to `examples/app-crm/src`. The card names no gate and none is added. - **The pages do not say how tokens were estimated.** Left as is under the same "nothing else changes" clause; the method is recorded above for the next person to re-derive. --- _Generated by [Claude Code](https://claude.ai/code/session_0115N1oNnQS5WqofZ2DzaT3q)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3dd66dc commit c8bb3c8

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎content/blog/context-window-is-the-constraint.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ a dashboard, a lead-conversion flow, permission sets, an action, translations.
3939
| | |
4040
| :--- | :--- |
4141
| Files | 31 |
42-
| Lines | 1,792 |
43-
| Approximate tokens | ~16,000 |
42+
| Lines | 1,929 |
43+
| Approximate tokens | ~18,500 |
4444

4545
That's the **whole example app**. Not a module of it — the data model, the
46-
UI, the automation, the access rules, all of it. It fits in about 8% of a
46+
UI, the automation, the access rules, all of it. It fits in about 9% of a
4747
200k-token context window.
4848

4949
The Todo example is ~14.5k tokens. The kitchen-sink showcase app — which

‎content/blog/the-ontology-is-the-software.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pages that is parsed into a UI tree and never executed as code.
112112
**The whole system becomes small enough to be held.** The bundled example CRM in
113113
this repository — accounts, contacts, leads, opportunities, activities, views, a
114114
dashboard, a lead-conversion flow, permission sets, actions, translations — is
115-
31 files and roughly sixteen thousand tokens. That is the whole application, not
115+
31 files and roughly 18,500 tokens. That is the whole application, not
116116
a module of it. An agent can load it end to end, answer *what breaks if I change
117117
this*, and refactor across data, API, UI, and permissions in a single change.
118118
We wrote about why that number is the one that matters in

‎content/docs/concepts/metadata-driven.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ actions, translations):
229229
| | |
230230
| :--- | :--- |
231231
| Files | 31 |
232-
| Lines | 1,792 |
233-
| Approximate tokens | ~16,000 |
232+
| Lines | 1,929 |
233+
| Approximate tokens | ~18,500 |
234234

235-
That's the **whole example app** — about 8% of a 200k-token context window.
235+
That's the **whole example app** — about 9% of a 200k-token context window.
236236
Count it yourself:
237237

238238
```bash

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ build the thing I actually meant?*
3434
A typical enterprise app spreads CRUD, forms, queries, permissions, and API glue
3535
across dozens of files. ObjectStack keeps only the part that's yours: the bundled
3636
example CRM — six objects, views, a dashboard, a lead-conversion flow,
37-
permission sets, actions, translations — is **1,792 lines across 31 files, about
38-
16k tokens**. That's the whole example app, not a module of it.
37+
permission sets, actions, translations — is **1,929 lines across 31 files, about
38+
18.5k tokens**. That's the whole example app, not a module of it.
3939

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

0 commit comments

Comments
 (0)