strategic-programming
Strategic programming
Leave the system easier to understand and modify. Satisfy the accepted behavior with the least custom machinery that preserves its important design, safety, and operational properties.
Apply the following lenses proportionally. They are quality criteria, not a fixed delivery protocol. Understanding precedes simplification, and every write pass proves its own final result.
Ground the change
Read the accepted implementation input—the user's bounded request or an accepted implementation specification—plus applicable project instructions, coding standards, and executable gate configuration. Trace the real caller, state, and data flow through the affected seam rather than reasoning from the named file alone.
Before editing, make each accepted requirement and protected behavior explicit and map it to planned verification evidence, including obligations that automated gates cannot establish. Reuse an existing specification's coverage; for bounded work, a short outline in the conversation is sufficient. Update the mapping as discovery reveals affected obligations.
Identify the governing invariant or policy, its authoritative source, its owner, and the callers that should not carry its hard detail. Fix a defect at the shared cause when that is the narrowest correct seam; inspect sibling callers before assuming the reported path is the whole problem.
Resolve reversible implementation choices locally. If evidence invalidates accepted behavior, a public contract, sensitive policy, or costly-to-reverse architecture, return that exact gap instead of silently redesigning the work.
Minimize owned machinery
After understanding the flow, stop at the first option that fully satisfies the accepted behavior: