feat(ai): per-subtask icon_font reminder in sub-agent prompt
Why: even after the icon-catalog skill rewrite (19ca1c66) said "ALWAYS
USE icon_font, NEVER path NODES", end-to-end testing with MiniMax-M2.7
shows the model still emits ~half its icons as \`path\` nodes (Bell
Icon / Cart Icon etc.) because the per-subtask CRITICAL LAYOUT
CONSTRAINTS prompt — which the model treats as the prompt of record
— never restated the icon convention. The skill prompt is upstream
context the model can drift away from; the per-subtask block is the
last thing the model reads before generating, so it carries weight.
What: append a one-line ICONS rule directly to CRITICAL LAYOUT
CONSTRAINTS in orchestrator-sub-agent.ts. Restates the icon_font shape
inline (\`{"type":"icon_font","iconFontName":"<lucide-name>",…}\`) and
calls out the failure mode by name (resolver guess + placeholder
circle) so the model sees both the right pattern and the consequence
of the wrong one.
The path-with-iconic-name fallback path keeps working — this is purely
preventive guidance, the resolver tokenize fix (ef6f7ed3) still
catches the leftover cases. 1086 / 1086 AI tests still pass.
This commit is contained in:
parent
9743dedcdf
commit
8db9e97075
|
|
@ -715,6 +715,7 @@ CRITICAL LAYOUT CONSTRAINTS:
|
|||
- Use justifyContent="space_between" to distribute items (e.g. navbar: logo | links | CTA). ${paddingHint}
|
||||
- For side-by-side layouts, nest a horizontal frame with child frames using "fill_container" width.
|
||||
- SECTION BACKGROUND: do NOT set \`fill\` on your section root frame. ${rootBgHint} Hardcoding a "safe dark" fill (e.g. #000 / #0A0A0A / #111) will cover the intended background and break theme switching. Only set \`fill\` on cards, buttons, chips, badges, and other visually distinct components — never on the section container itself.
|
||||
- ICONS: emit \`{"type":"icon_font","iconFontName":"<lucide-name>","iconFontFamily":"lucide","width":20,"height":20,"fill":[{"type":"solid","color":"<color>"}]}\`. NEVER emit \`{"type":"path","name":"X Icon","d":"…"}\` for an icon — the path-based pattern (legacy "PascalCase + Icon suffix") needs the resolver to guess the iconic noun and frequently falls back to a placeholder circle when the model adds extra words to the name (e.g. "Search Icon Path"). icon_font is the supported, drift-free path; the icon-catalog skill above lists the role→name map (Cart→shopping-cart, Profile→user, etc).
|
||||
- IDs prefix="${subtask.idPrefix}-". No <step> tags. Output \`\`\`json immediately.`;
|
||||
|
||||
// Phone mockup guidance is only relevant when this subtask is actually
|
||||
|
|
|
|||
Loading…
Reference in a new issue