Promptles
Constraints

Preserve Existing Behavior

When refactoring patterns (callbacks to promises, classes to hooks, etc.), always tell Claude to keep the same external behavior. Without this constraint, Claude might 'improve' the logic along the way, introducing subtle bugs in the process.

Where you'll practice this

One Promptles scenario teaches this principle directly.

  • Callbacks to Async

    You have a `data-loader.js` module with three functions, `loadUsers`, `loadOrders`, and `loadInventory`, that all use the old callback pattern: `loadUsers(callback)`. Each function also has nested callbacks internally for multi-step data fetching (fetch, then transform, then…

Other principles in Constraints