Constraints define the way of working

The goal says what must be obtained, while scope says where to work. Constraints limit the implementation method: they prohibit unnecessary dependencies, broad refactoring, incompatible changes, and leaving the permitted area.

Constraints can be technical and procedural: discover first, plan next, clarify ambiguities, and provide a final report.

BlockExample
GoalThe operator sees and saves a note
ScopeThe form, backend flow, event, and tests
Non-goalsPayment logic and approval rules
ConstraintsNo new libraries, one new migration, small diff

Constraints for an end-to-end change

  • do not break existing endpoint contracts;
  • do not add new libraries;
  • do not edit old unrelated migrations;
  • if a schema change is needed, create one new migration;
  • preserve old records without the new field;
  • avoid a large-scale rewrite of RefundService;
  • discover the current implementation before editing.

A process frame for Claude

## Constraints
- First check the schema and related files.
- Submit a short plan before editing.
- Ask questions if a requirement is ambiguous.
- Make the smallest necessary changes.
- Run relevant checks.
- Report changed files, results, and residual risks.

Signals that boundaries were violated

  • a large diff appeared for a small feature;
  • renames or formatting appeared outside the task;
  • a dependency was added without a need;
  • a public API was changed silently;
  • an old migration unrelated to the task was fixed.
  • an unverified assumption became part of the implementation.

Final boundary checklist

  1. Goal describes a behavioral result.
  2. Current and Desired behavior are separated and verifiable.
  3. Scope covers the required end-to-end flow.
  4. Non-goals name deliberately deferred changes.
  5. Constraints define technical and procedural rules.
  6. The diff, tests, and report confirm that boundaries were not violated.

Canonical lesson source · JavaRush

Open JavaRush material