A transit squad's Claude prompt helper has grown into one untestable file. What should they do?
Select an answer to reveal the explanation.
Short Explanation
One giant prompt helper is like a bus with every route taped to the windshield. Break it into smaller modules you can actually test.
Full Explanation
Transit squads whose Claude prompt helper has grown into one untestable file should refactor that sprawling helper into smaller testable modules. Refactoring at small and large scale fits because prompt construction, policy snippets, tool wiring, and formatting concerns accrue independently; separating them restores unit-test seams, reduces regression risk when one route changes, and lets multiple engineers own clear boundaries instead of fearing a single megafile. Maintainable modules shorten civic delivery cycles when schedules, fare rules, or agency branding prompts evolve. Extracting Claude prompt strings into environment variables fails by concept: it moves strings out of the file but leaves the helper a single untestable module where duplicated logic still accelerates rot and makes consistent updates impossible. Caching Claude responses inside the helper fails by concept: it reduces repeated calls but keeps the helper a single untestable file, avoiding the testable seams needed for maintainability. Adding mocked Claude API responses to cover existing logic fails by concept: it patches the monolith with mocks but doesn't create testable seams, scattering complexity into a single file where testing and reuse remain worse. Exam caveat: adding mocked Claude API responses to cover existing logic skips characterization tests that preserve observed prompt behavior and ignores content-boundary review, leaving the helper untestable as a monolith. Operational check: extracting Claude prompt strings into environment variables doesn't involve pulling a cohesive function into its own module with unit tests or proving the payload matches a golden output; it just moves strings around, leaving the helper untestable.