ljg-present
Unix-flavored presentation design and faithful typesetting. Transforms Org/Markdown outlines or authorized condensed manuscripts into a single-file offline HTML; selects punchy statements, comparisons, Unicode relationship diagrams, evidence, and chapter layouts based on semantic roles. Dark mode by default, supporting a speaker notes layer, native charts, and clicker navigation. USE WHEN present, giving talks, slides, beautifying outlines, or projecting narrative core to screen. NOT FOR unauthorized rewriting of author content or generating corporate PPTs.
1How It Works & Mechanism
Implemented by feeding structured deck data into a fixed template SloganTemplate.html, producing a single-file HTML via a build script; appending CSS at the end of output or writing separate rendering branches is prohibited.
使用 Tools/BuildDeck.ts 把数据装入 SloganTemplate.html;不在产物末尾补 CSS,不另写渲染分支。
Divided into two content contracts: faithful (faithful typesetting, preserving original wording/order/tables/code/source images) and editorial (presentation curation, allowing rewritten on-screen text within authorized scope), chosen by whether the user authorized condensation.
| faithful 保真排版 | 已有投影提纲;未授权改写 | 原文字句、顺序、表格、代码和源图 |
Themes are resolved by priority: explicit selection > clear theme_* visual tags > default hacker-dark; general topic/usage tags do not participate in theme selection.
显式选择 > 明确的 theme_* 视觉标签 > hacker-dark。普通话题、用途标签不参与主题选择。
Layout is determined by narrative function (semantic role), not by line count; two lines can still form the same proposition, with line count only affecting font size and pagination.
两行可以是一个判断。role 由讲述功能决定;行数只参与字号与分页。
Chart contract: Render charts only if data, order, or relationships exist in the source; never extrapolate numeric curves, nor arbitrarily promote parallel/correlated items into causal arrows.
图让关系直接可见。源中有数据、顺序或关系才画;不补数值曲线,不把并列或相关性擅自升级为因果箭头。
Unicode relationship diagrams draw connector lines using a monospace grid, while Chinese nodes are typeset independently with natural letter spacing, without forcing Chinese characters into fixed-width cells.
Unicode 连接线使用等宽网格,中文节点独立排版。不要把中文逐字塞进固定字符格。
Static validation is not enough: Build tools fix the template, while a browser probe inspects the actually rendered page and screenshots recheck visual hierarchy.
静态通过不等于画面成立。构建工具固定模板;浏览器探针核对实际绘制的页面,截图另检视觉主次。
Delivered as a single-file offline HTML: embedded fonts, inlined charts, zero animations, with a built-in speaker notes layer and clicker keybindings.
一个 ~/Downloads/{title}.html,字体内嵌,图表内联,离线、零动效。
Visual language is governed by a design system: warm white/ink black carry content, while amber is reserved strictly for a single focus or chapter boundary, never coloring all categories simultaneously.
默认暖白或墨黑承担内容。琥珀用于一个重点、章节边界或明确状态,不给所有分类同时着色。
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | bun(运行 BuildDeck.ts / EmbedAssets.ts / ValidateDeck.ts;BuildDeck 内部 spawn bun 子进程) |
| cli | 隔离浏览器(加载 ProbeDeck.js 做运行时绘制核对;由宿主提供,非脚本外发) |
4Recommended Governance & Evidence
- scripts/: Execute local scripts or commands: Tools/BuildDeck.ts (run via bun; reads deck data, creates directories with mkdir, writes HTML via Bun.write, and spawns bun to run
- 本地工作目录: File I/O and artifact output: ~/Downloads/{title}.html (final single-file deck, embedded fonts, inlined charts)
5Second-Pass Verification
- [ok] URL 命中均为安全字面量 — 6 条:w3.org SVG 命名空间 1 条、RegressionDeck.json 与 ValidateDeck.ts 测试字面量 5 条;无 fetch/curl 对真实端点,network_calls=[] 成立。
- [ok] 「凭证」命中非凭证读取 — 3 条命中均为 token/模板一致性(canonical-template、{{DECK_META_JSON}} 占位符)与 help 文案,不读 env/keychain/文件;credential_reads=[] 成立。
- [ok] 沙箱命中为构建期语法检查 — ValidateDeck.ts 用 `new Function(script)` 对自身模板产物做 JS 语法编译(捕获异常记 javascript-syntax),非对不可信外部代码的任意执行;已写入 injection_surface/reason。
- [ok] 写盘面与交付声明一致 — BuildDeck 用 mkdir + Bun.write 写输出 HTML;EmbedAssets writeFileSync 内嵌字体/图片;SKILL.md 交付声明为 ~/Downloads/{title}.html,一致。
- [ok] 无产物期 CDN 字体外链(未夸大离线) — SKILL.md 声明「字体内嵌…离线、零动效」,Fonts/ 内含 IBM Plex Mono ttf 与 OFL,EmbedAssets 负责内联;无不依赖远端字体的证据缺口。
- [ok] 授权契约与编辑依据真实存在 — SKILL.md 两种内容契约表与「仅有『做成演示』不自动授权删改」「记录 editingBasis…sourceIds 回到完整来源」为原文,editorial 约束非臆测。
6Verdict & Scenarios
c5877f065fa8406a…