Here is my global CLAUDE.md, it has only three purposes:

  • use timeouts
  • no hacks
  • route easier tasks to cheap sub-agents

When using fable, it has proven itself to be excellent at slashing costs using the sub-agents routing.


# Global rules (apply to every session)

## Command timeouts & fast diagnostics
- ALWAYS wrap a command that can hang or block in a timeout guard, and **start at `timeout 3s`**. Only start higher when there's a real, specific reason (e.g. an ssh round-trip plus remote work), and expand from 3s as needed. Applies to ssh, network fetches, `claude -p` probes, daemon reads, and anything that waits on I/O.
- Keep diagnostics fast: prefer ONE batched command over many sequential round-trips; use the shortest `sleep`/poll that works. The user actively watches and values speed — long unguarded commands and repeated long `sleep`s are unacceptable.

## Fix tooling, don't work around it
- When a tool, script, or generator has a gap that blocks the correct path (a missing flag, an unsafe default, no pause to review generated output before it ships), FIX THE TOOL — never hand-replicate its output to route around the gap. A manual workaround gets the immediate task done but leaves the gap for the next person/session to hit again; fixing the tool closes it for everyone, then you use the tool normally.
- If a genuinely one-off manual step is unavoidable, say so explicitly and get agreement first — don't silently substitute it for the tool.

## Cost-efficient orchestration
- Default posture is **orchestrator**: route each unit of work to the **cheapest model that can do it correctly**, and reserve the expensive main model for decomposition, cross-cutting design, and validating what comes back.
- **Criticality overrides cost.** Trading strategy research and analysis — anything whose answer drives a strategy or money decision (claim verification, backtest interpretation, risk assessment) — runs on the BEST model end-to-end, never downgraded. Cheap-model routing is for grunt work (mechanical fetches, boilerplate, renames), not for judgment on important questions.
- Decompose a task into modular, isolated sub-tasks. Hand each subagent a **self-contained** prompt — exact files, exact edits, acceptance criteria — never a vague goal.
- Model routing: **Haiku** for mechanical, isolated work (boilerplate, single-file edits, mechanical search/rename/lint); **Sonnet** for well-scoped multi-file implementation; keep the orchestrator (main model) for planning and the return-payload logic check.
- Delegation has real overhead: the subagent re-reads files and you re-read its payload. Only delegate a chunk when that round-trip is **cheaper than doing it inline**. Do trivial one-shot steps yourself (a lint, a one-line edit, a quick grep). **Cost efficiency is the goal — not dogmatic deferral;** blind "delegate everything" wastes tokens on ceremony.
- Route reasoning **effort**, not just model: subagents take an effort tier — set `effort: 'low'` on mechanical sub-tasks and reserve high effort for judge/verify/design stages. Cheaper even on the same model.
- **Workflows inherit the expensive session model silently.** Named/skill workflow scripts set no per-agent models, so every fan-out agent runs on the session model by default. Before launching one, edit its script to stamp the cheapest adequate model (and effort) per phase — search/fetch/mechanical → Haiku or Sonnet, adversarial verify → Sonnet, final synthesis/judgment → the main model.
- On every subagent return, **validate before accepting** — but proportionally: full logic review for design-bearing returns; for mechanical batches, spot-check and let compile/grep/tests be the validator. Deep-reviewing dozens of Haiku returns can cost more than doing the work once in Sonnet.

If you’ve used React for any serious development, you already know that it’s a few burritos short of a full Mexican fiesta. Both its tree-based prop and state management, and the complete lack of support for routing, have been pretty big gaps that have challenged a generation of developers. Here are my notes to self on finding a better path than what is suggested out of the gate.

React State Management

The need for frontend state is real, unless you made a read-only static webpage, and then you should have used HTML.

Default React state management is basically a cascading tree where the parent doles out bits of state to its children. Why is my client state rigidly baked into the structure of my UI? This naive approach doesn’t typically hold up for long.

Once I found the solution, it was like fresh oxygen. Make yourself a true data store, and manage your client state as it needs to be managed, entirely outside whatever you decide is the most intuitive UI to access that state. React now allows this, via useSyncExternalStore. It is trivial to write state setters and getters, and a clean pub/sub mechanism to broadcast changes precisely where they are needed.

React routing

React Router seems to have been cobbled together after React was delivered with nothing to offer. It didn’t happen in a straight, well-planned linear progression, that’s for sure.

Once again the default design bakes routing right into the UI elements. I can’t navigate unless I use a UI link literally scratched into the page? Fine if I’m making static text with hyperlinks. Not many people’s use case these days. But unfortunately, react-router was there early to poorly scratch the itch that React left untouched, so everyone adopted it and conformed to its opinionated approach. Approaches, really, as more band-aids were inevitably patched in.

Might as well use it, but I would not use the recommended <Link /> approach. Instead, navigate programmatically, after doing what needs to be done. Parts:

  • Maintain state of UI navigation in your datastore (eg, which components are visible)
  • Use typical Route with parameters
  • When processing user requests, take action, set state, then programmatically navigate as needed
  • To handle bookmarks, check params in component constructor, and use navigate if url params do not match datastore state

Maybe I’ll add code to this when I’m not so busy.

When I have some downtime, I tend to “reassess my life” lol. And my primary pain point in my nerd dev life has been my abusive requirements of my ever-failing browsers.

So far my best solution was terrible: use firefox for everything i can possibly use it for to support FOSS and get privacy, use ublock origin everywhere, use chrome for dev for performance, then switch to use firefox for dev when sick of problems (solved, nothing, ff has all kinds of problems too), use chrome for personal stuff that needs creditcards since FF is borked, use ff profiles – broken, use chrome profiles – broken, be told by FF that i can’t open or refresh tabs until i restart due to behind the scenes updates (this really broke my ability to justify FF), completely swear off chrome bc i don’t want big brother watching my every keystroke, have ff or chrome spew tabs everywhere on the wrong i3 desktops, go mad fixing them all…. nearly die from the stress of virtual memory hell as multiple browsers and dozens of profiles and thousands of tabs bring my machine to full lockup… BAD BAD BAD.

Brave solved it all.

It’s another chromium variant. This is excellent because it is FOSS and also enhanced beyond the things that Google has left broken in vanilla chromium. There are several chromium enhancements out there that are a huge step forward from FF or Chrome. Vivaldi is another fun one I played with. But let’s go over how Brave is leveling me up:

  • Wonderfully done multiple profiles, clearly marked with toolbar icon and color
  • Profile sync across machines with a simple set of “sync code” words
  • Profile reuse in Visual Studio Code javascript debugger (see wiki)
  • Chromium extensions support
  • Ad blockers built in, with opt-in to see ads and make money (no thanks tho)
  • Tor built in to private windows
  • One browser that does it all, saving me from gobs and gobs of memory allocations and CPU hogging trying to run multiple browsers
  • And that juicy chromium blink and V8 javascript engine speed

P.S. I LOVE you Mozilla but you need a complete rewrite in asm/C/C++ to keep up with Chromium’s performance… and STOP with the crippling freeze-on-background-updates. Please keep trying.

I was happy with Google Domains, but like everything good that they do, they killed it. Without asking for confirmation, they pushed the entirety of their DNS registrations to SquareSpace. World class, Google. It forced me to search a bit and discover that even the little guys can get Cloudflare protection, wholesale. Damn I love them.

The domain transfer process takes work, here’s a rundown of tasks:

  • At google domains, turn off autorenewal and unlock your domain
  • At cloudflare domains, add your site, extracting in the existing DNS records; it’s messy but helpful; strip out the bad ones
  • At google domains, under DNS, click the non-obvious “custom DNS servers” material-view “tab” (gross)
    • change all the DNS servers from google to cloudflare (see cloudflare instructions)
    • turn off DNSSEC by removing all records
  • Start the transfer process at cloudflare; it will make you wait until it can actually pull the updated name server changes
  • Once cloudflare sees the name changes, it will allow you to select the “Free” plan and finish setup; but that does not mean the site has been transferred yet
  • On cloudflare, continue the transfer, pasting in a transfer code you copied from google
  • Once you think everything is in place, it still won’t work until you change SSL mode from “Flexible” (WTF is that!) to Full (strict), so it properly uses my Lets Encrypt certificates.
  • Also… EVENTUALLY… you will receive confirmation email from google. Click through that and finally, google and cloudflare will confirm the transfer.

The good news is, even though the process typically requires extension of the renewal by another year (unless the last renewal was very recent), it is an extension (you don’t lose renewal time).

I bought a sweet DJI FPV drone and I’m getting certified for commercial operation. It was more work than I expected – until you consider that you are basically the pilot of an aircraft. Better know the rules of our National airspace – now with 1000 acronyms! Don’t worry, got you covered on my wiki. Soon you will be reading these crazy charts…