← zhaoyu.io

Engineering Notes

Architectural decisions, performance constraints, and trade-offs from production — CNBC-scale edge systems, AI-agent engineering, and the discipline that holds them together.

  • /
    Agent ArchitectureEngineering ManagementAI 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 time. It's when an agent comes back with finished work: it read the folder, edited the file…

  • /
    Agent ArchitectureReliabilityEngineering 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. Maintaining one produces no artifact; at best, nothing happens. So effort flows to building, and …

  • /
    AI EngineeringAgent ArchitectureSpecification

    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 METR result everyone cites — experienced developers who felt 20% faster while measuring s…

  • /
    Agent ArchitectureReliabilityDistributed 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 definition. It wandered out of scope because no boundary was stated. It "finished" without finishi…

  • /
    AI EngineeringSEOStructured Data

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

    Recruiters and hiring pipelines increasingly route through an AI agent before a human ever opens a tab. A portfolio site built only for a person scrolling and reading is now serving half its actual audience. So I added t…

  • /
    AI EngineeringAgent ArchitectureCareer

    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 delegating a bounded unit of work to an agent that plans, executes across multiple files, and…

  • /
    AI EngineeringProductivityMeta

    Building with AI: The Compound Advantage

    I built most of this site using Claude Code. Not as a novelty — as a deliberate workflow. The components you're reading, the type errors that blocked deployment, the engineering notes you're reading: almost all of it hap…

  • /
    ArchitectureEdge ComputingIndependence

    Sovereign Resilience: Why I Over-Index on Edge Architecture

    The CNBC architecture I maintain runs at the edge: request handling, personalization logic, and cache invalidation all execute as close to the user as possible. No single region, no single cloud dependency, no single poi…

  • /
    BackendAPI DesignReliability

    Idempotency in Distributed Systems

    Working on live news infrastructure taught me that failures are not exceptional — they are scheduled. When a Fed rate decision drops at 2pm, every monitoring system, every analytics pipeline, every content update fires s…

  • /
    ArchitectureState ManagementUX

    The URL is the Source of Truth

    In modern SPAs, we often over-engineer state management stores (Redux, Zustand) for data that belongs in the URL. If a user filters a dashboard by "Status: Active" and refreshes the page, that filter should persist. If t…

  • /
    React PerformanceHCI60fps

    Decoupling State from Render in LLM Streaming

    The naive approach to building an AI chat interface is to connect a Server-Sent Events (SSE) stream directly to a React state setter. Every time a new token chunk arrives (often at sub-50ms intervals), you call setState(…