From a339e09859fec89b664fd6031f4508ecda16cb65 Mon Sep 17 00:00:00 2001 From: liangxu Date: Wed, 8 Jul 2026 14:33:16 +0800 Subject: [PATCH] feat(agent): guide creative agent to use purposeful emoji in replies Add prompt instructions for emoji-led list formatting in visible responses, plan narration, and image summaries, with guardrails against hyphen chaining and empty numbered choices. Tighten the planner's userFacingResponse description. Co-Authored-By: Claude Opus 4.8 (1M context) --- server/internal/infrastructure/piagent/creative_agent.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/internal/infrastructure/piagent/creative_agent.go b/server/internal/infrastructure/piagent/creative_agent.go index b5a27ba..023e70e 100644 --- a/server/internal/infrastructure/piagent/creative_agent.go +++ b/server/internal/infrastructure/piagent/creative_agent.go @@ -94,6 +94,8 @@ func (c *CreativeAgent) Respond(ctx context.Context, req design.AgentConversatio "For greetings, reply briefly and invite a concrete next step. For capability questions, answer with image-only capabilities: brand/site visuals, ecommerce product images, posters/banners/social images, reference-based generation, image edits, background removal, vectorization, mockup placement, and multi-round canvas iteration.", "When a current project exists, connect capabilities to the canvas instead of giving a generic product brochure.", "When the task plan indicates missing requirements or contains user response questions, ask those questions directly and stop; do not pretend generation has started.", + "Use a few purposeful emoji in visible replies to make scanning warmer: put a relevant emoji at the start of capability or next-step bullets, for example 🎨 design direction, 📦 packaging, 🖼️ canvas. Keep the tone professional and avoid empty bullet labels such as '• :'.", + "Format emoji lists as short separate lines: intro sentence, then one emoji-led item per line, for example 🎭角色设定、\\n📦系列包装、\\n🧩展示台/贴纸、\\n📣发售海报。 Do not put a hyphen after the emoji. Do not chain items like 🎨-设计...-生成..., do not start continuation lines with bare hyphens, and never end with empty choices such as 1. 2. 3.", }, " "), }, { @@ -116,6 +118,8 @@ func (c *CreativeAgent) StreamRespond(ctx context.Context, req design.AgentConve "For greetings, reply briefly and invite a concrete next step. For capability questions, answer with image-only capabilities: brand/site visuals, ecommerce product images, posters/banners/social images, reference-based generation, image edits, background removal, vectorization, mockup placement, and multi-round canvas iteration.", "When a current project exists, connect capabilities to the canvas instead of giving a generic product brochure.", "When the task plan indicates missing requirements or contains user response questions, ask those questions directly and stop; do not pretend generation has started.", + "Use a few purposeful emoji in visible replies to make scanning warmer: put a relevant emoji at the start of capability or next-step bullets, for example 🎨 design direction, 📦 packaging, 🖼️ canvas. Keep the tone professional and avoid empty bullet labels such as '• :'.", + "Format emoji lists as short separate lines: intro sentence, then one emoji-led item per line, for example 🎭角色设定、\\n📦系列包装、\\n🧩展示台/贴纸、\\n📣发售海报。 Do not put a hyphen after the emoji. Do not chain items like 🎨-设计...-生成..., do not start continuation lines with bare hyphens, and never end with empty choices such as 1. 2. 3.", }, " "), }, { @@ -135,6 +139,7 @@ func (c *CreativeAgent) StreamPlanNarration(ctx context.Context, req design.Agen "Write one concise localized sentence that tells the user what the agent is preparing to do next.", "If web research results are present, mention that references have been collected and how they will guide the visual direction.", "Do not use markdown, numbering, or generic canned wording. Use the user's language and locale automatically.", + "A single fitting emoji at the beginning is welcome when it improves the live status; do not overuse emoji.", }, " "), }, { @@ -155,7 +160,7 @@ func (c *CreativeAgent) PlanAgentTask(ctx context.Context, req design.AgentTaskP "content": strings.Join([]string{ "You are the automatic planner for a Moteva-style creative agent.", "Read the user's request, canvas, inline references, short memory, and long memory, then decide the next workflow.", - "Return strict JSON only: {\"intent\":\"image\"|\"chat\",\"reason\":\"short internal reason\",\"userFacingResponse\":\"one concise localized sentence explaining what you will do\",\"shouldSearch\":true|false,\"searchQuery\":\"query or empty\",\"searchReason\":\"short reason\",\"imageCount\":0-10,\"imageTasks\":[{\"title\":\"localized short title\",\"brief\":\"specific output brief\"}]}", + "Return strict JSON only: {\"intent\":\"image\"|\"chat\",\"reason\":\"short internal reason\",\"userFacingResponse\":\"short localized visible response explaining what you will do\",\"shouldSearch\":true|false,\"searchQuery\":\"query or empty\",\"searchReason\":\"short reason\",\"imageCount\":0-10,\"imageTasks\":[{\"title\":\"localized short title\",\"brief\":\"specific output brief\"}]}", "Intent image means the user wants visual production, image editing, ecommerce/page/poster/product/character/illustration/output generation, or concrete canvas creation.", "Intent chat means greetings, thanks, vague discussion, capability questions, or missing critical information.", "For open-ended brand, ecommerce, homepage, logo, or campaign requests with missing essentials, choose intent chat and ask 2-4 targeted questions before generation. Essentials can include brand/logo assets, visual direction, product/category scope, audience, key sections, slogan/copy, deliverable format, and must-keep constraints.", @@ -175,6 +180,7 @@ func (c *CreativeAgent) PlanAgentTask(ctx context.Context, req design.AgentTaskP "Image tasks must be concrete, ordered, and aligned with the count. For character/design work, separate views, detail sheets, palette/style sheets, and final composite boards when requested.", "Do not expose hidden chain-of-thought. The userFacingResponse is a short planning summary, not a long explanation.", "If intent is chat for clarification, userFacingResponse should be the exact concise questions to ask and imageCount must be 0.", + "For userFacingResponse, use a few purposeful emoji in visible questions or summaries, especially as list markers. Use newline-separated emoji items, for example 🎭角色设定、\\n📦系列包装、\\n🧩展示台/贴纸、\\n📣发售海报。 Do not put a hyphen after the emoji, do not chain items like 🎨-设计...-生成..., do not use bare continuation hyphens, and never output empty numbered choices such as 1. 2. 3. Do not put emoji in image task titles or briefs.", "Use the user's language and locale automatically.", }, " "), }, @@ -235,6 +241,7 @@ func (c *CreativeAgent) SummarizeImage(ctx context.Context, req design.AgentImag "Do not invent exact visual details you cannot see. Tie the response to the prompt and canvas goal.", "When the user authorized your judgment or asked for an iteration, state the main change you attempted and what constraint it preserves. Mention a next step only when it is useful or required by the workflow.", "Sound like a professional art director, not a template.", + "Use one fitting emoji or a short emoji-led phrase when it improves the completion message; keep it sparse.", }, " "), }, {