You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
audit — hotcrm ships 69,419 lines of hand-written test against a 39,734-line metadata app: split them three ways and measure how many lines os verify should have derived #15418
Maintainer-requested, 2026-09-04. The deliverable is a number and its derivation, not a code change.
Why this card exists
This project's central claim is on its own repository description: "a complete CRM in under 150k tokens, one context window. Agents read it whole, reason it whole, refactor it whole."
Measured on objectstack-ai/hotcrm at 71a3452 (the 17.3.0 upgrade merge):
lines
files
src/ — the metadata app itself
39,734
172
test/ — hand-written tests
69,419
169
content/
26,996
243
docs/
13,476
30
scripts/
3,765
13
160 .test.ts files against 44 object files.
And the app's own shrink-only ratchet, whose scope is src/**/*.ts minus src/translations/ and src/data/, comment- and blank-stripped:
layer
scope
reading
ceiling
used
business semantics
objectsflowsactionshooks
84,060
85,000
98.9%
interaction layer
viewspagesdashboardsapps
37,429
40,000
93.6%
authored total
the above plus the rest of src/
135,830
140,000
97.0%
⚠️test/ is not in that ratchet at all. Nothing watches it.
So the honest reading of "怎么越改越复杂" is: the metadata app is disciplined and nearly at its ceiling; the growth is in the half nobody measures — and that half is where the app's actual behaviour is pinned. An agent that "holds the app whole" holds 135,830 tokens of metadata and none of the 69,419 lines that say what it must do.
What to produce
A three-way split of all 69,419 lines, by file, with the line count of each bucket.
① Should be derived by the platform, is hand-written today. A test that asserts only that the metadata is self-consistent — it needs no knowledge of the business. Candidates spotted by name and size (⛔ starting set, not the scope, and not verified by reading):
② Genuinely the app's own — business judgement. The platform cannot know these and should not try:
quote-discount-ceiling.test.ts 898 a discount ceiling is company policy
case-assignment.test.ts 897 who a case goes to
win-loss-capture.test.ts 857 how won/lost is booked
③ Grey zone — testing PLATFORM behaviour, but the app carries the cost.
These assert what a hook does inside the platform's own sandbox. Related: #15325.
How to do it, and the traps
⚠️Read the tests. ⛔ Do not classify by filename. The three names above are a starting hypothesis I formed from names and sizes and explicitly did not verify — treat them as unclassified like everything else, and say so if any of them lands in a different bucket than guessed.
Classify by the question each test asks, not by what it touches: "could this assertion be written by something that has only the metadata, and no knowledge of this company?" Yes ⇒ ①. No ⇒ ②. "is the subject the platform's behaviour rather than the app's?" ⇒ ③.
A file may split. Report per-file line counts and, where a file straddles buckets, split it at describe granularity rather than forcing the whole file into one.
Measure what os verify derives TODAY — packages/verify/src/derive.ts and rls.ts are its whole surface — and subtract it from ①. The remainder is the actual roadmap: what bucket ① asks for that the platform does not yet produce. That subtraction is the point of the card; ① alone is not the answer.
⛔ Delete or rewrite a single test. They are green today and pinning real behaviour; removing one before the platform derives its replacement trades a loud protection for a silent gap. This card produces a measurement, full stop.
⛔ Do not build the derivation. The roadmap this produces gets costed and dispatched separately, ordered by the measured demand.
⛔ Do not change hotcrm at all. This is read-only against that repository.
Deliverable
A record comment on this card (and, if it is long, a file under docs/ in a docs-only PR) carrying:
the per-file three-way table with line counts and a one-line reason per file;
the three bucket totals, and the ① minus already-derived remainder;
a ranked list of the derivation capabilities bucket ① implies, heaviest first — this is os verify's roadmap, ordered by real measured demand rather than by guess;
the honest reading of the size claim: src + the tests a metadata app cannot avoid writing (② and any of ③ the platform will never absorb) is what a truthful "how small can a metadata app be" number looks like. State it.
⚠️ Where the classification is genuinely ambiguous, say so and put the lines in a fourth "undecided" bucket rather than forcing a verdict. An undecided count I can see is worth more than a confident split I cannot check.
Maintainer-requested, 2026-09-04. The deliverable is a number and its derivation, not a code change.
Why this card exists
This project's central claim is on its own repository description: "a complete CRM in under 150k tokens, one context window. Agents read it whole, reason it whole, refactor it whole."
Measured on
objectstack-ai/hotcrmat71a3452(the 17.3.0 upgrade merge):src/— the metadata app itselftest/— hand-written testscontent/docs/scripts/160
.test.tsfiles against 44 object files.And the app's own shrink-only ratchet, whose scope is
src/**/*.tsminussrc/translations/andsrc/data/, comment- and blank-stripped:objectsflowsactionshooksviewspagesdashboardsappssrc/test/is not in that ratchet at all. Nothing watches it.So the honest reading of "怎么越改越复杂" is: the metadata app is disciplined and nearly at its ceiling; the growth is in the half nobody measures — and that half is where the app's actual behaviour is pinned. An agent that "holds the app whole" holds 135,830 tokens of metadata and none of the 69,419 lines that say what it must do.
What to produce
A three-way split of all 69,419 lines, by file, with the line count of each bucket.
① Should be derived by the platform, is hand-written today. A test that asserts only that the metadata is self-consistent — it needs no knowledge of the business. Candidates spotted by name and size (⛔ starting set, not the scope, and not verified by reading):
② Genuinely the app's own — business judgement. The platform cannot know these and should not try:
③ Grey zone — testing PLATFORM behaviour, but the app carries the cost.
These assert what a hook does inside the platform's own sandbox. Related: #15325.
How to do it, and the traps
describegranularity rather than forcing the whole file into one.os verifyderives TODAY —packages/verify/src/derive.tsandrls.tsare its whole surface — and subtract it from ①. The remainder is the actual roadmap: what bucket ① asks for that the platform does not yet produce. That subtraction is the point of the card; ① alone is not the answer.os verify's multi-package path has been deriving zero cases and reporting success (record — the option-B reader by-shape sweep: method, derived 37-key collection set, triaged false positives, and the two packages it found #15210, fixed by reader program 5/4 —@objectstack/verify: an option-B artifact makesos verifyreport a green run that measured nothing #15229 / PR fix(verify): a multi-package app no longer gets anos verifythat measures nothing (#15229) #15281, landing now). So part of why the app hand-writes is that the derived half could not be trusted. Note where a bucket-① test predates or postdates that, if the history shows it.⛔ What this card must NOT do
Deliverable
A record comment on this card (and, if it is long, a file under
docs/in a docs-only PR) carrying:os verify's roadmap, ordered by real measured demand rather than by guess;src+ the tests a metadata app cannot avoid writing (② and any of ③ the platform will never absorb) is what a truthful "how small can a metadata app be" number looks like. State it.