Promptles
Constraints

Define the Business Logic

Business jargon is ambiguous: spell out the exact rules.

Translate business rules into explicit conditions Claude can code. Terms like 'qualified lead' or 'high-value account' mean nothing to an LLM. Spell out the exact thresholds, field names, and logic: 'company_size > 50 AND industry is SaaS AND last_activity within 30 days.' The clearer the rules, the fewer rounds of back-and-forth to get the automation right.

Where you'll practice this

2 Promptles scenarios teach this principle directly. Each one drops you into a real engineering ticket and asks you to write the prompt you'd send to Claude Code.

  • The Lead Scorer

    You have a CSV file called `leads.csv` with columns: `name`, `email`, `company`, `company_size` (integer), `industry` (string), and `last_activity` (ISO date). Your sales team wants a Python script that scores each lead based on these rules: company_size > 50 = 10 points,…

  • The Metrics Dashboard

    You have a JSON file called `events.json` containing an array of user events. Each event has `timestamp` (ISO string), `event_type` (string like 'page_view', 'signup', 'purchase'), and `user_id` (string). You want a Python script called `metrics.py` that computes three metrics:…

Other principles in Constraints