Skip to content

Commit aa5450b

Browse files
ofriwclaude
andcommitted
Add codeExecution slide type to presentation generator
Adds documentation and examples for new slide type that visualizes step-by-step execution flows with semantic color-coding (human/prediction/execution/feedback/summary). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b1ebc36 commit aa5450b

File tree

1 file changed

+77
-3
lines changed

1 file changed

+77
-3
lines changed

scripts/generate-presentation.js

Lines changed: 77 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ SLIDE TYPES:
119119
1. **Title Slide**: Lesson title, learning objectives
120120
2. **Concept Slide**: Key idea with 3-5 bullet points
121121
3. **Code Example Slide**: Code snippet with context
122-
4. **Comparison Slide**: Effective vs ineffective patterns
123-
5. **Visual Slide**: Custom component (CapabilityMatrix, etc.)
124-
6. **Key Takeaway Slide**: Summary of section or lesson
122+
4. **Code Execution Slide**: Step-by-step visualization of execution flows (agent loops, algorithms, workflows)
123+
5. **Comparison Slide**: Effective vs ineffective patterns
124+
6. **Visual Slide**: Custom component (CapabilityMatrix, etc.)
125+
7. **Key Takeaway Slide**: Summary of section or lesson
125126
126127
HANDLING CODE BLOCKS:
127128
@@ -139,6 +140,37 @@ For presentation slides:
139140
✗ Don't include every code example from the lesson
140141
✗ Don't show code without explaining its purpose
141142
143+
CODE EXECUTION SLIDES:
144+
145+
Use the "codeExecution" slide type to visualize step-by-step processes like:
146+
- Agent execution loops (human input → LLM prediction → agent execution → feedback)
147+
- Algorithm execution flows
148+
- Request/response cycles
149+
- Multi-step workflows
150+
151+
Structure with highlightType for semantic color-coding (uses design system colors):
152+
- **"human"** (white/neutral): Engineer/operator input, commands, task specifications, explicit constraints
153+
- **"prediction"** (purple): LLM predictions, reasoning, decisions, "I will..." or "I should..." statements
154+
- **"execution"** (green): Agent/software tool calls, deterministic actions (Read, Edit, Bash commands)
155+
- **"feedback"** (purple light): Data/results returned from operations, outputs that LLM receives
156+
- **"summary"** (white/neutral): Loop conditions, conclusions, final outcomes
157+
158+
SEMANTIC RULES (critical for correct color coding):
159+
✓ "Engineer specifies task:" → human (operator input)
160+
✓ "LLM predicts:" or "LLM decides:" → prediction (thinking/planning)
161+
✓ "Agent executes: Read(...)" → execution (tool call)
162+
✓ "File content returned:" → feedback (operation result)
163+
✓ "LLM receives and predicts:" → prediction (NOT feedback - it's the prediction after receiving)
164+
✓ "Loop continues until..." → summary (loop condition)
165+
166+
✓ Use for "how it works" explanations (3-8 steps typical)
167+
✓ Include annotations to explain WHY each step happens
168+
✓ Show the complete cycle from start to finish
169+
✓ Maintain semantic consistency: what's DOING the action determines the type
170+
✗ Don't use for static code examples (use "code" type instead)
171+
✗ Don't create more than 10 steps (split into multiple slides if needed)
172+
✗ Don't confuse "LLM receives data and predicts" (prediction) with "data returned" (feedback)
173+
142174
SPEAKER NOTES GUIDELINES:
143175
144176
For each slide, provide speaker notes with:
@@ -204,6 +236,48 @@ You must generate a valid JSON file with this structure:
204236
"caption": "Brief explanation",
205237
"speakerNotes": { ... }
206238
},
239+
{
240+
"type": "codeExecution",
241+
"title": "Agent Execution Loop Example",
242+
"steps": [
243+
{
244+
"line": "Engineer specifies: 'Add authentication middleware'",
245+
"highlightType": "human",
246+
"annotation": "Human provides explicit task and constraints"
247+
},
248+
{
249+
"line": "LLM predicts: 'I should read existing auth patterns'",
250+
"highlightType": "prediction",
251+
"annotation": "Token prediction drives next action"
252+
},
253+
{
254+
"line": "Agent executes: Read(src/middleware/auth.ts)",
255+
"highlightType": "execution",
256+
"annotation": "Deterministic tool execution"
257+
},
258+
{
259+
"line": "File content returned to context",
260+
"highlightType": "feedback",
261+
"annotation": "Operation result available to LLM"
262+
},
263+
{
264+
"line": "LLM analyzes patterns and predicts: 'I'll use JWT approach'",
265+
"highlightType": "prediction",
266+
"annotation": "Prediction incorporates new context"
267+
},
268+
{
269+
"line": "Agent executes: Edit(src/app.ts, old, new)",
270+
"highlightType": "execution",
271+
"annotation": "Code modification"
272+
},
273+
{
274+
"line": "Loop continues until tests pass",
275+
"highlightType": "summary",
276+
"annotation": "Iteration condition"
277+
}
278+
],
279+
"speakerNotes": { ... }
280+
},
207281
{
208282
"type": "comparison",
209283
"title": "Ineffective vs Effective",

0 commit comments

Comments
 (0)