Spring Boot: preserve requirements through advanced agent edits
Work through Java examples of real application boundaries: Keep Spring order confirmation and its outbox write under one proxy transaction; Require Spring method security before a scoped order mutation. Each recipe includes implementation code, integration prerequisites, failure-path tests to add, a Perch rule, and the captured broken/fixed source checks.
Download the Spring Boot rule pack ZIP · Inspect the YAML rules
Java
Repository methods may each be transactional while the service action is not. Without the outer transaction, saving the order and inserting its event can commit independently. A public proxy-invoked service method supplies the required boundary.
Broken edit flagged · corrected edit passes
Java
A controller check can disappear when a second controller or scheduled task starts calling the same service. Method security puts the coarse write permission at the service boundary. The repository must still put tenant and owner predicates into its conditional update.
Broken edit flagged · corrected edit passes
Use a correction as a saved requirement
Choose the failure you need to prevent, add the scoped rule to your repository, and check both the broken and corrected implementation. Ask your agent to inspect the finding, repair the code and recheck the same rule. Keep framework tests beside the model check.
Perch keeps the requirement beside the code. Reuse the named check during the agent’s next edit and in CI, with cached answers free on unchanged requests.
Official Spring Boot documentation · All language and framework recipes