Repository navigation
Expand file tree
/
Copy pathdemo.tape
More file actions
182 lines (156 loc) · 6.68 KB
/
Copy pathdemo.tape
File metadata and controls
182 lines (156 loc) · 6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
Output demo.gif
Set Shell zsh
Set FontSize 13
Set Width 1300
Set Height 850
Set Theme "Catppuccin Mocha"
Set Padding 16
Set TypingSpeed 25ms
Set CursorBlink false
# ── Clean slate ──
Hide
Type "cd /Users/hadi.farhat/Documents/Explore/promptdiff"
Enter
Type "rm -f demo-bot.prompt"
Enter
Type "promptdiff setup --project --remove 2>/dev/null; true"
Enter
Sleep 0.5s
Type "clear"
Enter
Sleep 0.3s
Show
# ═══════════════════════════════════════════════════════
# PART 1: SCAFFOLD
# ═══════════════════════════════════════════════════════
Type "# 1. Scaffold a new prompt from a template"
Enter
Sleep 1s
Type "promptdiff new demo-bot --template support"
Enter
Sleep 2.5s
# ═══════════════════════════════════════════════════════
# PART 2: SCORE
# ═══════════════════════════════════════════════════════
Type "# 2. Score the prompt quality (0-100)"
Enter
Sleep 1s
Type "promptdiff score demo-bot.prompt"
Enter
Sleep 2.5s
# ═══════════════════════════════════════════════════════
# PART 3: STATS
# ═══════════════════════════════════════════════════════
Type "# 3. Get prompt statistics"
Enter
Sleep 1s
Type "promptdiff stats demo-bot.prompt"
Enter
Sleep 2.5s
# ═══════════════════════════════════════════════════════
# PART 4: LINT
# ═══════════════════════════════════════════════════════
Type "# 4. Lint for anti-patterns"
Enter
Sleep 1s
Type "promptdiff lint demo-bot.prompt"
Enter
Sleep 2.5s
# ═══════════════════════════════════════════════════════
# PART 5: LINT --fix
# ═══════════════════════════════════════════════════════
Type "# 5. Lint with fix suggestions"
Enter
Sleep 1s
Type "promptdiff lint demo-bot.prompt --fix"
Enter
Sleep 2.5s
# ═══════════════════════════════════════════════════════
# PART 6: DIFF
# ═══════════════════════════════════════════════════════
Type "# 6. Semantic diff with context + behavioral annotations"
Enter
Sleep 1s
Type "promptdiff diff tests/fixtures/prompts/support-agent-v3.prompt tests/fixtures/prompts/support-agent-v7.prompt --annotate --context 1"
Enter
Sleep 4s
# ═══════════════════════════════════════════════════════
# PART 7: JSON
# ═══════════════════════════════════════════════════════
Type "# 7. JSON output for CI pipelines"
Enter
Sleep 1s
Type "promptdiff lint demo-bot.prompt --json | head -20"
Enter
Sleep 2.5s
# ═══════════════════════════════════════════════════════
# PART 8: HOOK SETUP
# ═══════════════════════════════════════════════════════
Type "# 8. Install Claude Code hook (auto-lint on every edit)"
Enter
Sleep 1s
Type "promptdiff setup --project"
Enter
Sleep 3s
# ═══════════════════════════════════════════════════════
# PART 9: HOOK IN ACTION — BAD PROMPT
# ═══════════════════════════════════════════════════════
Type "# 9. Hook in action: Claude writes a bad prompt"
Enter
Sleep 1s
Type "claude -p 'Write a file called bad-demo.prompt with this exact content:"
Enter
Type "---"
Enter
Type "name: bad"
Enter
Type "version: 1"
Enter
Type "---"
Enter
Enter
Type "# PERSONA"
Enter
Type "You are a teacher."
Enter
Type "You are a lawyer."
Enter
Enter
Type "# CONSTRAINTS"
Enter
Type "Try to be brief."
Enter
Type "Keep under 100 words."
Enter
Type "Keep under 300 words.' --allowedTools Write"
Enter
Sleep 18s
# ═══════════════════════════════════════════════════════
# PART 10: HOOK IN ACTION — CLAUDE FIXES IT
# ═══════════════════════════════════════════════════════
Type "# 10. Claude self-corrects based on hook feedback"
Enter
Sleep 1s
Type "claude -p 'Fix all lint issues in bad-demo.prompt. Single role, absolute constraints, one word limit, add examples + output format + injection guard.' --allowedTools 'Read Edit'"
Enter
Sleep 20s
# ═══════════════════════════════════════════════════════
# PART 11: VERIFY CLEAN
# ═══════════════════════════════════════════════════════
Type "# 11. Score the fixed prompt"
Enter
Sleep 1s
Type "promptdiff score bad-demo.prompt"
Enter
Sleep 2.5s
# ═══════════════════════════════════════════════════════
# PART 12: CLEANUP
# ═══════════════════════════════════════════════════════
Type "promptdiff setup --project --remove"
Enter
Sleep 2s
Type ""
Enter
Type "# promptdiff: semantic diff, lint, score & Claude Code hook for LLM prompts"
Enter
Sleep 4s