Lossless Changelog
component

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 ContentOld ClassificationCorrect Classification
Fundraising status, use of fundsproductfundraising
Value proposition / mechanism of actionproductsolution
Brand positioning / D2C websiteproductbranding
Unit economics / margins tableproductunit-economics
AI platform track record / publicationsproducttechnology

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):

CategoryWhat It Covers
overviewCompany overview, mission, elevator pitch
problemMarket/industry-level problems, systemic issues
customer-painNEW — User-level frustrations, persona pain points
ideal-customer-profileNEW — Target personas, buyer segments, beachhead market
solutionConceptual "how we solve it"
product-demoActual UI screenshots, physical product photos
value-propositionKey benefits, "why us"
technologyArchitecture, science mechanisms, IP/patents, R&D
business-modelRevenue model, pricing, monetization structure
unit-economicsMargins, COGS, LTV/CAC, per-unit profitability
market-sizeTAM/SAM/SOM, market growth
competitive-positioning2x2 matrices, feature comparison grids
competition-landscapeCompetitor lists, market maps
tractionGrowth metrics, milestones, KPIs
teamTeam photos, bios, org charts
go-to-marketGTM strategy, channels, funnels
fundraisingRound details, use of funds, investor logos
financialsProjections, P&L, runway
partnershipsStrategic partners, ecosystem diagrams
brandingPackaging, D2C website, brand identity
visionLong-term roadmap, big-picture plans
impactSocial 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-level templates/

  • 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 slug field (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.png

build_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 one primary_section

  • Key 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 fanout

  • DECK_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:  ![Product slide from pitch deck](...)
New:  ![Unit Economics — unit-margins (Slide 14)](...)

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 scorecard

After

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 sections

Files Changed

FileChange
templates/deck-classification-guide.mdNEW — Full classification guide with 22 categories, placement rules, ambiguity rules, section mapping tables
src/agents/deck_analyst.pyUpdated category mappings, added load_classification_guide(), rewrote identify_visual_pages() and build_section_to_screenshots(), updated filename format
src/agents/inject_deck_images.pyREWRITTEN — Header-aware placement, max-2 enforcement, Key Slides gallery, excluded sections, descriptive alt text

Migration Notes

  • Breaking change to 0-deck-analysis.json format: section_to_screenshots is 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 → new page-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.


  • templates/deck-classification-guide.md — The classification guide (source of truth for categories)

  • context-vigilance/Format-Memo-According-to-Template-Input.md — Outline-based architecture

  • CLAUDE.md — Updated architecture section references