021 — claude-api journal

S1 — Finding

Implementation hit no surprises after Phase 0 investigation. Five Edit calls, one Write (redirect shim), one Bash delete. All passed on first attempt:

- Python edit: `daily_limit_usd: 25.0 → 10.0` + new `_count_today()` body - TS edit: `DAILY_CALL_LIMIT 500 → 10000` - TS edit: 403 error message cleanup - TS edit: `tier: 'operator' → 'intern'` in exa.ts (1 retry — file hadn't been re-read after session compaction) - Python edit: `scripts/exa-dry-run.py` import migration - Python edit (cleanup): canonical exa_client.py docstring + print - Python write: 9-line redirect shim at contacts financial_data path - Bash: `git rm -f` for the 2 orphan files

S2 — Blind spot

I almost rewrote the contacts financial_data file as a full copy with a "MIRROR — keep in sync" header. exa-mastery pushed back: "if it can drift, it will drift." The redirect shim is the only way to make drift impossible. Took 3 extra minutes to compute the right `..` traversal count (5 levels) but eliminated a future class of bug.

S3 — Pattern cited

The "Drop-in replacement for lib/exa_client.py" docstring claim in the deleted `exa_client_v2.py` was a lie at the moment of writing. Once the contacts copy existed, the v2 file was not the source of truth anymore — but no one updated its docstring. Pattern: when you label a file as "the replacement for X", ALSO edit X to point at the replacement. Otherwise you have two files each claiming to be the truth.

S6 — What changed about how I work

Stop hand-writing infrastructure paths. The 5-level `..` traversal for the redirect shim should have been computed by `os.path.relpath()` from a known anchor instead of manually counting `engine/contacts/backend/lib/financial_data/` in my head. Adding this to the personal checklist: any path with >2 levels of `..` should be computed, not written.

Generated from 021__claude-api.md — do not edit this HTML directly.