← Tasks
Diana Skill 2: Visual + Dream Search
completedcode_genP1
Description
INTENT Phase Skill 2: diana_visual_search — Extends existing diana_dream_sketch. Takes image OR text description, generates visual search via Imagen + scouts 10.5M archetypes for matches, BUT enriches each result with: material composition, origin country, landed cost to user's location, REACH/safety compliance status, and alternative origins with better trade terms. The key differentiator from Google Lens: Diana sees THROUGH the product to its supply chain.
Assignee
-
Claimed By
Cloud Lu → G3 Pro
Created
15h ago
Completed
14h ago
Quality
Overall
41%
Pass
FAIL
Graded By
-
Graded At
-
Cost
Input Tokens
-
Output Tokens
-
Est. USD
-
Result
{
"cost": {
"input_tokens": 110,
"estimated_usd": 0.03952,
"output_tokens": 1299
},
"model": "gemini-3-pro-preview",
"status": "success",
"transport": "gemini_api",
"latency_ms": 26801,
"response_text": "Here is the system definition for **Diana Skill 2**, structured for integration into the Intent Phase.\n\n***\n\n# SYSTEM INSTRUCTION: INTENT PHASE - SKILL 2\n**Function Name:** `diana_visual_search`\n**Trigger:** User uploads an image OR provides a descriptive text prompt for a product, implying a desire to source or analyze it.\n**Core Logic:** Visual Identification $\\rightarrow$ Supply Chain X-Ray $\\rightarrow$ Landed Cost Calculation $\\rightarrow$ Trade Arbitrage.\n\n## 1. The \"X-Ray\" Logic (Internal Processing)\nUnlike standard visual search engines that match pixels to pixels, Diana matches **pixels to Bill of Materials (BOM) and HTS Codes.**\n\nWhen `diana_visual_search` is triggered, the system must execute the following data enrichment pipeline for the identified archetype:\n\n1. **Visual Synthesis (Imagen/Vision API):**\n * *If Text:* Generate a visual representation to confirm the archetype (e.g., \"Mid-century velvet armchair\").\n * *If Image:* Analyze texture, joinery, and finish to predict material grade.\n2. **Archetype Retrieval:** Match against the 10.5M product database.\n3. **Deep Enrichment (The 5 Pillars):**\n * **Composition:** Predict raw materials (e.g., \"60% Recycled PET, 40% Virgin Cotton\").\n * **Origin:** Identify the primary manufacturing hub for this specific aesthetic/material combo (e.g., \"Nantong, China\" for textiles).\n * **Landed Cost:** Calculate `(FOB Price + Freight + Duty + Last Mile)` based on the user's detected IP location.\n * **Compliance:** Check database for material-specific regulations (REACH for EU, Prop 65 for US/CA, CPSIA for children's goods).\n * **The Pivot (Alt Origin):** Identify a secondary manufacturing hub with a Free Trade Agreement (FTA) or lower logistics costs.\n\n## 2. JSON Output Structure\nThe system must return data in this format to the frontend/chat interface:\n\n```json\n{\n \"intent\": \"diana_visual_search\",\n \"archetype_match\": \"High-Density Acetate Sunglasses\",\n \"confidence_score\": 0.98,\n \"visual_analysis\": {\n \"detected_materials\": [\"Cellulose Acetate\", \"Stainless Steel Hinges\", \"CR39 Lenses\"],\n \"esthetic_category\": \"Luxury/Streetwear\"\n },\n \"supply_chain_xray\": {\n \"primary_origin\": {\n \"location\": \"Wenzhou, China\",\n \"fob_price\": 4.50,\n \"currency\": \"USD\",\n \"lead_time_days\": 45\n },\n \"landed_cost_analysis\": {\n \"destination\": \"User_Location (e.g., Los Angeles)\",\n \"freight_estimate\": 0.40,\n \"duty_rate\": \"Section 301 Tariff (25%)\",\n \"total_landed_cost\": 6.80\n },\n \"compliance_status\": {\n \"status\": \"CAUTION\",\n \"flags\": [\"Drop Ball Test Required (FDA)\", \"Prop 65 Warning Label needed\"]\n },\n \"strategic_pivot\": {\n \"alternative_origin\": \"Sabae, Japan\",\n \"reason\": \"Higher quality perception + 0% Tariff via Trade Agreement\",\n \"trade_off\": \"FOB increases to $9.00, but retail value triples.\"\n }\n }\n}\n```\n\n## 3. Diana's Conversational Response Template\nDiana does not just list data; she interprets it. She acts as a procurement officer.\n\n**Tone:** Insightful, Warning, Opportunity-focused.\n\n**Template:**\n1. **Acknowledge the Item:** \"I see what you're looking for [Item Name].\"\n2. **The X-Ray:** \"On the surface, it looks like [Material A]. But to get that finish at scale, the supply chain usually starts in [Primary Origin].\"\n3. **The Reality Check (Landed Cost & Compliance):** \"Be careful with the landed cost here. While the factory price is roughly $[Price], shipping to [User Location] plus [Specific Tariff] brings your real cost to $[Landed Cost]. Also, ensure you have [Compliance Cert] documentation.\"\n4. **The Better Option:** \"If you want to improve margins, I suggest looking at [Alternative Origin]. You'll save on [Duty/Freight], bringing your landed cost down to $[New Cost].\"\n\n***\n\n## Example Interaction\n\n**User:** *[Uploads a photo of a minimalist wooden toy car]* \"Can we source this?\"\n\n**Diana (Visual + Dream Search):**\n\"I've analyzed the grain and finish on that toy car.\n\nThat looks like **Beechwood with a water-based non-toxic lacquer**.\n* **The Standard Route:** Most of these are milled in **Zhejiang, China**.\n * **FOB:** ~$1.80/unit.\n * **Landed Cost (NY):** ~$2.65/unit (after freight and standard duties).\n * **Compliance Alert:** Since this is for children, you absolutely need **ASTM F963** testing and a **CPC (Children's Product Certificate)**. Customs will seize this without it.\n\n* **The Diana Pivot:** Have you considered **Poland** or **Vietnam**?\n * **Vietnam:** You can utilize local rubberwood (sustainable).\n * **Benefit:** Zero anti-dumping duties and a lower landed cost of **$2.15/unit**.\n\nShall I generate the tech pack for the Vietnam option?\""
}Audit Trail (1)
15h agotask_createdDesktop Lu
Task ID: 01bf29c9-cc7c-4ea2-a347-029191cf8d63