@topmindspace/tms-skills 0.1.0 → 0.1.2

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 (102) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/README.md +9 -3
  3. package/bin/tms-skills.js +200 -160
  4. package/package.json +12 -9
  5. package/top-ppt-html/README.md +162 -254
  6. package/top-ppt-html/SKILL.md +126 -111
  7. package/top-ppt-html/assets/examples/2026-09-09-architecture-graphite-dark.html +3926 -3926
  8. package/top-ppt-html/assets/examples/2026-09-09-architecture-graphite-dark.model.json +167 -167
  9. package/top-ppt-html/assets/examples/2026-09-09-presentation-business-blue.html +4325 -4325
  10. package/top-ppt-html/assets/examples/2026-09-09-presentation-business-blue.model.json +320 -320
  11. package/top-ppt-html/assets/examples/2026-09-09-research-mckinsey.html +5527 -5527
  12. package/top-ppt-html/assets/examples/2026-09-09-research-mckinsey.model.json +913 -913
  13. package/top-ppt-html/assets/pptx-export.js +1944 -1944
  14. package/top-ppt-html/assets/style-gallery.html +589 -589
  15. package/top-ppt-html/assets/templates/architecture.html +3728 -3728
  16. package/top-ppt-html/assets/templates/engine.css +840 -840
  17. package/top-ppt-html/assets/templates/presentation.html +3738 -3738
  18. package/top-ppt-html/assets/templates/research.html +4017 -4017
  19. package/top-ppt-html/assets/templates/ui.js +520 -520
  20. package/top-ppt-html/assets/theme-overview-architecture.png +0 -0
  21. package/top-ppt-html/assets/theme-overview-research.png +0 -0
  22. package/top-ppt-html/assets/theme-overview.png +0 -0
  23. package/top-ppt-html/evals/prompts.csv +15 -15
  24. package/top-ppt-html/evals/rubric.schema.json +25 -25
  25. package/top-ppt-html/evals/run_evals.py +220 -220
  26. package/top-ppt-html/evals/trace.example.json +16 -16
  27. package/top-ppt-html/package-lock.json +186 -0
  28. package/top-ppt-html/package.json +11 -11
  29. package/top-ppt-html/references/charts-basic.md +624 -624
  30. package/top-ppt-html/references/charts-discipline.md +110 -108
  31. package/top-ppt-html/references/charts-extended.md +482 -482
  32. package/top-ppt-html/references/charts.md +37 -28
  33. package/top-ppt-html/references/components-atoms.md +624 -624
  34. package/top-ppt-html/references/components.md +30 -30
  35. package/top-ppt-html/references/content-rules.md +510 -490
  36. package/top-ppt-html/references/default-surface.md +61 -0
  37. package/top-ppt-html/references/design-system.md +478 -478
  38. package/top-ppt-html/references/failure-modes.md +227 -214
  39. package/top-ppt-html/references/high-fidelity.md +127 -127
  40. package/top-ppt-html/references/icons.md +176 -397
  41. package/top-ppt-html/references/infographics-stats.md +308 -308
  42. package/top-ppt-html/references/infographics-structure.md +226 -226
  43. package/top-ppt-html/references/infographics.md +43 -43
  44. package/top-ppt-html/references/layout-grammar.md +325 -315
  45. package/top-ppt-html/references/layouts-architecture.md +108 -108
  46. package/top-ppt-html/references/layouts-combo.md +600 -600
  47. package/top-ppt-html/references/layouts-research.md +160 -160
  48. package/top-ppt-html/references/modes.md +259 -254
  49. package/top-ppt-html/references/outline-design.md +275 -275
  50. package/top-ppt-html/references/playbook.md +284 -266
  51. package/top-ppt-html/references/pptx-export.md +227 -209
  52. package/top-ppt-html/references/presentation-craft.md +69 -0
  53. package/top-ppt-html/references/styles.md +370 -370
  54. package/top-ppt-html/references/tech-design.md +138 -138
  55. package/top-ppt-html/scripts/audit_css.py +109 -109
  56. package/top-ppt-html/scripts/audit_docs.py +176 -176
  57. package/top-ppt-html/scripts/audit_skill.py +231 -220
  58. package/top-ppt-html/scripts/audit_styles.py +351 -351
  59. package/top-ppt-html/scripts/build_examples.py +55 -2276
  60. package/top-ppt-html/scripts/build_pptx.js +2386 -2380
  61. package/top-ppt-html/scripts/capture_theme_overview.js +79 -78
  62. package/top-ppt-html/scripts/checks_html.py +166 -127
  63. package/top-ppt-html/scripts/cross_verify.py +298 -294
  64. package/top-ppt-html/scripts/env_probe.py +158 -158
  65. package/top-ppt-html/scripts/extract_model.py +210 -210
  66. package/top-ppt-html/scripts/extract_snippet.py +374 -374
  67. package/top-ppt-html/scripts/gen_channel_a.js +214 -214
  68. package/top-ppt-html/scripts/layout-constants.json +111 -18
  69. package/top-ppt-html/scripts/lib_layout_regions.js +410 -412
  70. package/top-ppt-html/scripts/measure_height.py +178 -178
  71. package/top-ppt-html/scripts/negative_tests.py +433 -307
  72. package/top-ppt-html/scripts/package_skill.py +294 -291
  73. package/top-ppt-html/scripts/prepare_images.py +341 -341
  74. package/top-ppt-html/scripts/probe_image_export.py +187 -188
  75. package/top-ppt-html/scripts/quality_gate.py +309 -301
  76. package/top-ppt-html/scripts/recommend_layout.py +384 -0
  77. package/top-ppt-html/scripts/regression.py +308 -308
  78. package/top-ppt-html/scripts/render_compare.py +275 -275
  79. package/top-ppt-html/scripts/render_from_model.py +698 -698
  80. package/top-ppt-html/scripts/scaffold_report.py +1054 -1054
  81. package/top-ppt-html/scripts/section-file-map.json +104 -104
  82. package/top-ppt-html/scripts/smoke_pptx.sh +30 -0
  83. package/top-ppt-html/scripts/sync_runtime.py +659 -662
  84. package/top-ppt-html/scripts/validate_pptx.py +1579 -1510
  85. package/top-ppt-html/scripts/validate_report.py +1755 -1456
  86. package/top-ppt-html/assets/examples/2026-09-09-architecture-spectrum.html +0 -3926
  87. package/top-ppt-html/assets/examples/2026-09-09-architecture-spectrum.model.json +0 -168
  88. package/top-ppt-html/assets/examples/2026-09-09-presentation-apple-mono.html +0 -4325
  89. package/top-ppt-html/assets/examples/2026-09-09-presentation-apple-mono.model.json +0 -321
  90. package/top-ppt-html/assets/examples/2026-09-09-presentation-brand-red.html +0 -4325
  91. package/top-ppt-html/assets/examples/2026-09-09-presentation-brand-red.model.json +0 -321
  92. package/top-ppt-html/assets/examples/2026-09-09-research-deep-teal.html +0 -5527
  93. package/top-ppt-html/assets/examples/2026-09-09-research-deep-teal.model.json +0 -914
  94. package/top-ppt-html/assets/examples/2026-09-09-research-indigo-violet.html +0 -5527
  95. package/top-ppt-html/assets/examples/2026-09-09-research-indigo-violet.model.json +0 -914
  96. package/top-ppt-html/assets/examples/2026-09-09-research-warm-sand.html +0 -5527
  97. package/top-ppt-html/assets/examples/2026-09-09-research-warm-sand.model.json +0 -914
  98. package/top-ppt-html/assets/theme-overview-presentation.png +0 -0
  99. package/top-ppt-html/references/design-system-engine.md +0 -235
  100. package/top-ppt-html/references/industry-benchmark.md +0 -105
  101. package/top-ppt-html/references/reform-plan.md +0 -252
  102. package/top-ppt-html/scripts/layout_slots.json +0 -830
@@ -54,7 +54,7 @@
54
54
  "micro": 10
55
55
  },
56
56
  "modeTypeScale": {
57
- "$comment": "三模式独立排版比例尺(pt)。research=咨询密排(正文 10.5pt、标题 22pt);architecture 与 presentation 同基。序列化器按「调用点基准 pt → 最接近 typeScale 角色」映射到当前模式取值。",
57
+ "$comment": "三模式独立排版比例尺(pt)。默认按中型会议室投影。小会议室可保持原值;礼堂/大报告厅宜更大标题档、更少每页单元(见 pptx-export 会场节)。research=咨询密排(正文 10.5pt、标题 22pt);architecture 与 presentation 同基。",
58
58
  "presentation": {
59
59
  "coverTitle": 44,
60
60
  "coverSub": 18,
@@ -820,7 +820,7 @@
820
820
  }
821
821
  },
822
822
  "variety": {
823
- "$comment": "图表多样性预算(validate_report.py 与 evals/run_evals.py 消费)——治「图表定义 36 种、实际只用 bar/line/donut」。类型数下限 = min(minTypes[模式], max(1, ⌈图表页数 × minTypesRatio⌉));noRepeatAdjacent = 相邻图表页不得同 data-chart;compositeMinRatio/compositeModes = 组合版式(内容页含 ≥2 种承载类型)比例下限与适用模式(治「单件页当默认」,只对 research 生效:A 演示按契约每屏一主张,C 架构恒为一页一图)。判据与选型见 references/playbook.md §四/§五。",
823
+ "$comment": "图表多样性预算(validate_report.py 与 evals/run_evals.py 消费)——治「图表定义 36 种、实际只用 bar/line/donut」。类型数下限 = min(minTypes[模式], max(1, ⌈图表页数 × minTypesRatio⌉));noRepeatAdjacent = 相邻图表页不得同 data-chart;compositeMinRatio/compositeModes 只对 research 生效(A 演示一屏一主张,C 架构一页一图)。preferCoreFirst:多样性宜先拉开 layoutSystem.defaultCharts(核图 8);advanced 图种在使用时同样计入 minTypes(不因用 advanced 受罚),但仅当内容意图命中时选用,禁为凑下限硬上冷门图。禁反模式:简单图全幅、极偏 donut/pie(见 layout-qa / sizeByComplexity)。判据与选型见 references/playbook.md §五。",
824
824
  "minTypes": {
825
825
  "presentation": 4,
826
826
  "research": 6,
@@ -831,7 +831,9 @@
831
831
  "compositeMinRatio": 0.3,
832
832
  "compositeModes": [
833
833
  "research"
834
- ]
834
+ ],
835
+ "preferCoreFirst": true,
836
+ "corePreferMin": 3
835
837
  },
836
838
  "registry": {
837
839
  "$comment": "图表登记四元组:pptx=native 走 addChart(真 chart part + 内嵌 Excel,双击可编辑数据);pptx=shape 走 OOXML 原生形状/SVG path 高保真还原,且**必须**按 dataTable 策略附数据表保证数据可追溯;nativeTrick = 用原生图表技巧实现的类型;path = 形状还原的几何约束(采样点下限 / 双边界追踪 / 禁预设形状)。build_pptx.js 与 pptx-export.js 双引擎按本表分派,validate_pptx.py 按本表断言。",
@@ -1218,15 +1220,16 @@
1218
1220
  }
1219
1221
  },
1220
1222
  "checkBudgets": {
1221
- "$comment": "单页预算(validate_report.py 消费):char 单页纯文字上限 / unit 并列单元上限 / empty 过空页阈值 / fit 满屏页文字上限 / wrap 版心宽度断言 / trow 表格行数上限。bodyPx 供页高溢出静态估算(HTML 正文基准 px,与 modes 契约一致)。",
1223
+ "$comment": "单页预算(validate_report 消费):char=文字量预警(WARN,非「字多就删」);unit=并列单元预警;empty=过空页 FAIL;fit=满屏页文字;wrap=版心;trow=表行。Mode A 密卡/列表页允许偏密;超 char 先走 overflowRule,不对字数单独 FAIL。",
1222
1224
  "presentation": {
1223
- "char": 1500,
1225
+ "char": 1800,
1224
1226
  "unit": 8,
1225
1227
  "empty": 80,
1226
1228
  "fit": 1000,
1227
1229
  "wrap": 1400,
1228
1230
  "trow": 8,
1229
- "bodyPx": 17
1231
+ "bodyPx": 17,
1232
+ "$comment": "预警阈值;结构合理的密页可接近此值;溢出无拆页→ layout-qa FAIL"
1230
1233
  },
1231
1234
  "research": {
1232
1235
  "char": 3200,
@@ -1323,9 +1326,9 @@
1323
1326
  "lineFactor": 1.45,
1324
1327
  "emAsciiRatio": 0.52
1325
1328
  },
1326
- "overflowRule": "溢出处置优先级:① 优化内容(列表化/精炼/合并/拆页/换组合版式)→ ② 调整容器尺寸与行宽 → ③ 有限度缩小字号(见 fontShrink)→ ④ 仍装不下则拆页。禁止无限缩字号硬塞,也禁止把「精简」当第一手段砍掉决策必需信息。",
1329
+ "overflowRule": "溢出处置优先级(禁静默截断):① 重构承载(列表/卡片/表/图/组合版式)→ ② 拆页/分章(议程→主张→证据卡→明细;01a/01b;信息须完整)→ ③ 换布局形态(V1–V4/多列/卡栅格)→ ④ 有限 fontShrink(阶梯内、模式 floor 以上、最多 4 档)→ ⑤ 禁止:静默截断、砍 so-what/证据/口径、为审美稀疏删决策必需信息。单页字数预算是预警不是删字许可证。",
1327
1330
  "fontShrink": {
1328
- "$comment": "有限缩字号策略(v8.2 放松)。内容确实偏多、优化格式与措辞后仍装不下时,允许在阶梯内下探;绝对下限按模式。优先顺序永远是:列表化/精炼 → 换组合/拆页 → 最后才缩字号。",
1331
+ "$comment": "有限缩字号(最后手段)。优先:重构承载 → 拆页/分章 → 换布局 → 最后才缩字号。最多 4 档;绝对下限按模式 floor。禁止无限缩字号,禁止用缩字号代替拆页。",
1329
1332
  "ladder": [
1330
1333
  15,
1331
1334
  14,
@@ -1732,8 +1735,8 @@
1732
1735
  ],
1733
1736
  "fillTarget": {
1734
1737
  "presentation": [
1735
- 62,
1736
- 78
1738
+ 58,
1739
+ 75
1737
1740
  ],
1738
1741
  "research": [
1739
1742
  70,
@@ -1774,15 +1777,18 @@
1774
1777
  ]
1775
1778
  },
1776
1779
  "list": {
1777
- "maxItemLines": 2,
1778
- "maxItemChars": 45,
1780
+ "maxItemLines": 3,
1781
+ "maxItemChars": 72,
1779
1782
  "itemGap": "sp-3",
1780
- "maxPerCard": 4
1783
+ "maxPerCard": 5,
1784
+ "$comment": "结构引导(非硬砍刀):条目宜可读完整;超长→加行/拆项/拆页,禁省略号截断充数。maxItemChars/maxItemLines 为投影可读建议,校验不因「字多」单独 FAIL。",
1785
+ "preferItemChars": 45
1781
1786
  },
1782
1787
  "card": {
1783
1788
  "padToken": "sp-5",
1784
1789
  "equalHeight": true,
1785
- "maxBullets": 4
1790
+ "maxBullets": 5,
1791
+ "$comment": "maxBullets 为建议;更多→拆卡/跟进页,勿截断条目。"
1786
1792
  },
1787
1793
  "metric": {
1788
1794
  "perRow": [
@@ -1837,11 +1843,73 @@
1837
1843
  "a-end",
1838
1844
  "align-items"
1839
1845
  ],
1840
- "requireOnMixed": true
1846
+ "requireOnMixed": true,
1847
+ "$comment": "混排须显式对齐类;layout-qa 另检列节奏(多列网格共享顶边/左缘意图)。",
1848
+ "requireColumnRhythm": true
1849
+ },
1850
+ "fillTargetComment": "填充率目标带。Mode A 大气留白:cover/section/quote/closing 等休止页为 intentional whitespace,不按 underfill/FILL_LOW 惩罚(见 qualityGates.underfill.exemptIds + validate LAYOUT_FILL 轻量页豁免)。内容页半空仍属 underfill。硬规则守舞台;自适应留给内容。",
1851
+ "modeSkels": {
1852
+ "$comment": "Mode A 主力骨架 = P1–P4 + P6/P10;P7–P9、P11–P12 为 A 次级(research/architecture 场景下可升主力)。P5 三卡为 A 常用扩展(非默认轮换)。次级仍合法、文档与画廊可引用,禁止删除。",
1853
+ "presentation": {
1854
+ "primary": [
1855
+ "P1",
1856
+ "P2",
1857
+ "P3",
1858
+ "P4",
1859
+ "P6",
1860
+ "P10"
1861
+ ],
1862
+ "secondary": [
1863
+ "P7",
1864
+ "P8",
1865
+ "P9",
1866
+ "P11",
1867
+ "P12"
1868
+ ],
1869
+ "extended": [
1870
+ "P5"
1871
+ ]
1872
+ },
1873
+ "research": {
1874
+ "primary": [
1875
+ "P5",
1876
+ "P7",
1877
+ "P8",
1878
+ "P4",
1879
+ "P6"
1880
+ ],
1881
+ "secondary": [
1882
+ "P1",
1883
+ "P2",
1884
+ "P3",
1885
+ "P9",
1886
+ "P10",
1887
+ "P11",
1888
+ "P12"
1889
+ ]
1890
+ },
1891
+ "architecture": {
1892
+ "primary": [
1893
+ "P9",
1894
+ "P10",
1895
+ "P11"
1896
+ ],
1897
+ "secondary": [
1898
+ "P1",
1899
+ "P2",
1900
+ "P3",
1901
+ "P4",
1902
+ "P5",
1903
+ "P6",
1904
+ "P7",
1905
+ "P8",
1906
+ "P12"
1907
+ ]
1908
+ }
1841
1909
  }
1842
1910
  },
1843
1911
  "qualityGates": {
1844
- "$comment": "v9 硬门禁阈值(validate_report / validate_pptx / quality_gate 消费)。tagLeakPatterns = 可见文本中禁止出现的 HTML 源码片段;titleOnly = 去页头后正文字符上限(低于即 TITLE_ONLY_PAGE);underfillCarriers = 承载组件数下限;roundtripMin = 模型代表性文本落页覆盖率下限(原 0.50 过松,放行截断);chartSkew = 极偏占比禁 donut/pie;chartOversize = 简单图占内容区面积上限。",
1912
+ "$comment": "v9+ 硬门禁。tagLeakPatterns / titleOnly / underfill / roundtripMin / chartSkew / chartOversize 同前。antiTruncation:截断迹象与溢出未拆页;chromeDriftIn:跨页 chrome y 容差(英寸)。",
1845
1913
  "tagLeakPatterns": [
1846
1914
  "<a ",
1847
1915
  "</a>",
@@ -1866,8 +1934,11 @@
1866
1934
  "refs",
1867
1935
  "appendix",
1868
1936
  "next",
1869
- "closing"
1870
- ]
1937
+ "closing",
1938
+ "section",
1939
+ "chapter"
1940
+ ],
1941
+ "$comment": "intentional whitespace 豁免:封面/章节幕/金句/收尾/参考资料等休止页不要求承载数下限;其余内容页半空 = underfill FAIL。"
1871
1942
  },
1872
1943
  "roundtripMin": 0.8,
1873
1944
  "chartSkew": {
@@ -1885,6 +1956,28 @@
1885
1956
  "simpleMaxCats": 2,
1886
1957
  "simpleMaxPts": 3,
1887
1958
  "maxContentAreaPct": 55
1959
+ },
1960
+ "antiTruncation": {
1961
+ "$comment": "截断/内容损失启发式。ellipsisInContent=正文/列表中的截断省略号;overflowNoSplit 与 layout-qa 同源。",
1962
+ "ellipsisPatterns": [
1963
+ "…",
1964
+ "...",
1965
+ "……",
1966
+ "…。",
1967
+ "...。"
1968
+ ],
1969
+ "forbidEllipsisTruncate": true,
1970
+ "overflowNoSplitFail": true
1971
+ },
1972
+ "chromeDriftIn": {
1973
+ "$comment": "PPTX 内容页页脚/页码 y 相对中位数漂移超过此值(英寸)→ WARN CHROME_DRIFT。封面/收尾豁免。默认 0.2in,抓明显漂移、不挡正常页型微差。",
1974
+ "maxAbsDeltaIn": 0.2
1975
+ },
1976
+ "halfEmpty": {
1977
+ "$comment": "半空卡:同页多卡时,正文过短的卡占比过高 → layout-qa WARN/FAIL。",
1978
+ "minCards": 3,
1979
+ "shortPlainChars": 12,
1980
+ "maxShortRatio": 0.5
1888
1981
  }
1889
1982
  },
1890
1983
  "imageAdmission": {