Blog
Long-form pieces written over time, drawing on more than one angle — your thoughts are welcome. 2 articles.
Archive
Browse by topic2026
Agent engineering notes drawn from three implementations. CoreCoder is a minimal implementation written by hand in Python, Claude Code is the production implementation, and learn-claude-code is the teaching implementation. Coverage spans the Agent Loop's transition condition and interrupt repair, tool definitions and file-editing strategy, context injection and three tiers of compression, the long-lived state of QueryEngine, parallel tools and sub-agents, the Hook and Task extension points, multi-agent collaboration, memory / MCP / background tasks / scheduled tasks, and the security defenses around paths and commands.
Transformer study notes ordered whole-first and then part-by-part: the data flow through the encoder and the decoder; the three questions to answer before learning large models (neural networks, attention, what PyTorch is made of); what Token, the word embedding matrix, and positional encoding each solve; the meaning of Q, K, and V, why the Q·K dot product stands for relevance, and why the dot product is divided by the square root of the dimension before softmax; the difference between self-attention and cross-attention, and why cross-attention needs no mask; training predicts several tokens in parallel while inference generates one token at a time, which is why a causal mask is needed to prevent peeking, implemented by setting later positions to negative infinity so that softmax turns them into 0; the definitions of the feed-forward network, multi-head attention, and layer normalization, including how layer norm and batch norm differ in which dimension they normalize over.