@taloswork/ose-shared 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/package.json +3 -3
  2. package/skills/document/SKILL.md +143 -215
  3. package/skills/document/art-directions/base.css +27 -2
  4. package/skills/document/art-directions/cinematic-depth.css +3 -1
  5. package/skills/document/art-directions/collage-paper.css +5 -1
  6. package/skills/document/art-directions/editorial-cut.css +5 -1
  7. package/skills/document/art-directions/geometric-pop.css +6 -0
  8. package/skills/document/art-directions/gradient-mesh.css +5 -1
  9. package/skills/document/art-directions/illustrated-doodle.css +5 -0
  10. package/skills/document/art-directions/luxury-ornament.css +4 -1
  11. package/skills/document/art-directions/maximalist-blocks.css +6 -0
  12. package/skills/document/art-directions/technical-grid.css +4 -0
  13. package/skills/document/assets/fonts/fonts.json +2 -2
  14. package/skills/document/assets/pdf-fonts/NotoSansSC-PDF-Bold.ttf +0 -0
  15. package/skills/document/assets/pdf-fonts/NotoSansSC-PDF-Regular.ttf +0 -0
  16. package/skills/document/assets/pdf-fonts/OFL.txt +93 -0
  17. package/skills/document/assets/pdf-fonts/README.md +35 -0
  18. package/skills/document/assets/tessdata/LICENSE-Apache-2.0.txt +202 -0
  19. package/skills/document/assets/tessdata/README.md +21 -0
  20. package/skills/document/assets/tessdata/chi_sim.traineddata.gz +0 -0
  21. package/skills/document/assets/tessdata/eng.traineddata.gz +0 -0
  22. package/skills/document/bin/deck-build.cjs +2311 -41
  23. package/skills/document/bin/deck-chart.cjs +762 -0
  24. package/skills/document/bin/deck-plan.cjs +802 -0
  25. package/skills/document/bin/deck-qa.cjs +984 -249
  26. package/skills/document/bin/deck-scenario.cjs +1346 -0
  27. package/skills/document/bin/doc-convert.cjs +130 -39
  28. package/skills/document/bin/doc-fill.cjs +73121 -170
  29. package/skills/document/bin/doc-gen.cjs +625 -68
  30. package/skills/document/bin/doc-run.cjs +162 -24
  31. package/skills/document/bin/doc-scan.cjs +13 -0
  32. package/skills/document/bin/doc-text.cjs +13 -0
  33. package/skills/document/bin/doc-validate.cjs +718 -23
  34. package/skills/document/bin/doc-xml.cjs +9 -5
  35. package/skills/document/bin/docx-annotate.cjs +95 -19
  36. package/skills/document/bin/fontkit.cjs +1 -0
  37. package/skills/document/bin/html2pptx.cjs +1372 -121
  38. package/skills/document/bin/ocr-worker.cjs +1 -0
  39. package/skills/document/bin/ocr.cjs +131 -40
  40. package/skills/document/bin/pdf-form.cjs +674 -177
  41. package/skills/document/bin/pdf-images.cjs +13 -0
  42. package/skills/document/bin/pdf-ops.cjs +634 -199
  43. package/skills/document/bin/pdf-render.cjs +19 -3
  44. package/skills/document/bin/pdf-tables.cjs +13 -0
  45. package/skills/document/bin/pptx-clone.cjs +3 -3
  46. package/skills/document/bin/pptx-slide.cjs +3 -3
  47. package/skills/document/bin/xlsx-query.cjs +192 -61
  48. package/skills/document/bin-reference.md +56 -33
  49. package/skills/document/content-pipeline.md +129 -242
  50. package/skills/document/deck-design.md +355 -638
  51. package/skills/document/layouts/README.md +46 -33
  52. package/skills/document/layouts/capacity.json +1 -0
  53. package/skills/document/layouts/slots.json +1 -1
  54. package/skills/document/layouts/toc-panel.tpl +1 -1
  55. package/skills/document/motion/README.md +3 -2
  56. package/skills/document/office.md +3 -3
  57. package/skills/document/packs/board-brief/backdrop.html +2 -0
  58. package/skills/document/packs/board-brief/pack.css +2 -1
  59. package/skills/document/packs/mckinsey-photo/backdrop.html +2 -0
  60. package/skills/document/packs/mckinsey-photo/pack.css +2 -1
  61. package/skills/document/packs/press-room/backdrop.html +2 -0
  62. package/skills/document/packs/press-room/pack.css +2 -1
  63. package/skills/document/packs/prismatic-3d/backdrop.html +2 -0
  64. package/skills/document/packs/prismatic-3d/pack.css +4 -1
  65. package/skills/document/pdf.md +53 -49
  66. package/skills/document/rewrite.md +241 -308
  67. package/skills/document/scenarios.json +1290 -0
  68. package/skills/document/scenarios.schema.json +103 -0
  69. package/skills/document/styles/README.md +15 -25
  70. package/skills/document/styles/_contract-defaults.css +25 -1
  71. package/skills/document/styles/anthropic/skin.css +6 -3
  72. package/skills/document/styles/apple/skin.css +4 -3
  73. package/skills/document/styles/bistro-warm/backdrop.html +2 -0
  74. package/skills/document/styles/bistro-warm/skin.css +4 -1
  75. package/skills/document/styles/black-gold/skin.css +6 -5
  76. package/skills/document/styles/bold-clash/backdrop.html +2 -0
  77. package/skills/document/styles/bold-clash/skin.css +2 -1
  78. package/skills/document/styles/branding/skin.css +4 -4
  79. package/skills/document/styles/campus-teal/backdrop.html +2 -0
  80. package/skills/document/styles/campus-teal/skin.css +2 -1
  81. package/skills/document/styles/cinereel/skin.css +7 -3
  82. package/skills/document/styles/clinic-care/backdrop.html +2 -0
  83. package/skills/document/styles/clinic-care/skin.css +2 -1
  84. package/skills/document/styles/cool/skin.css +6 -5
  85. package/skills/document/styles/dark-glass/backdrop.html +2 -0
  86. package/skills/document/styles/dark-glass/skin.css +2 -1
  87. package/skills/document/styles/gov-brief/backdrop.html +2 -0
  88. package/skills/document/styles/gov-brief/skin.css +2 -1
  89. package/skills/document/styles/grid-tech/backdrop.html +2 -0
  90. package/skills/document/styles/grid-tech/skin.css +2 -1
  91. package/skills/document/styles/hand-drawn/skin.css +3 -3
  92. package/skills/document/styles/ivory-gold/skin.css +7 -6
  93. package/skills/document/styles/legal-slate/backdrop.html +2 -0
  94. package/skills/document/styles/legal-slate/skin.css +2 -1
  95. package/skills/document/styles/magazine-ink/skin.css +4 -3
  96. package/skills/document/styles/mckinsey/skin.css +2 -1
  97. package/skills/document/styles/memphis/backdrop.html +2 -0
  98. package/skills/document/styles/memphis/skin.css +2 -1
  99. package/skills/document/styles/mono/skin.css +6 -2
  100. package/skills/document/styles/neon-cyber/backdrop.html +2 -0
  101. package/skills/document/styles/neon-cyber/skin.css +2 -1
  102. package/skills/document/styles/olive-gold/skin.css +7 -6
  103. package/skills/document/styles/organic-earth/backdrop.html +2 -0
  104. package/skills/document/styles/organic-earth/skin.css +2 -1
  105. package/skills/document/styles/pastel-saas/backdrop.html +2 -0
  106. package/skills/document/styles/pastel-saas/skin.css +2 -1
  107. package/skills/document/styles/portfolio-noir/backdrop.html +2 -0
  108. package/skills/document/styles/portfolio-noir/skin.css +2 -1
  109. package/skills/document/styles/retro-press/backdrop.html +2 -0
  110. package/skills/document/styles/retro-press/skin.css +2 -1
  111. package/skills/document/styles/sport-arena/backdrop.html +2 -0
  112. package/skills/document/styles/sport-arena/skin.css +4 -1
  113. package/skills/document/styles/swiss-grid/skin.css +10 -5
  114. package/skills/document/styles/wedding-blush/backdrop.html +2 -0
  115. package/skills/document/styles/wedding-blush/skin.css +4 -1
  116. package/skills/document/theme-system.md +85 -77
  117. package/skills/document/themes/README.md +7 -5
  118. package/skills/document/vision.md +8 -5
  119. package/skills/document/xlsx.md +15 -25
  120. package/skills/cozy-static-svg/SKILL.md +0 -76
  121. package/skills/cozy-static-svg/references/approved-preview.png +0 -0
  122. package/skills/cozy-static-svg/references/cross-platform.md +0 -73
  123. package/skills/cozy-static-svg/references/moon_keeps_watch.svg +0 -229
  124. package/skills/cozy-static-svg/references/style-anchor.md +0 -271
  125. package/skills/cozy-static-svg/scripts/artkit.py +0 -321
  126. package/skills/cozy-static-svg/scripts/to_png.py +0 -333
@@ -1,16 +1,13 @@
1
1
  # Content pipeline — premium deck methodology (clarify → research → structure → outline → author → QA)
2
2
 
3
- Follow this for a **substantive, premium-looking deck** (路演/汇报/评审/宣讲/pitch/
4
- keynote/launch), not a quick 3-slide summary. It is the single source for HOW to
5
- source, structure, and flesh out deck content; the `layouts/` library × a `styles/`
6
- skin (deck-design.md) then RENDER it. You run these phases yourself with your own
7
- tools (web search, reasoning, AskUserQuestion) — there is no research script.
8
-
9
- **Design target = a premium presentation, not a document.** On-slide text is
10
- sparse and punchy; the *substance* lives in visuals, data, and speaker notes (Phase
11
- 4 density). A wall of text is not "substantive" — it is lazy in the other direction.
12
- Rich VISUAL + sparse TEXT. **Compose from `layouts/` structure-only layouts, not from
13
- a blank slide** — authoring every slide from zero is the #1 "AI-generated" tell.
3
+ Follow this for a **substantive deck** (路演/汇报/评审/宣讲/pitch/keynote/launch), not a
4
+ quick 3-slide summary. It is the single source for HOW to source, structure and flesh
5
+ out deck content; deck-design.md renders it. You run these phases yourself (web search,
6
+ reasoning, AskUserQuestion) — there is no research script.
7
+
8
+ **Design target = a premium presentation, not a document**: sparse punchy text on the
9
+ slide, the substance in visuals, data and speaker notes (Phase 4). A wall of text is not
10
+ "substantive".
14
11
 
15
12
  ## Execution discipline (whole pipeline)
16
13
 
@@ -24,69 +21,57 @@ a blank slide** — authoring every slide from zero is the #1 "AI-generated" tel
24
21
  4. **No silent skips**: if you skip a step (e.g. Research for "organize my material"),
25
22
  say so and why.
26
23
 
27
- Two entry modes:
28
- - **Open-ended** ("做一份关于 X 的 PPT") → run every phase from Research.
29
- - **Organize existing material** (user gave a doc/notes) → SKIP Phase 1; in Phase 4
30
- reorganize THEIR content into the slide structures, never invent facts.
24
+ Two entry modes: **open-ended** ("做一份关于 X 的 PPT") → every phase from Research;
25
+ **organize existing material** (user gave a doc/notes) → skip Phase 1 and in Phase 4
26
+ reorganize THEIR content, never invent facts.
31
27
 
32
28
  ---
33
29
 
34
30
  ## Phase 0 — Clarify & Brief (MANDATORY gate)
35
31
 
36
- Before any research or generation, confirm requirements and persist a brief. Follow
37
- the canonical interaction contract in `SKILL.md`: ask only for missing values among
38
- content source, scenario, and slide count in **ONE AskUserQuestion call with at most
39
- THREE questions**. Do not re-ask values already supplied. The scenario-ranked style
40
- picker is a separate single-question image-card call after the scenario is known,
41
- unless the user already selected a catalog entry, supplied a style template, or
42
- explicitly authorized automatic selection.
43
-
44
- 1. **Content source** — 提供材料 / 联网调研 / 自由创作. (Provided → request the materials now.
45
- When you ask the user for a FILE — a template/materials .pptx/.docx/.pdf — set
46
- `filePick: "file"` on that ask_user_question so they get a native "choose file"
47
- button instead of typing a path; the picked path is the answer.)
48
- **A material given as CONTENT is for its TEXT/DATA only — extract and re-author it
49
- in the chosen skin; NEVER reuse its look.** In particular a **`.pptx` handed in as
50
- content** → read its text (the `.txt` sidecar or `bin/doc-text`) and treat it like
51
- any other source; do **NOT** `pptx-tokenize`/`pptx-theme` it (those reuse the deck's
52
- STYLE — a separate style-picker decision, see below). Reusing an uploaded deck's look is ONLY triggered
53
- when the user picks that as their **style** ("复用这份 PPT 的风格"), never merely
54
- because the content happened to arrive as a `.pptx`.
55
- 2. **Scenario** — the deck's use case (pitch / 内审 / 销售 / 讲座 / 发布会 / 培训 / 大会 /
56
- 工作汇报 / 述职 / 项目评审 / 年度总结 / 商业计划书 / 投标 / 政务汇报 / 公司产品介绍 …
57
- — the full 15 with their logic live in the **Scenario matrix** below). AskUserQuestion
58
- caps at 4 **TEXT** options, so **for THIS scenario question** present the **3–4 best-fit
59
- for the topic** + let the user type Other (any scenario, listed or not). This text-option
60
- cap does not apply to the separate image-card style picker; follow `SKILL.md` for its
61
- current catalog-backed recommendation and browse-all contract. Then look the choice up in the matrix (unlisted →
62
- map to the nearest row). Record as a short phrase. Scenario is NOT just wording — it
63
- locks **five** things at once (tone · density · **required roles** · narrative shape ·
64
- page range). Carry them through: required roles = a checklist Phase 2 MUST satisfy
65
- (MECE), density feeds Phase 4 §4.2 P2, narrative picks the Phase 2 pyramid, pages seed the slide-count choice.
66
- 3. **Slide count** — default = the chosen scenario's **默认页数** column in the Scenario
67
- matrix (e.g. pitch 10–12 · 内审 6–8 · keynote 15–20 · 工作汇报 5–10 · BP 15–25 · 投标
68
- 15–30); clamp 3–30, double-check outside.
69
-
70
- **Separate style picker — pick ONE current catalog entry after scenario is known.**
71
- Read `catalog.json` immediately before asking and use the scenario-ranked picker
72
- contract in `SKILL.md`: show at most eight recommended final entries, then
73
- “查看全部风格” and the custom-template card. If the user expands, show every current
74
- `catalog.entries` item in catalog order. Never use a hard-coded skin count or stale
75
- id list. Samples are pre-rendered WebP assets — use `entry.sample` directly and do
76
- not render anything during the question. Rank by catalog metadata and the confirmed
77
- scenario; do not hardcode a default family. After confirmation, save the deck-skin
78
- preference to memory.
79
-
80
- **Custom style (其他/自定义)** — prefer **B (derive a bespoke look)**: from an existing
81
- deck → `pptx-tokenize` (reuse its layouts/master) or `pptx-theme` (its palette → our
82
- layouts); from a reference image → build a `styles/<name>/skin.css`. Fallbacks: map
83
- to the nearest catalog family or tweak one. A deck given here is used for its STYLE —
84
- distinct from a deck given as **content**, which is text-only. Full routing in `SKILL.md`.
85
-
86
- **Scenario matrix** (each row locks tone · density · required roles · narrative ·
87
- pages). The required roles are a HARD checklist — Phase 2 must include them all:
88
-
89
- | 场景 | 语气 | 密度 | 必备章节(required roles — all MUST appear) | 叙事(Phase 2) | 默认页数 |
32
+ The clarify gate and the style picker are defined once, in SKILL.md: ask only for the
33
+ missing values among content source, scenario and slide count, in ONE AskUserQuestion
34
+ call with at most
35
+ THREE questions; the scenario-ranked image-card style picker is a separate call after
36
+ the scenario is known. What each answer means here:
37
+
38
+ 1. **Content source** — 提供材料 / 联网调研 / 自由创作 (offline / no web tool → say so;
39
+ only the first and last). Provided → request the materials now; when you ask for a FILE, set
40
+ `filePick: "file"` on that question (a native file button; the picked path is the
41
+ answer). **Material given as CONTENT is for its TEXT/DATA only** — extract and
42
+ re-author it in the chosen style; never reuse its look. A `.pptx` handed in as
43
+ content → read its text (`.txt` sidecar or `bin/doc-text`); do **NOT**
44
+ `pptx-tokenize`/`pptx-theme` it. Reusing a deck's look happens only when the user
45
+ picks it as their **style** ("复用这份 PPT 的风格"), never because the content
46
+ arrived as a `.pptx`.
47
+ 2. **Scenario** — AskUserQuestion caps TEXT options at 4, so offer the 3–4 rows of the
48
+ matrix below that best fit the topic (the user can type any other); an unlisted
49
+ answer maps to the nearest row. Record it as a short phrase. It locks **five** things:
50
+ tone · density (feeds Phase 4) · **required roles** (the default checklist for Phase 2) ·
51
+ narrative shape (Phase 2) · page range (the slide-count default). Then run
52
+ `bin/deck-scenario.cjs "<scenario>"` once: it prints that row with each section's
53
+ `content` — what the section must contain (elements, evidence, a recommended shape).
54
+ 3. **Slide count** — default = the row's **默认页数**; clamp 3–30, double-check outside.
55
+
56
+ **Scenario matrix** — source of truth `scenarios.json`; the tables below are generated
57
+ from it. The required roles (必备章节) are the scenario's **default**: every one appears
58
+ unless the user's own words say otherwise.
59
+
60
+ **User wins; the matrix is only the base.** When the topic or answers conflict with the
61
+ row — 「别讲团队」, 「按 现状 / 挑战 / 路线图 三段讲」, a chapter order of their own — follow
62
+ the user:
63
+ - **Their structure** → chapter titles follow it. Never splice role names into a title
64
+ (「挑战|Solution」, 「融资需求|团队|下一步」). Fold each default role into their nearest
65
+ chapter and name it at the start of a point (「融资需求:…」).
66
+ - **Omit** a role only when the user said so, and only with their verbatim words.
67
+ 「简短一点」 means fewer pages, not dropping Ask — merge roles instead.
68
+ - Record every override in `deck-brief.md` → `Overrides:`
69
+ `Team/团队 omitted — "别讲团队"` · `Market/市场 merged into S3`.
70
+ An omission without a verbatim quote is not an override, so restore that role.
71
+ - The format contract and no-fabrication rules are never overridable.
72
+
73
+ <!-- generated:scenario-matrix · source: scenarios.json · regenerate: node scripts/deck/gen-scenarios.mjs — do not edit by hand -->
74
+ | 场景 | 语气 | 密度 | 必备章节(required roles — default; user overrides win) | 叙事(Phase 2) | 默认页数 |
90
75
  |---|---|---|---|---|---|
91
76
  | **pitch** 融资/路演 | 自信 · 有张力 · 故事驱动 | 稀疏 · 大数字 | Problem/问题 · Solution/解决方案 · Market/市场 · Product/Traction/产品/进展 · Team/团队 · **Ask/融资需求** | SCQA / 问题-方案 | 10–12 |
92
77
  | **内审** | 客观 · 直接 · 结论先行 | 略密(容明细/数据) | 结论/进展 · 关键指标 · 问题与风险 · 下一步/决策项 | 结论先行 | 6–8 |
@@ -106,36 +91,24 @@ pages). The required roles are a HARD checklist — Phase 2 must include them al
106
91
  | **产品调研** 竞品分析 市场研究 | 客观 · 有据 · 不替结论下判断 | 中 | 市场规模 · 竞品格局 · 用户需求 · 差距与机会 · 结论建议 | 先摆事实,再给判断 | 10–15 |
107
92
  | **会议纪要** 会后同步 | 简洁 · 可执行 · 不复述过程 | 低 | 议题 · 结论 · 待办 · 待决事项 | 结论先行 | 4–8 |
108
93
  | **数据分析** 数据解读 指标复盘 | 结论先行 · 可追溯 | 中 | 结论 · 口径与数据源 · 维度拆解 · 归因 · 建议 | 结论先行 | 6–10 |
94
+ <!-- /generated:scenario-matrix -->
95
+
96
+ <!-- generated:scenario-style-bias · source: scenarios.json · regenerate: node scripts/deck/gen-scenarios.mjs — do not edit by hand -->
97
+ Tone also biases the catalog style ranking: 张力/情绪(pitch·发布会·大会)→ 深色酷炫(cool/apple/black-gold);务实(内审·销售)→ 白底咨询(mckinsey);清晰(讲座·培训)→ 中性/教育风.
98
+ <!-- /generated:scenario-style-bias -->
109
99
 
110
- **必备章节要中英双写(`English/中文`)。** 这张 checklist 的用法是拿每个词去**生成
111
- 出来的大纲标题**里找子串(斜杠分段,命中任意一段就算有)。写成纯英文时,一份写得
112
- 好好的中文稿一个都命中不了 —— 于是每次都判缺、每次都白花一轮模型回喂(10–30 秒
113
- +一次调用的钱)。反过来整行换成中文也不对:中文路演稿**真的**会写 Problem / Ask /
114
- Demo,换掉只是把漏判翻到另一边。中文那半边要挑够窄的词:写「融资」的话,一张叫
115
- 「我们的融资故事」的封面就能把 Ask 顶掉,而那一节缺了正是这张表存在的理由。
116
- 括号写法(`关键成果(STAR)`)同样不行 —— 它一个斜杠都没有,整串当一个词去找,
117
- 大纲里必须原样出现那七个字符才算命中。
118
-
119
- 还有两个容易漏的:**用单数**(大纲会写 `Module 1`,`Modules` 匹配不上,而 `Module`
120
- 两种都命中);**本来就是中文的那几段也要补英文**(`练习/示例` 漏了 `Exercise`,
121
- 一份英文培训大纲就在这一项上判缺)。
122
-
123
- Tone also biases the catalog style ranking: 张力/情绪(pitch·发布会·大会)→ 深色酷炫(cool/apple/
124
- black-gold);务实(内审·销售)→ 白底咨询(mckinsey);清晰(讲座·培训)→ 中性/教育风.
125
- If the user's scenario isn't listed, map it to the nearest row's tone/density/narrative.
126
-
127
- **Persist `deck-brief.md`**: Topic · Scenario · Source · Style(name + 2–3 sentence
128
- palette/type/motif) · Theme file · Template style · Slide Count · (assumptions).
129
- Persist it and continue. Do not ask the user to approve information they just supplied.
130
- If the brief adds a material assumption that changes scope, show only that assumption
131
- and pause for approval before continuing.
132
- (Offline / no web tool → say so; source can only be 提供材料 or 自由创作.)
100
+ **Persist `deck-brief.md`**: Topic · Scenario · Source · Style (entry id + 2–3 sentences
101
+ on palette/type/motif) · Template style · Slide Count · Overrides (if any) · (assumptions). Persist it and
102
+ continue — do not ask the user to approve what they just supplied. If the brief adds a
103
+ material assumption that changes scope, show only that assumption and pause.
133
104
 
134
105
  ---
135
106
 
136
- ## Phase 1 — Research (open-ended only — PRESERVED, Talos rigor)
107
+ ## Phase 1 — Research (open-ended only)
137
108
 
138
- Search 8–12 queries across layers, then organize into 6 dimensions:
109
+ Run 8–12 queries **in parallel** (many searches at once, or a sub-agent per dimension —
110
+ breadth beats depth-first), then organize into 概述 / 背景 / 关键信息 / 证据(案例·数据) /
111
+ 分析 / 展望.
139
112
 
140
113
  | Layer | Query pattern |
141
114
  |---|---|
@@ -145,16 +118,11 @@ Search 8–12 queries across layers, then organize into 6 dimensions:
145
118
  | Application | `[主题] 案例/实践` |
146
119
  | Trends | `[主题] 趋势/未来` |
147
120
 
148
- Dimensions: 概述 / 背景 / 关键信息 / 证据(案例·数据) / 分析 / 展望.
149
-
150
- **层次是兜底,场景才是方向。** 上面那五层是**开放式议题**的默认铺法(用户只给了
151
- 一个主题、没有材料)。一旦 Phase 0 选定了场景,就照下表按**这份稿子真正需要的东西**
152
- 去查 —— 每条焦点出 1–2 条查询词,再从上面五层补 2–4 条防止十条围着一个角度。
153
- 用户在 Phase 0 自己交代的那句话优先级最高,先查他明说要的。
154
-
155
- 焦点直接对着上面场景矩阵的 `必备章节` —— 查回来的东西要能填进那些章节,
156
- 否则这一轮检索就是白花的(按次计费)。
121
+ **层次是兜底,场景才是方向。** 五层只是只给了主题时的默认铺法。场景选定后按下表查这份
122
+ 稿子真正需要的东西:每条焦点 1–2 条查询,再用五层补 2–4 条防止十条围着一个角度;用户
123
+ 自己点名要的先查。焦点对着场景的必备章节——查回来填不进去的检索就是白花钱(按次计费)。
157
124
 
125
+ <!-- generated:scenario-research-focus · source: scenarios.json · regenerate: node scripts/deck/gen-scenarios.mjs — do not edit by hand -->
158
126
  | 场景 | 检索焦点 |
159
127
  |---|---|
160
128
  | **pitch** 融资/路演 | 市场规模与增速(TAM/SAM) · 可比公司融资与估值 · 同类产品与差异 · 目标客群痛点证据 |
@@ -175,31 +143,24 @@ Dimensions: 概述 / 背景 / 关键信息 / 证据(案例·数据) / 分析 /
175
143
  | **产品调研** 竞品分析 市场研究 | 市场规模与增速 · 竞品功能与定价对比 · 用户评价与差评 · 渠道与份额数据 |
176
144
  | **会议纪要** 会后同步 | 议题涉及的外部事实 · 相关口径与定义 · 同类决策的公开先例 |
177
145
  | **数据分析** 数据解读 指标复盘 | 指标口径定义 · 行业基准值 · 同类归因案例与方法 |
146
+ <!-- /generated:scenario-research-focus -->
178
147
 
179
148
  内部数据型的几档(内审 · 述职 · 工作汇报 · 年度总结)焦点**刻意收窄到对标与口径**:
180
- 它们的主体材料在用户自己手里,联网能补的只有"外面是什么水位"。照五层去查行业定义
181
- 和历史,查回来的东西一条都填不进它们的必备章节。
182
-
183
- **Fan out, then cite:** run layers in PARALLEL (many searches at once, or a
184
- sub-agent per dimension) — breadth beats depth-first. **Every data point
185
- (number/percent/year/quote) carries its source** — keep a `{claim → URL}` list; a
186
- stat without a source is a hallucination risk, drop it. **Quality gate: ≥3
187
- authoritative sources, ≥5 distinct domains, drop >5-year-old or unverified.** The
188
- source list goes on a "参考来源" ending slide AND into speaker notes.
189
-
190
- **Assets & notes (matters MORE now that slides are text-sparse):** generate
191
- figures/photos with the media-generation MCP(文生图)into local files, reference by
192
- path (`<img src="./hero.png">`) — `html2pptx` auto-inlines them as data: URIs. Push
193
- every detail/caveat/citation that does NOT fit the sparse slide into per-slide
194
- **speaker notes** (`<div class="talos-notes" style="display:none">…</div>` → pptx
195
- notesSlide; `--notes-doc` emits a standalone notes doc). Cite → notes → assets, one pass.
149
+ 主体材料在用户手里,联网只能补"外面是什么水位"。
150
+
151
+ **Cite everything:** every data point (number / percent / year / quote) carries its
152
+ source in a `{claim → URL}` list; a stat without one is dropped. **Quality gate: ≥3
153
+ authoritative sources, ≥5 distinct domains; drop anything >5 years old or unverified.**
154
+ The source list goes on a "参考来源" ending slide AND into speaker notes. Generate
155
+ figures/photos with the media-generation tool into local files at the same time.
196
156
 
197
157
  ---
198
158
 
199
- ## Phase 2 — Narrative structure (PRESERVED — Talos Pyramid/SCQA/MECE)
159
+ ## Phase 2 — Narrative structure (Pyramid / SCQA / MECE)
200
160
 
201
- Pick the pyramid shape by deck type, build chapters top-down:
161
+ Take the scenario row's narrative (by deck type below) and build chapters top-down:
202
162
 
163
+ <!-- generated:scenario-narratives · source: scenarios.json · regenerate: node scripts/deck/gen-scenarios.mjs — do not edit by hand -->
203
164
  | Deck type | Structure | Chapter flow |
204
165
  |---|---|---|
205
166
  | 报告/总结 | 结论先行 | 结论 → 证据 → 细节 → 下一步 |
@@ -207,153 +168,79 @@ Pick the pyramid shape by deck type, build chapters top-down:
207
168
  | 培训/教学 | 由浅入深 | 基础 → 核心 → 进阶 → 练习 |
208
169
  | 融资/路演 | SCQA | 情境 → 冲突 → 问题 → 解答 |
209
170
  | 活动/宣传 | 情绪线 | 钩子 → 共鸣 → 高潮 → 行动 |
171
+ <!-- /generated:scenario-narratives -->
210
172
 
211
- Default 14–20 pages; 1–5 pages per chapter. **MECE check**: chapters don't overlap
212
- and together fully support the ONE core message. The scenario's required roles
213
- (Phase 0) must all appear.
173
+ Page count = the confirmed slide count; 1–5 pages per chapter. **MECE**: chapters don't
174
+ overlap and together support the ONE core message; every required role appears, unless
175
+ it is merged or omitted per the brief's Overrides.
214
176
 
215
177
  ---
216
178
 
217
- ## Phase 3 — Outline artifact (MANDATORY gate — WorkBuddy chapters.md richness + Talos slide/notes split)
179
+ ## Phase 3 — Outline artifact (MANDATORY gate)
218
180
 
219
- Materialize the plan into `slide-outline.md` — the single source of truth for Phase
220
- 4–5; do not re-decide count/roles later. Each slide gets a **full per-page content
221
- spec block** (the depth of WorkBuddy's `chapters.md`), but the page's substance is
222
- split into **what appears ON the canvas (sparse)** vs **what moves to speaker notes
223
- (detail)** — so the outline plans real content without pre-writing a wall of text.
181
+ Materialize the plan into `slide-outline.md` — the single source of truth for Phase 4–5;
182
+ do not re-decide count or roles later. One full block per slide, splitting what goes ON
183
+ the canvas (sparse) from what moves to speaker notes (detail). The fields map straight
184
+ onto `deck-plan`'s plan.json:
224
185
 
225
186
  ```markdown
226
187
  # Slide Outline
227
- ## Meta — from deck-brief.md (Topic/Scenario/Source/Style/Theme/Template style/Count)
188
+ ## Meta — from deck-brief.md (Topic/Scenario/Source/Style/Template style/Count/Overrides)
228
189
  ## Source Materials — provided summary · {claim→URL} list · or "N/A — topic knowledge"
229
- ## Slide-by-Slide (one BLOCK per slide — a full content spec, not a one-liner)
190
+ ## Slide-by-Slide (one BLOCK per slide)
230
191
 
231
192
  ### S1 — Cover
232
- - Template: cool/cover
233
- - Takeaway: <one line — the TITLE stated as a CONCLUSION, not the topic>
234
- - Content structure: <Data/Trend · Single-impact · Argument · Cards · Comparison · Process · Framework · Case-study · Summary> — core elements: …
235
- - On-slide (sparse): <only what shows ON the canvas — ≤3–5 key points / numbers, phrase-level>
193
+ - Role: cover | toc | section | content | ending (deck-plan `role`)
194
+ - Takeaway: <the TITLE stated as a CONCLUSION, not the topic>
195
+ - Shape: parallel · process · timeline · compare · hierarchy · matrix · list · metrics · quote · table · agenda (deck-plan `shape`; optional `intent` from layouts/profiles.json)
196
+ - On-slide (sparse): <only what shows on the canvas — 3–5 points / numbers, phrase-level>
236
197
  - Data points {claim→URL}: <n1 (src) · n2 (src) · …> (drop any stat with no source)
237
- - → Notes: <detail / caveat / context / citations that go to SPEAKER NOTES, never the slide>
238
- - Density: Light(≤3) / Medium(4–6) / Heavy(7+) · Dark: yes/no · Chart: yes/no · Image: yes/no
198
+ - Chart: <type + data> or none · Image: yes/no
199
+ - → Notes: <detail / caveat / context / citations — speaker notes, never the slide>
239
200
  - Narrative role: <how this page advances the ONE core message>
240
201
 
241
202
  ### S2 — Agenda
242
- - Template: cool/toc
243
- - … (same fields; repeat one block for ALL N slides)
203
+ - … (same fields; one block for ALL N slides)
244
204
 
245
205
  ## Visual Rhythm
246
- - Dark-accent slides at: <e.g. 1, 7, N> (≥1–2 dark slides)
206
+ - Dark-accent slides at: <e.g. 1, 7, N> (≥1–2 where the style offers dark pages)
247
207
  - Chart-bearing slides at: <e.g. 4, 6, 9>
248
- - Template rotation: no template >2 slides in a row, none more than twice total unless unavoidable
249
208
  ```
250
209
 
251
- Each slide BLOCK commits: the **role + template(archetype)** (Phase 4 catalog); a
252
- **one-line takeaway** (title = conclusion, not topic); the **content structure +
253
- core elements** (from the §4.1 catalog); an explicit **On-slide (sparse) vs → Notes
254
- (detail)** split so substance is planned without crowding the canvas; **{claim→URL}**
255
- for every data point (a sourceless stat is dropped); and the **density / dark /
256
- chart / image** flags. Then **GATE**: show the outline, AskUserQuestion
257
- approve/revise, advance only on approval.
210
+ A required section's block covers its `content` (deck-scenario) — the elements on the
211
+ slide or in the data points, the evidence with a source — unless the user's words say
212
+ otherwise. An element with no source → say so in Notes; never invent the number.
258
213
 
259
- ---
214
+ Then **GATE**: show the outline, AskUserQuestion approve/revise, advance only on approval.
260
215
 
261
- ## Phase 4 — Author & fill (merge: templates + narrative + WorkBuddy density/visual)
216
+ ---
262
217
 
263
- Announce the on-canvas language first (default = the user's prompt language; respect
264
- an explicit "用英文/use English"): one line, e.g. `本次幻灯片内容将使用中文生成`.
218
+ ## Phase 4 — Author
265
219
 
266
- **Default route = `layouts/` × a skin + html2pptx.** For each slide: pick the layout
267
- that matches its content structure (by P1/P2/P3, `layouts/README.md`), **copy the
268
- `.tpl` `<section>` into the deck HTML, replace the sample text/numbers with real cited
269
- content** — leave color to the skin (never hardcode a brand hex). Render
270
- `bin/html2pptx.cjs deck.html out.pptx --style <skin>`. Where the catalog doesn't fit
271
- (bespoke hero covers, layered architecture, magazine) author bespoke HTML per
272
- **deck-design.md** (still using the skin's semantic classes). With no browser at
273
- all, say so and stop — there is no spec-deck fallback.
220
+ Announce the on-canvas language in one line (default = the user's prompt language;
221
+ respect an explicit "用英文/use English"), e.g. `本次幻灯片内容将使用中文生成`. Then turn
222
+ the approved outline into plan.json and follow deck-design.md "Workflow"
223
+ (`deck-plan` → `deck-build` → bespoke slides only where no layout fits). Layout
224
+ selection rules (P1/P2/P3) live in layouts/README.md and are applied by `deck-plan`.
274
225
 
275
- ### 4.1 Content structure → layout
226
+ Content density — what each slide carries:
276
227
 
277
- | Content structure | Core elements | → `layouts/*` (P1/P2/P3) |
278
- |---|---|---|
279
- | **Data / Trend** | 数据标题 + 指标 + 一句数据故事 | `chart-kpi` |
280
- | **Single impact** | 一个关键数字 + 上下文 | `big-stat` |
281
- | **Argument / Concept+visual** | 论点/定义 + 3–4 证据/组件 | `split-two-col` |
282
- | **Cards (并列要点)** | 3 个并列要点 | `cards-3` |
283
- | **Comparison** | 框架 + 2–3 选项 × 维度 + 推荐 | `comparison` |
284
- | **Process** | 目标 + 3–5 步骤 | `steps` / `steps-vertical` |
285
- | **Framework/Matrix** | 两轴 + 四象限 | `matrix-2x2` |
286
- | **Case Study** | 背景/挑战/方案/前后 | `split-two-col` + `big-stat` |
287
-
288
- Role pages: `cover` · `toc` · `section` · `ending` (and their variants in `layouts/README.md`). Anything no layout fits → a bespoke slide (deck-design.md).
289
-
290
- ### 4.2 Pick the exact template — priority order (P1 → P2 → P3)
291
-
292
- The 4.1 table gives the template FAMILY; resolve the exact `.tpl` (and variant) in
293
- this **priority order** — P1 outranks P2 outranks P3; never trade layout-fit for variety:
294
-
295
- - **P1 — Layout match (most important): image presence + position.** No image → a
296
- text-only template (`cards-3` / a text-column split). Image present → `split-two-col`
297
- with the visual on the side it reads best (mirror the `.tpl` for image-left). Data →
298
- `chart-kpi` (chart choice — inline SVG vs native `data-chart` — per deck-design.md "Charts"). Never force text into an image slot or an image
299
- into a text slot; delete an unused image slot rather than leaving a placeholder.
300
- - **P2 — Density match: point count → variant.** 1–2 points / one hero number →
301
- spacious·centered (`big-stat`, hero cover); 3–4 points → balanced two-column
302
- (`split-two-col` / `cards-3`); 5+ points → grid·dense (`cards-3` grid or bespoke
303
- multi-column). Match the template's slot count to the outline's point count — if
304
- content > slots, condense to ≤6 items; if content < slots, remove the spare slots.
305
- - **P3 — Diversity (ENFORCED, hard rule).** ❌ same template twice in a row · ❌ same
306
- template >2× total. Vary the variant even when the family repeats. **TOC by chapter
307
- count**: 3–4 → centered/large-title · 5–6 → list/grid · 7+ → dense/two-column.
308
- **Reuse ONE `section` template for ALL transition pages** (consistency), but rotate
309
- content templates. If the catalog can't satisfy P1+P2 without repeating, author a
310
- bespoke slide (deck-design.md) rather than force a wrong-fit template.
311
-
312
- ### 4.3 Premium density (REPLACES the old text-density floor)
313
-
314
- - **One message per slide.** The title states the **takeaway** (conclusion), not the topic.
315
- - **Short phrases > sentences. No paragraphs on the slide.** Every detail, caveat,
316
- and citation goes to **speaker notes**, not the canvas.
317
- - **Substance = VISUAL + DATA, not word count.** Each content slide carries real
318
- substance through **≥1 chart/diagram/big-number/decorated visual + 3–5 concrete
319
- data points** (numbers/%/years) — the data lives in the visual, its story in one
320
- line. A bullets-only slide is a last resort for genuinely list-like content.
321
- - **Never shrink the font to fit** — doesn't fit at the sizes below → split or remove.
322
-
323
- ### 4.4 Premium visual contract (adapted from WorkBuddy Rule 1/2/3)
324
-
325
- - **Big typography** (`[size=1..7]` = 12/14/16/24/32/48/72px on the 1280×720 canvas):
326
- titles `size 6–7`; section headings `size 5–6`; body `size 3–4`, never below
327
- `size 3` (16px); hero KPI number huge (`big-stat`). Max 2 font families; use weight,
328
- not many sizes.
329
- - **Rich backgrounds** — never pure white/black; theme gradient + a decorative motif.
330
- **≥1–2 dark-accent slides** across the deck (Visual Rhythm).
331
- - **≥2 decorative/visual elements per content slide**; **charts > text for data**, one
332
- insight per chart (SVG or native `data-chart` per deck-design.md "Charts"), highlight the key datapoint, no junk.
333
- - **Emotional opening & closing** — cover and ending are STATEMENTS (feeling, not
334
- facts): strong visual + few powerful words.
335
- - **Visual diversity** — enforced by P3 (§4.2); a deck of one repeated layout reads as
336
- machine-made.
228
+ - **One message per slide**; the title states the takeaway.
229
+ - **Phrases, not sentences; no paragraphs.** Every detail, caveat and citation goes to
230
+ speaker notes (`talos-notes`, deck-design.md).
231
+ - **Substance = visual + data.** Each content slide carries ≥1 chart / diagram / big
232
+ number / visual plus 3–5 concrete data points, with its story in one line. A
233
+ bullets-only slide is the last resort for genuinely list-like content.
234
+ - **Cover and ending are statements** — strong visual, few powerful words.
235
+ - Doesn't fit → split or cut; never shrink the type (visual rules: deck-design.md
236
+ "Design principles").
337
237
 
338
238
  ---
339
239
 
340
- ## Phase 5 — Fast preview + final adversarial QA
341
-
342
- Use a two-stage loop; do not pay the Office cold-start cost on every visual edit:
343
-
344
- 1. **Authoring loop (HTML, fast):** render `deck.html` directly with
345
- `bin/html2pptx.cjs deck.html --preview-dir <dir> [--preview-pages <spec>]` and inspect every page on
346
- the first pass. Fix HTML/CSS, then preview only changed pages. Repeat until the HTML
347
- composition is clean.
348
- 2. **Delivery loop (PPTX, once after HTML is clean):** build the PPTX and fix the
349
- `qa` findings the build prints. Then sign off with one `deck-qa deck.pptx --final`:
350
- strict validation, the Office render and its drift check, and `previews` — the
351
- only slides to look at again; every other slide was already judged in the HTML
352
- preview (deck-design.md "Verify before delivering", step 3, and its
353
- read-everything exceptions). If that pass finds drift, fix and rerun only as
354
- required; never use PPTX→PDF as the routine authoring preview.
355
-
356
- Assume there are defects and inspect text overflow/clipping, collisions, tofu/blank
357
- CJK, cramped gaps, low contrast, leftover placeholders, and cross-slide consistency.
358
- Finish only after the generated PPTX has one clean structural, mechanical, and faithful
359
- visual pass.
240
+ ## Phase 5 — Preview, build, sign off
241
+
242
+ deck-design.md "Verify before delivering" is the procedure. In short: iterate on HTML
243
+ previews (`html2pptx.cjs deck.html --preview-dir <dir>`, then `--preview-pages` for the
244
+ changed slides), build the PPTX and fix its `qa` findings, then sign off once with
245
+ `deck-qa deck.pptx --final` and look only at its `previews`. Never use PPTX→PDF as the
246
+ authoring preview. Finish only after one clean structural, mechanical and visual pass.