Repository navigation
Commit c8bb3c8
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
- docs
- concepts
- getting-started
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
| 232 | + | |
| 233 | + | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments