OC-301e · Module 3

Managing Interaction Complexity

3 min read

Every plugin added to a system increases interaction complexity non-linearly. Two plugins have one potential interaction. Three plugins have three. Ten plugins have 45. Twenty plugins have 190. At scale, the number of potential interactions exceeds what any individual can reason about. Managing interaction complexity is the architectural challenge that determines whether a plugin system scales gracefully or collapses into unpredictable behavior.

Three strategies manage complexity. First: interaction contracts. Every plugin declares which other plugins it interacts with and the nature of the interaction — data dependency, event subscription, or resource sharing. Undeclared interactions are blocked by the sandbox. Second: interaction testing. Automated tests verify that every declared interaction between every pair of installed plugins produces expected behavior. The test suite grows with the plugin count. Third: complexity budgets. Set a maximum number of installed plugins per agent (recommend 15-20). Beyond this threshold, the interaction surface area exceeds the testing capacity, and emergent behaviors become unpredictable.

Do This

  • Require plugins to declare their interactions explicitly — undeclared interactions are invisible and untestable
  • Test pairwise interactions between all installed plugins — automated interaction tests catch emergent failures
  • Set complexity budgets: maximum 15-20 plugins per agent — beyond this, interaction complexity exceeds testing capacity

Avoid This

  • Assume plugins that pass individual tests will work together — composition creates behaviors that individual tests cannot predict
  • Add plugins without considering the interaction surface — each addition increases complexity non-linearly
  • Allow unlimited plugin installation — there is a point where adding capability decreases reliability