feat: sn-chart-render skill — 数据图表编排器,替代旧 chart_render.py 硬化实现 - #123
Open
ray-lee-coder wants to merge 1 commit into
Open
feat: sn-chart-render skill — 数据图表编排器,替代旧 chart_render.py 硬化实现#123ray-lee-coder wants to merge 1 commit into
ray-lee-coder wants to merge 1 commit into
Conversation
…ywright validate Tier 1 orchestrator with 3 capability sub-skills (rendering, embedding, validation). Replaces previous hardcoded chart_render.py with modular pipeline. - SKILL.md: orchestrator with behavioral boundaries, artifact chain, quality gates - capability/chartjs-rendering: data dict → Chart.js HTML block (6 chart types, 6 palettes) - capability/chart-embedding: inject chart blocks into existing HTML, CDN dedup, ID conflict avoidance - capability/chart-validation: Playwright canvas/console/font verification - scripts/render_chart_html.py: 312 lines, CLI entry for chart-only or full-report template - scripts/embed_chart_to_html.py: slot-based injection with dry-run support - scripts/validate_chart_rendering.py: automated Playwright validation - templates/: replaceable Jinja-style HTML templates - references/chart-type-selection.md: decision tree for chart type selection 47/47 tests passed across 6 gradient levels (L0-L5). Audit: all 7 SenseNova design patterns verified.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
新增
sn-chart-renderskill,按照 SenseNova 三层分级架构重构了之前的图表渲染硬化实现。旧方案:
sn-md-to-html-report/scripts/chart_render.py(282 行单体) +chartjs-integration.md(参考文档) — 文件路径硬编码、无边界、无验证、无可发现性。新方案: 独立技能
sn-chart-render,编排器 + 3 个 capability + 3 个独立脚本 + 2 个可替换模板。产物链
文件结构 (10 files, +1,305 lines)
SKILL.mdcapability/chartjs-rendering/SKILL.mdcapability/chart-embedding/SKILL.mdcapability/chart-validation/SKILL.mdscripts/render_chart_html.pyscripts/embed_chart_to_html.pyscripts/validate_chart_rendering.pytemplates/standard-report.htmltemplates/chart-inject-template.htmlreferences/chart-type-selection.md测试结果
47/47 通过 (100%) — 6 梯度递进 (L0 基础 → L5 验证器)
结构审计
7 项 SenseNova 设计模式全部落实:
与旧方案对比