Reverse Engineering your Software Architecture with Claude Code to Help Claude Code

Nick Tune Β· article Β· 2026-10-08 Reader πŸ–₯️

Developer Experience & FlowGolden PathOrganizational LegibilityPlatform EngineeringWorld Model (Organizational)
Because coding agents' usefulness on complex, cross-repository problems is bottlenecked by lack of end-to-end system understanding, using Claude Code itself to reverse-engineer and document standardized, versioned, machine-and-human-readable flow diagrams (UI to BFF to API to DB to events) measurably improves the agent's ability to investigate real incidents β€” but this is a stopgap: the real target state is platform tooling that exposes the system as a live dependency graph so agents consult a source of truth rather than reverse-engineering it themselves.

practical Β· narrative β€” A first-person practitioner case study (explicitly 'one day of hacking around') describing an iterative process of using Claude Code to reverse-engineer and document multi-repository end-to-end flows, then feeding that documentation back to Claude Code for production-incident investigation. Ends with a forward-looking architectural claim about platform engineering's future role.

Structure

PartRole
Motivating observation: Claude Code is useful on simple stack-trace bugs but weak on complex, cross-repository support tickets because end-to-end flows span many repos and the default `/init` doesn't produce sufficient detailcontext
Setting initial context: a light requirements doc instructing Claude to map UI-to-BFF-to-API-to-DB-to-event flows in Mermaid, plus two light reference files (domain concepts, system overview) and filesystem/GitHub read permissions across sibling reposevidence
Mapping the first flow collaboratively (~2 hours), iterating on diagram format (sequence diagram rejected as unreadable; settled on horizontal swimlane flowcharts with a constrained vocabulary of valid step types)evidence
Subsequent flows map faster (~15 min each) once the pattern and requirements doc are established; author stays 'in the driving seat' on deciding flow boundaries and scopeevidence
Evolving the requirements file itself (grew to 449 lines) as a persistent, re-runnable spec so new Claude sessions can reproduce the process without a warmed-up context window; rules accumulate from observed failure modes (e.g. must read full AWS Step Functions workflow files, not infer from partial reads)evidence
Testing the payoff: feeding the flow docs back into a support-ticket investigation agent, which correctly identified the affected flow and proposed a targeted event-history verification plan instead of needing to re-derive system behavior from scratchevidence
Accuracy/hallucination risk: significant inaccuracies were found and corrected by the author; four mitigation options floated (tolerate imperfection if path-finding still works, CI-pipeline checks, periodic regeneration, dedicated verification agents/swarms)counter-evidence / qualification
Closing claim: this reverse-engineering effort is a stopgap; the real future task for platform engineering is building frameworks/tooling (e.g. Event Catalog) that expose the system as a live dependency graph so agents consult a source of truth instead of reverse-engineering itconclusion

Key terms

Propositions

Arguments

Investing a day in agent-assisted, standardized flow documentation is worthwhile even though it is acknowledged as an interim, imperfect solution. strength: medium
Explicit premises:
Implicit premises:
Inferences:

Narratives

Questions addressed

Gaps

Related documents