🎯 Lesson Objectives
By the end of this lesson, you will:
- Master the C.I.C. Framework (Context, Instruction, Constraint)
- Write structured prompts that get consistent results
- Know how to transform vague ideas into clear prompts
- Have a repeatable formula for any prompting task
📖 Introduction: A Simple Formula That Works
Writing great prompts doesn't have to be guesswork. There's a simple formula that works every time:
The C.I.C. Framework
C = Context — Set the stage (who, what situation)
I = Instruction — Define the task (what to do)
C = Constraint — Specify limits (requirements, restrictions)
Think of it like ordering at a restaurant:
📝 C = Context (Set the Stage)
Context tells AI who it should be and what situation it's in.
What Context Does
- Sets the expertise level AI should use
- Defines the perspective to take
- Establishes the situation or project type
Context Template:
"You are a [role/expertise] working on [type of project/situation]."
Good Context Examples:
| Context | What It Tells AI |
|---|---|
| "You are a senior React developer" | Use professional React patterns |
| "You are a patient coding tutor" | Explain things simply |
| "You are a Python expert" | Use Python best practices |
| "You are working on a professional portfolio" | Make it polished and impressive |
Context in Action:
Without Context:
Create a navigation bar
With Context:
You are a senior frontend developer building a professional corporate website.
Create a navigation bar...
The second version will produce much more professional code!
📋 I = Instruction (Define the Task)
Instruction is the core task — what you actually want AI to do.
Good Instructions Are:
- Specific — Not vague or open to interpretation
- Action-oriented — Start with a verb (Create, Build, Write, Design)
- Clear about output — What should AI deliver?
Instruction Template:
"Create/Build/Write [specific thing] that [does what/contains what]."
Good vs Bad Instructions:
🔒 C = Constraint (Specify Limits)
Constraints define boundaries, requirements, and limitations.
Common Constraint Types
| Type | Purpose | Example |
|---|---|---|
| Technology | What tools to use | "Use HTML and CSS only" |
| Style | How it should look | "Clean, modern, minimalist" |
| Include | What must be there | "Include form validation" |
| Exclude | What to avoid | "Don't use any frameworks" |
| Performance | Speed/size limits | "Keep the file under 100 lines" |
Constraint Template:
"Requirements:
- Must use [technology/tool]
- Should be [quality/style]
- Include [specific features]
- Avoid [things to exclude]"
🧩 Putting It All Together
Here's the complete C.I.C. template:
[CONTEXT]You are a [role] working on [project type]. [INSTRUCTION] Create/Build/Write [specific thing] that [does what]. [CONSTRAINTS]Requirements:- Must use [technology]- Should be [style/quality]- Include [features]- Avoid [exclusions]📖 Practice Examples
Example 1: Birthday Invitation
Complete Prompt:
Example 2: Calculator Function
Complete Prompt:
Example 3: Personal Bio Page
Complete Prompt:
🎯 Your Turn: Practice C.I.C.
Try writing a C.I.C. prompt for this scenario:
Scenario: You want a webpage that displays a single recipe nicely.
✅ Build Your Own C.I.C. Prompt
0/4📋 C.I.C. Quick Reference Card
┌──────────────────────────────────────────────┐
│ C.I.C. FRAMEWORK │
├──────────────────────────────────────────────┤
│ │
│ C = CONTEXT │
│ "You are a [role]..." │
│ Sets expertise and perspective │
│ │
│ I = INSTRUCTION │
│ "Create/Build/Write [specific thing]" │
│ The core task to accomplish │
│ │
│ C = CONSTRAINT │
│ "Must use... Should be... Include..." │
│ Boundaries, requirements, limits │
│ │
└──────────────────────────────────────────────┘
✅ Lesson Summary
Key Takeaways
- C.I.C. = Context + Instruction + Constraint — A repeatable formula
- Context sets who AI should be
- Instruction defines what to create
- Constraints specify requirements and limits
- Using C.I.C. consistently produces professional results
📝 Mini Quiz
📝 Check Your Understanding
1/3What does the first 'C' in C.I.C. stand for?