Debugging a Production API Integration with Claude Code and ICM
I debugged a broken production API integration — code I didn't write, in a language I don't speak — without hiring a developer. The ICM is why that was possible. _____________________________________________________________________________________ We run a custom PHP middleware that keeps two platforms in sync. A developer built it. I am not a developer. It had been running degraded for months. Error logs hit 13 million lines in a 4-minute window. Inventory numbers were inflated. Customers added in one system never appeared in the other. A SQL injection vulnerability was sitting quietly in the order dashboard. Nobody touched it because nobody felt qualified to. ____________________________________________________________________________________ Before I did any debugging, I built the workspace. Not "open a chat and paste the error log." Build the folder first so the AI always has the right context for the right task. That's the ICM move. - CLAUDE.md at the root — one file mapping the entire project. What the system does, where every file lives, what each folder is for, what naming conventions to follow. Every session loads this first. - Source files pulled from the server and organized locally into subfolders by function. The server has everything flat. The local folder gives the AI structure to reason about. - A parsed log summary instead of the raw log. 13 million lines uploaded once, converted into a structured breakdown by file, line number, error type, and frequency. Every future session loads the analysis. The noise is already filtered. - A fixes folder and an archive folder. Every fix gets a doc. Every original file gets archived before it's touched. Messy work happens here without polluting the reference layer. - A routing table. A markdown table that answers "I want to do X — go here, load these." Every session goes straight to what's relevant. Once that structure was in place, the workflow was repeatable. Load context, describe the symptom, Claude reads the file and writes the fix, archive the original, deploy via the hosting file manager, update the fix doc. No terminal. No git. No local PHP environment.