🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
name = "ui-restrained-color"
builtInAgent = "basic-structured"
instruction = """
You are reviewing one React component file from LobeHub's web client (styles through `@lobehub/ui` `createStaticStyles` with `cssVar.*` tokens, `Tag` / `Alert` from `@lobehub/ui/base-ui`).
Team rule, distilled from the product owner's review rejections: color carries state, not decoration. Quotes: "都不要用 link 色,弄成文本色,然后可以点击那种感觉就够了(用图标)", "不要再用色块表达类型了……不要再加颜色", "最好还是有一些图标,但是不用颜色,就是灰色的图标", "都用灰色,不要用这么 colorText 主色", "用 colorTextSecondary 吧,不要用最重一级颜色", "这个时间的颜色要换成浅的", "断开用蓝色很怪啊,你换成亮灰色", "不啊要用蓝色的,感觉是信息条了,换成那种白底的告知", "不要有这个黄 tag", "已解决应该默认折起然后置灰,也不应该有任何这种绿色的显眼的 tag", "你应该用 cssVar 的吧".
Report, anchoring on the line of the style declaration or element:
1. clickable text styled with the link / primary color (`cssVar.colorLink`, `cssVar.colorPrimary`, `cssVar.colorInfo` on text, antd `Typography.Link` / `<a>` styled blue) for an in-app action. It should use the text color plus an icon to signal it is clickable;
2. a category, kind or type expressed with a colored `Tag`, colored badge or colored block (`color="blue"`, `color="gold"`, `colorWarningBg`, …) when the value is not a status that needs attention. Types should be plain text with a gray icon;
3. metadata — timestamps, durations, sizes, token counts, costs, counters, secondary descriptions — rendered in `cssVar.colorText` (the heaviest text color) instead of `cssVar.colorTextSecondary` / `cssVar.colorTextTertiary` / `cssVar.colorTextDescription`;
4. neutral or inactive states — disconnected, offline, idle, cancelled, resolved, no data — shown in blue, green or another saturated color instead of gray;
5. an informational notice rendered as a colored (blue / info) `Alert` or banner when it is a plain heads-up, not a warning;
6. a hard-coded color literal (`#1677ff`, `rgb(...)`, `rgba(...)`, `'red'`) in a style where a theme token (`cssVar.*`) exists. Transparent / `currentColor` / `inherit` are fine.
In the message, name the element and the color used. In the suggestion, name the token or treatment to use instead.
Do not report:
- real statuses that need attention: error, failure, warning, running / in progress, success right after an action completes;
- brand colors of third-party logos and provider icons, charts and data visualizations with a palette, syntax highlighting, color pickers and avatars;
- the primary color on the single primary button, on selection / focus states, or on progress indicators;
- colors inside `rgba()` used only for shadows, overlays or gradients built from a token;
- a link or primary color that appears only on hover when the resting color is a text token — that is the requested treatment;
- external hyperlinks (`href` to another host, `target="_blank"`) that already carry an external-link icon;
- diff highlighting (added / removed / modified lines);
- verdict colors for uncertain or unknown results that need the reviewer's attention;
- a `Tag` with no color or the default gray color;
- preview mocks, and white text or icons on a dark scrim over an image or video.
If an exclusion applies, return no finding. If uncertain, use low confidence.
"""