executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
enhance-glyph改善可视化层中现有的基于R的象形符号。涵盖当前符号的视觉审计、具体问题诊断 (比例、可读性、发光平衡)、对符号函数的针对性修改、重新渲染以及修改前后对比。 适用于技能、代理和团队符号。当符号在小尺寸下渲染不佳、视觉隐喻不清晰、存在 比例问题、霓虹发光效果不平衡,或在添加新调色板或更改渲染流水线后使用。
Independent GitHub snapshot · Automated classification · Original documentation governs
改善 viz/ 可视化层中现有的象形符号 — 审计其当前渲染效果、诊断视觉问题、应用针对性修改、重新渲染并进行修改前后对比。适用于技能、代理和团队符号。
skill、agent 或 teamcommit-changes、mystic、tending)检查当前符号并识别具体问题。
viz/R/primitives*.R(19 个按领域分组的文件),映射在 viz/R/glyphs.R 中viz/R/agent_primitives.R,映射在 viz/R/agent_glyphs.R 中viz/R/team_primitives.R,映射在 viz/R/team_glyphs.R 中viz/public/icons/cyberpunk/<domain>/<skillId>.webpviz/public/icons/cyberpunk/agents/<agentId>.webpviz/public/icons/cyberpunk/teams/<teamId>.webpGlyph Quality Dimensions:
+----------------+------+-----------------------------------------------+
| Dimension | 1-5 | Assessment Criteria |
+----------------+------+-----------------------------------------------+
| Readability | | Recognizable at 48px? Clear at 160px? |
| Proportions | | Well-centered? Good use of the 100x100 canvas?|
| Metaphor | | Does the shape clearly represent the entity? |
| Glow balance | | Glow enhances without overwhelming? |
| Palette compat | | Looks good across cyberpunk + viridis palettes?|
| Complexity | | Appropriate layer count (not too busy/sparse)? |
+----------------+------+-----------------------------------------------+
预期结果: 对符号问题的明确诊断以及需要改善的维度。审计应具体化:"比例:符号仅使用了画布的 40%",而不是"看起来不好"。
失败时: 如果符号函数缺失或实体不在其 *_glyphs.R 映射中,该符号可能尚未创建 — 请改用 create-glyph。
确定已识别问题的成因。
size < 1.5)?s 过小或过大?ggfx::with_outer_glow() 的交互:
col/bright 参数?预期结果: 直接指向代码修改的根因。"符号太小" -> "缩放因子为 0.6,应为 0.8。""发光过强" -> "三个重叠的填充多边形各自产生发光。"
失败时: 如果通过代码检查根因不明显,使用不同参数单独渲染符号以隔离问题。使用 render_glyph() 对单个符号进行测试。
编辑符号函数以解决诊断出的问题。
s 乘数或元素偏移量col/bright 参数,添加 alpha 增加层次感glyph_name <- function(cx, cy, s, col, bright) {
# cx, cy = center (50, 50)
# s = scale (1.0 = ~70% of canvas)
# col = domain color, bright = brightened variant
# Returns: list() of ggplot2 layers
}
预期结果: 修改后的符号函数解决了步骤 1-2 中识别的具体问题。修改是针对性且最小化的 — 增强,而非重新设计。
失败时: 如果修改导致其他维度变差(例如修复比例破坏了可读性),请还原并尝试不同的方法。如果符号需要完全重新设计,请改用 create-glyph。
渲染修改后的符号并验证修复效果。
根据实体类型重新渲染:
# From project root — use --no-cache to force re-render of modified glyph
bash viz/build.sh --only <domain> --no-cache # skills
bash viz/build.sh --type agent --only <id> --no-cache # agents
bash viz/build.sh --type team --only <id> --no-cache # teams
验证每个调色板的输出文件存在于预期路径
检查文件大小 — 图标应为 2-15 KB(WebP):
预期结果: 为所有调色板生成了新的图标文件。文件大小在预期范围内。
失败时: 如果构建脚本报错,检查 R 控制台输出中的具体错误。常见原因:符号函数中缺少右括号、引用了未定义的基元,或函数返回了非列表类型。如果渲染成功但输出为空白,符号图层可能超出了画布边界。
验证增强是否改善了目标维度。
viz/ 运行 python3 -m http.server 8080预期结果: 目标维度有可衡量的改善,其他维度无退化。符号在两种尺寸和各调色板下均效果更佳。
失败时: 如果改善微乎其微或发生退化,还原更改并重新考虑诊断。有时原始符号的局限性源于隐喻本身而非实现方式 — 在这种情况下,可能需要更改隐喻本身(升级为 create-glyph)。
build-icons.R,代理使用 build-agent-icons.R,团队使用 build-team-icons.R