Writing
Long-form notes on frontend, AI engineering, and architecture.
The Six Pillars of Coding Agents (and How to Evaluate Any New Product)
Agent loop, tools, context, memory, multi-agent, and harness—one framework I use instead of chasing every new launch.
How I Use Cursor in Production (Without Losing Ownership of the Code)
Model choice, context discipline, rules, MCP, and why AI helps more on legacy code than greenfield demos—lessons from seven years of shipping web apps.
How I Structure AI-Assisted Development: SDD, Rules, Skills, and MCP
A stack I use on real repos—spec-driven changes, persistent rules, procedural skills, and MCP for design, browser, and API truth.
Optimizing INP for React Apps (Core Web Vitals)
What Interaction to Next Paint measures, how I profile it, and practical fixes for main-thread blocking, handlers, and rendering.
Frontend Permission Design: Routes, Buttons, Data Scope, and Feature Flags
How I wire backend-driven permission codes into dynamic routes, menus, action buttons, row-level scope, and gray releases in React admin apps.
Schema-Driven UI: From Hard-Coded Screens to Configurable Platforms
How I render forms, tables, and pages from JSON schema—component maps, dynamic loaders, and where permissions plug in.
Building Mini Claude Code: A Coding Agent from Scratch
How I wired workspace sandboxing, tool schemas, the agent loop, system prompts, and background dev servers—before trusting black-box agent frameworks.
Governing React SSR Hydration Mismatches in Next.js Apps
How I detect, fix, and prevent “server HTML didn't match the client”—ESLint rules, CI diff checks, and standard repair patterns.
ReAct vs Plan-and-Execute: When to Use Which Agent Pattern
Two patterns I use for tool-using agents—tight think-act-observe loops versus upfront planning with replanning on failure.
Tokens, Chinese Text, and Streaming: What Agent Builders Should Know
Why CJK prompts cost more tokens, how autoregressive generation affects tool calls, and practical budget margins for multi-step agents.
Refactoring a 500-Line React useEffect with AI (As the Architect, Not the Passenger)
A five-step prompt workflow I use on legacy admin code: analyze, extract pure logic, test, rewrite orchestration, then add features safely.
Chatbot, Copilot, or Agent? Who Owns the Loop
Same frontier models, wildly different products—the while-loop behind agents, production exit paths, and a minimal TypeScript harness.
AI Memory Is Not Chat Logs—It Is Context Budget Management
Why long conversations need truncation, summarization, and retrieval layers—and how to assemble prompts for production agents.
Beyond Storing Vectors: A Production-Style RAG Pipeline with Milvus
An EPUB semantic Q&A walkthrough—loaders, splitters, Milvus schema, retrieval parameters, and prompt boundaries that map to enterprise knowledge bases.
RAG Ingestion: Why Loaders and Splitters Come Before Vector Search
Knowledge does not arrive as LangChain Documents. How loaders normalize sources and splitters set retrieval granularity—with a web-scraping demo.
Why RAG Depends on Vector Search: From Embeddings to Semantic Retrieval
How retrieval-augmented generation works in production—why keyword search falls short, what embeddings do, and a runnable LangChain demo.