AI Skill Report Card

Designing Semantic Chat Cropping

B+78·Aug 9, 2026·Source: Extension-selection

Designing Semantic Chat Cropping Systems

13 / 15

To specify a system that lets AI intelligently select and "drag-crop" chat bubble ranges (instead of raw pixel cropping), define these four pillars:

  1. Detection stack: Object Detection (bubble bounding boxes) + OCR (text content) + Contextual Anchor Logic (evidentiary keywords)
  2. Decision flow: Detect → Read → Anchor (start/end) → Compute crop region → Output
  3. Conditions: boundary contrast, keyword dictionary, aspect-ratio preservation
  4. Prohibitions: never bisect a bubble, never crop without context, never strip timestamps/profile marks

Use this skill to produce a full system spec (methods, step-by-step flow, conditions, prohibitions) in the same structure every time, adaptable to any chat platform or evidence domain (not just financial fraud — also harassment, contract disputes, etc.).

Recommendation
Add a concrete before/after example with actual sample chat text and computed bbox/crop coordinates to ground the abstract methodology in real input/output pairs
14 / 15

Progress:

  • Step 1: Define the object taxonomy for the target chat UI
  • Step 2: Specify the OCR/text-analysis layer
  • Step 3: Define the anchor keyword dictionary for the domain
  • Step 4: Write the 5-step decision flow (Detect → Read → Anchor → Compute → Crop)
  • Step 5: Enumerate system conditions (contrast, keyword set, aspect ratio, output canvas)
  • Step 6: Enumerate strict prohibitions (no bisecting, no floating context-free bubbles, no metadata stripping)
  • Step 7: Validate spec against edge cases (oversized bubbles, ambiguous anchors, low-contrast themes)

Step 1: Object Taxonomy

List every UI element the detector must classify, at minimum:

  • Left bubble (incoming), right bubble (outgoing)
  • Attached image / sticker / voice message
  • Profile icon, sender name
  • Timestamp, read-receipt marker
  • System messages (e.g., "user joined", date dividers)

Step 2: OCR / Text Layer

  • Language-specific OCR engine (e.g., Thai, English, mixed)
  • Output: {bubble_id, bbox, text_string, sender_side, timestamp}
  • Confidence threshold below which a bubble is flagged for human review rather than auto-cropped

Step 3: Anchor Keyword Dictionary

Define domain-specific start/end anchor terms. Example (financial evidence):

  • Start anchors: account number, price agreement, "how much total"
  • End anchors: "transferred", slip/receipt image, "payment sent"

For other domains (harassment, threats, contract agreement), swap the dictionary — the architecture stays the same, only the keyword set changes.

Step 4: Decision Flow (5 steps)

  1. Object Detection — scan full long screenshot, produce bbox map for every bubble (x_min, y_min, x_max, y_max)
  2. Text Content Analysis — OCR every detected bubble into text strings
  3. Anchor Identification — run keyword decision tree to find Start Anchor bubble and End Anchor bubble
  4. Auto-Drag Simulation — compute crop region:
    • y_top = y_start_anchor - 10px (margin)
    • y_bottom = y_end_anchor + 10px (margin)
    • Add ±1–2 bubble contextual buffer before/after the anchor range
  5. Precision Crop Output — cut the original long image along the computed vertical band; discard unrelated content outside the band

Step 5: System Conditions

  • Boundary Contrast Condition: bubble border/background must have sufficient contrast for reliable bbox detection; flag low-contrast themes for manual fallback
  • Evidence Keyword Condition: maintain an extensible, domain-configurable keyword dictionary; anchor detection must fail safely (ask for human confirmation) if no clear anchor found
  • Aspect Ratio Constraint: cropped output resized onto standard canvas (e.g., 645×890px) preserving original text proportions — no single-axis stretch/distortion

Step 6: Strict Prohibitions

  • No bisecting bubbles: never cut through the middle of a bubble inside the selected range; if a bubble overflows the canvas, resize the canvas or push the whole bubble to the next page
  • No context-free floating bubbles: never output an isolated bubble (e.g., only "transferred") without the preceding conversational context or referenced attachment — context-less evidence is legally weak
  • No metadata stripping: never remove timestamps, read-receipts, or profile icons during crop — required for Chain-of-Custody integrity
Recommendation
Description is a bit long and could be tightened while still preserving triggers and scope
15 / 20

Example 1: Input: "Design a cropping system for LINE chat screenshots used as debt-collection evidence." Output: A spec following Steps 1–6 above, with:

  • Object taxonomy tailored to LINE (green outgoing bubble, white incoming bubble, LINE Pay slip images)
  • Keyword dictionary: "ยอดหนี้" (debt amount), "ทวงหนี้" (debt collection), "โอนแล้ว" (transferred), "สลิป" (slip)
  • Decision flow identical structure, with start anchor = debt amount mention, end anchor = payment slip
  • Same prohibitions (no bisecting, no floating bubbles, no metadata stripping)

Example 2: Input: "Adapt this system for harassment evidence in Facebook Messenger." Output: Same architecture, taxonomy adds "reaction emoji" and "reply-quote" objects; keyword dictionary shifts to threatening/abusive language markers; start anchor = first offensive message, end anchor = last message in the harassment thread or a natural conversation break; prohibitions unchanged (context buffer especially critical here to prove escalation pattern).

Recommendation
Include a failure-case example (e.g., ambiguous anchor leading to human-in-the-loop fallback) showing the actual system output/flag, not just a description of the behavior
  • Always separate the architecture (detection → OCR → anchor → crop) from the domain keyword dictionary — make the dictionary a swappable config, not hardcoded logic.
  • Design anchor detection as a decision tree with confidence scores, not a single keyword match — require corroborating signals (e.g., keyword + adjacent slip image) before auto-cropping.
  • Always default to a human-in-the-loop fallback: if anchors are ambiguous or contrast is poor, flag for manual confirmation rather than guessing.
  • Log every detected bbox and anchor decision — this audit trail supports Chain-of-Custody arguments in legal contexts.
  • Treat the contextual buffer (1–2 bubbles before/after) as a non-negotiable default, not optional.
  • Do not treat this as a pure computer-vision cropping problem — semantic/legal correctness (context, chain-of-custody) matters more than pixel precision.
  • Do not hardcode financial keywords as the only use case — the same pattern generalizes to harassment, contract, or custody-dispute evidence; keep the dictionary abstracted.
  • Do not allow the system to silently drop low-confidence OCR bubbles from the crop — either include them with a confidence flag or halt for human review.
  • Do not compress/stretch cropped bubbles to fit a canvas — this can be challenged as evidence tampering.
  • Do not conflate "start of visible chat" with "start anchor" — the anchor must be the semantically meaningful transaction/event start, not just the first message on screen.
0
Grade B+AI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
13/15
Workflow
14/15
Examples
15/20
Completeness
17/20
Format
13/15
Conciseness
13/15