NIFT LABSAll experiments ↗

Experiment 06 / AI SDK docs / October 2026

Keep the islands.
Change
the build.

Three production workflows. Two maintained source models. The interactive React parts stay.

Vercel’s AI SDK documentation, faithfully migrated to Nift composition around retained framework islands. We preserve the publication first, profile the expensive work, and compare complete production pipelines.

An independent Nift Labs experiment. Not endorsed by Vercel. No Nift core or migration templates were changed.

01 / architectures

Name the three workflows.

The repo names describe maintained source models. Neither Nift repository is the upstream AI SDK application.

UPSTREAM

Vercel AI SDK docs
Next.js / Geistdocs

Original authored content, version synchronization, Fumadocs and the Next production application.

  1. Markdown/MDX + structured inputs
  2. Version synchronization + source modules
  3. Next compile / rendering / publication

Pinned vercel/ai source

NIFT / AUTHORED-SOURCE

Nift ai-sdk
(authored-source)

Maintained Markdown/MDX/frontmatter and structured/versioned sources. Downloads, search and LLM references derive from that authority.

  1. Authored source + local pinned versions
  2. Bounded renderer → transient HTML
  3. Nift composition + retained islands
  4. Publication + derived projections

NIFT / RENDERED-SOURCE

Nift ai-sdk-agent
(rendered-source)

Maintained HTML, metadata/navigation and coordinated reference projections. No routine Markdown/MDX content compiler.

  1. HTML + maintained projections
  2. Bounded island SSR refresh
  3. Nift composition + retained islands
  4. Publication + search/runtime assets
Same accepted publication. Different maintenance contracts.

These are complete orchestrated publication timings, not native Nift @markup performance. The compatibility layer implements the pinned corpus’s required behavior, not a general Next.js replacement.

02 / parity

Parity comes before the bars.

The migration acceptance target includes retrieval, interactive behavior and publication correctness.

1,674HTML routes
1,386primary documents
259recipe aliases
29ancillary / home pages
1,386Markdown endpoints
506redirect patterns
FRESH-CLONE ACCEPTANCE3,219 files.
Every accepted byte.

All publication/runtime files in each optimized migration match that project’s accepted fresh-clone output. This is not a claim that Next’s build-artifact inventory has the same file count.

Content, retrieval and route lifecycle

Nine v5/v6/v7 document/provider/cookbook families retain content, headings/anchors, metadata, version switching, local links and search. All Markdown endpoints match frozen bytes; seven discovery outputs, sitemap/robots and OG fixtures are separately checked.

Incremental publications equal forced recomputation. Add/rename/delete retire stale HTML and Markdown together. Missing or corrupt generated products recover correctly.

72 browser states per migration

Twelve representative docs/providers/cookbook/home paths, desktop/mobile and light/dark/system. System resolved light on this host. Optimization repeats 144 migration states against frozen upstream observations; the initial campaign covered 216 states across all three implementations.

Checks cover content, geometry, style, navigation, TOC, title and broken images. No universal pixel-identity claim: animation pixels and generated React IDs are outside equality.

The link/CSS audit retains 21 inherited broken links and finds zero new failures. OG cards remain request-driven runtime output, using maintained fonts/background and metadata; normal builds do not generate a corpus of social cards.

03 / islands

Static where possible.
React where useful.

Nift composition does not imply vanilla-only output. The migration retains the interactive parts rather than flattening them.

OPAQUE STATIC CONTENT+INDEPENDENT REACT ISLANDS→HYDRATED PUBLICATION

Real interaction stays

Generation/loading demos, object generation, nested weather, prompts, media/playback, provider/model selection, recipes, tabs/copy, version switching, mobile navigation and search remain interactive.

React islands hydrate around opaque static HTML. The publication does not carry a Next application runtime. Simple content controls use lightweight browser code where appropriate.

Build products have owners

Actual esbuild dependency graphs govern independently cached client, SSR, shared chrome and runtime products. Unrelated content edits preserve island bundles; source/import/toolchain changes invalidate them.

983 mounts in 1,415 content/ancillary sources pass independent host-boundary checks. The content registry is still one eager entry across 16 island families: seven emitted outputs, 1,131,411 bytes. Shared chrome emits approximately 2,035,693 bytes.

Emitted output bytes are not per-page download sizes; each family is not a separate bundle. Deterministic local AI/chat/feedback success/error fixtures verify UI and transport behavior, not live production AI, feedback or analytics. Registry splitting and dependency duplication remain future profiling targets.

04 / benchmarks

Measure the whole publication.

Preparation, framework work, Nift composition, references, search and runtime/asset publication remain inside each workflow’s command.

Warm full publication

Complete production command · five serialized samples · median and range

Upstream Next.js/Geistdocs337.34 s

282.84–389.32 s · five runs

Nift ai-sdk (authored-source)83.16 s

71.05–96.46 s · five runs

Nift ai-sdk-agent (rendered-source)37.96 s

26.95–41.87 s · five runs

Fresh application state

Generated application caches/products reset; maintained inputs, packages and OS caches remain.

Upstream Next.js/Geistdocs306.03 s

287.49–340.79 s · five runs

Nift ai-sdk (authored-source)68.87 s

67.46–89.47 s · five runs

Nift ai-sdk-agent (rendered-source)28.09 s

26.71–35.85 s · five runs

Unchanged production command

Upstream still executes a production Next build. This is not a no-op or HMR test.

Upstream Next.js/Geistdocs264.93 s

257.26–304.79 s · five runs

Nift ai-sdk (authored-source)12.87 s

11.89–18.65 s · five runs

Nift ai-sdk-agent (rendered-source)8.43 s

6.28–11.56 s · five runs

Complete publication · median seconds, all five-run min–max ranges
WorkflowWarm fullFresh applicationUnchanged command
Upstream Next.js/Geistdocs337.34s282.84–389.32s306.03s287.49–340.79s264.93s257.26–304.79s
Nift ai-sdk (authored-source)83.16s71.05–96.46s68.87s67.46–89.47s12.87s11.89–18.65s
Nift ai-sdk-agent (rendered-source)37.96s26.95–41.87s28.09s26.71–35.85s8.43s6.28–11.56s
Production publication, not the Next editing loop.

Upstream’s unchanged command still performs a production Next build. This is not a Next dev-server/HMR comparison. Fresh-state medians happen to be lower than warm-full medians here, with overlapping ranges; this does not establish a causal cold-state speed advantage.

05 / iteration

Make the changed-input costs visible.

Iteration peak memory / RSS

Memory for changed-input production publications, separate from full-build memory and elapsed time. Linear bars start at zero; exact values are shown in MiB.

Maximum individual process/phase RSS; sampled tree sums remain separate in the tables
0700 MiB

body-1

Nift authored600.2 MiB
Nift rendered513.6 MiB

body-100

Nift authored694.5 MiB
Nift rendered512.8 MiB

shared-layout

Nift authored504.2 MiB
Nift rendered519.6 MiB

navigation-order

Nift authored519.5 MiB
Nift rendered458.4 MiB

island-source

Nift authored696.4 MiB
Nift rendered288.4 MiB

route-rename

Nift authored595.1 MiB
Nift rendered515.0 MiB

Original unchanged: five-sample median [min–max]. Upstream changed inputs: original single observations. Migration changed inputs: supplemental single observations on the same active NUC, pinned accepted implementation/protocol; accepted timing values are retained separately, not paired as one original cohort. Full case tables and evidence below retain the other scopes and workloads.

These are complete production publications after controlled edits. Editing and coordination labor are outside elapsed build time.

ONE BODY / NIFT AUTHORED13.19s
ONE BODY / NIFT RENDERED7.83s

One/ten-page edits in the scoped rendered pipeline compose one/ten HTML files. Search, metadata scans and shared publication still impose fixed costs.

Every Nift incremental output equals forced recomputation. Upstream rows are full production rebuilds, not Next HMR/dev-server timings. These numbers do not measure which development server offers the better live editing experience.

Controlled input cases · one production-publication observation per workflow/case, not five-sample medians
Changed inputUpstream Next.js/GeistdocsNift ai-sdk (authored-source)Nift ai-sdk-agent (rendered-source)
1 document body267.89s13.19s7.83s
10 document bodies299.09s14.61s7.94s
100 document bodies317.16s20.95s8.28s
Metadata update / remove321.72s15.56s10.50s
Shared layout326.63s20.18s15.15s
Navigation order333.14s15.99s9.84s
Historical version304.79s14.24s7.48s
Provider / reference266.53s16.34s8.68s
Redirect271.14s12.23s5.90s
Island source259.37s19.31s11.77s
Route add256.71s21.32s11.92s
Route rename231.23s24.36s11.06s
Route delete248.95s21.71s10.63s

Rendered-source body edits coordinate HTML, search metadata, Markdown downloads and LLM references. Metadata also coordinates navigation/sitemap; historical/provider rows use the complete coordinated cases, not faster HTML-only probes. Each upstream case uses an isolated pinned warm application state; rename/delete start with the prior fixture already published. Historical v5 mutates a local cached source fixture, not acquisition of a new release. Maintained inputs are restored.

Iteration memory / peak RSS

Incremental memory matters alongside elapsed time: a smaller affected build can leave more headroom for concurrent builds, CI jobs and agents on constrained machines. Shared changes and retained worker pools can still use substantial memory; an incremental build is not guaranteed to have a lower peak than a full build. Actual concurrency and total workflow productivity were not benchmarked.

Individual = GNU maximum individual process/phase RSS, not aggregate simultaneous memory. Sampled sum = ~50ms live descendant resident-page sum, shared pages can be double-counted, short peaks missed; not PSS. Original unchanged: five-sample median [min–max]. Upstream changed inputs: original single observations. Migration changed inputs: supplemental single observations on the same active NUC, pinned accepted implementation/protocol; accepted timing values are retained separately, not paired as one original cohort.

Peak RSS in MiB · accepted timings unchanged
CaseIndividualSampled sum
Upstream Next/Geistdocs / unchanged19,935.419,704.2–20,583.929,139.229,014.6–29,717.4
Nift authored / unchanged517.4514.7–564.31,259.51,197.2–1,310.8
Nift rendered / unchanged283.0282.2–284.4289.5260.1–294.2
Upstream / body-121,221.530,109.8
Upstream / body-1022,025.829,447.8
Upstream / body-10020,286.229,326.7
Upstream / metadata-update-remove20,232.028,865.0
Upstream / shared-layout19,828.328,234.9
Upstream / navigation-order20,420.328,974.6
Upstream / historical-version23,464.330,155.6
Upstream / provider-reference20,222.629,875.3
Upstream / redirect27,766.336,545.9
Upstream / island-source27,517.336,246.6
Upstream / route-add20,962.929,931.8
Upstream / route-rename12,168.229,321.8
Upstream / route-delete11,959.626,540.7
Nift authored / body-1600.21,253.4
Nift authored / body-10620.01,294.1
Nift authored / body-100694.53,251.3
Nift authored / metadata-update-remove597.11,210.7
Nift authored / shared-layout504.21,255.8
Nift authored / redirect519.31,266.3
Nift authored / island-source696.43,203.4
Nift authored / historical-version617.71,265.7
Nift authored / provider-reference595.21,231.1
Nift authored / navigation-order519.51,231.7
Nift authored / route-add595.21,195.9
Nift authored / route-rename595.11,227.2
Nift authored / route-delete598.11,259.7
Nift rendered / body-1513.6506.4
Nift rendered / body-10513.4520.3
Nift rendered / body-100512.8516.3
Nift rendered / shared-layout519.6524.3
Nift rendered / redirect285.4302.1
Nift rendered / island-source288.4457.3
Nift rendered / navigation-order458.4474.5
Nift rendered / route-add514.7521.1
Nift rendered / route-rename515.0521.9
Nift rendered / route-delete514.8517.3
Nift rendered / historical-version-coordinated471.4465.7
Nift rendered / provider-reference-coordinated545.7521.4
Nift rendered / metadata-coordinated515.2515.1

Supplemental measurements, forced/restoration gates, environment and input hashes ↗

Different scopes and hosts remain separate; full-build memory is not substituted for an edit. Raw measurements, provenance and memory scopes ↗

06 / profiling

The first faithful build was not the finish.

Parity first → profile → remove redundant work → revalidate → benchmark.

INITIAL / SINGLE DIAGNOSTICS

140.712s authored
91.409s rendered

Faithful, but expensive. Authored MDX compatibility/SSR took 89.101s; Markdown downloads 24.902s. Whole-DOM rendered island refresh took 62.036s.

OPTIMIZED / SINGLE DIAGNOSTICS

53.642s authored
25.673s rendered

Bounded workers and retained reuse; lexical island host spans and batched SSR. These diagnostic runs are not the final five-sample production medians of 83.16s and 37.96s.

Reuse the work that is actually shared

Four bounded workers reuse content-addressed compiled bodies: 201 compilations are reused within 1,386 documents. Metadata, compiler/body and renderer keys are distinct. Version-menu props retain only relevant ancestors/fallback; 5,022 mapping checks match the complete original resolver.

Search is version-scoped, Markdown projections source-scoped and discovery depends on actual projection bytes. Generated products validate input graphs and output hashes.

Keep the rejected experiment

Retaining every unique Shiki HAST/compiled file made things worse: MDX rose to 108.15s and maximum individual process/phase RSS to about 2.49 GiB. That broad cache was rejected.

The accepted design keeps reused bodies only until their last use, with a bounded repeated-input Shiki cache. Rendered island refresh replaces only host interiors rather than reparsing whole documents.

Single diagnostic observations and final campaign medians are different evidence classes. They are not interchangeable optimization percentages. The report and raw history retain both, including failed/interrupted benchmark preparation with no accepted samples.

07 / components

Authored source earns its extra work.

The five warm-full authored component medians explain the source-model difference more precisely than “Markdown is slower.”

44.17sMDX compatibility and server rendering
10.95sMarkdown projection conversion
12.41sshared page UI preparation
6.32ssearch indexing
3.17sNift composition

The authored pipeline derives more representations: MDX/SSR, Markdown downloads, reference projections, search, navigation, shared UI and publication. The rendered pipeline maintains closer-to-final HTML and references, while still doing island refresh, shared UI, search and publication.

The composition phase includes preparation and the Nift CLI. Bare Nift is only one part of the complete pipeline; these are not native Markdown-renderer timings.

Upstream Next.js/Geistdocs · all sequential component medians
Seconds · five-sample phase medians; their medians need not sum to the complete-pipeline median
PhaseWarm fullFresh applicationUnchanged command
content-version-synchronization0.771s0.680s0.681s
fumadocs-mdx-generation0.389s0.331s0.314s
next-production-build334.457s303.585s262.689s
Nift ai-sdk (authored-source) · all sequential component medians
Seconds · five-sample phase medians; their medians need not sum to the complete-pipeline median
PhaseWarm fullFresh applicationUnchanged command
authored source synchronization1.200s1.279s0.937s
content island compilation1.229s0.904s0.205s
shared UI compilation1.190s0.977s0.164s
MDX compatibility and server rendering44.172s37.488s3.518s
content navigation0.654s0.421s0.407s
ancillary authored pages1.128s0.853s0.821s
Markdown projection conversion10.952s9.323s0.910s
discovery projections0.814s0.773s0.477s
shared page UI preparation12.411s10.964s3.476s
Nift composition3.172s2.290s0.835s
search indexing6.319s5.366s0.470s
runtime handler compilation0.315s0.221s0.075s
reference and runtime publication1.021s0.851s0.689s
Nift ai-sdk-agent (rendered-source) · all sequential component medians
Seconds · five-sample phase medians; their medians need not sum to the complete-pipeline median
PhaseWarm fullFresh applicationUnchanged command
content island compilation1.305s0.882s0.191s
shared UI compilation1.236s0.881s0.143s
maintained HTML island preparation5.144s4.679s0.962s
ancillary HTML island preparation0.335s0.337s0.049s
shared page UI preparation16.449s12.284s4.169s
Nift composition3.393s2.552s1.582s
search indexing6.715s5.443s0.393s
runtime handler compilation0.320s0.207s0.101s
reference and runtime publication1.124s0.930s0.824s

Upstream’s Fumadocs CLI generates source/index modules; actual MDX compilation and highlighting also run inside Next’s production-build stage. Shiki nests inside transforms; concurrent worker task sums can exceed wall time. Do not add nested or concurrent counters to sequential elapsed phases. The initial uninstrumented I/O counter of zero is not evidence of zero filesystem work.

08 / memory

Name the memory scope.

The gap is substantial. The measurement definitions stay attached to it.

Warm-full individual process / phase RSS

GNU maximum RSS · maximum measured individual process/phase · five-sample medians

Upstream Next.js/Geistdocs23,671.5 MiB

19,978.9–28,277.9 MiB · five runs

Nift ai-sdk (authored-source)901.8 MiB

887.4–944.4 MiB · five runs

Nift ai-sdk-agent (rendered-source)758.9 MiB

757.4–759.4 MiB · five runs

Individual RSS is not the worker pool’s total footprint.

A supplemental nominal 50 ms sampler sums live descendant RSS, with scan overhead. Shared pages may be counted more than once; short peaks may be missed. This is approximate and not exact aggregate resident memory or an OS peak.

Warm-full medians · separate memory scopes · five runs
WorkflowIndividual process/phaseSampled descendant RSS sum
Upstream Next.js/Geistdocs23,671.5 MiB19,978.9–28,277.929,277.7 MiB27,016.7–33,514.6
Nift ai-sdk (authored-source)901.8 MiB887.4–944.44,380.7 MiB4,372.5–4,518.0
Nift ai-sdk-agent (rendered-source)758.9 MiB757.4–759.4777.4 MiB775.4–777.9

For the authored worker pool, the sampled warm median is 4,380.7 MiB, despite a 901.8 MiB maximum individual-process median. Both scopes matter. The A10 reports retain all fresh/unchanged memory distributions as well.

09 / maintenance

Faster is not automatically preferable.

Choose the maintained source contract, then judge its publication pipeline.

NIFT ai-sdk (AUTHORED-SOURCE)

One authority. Derived projections.

Markdown/MDX/frontmatter and structured versions remain authoritative, readable and easier to review. Downloads, search and LLM references derive from source; retained islands have independent ownership.

Cost: transformation work, a bounded compatibility layer and internal Geistdocs/Fumadocs coupling. Four pinned internal Geistdocs UI modules and one private Fumadocs search reader are explicit maintenance liabilities.

NIFT ai-sdk-agent (RENDERED-SOURCE)

Less transformation. More coordination.

Faster publication and no routine MDX compiler. Agents can maintain HTML directly.

Cost: edits must coordinate HTML, search data, Markdown downloads, LLM references and metadata/navigation. The benchmark excludes the effort of making those changes consistent.

Upstream remains a credible third option.

Next.js/Geistdocs also has authoritative source and stronger native framework, development and deployment integration. The production build measurements do not measure every advantage of that ecosystem.

Fonts and compiled stylesheets are maintained publication assets with explicit update workflows. Homepage statistics and model catalogs are pinned maintained snapshots, while upstream retains public npm/GitHub requests and timeout fallbacks. These architectural differences remain part of the comparison.

Remaining costs are future profiling targets

MDX/highlighting, derived reference work, shared shell SSR, corpus metadata/hash scans, per-version search export and publication copying remain real costs. Navigation legitimately fans out over its tree. Registry splitting, dependency duplication, startup/scan overhead, search granularity and concurrent-memory reductions deserve later investigation. They do not reopen this accepted experiment.

10 / opinion

An explicit three-way judgement.

Codex assessed Upstream Next.js/Geistdocs, Nift authored-source and Nift rendered-source—not the repo name in isolation.

AGENTS IMPLEMENT / HUMANS DIRECT

Preferred: Nift ai-sdk
(authored-source)

One authoritative source, lower coordination burden, independently retained islands and much lower measured publication time/memory than upstream. The additional transformation cost is acceptable for consistency.

HUMANS + AGENTS BOTH EDIT

Preferred: Nift ai-sdk
(authored-source)

Markdown/MDX/frontmatter and structured sources are easier to edit and review. The rendered-source speed does not outweigh the stronger source-of-truth model.

REMOVE MIGRATION EFFORT + INCUMBENCY

Codex still prefers Nift ai-sdk (authored-source) in both maintenance scenarios.

This accepts the bounded adapter burden for the demonstrated publication architecture. Upstream is credible when native development/deployment integration takes priority; the experiment does not fully measure that tradeoff. Official adoption still requires a deployment/backend pilot.

11 / official

Worth evaluating. Not a migration decree.

The evidence justifies Vercel evaluating a migration from the current Next.js/Geistdocs AI SDK docs application to Nift composition with retained React islands.

Why investigate seriously

Complete production publication is materially faster with lower measured memory, while maintaining authored content and real interactive islands. Controlled production edits, complete output coverage and fresh-clone reproduction make this an engineering result worth testing in a real deployment.

What a production pilot must resolve

Host/runtime deployment, process rollover, private API credentials, AI/chat/feedback/search integration and analytics. Local fixtures do not certify those services. Internal module coupling, maintained asset/snapshot updates and native Next tooling must enter the decision.

A serious deployment/backend evaluation, not an unconditional recommendation. Build performance alone does not establish that Vercel should migrate the official site. The external playground remains separately hosted.

12 / guidance

The islands lesson is discoverability.

Dogfooding nift init --migration did not reveal a framework prohibition.

Generated guidance already permits React, Vue, Svelte and other tools. What needed stronger visibility was island composition and explicit ownership of client/SSR products, dependencies, emitted bytes and invalidation.

Future guidance should make “the lightest faithful solution” concrete: Nift composes the publication; neighboring tooling owns useful interactive islands. It should distinguish maintained assets from derived products, authoritative versus coordinated source models, remote-service evidence, pinned versions and full/cached/fresh build scope.

Dedicated review and exact wording/scaffolding proposals

These are proposals for later guidance work. No Nift core or generated migration-template source was changed during this experiment.

13 / methodology

Keep the boundaries in view.

A production benchmark is useful when readers can see exactly what it includes and excludes.

Commands + pinned inputs

Upstream: pnpm --dir apps/docs build:site, including sync, Fumadocs and Next production build. Migrations: python3 scripts/build-content.py (forced for full modes), including preparation, bundling, Nift, reference outputs, search and asset/runtime publication.

Node 24.21.0, pnpm 11.23.0, Nift 4.8.0. Upstream keeps its pinned eight-CPU Next setting; authored MDX uses four bounded workers. Six public external image responses are frozen. No private credentials or real backend submissions.

Sampling + state

Five serialized samples for each of three modes and workflows, rotating project order: 45 accepted publications. Active host; OS cache state uncontrolled. Fresh application state clears generated application caches/products, keeps maintained assets and installed packages, and is not machine cold.

Dependency installation, state-reset/archive preparation, input mutation and verification are excluded. Input-case observations are single runs, not distributions.

What is not measured

Next dev-server/HMR, source-editing/review labor, deployment transfer, host/process startup, production backend latency or private AI/feedback/analytics integration. Local deterministic fixtures establish a narrower UI/transport contract.

Preview robots keep Disallow: /; production indexing policy needs deployment configuration. Runtime changes require the deployment runtime to roll over.

Accounting + limitations

Individual process/phase RSS and approximate sampled descendant RSS sums differ. Nested Shiki/task counters are not additive. Phase medians need not sum to pipeline medians.

Next’s build/runtime artifacts and standalone public/runtime files have different transport inventories; raw file-count equality is not claimed. Coverage and output hashes are established by separate parity gates.

14 / evidence

A report you can trace back.

Both completed migration repositories remain untouched by this Labs publication. Evidence links pin the accepted report commits.

Upstream pin 3ebefff610f96892c50be48cf1838c453e2349f7. Report pins: authored 6d07d2f06a96d33deac0384514574d069cce98b7; rendered 524b1840a0a36d0dafdfbc368f52fb526951bad8. Measured implementation heads are retained in the raw sample records; these later commits add final reporting evidence.