Require buildable projects, mockup fidelity and page hierarchy (0.9.3)
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
Read the selected external template's specification, style, theme and relevant layout first. The bundled compiler accepts the native SVG workspace convention: `templates/roster.json` maps every manifest layout ID to one SVG; each source SVG declares `data-pptx-master`, `data-pptx-layout` and friendly names. Layout and master objects use their declared `data-pptx-layer`. Placeholder groups carry `data-pptx-placeholder`, a stable `data-pptx-idx`, and `data-pptx-bounds`.
|
||||
|
||||
Create or continue the [mandatory buildable Skill project](project-workspace.md) before producing the page. Keep its selected template, page SVGs, notes, assets and real builder together; even a one-slide request must produce the PPTX through that project's build entrypoint, not a hand-assembled file or standalone export with no retained project.
|
||||
|
||||
Start the current page from its selected layout source. Retain inheritance metadata, inherited objects and placeholder indices. Fill the declared placeholder carrier; put independent content objects in the intended slide layer. Do not paint opaque slide-local copies over the master logo or layout watermarks. When a template supplies a custom composition generator, inspect it and use its declared content interface rather than approximating its source geometry.
|
||||
|
||||
Use the template's discrete typography, grid, fixed content region and spacing. Resolve overflow by choosing a suitable layout, shortening content or dividing the page according to the user's workflow. Do not infer ad hoc font sizes and alignment guides from mockup pixels. Keep text as text, simple panels and connectors as geometry, and exact image exceptions as independent assets. Tables, charts and formulas must retain their required native object type; a collection of lines/text or a formula picture does not automatically qualify.
|
||||
Use the template's discrete typography, grid, fixed content region and spacing. Resolve overflow by choosing a suitable layout, or by shortening content/dividing the page within the user's authorized content scope. For an approved mockup, preserve its content, graphics and relationship-bearing shapes under [mockup fidelity](visual-design.md#approved-mockup-fidelity); necessary quality repair does not permit silently dropping elements. Do not infer ad hoc font sizes and alignment guides from mockup pixels. Keep text as text, simple panels and connectors as geometry, and exact image exceptions as independent assets. Tables, charts and formulas must retain their required native object type; a collection of lines/text or a formula picture does not automatically qualify.
|
||||
|
||||
Apply [text and container rules](text-and-containers.md) before authoring: prefer one native frame per paragraph, use a unified logical block for any necessary fragments, distinguish text functions by size/weight/color and instantiate repeated containers through a shared renderer. Inspect actual native paragraph structure after export; positional SVG spans can otherwise be split by the compiler.
|
||||
|
||||
@@ -12,20 +14,19 @@ Before emitting paragraph rows, check punctuation at both line edges and prohibi
|
||||
|
||||
Keep separate paragraphs separated by the template's fixed paragraph gap, retaining their normal internal line height. Spacing values and applicable relationships belong to the shared recipe; content callers cannot adjust them. Check exact fixed padding/gaps and actual glyph/edge clearance at normal scale. Use [text-block/spacing helpers](text-and-containers.md#spacing-and-paragraph-separation) for supported content. Explicit math markers use the [Office Math wrapper](mathematics.md), not the upstream table/chart marker kinds.
|
||||
|
||||
## Current-page export
|
||||
## Current-page project build
|
||||
|
||||
The installer provides Python 3.12+ and [runtime requirements](../runtime/requirements.txt). Metadata-only selection and project commands use Python 3.10+ without third-party packages.
|
||||
|
||||
Follow [project initialization and builder preparation](project-workspace.md#初始化与作者工作流), add the current authorized pages and their inputs, then build through the project. Source edits and quality repairs must be included in the locks before the next build:
|
||||
|
||||
```sh
|
||||
python3 /path/to/skill/scripts/native_export.py \
|
||||
--manifest /path/to/separate-template/manifest.json \
|
||||
--theme chosen-theme \
|
||||
--source /path/to/current-page.svg \
|
||||
--output /path/to/new-review.pptx \
|
||||
--notes /path/to/notes.json
|
||||
python3 /path/to/report/tools/ppt_project.py lock --project /path/to/report
|
||||
python3 /path/to/report/tools/ppt_project.py check --project /path/to/report
|
||||
python3 /path/to/report/tools/ppt_project.py build --project /path/to/report
|
||||
```
|
||||
|
||||
`--source` may repeat to assemble explicitly authorized, already authored pages in order. It does not create or design additional pages. Source filename stems must be unique. `--notes` is optional JSON mapping source stems to complete speaker-notes strings; unknown stems are rejected.
|
||||
The project builder calls `native_export.py` as its low-level compiler, or imports its `export` function. That interface retains `--manifest`, `--theme`, repeatable `--source`, `--output` and optional `--notes`; it is not a projectless production shortcut. It may assemble only explicitly authorized, already authored pages in order. Source filename stems must be unique. `--notes` maps source stems to complete speaker-notes strings; unknown stems are rejected.
|
||||
|
||||
The exporter consumes released v2 manifests and retains all native layout definitions, even for a single visible page. It requires a complete layout roster, unique layout names, declared `page_title`/`body` family roles and sizes, and the twelve PowerPoint theme color indices. Optional `style.language` supplies the presentation's BCP-47 language tag. Without it, the exporter preserves the compiler's legacy language metadata behavior; record the deck language in the project when it matters.
|
||||
|
||||
@@ -33,6 +34,8 @@ Page SVG viewBox and layout ID must match the selected template. Source assets a
|
||||
|
||||
The exporter embeds images in temporary source copies, preserving canonical source bytes. It runs the bundled attribution guard, serial compiler and declared-font preservation context, then applies the external palette/theme fonts without overwriting resolved run weights, and verifies slide/Layout/Master links, placeholders and supplied notes. Authors/renderers must apply their selected role's actual size, weight and color to the source; family identity alone does not select a text function. Existing output is protected, including a concurrent writer appearing during compilation. A failed build does not replace old output.
|
||||
|
||||
Before marking each page complete, perform the [full-page hierarchy check](visual-design.md#full-page-hierarchy-check) on its current render, covering font sizes/families/weights, spacing and visual content groups across the entire page. Compare with any approved sample, repair the source and rebuild/reinspect as needed; a successful compile is not this visual check.
|
||||
|
||||
## Template authors and review prototypes
|
||||
|
||||
Keep proposed styles and mockups outside the final template workspace until the user's design review allows formal construction. A proposal manifest cannot be consumed as a released production template. After approval, author the common style, independent themes, roster and native SVG layout definitions together; compare each theme against the same geometry and slot contract.
|
||||
|
||||
Reference in New Issue
Block a user