vibecode.sh
Blocks

Constraint

Set boundaries and limitations for the AI response

Constraint

The Constraint block sets rules, limits, and boundaries for the AI's response. It tells the AI what not to do, what limits to respect, and what guardrails to stay within. Constraints prevent unwanted behaviors and ensure outputs meet your requirements.

When to Use

Use Constraint blocks to:

  • Limit response length: Word counts, character limits, or section lengths
  • Restrict format: Only bullet points, no headers, specific structure
  • Exclude content: Topics to avoid, deprecated methods, competitor mentions
  • Enforce style rules: No jargon, formal language only, specific terminology
  • Set technical boundaries: API versions, language features, compatibility requirements
  • Ensure compliance: Legal requirements, brand guidelines, accessibility standards

How to Use

  1. Add a Constraint block to your prompt canvas
  2. State constraints clearly and specifically
  3. Use positive framing when possible ("Use only X" vs "Don't use Y")
  4. Group related constraints together
  5. Place after your core content blocks (Role, Context, Goal, Instructions)

Examples

Length and Format Constraints

Constraints:
- Response must be under 500 words
- Use bullet points for lists, not numbered lists
- Maximum 3 levels of nesting
- Each paragraph should be 2-4 sentences
- Include exactly one code example

Technical Constraints

Technical requirements:
- Use only ES2020 JavaScript features (no ES2021+)
- Must work in Node.js 16 and all modern browsers
- No external dependencies allowed
- Must handle null and undefined inputs gracefully
- Avoid async/await in favor of Promises for this codebase

Content Constraints

Content rules:
- Do not mention competitor products by name
- Avoid technical jargon - explain concepts simply
- Do not make claims about performance without data
- Never use phrases like "game-changing" or "revolutionary"
- Do not include pricing information

Tone and Style Constraints

Writing constraints:
- Professional but approachable tone
- Active voice only - no passive constructions
- No exclamation points
- Avoid hedge words (might, perhaps, possibly)
- No emojis or informal abbreviations

Compliance Constraints

Compliance requirements:
- All medical information must include "consult a healthcare provider" disclaimer
- Do not collect or reference personal health information
- Cite sources for any statistical claims
- Include accessibility considerations for all UI suggestions

Tips

  • Be explicit: "Keep it short" is vague; "Under 200 words" is clear
  • Explain the why when helpful: "No inline styles (we use CSS modules)" prevents workarounds
  • Prioritize constraints: If they conflict, which wins?
  • Test your constraints: Try to break them to see if they are airtight
  • Combine with positive guidance: Constraints say what not to do; pair with instructions for what to do
  • Update based on results: If outputs consistently violate a soft rule, add it as a constraint

On this page