A court app mixes Claude orchestration logic inside UI controllers. What design change improves ownership?
Select an answer to reveal the explanation.
Short Explanation
If the clerk screen and the Claude brain share one tangled controller, nobody owns either. Separate orchestration from the UI so each has a clear desk.
Full Explanation
Court apps that mix Claude orchestration logic inside UI controllers should separate Claude orchestration from UI controllers for clearer ownership. Modular separation works because orchestration (prompt assembly, tool calls, retries, schema validation) has different change rates and test needs than screen controllers (layout, accessibility, clerk interaction). Dedicated modules clarify who owns failures, enable reuse across multiple court screens, and keep network and model concerns out of view code. Encapsulating Claude orchestration inside reusable UI components fails by concept: it bundles model logic with UI components, so ownership stays split across screens and a single policy change still requires editing many component files. Moving UI state updates into Claude tool handlers fails by concept: tool handlers should execute model actions, not own screen state, so rendering becomes coupled to model calls and the UI controller loses control over updates. Centralizing UI formatting and Claude prompts in view controllers fails by concept: it keeps prompt assembly and model calls inside the very controllers that should only bind user actions, so ownership stays tangled and formatting logic cannot be reused independently. Exam caveat: separation of modules does not by itself enforce least privilege—orchestration services still need scoped credentials for court data—and UI must still handle loading and error states when orchestration fails. Operational check: extract Claude call sequencing from a court UI controller into an orchestration module with unit tests, leave the controller responsible only for binding user actions to that module, and verify a policy change requires editing one orchestration module rather than fanning edits across reusable UI components.