Skip to content
zhaoyu.io
/writing /models /work /about /ai-thesis /contact
GitHub LinkedIn

Engineering notes with receipts. Mental models from ten years of building CNBC.com: agents, edge architecture, reliability.

I'm an engineering manager who still ships, and this site is where I write down what production teaches me. Every claim carries a receipt: a number, a named system, or an incident I can point at. If a green check can lie to you, it eventually will; the notes start there.

Read the Notes View Selected Work

Writing

Engineering Notes.

Architectural decisions, performance constraints, and trade-offs from production. Every note carries a receipt. The working thesis behind them: The Factory Is Going Dark →
    • Reliability
    • Verification
    • AI Engineering

    Your Checks Are Lying to You

    Run this in any repo with a gating script: ./check.sh | head -40; echo $?. If the gate fails, you still see 0, because without pip…

    • Agent Architecture
    • AI Engineering
    • Retrieval

    Agents Re-Derive Judgment You Already Paid For

    Every agent session starts from a blank context window, so it re-derives judgment you already paid for. You settle a tradeoff in M…

    • System Prompt Architecture
    • LLM Mechanics
    • AI Engineering

    Reinforcement Anchors Beat Emphasis: Compressing a Production System Prompt

    Production system prompts bloat by a predictable mechanism. The model does something wrong, so you add an instruction telling it n…

    • Agent Architecture
    • Engineering Management
    • AI Engineering

    The Agent Run Is the New Unit of Work, and Reviewing It Is Management

    The genuinely new moment in AI-assisted engineering is not the chat answer; you watched that get produced and judged it in real ti…

    • Agent Architecture
    • Reliability
    • Engineering Management

    Agents Degrade Quietly: Maintenance Is Where the Value Compounds

    Building an agent produces a visible artifact (there was nothing, now there is a working agent), so it reads as progress. Maintain…

    • AI Engineering
    • Agent Architecture
    • Specification

    Spec Quality Is the Bottleneck Now, Not Implementation Speed

    The industry is measuring AI-assisted development with the wrong unit of analysis. Code-generation speed is the vanity metric; the…

    • Agent Architecture
    • Reliability
    • Distributed Systems

    Agent Failures Are Loop Failures, Not Intelligence Failures

    Every agent failure I've debugged this year decomposes the same way. The agent didn't lack intelligence. The loop lacked definitio…

    • AI Engineering
    • SEO
    • Structured Data

    Why I Made This Site Readable by Machines, Not Just Humans

    A site now has two kinds of reader, and only one of them renders a page. Crawlers, retrieval pipelines, and agents pull the raw do…

    • AI Engineering
    • Agent Architecture
    • Career

    The Three Tiers of Using AI, and Why Only Two of Them Still Differentiate You

    There's a real difference between using AI as a faster typist (autocomplete, chat-assisted edits, "fix this bug for me") and deleg…

    • AI Engineering
    • Productivity
    • Meta

    Building with AI: The Compound Advantage

    I built most of this site through Claude Code as a deliberate workflow: the components, the type errors that blocked deploys, and …

    • Architecture
    • Distributed Systems
    • State Management

    The Front End Is a Distributed System, Starting with the URL

    Filter a dashboard, refresh the page, and the filter is gone. Send the link to a colleague and they see a different view. The usua…

    • React Performance
    • HCI
    • 60fps

    Decoupling State from Render in LLM Streaming

    The naive way to build a streaming AI interface is to pipe a Server-Sent Events stream straight into a React state setter: a chunk…

All notes, individually addressable →

Models

Rules that pay off in more than one domain.

A heuristic works in one place. A model works in two, which is the test each of these has to pass before it lands here: a receipt from engineering and a receipt from somewhere that shares no vocabulary with it.
  • A written instruction is context. A hard requirement needs a deterministic control.

    • engineering
    • capital allocation
    • knowledge work
  • A check with two outcomes instead of three certifies nothing, because "did not run" arrives looking like "passed."

    • engineering
    • capital allocation
  • Allocate in the unit the question turns on, not the unit you can count without thinking.

    • capital allocation
    • engineering
All 8 models, with the mechanism and the receipts →

5 more on the page.

In code

Strong opinions, weakly held.

Agent-era · each model earned in a note

Fail-open checks

A check whose "did not run" is indistinguishable from "passed" is worse than no check, because its record closes the question.

Read the note →

The receipts rule

"Done" without an attached artifact is the worker vouching for itself; the review happens on the diff, the test run, and the artifact.

Read the note →

Loop failures, not intelligence failures

Agents fail for missing boundaries, definitions of done, and receipts; reliability is engineered into the loop, not summoned from the model.

Read the note →

Spec quality is the bottleneck

When agents can build from any sufficiently precise description, the specification becomes the primary artifact and the codebase a derivative.

Read the note →

Judgment you already paid for

Settled tradeoffs must be retrievable by meaning, not memory, or every agent session re-derives them from a blank context window.

Read the note →

Platform-era foundations, still load-bearing:

Latency Is the Enemy of Trust

Whether it's a financial ticker during a market spike or a UI transition on a slow network, delay creates doubt, and doubt is churn. Every millisecond removed is a unit of audience confidence restored.

Operationally that means standards, budgets, and repeatability over one-off heroics: UI production run like manufacturing, not craftsmanship.

The Bridge

I operate at the intersection of Product and Engineering. I don't build to spec; I partner with product leaders to define what is technically possible at scale.

I translate edge configuration into business value, connect latency improvements to revenue impact, and push back when the roadmap is wrong. Engineering earns its seat by speaking the business’s language.

~/philosophy/single-source-of-truth.ts
Anti-Pattern
// ❌ The "Sync" Trap
const [filter, setFilter] = useState('all');

// Bug: Not shareable, resets on reload
useEffect(() => {
  fetchData(filter);
}, [filter]);
Preferred
// ✅ The URL is Truth
const searchParams = useSearchParams();
const filter = searchParams.get('filter') ?? 'all';

// The UI is just a reflection of the URL
const data = useQuery(['items', filter]);
NOTE: If the user can't share the state via a URL, the state shouldn't exist.

See it: latency demo

Latency is the enemy of trust.

Don't just tell stakeholders the architecture is better. Show them. Switch modes to feel the difference between a naive socket connection and a frame-buffered stream.

60 FPS

Selected Work & Systems

Systems I've architected,
from CNBC to architectural sandboxes.

Isomorphic ReactAkamai EdgeWorkersHigh ScalePerformance

CNBC.com Next-Gen Migration

Market-moving days are a financial-news business at its most valuable and most fragile. I architected CNBC.com’s migration from a legacy client-side monolith to an isomorphic Akamai Edge architecture, moving business and rendering logic to the network edge, so the platform holds its full audience through exactly those spikes: sub-2-second p75 LCP in public field data, and zero downtime through the cutover.

1.7s
P75 LCP (CRUX)
47M
MONTHLY UNIQUES
ORIGINEDGECLIENTCACHE HIT
PROFESSIONAL ACTIVE

CNBC.com Next-Gen Rebuild

Driving the complete redesign of CNBC.com, architecting the new UI/UX end to end with a peer engineering manager. I lead the frontend architecture for the AI experiences, lead the team building the video and site experiences, and keep the whole web behind the page holding up: analytics (Amplitude, Adobe Launch), MPS ad serving, the federated GraphQL layer we build against, login and subscriptions, SEO, compliance, and editorial workflows. The leverage is upstream, in shaping API contracts so one query carries the rules and web, apps, and OTT inherit a single implementation.

AI · Video · Site Experiences
Analytics · Ads · Identity · Subs Integrations
Isomorphic ReactAkamai EdgeWorkersGraphQLMicro-FrontendsAmplitudeMPS Ads
PROFESSIONAL ACTIVE

Video & Live Streaming Rebuild

Four playback surfaces (vertical video, live TV, full episodes, and standalone live events) rebuilt from the ground up across two player frameworks, inside the ~394M monthly digital minutes Versant reported at its December 2025 Investor Day. The hard part was never the player. It was upstream: settling the API contracts and architecture dependencies each surface had inherited separately, so four experiences resolve to one modular framework instead of forking into four.

Vertical · Live TV · Episodes · Events Surfaces
Server-Sent Events Sync
Server-Sent EventsLive StreamingPlayer ArchitectureGraphQL
PROFESSIONAL ACTIVE

AI-Powered Investing Tools (Frontend Architecture)

Took CNBC's first AI product from zero to one as its only frontend engineer and the product/tech bridge, built front-to-back with design, product, backend, and editorial, which at a news organization is the constituency that decides whether generative text ships at all. That work is now the frontend architecture for the AI-powered investing tools in CNBC's next-generation platform. In financial products, trust is the conversion metric. My work makes non-deterministic model output feel deterministic: frame-buffered streaming, graceful degradation, latency that never shakes a reader’s confidence in the number on screen.

60 fps Token rendering
Deterministic Interface
Streaming UISSEReactHCI
Read the architecture note →
PROFESSIONAL COMPLETED

Infrastructure & Privacy Separation

When the corporate spinoff needed CNBC’s digital business to stand alone, I directed the 4-month, 3-team sprint that made it real: video streaming, analytics, and privacy services migrated off the parent company with zero downtime, compliance obligations met, no revenue interruption, no user-visible seam.

3 Teams Coordinated
Zero Downtime
GCPZero DowntimeGDPR/CCPA ComplianceCloud Architecture
INDEPENDENT SHIPPED

OB1: Exocortex Retrieval Layer

The leverage behind everything else I ship: books, engineering sources, and production lessons distilled into 1,700 atomic, cross-linked claims. The vault stays the source of truth; OB1 projects it into Supabase and serves it over MCP, so an agent in any client starts with my accumulated judgment instead of a blank context window.

1,700 Atomic Claims
MCP Agent Access
MCPSupabasepgvectorTypeScript
EXPERIMENT IN PROGRESS

Cost-Guard: FinOps Platform

Cost discipline as a shipped system, not a spreadsheet: local-first cloud cost monitoring (PGlite + ElectricSQL) with zero-latency reads, real-time sync, and what-if simulations for infrastructure spend, fed by a signed ingestion API on GCP Cloud Run. Built end to end with AI-assisted development, the same governed workflow I set for my org, proven on my own infrastructure.

Real-time Sync
Local-first Storage
SvelteKitPGliteElectricSQLGCP Cloud RunPulumi

About

Both tracks.
On purpose.

Player-coach by design

What the business gets from me is both tracks at once. Over ten years at CNBC I deliberately crossed the line most engineers pick a side of: senior engineer, then engineering manager, then back to Principal Engineer to keep my architecture judgment current, now Senior Manager, Engineering for CNBC Core. I manage a direct team of 8 engineers and 2 QE and co-lead the ~20-engineer rebuild of CNBC.com across 3 teams (web, video, and market data), and because I still architect and ship alongside them, technical decisions get made in the room. No translation layer between strategy and the codebase, no architecture that drifts from what the teams can actually deliver.

As AI Integration Lead I turned AI adoption from individual experimentation into an organizational capability: standards and PR quality gates (SonarQube, lint, Jest test automation) governing how 20+ engineers use tools like Cursor in production code, with measurable velocity gains and fewer high-severity defects, inside the security and compliance guardrails a financial-media business actually has to honor. The org ships faster because the review bar got stronger, not looser.

The coach half is just as deliberate. I recently expanded a mid-level engineer’s scope from single tasks to three concurrent workstreams (video, search, and free preview), and the coaching that mattered was not technical: they were losing rooms they were right in, so we worked on how the work gets presented to design and product until their influence caught up with their judgment. Engineers who can carry a whole surface are how a player-coach scales.

Outside the codebase I am a long-distance runner, with a 3:07 marathon and a 50K ultra, and the same discipline carries into multi-year technical transformations.

  1. 2016
    Intern
    CNBC
  2. 2017
    Software Engineer
    CNBC
  3. 2019
    Senior Engineer
    CNBC
  4. 2021
    Senior Manager, Engineering
    NBCUniversal

    First management tour.

  5. 2025
    Principal Engineer
    Versant / CNBC

    Deliberate return to the technical track through the spinoff, to keep architecture judgment current.

  6. 2026
    Senior Manager, Engineering
    Versant / CNBC

    The synthesis: a player-coach role spanning both tracks, still hands-on in core architecture.

Receipts

The numbers,
with receipts.

Every figure here is public and linked to its source: Versant's investor materials, Chrome UX Report field data, or the record of the role. Nothing that isn't publicly disclosed is stated.

Monthly uniques
47M
CNBC digital · ComScore
U.S. average monthly unique visitors, Sept 2024 to Aug 2025, as reported at Versant Investor Day. Source: Versant Investor Day, Dec 2025 · slide 66 (ComScore)
p75 LCP
1.7s
cnbc.com · CrUX field data
Chrome UX Report, all devices, July 2026, with 85% of page loads inside the 2.5s "good" threshold. Source: Chrome UX Report · origin www.cnbc.com · Jul 2026 (via treo.sh)
Direct team
8 + 2 QE
CNBC Core · Versant
Direct reports as Senior Manager, Engineering; co-leads the ~20-engineer CNBC.com rebuild across 3 teams. Source: LinkedIn · role and scope
Years shipping
10+
CNBC · NBCUniversal
Intern in March 2016 to Senior Manager, Engineering in April 2026, on the same platform. Source: LinkedIn · role and scope

Let's Build Something.

I work where agent-era engineering meets a national news platform: verification, interface performance, and the discipline that keeps machine work trustworthy. If you have strong opinions on any of the above, reach out.

Currently: Senior Manager, Engineering at Versant (CNBC Core).
Thinking about: Fail-open checks, agent verification loops, and sub-1:25 half-marathon splits.
zsh — 80x24
➜ ./connect.sh --intent=build-together
Email: [email protected]
LinkedIn: /in/zhaolyu
OPEN ↗
GitHub: /zhaolyu
OPEN ↗
➜

Fail-Closed > Fail-Open

A check that cannot say "I could not run" certifies nothing; its green eventually hides the failure it was hired to catch.

Receipts > Done

An agent declaring "done" is self-attestation, so the diff, the test run, and the artifact are non-negotiable.

Loop > Model

Agent failures are loop failures, so reliability comes from boundaries, definitions of done, and receipts, not from a smarter model.

Spec > Speed

When agents produce working code from any sufficiently precise description, the specification is the primary artifact and typing speed stops being the constraint.

ENGINEERING Sr. Manager, Engineering @ Versant
LATEST_NOTE Your Checks Are Lying to You
OFF_CLOCK Marathon 3:07 · 50K finisher
LinkedIn GitHub RSS

© 2026 Zhao Yu · Built with Svelte and Claude Code, reviewed by hand. Deployed to Cloudflare Edge.