adam bien's blog

Inside a Business Component (BC): Boundary, Control, Entity (BCE) 📎

A business component (BC) is a package named after a single responsibility. Inside are up to to three sub-packages, always the same three names:

  • boundary: the public API of the component. Coarse-grained, simple, opinionated.
  • control: fine-grained, generic functions and methods.
  • entity: the data.

Boundary, control, entity is the maximum, not a requirement. A component takes only the layers its responsibility needs. From zsmith, an agent harness:

  • skills has all three. A public API, enough logic for a control, and its own data.
  • memory is boundary and entity, no control. The logic is simple enough to sit in the boundary.
  • claude, configuration, and llm are control only. claude is the class that talks to Anthropic, configuration reads properties. No exposed API, no data of their own.

The tools component shows all three from the implementation side:

zsmith.tools
├── boundary   execute a tool, check whether it runs in parallel
├── control    the tool implementations, like the read-file tool
└── entity     the annotations, the tool result, the tool use

The three layers have been stable since 1992. They never changed, there were no version updates, and they are well described across books and articles. That stability is also why LLMs work well with them.