Promptles
Prompt Engineering Basics

Constraints

beginner

Definition

Boundaries you set on what the AI should or shouldn't do. Constraints prevent unwanted changes: like modifying files you didn't ask about, adding dependencies, or changing existing behavior.

In the wild

'Add a dark mode toggle to the header. Don't change any existing styles or modify other components. Use only CSS variables that already exist in theme.css.' The constraints keep Claude focused on exactly what you want changed.

More from Prompt Engineering Basics