A decision often makes sense when everyone has the same information in front of them. Six months later, someone looking at the code can see what was built, but they may have no way to recover the assumptions behind it. A short record kept with the code gives them somewhere to start.
Write down the constraint
Consider an application that imports customer records every evening. The team chooses a scheduled import after finding that the supplier updates its files once a day. The reason is more useful than the schedule. If the supplier later offers timely updates, the team can see which constraint changed and reconsider the design.
Record what you know, what is uncertain and what the decision affects. In the import example that includes the expected arrival time, how long the current data can stay visible and what happens if the next file never arrives.
Include the trade-off
A decision record should name the option chosen and the other realistic option it displaced. The scheduled import might be simpler to support, but it means the application can show stale data. That has an interface consequence: display when the data was last refreshed and give staff a way to investigate a missed import.
Keep the record near the software it describes. A pull request can review the decision and the change together. When the team makes a different decision, link the new record to the old one so the reasoning remains traceable.
Make it easy to revisit
Add the event that would make you reopen the decision, such as a change to the supplier contract or a new requirement for same-day updates. A future engineer can then judge whether the constraint still applies without having to reconstruct the original discussion.