ai_qc/backend/profiles
nickviljoen 50d0063b37 Add Boots Production Pack profile (multi-page document mode)
New profile boots_ppack for QCing multi-page Boots production packs
(PowerPoint-exported PDFs, 4-18 pages each). Built on top of AXA's
document-mode infrastructure — branched off feature/axa-document-mode
because it reuses the dispatcher, ingest, and result writer.

New checks:
- boots_logo_compliance — three-path scoring (master wordmark / partner
  lock-up / no branding) so OLIVER x BOOTS-style footer lock-ups aren't
  scored against master wordmark rules. Conservative without a formal
  Boots logo guideline.
- boots_colour_palette — verifies CMYK/RGB/Hex spec values on creative-
  guidance pages against canonical Boots Blue / Health Primary Blue /
  Offer Red, plus visual sanity-check on artwork pages.

Existing checks tuned:
- boots_brand_name_accuracy: closed-world list semantics. Brands not on
  the approved list now go to names_not_on_list (manual review) instead
  of failing — the list is sourced from the original 7 docs and is known
  incomplete (Remington, Imodium, Maybelline etc. are legitimate Boots-
  stocked brands not on it).
- boots_tandc_wording: explicit font-weight caveat — Boots Sharp Regular
  vs Light isn't reliably distinguishable by vision LLM at small sizes.
  Surfaced via font_weight_caveat field + needs_manual_check value.

Page classifier (document_mode/page_classifier.py):
Heuristic tags each page as cover / checklist / palette / notes /
artwork. Validated on all 10 sample packs.

Strict-grade exemption (Profile.strict_grade flag):
Only artwork-classified pages count towards Pass/Fail. Cover, checklist,
palette, and notes pages are still QC'd and reported as Informational
but cannot trigger a Fail. Banner shows exactly which artwork-page
checks fell below 6.

Result writer extended:
- Per-page table with score + page_type pill for any page_each-scope
  check (auto-applied as fallback)
- Strict-grade banner (red on violation, green when clean)
- Page_type pills throughout the per-page strip

Smoke-test result (Remington 4-page pack, 2026-05-05):
Overall 70.75/100, strict-grade Fail. After two iterations of prompt
tuning, all three remaining strict-grade violations are real catches:
orphan asterisk in T&Cs, "they may not be stocked" wording deviation,
missing "Charges may apply". brand_name_accuracy 7.0 (was 3.0 before
list fix), logo_compliance 9.5 (was 1.5 before lock-up path fix).

Local-only — not pushed to dev or merged to develop until after Boots
show-and-tell. Same posture as feature/axa-document-mode.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:47:13 +02:00
..
amazon_static.json Add periodic auth session check and rename Amazon Box Placement to Element Placement 2026-04-02 10:01:27 +02:00
axa_policy_document.json Add AXA document-mode QC pipeline (Phases 1, 3, 4, 5) 2026-05-01 18:38:14 +02:00
axa_policy_document_diff.json Add AXA document-mode QC pipeline (Phases 1, 3, 4, 5) 2026-05-01 18:38:14 +02:00
boots_ppack.json Add Boots Production Pack profile (multi-page document mode) 2026-05-05 12:47:13 +02:00
boots_static.json Add Boots client QC profile with 5 compliance checks and split CLAUDE.md client docs 2026-04-13 09:25:58 +02:00
diageo_key_visual.json Create frontend and backend folder structure for deployment 2025-11-06 11:55:53 +02:00
diageo_packaging.json Create frontend and backend folder structure for deployment 2025-11-06 11:55:53 +02:00
dow_jones_static.json Add Dow Jones client with 3 sub-brand QC profiles (17 new checks) 2026-04-07 18:33:14 +02:00
general_check.json Create frontend and backend folder structure for deployment 2025-11-06 11:55:53 +02:00
inclusive_accessibility.json Create frontend and backend folder structure for deployment 2025-11-06 11:55:53 +02:00
loreal_static.json Add dedicated text_product_overlap check for L'Oreal profile 2026-04-09 10:46:13 +02:00
marketwatch_static.json Add Dow Jones client with 3 sub-brand QC profiles (17 new checks) 2026-04-07 18:33:14 +02:00
README.md Create frontend and backend folder structure for deployment 2025-11-06 11:55:53 +02:00
static_general.json Create digital-focused general check modules and update Static General profile 2026-02-02 11:55:23 +02:00
unilever_key_visual.json Create frontend and backend folder structure for deployment 2025-11-06 11:55:53 +02:00
unilever_packaging.json Create frontend and backend folder structure for deployment 2025-11-06 11:55:53 +02:00
video_general.json Add Honda client, video QC, session refresh, Amazon check tuning 2026-04-16 14:53:52 +02:00
wsj_podcast.json Add wsj podcast profile to Dow Jones client, File naming check added to all profiles 2026-04-29 18:09:58 +02:00
wsj_static.json Add Dow Jones client with 3 sub-brand QC profiles (17 new checks) 2026-04-07 18:33:14 +02:00

Visual AI QC Profiles

This directory contains JSON profile configurations for the Visual AI QC application. Profiles determine which QC checks are run, their weights, and which LLM (OpenAI or Gemini) is used for each check.

Profile Structure

Each profile is defined in its own JSON file with the following structure:

{
    "name": "Profile Name",
    "description": "Description of the profile and its purpose",
    "checks": {
        "check_name_1": {
            "weight": 0.10,
            "llm": "OpenAI",
            "enabled": true
        },
        "check_name_2": {
            "weight": 0.15,
            "llm": "Gemini",
            "enabled": true
        }
        // Add more checks as needed
    }
}

Fields Explanation

  • name: The display name of the profile (shown in the UI)
  • description: A short description explaining the profile's purpose
  • checks: A dictionary of QC checks to include in this profile
    • Each check entry contains:
      • weight: The weight of this check in the overall score (between 0 and 1, sum of all weights should equal 1)
      • llm: The LLM to use for this check ("OpenAI" or "Gemini")
      • enabled: Whether this check is enabled (true/false)

Adding New Profiles

To add a new profile:

  1. Create a new JSON file in this directory (e.g., my_brand.json)
  2. Define the profile structure following the format above
  3. Include only the checks relevant to your profile
  4. Ensure the sum of weights equals 1.0 (100%)
  5. Restart the application to load the new profile

The profile ID will be the filename without the .json extension. For example, my_brand.json will create a profile with ID my_brand.

Available QC Checks

Here are the available QC checks you can include in your profiles:

Visual Design Checks

  • logo_visibility: Checks if the logo is clearly visible
  • brand_assets_visibility: Checks if brand assets are prominent
  • visual_elements_count: Counts and evaluates visual elements
  • background_contrast: Evaluates contrast between foreground and background
  • face_visibility: Checks if faces are clearly visible
  • visual_hierarchy: Analyzes the visual hierarchy
  • supporting_images: Evaluates supporting imagery
  • curved_edges: Checks for curved edges in design
  • product_visibility: Checks if product is clearly visible

Text & Copy Checks

  • lowercase_text: Checks text casing
  • call_to_action: Evaluates call to action text
  • word_count: Checks word count
  • imperative_verb: Checks for imperative verbs
  • text_readability: Evaluates text readability

Layout & Composition Checks

  • new_visibility: Checks if "NEW" tag is prominently displayed
  • visuals_left_text_right: Checks layout for visuals on left, text on right
  • face_gaze_direction: Checks direction of faces gazing
  • element_alignment: Checks alignment of elements
  • aspect_ratio: Verifies correct aspect ratio
  • responsiveness: Tests responsiveness for different screens

Technical Checks

  • file_naming: Checks file naming conventions
  • layer_organization: Validates layer organization
  • color_format: Checks color format compliance
  • image_resolution: Verifies image resolution
  • safety_area: Checks safety areas/margins
  • print_bleed: Verifies print bleed areas
  • crop_marks: Checks crop marks
  • animation_transitions: Evaluates animation transitions
  • dark_mode_legibility: Tests legibility in dark mode

Example Profile

Here's an example profile for a brand that focuses on product visibility and call to action:

{
    "name": "Product Marketing",
    "description": "Profile optimized for product marketing materials",
    "checks": {
        "product_visibility": {
            "weight": 0.30,
            "llm": "OpenAI",
            "enabled": true
        },
        "call_to_action": {
            "weight": 0.20,
            "llm": "OpenAI",
            "enabled": true
        },
        "brand_assets_visibility": {
            "weight": 0.15,
            "llm": "OpenAI",
            "enabled": true
        },
        "background_contrast": {
            "weight": 0.10,
            "llm": "Gemini",
            "enabled": true
        },
        "visual_hierarchy": {
            "weight": 0.15,
            "llm": "OpenAI",
            "enabled": true
        },
        "image_resolution": {
            "weight": 0.10,
            "llm": "Gemini",
            "enabled": true
        }
    }
}

Default Profiles

The system includes these default profiles:

  1. default.json - All checks enabled with equal weighting
  2. diageo.json - Diageo brand guidelines
  3. unilever.json - Unilever brand guidelines
  4. general.json - General technical checks