live-dashboard
Notion-style team dashboard featuring KPIs, 7-day sparklines, an activity feed, and a task table.
1How It Works & Mechanism
Five-section layout: Header (team + time window) → KPI card grid → 7-day sparklines → Real-time activity feed → linked database task table (status pills).
- KPI 卡片网格
Delivers a 'live' feel even without a data source: The example explicitly states there is no connector bound, the displayed metrics are seeded sample data, and sparklines plus the activity stream are rendered using inline JS.
<div class="pill-live sample" id="livePill" title="No connector bound — values below are seeded sample data">
Status semantics use Notion database color palettes: Done/progress/blocked/todo/review 5-level pill color values are hardcoded in CSS variables.
--pill-done-bg: #dbeddb; --pill-done-ink: #2b593f;
The template itself is a prompt: The main text of SKILL.md is read by the loader, assembled with the shared prelude and user content, and passed to the local agent CLI for execution.
prompt = assemblePrompt({ body: skill.body, content, format });
The skill directory is a pure text asset: The loader reads SKILL.md from disk; no executable code from the directory is loaded.
const raw = safeRead(path.join(dir, "SKILL.md"));
The shared prelude is injected before the template, establishing the highest priority rule: 'The template only defines layout, style, palette, fonts, and component libraries; item quantity is determined by user content.'
【内容驱动数量 — 最高优先级, 覆盖模板里的任何数字】
The shared prelude is injected before the template, establishing the highest priority rule: 'The template only defines layout, style, palette, fonts, and component libraries; item quantity is determined by user content.'
- **禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。不要把 HTML 写到任何 \`.html\` 文件里。前端直接捕获你的 stdout 文本, 文件落盘由前端负责。
The skill directory is a pure text asset: The loader reads SKILL.md from disk; no executable code from the directory is loaded.
const exampleHtml = safeRead(path.join(dir, "example.html"));
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt instructions and rule text; contains no script execution or external side effects
5Second-Pass Verification
- [discrepancy] 规范↔示例:zebra 斑马纹 — 正文写「Linked database task table (zebra + 状态 pill)」;示例没有 nth-child 斑马纹,改用 `.db-row:hover` 高亮与 `.db-row.changed` 行闪烁动画;状态 pill 五档齐备。
- [ok] 示例脚本普查 — example.html 仅 1 个内联 <script>;fetch/XMLHttpRequest/WebSocket 命中 0,脚本只做 seeded 数据渲染与演示动效,与示例自述「seeded fixtures, not a real workspace」一致。
- [ok] 7 日窗口核对 — 示例命中 `Tasks created · last 7 days`,与正文「7 天 sparkline 趋势」一致。
- [ok] seed 兜底核对 — 正文「即使没有数据源也用 seed 数据兜底」;示例 `pill-live sample` 的 title 为 `No connector bound — values below are seeded sample data`,并在刷新按钮 title 里标明 sample mode。
- [ok] commit/host 侧声明 — 示例末尾提示 `tasks and activity below are seeded fixtures, not a real workspace.`——自查诚实,不存在把演示数据冒充真实数据的误导性文案。
- [ok] 目录资产面普查 — glob 全量:SKILL.md、example.html;无 scripts/、无 references/、无数据文件、无包管理器清单。
- [ok] 可执行代码普查 — example.html 内 <script> 计数 = 1,fetch/XMLHttpRequest/WebSocket 命中 0;SKILL.md 全篇无脚本或可执行代码。
- [ok] 外链端点普查 — 目录内(含 example.html)零 http(s) 命中,产物离线自持。
6Verdict & Scenarios
d4f43f274c67de59…