chapter nine

9 Architecture: The graph of programs and wires

 

This chapter covers

  • Architecture as a graph of services and the calls between them
  • Reconstructing the architecture from scattered config, with AI
  • Using AI to inventory every service, database, and external API
  • Pointing AI at each component to name its language and framework
  • Tracing one request across every service it touches, in one AI pass

Chapter 8 covered the entry points; this chapter maps the services behind them. You clone a new repository, run tree -L 2, and stare at eleven Dockerfiles, three package.json files, and a docker-compose.yml that scrolls for two pages. Your manager told you the stack was just Postgres and Node, but the compose file boots nine processes, and one of them is Elixir. If you ask two engineers how the pieces fit together, you get two different answers. The only documentation is a photo of a whiteboard from 2023, and half those services don't exist anymore. You spend the week building a mental model of the system, but you miss a payment webhook that was configured entirely through an environment variable by a team that left last year. You won't find out your model is wrong until that hidden node takes down production.

9.1 An architecture is a graph of programs and the wires between them

9.2 Four sources hold the architecture

9.3 Ask the agent to inventory every part from the config

9.4 Open each box to its real tech stack

9.5 Trace one request across the whole system

9.6 Summary