octocode-cli 1.3.1 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +193 -34
  2. package/out/chunks/chunk-7476PETK.js +309 -0
  3. package/out/chunks/chunk-CVNNNSMQ.js +26 -0
  4. package/out/chunks/chunk-OQBJTZWK.js +60 -0
  5. package/out/chunks/chunk-UCZCF3BQ.js +9 -0
  6. package/out/chunks/command-help-specs-JZXVSLZ5.js +8 -0
  7. package/out/chunks/commands-XBFPLHSQ.js +8 -0
  8. package/out/chunks/help-P7TCOYAJ.js +10 -0
  9. package/out/chunks/main-help-ULF5PAQY.js +10 -0
  10. package/out/chunks/prompts-5E6VKRX5.js +8 -0
  11. package/out/chunks/spinner-URV2OX6O.js +8 -0
  12. package/out/chunks/tool-command-M6VA7P2F.js +8 -0
  13. package/out/octocode-cli.js +1 -1
  14. package/package.json +5 -3
  15. package/skills/README.md +13 -1
  16. package/skills/agentic-flow-best-practices/SKILL.md +280 -0
  17. package/skills/agentic-flow-best-practices/references/agent-collaboration-patterns.md +75 -0
  18. package/skills/agentic-flow-best-practices/references/pr-review-agent-example.md +47 -0
  19. package/skills/agentic-flow-best-practices/references/resources.md +112 -0
  20. package/skills/octocode-chrome-devtools/README.md +541 -0
  21. package/skills/octocode-chrome-devtools/SKILL.md +197 -0
  22. package/skills/octocode-chrome-devtools/agents/openai.yaml +7 -0
  23. package/skills/octocode-chrome-devtools/references/CDP_AGENT_REFERENCE.md +401 -0
  24. package/skills/octocode-chrome-devtools/references/CHROME_FLAGS.md +234 -0
  25. package/skills/octocode-chrome-devtools/references/INTENTS.md +108 -0
  26. package/skills/octocode-chrome-devtools/references/INTENTS_AUTH.md +179 -0
  27. package/skills/octocode-chrome-devtools/references/INTENTS_AUTOMATION.md +214 -0
  28. package/skills/octocode-chrome-devtools/references/INTENTS_DEBUG.md +329 -0
  29. package/skills/octocode-chrome-devtools/references/INTENTS_ENVIRONMENT.md +237 -0
  30. package/skills/octocode-chrome-devtools/references/INTENTS_INSPECT.md +263 -0
  31. package/skills/octocode-chrome-devtools/references/INTENTS_STORAGE_CONSENT.md +214 -0
  32. package/skills/octocode-chrome-devtools/references/RECOVERY.md +39 -0
  33. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS.md +43 -0
  34. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_ASYNC_WORKERS.md +345 -0
  35. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_BROWSER.md +403 -0
  36. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_OBSERVE.md +275 -0
  37. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_SPECIAL.md +18 -0
  38. package/skills/octocode-chrome-devtools/scripts/cdp-runner.mjs +503 -0
  39. package/skills/octocode-chrome-devtools/scripts/cdp-sandbox.mjs +123 -0
  40. package/skills/octocode-chrome-devtools/scripts/cdp-template.mjs +81 -0
  41. package/skills/octocode-chrome-devtools/scripts/octocode-chrome-devtools.vpn.example.json +8 -0
  42. package/skills/octocode-chrome-devtools/scripts/open-browser.mjs +362 -0
  43. package/skills/octocode-chrome-devtools/scripts/sourcemap-resolver.mjs +193 -0
  44. package/skills/octocode-chrome-devtools/scripts/undercover.mjs +226 -0
  45. package/skills/octocode-design/README.md +2 -2
  46. package/skills/octocode-documentation-writer/README.md +1 -1
  47. package/skills/octocode-engineer/README.md +1 -1
  48. package/skills/octocode-engineer/SKILL.md +4 -2
  49. package/skills/octocode-engineer/references/output-files.md +3 -3
  50. package/skills/octocode-engineer/scripts/run.js +136 -136
  51. package/skills/octocode-engineer/src/reporting/summary-md.test.ts +48 -0
  52. package/skills/octocode-engineer/src/reporting/summary-md.ts +43 -2
  53. package/skills/octocode-install/SKILL.md +1 -1
  54. package/skills/octocode-pull-request-reviewer/README.md +5 -5
  55. package/skills/octocode-pull-request-reviewer/SKILL.md +1 -1
  56. package/skills/octocode-research/AGENTS.md +1 -1
  57. package/skills/octocode-research/README.md +2 -2
  58. package/skills/octocode-research/docs/ARCHITECTURE.md +1 -1
  59. package/skills/octocode-research/scripts/server.js +191 -246
  60. package/skills/octocode-research/src/routes/github.ts +4 -21
  61. package/skills/octocode-research/src/routes/local.ts +4 -21
  62. package/skills/octocode-research/src/utils/fileContentTransform.ts +44 -0
  63. package/skills/octocode-search-skill/SKILL.md +245 -229
  64. package/skills/octocode-search-skill/references/agent-skills-guide.md +177 -0
  65. package/skills/octocode-search-skill/references/discovery-surfaces.md +162 -0
  66. package/skills/octocode-search-skill/references/fetch-and-create-locally.md +57 -0
  67. package/skills/octocode-search-skill/references/install-reference.md +130 -0
  68. package/skills/octocode-search-skill/references/references-template.md +27 -0
  69. package/skills/octocode-search-skill/references/references.md +62 -0
  70. package/skills/octocode-slides/README.md +307 -0
  71. package/skills/octocode-slides/SKILL.md +410 -0
  72. package/skills/octocode-slides/references/01-brief.md +156 -0
  73. package/skills/octocode-slides/references/02-research.md +149 -0
  74. package/skills/octocode-slides/references/03-outline.md +172 -0
  75. package/skills/octocode-slides/references/04-design.md +301 -0
  76. package/skills/octocode-slides/references/05-implementation.md +213 -0
  77. package/skills/octocode-slides/references/06-review.md +258 -0
  78. package/skills/octocode-slides/references/animation.md +281 -0
  79. package/skills/octocode-slides/references/design-system.md +316 -0
  80. package/skills/octocode-slides/references/html-templates.md +673 -0
  81. package/skills/octocode-slides/references/image-generation.md +448 -0
  82. package/skills/octocode-slides/references/resources.md +840 -0
  83. package/skills/octocode-slides/references/slide-rules.md +541 -0
  84. package/skills/octocode-slides/references/wireframes.md +727 -0
  85. package/skills/octocode-slides/scripts/animation.js +182 -0
  86. package/skills/octocode-slides/scripts/base.css +353 -0
  87. package/skills/octocode-slides/scripts/base.html +655 -0
  88. package/skills/octocode-slides/scripts/generate_image.py +221 -0
  89. package/skills/octocode-slides/scripts/navbridge.js +79 -0
  90. package/skills/octocode-slides/scripts/presenter.js +316 -0
  91. package/skills/octocode-slides/scripts/slide.html +248 -0
  92. package/skills/octocode-stats/SKILL.md +73 -0
  93. package/skills/octocode-stats/assets/template.html +1332 -0
  94. package/skills/octocode-stats/scripts/build_dashboard.mjs +407 -0
  95. package/assets/example.png +0 -0
  96. package/out/chunks/chunk-QCY7Q7YW.js +0 -389
  97. package/out/chunks/command-help-specs-CQ3RBLP6.js +0 -8
  98. package/out/chunks/commands-OCTZP2TO.js +0 -51
  99. package/out/chunks/help-XPXP46ZT.js +0 -10
  100. package/out/chunks/main-help-35HX2UDQ.js +0 -10
  101. package/out/chunks/tool-command-HOSMVLNK.js +0 -8
  102. package/skills/octocode-search-skill/INSTALL_REFERENCE.md +0 -112
@@ -0,0 +1,541 @@
1
+ # Slide Rules — Best Practices for Thinking Models
2
+
3
+ Guidance for the `octocode-slides` skill. Each rule of thumb has a rationale and is grounded in design theory, visual communication research, or empirical practice (Duarte, Reynolds, Tufte, Bringhurst, WCAG, NNGroup).
4
+
5
+ Read this before Phase 3 (Outline), Phase 4 (Design), and Phase 5 (Implementation). Treat these as strong defaults; override them when the user, source material, audience, or format clearly calls for it, and record the reason.
6
+
7
+ ---
8
+
9
+ ## 0. Audience & Depth
10
+
11
+ Before a single slide is designed, answer two questions: **Who is in the room?** and **How deep do they need to go?** Every other choice is filtered through these answers.
12
+
13
+ ### 0.1 Audience Profiling
14
+ Map the audience on two axes before starting the outline:
15
+
16
+ | Signal | What to extract |
17
+ |--------|----------------|
18
+ | **Domain expertise** | Expert / Practitioner / Informed / General |
19
+ | **Decision role** | Approver · Influencer · Implementer · Observer |
20
+ | **Emotional posture** | Skeptical · Neutral · Already bought in |
21
+ | **Time pressure** | 5-min briefing · 20-min pitch · 60-min deep-dive |
22
+ | **Context mode** | Live presentation · Async / self-read · Hybrid |
23
+
24
+ The audience profile governs everything: vocabulary, evidence type, depth, chart complexity, and pacing.
25
+
26
+ ### 0.2 Depth Levels
27
+
28
+ | Level | Description | Slide style |
29
+ |-------|-------------|-------------|
30
+ | **Executive** | Decision-makers; no time for mechanics. They need the *so what*, the risk, and the ask. | Short decks (≤10 slides). Lead with the conclusion. Stats and `closing` types dominate. No code. No implementation details. |
31
+ | **Management** | Need context, trade-offs, and progress. They care about feasibility, not implementation. | Medium decks (10–20 slides). Evidence-forward. `chart`, `two-col`, `comparison` types. High-level architecture ok. |
32
+ | **Technical** | Engineers, architects, data scientists. They distrust vague claims and need proof. | Longer decks (15–30+ slides). `code`, `chart`, `stats`, `timeline` types. Specific numbers. Real examples. Diagrams over metaphors. |
33
+ | **Mixed** | Multiple expertise levels in the same room. | Design for the least-informed on core claims; put technical depth in appendix slides. Lead with narrative, offer proof on request. |
34
+ | **Async / self-read** | No speaker. The deck carries 100% of the meaning. | Denser content is acceptable. Titles should be self-explanatory. Every chart includes its interpretation. Speaker notes become the narration. |
35
+
36
+ ### 0.3 Calibrate Vocabulary to Expertise
37
+ - **Expert audience**: use precise domain terms without definition. Avoid oversimplification — it signals disrespect.
38
+ - **General audience**: define every term on first use. Use analogies. Avoid acronyms unless universally known.
39
+ - **Mixed audience**: define in the title ("Cache Hit Rate — the % of requests served without going to the database") and use the precise term thereafter.
40
+
41
+ ### 0.4 Evidence Type Follows Audience Role
42
+ | Audience role | Most persuasive evidence |
43
+ |---------------|--------------------------|
44
+ | Approver / exec | Business outcomes, risk, ROI, competitor moves |
45
+ | Technical implementer | Working code, benchmarks, architecture diagrams, failure modes |
46
+ | Skeptic | Third-party data, before/after comparison, reproducible results |
47
+ | Already bought in | What's next, what they need to do, timeline |
48
+
49
+ ### 0.5 Depth Determines Slide Count
50
+ Avoid padding a deck to look thorough or compressing it to look concise. The right length is the minimum needed to answer the audience's core question at their depth level.
51
+
52
+ | Depth level | Target slide count |
53
+ |-------------|-------------------|
54
+ | Executive brief | 5–10 |
55
+ | Decision pitch | 8–15 |
56
+ | Technical deep-dive | 15–30 |
57
+ | Workshop / teaching | 30–60 |
58
+
59
+ Appendix slides do not count against these limits — they exist for Q&A and reference.
60
+
61
+ ---
62
+
63
+ ## 1. Content Rules
64
+
65
+ ### 1.1 The 1-1-1 Rule
66
+ **One idea. One supporting visual. One slide.**
67
+ If you cannot state what a slide communicates in a single sentence, split it into two slides. Every element on the slide should serve that single sentence.
68
+
69
+ ### 1.2 Claim Titles, Not Topic Labels
70
+ Most slide titles (except `title`, `agenda`, `section`, `closing`) should be **claim sentences** — complete assertions the audience can repeat without seeing the slide again.
71
+
72
+ | ❌ Topic label | ✅ Claim sentence |
73
+ |----------------|------------------|
74
+ | "Performance" | "API latency dropped 40% after caching" |
75
+ | "Our Team" | "Five engineers shipped this in eight weeks" |
76
+ | "Key Findings" | "Users abandon at step 3 — always" |
77
+ | "Revenue" | "Q3 revenue grew 18% YoY, driven by enterprise" |
78
+
79
+ Chart titles follow the same rule: the title IS the insight, not a generic label.
80
+
81
+ ### 1.3 Kill the Bullets
82
+ Avoid default bullet stacks. If bullets are necessary: **3–5 words per line, maximum 4 lines per slide**. Each bullet should support the title claim directly. If a bullet needs its own explanation, it is probably a new slide.
83
+
84
+ ### 1.4 The "So What?" Filter
85
+ For every piece of data or content, ask: *"So what? Does this directly support the slide's single claim?"* If not, move it to an appendix slide, speaker notes, or cut entirely.
86
+
87
+ ### 1.5 The 40% Text Cut
88
+ Dense slides routinely carry ~40% more text than necessary. Before finalizing, remove ~40% of words: tighten bullets, convert paragraph statements into titles, and turn data tables into charts.
89
+
90
+ ### 1.6 Six-Line Target
91
+ Maximum **6 lines of text** per slide (including bullets). If the content exceeds this, it belongs on two slides or in speaker notes.
92
+
93
+ ### 1.7 Data Needs Interpretation
94
+ Numbers alone are insufficient. Each data slide (chart, stats) should pair the number with its meaning: *What changed? Why does it matter? What should the audience do?* The interpretation is often the title claim.
95
+
96
+ ### 1.8 Cite Your Sources
97
+ Charts and images need short source attribution. Even one-liners at caption size (`--t-small`) are sufficient. Uncited statistics erode trust.
98
+
99
+ ---
100
+
101
+ ## 2. Visual / Design Rules
102
+
103
+ ### 2.1 The 3-Second Glance Test
104
+ A well-designed slide communicates its main point **before the presenter speaks** — within 3 seconds of appearing. Test: flip to a slide and look away. If you cannot state the point, the layout or content is wrong.
105
+
106
+ ### 2.2 Visual Hierarchy Is Mandatory
107
+ Each slide should have a **clear reading order**: what the eye should see first, second, and third. Levers to set hierarchy (in priority order):
108
+ 1. **Size** — largest element = most important
109
+ 2. **Weight** — bold for priority text
110
+ 3. **Color / contrast** — accent color on the single most important element
111
+ 4. **Position** — top-left gets read first (F-pattern); center-stage for hero layouts (Z-pattern)
112
+ 5. **Whitespace** — breathing room around the most important element signals its importance
113
+
114
+ ### 2.3 One Accent Per Slide
115
+ Use the accent color on the primary focal element — either the heading or one highlighted figure. More than 3 accent-colored elements per slide usually breaks hierarchy.
116
+
117
+ ### 2.4 The 60-30-10 Color Rule
118
+ 60% of slide area = background (`--bg`). 30% = text and supporting surfaces (`--text`, `--surface`). 10% = accent (`--accent`). This creates visual balance without crowding.
119
+
120
+ ### 2.5 Maximum 3 Colors Per Slide
121
+ `--bg`, `--text`, `--accent`. Muted values are derived from the background, not a fourth color. More than 3 distinct visible colors per slide = visual noise.
122
+
123
+ ### 2.6 Contrast Is Non-Negotiable
124
+ - `--text` / `--bg` contrast: **≥ 4.5:1 (WCAG AA)**. Target **7:1 (WCAG AAA)** for display text.
125
+ - `--accent` / `--bg`: ≥ 4.5:1.
126
+ - Gold / yellow accents only work on **dark backgrounds** — they fail AA on light.
127
+ - Validate every new color pair at `https://webaim.org/resources/contrastchecker`.
128
+
129
+ ### 2.7 Avoid Encoding Meaning by Color Alone
130
+ Color-blind viewers (8% of men) may not see red/green distinction. Add a secondary signal: shape, label, pattern, or icon.
131
+
132
+ ### 2.8 Typography: Two Fonts Maximum
133
+ One font for headings, one for body. Monospace for code. The heading font should have **character** — something deliberately chosen, not the system default. The body font should be **highly legible at 18–22pt on screen**.
134
+
135
+ ### 2.9 Type Size Floor
136
+ - **Body text**: minimum `--t-body` ≈ **18–24pt**. If content does not fit at this size, the slide has too much content.
137
+ - **Headings**: minimum `--t-title` ≈ **28–44pt**.
138
+ - **Display** (title/section slides): `--t-display` ≈ **48–64pt**.
139
+ - **Captions / metadata**: `--t-small` ≈ **14–18pt**.
140
+ - The **10/20/30 Rule** (Kawasaki): 10 slides, 20 minutes, **30pt minimum** font. If you can't fit it at 30pt, you have too much text.
141
+
142
+ ### 2.10 Type Scale on a Modular Ratio
143
+ Build font sizes on a ratio of **1.25–1.618 (Golden Ratio)**. This creates natural-feeling jumps between display, title, sub-heading, body, and caption.
144
+
145
+ | Token | Range | Use |
146
+ |-------|-------|-----|
147
+ | `--t-display` | 48–64pt | Title slide headline |
148
+ | `--t-title` | 28–44pt | Slide heading |
149
+ | `--t-sub` | 22–28pt | Sub-heading, key number |
150
+ | `--t-body` | 18–24pt | Bullets, paragraphs |
151
+ | `--t-small` | 14–18pt | Captions, footnotes |
152
+ | `--t-code` | 14–18pt | Code blocks |
153
+
154
+ ### 2.11 Line Height and Letter Spacing
155
+ - Display / title: `line-height: 1.12`, `letter-spacing: -0.02em`
156
+ - Body: `line-height: 1.6`, `letter-spacing: 0`
157
+ - Headings: `line-height: 1.25`
158
+ - Line length: **≤ 60 characters** for comfortable reading.
159
+
160
+ ### 2.12 Whitespace Is Emphasis
161
+ **≥ 40% of the slide area should be empty**. Whitespace is not wasted space — it is what makes the non-empty space feel important. Density is the enemy of retention.
162
+
163
+ ### 2.13 8pt Spacing Grid
164
+ All gaps, paddings, and margins should be multiples of 8px. This creates invisible but felt harmony. Use `--sp-2` (8px), `--sp-4` (16px), `--sp-6` (24px), `--sp-8` (32px) tokens.
165
+
166
+ ### 2.14 Proximity and Grouping (Gestalt)
167
+ - Related elements: ≤ 16px gap between them
168
+ - Unrelated elements: ≥ 48px gap between them
169
+ - Charts: keep title, chart, legend, and source label tightly grouped as one visual unit
170
+
171
+ ### 2.15 One Dominant Visual
172
+ Each slide uses **one dominant visual** — a hero image, the main chart, the central diagram. Multiple competing visuals of equal size split attention and communicate nothing.
173
+
174
+ ### 2.16 Image Quality Over Quantity
175
+ One high-resolution, purposeful image beats four small clip-art icons. Avoid staged stock photography. Prefer consistent photographic tone and cropping across the deck.
176
+
177
+ ### 2.17 Visual Style Consistency
178
+ Choose **one visual mode** across the deck: photography, illustration, or icon sets — not mixed. Icons: consistent style, size, and color weight.
179
+
180
+ ### 2.18 Data-Ink Ratio (Tufte)
181
+ **≥ 80% of chart area** should be data-bearing ink. Remove gridlines, borders, unnecessary axes, redundant labels. Chart emphasis = one accent-colored series; all others muted.
182
+
183
+ ### 2.19 Chart Type Follows Purpose
184
+ | Purpose | Chart type |
185
+ |---------|------------|
186
+ | Trend over time | Line |
187
+ | Comparing categories | Bar / Column |
188
+ | Distribution / proportion | Donut / Pie (max 5 slices) |
189
+ | Correlation | Scatter |
190
+ | Single dramatic number | Stats (`--t-display`) |
191
+
192
+ Pie charts: only for simple proportions with ≤ 5 categories. Avoid 3D charts.
193
+
194
+ For the full visual type → slide type routing (flows, images, timelines, comparisons) and chart library selection per type, see **§4.11** and `references/resources.md` § Data Visualization.
195
+
196
+ ### 2.20 Motion: Subtle or None
197
+ Animations should **reveal meaning** — e.g., building a chart series by series. Avoid decorative motion. Prefer one animation style across the deck.
198
+
199
+ ---
200
+
201
+ ## 3. Layout Rules
202
+
203
+ ### 3.1 Two Zones Per Slide
204
+ Most slides have two zones: **header** (the claim title) and **body** (supporting evidence). Keep them visually distinct.
205
+
206
+ ### 3.2 Align to One Grid
207
+ Text, images, and visual elements should snap to the same invisible grid. Inconsistent alignment reads as careless, regardless of individual quality. Use 3–4 vertical alignment lines and hold them across the deck when practical.
208
+
209
+ ### 3.3 Consistent Padding
210
+ Slide edges: `var(--pad)` on all sides, usually not tighter than `var(--sp-6)`. The 5% safe zone rule: keep live content inside a 5% inset from each edge when possible (mirrors broadcast title-safe areas).
211
+
212
+ ### 3.4 Slides Must Not Scroll
213
+ If content overflows a single screen: **split into two slides**. Scrolling breaks the visual contract of presentation and disrupts the audience's reading rhythm.
214
+
215
+ ### 3.5 Standard Aspect Ratio
216
+ Use **16:9**. It provides the clearest horizontal / vertical hierarchy and works on all modern displays and projectors. Design for 1280×720.
217
+
218
+ ### 3.6 Vary the Layout Rhythm
219
+ Avoid repeating the same centered-stack layout across every slide. Alternate between layout types (`content`, `two-col`, `stats`, `quote`, `chart`, `code`, `image`) to maintain visual momentum and signal topic transitions.
220
+
221
+ ### 3.7 Full-Bleed for Transitions
222
+ `section`, `closing`, and `quote` slides use full-bleed — vertically centered with generous padding. These act as visual reset moments in the narrative.
223
+
224
+ ### 3.8 Graphic-to-Text Balance
225
+ Aim for roughly **3 visual elements per 1 text block** in a balanced deck. Purely text-heavy or purely image-heavy decks both underperform.
226
+
227
+ ---
228
+
229
+ ## 4. Narrative & Structure Rules
230
+
231
+ ### 4.0 Storytelling Fundamentals
232
+
233
+ The five storytelling principles — **audience is the hero**, **stakes before solution**, **four emotional beats** (Discomfort → Relief → Confidence → Momentum), **specificity is credibility**, **one deliberate surprise**, **no filler slides** — live in `SKILL.md → Storytelling`. They govern all structural and content decisions before any layout or design choice is made.
234
+
235
+ This document goes deeper on the *mechanics* of each beat: how to write a problem slide that lands, how density should change across the arc, how to land a closing CTA. Read this section after the SKILL.md storytelling section — it adds detail, it doesn't replace.
236
+
237
+ ### 4.1 Pyramid Principle
238
+ **Lead with your conclusion, then support it.** Avoid making the audience wait for the big reveal. The first content slide should deliver the main claim. Subsequent slides prove it.
239
+
240
+ ### 4.2 Delivery Arc
241
+ Every deck follows three acts:
242
+ - **Opening:** Why should the audience care? Hook early with a problem, striking fact, or bold claim.
243
+ - **Middle:** Build the case — evidence, data, code, examples. Vary layout types.
244
+ - **Close:** Land the insight. Single, clear action.
245
+
246
+ ### 4.3 MECE Principle
247
+ Aim for **Mutually Exclusive and Collectively Exhaustive** points: minimal overlap between slides, and together they cover the full argument. Each slide contributes one clear piece of the proof.
248
+
249
+ ### 4.4 The Bridge
250
+ Every slide should set up a question that the next slide answers. The title of slide N should create anticipation for slide N+1. This is what makes a deck feel like a conversation, not a data dump.
251
+
252
+ ### 4.5 Contrast in the Middle
253
+ Avoid front-loading all problems and then delivering only upside. Maintain credible tension through the middle of the presentation (problem → evidence → challenge → resolution). Contrast keeps the audience engaged.
254
+
255
+ ### 4.6 Visual Metaphors for Abstraction
256
+ Use spatial metaphors (funnel, mountain, bridge, roadmap, ladder) to make abstract concepts immediately graspable. A well-chosen metaphor does the conceptual work before a single word is read.
257
+
258
+ ### 4.7 Before/After Framing
259
+ For change, migration, tooling, or UX improvements: show the before state, then the after state. The contrast does the selling.
260
+
261
+ ### 4.8 Signposting
262
+ Use an agenda slide or a progress indicator when the audience needs orientation. Disoriented audiences stop listening.
263
+
264
+ ### 4.9 One Call to Action
265
+ The closing slide should contain **one specific, actionable next step**. Multiple calls to action can cancel each other out. End with an action the audience can execute immediately.
266
+
267
+ ### 4.10 Structure First
268
+ Avoid building HTML before the narrative logic is sound. For an AI agent, the outline and ghost-outline test (§5.3) should be complete before Phase 5 begins, with user approval only when the structure is ambiguous or high-stakes. The argument should hold before visual design begins.
269
+
270
+ ### 4.11 Visual Type Follows Content Need
271
+
272
+ Before assigning any slide type, ask: *"What is the fastest way for this specific audience to grasp this single idea?"* Choose the type that answers that question. Avoid choosing a type for visual variety alone.
273
+
274
+ | Content has… | Best type | Avoid |
275
+ |-------------|-----------|------------|
276
+ | A single striking number | `stats` | paragraph describing the number |
277
+ | A sequence or process | `timeline` or Mermaid flow | bullet list |
278
+ | Two things that differ | `two-col` or `comparison` | dual bullet lists on one slide |
279
+ | System architecture / spatial relationships | `image` (real diagram) | text description |
280
+ | Working proof — actual code | `code` with highlight.js | describing what the code does |
281
+ | Quantitative trend or distribution | `chart` | table of raw numbers |
282
+ | A strong external quote | `quote` full-bleed | inline mention |
283
+ | A major topic shift | `section` | header on a content slide |
284
+ | A before vs. after state | sequential slides or `two-col` | single dense slide |
285
+
286
+ **Flows and diagrams:** add them when the relationships between components are easier to understand visually than verbally. Validate nodes and edges with sources; if the structure is uncertain, use a placeholder or ask the user.
287
+
288
+ **Images:** prefer images that show something concrete — a real UI screenshot, an actual architecture diagram, a direct before/after comparison. Avoid stock/mood imagery unless the deck's purpose is explicitly atmospheric or brand-led.
289
+
290
+ ---
291
+
292
+ ## 5. Logical Flow Between Slides
293
+
294
+ Flow is what turns a collection of slides into an argument. Each slide should earn its position in the sequence. If you removed a slide and the deck still made sense, the slide may be redundant or misplaced.
295
+
296
+ ### 5.1 The Question-Answer Chain
297
+ Every slide implicitly **answers the question raised by the previous slide** and **raises the question the next slide answers**. Map the chain before writing titles:
298
+
299
+ ```
300
+ Slide 1 (title): [Raises] → "What is the problem?"
301
+ Slide 2 (problem): [Answers] "Load time is 8s" → [Raises] "Why?"
302
+ Slide 3 (root cause): [Answers] "No caching layer" → [Raises] "What did we do?"
303
+ Slide 4 (solution): [Answers] "We added Redis" → [Raises] "Did it work?"
304
+ Slide 5 (result): [Answers] "Load time is 0.4s, -95%" → [Raises] "What next?"
305
+ Slide 6 (closing): [Answers] "Ship to production by Friday"
306
+ ```
307
+
308
+ If a slide answers a question that was never raised, it is out of order. If a slide raises a question that is never answered, it is a dead end.
309
+
310
+ ### 5.2 Transition Signals
311
+ Audience disorientation happens silently — they stop following and you don't know until Q&A. Use these signals to maintain orientation:
312
+
313
+ | Transition type | Signal method |
314
+ |-----------------|---------------|
315
+ | New major topic | `section` slide (full-bleed, topic name + 1-line teaser) |
316
+ | Drill-down into detail | Subtitle references the parent claim ("Why this matters: the cache layer") |
317
+ | Return from detail | "Back to the big picture" section slide or explicit bridge in the title |
318
+ | Data that proves a claim | Title of chart slide directly references the claim it proves |
319
+ | Shift from problem to solution | Explicit `section` slide or a "Before / After" `two-col` slide |
320
+ | Shift from past to future | `timeline` slide or explicit time anchor in the title |
321
+
322
+ ### 5.3 The "Ghost Outline" Test
323
+ Before writing a single word of content: write out just the titles of every slide in sequence. Read them as a paragraph. The titles alone should tell the complete story — argument, evidence, and conclusion. If they don't, the structure is wrong before the content phase begins.
324
+
325
+ ### 5.4 Dependency Order
326
+ Present concepts in the order a new audience needs them. Avoid referencing a concept before introducing it. If slide 7 depends on understanding something from slide 12, reorder or add a bridge slide.
327
+
328
+ ### 5.5 Section Anchoring
329
+ For decks > 10 slides, use `section` slides as **structural landmarks**. Every section slide should state:
330
+ 1. The topic name (the label)
331
+ 2. Why this section exists (the 1-line teaser — what question it answers)
332
+
333
+ A section slide says to the audience: *"We're now here in the argument, and here's why."*
334
+
335
+ ### 5.6 Momentum: Vary Density by Position
336
+ Slides at the **start** of a section should be lighter — a claim or a question. Slides in the **middle** carry the evidence and complexity. Slides at the **end** of a section synthesize and lead to the next section's question. A deck that is uniformly dense has no rhythm and exhausts the audience.
337
+
338
+ | Position in section | Recommended density |
339
+ |---------------------|---------------------|
340
+ | First slide | Low — title + hook or `section` layout |
341
+ | Middle slides | High — `chart`, `code`, `two-col`, `stats` |
342
+ | Last slide in section | Medium — synthesis or bridge forward |
343
+
344
+ ### 5.7 Give Data Context
345
+ Each data slide (`chart`, `stats`, `code`) should be **preceded or followed by a slide that contextualizes it**. Data without context creates confusion. Context without data creates skepticism. The pair is the argument.
346
+
347
+ ### 5.8 Appendix Flow
348
+ Appendix slides are NOT part of the main flow. They are labeled as appendix and appear after the `closing` slide. They are prepared for anticipated questions, not delivered by default. Reference them verbally during Q&A if needed.
349
+
350
+ ---
351
+
352
+ ## 6. UX (Audience Experience) Rules
353
+
354
+ ### 6.1 Design for Scanning, Not Reading
355
+ Humans skim before they read. Expect the audience to scan for 3 seconds per slide, not read every word linearly. Every design choice should optimize for **comprehension on first glance** — not thoroughness.
356
+
357
+ ### 6.2 The Skim Test
358
+ Flip through the entire deck at 2 seconds per slide. It should feel **calm, not chaotic**. If it feels cluttered, dense, or inconsistent in the skim, something is wrong before a word is read.
359
+
360
+ ### 6.3 The Stranger Test
361
+ Show the deck to someone unfamiliar with the topic. If they can describe what each slide is about without explanation, the layout works. If they need verbal description, the design failed.
362
+
363
+ ### 6.4 The Swap Test (Anti-Template)
364
+ After building the deck: if you swapped the company name / logo with a competitor's and nothing else felt different, the design likely failed. Aim for **at least one visual decision that couldn't come from a default template**.
365
+
366
+ ### 6.5 Miller's Law — Cognitive Chunking
367
+ The human working memory holds **7 ± 2 items** (Cowan suggests 3–5). Limit each slide to **3–5 discrete visual chunks** of information. More than 7 = cognitive overload.
368
+
369
+ ### 6.6 Avoid Reading Slides Aloud
370
+ Reading every on-screen element signals that one of you is redundant. The slides are visual support for spoken ideas — not a teleprompter. If the slide contains everything you're going to say, the slide has too much text.
371
+
372
+ ### 6.7 Format-Specific Adaptation
373
+ - **Live presentation**: optimize for distance and low-light; heavier visual contrast; larger type.
374
+ - **Remote / screen-share**: reduce font size ~10–15% from live presentation defaults; test on the actual screen-share output.
375
+ - **Self-navigated / async deck**: all context needs to be on the slide; the speaker notes are the narration; consider denser content.
376
+
377
+ ### 6.8 Speaker Notes for Everything Off-Slide
378
+ Detailed explanations, caveats, citations, and transition scripts belong in **speaker notes**, not on the slide itself.
379
+
380
+ ---
381
+
382
+ ## 7. Delivery Rules
383
+
384
+ ### 7.1 The 10/20/30 Rule (Kawasaki)
385
+ **10 slides, 20 minutes, 30pt minimum font.** If you cannot make your case in 10 slides in 20 minutes, the argument or the audience needs more work, not more slides.
386
+
387
+ ### 7.2 The B-Key Rule
388
+ In live presentation, pressing `B` blacks out the screen. Use it whenever you want the audience to focus entirely on you — especially during Q&A, at transitions, and when telling a story without visual support.
389
+
390
+ ### 7.3 Time Your Rehearsal
391
+ Run the full deck at minimum once before delivering. Budget ~5 minutes for Q&A in time-boxed slots. Adjust content after the full pass — not before.
392
+
393
+ ### 7.4 Avoid Verbatim Memorization
394
+ Memorizing word-for-word means an unexpected question will derail the flow. Know the argument and the transitions — not the script. Each slide title should be the prompt that surfaces the verbal content naturally.
395
+
396
+ ### 7.5 Opening Hook Options
397
+ The first non-title slide should earn attention. Useful hooks:
398
+ - A striking number or statistic with built-in tension
399
+ - A bold contrarian claim
400
+ - A short story that mirrors the audience's lived experience
401
+ - A rhetorical question that has no comfortable answer
402
+ - A dramatic "before" state that demands a resolution
403
+
404
+ Weak hooks: "Good morning, today I'll be talking about…" and dry agenda-only openings.
405
+
406
+ ### 7.6 Strong Close Options
407
+ Avoid ending on Q&A alone. Options:
408
+ - **Call to action** — a single concrete next step
409
+ - **Memorable quote** with your own angle (not the quote alone)
410
+ - **Closing story** — a short narrative bookend to the opening
411
+ - **Restatement of the main claim** with the "so what" made explicit
412
+
413
+ ---
414
+
415
+ ## 8. Technical / HTML Rules
416
+
417
+ *Specific to the `octocode-slides` HTML implementation.*
418
+
419
+ ### 8.1 CSS Variables Only
420
+ No hardcoded `color:`, `font-family:`, or `px` sizes in slide HTML. All values come from `var(--token)`. This makes theme changes instant and consistent.
421
+
422
+ ### 8.2 One Slide = One File
423
+ Keep multiple slides in separate HTML files. The iframe-based navigation model expects one file per slide. Scrolling within a slide usually means the slide has too much content.
424
+
425
+ ### 8.3 No System Fonts
426
+ Every deck uses named Google Fonts or Fontshare fonts explicitly loaded via `<link>` in the slide's `<head>`. System font fallbacks are only for the stack's safe fallback, not the primary choice.
427
+
428
+ ### 8.4 `clamp()` for All Sizes
429
+ Use `clamp(min, preferred, max)` for `font-size` and spacing values where responsive behavior matters. Avoid single hardcoded `px` values for type. Use `calc(-1 * clamp(...))` for negative values.
430
+
431
+ ### 8.5 No-Scroll Contract
432
+ Each slide file should render entirely within `1280×720` without overflow. `overflow: hidden` on the slide root helps enforce this. If content overflows in implementation, split or simplify the slide.
433
+
434
+ ### 8.6 CDN Libraries Per-Slide Only
435
+ Load libraries (Chart.js, ECharts, uPlot, ApexCharts, D3.js, Motion, highlight.js, Mermaid.js, marked.js) in the individual slide HTML that needs them, rather than globally in `index.html`. Each iframe is an isolated document with its own dependency scope.
436
+
437
+ ### 8.7 Animations: Load on `DOMContentLoaded`
438
+ Motion.js or CSS animation sequences should fire inside a `DOMContentLoaded` listener. Animations that trigger before the iframe is visible can desync with user navigation.
439
+
440
+ ---
441
+
442
+ ## 8.8 — 8.9 Anti-Hallucination and Content Brevity Rules
443
+
444
+ ### 8.8 Never Invent Content
445
+
446
+ | What to never invent | Why |
447
+ |---------------------|-----|
448
+ | Numbers, percentages, statistics | Invented stats destroy trust when the audience checks them |
449
+ | Company names, product names, release versions | Confidently wrong names are worse than admitting uncertainty |
450
+ | Quotes or attributed statements | Misattributed quotes are uncorrectable after delivery |
451
+ | Architecture, system topology, API signatures | "Approximately right" diagrams mislead engineers |
452
+ | Timeline dates, project outcomes, team sizes | Decision-makers act on these |
453
+
454
+ **Rule:** If a fact isn't in the user's source material, a verifiable public source, or a local tool result — mark it `[NEEDS SOURCE]`.
455
+
456
+ **How to handle:** follow `SKILL.md → Hard constraints #1` — ask the user once, then apply the resolution ladder if no source arrives. Never hold the deck blocked past one unanswered ask.
457
+
458
+ ### 8.9 Brevity Rules — Slides Are Not Documents
459
+
460
+ A slide is a visual moment, not a paragraph. Apply these cuts before implementation:
461
+
462
+ | Remove | Replace with |
463
+ |--------|-------------|
464
+ | Transitional phrases ("In summary…", "As we can see…", "This demonstrates that…") | The actual claim — the title already does the transition work |
465
+ | Synonym bullets (three bullets that say the same thing differently) | One bullet with the most specific version |
466
+ | Filler connectors ("Furthermore", "Additionally", "It is worth noting that") | Delete. The next bullet already continues the thought |
467
+ | Hedging qualifiers ("may potentially", "could possibly", "in some cases") | A specific qualifier ("in 3 of 4 cases") or remove |
468
+ | Restating the title in the body | The title IS the claim. The body adds evidence or steps, not paraphrase |
469
+ | AI-style prose flourishes ("This revolutionary approach…", "By leveraging…") | Concrete noun + verb: "This cuts latency by 40%" |
470
+
471
+ **Word budget per slide element:**
472
+ - Title (claim sentence): ≤12 words
473
+ - Subtitle / byline: ≤8 words
474
+ - Bullet: ≤10 words each, ≤5 bullets total
475
+ - Stat slide big number: 1 number + 1 label + 1 source line
476
+ - Code slide: only the lines that prove the point — no surrounding scaffolding unless it's the point
477
+
478
+ ---
479
+
480
+ ## 9. Anti-Patterns (Banned by Default)
481
+
482
+ | # | Anti-pattern | Why it fails |
483
+ |---|-------------|-------------|
484
+ | 1 | Inter or Roboto as the **only** heading font | Generic; signals no design effort |
485
+ | 2 | `background-clip: text` gradient on headings | Overused AI-gen cliché; fails on dark/light boundary |
486
+ | 3 | Emoji leading every bullet or section | Infantilizes the content; inconsistent scale on projectors |
487
+ | 4 | Every slide uses the same centered-stack layout | Removes layout variety that signals topic transitions |
488
+ | 5 | Cyan + magenta + purple / pink on dark background | Neon dashboard cliché; low information signal |
489
+ | 6 | Animated glowing `box-shadow` on cards | Visually expensive; associated with low-quality UI |
490
+ | 7 | Three-dot window chrome on every code block | Decorative noise; rarely contributes to comprehension |
491
+ | 8 | Accent color on more than 3 elements per slide | Destroys hierarchy; all emphasis = no emphasis |
492
+ | 9 | Multiple radial gradient blobs as background | Gradient mesh overwhelms content |
493
+ | 10 | All-caps on body text | Reduces reading speed by ~14% (Tinker, 1963); signals shouting |
494
+ | 11 | 3D charts or perspective transforms on data | Distorts perception of magnitudes; Tufte anti-pattern |
495
+ | 12 | Bullet lists that exceed 4 items | Cognitive overload; audience abandons reading |
496
+ | 13 | Full paragraphs on slides | This is a document, not a presentation |
497
+ | 14 | "Introduction/Overview" as the title slide claim | Every presentation has one; says nothing |
498
+ | 15 | Complementary colors for text-on-background | High saturation complements vibrate and are unreadable |
499
+ | 16 | Dark navy text on dark blue background | Fails contrast; projected light makes it worse |
500
+
501
+ ---
502
+
503
+ ## 10. Named Formulas & Rules Reference
504
+
505
+ | Rule | Formula | Author |
506
+ |------|---------|--------|
507
+ | **10/20/30** | 10 slides, 20 minutes, 30pt font | Guy Kawasaki |
508
+ | **1-1-1** | 1 idea, 1 visual, 1 slide | Garr Reynolds / Duarte |
509
+ | **Glance Test** | Audience understands the point in ≤ 3 seconds | Duarte |
510
+ | **Pyramid Principle** | Conclusion first, support second | Barbara Minto (McKinsey) |
511
+ | **MECE** | Mutually Exclusive, Collectively Exhaustive | McKinsey |
512
+ | **60-30-10** | 60% bg, 30% text/surface, 10% accent | Itten / design tradition |
513
+ | **Data-Ink Ratio** | ≥ 80% of chart area should carry data | Edward Tufte |
514
+ | **Miller's Law** | Working memory: 7±2 items (Cowan: 3–5) | George Miller / Nelson Cowan |
515
+ | **6x6 Rule** | ≤ 6 bullets, ≤ 6 words each | Microsoft style guides |
516
+ | **Ignite Format** | 5 minutes, 20 slides, auto-advance 15s | O'Reilly / Ignite community |
517
+ | **Modular Type Scale** | Font sizes on a 1.25–1.618 ratio | Jan Tschichold / Robert Bringhurst |
518
+ | **WCAG AA** | Text/bg contrast ≥ 4.5:1 | W3C |
519
+ | **8pt Grid** | All spacing multiples of 8px | Material Design / Bryn Jackson |
520
+ | **F-Pattern** | Key content top-left; supporting content left-aligned | NNGroup eye-tracking |
521
+ | **Z-Pattern** | Title → hero → CTA in a Z-shape | NNGroup eye-tracking |
522
+ | **Gestalt Proximity** | Related ≤16px gap; unrelated ≥48px | Gestalt psychology |
523
+
524
+ ---
525
+
526
+ ## Quick Pre-Delivery Checklist
527
+
528
+ Before every slide is finalized, run this checklist alongside the three-lens + bidirectional check defined in `SKILL.md → Bidirectional Slide Planning`.
529
+
530
+ - [ ] **3-second test**: can a stranger state the slide's point in 3 seconds?
531
+ - [ ] **Title is a claim**: not a label; contains a verb and a specific assertion
532
+ - [ ] **One focal idea**: nothing on the slide contradicts or competes with the title
533
+ - [ ] **Font floor**: no text below `--t-small` (≈14pt); body at `--t-body` (≈18–24pt)
534
+ - [ ] **Contrast**: `--text`/`--bg` ≥ 4.5:1; `--accent`/`--bg` ≥ 4.5:1
535
+ - [ ] **Accent count**: ≤ 3 accent-colored elements
536
+ - [ ] **Whitespace**: ≥ 40% of slide area is empty
537
+ - [ ] **Scroll-free**: all content fits within 1280×720; no overflow
538
+ - [ ] **No anti-patterns**: Visual Slop ≤1/8 and Content Slop 0/8
539
+ - [ ] **Skim test**: deck feels calm when flipping at 2 seconds per slide
540
+ - [ ] **Bridge**: each slide title implies the question the next slide answers
541
+ - [ ] **CTA close**: final slide has one specific, actionable next step