Deck Slide Classification & Placement Overhaul
Rewrote the deck screenshot classification, naming, and injection system to fix two core problems: (1) Claude Vision was misclassifying slides because it only had 7 vague categories to choose from, and (2) the injection agent was spamming sections with duplicate, poorly-placed im…
Changelog - 2026-03-10
Deck Slide Classification & Placement Overhaul
Rewrote the deck screenshot classification, naming, and injection system to fix two core problems: (1) Claude Vision was misclassifying slides because it only had 7 vague categories to choose from, and (2) the injection agent was spamming sections with duplicate, poorly-placed images.
Problem Statement
The Metabologic deck exposed both issues clearly:
| Slide Content | Old Classification | Correct Classification |
| Fundraising status, use of funds | product | fundraising |
| Value proposition / mechanism of action | product | solution |
| Brand positioning / D2C website | product | branding |
| Unit economics / margins table | product | unit-economics |
| AI platform track record / publications | product | technology |
5 of 11 screenshots were labeled "product" because the old system only offered 7 categories and Claude defaulted to the closest match. Downstream, the injection agent then placed the same images in 4+ sections each, and the 12Ps Scorecard section received 9 images dumped at the top of the file.
What Changed
1. New Classification Guide (templates/deck-classification-guide.md)
A comprehensive markdown reference that Claude Vision reads when classifying slides. Replaces the hardcoded 7-bullet prompt.
22 categories (up from 7):
| Category | What It Covers |
overview | Company overview, mission, elevator pitch |
problem | Market/industry-level problems, systemic issues |
customer-pain | NEW — User-level frustrations, persona pain points |
ideal-customer-profile | NEW — Target personas, buyer segments, beachhead market |
solution | Conceptual "how we solve it" |
product-demo | Actual UI screenshots, physical product photos |
value-proposition | Key benefits, "why us" |
technology | Architecture, science mechanisms, IP/patents, R&D |
business-model | Revenue model, pricing, monetization structure |
unit-economics | Margins, COGS, LTV/CAC, per-unit profitability |
market-size | TAM/SAM/SOM, market growth |
competitive-positioning | 2x2 matrices, feature comparison grids |
competition-landscape | Competitor lists, market maps |
traction | Growth metrics, milestones, KPIs |
team | Team photos, bios, org charts |
go-to-market | GTM strategy, channels, funnels |
fundraising | Round details, use of funds, investor logos |
financials | Projections, P&L, runway |
partnerships | Strategic partners, ecosystem diagrams |
branding | Packaging, D2C website, brand identity |
vision | Long-term roadmap, big-picture plans |
impact | Social impact, ESG, sustainability |
Each category includes:
What to use it for
Visual signals to look for
Explicit "Not this category" guidance
Example filename slugs
Suggested Placement in Memo — tells the injection agent where in the section to place the image
Also includes:
12 ambiguity tiebreaker rules (e.g., "data beats narrative", "specific beats general")
Section mapping tables for all 3 outline types (Direct Investment, 12Ps, Fund Commitment)
Slides-to-skip guidance
5 placement rules (max-2 placements, one primary section, header-aware insertion, Key Slides gallery, excluded sections)
2. Deck Analyst Updates (src/agents/deck_analyst.py)
Classification guide loading:
New
load_classification_guide(firm=None)function searches firm-scoped path first (io/{firm}/templates/), then project-leveltemplates/Full guide passed as context to Claude Vision in
identify_visual_pages()
identify_visual_pages() rewrite:
Bumped rendering resolution from 0.3x to 0.5x (tables and charts now readable)
Bumped max_tokens from 2000 to 4000 (more categories = longer response)
Now requests
slugfield (2-5 word descriptor per slide)Falls back to inline category list if guide file is missing
New filename format:
Old: page-02-product.png
New: page-02-fundraising-pre-seed-use-of-funds.pngbuild_section_to_screenshots() rewrite:
Old: many-to-many fanout mapping (every image fanned out to every vaguely-related section keyword)
New: returns
{"images": [...], "key_slides": [...]}where each image has oneprimary_sectionKey slides pre-selected: top 5 by priority category (traction, unit-economics, team, market-size, etc.)
Removed old mappings:
SECTION_TO_DECK_TOPICS— was the root cause of many-to-many fanoutDECK_TOPIC_TO_SCREENSHOT_CATEGORY— replaced by direct category-to-section mapping
Updated SCREENSHOT_CATEGORY_TO_SECTION:
Expanded from 7 entries to 22, matching all new categories
3. Injection Agent Rewrite (src/agents/inject_deck_images.py)
Complete rewrite with 5 placement rules:
Rule 1: Maximum 2 placements per image.
Global placement_count dict tracks every image path. No image appears more than twice in the memo.
Rule 2: One primary section per image.
CATEGORY_TO_SECTION_KEYWORDS maps each category to primary and fallback section keywords. Each image matches at most one body section.
Rule 3: Header-aware insertion. Images placed after the best-matching header within a section (scored by keyword overlap with category + slug). No more prepending image walls at the top of files.
Rule 4: Key Slides gallery.
Appends ## Key Slides to Executive Summary with up to 5 high-signal slides. Only the injection agent creates this section.
Rule 5: Excluded sections. Scorecard, recommendation, closing-assessment, and investment-thesis sections receive no images.
Better alt text:
Old: 
New: Data Flow (Before vs After)
Before
Claude Vision (7 categories, 0.3x resolution)
→ page_selections: [{page: 2, category: "product"}, ...]
→ Screenshots saved: page-02-product.png
→ build_section_to_screenshots():
SECTION_TO_DECK_TOPICS × DECK_TOPIC_TO_SCREENSHOT_CATEGORY
= many-to-many fanout (same image under 5+ section keywords)
→ inject_deck_images:
substring match keyword → section name
prepend ALL matching images at top of each section
= same image in 4 sections, 9 images in scorecardAfter
Claude Vision (22 categories, 0.5x resolution, full classification guide)
→ page_selections: [{page: 2, category: "fundraising", slug: "pre-seed-use-of-funds"}, ...]
→ Screenshots saved: page-02-fundraising-pre-seed-use-of-funds.png
→ build_section_to_screenshots():
Each image → one primary_section based on category
Top 5 selected for key_slides gallery
→ inject_deck_images:
category → one section file via CATEGORY_TO_SECTION_KEYWORDS
insert after best-matching header (not prepended)
global placement_count enforces max 2
append Key Slides gallery to Executive Summary
skip scorecard/recommendation sectionsFiles Changed
| File | Change |
templates/deck-classification-guide.md | NEW — Full classification guide with 22 categories, placement rules, ambiguity rules, section mapping tables |
src/agents/deck_analyst.py | Updated category mappings, added load_classification_guide(), rewrote identify_visual_pages() and build_section_to_screenshots(), updated filename format |
src/agents/inject_deck_images.py | REWRITTEN — Header-aware placement, max-2 enforcement, Key Slides gallery, excluded sections, descriptive alt text |
Migration Notes
Breaking change to
0-deck-analysis.jsonformat:section_to_screenshotsis now{"images": [...], "key_slides": [...]}instead of the old{"keyword": ["path", ...]}flat dict. The injection agent detects the legacy format and prints a message to re-run the deck analyst.Screenshot filenames changed: Old
page-02-product.png→ newpage-02-fundraising-pre-seed-use-of-funds.png. Existing screenshots won't be renamed; only new runs produce the new format.No changes to workflow graph: The agent sequence (
draft → inject_deck_images → enrich_trademark) is unchanged.
Related Documentation
templates/deck-classification-guide.md— The classification guide (source of truth for categories)context-vigilance/Format-Memo-According-to-Template-Input.md— Outline-based architectureCLAUDE.md— Updated architecture section references