Engineering & Technical

The Engineer

The Signal

Claude Code's Hooks feature lets you wire deterministic shell scripts (linters

If your team uses Claude Code and hasn't configured .claude/ with enforcement hooks, you're relying on prompt engineering where you should be relying on `exit 1`.

In Play

  1. Claude Code Matures Into a Scriptable Dev Platform

    Claude Code now supports Hooks (shell scripts on PreToolUse/PostToolUse), Subagents (parallel Claude workers), and MCP for DB/API connectivity. The .claude/ directory (skills/, commands/) is becoming first-class project config. Lock-in risk is real — none of this is portable to Copilot or Codex.

    Ask Clarity
  2. Google's Memory Caching: Tunable RNN Recall at O(NL)

    Google Research introduces Memory Caching — checkpoint RNN hidden states at segment boundaries, attend selectively to cached states. Complexity is O(NL) where N = segments, a dial between O(L) RNN efficiency and O(L²) Transformer recall. GRM fusion wins. All results capped at 1.3B params — no frontier-scale validation exists.

    Ask Clarity
  3. Hybrid RNN-Attention Architectures Get a Unifying Theory

    The Memory Caching paper shows that hybrid models interleaving RNN and attention layers are a special case of their framework — segment boundaries correspond to RNN/attention block boundaries. This gives practitioners a principled lens for tuning production hybrid architectures rather than relying on ad-hoc design.

    Ask Clarity

Deep Dives

Claude Code Is Now a Scriptable Automation Platform — Configure It Like Infrastructure

From Autocomplete to Enforcement Engine

Claude Code's latest capabilities cross a threshold that matters for engineering teams: it's no longer an AI coding assistant you hope follows your conventions — it's a scriptable platform where you can enforce them deterministically. The key feature is Hooks: shell scripts that fire on PreToolUse and PostToolUse events. Wire your linter, type checker, and test runner into PreToolUse, and Claude Code physically cannot commit code that fails your pipeline. This replaces the fragile pattern of prompt-engineering compliance with hard exit 1 guarantees.

The single most important feature for production use of AI coding assistants is deterministic enforcement hooks — not better prompts.

Three Capabilities Worth Engineering Investment

  1. Hooks (highest leverage): Shell scripts on PreToolUse/PostToolUse events. Your pre-commit checks, your linting rules, your type checker — all enforceable as hard gates before any AI-generated code touches your repo.
  2. Subagents: Parallel Claude instances for multi-step workflows. Architecturally identical to a worker pool — useful for large refactors across many files, but dangerous for your API bill without concurrency controls.
  3. MCP (Model Context Protocol): Connects Claude Code to databases and APIs, making it context-aware about your actual production state rather than just your codebase.

The .claude/ Directory Is Now Infrastructure Config

The .claude/ directory — with skills/ for reusable instructions and commands/ for one-keystroke flows — plus CLAUDE.md at the project root are becoming first-class configuration surfaces. These deserve the same version control discipline as your CI/CD config, your Dockerfiles, or your Terraform modules. If your team is using Claude Code without checking these into Git, you're accumulating invisible workflow divergence across developers.


The Lock-In Tax Is Real

Here's the caveat: none of this is portable. CLAUDE.md, .claude/skills/, .claude/commands/ — zero transferability to GitHub Copilot, OpenAI Codex, or any other AI coding tool. You're building workflow capital locked to Anthropic's platform. For now, the productivity gains likely justify the investment, but be intentional about what you're committing to. If Anthropic changes pricing, deprecates features, or a competitor leaps ahead, your migration cost scales with how deeply you've configured.

Version control your .claude/ directory with the same rigor as your CI/CD pipeline — it's becoming an equally critical configuration surface.

What to do

  1. Add PreToolUse hooks for linting, type-checking, and test execution to your Claude Code setup this week

  2. Commit CLAUDE.md and .claude/ (skills/, commands/) to version control in every repo using Claude Code

  3. Document your Claude Code configuration investment in your team's tooling decision log with explicit switching-cost notes

Google's Memory Caching — A Clean Architecture Idea With a 1.3B Asterisk

The Problem and the Fix

Standard RNNs compress their entire input history into a single fixed-size hidden state — early information gets overwritten as sequences grow. Transformers solve this with full attention at O(L²) cost. Google Research's Memory Caching takes the middle path: split input into segments, checkpoint the RNN's hidden state at each segment boundary, then let subsequent tokens selectively attend to these cached states. The result is O(NL) complexity, where N is the number of cached segments — a tunable dial between pure RNN efficiency and Transformer-like recall.

GRM Wins, SSC Is the Systems Play

Of four proposed fusion methods, Gated Residual Memory (GRM) consistently outperforms: it uses input-dependent gates to weight each cached segment's relevance to the current token. This is essentially soft attention over compressed memory snapshots. The Sparse Selective Caching (SSC) variant using MoE-style top-k routing is more interesting from a systems/inference perspective — it bounds memory reads regardless of total history length, which matters when you're managing GPU memory across concurrent requests in production serving.

Hybrid RNN-attention architectures already shipping in production can be viewed as a special case of Memory Caching — this isn't just a paper trick, it's a unifying framework for what practitioners are already doing ad-hoc.

The Giant Asterisk

All experiments are capped at 1.3B parameters. The paper comes from the Google team behind Titans and MIRAS — a sustained research program, not a one-off — but 1.3B → 100B+ is not a straight line. Architectural innovations that shine at small scale frequently get absorbed by raw parameter count at frontier scale. Additionally, Transformers still dominate on the hardest needle-in-haystack retrieval tasks (UUID lookup at long contexts) even with Memory Caching applied, confirming that cached RNN states are lossy approximations of full attention.


What This Means for Practitioners

The most valuable insight is theoretical: if you're building or operating hybrid models (and many production-deployed models already interleave RNN and attention layers), Memory Caching gives you a principled framework to understand why your architecture works and how to tune it. Segment boundaries in Memory Caching correspond to the boundaries between RNN and attention blocks in hybrid designs. Track this research line — especially for inference optimization work where the O(NL) tradeoff directly maps to serving cost — but don't redesign anything around it until frontier-scale results land.

What to do

  1. Read the GRM and SSC sections of the Memory Caching paper if you work on inference optimization or custom model architectures

  2. Set a calendar reminder to check for follow-up results at 7B+ scale from the Google Titans/MIRAS team in Q3 2025

The bottom line

Claude Code's Hooks feature lets you enforce linting, type-checking, and tests as hard gates on AI-generated code — configure PreToolUse hooks this week if your team uses it. Meanwhile, Google's Memory Caching gives RNNs a tunable recall dial at O(NL) complexity, but all results are capped at 1.3B parameters — track the research, don't bet on it until frontier-scale validation arrives.