Skip to content

docs: re-measure the example CRM size on the four pages that state it (31 files, 1,929 lines, ~18.5k tokens) - #22267

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-22248-crm-size-drift
Oct 8, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-22248-crm-size-drift

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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.

$ 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:

a6058728: 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:

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:

✓ 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

The pages stated the bundled example CRM as 31 files, 1,792 lines, about
16k tokens, about 8% of a 200k window, and invite the reader to re-run
`find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l`.
At origin/main 3513ac7 that command answers 31 files, 1,929 lines.

Tokens are re-derived the way the original figure was made: bytes / 4.
The original tree (a605872) is 63,993 bytes -> 15,998 -> "~16,000";
today's is 73,889 bytes -> 18,472 -> "~18,500", and 18,500 / 200,000 is
about 9%.

Only the figures change: Lines, Approximate tokens, the percentage, and
the same sentence on the fourth page that restated the token figure.

Claude-Session: https://claude.ai/code/session_0115N1oNnQS5WqofZ2DzaT3q
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Oct 8, 2026
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 8, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 8, 2026 10:59
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 8, 2026 10:59
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit c8bb3c8 Oct 8, 2026
38 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-22248-crm-size-drift branch October 8, 2026 11:17
akarma-synetal pushed a commit to akarma-synetal/framework that referenced this pull request Oct 9, 2026
…dow post and correct the "half a window free" sentence (objectstack-ai#22293)

Fixes objectstack-ai#22273
Clause-②: no

## What this changes

One paragraph of `content/blog/context-window-is-the-constraint.mdx`
(lines 49-52): the Todo and kitchen-sink showcase sizes, and the clause
built on them. Nothing else on the page changes; the CRM table above it
(corrected by PR objectstack-ai#22267) is untouched.

```diff
-The Todo example is ~14.5k tokens. The kitchen-sink showcase app — which
-deliberately exercises every metadata type in the protocol, 83 files of it — is
-~101k. Even that one, the maximalist case, leaves half a modern context window
-free for the actual work.
+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 —
+about 87% of it, leaving about 13% free for the actual work.
```

**The argument is kept; one clause is not.** The paragraph argues that
even the maximalist example fits in one window. At ~174k of the
200k-token window the post already uses for the CRM paragraph two lines
above, it still does, so that claim stays. "Leaves half a modern context
window free" does not survive the new numbers (about 13% is free, not
half), so it is replaced with the measured fraction. "A modern context
window" became the explicit 200k so the CRM paragraph's "about 9%" and
this paragraph's "about 87%" share one denominator. No other sentence on
the page depends on the half-window claim; the rest of the post argues
from the CRM example.

## Measured at this PR's base

Base: `origin/main` 5870716 (the merge
base, read in this PR's worktree). Method: bytes of the non-test `.ts`
files under the example's `src/`, divided by 4, as recovered on objectstack-ai#22248
and applied in PR objectstack-ai#22267. No new method and no new gate (triage ruling
on the card).

```text
$ find examples/app-todo/src -name '*.ts' -not -name '*.test.ts' | wc -l
27
$ find examples/app-todo/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -c
97653
$ find examples/app-todo/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l
2383
$ find examples/app-showcase/src -name '*.ts' -not -name '*.test.ts' | wc -l
91
$ find examples/app-showcase/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -c
696149
$ find examples/app-showcase/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l
14229
```

A second reading through git, not the filesystem, agrees on every file
count and byte total: `git ls-tree -r -l 5870716 --
examples/APP/src`, summing the sizes of files ending `.ts` and not
`.test.ts`.

| example | files | bytes | bytes / 4 | the post now says |
|:--|--:|--:|--:|:--|
| `app-todo` | 27 | 97,653 | 24,413 | ~24.5k |
| `app-showcase` | 91 | 696,149 | 174,037 | 91 files, ~174k |

Rounding follows the precision the post already uses, as PR objectstack-ai#22267
recorded it: the Todo figure to the nearest 500 (the post's "~14.5k"),
the showcase figure to the nearest 1k (the post's "~101k"). 174,037 /
200,000 = 87.0%, so about 87% used and about 13% (25,963 tokens) free.

Control for the method: the same count over the tree the figures were
first written on (`a6058728de`) gives `app-todo` 25 files / 58,255 bytes
/ 14,564 and `app-showcase` 83 files / 405,447 bytes / 101,362, i.e. the
post's original "~14.5k", "83 files" and "~101k". The card's readings at
`8cbe255ef` also reproduce exactly (Todo 95,787 bytes / 23,947; showcase
695,310 bytes / 173,828). Between that commit and this base `app-todo`
grew by 1,866 bytes (+1.9%) and `app-showcase` by 839 (+0.1%): the
figures move with `main`. The Todo rounding band (24,250 to 24,750
tokens, i.e. 97,000 to 99,000 bytes) holds the current reading at
97,653.

The old sentence has no other copy: `git grep` for "half a modern
context window" finds nothing in the tree after this change, and a grep
of the tracked tree for the old figures ("~14.5k", "~101k", "83 files";
release notes and changelogs excluded) found them only in this
paragraph; the other pattern hits are unrelated test-shard and vitest
comments.

## Verification

Docs-only. The gate list was derived from the actual diff with `node
scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` (no path arguments; 1 path against merge
base 5870716, 8 changed lines), every command run with its exit code
recorded to a file before any pipe, and the record reconciled with
`--ran`:

```text
✓ dispatch-gates --ran: 15 derived famil(ies) accounted for — 15 run, 0 NOT-MEASURED (a DERIVED zero — all 15 recorded an exit code and none of them is 3).
```

All 15 exit 0 at head bad1420 (including `check:doc-frontmatter` and
its self-test, `check:doc-anchors`, `check:doc-authoring`,
`check:nul-bytes`, `check:closing-keyword-parity` and its self-test).
One of them, `pnpm --filter @objectstack/lint run
check:doc-formula-expressions`, first refused on the fresh worktree with
exit 3 (PREREQUISITE NOT MET: `@objectstack/formula` and
`@objectstack/lint` were not built). That first pass measured nothing
and is not counted as a pass; the two closures were built under the
shared verify lock (`turbo run build --filter=@objectstack/formula
--filter=@objectstack/lint --concurrency=2`, VERDICT command-exit 0) and
the gate was re-run: exit 0.

No changeset, `skip-changeset` on the PR: no published package ships
`content/**`. Of the 82 tracked `package.json` files, 69 are non-private
and all 69 declare a `files` array; none of those entries reaches
`content/` or `blog/`, and the same scan counts 69 entries naming `dist`
as its positive control. No governed surface is touched
(`content/blog/**` is not in the register).

## Acceptance notes

- **The numbers will drift again.** Every figure in the paragraph is a
hard-coded reading of two example apps that change on `main` daily; the
card names no gate and none is added.
- **The CRM row beside it already reads 3 lines high.** The table's
"Lines | 1,929" (set by objectstack-ai#22267, measured at its base `3513ac778`)
answers 1,932 at this base by the post's own `find ... | xargs cat | wc
-l` command (`app-crm`, 31 files, 74,182 bytes, ~18,545 tokens);
`app-crm/src` changed between objectstack-ai#22267's base and its merge commit
`c8bb3c8d9` (73,889 bytes then, 74,182 at the merge commit), and the
bytes are identical at the merge commit and at this base. The tokens and
"about 9%" figures still hold. Not edited here: the CRM row is carved
out of this card. Same drift class the card already declares; noted, not
filed.
- **What the post now claims.** The card asked whether a numbers-only
fix changes what the post claims: it does, from "half a window left
over" to "about 13% left over". The triage ruling (rewrite the sentence
to whatever the new numbers support) is what this PR does; whether the
post wants a fuller rewrite of its framing is not decided here.

---
_Generated by [Claude
Code](https://claude.ai/code/session_0115N1oNnQS5WqofZ2DzaT3q)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: the example CRM size stated on three pages (1,792 lines across 31 files) has drifted — the pages' own count command prints 1,929 lines on main

2 participants