Skip to content

Image library: search quality, routing, Tier 1 illustrations, compression - #1510

Merged
bokelley merged 4 commits into
mainfrom
bokelley/stuttgart-v9
Mar 17, 2026
Merged

bokelley merged 4 commits into
mainfrom
bokelley/stuttgart-v9

Conversation

@bokelley

@bokelley bokelley commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Search quality and routing

  • Activate image library tool in routing so it's available in all conversation types
  • Switch search from plainto_tsquery (AND) to to_tsquery with OR-joined terms for higher recall
  • Add proactive image search directive scoped to substantive first-explanations

Tier 1 Sage illustrations

  • 12 new concept illustrations in Sage (teal) theme covering 4 certification gap areas
  • Migration 302 seeds images with enriched FTS metadata (topics, descriptions tuned for search)
Topic Images Cert modules
Brand identity (brand.json, validation, standards cascade) 3 C2, S4
MCP architecture (layers, tool registration, transport) 3 D1, D4
Sponsored Intelligence (initiation, conversation, commerce) 3 S5
Agent trust (adagents.json, discovery, authorization chain) 3 D2, A1

Image compression and tooling

  • Compressed all 79 PNGs repo-wide with pngquant (40.8MB → 15.0MB, 63% reduction)
  • Added --style flag to generate-images.ts (addie blue vs sage teal palettes)
  • Migration 301 idempotency fix (DROP TRIGGER IF EXISTS)

Follow-ups from expert reviews

  • Regenerate mcp-03-transport (visual distinction between HTTP/SSE is weak)
  • Regenerate agent-trust-01-adagents (renders smaller than others)
  • Tier 2: measurement illustrations, generative creative pipeline, reversed data flow
  • Rights management illustration for C2 module

Test plan

  • OR-based search: "governance workflow" returns 5 images (was 0)
  • E2E: Addie proactively embeds images when explaining governance
  • E2E: Admin Images > Searches/Top misses tabs working
  • Migration 302 applies cleanly on prod
  • FTS returns new images for brand identity, MCP, SI, agent trust queries
  • Compressed images render correctly in docs and chat

🤖 Generated with Claude Code

bokelley and others added 3 commits March 16, 2026 17:39
Certification is the #1 use case for images — Addie is literally
teaching governance, media buys, and creative workflows. Added explicit
guidance in both the tool reference prompt (Search list emphasizes
certification) and the teaching methodology (new step 3: illustrate
concepts visually when introducing key topics).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
plainto_tsquery ANDs all terms, so "governance workflow" returned 0 results
even though we have governance images. Switch to to_tsquery with OR-joined
terms for high recall — ts_rank still boosts results matching more terms.

Also make trigger creation idempotent in migration 301.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add debug log for generated tsquery expressions
- Use [^a-zA-Z0-9\s] instead of [^\w\s] to split on underscores too,
  so "ad_creative" becomes "ad | creative" for better recall

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@bokelley bokelley changed the title fix: reinforce image library in certification teaching fix: image library search quality and routing Mar 16, 2026
- Generate 12 new concept illustrations in Sage (teal) theme:
  brand identity (3), MCP architecture (3), SI sessions (3), agent trust (3)
- Compress all 79 PNGs with pngquant (40.8MB → 15.0MB, 63% reduction)
- Add --style flag to generate-images.ts (addie blue vs sage teal)
- Seed migration with enriched search metadata (topics, descriptions)
- Move new images to images/concepts/ (not walkthrough/)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@bokelley bokelley changed the title fix: image library search quality and routing Image library: search quality, routing, Tier 1 illustrations, compression Mar 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Image Alt Text Check Results

Commit: 3d8ded5 - feat: Tier 1 Sage concept illustrations and image compression

Checked: 60 references, 57 images validated via API

⚠️ Warnings

  • /images/walkthrough/diagram-governance-triangle.png in docs/governance/campaign/index.mdx
    • Gibberish text detected: The text 'Approved/r' is likely an abbreviation or typo.
    • Visible text: Campaign, plan, Buyer Orchestrator, 2, Approved/r, rejected response, 3, Send buy, No party grades, its own homework., 1 Plan, Governance Agent, Publisher, Seller, 4, Verify
  • /images/walkthrough/diagram-03-distribute.png in docs/creative/index.mdx
    • Gibberish text detected: The ellipsis (...) in the Social Platform approval bubble is likely a placeholder, and considered gibberish in this context.
    • Visible text: PENDING, REVIEW, sync_creatives, CTV Seller, CREATIVE, AGENCY PLATFORM, A, Display Seller, APPROVED, ..., PENDING REVIEW, - COMMUNITY, GUIDELINES, Social platform, STATUS TRACKING BOARD, CTV Seller, CTV, Display Seller, Display, Social Platform, Social
  • /images/walkthrough/diagram-04-delivery-aggregation.png in docs/creative/index.mdx
    • Gibberish text detected: لناس is garbled text.
    • Visible text: CTV SELLER, 1 VARIANT, 150K IMPRESSIONS, 72% COMPLETION, DISPLAY SELLER, 4 VARIANTS, 200K IMPRESSIONS, SOCIAL PLATFORM, 12 AI VARIANTS, 85K IMPRESSIONS + ENGAGEMENT, ..., Dashboard, لناس, AGENCY PLATFORM, MERGE BY CREATIVE_ID,, NORMALIZE TIMEZONES
  • /images/walkthrough/diagram-format-manifest-render.png in docs/creative/creative-manifests.mdx
    • Gibberish text detected: tiımı
    • Visible text: Format, Manifest, Rendered Creative, video, (required, 15s, 16:9), headline, (required, max 30 chars), logo, (required, PNG), Clear's our dear!, headline and PNG's, and it's tiımı!, Clear's our dear!, headline and PNG's, and it's tiımı!, Format defines the shape. Manifest fills it in.
  • /images/walkthrough/diagram-generative-tiers.png in docs/creative/generative-creative.mdx
    • Gibberish text detected: clouses
    • Visible text: Tier 1, Tier 2, Headlines from, hiking boots, Headlines with, hiking boots, Headline to, hiking boot, image, Dest in-fitness, motivation, clouses, Static one creative, one variant, Optimized asset group combinations, Human-authored, Tier 3, A dedicated, hiking community, ❤Q, Curated, Holiday, gift guide, Fitness, motivation, Generated - AI creates for each context, AI-generated
  • /images/walkthrough/diagram-orchestrator-sequence.png in docs/creative/multi-agent-orchestration.mdx
    • Gibberish text detected: The "י" is nonsensical.
    • Visible text: Orchestrator, Creative Agent, Sales Agent A, Sales Agent B, get_adcp_capabilities, 1, list_creative_formats, 2, build_creative, 3, sync_creatives, manifests, manifests, 4, Later, get_creative_delivery, 5, י
  • /images/walkthrough/brand-before-after.png in docs/brand-protocol/index.mdx
    • Gibberish text detected: Prostoons shoe, Darte sourses, Brooky Chaken, Inte bot find misistched and outdated, orerled, oranigh, old-orangg, misnatched
    • Visible text: without brand.json, guessing at brand identity, Bistro, Oranje, Scraping, data, ★★★★★, Prostoons shoe, Brooky Chaken, 6390.00, Inte bot find, misistched and, outdated, BAD restaurant ad, Darte sourses, ?, Bistro, Oranje, Al robot agent, FINDS, TASTE THE, ADVENTURE!, with brand.json, following brand rules, LOGO, GOOD restaurant ad, tone: warm,, inviting, Bistro, Oranje, #E67E22, no text, over food, imagery, Big headline text orerled, and off-brand, Wring wrong shade of, murky oranigh colors, Attempted,, old-orangg logo, Poor, misnatched fonts, BAD restaurant ad, brand.json, Bistro Oranje, Two-course, lunch, €18.50, GOOD restaurant ad
  • /images/walkthrough/brand-panel-05-approval-paths.png in docs/brand-protocol/walkthrough-rights-licensing.mdx
    • Gibberish text detected: There are symbols around the hourglass that resemble runes or a garbled language.
    • Visible text: Confidential, processing
  • /images/walkthrough/brand-panel-06-creative-generation.png in docs/brand-protocol/walkthrough-rights-licensing.mdx
    • Gibberish text detected: 098
      001000143000
      AMSTERDAM, 0
      000
    • Visible text: FUEL YOUR
      AMBITION, THE POWER
      OF PRECISION, AMS, LICENSED &
      APPROVED, 098
      001000143000
      AMSTERDAM, LICENSED &
      APPROVED, 0
      000, FOOD CO.

To fix: Regenerate images using npx tsx scripts/generate-images.ts with the --max-retries 2 flag, or update the image prompts to include "Do not include any text, words, or labels in the image."

@bokelley
bokelley merged commit 04c3a76 into main Mar 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant