Files
Templated-PPT-Master/references/page-library.md
T

4.8 KiB

Page library

A template may declare page_library: "page-library/catalog.json". This optional schema-v1 catalog belongs to that template package. It contains reference compositions, not extra PowerPoint Layouts or content requirements. Older manifests without it remain valid. export-style and resolve expose the absolute catalog path and hash; a selected entry's inspection hashes its design and material closure.

Find and adapt

  1. Run python <skill>/scripts/page_library.py list --manifest <absolute manifest> --theme <selected theme> [--layout <id>]. Choose by information relation and tags.
  2. Run inspect --manifest ... --entry <id> --theme <selected theme> --for-use. This requires a released template, reference status, compatibility with the exact template version and a matching theme variant. Plain inspect can review candidates and deprecated examples but reports eligibility separately. check --manifest ... verifies the whole catalog; missing libraries return available: false for list/check.
  3. Read the design document and open the preview. Review purpose, read order, density, object exceptions and evidence age. Preview provenance is a declaration tied to hashes; the tool does not rerender or prove editing.
  4. Adapt the source inside the report project. Copy declared assets into the assigned page directory, rebase local image paths, replace content, and preserve native metadata and inherited Master/Layout identities. Replace specialized-object metadata and visible fallback together. Retain origin and entry input hashes in the page packet. SVG text is materialized; there is no implicit content binding.
  5. Use the current style as authority for fonts, grid, palette and paint. Use the selected theme variant; theme switching requires rebinding assets and permitted paint channels, not whole-image recoloring. Inspect the changed render and native objects; the old preview is not evidence for the new page.

The tool checks file SHA-256 and SVG href closure. It does not execute entry code. The native compiler still performs its own source/resource checks. A method may refer to a template-local generator; read it and invoke it only within the authorized project and host scope.

eligible: true means that the selected design reference has valid version/theme/file bindings. It does not prove a reusable content interface or compliance with the current text and container rules. If a historical example contains repeated materialized SVG groups but no shared generator, first supply one shared recipe and complete content inputs in the report project. Generate every repeated instance through it; do not turn a reference's per-line coordinates into author-maintained content. Retain the historical preview as a visual reference and validate the regenerated page separately.

Catalog contract

The catalog has schema_version: 1, matching template_id, and entries. Each entry contains:

  • Stable id, title, status (candidate, reference, deprecated), exact template_versions, an existing layout, and tags.
  • design: {path, sha256} for rationale, implementation, limits and preview links; origin for provenance.
  • variants, keyed by existing theme ID. Each declares source SVG, preview PNG/JPEG and files: [{path, sha256}] including both plus referenced images and implementation inputs. All paths are relative to the manifest directory; absolute paths, traversal and symlink escapes are rejected. SVG hrefs resolve relative to the source and must be declared local files, fragments or supported embedded bitmaps.
  • evidence: {level, source_version, notes}. Levels: source-only, svg-rendered, powerpoint-rendered, powerpoint-edited. These label specific evidence, not universal acceptance. Record original source/preview paths and hashes when relocating examples. Never relabel historical rendering as current application verification.

Exact compatibility requires maintainer review after geometry, fonts or object contracts change. Adding a compatible version does not manufacture fresh render evidence. Candidate status does not imply reuse or publication approval.

Contribute

Prepare an authorized candidate in the caller's workspace with source and independent assets, rationale, implementation steps, theme/layout, preview, evidence scope, origin/license and redistribution rights. Remove private content, credentials, personal data and report-only paths; replace sensitive data and rerender the replacement. Preserve fixed-color and paint contracts.

Submit through an authorized channel. The template maintainer checks usefulness, portability, theme compatibility and source/preview agreement before marking reference and releasing a new version. Do not edit an installed catalog, global index or locked vendor/template as an intake shortcut. No upload, commit, publication or messaging is implied.