ppt-template-reuse 0.4.0-rc.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.
- package/LICENSE +21 -0
- package/NOTICE.md +8 -0
- package/README.md +233 -0
- package/adapters/README.md +13 -0
- package/adapters/claude/.claude-plugin/plugin.json +16 -0
- package/adapters/claude/.mcp.json +8 -0
- package/adapters/claude/skills/learn-ppt-template/SKILL.md +105 -0
- package/adapters/kimi/kimi.plugin.json +12 -0
- package/adapters/kimi/skills/learn-ppt-template/SKILL.md +105 -0
- package/adapters/kimi-work/mcp.json +8 -0
- package/adapters/kimi-work/skills/learn-ppt-template/SKILL.md +105 -0
- package/adapters/workbuddy/mcp.json +8 -0
- package/adapters/workbuddy/skills/learn-ppt-template/SKILL.md +105 -0
- package/package.json +53 -0
- package/plugins/ppt-template-reuse/.codex-plugin/plugin.json +38 -0
- package/plugins/ppt-template-reuse/.mcp.json +9 -0
- package/plugins/ppt-template-reuse/skills/learn-ppt-template/SKILL.md +105 -0
- package/plugins/ppt-template-reuse/skills/learn-ppt-template/agents/openai.yaml +6 -0
- package/skills/ppt-template-reuse/SKILL.md +105 -0
- package/skills/ppt-template-reuse/agents/openai.yaml +6 -0
- package/src/cli/ppt-reuse.mjs +203 -0
- package/src/core/adaptive-planner.mjs +1192 -0
- package/src/core/content-audit.mjs +573 -0
- package/src/core/frame-map.mjs +91 -0
- package/src/core/index.mjs +38 -0
- package/src/core/io.mjs +81 -0
- package/src/core/legacy-capsule-import.mjs +382 -0
- package/src/core/ooxml-editor.mjs +753 -0
- package/src/core/paths.mjs +60 -0
- package/src/core/planner-lib.mjs +59 -0
- package/src/core/pptx-package.mjs +227 -0
- package/src/core/renderer.mjs +402 -0
- package/src/core/source-extractor.mjs +412 -0
- package/src/core/template-inspector.mjs +489 -0
- package/src/core/template-intelligence.mjs +675 -0
- package/src/core/universal-engine.mjs +1075 -0
- package/src/index.mjs +2 -0
- package/src/install/installer.mjs +293 -0
- package/src/mcp/server.mjs +377 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NEU-ZHA
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Notice
|
|
2
|
+
|
|
3
|
+
`ppt-template-reuse` does not distribute third-party presentation templates,
|
|
4
|
+
logos, fonts, or course materials. Users are responsible for obtaining and
|
|
5
|
+
using source templates under appropriate permissions.
|
|
6
|
+
|
|
7
|
+
Generated local template capsules retain source paths and hashes for fidelity
|
|
8
|
+
validation and must not be included in public plugin distributions.
|
package/README.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# PPT Template Reuse
|
|
2
|
+
|
|
3
|
+
`ppt-template-reuse` is a local-first, host-neutral engine that learns what a
|
|
4
|
+
native PowerPoint template is for and turns user material into a
|
|
5
|
+
content-complete, editable deck with speaker notes and rendered QA.
|
|
6
|
+
|
|
7
|
+
The package is one system with four layers:
|
|
8
|
+
|
|
9
|
+
1. `core`: deterministic source extraction, template inspection, adaptive
|
|
10
|
+
planning, native OOXML editing, rendering, and validation;
|
|
11
|
+
2. `ppt-reuse`: a resumable command-line interface;
|
|
12
|
+
3. MCP: nine stable tools for any compatible AI host;
|
|
13
|
+
4. Skill adapters for Codex, Claude Code, Kimi Code, Kimi Work, and WorkBuddy.
|
|
14
|
+
|
|
15
|
+
The host AI supplies semantic judgment. The local engine keeps every source
|
|
16
|
+
anchor, freezes the plan, edits PPTX objects, and enforces quality gates. It
|
|
17
|
+
does not need a separate model API key.
|
|
18
|
+
|
|
19
|
+
## Status
|
|
20
|
+
|
|
21
|
+
The current package version is `0.4.0-rc.2`. It is a release candidate for
|
|
22
|
+
macOS and Windows. Linux is covered by core/protocol CI but is not yet a
|
|
23
|
+
declared desktop compatibility target.
|
|
24
|
+
|
|
25
|
+
## Requirements
|
|
26
|
+
|
|
27
|
+
- Node.js 20 or 22;
|
|
28
|
+
- LibreOffice for final rendering and acceptance;
|
|
29
|
+
- a native `.pptx` or `.potx` template;
|
|
30
|
+
- one of `.docx`, `.pdf`, `.pptx`, `.md`, or `.txt` as source material.
|
|
31
|
+
|
|
32
|
+
Macro-enabled `.pptm` files are rejected and macros are never executed.
|
|
33
|
+
Scanned PDF pages are returned to the host AI as visual-analysis tasks.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
For a local checkout:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install
|
|
41
|
+
npm install -g .
|
|
42
|
+
ppt-reuse doctor --host all
|
|
43
|
+
ppt-reuse install --auto
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
After the release candidate is published to npm:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install -g ppt-template-reuse@next
|
|
50
|
+
ppt-reuse install --auto
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`install --auto` detects supported hosts, shows and records the files it
|
|
54
|
+
changes, creates timestamped backups, merges MCP configuration idempotently,
|
|
55
|
+
and installs the same Skill workflow. Kimi Work and WorkBuddy still require
|
|
56
|
+
one explicit import/trust confirmation in their UI.
|
|
57
|
+
|
|
58
|
+
### Codex plugin
|
|
59
|
+
|
|
60
|
+
The repository also remains a Codex Marketplace:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
codex plugin marketplace add NEU-ZHA/ppt-template-reuse --ref v0.4.0-rc.2
|
|
64
|
+
codex plugin add ppt-template-reuse@ppt-template-reuse
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The plugin calls the public local MCP engine; it no longer depends on Codex's
|
|
68
|
+
built-in Presentations Skill or `@oai/artifact-tool`.
|
|
69
|
+
|
|
70
|
+
### Claude Code
|
|
71
|
+
|
|
72
|
+
`adapters/claude/` contains `.claude-plugin/plugin.json`, a Skill, and
|
|
73
|
+
`.mcp.json`. It can be distributed through a Claude Code plugin marketplace or
|
|
74
|
+
installed by `ppt-reuse install --auto`.
|
|
75
|
+
|
|
76
|
+
### Kimi Code and Kimi Work
|
|
77
|
+
|
|
78
|
+
`adapters/kimi/` contains `kimi.plugin.json` with the Skill and MCP declaration.
|
|
79
|
+
`adapters/kimi-work/` is an import-ready local Skill plus a separate MCP file.
|
|
80
|
+
|
|
81
|
+
### WorkBuddy
|
|
82
|
+
|
|
83
|
+
`adapters/workbuddy/` contains the uploadable Skill and local MCP declaration.
|
|
84
|
+
The release builder emits a Skill-only WorkBuddy ZIP plus a separate MCP JSON,
|
|
85
|
+
so the Skill importer receives the expected `SKILL.md` package.
|
|
86
|
+
|
|
87
|
+
## Natural use
|
|
88
|
+
|
|
89
|
+
After the one-time installation and trust confirmation, the user can simply
|
|
90
|
+
say:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
参考这个模板和这些材料,做一份内容完整、可编辑、带讲稿的PPT。
|
|
94
|
+
根据材料多少自动决定页数;缺图片就先集中告诉我;逐页显示真实预览。
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The Skill drives this sequence automatically:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
create session → inspect → submit semantics → freeze plan
|
|
101
|
+
→ supply required assets → generate → poll previews → validate
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Users do not need to know the MCP tool names or write JSON.
|
|
105
|
+
|
|
106
|
+
## CLI
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
ppt-reuse create \
|
|
110
|
+
--template "/absolute/path/template.pptx" \
|
|
111
|
+
--source "/absolute/path/source.docx" \
|
|
112
|
+
--output "/absolute/path/result.pptx" \
|
|
113
|
+
--root "/absolute/path" \
|
|
114
|
+
--duration 12-15 \
|
|
115
|
+
--density rich
|
|
116
|
+
|
|
117
|
+
ppt-reuse status <session-id>
|
|
118
|
+
ppt-reuse resume <session-id>
|
|
119
|
+
ppt-reuse mcp --stdio
|
|
120
|
+
ppt-reuse serve --host 127.0.0.1 --port 8765
|
|
121
|
+
|
|
122
|
+
# Import a previously reviewed, SHA-bound template capsule:
|
|
123
|
+
ppt-reuse import-capsule \
|
|
124
|
+
--capsule "/absolute/path/reviewed-capsule" \
|
|
125
|
+
--template "/absolute/path/template.pptx" \
|
|
126
|
+
--opening 3 \
|
|
127
|
+
--closing 10 \
|
|
128
|
+
--approve 26
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Sessions live under `~/.ppt-template-reuse/sessions/`. Template profiles live
|
|
132
|
+
under `~/.ppt-template-reuse/library/`. Existing
|
|
133
|
+
`~/.codex/ppt-template-reuse/library/` capsules are indexed as read-only legacy
|
|
134
|
+
references and are never moved or deleted.
|
|
135
|
+
|
|
136
|
+
The CLI exposes the mechanical engine. In normal use, an AI host completes the
|
|
137
|
+
semantic packages returned by `ppt_inspect` before planning.
|
|
138
|
+
|
|
139
|
+
## MCP contract
|
|
140
|
+
|
|
141
|
+
- `ppt_create_session`
|
|
142
|
+
- `ppt_inspect`
|
|
143
|
+
- `ppt_submit_semantics`
|
|
144
|
+
- `ppt_plan`
|
|
145
|
+
- `ppt_supply_assets`
|
|
146
|
+
- `ppt_generate`
|
|
147
|
+
- `ppt_status`
|
|
148
|
+
- `ppt_validate`
|
|
149
|
+
- `ppt_cancel`
|
|
150
|
+
|
|
151
|
+
Long generation uses persistent `sessionId`/`jobId` values and polling, not
|
|
152
|
+
experimental MCP task APIs. Frozen plans, QA reports, outputs, and page previews
|
|
153
|
+
are also available as `ppt://session/...` resources. Both stdio and loopback
|
|
154
|
+
Streamable HTTP are supported.
|
|
155
|
+
|
|
156
|
+
## Content completeness
|
|
157
|
+
|
|
158
|
+
- deterministic extraction records every paragraph, heading, table, slide, or
|
|
159
|
+
PDF page with an immutable id and anchor, then splits oversized blocks into
|
|
160
|
+
300–400-character child units with preserved parent anchors;
|
|
161
|
+
- host semantics cannot omit, replace, or invent those ids;
|
|
162
|
+
- slide count grows with original character volume, independent claims,
|
|
163
|
+
evidence, argument chains, template capacity, and speaking time;
|
|
164
|
+
- `critical` coverage must be 100%; weighted relevant coverage must be at least
|
|
165
|
+
95%;
|
|
166
|
+
- every included unit must trace to matching visible text or notes; original
|
|
167
|
+
source-text trace coverage and critical visible coverage must both be 100%,
|
|
168
|
+
while weighted visible coverage must be at least 90%;
|
|
169
|
+
- structured `displayFragments` carry dates, labels, steps, metric labels, and
|
|
170
|
+
concise descriptions into timeline, process, comparison, and multi-item
|
|
171
|
+
slots instead of forcing every page into generic claim/evidence boxes;
|
|
172
|
+
- original source text is stored in a clearly marked non-spoken trace block;
|
|
173
|
+
speaking time is calculated from the talk track, and short material is not
|
|
174
|
+
padded just to reach a requested minimum;
|
|
175
|
+
- every analysis page needs claim, evidence, why-it-matters, and native notes;
|
|
176
|
+
- counterarguments require mapped rebuttals;
|
|
177
|
+
- overloaded content is split instead of compressed with smaller fonts;
|
|
178
|
+
- missing visual assets block generation instead of becoming gray placeholders.
|
|
179
|
+
|
|
180
|
+
A previous 19-page deck is a private regression fixture for one source volume,
|
|
181
|
+
not a global page target.
|
|
182
|
+
|
|
183
|
+
Public pressure tests cover 500–50,000 source characters, 1–100 pre-segmented
|
|
184
|
+
semantic units, clustered and argument-chain structures, and one-, two-, and
|
|
185
|
+
three-body-slot templates. They require monotonically increasing extraction and
|
|
186
|
+
page counts, 100% traceable source coverage, and deterministic output in the
|
|
187
|
+
same rendering environment.
|
|
188
|
+
|
|
189
|
+
The baseline scale test uses 5, 30, and 100 semantic units and currently yields
|
|
190
|
+
8, 33, and 103 pages on the synthetic three-body template. The character-volume
|
|
191
|
+
test currently yields 4, 10, 19, 35, 66, and 160 pages for 500, 2,000, 5,000,
|
|
192
|
+
10,000, 20,000, and 50,000 source characters. These are regression observations,
|
|
193
|
+
not hard-coded targets.
|
|
194
|
+
|
|
195
|
+
## Fidelity and safety
|
|
196
|
+
|
|
197
|
+
The native OOXML layer rebuilds the presentation slide sequence while preserving
|
|
198
|
+
untouched package parts, masters, layouts, themes, animations, SmartArt, media,
|
|
199
|
+
and protected objects. It can rewrite declared text slots, replace inherited
|
|
200
|
+
images, update matching table cells, and append native speaker notes.
|
|
201
|
+
|
|
202
|
+
Chart editing is fail-closed until both the visible cache and embedded workbook
|
|
203
|
+
can be synchronized and rendered. Flattened decks are `hybrid-locked` and are
|
|
204
|
+
never described as fully editable. Exact native generation never executes
|
|
205
|
+
macros.
|
|
206
|
+
|
|
207
|
+
The engine only accepts declared roots, the current workspace, and temporary
|
|
208
|
+
directories. It does not connect to the internet or upload templates and
|
|
209
|
+
materials. A host may separately search or generate images when the user
|
|
210
|
+
authorizes it.
|
|
211
|
+
|
|
212
|
+
## Validation
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
npm run check:all
|
|
216
|
+
npm run privacy
|
|
217
|
+
npm run release:build
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
The test suite covers adaptive page growth, complete source coverage,
|
|
221
|
+
three-run determinism, native notes, OOXML structure, optional real rendering,
|
|
222
|
+
MCP schemas/resources, stdio and loopback HTTP, path rejection, macro rejection,
|
|
223
|
+
installer idempotency, uninstall, and an environment-gated private golden
|
|
224
|
+
fixture.
|
|
225
|
+
|
|
226
|
+
Final acceptance requires real LibreOffice rendering plus rendered-text
|
|
227
|
+
fidelity checks between native PPTX text and exported PDF text. Missing or
|
|
228
|
+
substituted glyphs keep the deck in `validation-failed` even when protected
|
|
229
|
+
pixels pass. In that case WPS/PowerPoint compatibility remains
|
|
230
|
+
manual-review-required until a person opens and smoke-tests the result.
|
|
231
|
+
|
|
232
|
+
Public release packages contain no user templates, course materials, local
|
|
233
|
+
capsules, generated decks, personal paths, or platform tokens.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Host adapters
|
|
2
|
+
|
|
3
|
+
All adapters use the canonical workflow in
|
|
4
|
+
`skills/ppt-template-reuse/SKILL.md` and the same local
|
|
5
|
+
`ppt-template-reuse-mcp` command.
|
|
6
|
+
|
|
7
|
+
- `claude/`: Claude Code plugin manifest, Skill, and MCP declaration.
|
|
8
|
+
- `kimi/`: Kimi Code plugin manifest with the Skill and MCP declaration.
|
|
9
|
+
- `kimi-work/`: local Skill plus MCP files prepared for one-time UI import.
|
|
10
|
+
- `workbuddy/`: uploadable Skill plus local MCP files.
|
|
11
|
+
|
|
12
|
+
Kimi Work and WorkBuddy keep their required host trust/import step. The
|
|
13
|
+
installer prepares these folders but never bypasses host confirmation.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ppt-template-reuse",
|
|
3
|
+
"version": "0.4.0-rc.2",
|
|
4
|
+
"description": "Content-complete editable PPTX generation from native templates through a local host-neutral MCP engine.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "NEU-ZHA"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"pptx",
|
|
11
|
+
"powerpoint",
|
|
12
|
+
"template",
|
|
13
|
+
"speaker-notes",
|
|
14
|
+
"mcp"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn-ppt-template
|
|
3
|
+
description: Create a content-complete, editable PowerPoint from a user-provided PPTX/POTX template and DOCX, PDF, PPTX, Markdown, or text material. Use whenever the user asks to make, imitate, learn, follow, or reuse a presentation template. Identify what every template page is for, adapt page count to source volume, preserve reasoning in native speaker notes, request missing visuals, expose real page previews, and stop on unresolved layouts, unsafe object edits, incomplete source coverage, or failed rendering. Works through the host-neutral ppt-template-reuse MCP or ppt-reuse CLI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Learn PPT Template
|
|
7
|
+
|
|
8
|
+
Use the `ppt-template-reuse` MCP server as the normal execution path. Do not ask
|
|
9
|
+
the user to prepare JSON, choose a page count, or run commands.
|
|
10
|
+
|
|
11
|
+
## Default behavior
|
|
12
|
+
|
|
13
|
+
For a request such as “参考这个模板和这些材料做一份内容完整、可编辑、带讲稿的
|
|
14
|
+
PPT”:
|
|
15
|
+
|
|
16
|
+
1. Call `ppt_create_session` with the template, material, output path, current
|
|
17
|
+
workspace roots, and stated audience/duration.
|
|
18
|
+
2. Call `ppt_inspect`.
|
|
19
|
+
3. Read every extracted source unit. Submit every original `id` and `anchor`
|
|
20
|
+
through `ppt_submit_semantics`; label facts, chronology, issues, rules,
|
|
21
|
+
evidence, analysis, counterarguments, rebuttals, conclusions, and
|
|
22
|
+
recommendations. Preserve `parentAnchor`, `segmentIndex`, and `segmentCount`
|
|
23
|
+
when a long paragraph, table, slide, or PDF page was deterministically
|
|
24
|
+
segmented. Never silently merge away or omit a unit.
|
|
25
|
+
For structured layouts, also supply short `displayFragments` with roles such
|
|
26
|
+
as `date`, `label`, `step`, `metric-label`, `body`, or `description`. These
|
|
27
|
+
are source-grounded slot values, not invented decoration. A timeline needs
|
|
28
|
+
dates and node labels; a multi-item grid needs one label/body pair per item.
|
|
29
|
+
4. Review only template slides returned as unresolved. Classify each page's
|
|
30
|
+
purpose, safe slots, capacity, required assets, protected elements, and
|
|
31
|
+
editability. Never approve uncertain SmartArt, chart, media, animation, icon,
|
|
32
|
+
or flattened-object edits. If several opening or closing variants are
|
|
33
|
+
returned, approve exactly one for each role and block the alternatives; do
|
|
34
|
+
not choose by page order.
|
|
35
|
+
5. Call `ppt_plan`. Let source volume, argument structure, slot capacity, and
|
|
36
|
+
requested speaking time determine page count. If planning returns
|
|
37
|
+
`template-selection`, show the returned full-size candidates, approve one
|
|
38
|
+
source slide for that role, block the competing candidates in the frozen
|
|
39
|
+
template profile, resubmit semantics, and plan again. Never break a tie by
|
|
40
|
+
page number.
|
|
41
|
+
6. If assets are required, use the host's image search or generation capability
|
|
42
|
+
when authorized; otherwise ask once for all missing assets. Register them
|
|
43
|
+
with `ppt_supply_assets`. Never permit gray blocks or temporary placeholders.
|
|
44
|
+
7. Call `ppt_generate`, then poll `ppt_status`. Show new real page previews in
|
|
45
|
+
order. Stop when the status contains `actionRequired`.
|
|
46
|
+
8. Call `ppt_validate` when generation did not already validate. Deliver only
|
|
47
|
+
when state is `completed`.
|
|
48
|
+
|
|
49
|
+
## Content rules
|
|
50
|
+
|
|
51
|
+
- Preserve 100% of `critical` units and at least 95% weighted relevant content.
|
|
52
|
+
- Require every included source unit to have a verified destination trace.
|
|
53
|
+
Preserve 100% of original source text in speaker notes, visibly represent
|
|
54
|
+
100% of critical units, and visibly represent at least 90% of weighted
|
|
55
|
+
relevant units. A `sourceUnitId` without matching field or notes text is not
|
|
56
|
+
coverage.
|
|
57
|
+
- Put source-verification text in a clearly marked
|
|
58
|
+
`[来源追踪,不逐字朗读]` notes block. Estimate duration from the spoken
|
|
59
|
+
explanation, not from that reference block. Do not add filler slides merely
|
|
60
|
+
because a short source finishes below the requested minimum time.
|
|
61
|
+
- Each analysis slide needs a claim, evidence, why-it-matters explanation, and
|
|
62
|
+
native speaker notes.
|
|
63
|
+
- Pair each represented counterargument with a response.
|
|
64
|
+
- Split overloaded material across more approved layouts; never shrink inherited
|
|
65
|
+
typography or delete reasoning to force a target page count.
|
|
66
|
+
- Use `core`, `appendix`, and `exclude` deliberately. An explicit duration
|
|
67
|
+
conflict requires a user choice between more time, narrower scope, or multiple
|
|
68
|
+
decks.
|
|
69
|
+
- A prior 19-page deck is only a regression example, never a fixed length.
|
|
70
|
+
- Do not infer length from unit count alone. Use original character volume,
|
|
71
|
+
argument nodes, counterargument chains, requested time, and the approved
|
|
72
|
+
template slot capacity. Very long material may legitimately produce dozens
|
|
73
|
+
or more than one hundred pages; stop for a duration/scope decision instead of
|
|
74
|
+
compressing it to a familiar deck length.
|
|
75
|
+
|
|
76
|
+
## Template and object rules
|
|
77
|
+
|
|
78
|
+
- Exact native mode supports `.pptx` and `.potx`; `.pptm` is rejected and macros
|
|
79
|
+
are never executed.
|
|
80
|
+
- Treat flattened templates as `hybrid-locked`. Do not call them fully editable.
|
|
81
|
+
- Edit only declared slots. Preserve masters, layouts, themes, logos, page
|
|
82
|
+
chrome, animations, SmartArt, media, and all untargeted objects.
|
|
83
|
+
- Replace inherited images in place. Update tables only when dimensions match.
|
|
84
|
+
Update charts only when the embedded workbook and rendered result can both be
|
|
85
|
+
validated; otherwise stop.
|
|
86
|
+
- “插入图片”, “相关图片”, “ICON”, sample copy, and gray image blocks are
|
|
87
|
+
requirements, not audience-facing content.
|
|
88
|
+
- If an older reviewed template capsule is available, import it only when its
|
|
89
|
+
source SHA256 matches. Keep deny-by-default safety, preserve the old
|
|
90
|
+
preview/review bindings, approve exactly one opening and closing, and never
|
|
91
|
+
re-guess already reviewed slots.
|
|
92
|
+
|
|
93
|
+
## Completion gate
|
|
94
|
+
|
|
95
|
+
Completion requires a frozen content plan and frame map, native speaker notes,
|
|
96
|
+
no residual examples or placeholders, matching slide/render counts, real
|
|
97
|
+
LibreOffice rendering, rendered-text fidelity, and a passing QA report. If
|
|
98
|
+
LibreOffice is missing or its PDF contains missing/substituted glyphs, analysis
|
|
99
|
+
and planning may complete but the PPTX must remain `validation-failed` until a
|
|
100
|
+
manual WPS or PowerPoint review confirms text, line breaks, images, notes, and
|
|
101
|
+
masters.
|
|
102
|
+
|
|
103
|
+
The engine is local-first: it only reads declared roots/current workspace and
|
|
104
|
+
temporary files, does not upload templates or material, and does not use the
|
|
105
|
+
network by itself.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ppt-template-reuse",
|
|
3
|
+
"version": "0.4.0-rc.2",
|
|
4
|
+
"description": "学习原生PPT模板用途,并根据材料体量生成内容完整、可编辑、带讲稿和真实预览的演示文稿。",
|
|
5
|
+
"skills": "./skills/",
|
|
6
|
+
"mcpServers": {
|
|
7
|
+
"ppt-template-reuse": {
|
|
8
|
+
"command": "ppt-template-reuse-mcp",
|
|
9
|
+
"args": []
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn-ppt-template
|
|
3
|
+
description: Create a content-complete, editable PowerPoint from a user-provided PPTX/POTX template and DOCX, PDF, PPTX, Markdown, or text material. Use whenever the user asks to make, imitate, learn, follow, or reuse a presentation template. Identify what every template page is for, adapt page count to source volume, preserve reasoning in native speaker notes, request missing visuals, expose real page previews, and stop on unresolved layouts, unsafe object edits, incomplete source coverage, or failed rendering. Works through the host-neutral ppt-template-reuse MCP or ppt-reuse CLI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Learn PPT Template
|
|
7
|
+
|
|
8
|
+
Use the `ppt-template-reuse` MCP server as the normal execution path. Do not ask
|
|
9
|
+
the user to prepare JSON, choose a page count, or run commands.
|
|
10
|
+
|
|
11
|
+
## Default behavior
|
|
12
|
+
|
|
13
|
+
For a request such as “参考这个模板和这些材料做一份内容完整、可编辑、带讲稿的
|
|
14
|
+
PPT”:
|
|
15
|
+
|
|
16
|
+
1. Call `ppt_create_session` with the template, material, output path, current
|
|
17
|
+
workspace roots, and stated audience/duration.
|
|
18
|
+
2. Call `ppt_inspect`.
|
|
19
|
+
3. Read every extracted source unit. Submit every original `id` and `anchor`
|
|
20
|
+
through `ppt_submit_semantics`; label facts, chronology, issues, rules,
|
|
21
|
+
evidence, analysis, counterarguments, rebuttals, conclusions, and
|
|
22
|
+
recommendations. Preserve `parentAnchor`, `segmentIndex`, and `segmentCount`
|
|
23
|
+
when a long paragraph, table, slide, or PDF page was deterministically
|
|
24
|
+
segmented. Never silently merge away or omit a unit.
|
|
25
|
+
For structured layouts, also supply short `displayFragments` with roles such
|
|
26
|
+
as `date`, `label`, `step`, `metric-label`, `body`, or `description`. These
|
|
27
|
+
are source-grounded slot values, not invented decoration. A timeline needs
|
|
28
|
+
dates and node labels; a multi-item grid needs one label/body pair per item.
|
|
29
|
+
4. Review only template slides returned as unresolved. Classify each page's
|
|
30
|
+
purpose, safe slots, capacity, required assets, protected elements, and
|
|
31
|
+
editability. Never approve uncertain SmartArt, chart, media, animation, icon,
|
|
32
|
+
or flattened-object edits. If several opening or closing variants are
|
|
33
|
+
returned, approve exactly one for each role and block the alternatives; do
|
|
34
|
+
not choose by page order.
|
|
35
|
+
5. Call `ppt_plan`. Let source volume, argument structure, slot capacity, and
|
|
36
|
+
requested speaking time determine page count. If planning returns
|
|
37
|
+
`template-selection`, show the returned full-size candidates, approve one
|
|
38
|
+
source slide for that role, block the competing candidates in the frozen
|
|
39
|
+
template profile, resubmit semantics, and plan again. Never break a tie by
|
|
40
|
+
page number.
|
|
41
|
+
6. If assets are required, use the host's image search or generation capability
|
|
42
|
+
when authorized; otherwise ask once for all missing assets. Register them
|
|
43
|
+
with `ppt_supply_assets`. Never permit gray blocks or temporary placeholders.
|
|
44
|
+
7. Call `ppt_generate`, then poll `ppt_status`. Show new real page previews in
|
|
45
|
+
order. Stop when the status contains `actionRequired`.
|
|
46
|
+
8. Call `ppt_validate` when generation did not already validate. Deliver only
|
|
47
|
+
when state is `completed`.
|
|
48
|
+
|
|
49
|
+
## Content rules
|
|
50
|
+
|
|
51
|
+
- Preserve 100% of `critical` units and at least 95% weighted relevant content.
|
|
52
|
+
- Require every included source unit to have a verified destination trace.
|
|
53
|
+
Preserve 100% of original source text in speaker notes, visibly represent
|
|
54
|
+
100% of critical units, and visibly represent at least 90% of weighted
|
|
55
|
+
relevant units. A `sourceUnitId` without matching field or notes text is not
|
|
56
|
+
coverage.
|
|
57
|
+
- Put source-verification text in a clearly marked
|
|
58
|
+
`[来源追踪,不逐字朗读]` notes block. Estimate duration from the spoken
|
|
59
|
+
explanation, not from that reference block. Do not add filler slides merely
|
|
60
|
+
because a short source finishes below the requested minimum time.
|
|
61
|
+
- Each analysis slide needs a claim, evidence, why-it-matters explanation, and
|
|
62
|
+
native speaker notes.
|
|
63
|
+
- Pair each represented counterargument with a response.
|
|
64
|
+
- Split overloaded material across more approved layouts; never shrink inherited
|
|
65
|
+
typography or delete reasoning to force a target page count.
|
|
66
|
+
- Use `core`, `appendix`, and `exclude` deliberately. An explicit duration
|
|
67
|
+
conflict requires a user choice between more time, narrower scope, or multiple
|
|
68
|
+
decks.
|
|
69
|
+
- A prior 19-page deck is only a regression example, never a fixed length.
|
|
70
|
+
- Do not infer length from unit count alone. Use original character volume,
|
|
71
|
+
argument nodes, counterargument chains, requested time, and the approved
|
|
72
|
+
template slot capacity. Very long material may legitimately produce dozens
|
|
73
|
+
or more than one hundred pages; stop for a duration/scope decision instead of
|
|
74
|
+
compressing it to a familiar deck length.
|
|
75
|
+
|
|
76
|
+
## Template and object rules
|
|
77
|
+
|
|
78
|
+
- Exact native mode supports `.pptx` and `.potx`; `.pptm` is rejected and macros
|
|
79
|
+
are never executed.
|
|
80
|
+
- Treat flattened templates as `hybrid-locked`. Do not call them fully editable.
|
|
81
|
+
- Edit only declared slots. Preserve masters, layouts, themes, logos, page
|
|
82
|
+
chrome, animations, SmartArt, media, and all untargeted objects.
|
|
83
|
+
- Replace inherited images in place. Update tables only when dimensions match.
|
|
84
|
+
Update charts only when the embedded workbook and rendered result can both be
|
|
85
|
+
validated; otherwise stop.
|
|
86
|
+
- “插入图片”, “相关图片”, “ICON”, sample copy, and gray image blocks are
|
|
87
|
+
requirements, not audience-facing content.
|
|
88
|
+
- If an older reviewed template capsule is available, import it only when its
|
|
89
|
+
source SHA256 matches. Keep deny-by-default safety, preserve the old
|
|
90
|
+
preview/review bindings, approve exactly one opening and closing, and never
|
|
91
|
+
re-guess already reviewed slots.
|
|
92
|
+
|
|
93
|
+
## Completion gate
|
|
94
|
+
|
|
95
|
+
Completion requires a frozen content plan and frame map, native speaker notes,
|
|
96
|
+
no residual examples or placeholders, matching slide/render counts, real
|
|
97
|
+
LibreOffice rendering, rendered-text fidelity, and a passing QA report. If
|
|
98
|
+
LibreOffice is missing or its PDF contains missing/substituted glyphs, analysis
|
|
99
|
+
and planning may complete but the PPTX must remain `validation-failed` until a
|
|
100
|
+
manual WPS or PowerPoint review confirms text, line breaks, images, notes, and
|
|
101
|
+
masters.
|
|
102
|
+
|
|
103
|
+
The engine is local-first: it only reads declared roots/current workspace and
|
|
104
|
+
temporary files, does not upload templates or material, and does not use the
|
|
105
|
+
network by itself.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn-ppt-template
|
|
3
|
+
description: Create a content-complete, editable PowerPoint from a user-provided PPTX/POTX template and DOCX, PDF, PPTX, Markdown, or text material. Use whenever the user asks to make, imitate, learn, follow, or reuse a presentation template. Identify what every template page is for, adapt page count to source volume, preserve reasoning in native speaker notes, request missing visuals, expose real page previews, and stop on unresolved layouts, unsafe object edits, incomplete source coverage, or failed rendering. Works through the host-neutral ppt-template-reuse MCP or ppt-reuse CLI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Learn PPT Template
|
|
7
|
+
|
|
8
|
+
Use the `ppt-template-reuse` MCP server as the normal execution path. Do not ask
|
|
9
|
+
the user to prepare JSON, choose a page count, or run commands.
|
|
10
|
+
|
|
11
|
+
## Default behavior
|
|
12
|
+
|
|
13
|
+
For a request such as “参考这个模板和这些材料做一份内容完整、可编辑、带讲稿的
|
|
14
|
+
PPT”:
|
|
15
|
+
|
|
16
|
+
1. Call `ppt_create_session` with the template, material, output path, current
|
|
17
|
+
workspace roots, and stated audience/duration.
|
|
18
|
+
2. Call `ppt_inspect`.
|
|
19
|
+
3. Read every extracted source unit. Submit every original `id` and `anchor`
|
|
20
|
+
through `ppt_submit_semantics`; label facts, chronology, issues, rules,
|
|
21
|
+
evidence, analysis, counterarguments, rebuttals, conclusions, and
|
|
22
|
+
recommendations. Preserve `parentAnchor`, `segmentIndex`, and `segmentCount`
|
|
23
|
+
when a long paragraph, table, slide, or PDF page was deterministically
|
|
24
|
+
segmented. Never silently merge away or omit a unit.
|
|
25
|
+
For structured layouts, also supply short `displayFragments` with roles such
|
|
26
|
+
as `date`, `label`, `step`, `metric-label`, `body`, or `description`. These
|
|
27
|
+
are source-grounded slot values, not invented decoration. A timeline needs
|
|
28
|
+
dates and node labels; a multi-item grid needs one label/body pair per item.
|
|
29
|
+
4. Review only template slides returned as unresolved. Classify each page's
|
|
30
|
+
purpose, safe slots, capacity, required assets, protected elements, and
|
|
31
|
+
editability. Never approve uncertain SmartArt, chart, media, animation, icon,
|
|
32
|
+
or flattened-object edits. If several opening or closing variants are
|
|
33
|
+
returned, approve exactly one for each role and block the alternatives; do
|
|
34
|
+
not choose by page order.
|
|
35
|
+
5. Call `ppt_plan`. Let source volume, argument structure, slot capacity, and
|
|
36
|
+
requested speaking time determine page count. If planning returns
|
|
37
|
+
`template-selection`, show the returned full-size candidates, approve one
|
|
38
|
+
source slide for that role, block the competing candidates in the frozen
|
|
39
|
+
template profile, resubmit semantics, and plan again. Never break a tie by
|
|
40
|
+
page number.
|
|
41
|
+
6. If assets are required, use the host's image search or generation capability
|
|
42
|
+
when authorized; otherwise ask once for all missing assets. Register them
|
|
43
|
+
with `ppt_supply_assets`. Never permit gray blocks or temporary placeholders.
|
|
44
|
+
7. Call `ppt_generate`, then poll `ppt_status`. Show new real page previews in
|
|
45
|
+
order. Stop when the status contains `actionRequired`.
|
|
46
|
+
8. Call `ppt_validate` when generation did not already validate. Deliver only
|
|
47
|
+
when state is `completed`.
|
|
48
|
+
|
|
49
|
+
## Content rules
|
|
50
|
+
|
|
51
|
+
- Preserve 100% of `critical` units and at least 95% weighted relevant content.
|
|
52
|
+
- Require every included source unit to have a verified destination trace.
|
|
53
|
+
Preserve 100% of original source text in speaker notes, visibly represent
|
|
54
|
+
100% of critical units, and visibly represent at least 90% of weighted
|
|
55
|
+
relevant units. A `sourceUnitId` without matching field or notes text is not
|
|
56
|
+
coverage.
|
|
57
|
+
- Put source-verification text in a clearly marked
|
|
58
|
+
`[来源追踪,不逐字朗读]` notes block. Estimate duration from the spoken
|
|
59
|
+
explanation, not from that reference block. Do not add filler slides merely
|
|
60
|
+
because a short source finishes below the requested minimum time.
|
|
61
|
+
- Each analysis slide needs a claim, evidence, why-it-matters explanation, and
|
|
62
|
+
native speaker notes.
|
|
63
|
+
- Pair each represented counterargument with a response.
|
|
64
|
+
- Split overloaded material across more approved layouts; never shrink inherited
|
|
65
|
+
typography or delete reasoning to force a target page count.
|
|
66
|
+
- Use `core`, `appendix`, and `exclude` deliberately. An explicit duration
|
|
67
|
+
conflict requires a user choice between more time, narrower scope, or multiple
|
|
68
|
+
decks.
|
|
69
|
+
- A prior 19-page deck is only a regression example, never a fixed length.
|
|
70
|
+
- Do not infer length from unit count alone. Use original character volume,
|
|
71
|
+
argument nodes, counterargument chains, requested time, and the approved
|
|
72
|
+
template slot capacity. Very long material may legitimately produce dozens
|
|
73
|
+
or more than one hundred pages; stop for a duration/scope decision instead of
|
|
74
|
+
compressing it to a familiar deck length.
|
|
75
|
+
|
|
76
|
+
## Template and object rules
|
|
77
|
+
|
|
78
|
+
- Exact native mode supports `.pptx` and `.potx`; `.pptm` is rejected and macros
|
|
79
|
+
are never executed.
|
|
80
|
+
- Treat flattened templates as `hybrid-locked`. Do not call them fully editable.
|
|
81
|
+
- Edit only declared slots. Preserve masters, layouts, themes, logos, page
|
|
82
|
+
chrome, animations, SmartArt, media, and all untargeted objects.
|
|
83
|
+
- Replace inherited images in place. Update tables only when dimensions match.
|
|
84
|
+
Update charts only when the embedded workbook and rendered result can both be
|
|
85
|
+
validated; otherwise stop.
|
|
86
|
+
- “插入图片”, “相关图片”, “ICON”, sample copy, and gray image blocks are
|
|
87
|
+
requirements, not audience-facing content.
|
|
88
|
+
- If an older reviewed template capsule is available, import it only when its
|
|
89
|
+
source SHA256 matches. Keep deny-by-default safety, preserve the old
|
|
90
|
+
preview/review bindings, approve exactly one opening and closing, and never
|
|
91
|
+
re-guess already reviewed slots.
|
|
92
|
+
|
|
93
|
+
## Completion gate
|
|
94
|
+
|
|
95
|
+
Completion requires a frozen content plan and frame map, native speaker notes,
|
|
96
|
+
no residual examples or placeholders, matching slide/render counts, real
|
|
97
|
+
LibreOffice rendering, rendered-text fidelity, and a passing QA report. If
|
|
98
|
+
LibreOffice is missing or its PDF contains missing/substituted glyphs, analysis
|
|
99
|
+
and planning may complete but the PPTX must remain `validation-failed` until a
|
|
100
|
+
manual WPS or PowerPoint review confirms text, line breaks, images, notes, and
|
|
101
|
+
masters.
|
|
102
|
+
|
|
103
|
+
The engine is local-first: it only reads declared roots/current workspace and
|
|
104
|
+
temporary files, does not upload templates or material, and does not use the
|
|
105
|
+
network by itself.
|