Skip to content

Docs site: audit what can be removed or merged, starting with the 239 generated reference pages #38321

Backlog

Description

@objectstack-fleet

repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

Filing gate: ① maintainer ruling. Tesla asked 「文档站为什么这么大,评估有可能删内容吗」 (2026-11-28T13:14Z), then 「立卡检查」 (13:23Z). Source: maintainer.
Grading: area:build · domain:docs · Task · p2 (the size work of #36192 ran at p2; this is its content half) · reach: every docs-site deploy (about 1 MiB of deploy output per page) and every reader of /docs/references.
Dedupe: "docs references prune", "docs site size content" → none open; related #36192 (build-side slimming, closed by the maintainer at #38297: 「到此为止」).

维护者速读

  • 问题:文档站大,主要因为页数多。每页在部署里约占 1 MiB(预渲染 HTML、RSC、分段数据、函数里两份编译内容)。501 页里 239 页是从 spec zod 自动生成的 references/,占 48%。
  • 本卡:只评估,不删任何东西。逐个命名空间量清楚:这些页和手写文档、skills、llms.txt 重复多少,删或合并能省多少,读者会失去什么。
  • 要你做的:看报告,逐项决定删、合并或保留。之后的改动另开卡。

Measured at origin/main b503291 (seat read)

  • content/docs: 501 mdx pages, 7.5 MB. content/docs/references: 239 pages, 5.6 MB, all written by packages/spec/scripts/build-docs.ts (the file says so at the top).
  • References per namespace: ai 19, api 38 (1.4 MB), automation 17, data 36 (992 KB), identity 6, integration 2, kernel 31, marketplace 6, qa 2, security 7, shared 11, studio 4, system 41 (744 KB), ui 18 (1.1 MB).
  • Inbound: 63 hand-written pages link into /docs/references/…, reaching 224 distinct reference URLs. Any removal must keep or redirect these.
  • docs site: measure and shrink the Vercel deploy output (~920 MB, ~12.8k files per deploy) — server chunks, prebuilt OG images, per-page payloads #36192 deploy reading (run 46146191991, 742.8 MB uploaded at 631.7 MiB measured): prerendered HTML 178.5, RSC 84.5, segments 51.3, function code 188.5 (the compiled collection appears twice), node_modules 23.8, OG images 41.2, llms-full.txt 27.6 (MiB).
  • releases/ (30 pages) is release-owned and out of scope.

Ask (evaluation only, nothing removed in this card)

  1. For each references namespace: what it covers that no hand-written page, skill (skills/**/references) or llms.txt covers, and what it duplicates. Name concrete pages, not only totals.
  2. Savings per option, measured with apps/docs/scripts/measure-deploy-output.mjs on an offline build: (a) delete a namespace, (b) merge its pages into one page per namespace, (c) keep it but leave it out of prerender or OG generation, if the framework allows that.
  3. Reader cost per option: the 224 inbound URLs, search, llms.txt and llms-full.txt consumers, AI agents that read the site.
  4. The same question for the hand-written pages: run the per-page duplication check and the site-structure check (the 10-28 standing rule for docs moves) and list pages that duplicate each other.
  5. Whether build-docs.ts can emit fewer, larger pages without losing anchors, and what that would cost to build.

Done when

  • A report on this card answers 1–5 with measured numbers, one table row per namespace with a recommended action (delete, merge, keep). The maintainer rules on it; any change ships under a new card.

Size: S (evaluation)
Related: #36192, #38264, #38297.

Activity

  1. added
    priority:p2
    pm:queue
    on Nov 28, 2026
  2. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibyTFU1enPVNhwmKKom
    Account: os-tesla
    Branch: claude/project-thread-kbzddg (no push; evaluation only)
    Worktree: objectstack-issue-38321
    Domain: devx (the card was filed with domain:docs, which is not in the pm-dispatch domain table; content/docs and apps/docs belong to domain:devx. The filer's slip, left for triage to correct; this claim does not touch domain:*.)
    Area: o3-build (area:build p2, a seat card thread)
    Seat: repo:objectstack#3
    Seat rulings on the pre-claim report (/mnt/project-files/card-38321/pre-claim-report-333e6f3f.md, main 333e6f3):

    • Premise holds. Correction to the card: the 63 hand-written pages link to 136 distinct reference URLs (133 without anchors), not 224 (213 is page×URL pairs). About 100 reference pages have no hand-written inbound link.
    • The inbound face also includes the 36 distinct references URLs that product code emits at runtime (for example docsUrl in platform-objects and spec sources). The report counts them per namespace beside the hand-written links; redirects.mjs is the precedent for any redirect option.
    • Option (c) (leave pages out of prerender or OG) is measured like the others, and the report says plainly that it moves those pages to on-demand function renders, against the direction of the docs-deploy ruling on docs site: measure and shrink the Vercel deploy output (~920 MB, ~12.8k files per deploy) — server chunks, prebuilt OG images, per-page payloads #36192.
    • Item 4 (per-page duplication and site-structure check) covers the hand-written pages as well as references.
      Surface: throwaway local builds and a local build-docs.ts variant only. Nothing committed, pushed or opened as a PR.
      Stop on breach and explain in the report.
      Container & model: S, mode:thread, model: claude-opus-5-5 (default tier — dispatch-gates.mjs --tier: "no path-derived mandate"), effort: high, reason: the thread session serves this tier (get_session last_served_model)
      Writes: one os-dev-report comment on this card through the relay write tools; report the comment number.
      Clause-②: no
      Metadata-protocol: none
      Skills-docs: none (evaluation only)
      Review owed: none before the maintainer reads the report; any change ships under a new card.
      Responsibility: n/a (evaluation)
      Premise: holds, read on origin/main 333e6f3 (with the inbound-count correction above)
      Serial constraints cleared: none
      Readings owed in the report: the offline baseline measured with measure-deploy-output.mjs, per-namespace attribution, the three variant builds (a)(b)(c) with savings, inbound links (hand-written and runtime) per namespace, the duplication and structure findings, one table row per namespace with a recommended action.
  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 28, 2026
  4. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyTFU1enPVNhwmKKom
    os-dev-report

    {
      "issue": 38321,
      "status": "reading",
      "branch": "claude/project-thread-kbzddg (nothing committed or pushed; evaluation only)",
      "pr": null,
      "session": "session_01L9qibyTFU1enPVNhwmKKom",
      "premise_still_valid": true,
      "summary": "Evaluation only, nothing removed. Offline vercel build at origin/main 333e6f3f measured 632.4 MiB distinct contents / 13,039 deployment files. The 239 generated references pages cost 288.3 MiB of that (45.6%), measured by building the site without them (344.1 MiB, 7,303 files). Folding each namespace into one page saves 95.4 MiB (15.1%) but produces pages of up to 11.1 MB HTML; leaving the pages out of prerender saves 170.3 MiB (26.9%) by moving them to on-demand function renders, against the docs-deploy direction on #36192. Recommendation: remove the generated references from the site and redirect their URLs (option A below); the hand-written pages show no copied text, but the protocol/ tree re-covers about nine subjects the Build trees already own.",
      "tests": "Four offline builds with `npx vercel@60.1.3 build --prod` under scripts/pm/os-verify-lock.sh (placeholder .vercel/project.json, no Vercel credentials), each VERDICT command-exit 0, each measured with `node apps/docs/scripts/measure-deploy-output.mjs`: baseline (TURBO_FORCE, 4m52s) 632.4 MiB / 13,039 files; (a) references deleted (1m53s) 344.1 MiB / 7,303; (b) one page per namespace (2m46s) 537.0 MiB / 7,663; (c) references out of generateStaticParams for the page, OG and llms.mdx routes (2m49s) 462.1 MiB / 7,303. Per-section attribution by route prefix with a read-only script (attribute.mjs, contents shared across sections counted apart). Variants were local edits reverted with git checkout; the worktree is clean.",
      "gates": "n/a — no code change, no PR",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "5 — issue_read x3 (get, get_comments x2), get_session x1, ToolSearch-loaded schemas only; no GitHub write tool",
      "api_writes": "1 — this os-dev-report comment through scripts/pm/post-stamped.mjs",
      "open_questions": [
        {
          "question": "What should happen to the 239 generated references pages on the docs site?",
          "options": [
            "A — remove the whole generated references tree from the site and redirect every URL (to the hand-written page on that subject where one exists, otherwise to the zod source file on GitHub); measured saving 288.3 MiB (45.6%), files 13,039 -> 7,303, llms-full.txt 27.6 -> 11.0 MiB",
            "B — remove the nine platform and wire-contract namespaces (api, system, kernel, shared, marketplace, identity, integration, studio, qa), keep the five authoring namespaces (data, ui, automation, security, ai); estimated saving about 146-165 MiB (23-26%)",
            "C — keep every page but fold each namespace into one page; measured saving 95.4 MiB (15.1%), pages up to 11.1 MB HTML",
            "D — keep every page but take it off prerender and OG; measured saving 170.3 MiB (26.9%), pages become on-demand function renders"
          ],
          "recommendation": "A, because the same text already ships three other ways (the zod sources and json-schema/ in the @objectstack/spec package, the type schemas the runtime serves to MCP clients, IntelliSense), the skills send AI agents to the zod sources rather than the site, the site copy shows main while a project may run an older spec, 97 of 238 pages have no inbound link at all, and it is the largest single block of every deploy. B is the fallback if human readers browsing the site without the package matter more than measured here."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat 3 · the protocol/ tree (25 pages, 26.7 MiB of deploy) re-covers about nine subjects the Build trees own (pairs in the report); folding it is a docs move that owes the 10-28 per-page check, which this report starts; not filed",
        "carrier: seat 3 · content/docs/protocol-upgrade/ is generated at build time (3 pages, 18.md alone 1.95 MB source) and costs 15.6 MiB of deploy; the same guide ships in the npm package as protocol-upgrade-guide.md; not in this card's scope; not filed"
      ]
    }

    维护者速读

    • 为什么这么大:自动生成的 references 一共 239 页,占部署的 46%(288.3 MiB / 632.4 MiB)。实测办法是把它整个拿掉再构建一次:632.4 → 344.1 MiB,文件数 13,039 → 7,303,llms-full.txt 27.6 → 11.0 MiB。它比普通页贵,因为每页都是整张属性表,而且编译后的内容在搜索和 llms.mdx 两个函数里各带一份。
    • 这些内容在别处都有:页面正文就是 spec 里 zod 的 .describe() 文字。同样的文字已经随 @objectstack/spec 发布(src/**/*.zod.ts 和 json-schema/),运行时也把类型 schema 发给 MCP 客户端,编辑器里有 IntelliSense。skills 让 AI 读的是装好的包里的 zod 源码,不读网站。网站上这份是第三份,而且跟的是 main,用户项目可能还在旧版本上。
    • 链接:239 页里 97 页没有任何地方链入。手写文档有 63 页链到 136 个 references 地址;发布出去的运行时代码还链到其中 22 页(最多的是 35 个平台 app 和对象文件的 docsUrl 指向 shared/protection,os upgrade 的迁移条目指向 6 页)。删页就要给这些做重定向,另外要给 shared/protection 写一个手写落点。
    • 四个办法实测:A 全删加重定向省 288 MiB;B 只删平台和接口契约类的 9 个命名空间,保留数据、界面、自动化、权限、AI 这 5 个编写类的,估计省 146–165 MiB;C 每个命名空间合成一页,省 95 MiB,但 api 那一页会有 11 MB,基本打不开;D 不预渲染,省 170 MiB,代价是这些页改成线上按需渲染,和 docs site: measure and shrink the Vercel deploy output (~920 MB, ~12.8k files per deploy) — server chunks, prebuilt OG images, per-page payloads #36192 部署那条"用免费的"方向相反。
    • 手写文档:没有页面互相抄文字。但 protocol/ 目录(25 页)有大约 9 对页面和"构建"区的页讲同一件事,例如查询语法、字段类型、动作、错误码、国际化、RAG。是否合并要按 10-28 的规矩逐页定,本卡不动。
    • 要你定的:选 A、B、C 或 D。我推荐 A。不管选哪个,改动都另开卡。

    1. Measured baseline (origin/main 333e6f3, offline)

    measure-deploy-output.mjs: 632.4 MiB distinct contents, 13,039 deployment files (matches the CLI's file count on run 46146191991). By section (attribute.mjs, route prefix; contents shared by two sections counted apart, 0.1 MiB):

    section MiB note
    references (all 14 namespaces + index) 169.5 prerendered HTML, RSC, segments, OG, llms.mdx only
    docs:protocol 26.7 hand-written
    docs:frontend 25.0 hand-written
    releases 21.3 release-owned, out of scope
    docs:data-modeling 18.8
    docs:ui 17.4
    protocol-upgrade (generated at build) 15.6 out of scope, see findings
    other hand-written trees 98.4 12 trees
    function code (apps/docs/.next) 188.8 compiled docs collection, twice
    function code (node_modules) 23.8
    static (llms-full.txt 27.6, assets 5.8) 33.4

    The prerendered part alone undercounts references: the measured total cost (variant a) is 288.3 MiB, because removing them also shrinks the compiled collection in the functions by 83.4 MiB (search 95.0 -> 52.9 MiB, llms.mdx 117.0 -> 74.9 MiB) and llms-full.txt by 16.6 MiB.

    2. Options, measured

    distinct MiB saved deployment files function code llms-full.txt reader effect
    baseline 632.4 — 13,039 188.8 27.6 —
    (a) delete all references 344.1 288.3 (45.6%) 7,303 105.4 11.0 pages gone; URLs need redirects
    (b) one page per namespace 537.0 95.4 (15.1%) 7,663 187.8 27.6 same text; api page 11.1 MB HTML + 4.7 MB RSC, ui 7.2 MB, system 6.4 MB, data 5.9 MB, kernel 3.2 MB
    (c) out of prerender, OG and llms.mdx prerender 462.1 170.3 (26.9%) 7,303 188.1 27.6 each page renders on first request in the docs function; cache resets every deploy (every 6 h)

    3. Per namespace

    Saved-if-deleted = measured prerendered MiB for the namespace + its share (by source bytes) of the measured 83.4 MiB function-code and 16.6 MiB llms-full drop; the rows sum to 269.5 of the measured 288.3 MiB (the rest is in contents shared with other pages). Key coverage = share of the property keys on the namespace's pages that appear in a hand-written page or skill naming the same schema, source file or URL; a rough indicator (common keys like name inflate it), not a proof of coverage. Runtime links = distinct reference pages linked from shipped source (descriptions, lint messages, migration entries, platform objects, READMEs), tests and generators excluded.

    namespace pages source KB saved if deleted, MiB linked from docs (pages) runtime links no inbound link key coverage what only it carries A B
    api 38 1349 63.3 21 2 17 37% wire shapes of REST, auth, push, package endpoints: package-api (88 KB), package-api-assembled, app-bundle, auth-endpoints, push-relay, ai-answer have 0% hand-written coverage; protocol (341 KB) is the largest page delete delete
    data 36 923 45.1 17 1 18 62% full Object and Field key tables, driver configs (driver-* pages, unlinked) delete keep
    ui 18 1068 43.7 13 3 5 70% view (341 KB) and component (285 KB) key tables delete keep
    system 41 650 40.0 20 4 20 23% operations config: migration (155 KB), translation, logging, metrics, tracing, tenant; migration entries link 4 of these delete delete
    kernel 31 305 22.8 19 2 12 28% plugin and kernel contracts delete delete
    ai 19 222 14.9 11 1 8 24% dataset-tools, record-context-tools, ask-question, object-query-source at 0% delete keep
    automation 17 198 13.0 7 4 9 62% flow node configs; approval and time-relative-trigger are linked from lint messages delete keep
    security 7 80 5.2 6 2 1 55% permission, RLS, sharing keys delete keep
    shared 11 30 4.9 5 1 5 41% protection: linked as docsUrl from 35 platform app and object files, shown on locked items delete, after a hand-written protection page exists delete, same
    marketplace 6 55 4.2 5 0 1 43% package and template manifests delete delete
    identity 6 38 3.6 6 1 0 31% position delete delete
    integration 2 70 3.2 2 0 0 68% connector delete delete
    studio 4 45 3.2 3 0 1 36% designer configs delete delete
    qa 2 13 1.1 2 1 0 64% testing delete delete
    total 238 + root index 5,046 288.3 measured 137 22 97 B keeps about 122 MiB
    • "No inbound link" counts pages with neither a hand-written nor a runtime link. The pre-claim figure of 36 runtime URLs also counted tests and generator data (variant-docs.json, the liveness ledger); shipped source links 22 pages.
    • An "authoring-only" filter by the authorable-surface ledger does not separate the namespaces: 207 of 238 pages carry a schema the ledger lists (98% of bytes), so B's split is by subject, not by that ledger.
    • 170 of 238 pages have at least one hand-written page that names their schema or source; redirect targets for A come from that list, the rest go to the zod source file each page already names (**Source:** packages/spec/src/…).

    4. Reader cost

    • Hand-written links: 63 pages link to 136 distinct reference URLs (213 page-URL pairs; 5 carry an anchor). Each needs a redirect or a rewritten link; redirects.mjs:140-149 already retires references/cloud/* this way.
    • Runtime links: shared/protection from 35 platform-objects files (stamped into the lock notice an admin sees), 6 pages from migration registry entries (os upgrade output: 4 system/*, ui/, kernel/plugin-security-advanced), automation/approval and automation/time-relative-trigger from lint messages, about 8 pages named inside zod descriptions (so in IntelliSense and json-schema), 5 package READMEs (npm pages). Under A these redirect; the protection link needs a hand-written target first.
    • Search: the search function indexes every page; under A schema names stop matching site pages (search.func 95.0 -> 52.9 MiB).
    • llms.txt: loses 239 of its roughly 510 entries. llms-full.txt: references are 60% of it (27.6 -> 11.0 MiB); at 27.6 MiB it is already far beyond any model's context, so removing them makes the hand-written docs readable in one file.
    • AI agents: the skills point agents at the installed package's zod sources (packages/spec/scripts/build-skill-references.ts), MCP clients read the served type schemas, and the site copy is main's schema, not the agent's installed version. No measured agent path reads /docs/references.
    • Human readers: lose a rendered page with every key, type and default. Traffic to these pages is not measured here (no analytics access); that is the one reading that could move the recommendation to B.

    5. Fewer, larger pages from build-docs.ts (item 5)

    • Measured by prototype (variant b): one page per namespace keeps every schema heading unique (0 collisions among schema-name headings; 7 prose headings would get -1 suffixes), so references/ns/page#anchor can redirect to references/ns#anchor with a page-to-section map.
    • It saves 95.4 MiB, not more: function code and llms-full.txt do not move (the same text is compiled once whatever the page split), and the merged pages are 3–11 MB of HTML each, too heavy to read on a phone.
    • Cost to build: a change to build-docs.ts (1,197 lines: page grouping, per-namespace meta.json, index cards, the title rule, the check:docs drift check) and to the generator tests that pin page paths (file-description.test.ts, page-title.test.ts, format-type.test.ts); an M card. Grouping by the existing meta.json sections (about 40 pages) would land between the baseline and (b), not measured.

    6. Hand-written pages: duplication and site structure (item 4, 10-28 rule)

    • Copied text: none found. 8-word shingle overlap over 236 hand-written pages (references, releases, protocol-upgrade excluded): the highest pairs are a shared boilerplate paragraph across ui/components/* (34 shingles) and a shared plugin-page template across frontend/plugins/*. No page repeats another's prose.
    • Same subject on two pages (TF-IDF similarity, then titles and headings read by hand; text differs, subject is the same):
    protocol/ page Build page covering the same subject similarity
    protocol/knowledge.mdx (84 KB) ai/knowledge-rag.mdx 0.58
    protocol/objectql/query-syntax.mdx ("full specification") data-modeling/queries.mdx ("cheat sheet") 0.54
    protocol/objectql/types.mdx data-modeling/field-types.mdx, data-modeling/fields.mdx 0.35
    protocol/objectql/schema.mdx data-modeling/objects.mdx title
    protocol/objectql/security.mdx permissions/index.mdx and the permissions tree title
    protocol/objectui/actions.mdx ui/actions.mdx, ui/components/action.mdx 0.36
    protocol/kernel/i18n-standard.mdx ui/translations.mdx 0.41
    protocol/kernel/error-handling.mdx api/error-catalog.mdx 0.34
    protocol/kernel/http-protocol.mdx api/declarative-endpoints.mdx 0.35

    Within one tree: concepts/index with concepts/design-principles and concepts/metadata-driven (0.47–0.49); five architecture pages (concepts/architecture, concepts/architecture-overview, kernel/architecture, protocol/diagram, and frontend/architecture-overview, which is ObjectUI's and a different subject); fields on four pages (data-modeling/fields, data-modeling/field-types, protocol/objectql/types, references/data/field). The query pair was spot-read: both are current (both state that joins and window functions left the request surface), so this is two maintained copies, not a stale one.

    • Structure: protocol/ (25 pages, 912 KB source) sits under "Platform" and mirrors the Build trees (objectql ≈ data-modeling, objectui ≈ ui, kernel ≈ kernel/api), the same ambiguous-top-level smell the 10-28 rule names. frontend/ (34 pages) is the ObjectUI renderer and ui/ is metadata authoring; the names do not say so. Folding protocol/ is the hand-written change with a real saving (up to about 27 MiB plus its function share) but is a docs move: each pair above needs its own keep/merge decision first. Not part of this card.

    Files (all under /mnt/project-files/card-38321/): measure-base.txt, measure-a.txt, measure-b.txt, measure-c.txt, attr-base.txt, attr-b.txt, coverage-pages.txt (every reference page with its readings), dup.txt, topic-hand.txt, topic-refs.txt, variant-c.patch and the read-only scripts.

    Read at 2026-11-28T13:47Z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:builddomain:docspm:dispatchedpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions