Engineering problem When implementation becomes cheap, which architectural boundaries remain worth maintaining?
The campus reservation service works. The university now wants laboratory reservations, with approval policies on their own schedule. An agent will write any of three candidate structures cheaply — and will not make establishing that the result still satisfies the system's obligations any cheaper at all. You have to decide which structure to pay for.
Background
Every architecture draws boundaries somewhere — between the code that answers an HTTP request, the code that decides whether a reservation is allowed, and the code that stores it. Moving a boundary is not free. Leaving it where it is is not free either. The engineering question is which of those two bills is larger over the work you expect to do.
Two costs are in play and they behave differently. A one-time cost is what you pay to put a structure in place: writing the new modules, then re-establishing that the system still does what it did. A per-change cost is what every future change pays while that structure stands. A weak structure is cheap to leave alone and expensive to change repeatedly; a stronger boundary is expensive to build and cheap to change. So the comparison is never between two structures — it is between two structures over a horizon, a number of future changes nobody has made yet. That is why this is a decision model and not a measurement.
What makes one change expensive is how many components it must modify. When laboratory booking rules have no module of their own, a new laboratory rule has to be threaded through whichever components happen to hold booking logic. When they do have a module, the same rule lands in one place. A dependency graph is how you see this: it shows which components a change must modify, and which others merely lie on a path from them. A path is not a change — a component that could be reached by a moved interface may turn out to need nothing. The two counts are reported separately, because a single "components affected" number would rank a structure with a narrow change-site and wide reach below one with a wide change-site and narrow reach.
Implementation and assurance are separate terms. Writing the code is one cost. Establishing that the result still satisfies the system's obligations — its behaviour, its interfaces, the properties its tests pin — is another. A capable coding agent can move the first term a long way. It does not move the second by the same factor, because assurance is mostly people reasoning about consequences. When one term falls and the other does not, the share of every restructuring that is assurance grows, and that shift decides most of the comparisons on this page.
A requirement is not a price. If laboratory changes must ship on their own schedule, a structure that cannot release them separately is not expensive — it is ineligible, at any cost. A discount can change what you should buy. It cannot buy you a requirement.
The model
Assumptions you need in order to predict
- One reservation application, at most six components, one new requirement.
- The must-modify set is declared, not derived. Each scenario states, per architecture, which components it assumes change. A dependency edge is not evidence that both ends change.
- The potentially-impacted set is derived from the graph: a path exists, towards dependents (a moved interface may reach a caller) or towards dependencies (the change may need something new). The two sets are counted separately, never summed.
- Costs are unitless model points, so only ratios mean anything. The implementation multiplier scales implementation terms only; the assurance level scales validation and integration only.
- The model is deterministic. The same controls give the same numbers — there is no sampling variability, and nothing to average out.
Illustrative simulation; not calibrated to an industrial organization. The cost estimates are illustrative. Graph structure alone does not predict change cost. Every figure that comes from an assumption is marked ▲ assumed.
| Parameter | Meaning | Unit | Default |
|---|---|---|---|
| Architecture | Which candidate structure the graph draws and the impact counts describe | A, B or C | A · Retain |
| Future changes | Expected consequential changes over the horizon | count | 12 |
| Independent release | Whether laboratory changes must ship on their own schedule | requirement | Not required |
| Implementation multiplier | Relative cost of realizing a code change, standing for agent-assisted implementation | × | 1× |
| Assurance cost | Cost of validating a change and integrating it into the running system | level | Medium |
| Quantity | What it means | Unit |
|---|---|---|
| Total modelled cost | One-time cost plus every per-change cost over the horizon, for each architecture | points |
| Margin | How far the least-cost eligible structure leads the runner-up. Under 10% the model cannot separate them | % |
| Crossover | The horizon at which a boundary first repays — the change count where the candidate stops costing more | changes |
The graph below also annotates two counts, drawn with Figure 1's encodings: how many components the change must modify, and how many a dependency path may reach. The other change scenarios, a second owning team and the change mix are in Further investigation.
The experimental procedure
Method
- 1 · Predict Read the experiment's baseline and the one parameter it changes, then commit an answer in that condition's card below. The card stays locked until you do.
- 2 · Run Reveal the condition, then set the same controls on the apparatus and read the chart. Change one parameter at a time — the implementation multiplier, then the horizon, then the independent-release requirement.
- 3 · Explain Say which control moved the ranking and which only moved the totals, and what measurement would overturn your recommendation.
-
Experiment 1 — Does a boundary repay, and after how many changes?
- Baseline
- Condition 1: one expected future change, policy changes only, one team, independent release not required, 1× implementation, Medium assurance.
- Parameter changed
- The expected number of future changes, from 1 to 20 — Condition 1 against Condition 2.
- Held constant
- Implementation multiplier, assurance level, change mix, team count, independent-release requirement.
- Predict
- At one future change, which of the three structures costs least? At twenty?
- Measurements to compare
- The total modelled cost of all three structures at each horizon, and the crossover the chart marks.
- Engineering question
- At what expected change count does paying once for a boundary beat paying per change for as long as the structure stands?
-
Experiment 2 — Does cheap implementation change which boundary is worth drawing?
- Baseline
- Condition 2: twenty expected policy changes, one team, independent release not required, at 1× implementation and Medium assurance.
- Parameter changed
- The implementation cost multiplier, from 1× to 0.01×.
- Held constant
- Horizon, change mix, team count, independent-release requirement, assurance level.
- Predict
- Which of the three structures does a hundredfold implementation discount promote?
- Measurements to compare
- The least-cost structure and the crossover, read once at 1× and again at 0.01×.
- Engineering question
- Does cheaper implementation change which boundary is worth drawing, or only when it starts to repay?
-
Experiment 3 — Can a discount buy a requirement?
- Baseline
- Condition 3: twenty expected changes of mixed kinds, two teams owning booking policy, at 0.01× implementation and Medium assurance.
- Parameter changed
- Independent release of laboratory changes, from Not required to Required.
- Held constant
- Horizon, change mix, team count, implementation multiplier, assurance level.
- Predict
- Which structure is the answer once laboratory changes must ship on their own schedule?
- Measurements to compare
- The least-cost eligible structure, and which structures the requirement excludes along with what they would have cost.
- Engineering question
- Is a requirement a cost you can discount, or a constraint that rules an option out at any price?
Controls
The three conditions — predict, then reveal
Each condition pins its own horizon, change mix, team count and requirement, so it answers the same question however the controls above are set. Each reveals at the implementation multiplier and assurance level you have selected — so you can predict once and reveal twice, which is Experiment 2.
Results
The structure under test
Interpretation
Which architecture would you choose, and what evidence would change your mind? The second half is the engineering. A ranking produced from assumptions is a hypothesis about cost; naming the measurement that would overturn it is what makes the decision reviewable.
- Which control moved the ranking, and which only moved the totals?
- Extracting services never leads on modelled cost alone. Find what does make it the answer, and say whether that is an economic argument or a requirement.
- If the margin is under 10%, the model cannot separate the two structures. What would you decide on instead?
Scratch paper. Never stored, never submitted, and it does not survive a reload — copy your answer out if you want to keep it.
Further investigation
Optional extensions and the technical record. Nothing below is needed to run the three experiments.
Model reference — the equation, every coefficient, and what this does not establish
Every number in those tables is an assumption chosen to make the comparison legible in a classroom. None is a measurement of the reservation service or of any other system. Change them in your head and ask whether the ranking survives — that question is the exercise.
What this instrument does and does not establish
- It does not predict change costs from topology. The costs are declared coefficients; the graph contributes impact paths, not prices. Nothing on this page was measured, and no figure here describes any real system.
- It does not establish which components must change. The must-modify set is an assumption attached to each scenario, stated per architecture and labelled as such.
- It is deterministic. There is no randomness and no seed: one setting of the controls gives one answer, every time. A model with sampling variability would need a distinction between a single run and an expected result; this one does not.
- It does establish two things firmly, within this model. A hundredfold implementation discount never makes extracting services preferable, at any horizon, under any setting of the other controls. And where it does change the answer it moves in one direction only — from retaining the structure to modularizing it — at a horizon of one or two changes, or from a gap the model already could not separate. It lowers the threshold at which drawing a boundary repays without changing which boundary is worth drawing.
Explore further — the other change scenarios, a second owning team, and the change mix
Three further parameters, held out of the primary interface because this laboratory makes one relationship inspectable and these open others. The storage scenario is the interesting one: the modular monolith has the smallest must-modify set and the widest possible-impact set, so a single count of affected components would rank it worst.
Change impact in detail
Architectural obligations — state a rule and read where the structure fails
An architecture is not what a diagram shows; it is what the system is held to. State the obligations as rules, then read whether the selected structure satisfies them. Introduce a violation deliberately and watch the graph mark it.
Dependency rules — checkable from the graph
Obligations a dependency rule cannot settle
Three of the five obligations are invisible to topology. A graph can show that LabPolicy does not reference RoomPolicy; it cannot show that both preserve the reservation invariants, that neither mutates shared state without coordinating, or that two independently deployed services tolerate each other's versions. Those need tests and review. Reading a clean rule report as a clean architecture is the error this panel exists to prevent.
The whole parameter space, swept in the page
All three structures, as the lecture draws them
The architectures are predefined and the graph is not editable. What you edit is the set of architectural rules above — which is the difference between describing an architecture and enforcing one.
The model's own self-tests
The engine is a pure module published as window.ArchitectureWorkbench with no
browser dependency, so the test suite under tests/ extracts it from this file and
exercises it directly. The tested text and the published text are the same bytes.