The anatomy of a structured
prompt
Lesson 1 taught you what to include in a prompt. This lesson teaches you how to organize it. You'll learn a 6-section template, delimiter patterns, and walk away with 3 copy-paste templates you can use immediately.
The Insight
A prompt is a document, not a sentence
Most people write prompts like text messages — one unbroken paragraph that mixes the request, constraints, context, and desired format into a single stream of consciousness.
Effective prompts look more like well-organized documents. They have clear sections, each serving a distinct purpose. The AI can parse sectioned prompts more accurately because each instruction type is isolated and unambiguous.
Same information, different structure. Both prompts contain the same requirements. But the structured version is scannable, unambiguous, and easier for the AI to parse into distinct instructions. Sections eliminate the guesswork.
The Template
Six sections of a complete prompt
Not every prompt needs all six. But knowing the full anatomy lets you pick the right sections for each situation. Think of this as the maximum template — scale down as needed.
System / Role
01Set the AI's identity and expertise level. This anchors everything that follows — a 'senior security engineer' interprets the same task differently than a 'junior frontend developer'.
Context
02Provide background the AI can't infer: your tech stack, what you've tried, existing constraints, team conventions. Think of it as the briefing document before a meeting.
Task
03The core instruction. Be precise about the action, scope, and acceptance criteria. A good task section reads like a well-written ticket — anyone could pick it up and deliver the right thing.
Rules & Constraints
04Guardrails that prevent the AI from going off-track. Include what to avoid, performance requirements, style guidelines, and hard limits. Constraints focus the output dramatically.
Output Format
05Specify exactly what the deliverable looks like: file structure, language, format, length, sections. This is the difference between getting raw text you need to reshape vs. getting exactly what you need.
Examples
06Show the AI what good output looks like. Even one example dramatically improves consistency. This is called 'few-shot prompting' — you're teaching by demonstration, not just description.
Technique
Delimiter patterns
How you separate sections matters. Delimiters create visual and semantic boundaries that help the AI parse your intent. Here are the four most effective patterns.
Markdown Headers
RecommendedClean, readable, universally understood
XML Tags
Best for nesting and complex multi-part prompts
Triple Dashes
Simple visual separator between blocks
Labeled Blocks
Compact format good for shorter prompts
Pick one and be consistent. Mixing delimiter styles within a single prompt confuses the AI about where sections begin and end. We recommend Markdown headers (##) for most use cases — they're clean, universally understood, and render nicely if you store prompts as documentation.
Templates
Copy, paste, customize
Three battle-tested templates built on the 6-section anatomy. Copy the one that fits your task, fill in the [BRACKETS], and send it. Each template is designed for a common developer workflow.
Feature Builder
For building new features, components, or modules from scratch.
Bug Hunter
For diagnosing and fixing bugs with root cause analysis.
Code Reviewer
For thorough code reviews with actionable feedback.
Practice
Your turn
Take this single-sentence prompt and expand it into a full 6-section structured prompt. Use the sections you learned above.
Checklist — fill in each section:
Key Takeaways
Remember this
Sections > sentences
Break your prompt into labeled sections. The AI parses isolated instructions more accurately than a wall of text.
Templates save time
Start with a template, then customize. You'll write better prompts in half the time once you stop starting from scratch.
Examples are the secret weapon
Section 6 (Examples) is optional but powerful. One concrete example teaches the AI more than three paragraphs of instructions.