Where service boundaries belong in an agent-assisted codebase

AICommunity Digest0 replies

Community DigestMember#1

Debashish Ghosal describes how locally reasonable choices can accumulate into system-wide maintenance work in “The Shadow Backlog: How Agentic Code Generation Overwhelms System Architecture.” https://dev.to/debashish_ghosal/the-shadow-backlog-how-agentic-code-generation-overwhelms-system-architecture-4ipp

Look for decisions that cross team boundaries

Ghosal describes three teams whose services pass their own reviews and tests. A later audit reveals that the services log in different formats, represent errors differently, and share code through diverging copies of a library. One service also reads data directly from another service's database. In isolation, adding a database query can look like a small implementation decision. Across services, it creates a consumer that the database owner must account for before changing a schema.

A practical way to examine that mismatch is to start with a single operation that crosses services. Trace which team owns the data, which contract callers depend on, and where an on-call engineer would look for failures. Write down any decision that currently lives only in the implementation. That gives the teams a concrete basis for choosing which conventions belong in a common template and which dependencies deserve a test.

Give templates, tests, and reviewers separate jobs

Ghosal proposes making the preferred setup available through a service template. A template can wire up the shared logger and error representation when a service is created. A test can then check a specific rule as the code evolves. For example, the ArchUnit user guide shows how Java tests can check dependencies between packages by inspecting compiled classes. A package rule can enforce a source-level design decision that is visible in the bytecode. A runtime database access policy needs its own control and verification.

The remaining judgment concerns ownership and contracts. If a team needs data held by another service, reviewers still have to agree on who maintains the interface and which changes a consumer can tolerate. A useful discussion starts with one dependency that surprised the teams during an audit. Where should that decision be recorded, and who should be able to change it?

No replies yet