@litfamily/litgravity 0.1.1 → 0.1.3
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/CHANGELOG.md +46 -0
- package/README.md +19 -3
- package/README_ko-KR.md +19 -3
- package/TRADEMARK.md +12 -0
- package/package.json +3 -2
- package/plugin/hooks/lib/lanes.mjs +65 -0
- package/plugin/hooks/lib/liveness.mjs +81 -0
- package/plugin/hooks/lib/motion.mjs +34 -5
- package/plugin/hooks/lib/reentry.mjs +7 -0
- package/plugin/hooks/lib/rewind/brief.mjs +364 -0
- package/plugin/hooks/lib/rewind/collect.mjs +359 -0
- package/plugin/hooks/lib/rewind/gauge.mjs +55 -0
- package/plugin/hooks/lib/rewind/next-step.mjs +77 -0
- package/plugin/hooks/lib/rewind/redact.mjs +60 -0
- package/plugin/hooks/lib/rewind/transcripts.mjs +214 -0
- package/plugin/hooks/lib/routes.mjs +79 -5
- package/plugin/hooks/lib/workflow-stack.mjs +213 -0
- package/plugin/hooks/post-tool-use.mjs +39 -1
- package/plugin/hooks/pre-invocation.mjs +93 -2
- package/plugin/hooks/session-start.mjs +26 -3
- package/plugin/hooks/stop.mjs +55 -6
- package/plugin/hud/looks.mjs +29 -0
- package/plugin/hud/render.mjs +277 -12
- package/plugin/plugin.json +1 -1
- package/plugin/skills/frontend-ui-ux/SKILL.md +12 -1
- package/plugin/skills/frontend-ui-ux/kit/components.css +417 -0
- package/plugin/skills/frontend-ui-ux/kit/fonts.json +22 -0
- package/plugin/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
- package/plugin/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
- package/plugin/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
- package/plugin/skills/frontend-ui-ux/kit/ui.js +226 -0
- package/plugin/skills/frontend-ui-ux/references/house-styles.md +234 -0
- package/plugin/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +30 -9
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +20 -8
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe.mjs +42 -9
- package/plugin/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
- package/plugin/skills/lit-adhd/SKILL.md +160 -0
- package/plugin/skills/lit-adhd/references/card-examples.md +107 -0
- package/plugin/skills/lit-adhd/references/status-taxonomy.md +34 -0
- package/plugin/skills/lit-adhd/scripts/rewind.mjs +5 -0
- package/plugin/skills/lit-diagram-drawer/SKILL.md +5 -3
- package/plugin/skills/lit-diagram-drawer/references/drawing-rules.md +1 -1
- package/plugin/skills/lit-diagram-drawer/references/style-guide.md +21 -12
- package/plugin/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
- package/plugin/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
- package/plugin/skills/lit-diagram-drawer/references/type-tree.md +3 -3
- package/plugin/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
- package/plugin/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
- package/plugin/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
- package/plugin/skills/lit-docx/SKILL.md +3 -3
- package/plugin/skills/lit-handoff/SKILL.md +1 -0
- package/plugin/skills/lit-hijack/SKILL.md +263 -0
- package/plugin/skills/lit-hijack/references/capture-and-provenance.md +100 -0
- package/plugin/skills/lit-hijack/references/clean-room-build.md +75 -0
- package/plugin/skills/lit-hijack/references/distil-and-licence.md +67 -0
- package/plugin/skills/lit-hijack/references/gap-and-port-design.md +100 -0
- package/plugin/skills/lit-hijack/references/parity-and-report.md +85 -0
- package/plugin/skills/lit-hijack/scripts/hijack.mjs +953 -0
- package/plugin/skills/lit-plan/SKILL.md +3 -2
- package/plugin/skills/lit-plan/references/plan-contract.md +12 -1
- package/plugin/skills/lit-plan/scripts/check-plan.mjs +39 -3
- package/plugin/skills/lit-plan/templates/plan.md +3 -0
- package/plugin/skills/lit-pptx/SKILL.md +8 -8
- package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
- package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
- package/plugin/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
- package/plugin/skills/lit-pptx/fonts/provenance.json +32 -1
- package/plugin/skills/lit-pptx/references/agents/analyst.md +34 -56
- package/plugin/skills/lit-pptx/references/agents/antithesis.md +49 -67
- package/plugin/skills/lit-pptx/references/agents/architect.md +38 -51
- package/plugin/skills/lit-pptx/references/agents/critic.md +25 -41
- package/plugin/skills/lit-pptx/references/agents/synthesizer.md +37 -46
- package/plugin/skills/lit-pptx/references/agents/thesis.md +29 -49
- package/plugin/skills/lit-pptx/references/anti-slop-checklist.md +119 -145
- package/plugin/skills/lit-pptx/references/authoring-guide.md +187 -278
- package/plugin/skills/lit-pptx/references/consensus-protocol.md +99 -97
- package/plugin/skills/lit-pptx/references/data-display-cookbook.md +36 -137
- package/plugin/skills/lit-pptx/references/density-and-fill.md +147 -216
- package/plugin/skills/lit-pptx/references/design-system-azure.md +56 -85
- package/plugin/skills/lit-pptx/references/direction-step.md +134 -176
- package/plugin/skills/lit-pptx/references/examples/01-pitch-signal-ko.md +114 -115
- package/plugin/skills/lit-pptx/references/examples/02-pitch-studio-ko.md +66 -66
- package/plugin/skills/lit-pptx/references/examples/03-business-review-ledger-ko.md +63 -63
- package/plugin/skills/lit-pptx/references/examples/04-business-review-night-en.md +96 -96
- package/plugin/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +81 -81
- package/plugin/skills/lit-pptx/references/examples/06-lecture-chalk-ko.md +103 -103
- package/plugin/skills/lit-pptx/references/examples/07-data-review-night-en.md +100 -98
- package/plugin/skills/lit-pptx/references/examples/08-image-led-atlas-ko.md +76 -76
- package/plugin/skills/lit-pptx/references/examples/09-briefing-gazette-ko.md +96 -96
- package/plugin/skills/lit-pptx/references/examples/10-status-update-ledger-ko.md +80 -80
- package/plugin/skills/lit-pptx/references/examples/11-portfolio-studio-en.md +72 -72
- package/plugin/skills/lit-pptx/references/examples/12-research-tutorial-chalk-en.md +95 -95
- package/plugin/skills/lit-pptx/references/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
- package/plugin/skills/lit-pptx/references/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
- package/plugin/skills/lit-pptx/references/examples/15-design-lecture-bauhaus-ko.md +139 -0
- package/plugin/skills/lit-pptx/references/examples/16-community-programme-riso-ko.md +158 -0
- package/plugin/skills/lit-pptx/references/examples/17-public-data-briefing-newsroom-ko.md +179 -0
- package/plugin/skills/lit-pptx/references/interview-protocol.md +83 -102
- package/plugin/skills/lit-pptx/references/layout-families.md +161 -265
- package/plugin/skills/lit-pptx/references/stages/autopilot.md +30 -70
- package/plugin/skills/lit-pptx/references/stages/interview.md +36 -68
- package/plugin/skills/lit-pptx/references/stages/plan.md +26 -67
- package/plugin/skills/lit-pptx/references/title-treatments.md +93 -145
- package/plugin/skills/lit-pptx/references/tonalities/atlas.md +95 -108
- package/plugin/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
- package/plugin/skills/lit-pptx/references/tonalities/chalk.md +107 -122
- package/plugin/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
- package/plugin/skills/lit-pptx/references/tonalities/gazette.md +87 -111
- package/plugin/skills/lit-pptx/references/tonalities/ledger.md +96 -125
- package/plugin/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
- package/plugin/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
- package/plugin/skills/lit-pptx/references/tonalities/night.md +104 -131
- package/plugin/skills/lit-pptx/references/tonalities/paper.md +114 -130
- package/plugin/skills/lit-pptx/references/tonalities/riso.md +137 -0
- package/plugin/skills/lit-pptx/references/tonalities/signal.md +96 -103
- package/plugin/skills/lit-pptx/references/tonalities/studio.md +81 -112
- package/plugin/skills/lit-pptx/scripts/compile-deck.js +4 -6
- package/plugin/skills/lit-pptx/scripts/craft_extras.py +135 -91
- package/plugin/skills/lit-pptx/scripts/deck_craft.py +1 -1
- package/plugin/skills/lit-pptx/scripts/embed_fonts.py +13 -1
- package/plugin/skills/lit-pptx/scripts/layout_inventory.py +1 -1
- package/plugin/skills/lit-pptx/scripts/learn_template.py +1 -1
- package/plugin/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
- package/plugin/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
- package/plugin/skills/lit-pptx/scripts/lib/render-pack.js +370 -563
- package/plugin/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
- package/plugin/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
- package/plugin/skills/lit-pptx/scripts/qa_deck.py +6 -6
- package/plugin/skills/lit-pptx/scripts/render_pages.py +31 -0
- package/plugin/skills/lit-pptx/scripts/validate_pptx.py +1 -1
- package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v1.md +167 -191
- package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v2.md +117 -166
- package/plugin/skills/lit-pptx/specs/template-enrollment-contract.md +307 -330
- package/plugin/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
- package/plugin/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
- package/plugin/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
- package/plugin/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
- package/plugin/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
- package/plugin/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
- package/plugin/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
- package/plugin/skills/lit-schematic/SKILL.md +114 -0
- package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
- package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
- package/plugin/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
- package/plugin/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
- package/plugin/skills/lit-schematic/references/cutaway-outputs.md +70 -0
- package/plugin/skills/lit-schematic/references/isometric-craft.md +101 -0
- package/plugin/skills/lit-schematic/references/journal-figures.md +72 -0
- package/plugin/skills/lit-schematic/references/kit-api.md +134 -0
- package/plugin/skills/lit-schematic/references/pfd-and-layout.md +53 -0
- package/plugin/skills/lit-schematic/references/pid-drafting.md +103 -0
- package/plugin/skills/lit-schematic/references/pid-symbols.md +163 -0
- package/plugin/skills/lit-schematic/references/verification.md +100 -0
- package/plugin/skills/lit-schematic/scripts/doctor.mjs +57 -0
- package/plugin/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
- package/plugin/skills/lit-schematic/scripts/lib/fonts.mjs +27 -0
- package/plugin/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
- package/plugin/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
- package/plugin/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
- package/plugin/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
- package/plugin/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
- package/plugin/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
- package/plugin/skills/lit-schematic/scripts/lib/png.mjs +132 -0
- package/plugin/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
- package/plugin/skills/lit-schematic/scripts/lib/route.mjs +218 -0
- package/plugin/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
- package/plugin/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
- package/plugin/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
- package/plugin/skills/lit-schematic/scripts/motion.mjs +129 -0
- package/plugin/skills/lit-schematic/scripts/qa.mjs +92 -0
- package/plugin/skills/lit-schematic/scripts/render.mjs +233 -0
- package/plugin/skills/lit-schematic/scripts/scaffold.mjs +60 -0
- package/plugin/skills/lit-scientific-visualization/SKILL.md +17 -6
- package/plugin/skills/lit-typographic-motion/SKILL.md +58 -48
- package/plugin/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +13 -2
- package/plugin/skills/lit-typographic-motion/engine/blender/runner.py +218 -0
- package/plugin/skills/lit-typographic-motion/engine/core/presets.mjs +1 -1
- package/plugin/skills/lit-typographic-motion/engine/node/analysis.mjs +65 -1
- package/plugin/skills/lit-typographic-motion/engine/node/assets.mjs +298 -0
- package/plugin/skills/lit-typographic-motion/engine/node/blender.mjs +143 -0
- package/plugin/skills/lit-typographic-motion/engine/node/board.mjs +136 -0
- package/plugin/skills/lit-typographic-motion/engine/node/brief.mjs +7 -1
- package/plugin/skills/lit-typographic-motion/engine/node/chrome.mjs +9 -12
- package/plugin/skills/lit-typographic-motion/engine/node/cover-assets.mjs +5 -3
- package/plugin/skills/lit-typographic-motion/engine/node/cover-capture.mjs +7 -6
- package/plugin/skills/lit-typographic-motion/engine/node/cover-treatment.mjs +37 -4
- package/plugin/skills/lit-typographic-motion/engine/node/cover.mjs +19 -8
- package/plugin/skills/lit-typographic-motion/engine/node/done.mjs +45 -6
- package/plugin/skills/lit-typographic-motion/engine/node/frame-worker.mjs +7 -5
- package/plugin/skills/lit-typographic-motion/engine/node/gallery.mjs +121 -0
- package/plugin/skills/lit-typographic-motion/engine/node/host.mjs +34 -0
- package/plugin/skills/lit-typographic-motion/engine/node/house.mjs +44 -0
- package/plugin/skills/lit-typographic-motion/engine/node/look.mjs +34 -20
- package/plugin/skills/lit-typographic-motion/engine/node/pipeline.mjs +19 -9
- package/plugin/skills/lit-typographic-motion/engine/node/scaffold.mjs +210 -0
- package/plugin/skills/lit-typographic-motion/engine/node/score.mjs +639 -0
- package/plugin/skills/lit-typographic-motion/engine/node/sound-cli.mjs +21 -4
- package/plugin/skills/lit-typographic-motion/engine/node/sound.mjs +127 -29
- package/plugin/skills/lit-typographic-motion/engine/node/stage-capture.mjs +7 -6
- package/plugin/skills/lit-typographic-motion/engine/node/stage-gate.mjs +59 -5
- package/plugin/skills/lit-typographic-motion/engine/node/stage-qa.mjs +141 -9
- package/plugin/skills/lit-typographic-motion/engine/node/stage-serve.mjs +28 -5
- package/plugin/skills/lit-typographic-motion/engine/node/stage.mjs +82 -14
- package/plugin/skills/lit-typographic-motion/engine/node/styles.mjs +213 -0
- package/plugin/skills/lit-typographic-motion/engine/node/treatment.mjs +311 -10
- package/plugin/skills/lit-typographic-motion/engine/stage/cover-init.js +14 -2
- package/plugin/skills/lit-typographic-motion/engine/stage/init.js +11 -1
- package/plugin/skills/lit-typographic-motion/engine/stage/qa.js +6 -1
- package/plugin/skills/lit-typographic-motion/engine/stage/stage-kit.js +83 -0
- package/plugin/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
- package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
- package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
- package/plugin/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
- package/plugin/skills/lit-typographic-motion/recipes/hero-3d/expected.json +69 -0
- package/plugin/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
- package/plugin/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +6 -4
- package/plugin/skills/lit-typographic-motion/recipes/painted-light/expected.json +4 -2
- package/plugin/skills/lit-typographic-motion/recipes/weight-tide/expected.json +7 -5
- package/plugin/skills/lit-typographic-motion/references/cover.md +394 -443
- package/plugin/skills/lit-typographic-motion/references/craft-loop.md +57 -87
- package/plugin/skills/lit-typographic-motion/references/depth.md +122 -0
- package/plugin/skills/lit-typographic-motion/references/look.md +94 -129
- package/plugin/skills/lit-typographic-motion/references/runtime.md +58 -91
- package/plugin/skills/lit-typographic-motion/references/sound.md +130 -99
- package/plugin/skills/lit-typographic-motion/references/stage.md +190 -215
- package/plugin/skills/lit-typographic-motion/references/studio.md +245 -0
- package/plugin/skills/lit-typographic-motion/references/style-bibles.md +108 -97
- package/plugin/skills/lit-typographic-motion/references/treatment.md +191 -143
- package/plugin/skills/lit-typographic-motion/scripts/motion-doctor.mjs +17 -5
- package/plugin/skills/lit-typographic-motion/scripts/motion.mjs +47 -7
- package/plugin/skills/lit-typographic-motion/styles/paper.json +41 -0
- package/plugin/skills/lit-typographic-motion/styles/swiss-signal.json +41 -0
- package/plugin/skills/lit-typographic-motion/styles/terminalcore.json +42 -0
- package/plugin/skills/lit-typographic-motion/styles/tidal.json +41 -0
- package/plugin/skills/litresearch/SKILL.md +1 -0
- package/plugin/skills/readme-studio/SKILL.md +2 -0
- package/plugin/skills/review-work/SKILL.md +1 -1
- package/plugin/skills/start-work/SKILL.md +2 -2
|
@@ -1,79 +1,34 @@
|
|
|
1
|
-
# Template
|
|
1
|
+
# Template Enrollment Contract
|
|
2
2
|
|
|
3
|
-
Status
|
|
4
|
-
|
|
3
|
+
> **Status:** Frozen for v1. Changes require a version bump.
|
|
4
|
+
> **Date:** 2026-04-19
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Purpose
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
classic layouts (and any layout the template adds) on one canvas: where each region sits, which font
|
|
10
|
-
role each region uses, which furniture belongs on which layout, and which blocks each layout accepts.
|
|
11
|
-
Adding a template is a file operation, and the compiler discovers it by scanning folders. The
|
|
12
|
-
compiler contains no template names.
|
|
8
|
+
Define the contract that an enrolled template must satisfy to participate in the Markdown → AST → rendered slide pipeline. Enrollment is a declarative, file-based process — no compiler code changes are required to add a new template.
|
|
13
9
|
|
|
14
|
-
|
|
10
|
+
## 1. Enrollment Package Structure
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|---|---|---|
|
|
18
|
-
| Enrolled | Written by hand; the four bundled ones are `AZURE-PRO`, `AZURE-A2Z`, `BOILERPLATE-PRETENDARD`, `BOILERPLATE-A2Z` | `templates/enrolled/<NAME>/` inside the skill |
|
|
19
|
-
| Learned | Produced from a user's own `.pptx` by `scripts/learn_template.py` | `.lit-pptx/templates/<NAME>/` in the user's working directory |
|
|
20
|
-
|
|
21
|
-
Tonality packs (`templates/tonalities/<id>/pack.yaml`) are a separate mechanism with their own schema,
|
|
22
|
-
checked by `validatePack` in `scripts/lib/template-registry.js`. A deck chooses one or the other: a
|
|
23
|
-
`tonality:` line in the frontmatter (or `--tonality`) selects a pack, `--template <NAME>` selects an
|
|
24
|
-
enrolled or learned template. When a deck names a tonality the template flag is ignored and the
|
|
25
|
-
compile log says so.
|
|
26
|
-
|
|
27
|
-
## 2. Where templates are found
|
|
28
|
-
|
|
29
|
-
`template-registry.js` searches these folders in order and takes the first folder that holds a
|
|
30
|
-
`template.yaml` with the requested name:
|
|
31
|
-
|
|
32
|
-
1. each folder listed in `LIT_PPTX_TEMPLATE_DIRS` (separated by the platform path delimiter);
|
|
33
|
-
2. `.lit-pptx/templates` under the current working directory;
|
|
34
|
-
3. the skill's own `templates/enrolled`.
|
|
35
|
-
|
|
36
|
-
The installed skill folder is read-only for users, so learned and custom templates live in folder 1
|
|
37
|
-
or 2. A template name matches `^[A-Za-z0-9][A-Za-z0-9._-]*$`; any other string is rejected before the
|
|
38
|
-
disk is touched. `node "$SKILL_ROOT/scripts/compile-deck.js" --list-templates` prints every name the
|
|
39
|
-
search finds, and `--list-layouts <NAME>` prints each layout with its allowed blocks and its regions.
|
|
40
|
-
|
|
41
|
-
## 3. Package layout
|
|
12
|
+
An enrolled template lives in:
|
|
42
13
|
|
|
43
14
|
```
|
|
44
|
-
|
|
45
|
-
├── template.yaml
|
|
46
|
-
├── layout-mapping.yaml
|
|
47
|
-
└── capabilities.yaml
|
|
15
|
+
templates/enrolled/<TEMPLATE-NAME>/
|
|
16
|
+
├── template.yaml # Identity and global properties
|
|
17
|
+
├── layout-mapping.yaml # AST layout → template layout + regions
|
|
18
|
+
└── capabilities.yaml # Supported layouts, blocks, and constraints
|
|
48
19
|
```
|
|
49
20
|
|
|
50
|
-
|
|
51
|
-
`Template "<NAME>" is missing <file>`. Decoration images are not part of the folder: an `image`
|
|
52
|
-
decoration with `dir: azure` reads `assets/azure/<asset>` inside the skill, and one without `dir`
|
|
53
|
-
reads `assets/media/<asset>`. A learned template carries no image decorations.
|
|
54
|
-
|
|
55
|
-
## 4. YAML subset
|
|
56
|
-
|
|
57
|
-
The registry has its own small parser. Write plain block-style YAML:
|
|
21
|
+
### 1.1 `template.yaml`
|
|
58
22
|
|
|
59
|
-
|
|
60
|
-
- scalars: quoted or bare strings, numbers, `true`, `false`, `null`;
|
|
61
|
-
- flow lists of scalars such as `[title, body, image]` are read as lists;
|
|
62
|
-
- a flow mapping such as `{ font: "Brand Sans", size: 24 }` is read as one string, so every mapping
|
|
63
|
-
is written out in block style;
|
|
64
|
-
- quote every hex colour (`"#1D4ED8"`) and every font name that contains a space;
|
|
65
|
-
- a comment starts after whitespace and `#`; a `#` inside quotes stays;
|
|
66
|
-
- keys match `[\w][\w.-]*`; anchors, multi-line strings and tabs are unsupported.
|
|
23
|
+
Declares template identity and global properties.
|
|
67
24
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## 5. `template.yaml`
|
|
25
|
+
Required fields:
|
|
71
26
|
|
|
72
27
|
```yaml
|
|
73
|
-
name:
|
|
74
|
-
version: "1.0.0"
|
|
75
|
-
label: "
|
|
76
|
-
description: "Example template
|
|
28
|
+
name: MY-BRAND # Unique enrollment name (matches frontmatter)
|
|
29
|
+
version: "1.0.0" # Template contract version (semver)
|
|
30
|
+
label: "My Brand" # Human-readable label
|
|
31
|
+
description: "Example corporate template learned from a brand deck"
|
|
77
32
|
|
|
78
33
|
fonts:
|
|
79
34
|
title: "Brand Sans Bold"
|
|
@@ -81,254 +36,320 @@ fonts:
|
|
|
81
36
|
light: "Brand Sans Light"
|
|
82
37
|
|
|
83
38
|
dimensions:
|
|
84
|
-
width: 10.833
|
|
85
|
-
height: 7.5
|
|
86
|
-
unit: inches
|
|
87
|
-
format: "custom"
|
|
39
|
+
width: 10.833 # inches
|
|
40
|
+
height: 7.5 # inches (A4 landscape)
|
|
88
41
|
|
|
89
42
|
palette:
|
|
90
|
-
ink: "#
|
|
91
|
-
ink_muted: "#52606D"
|
|
43
|
+
ink: "#000000"
|
|
92
44
|
paper: "#FFFFFF"
|
|
93
|
-
line: "#
|
|
94
|
-
header_fill: "#
|
|
95
|
-
metric: "#
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
bullet_font: "Brand Sans Medium"
|
|
100
|
-
bullet_char: "•"
|
|
101
|
-
bullet_color: "1F2933"
|
|
102
|
-
section_accent: "1F2933"
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
| Key | Use |
|
|
106
|
-
|---|---|
|
|
107
|
-
| `name` | Matches the folder name and the deck's `template:` line; the loader falls back to the folder name |
|
|
108
|
-
| `version` | Contract version in semver; the loader falls back to `0.0.0` |
|
|
109
|
-
| `label`, `description` | Shown in listings |
|
|
110
|
-
| `fonts` | Title, body and light families; the font-swap logic reassigns them (see section 9) |
|
|
111
|
-
| `dimensions` | Canvas in inches; `format` is `16:9`, `4:3` or `custom` |
|
|
112
|
-
| `palette` | Free-form roles. The pack view reads `primary`, `primary_deep`, `ground`, `paper`, `tint`, `paper_warm`, `header_fill`, `ink`, `ink_muted`, `muted` and `line` when present, and falls back to neutral greys |
|
|
113
|
-
| `global_typography` | Default character spacing, bullet font, bullet character and colours (colours without `#` here) |
|
|
114
|
-
| `decoration_assets` | Informational map of image files; the render path reads the decoration elements instead |
|
|
115
|
-
| `pack` | Optional legacy-pack block, below |
|
|
116
|
-
|
|
117
|
-
The `pack` block opts a template into rich drawing:
|
|
118
|
-
|
|
119
|
-
```yaml
|
|
120
|
-
pack:
|
|
121
|
-
capabilities: [rich-blocks, recolor, font-swap, mesh-background]
|
|
122
|
-
tokens:
|
|
123
|
-
card:
|
|
124
|
-
pad: 0.30
|
|
45
|
+
line: "#E7E6E6"
|
|
46
|
+
header_fill: "#E7E6E6"
|
|
47
|
+
metric: "#003087"
|
|
48
|
+
positive: "#00AD1D"
|
|
49
|
+
negative: "#C00000"
|
|
50
|
+
trust: "#002554"
|
|
125
51
|
```
|
|
126
52
|
|
|
127
|
-
|
|
128
|
-
text regions), `recolor` (the `--accent <hex>` flag, or `accent:` in the frontmatter, derives a
|
|
129
|
-
contrast-safe palette and regenerates the gradient circles), `font-swap` (`--font pretendard` or
|
|
130
|
-
`--font a2z` reassigns the whole font system) and `mesh-background` (`--bg mesh` adds a generated
|
|
131
|
-
gradient ground). An absent block means plain regions only, and each flag is ignored by a template
|
|
132
|
-
that lacks its capability.
|
|
133
|
-
`tokens` overrides one geometry group at a time: `card`, `kpi`, `bullet`, `secHeader`, `summary`,
|
|
134
|
-
`toc`, `notice`. Both AZURE templates declare all four capabilities; the BOILERPLATE templates declare
|
|
135
|
-
none.
|
|
53
|
+
### 1.2 `layout-mapping.yaml`
|
|
136
54
|
|
|
137
|
-
|
|
55
|
+
Maps each AST layout type to template-specific regions with exact positions.
|
|
138
56
|
|
|
139
57
|
```yaml
|
|
140
58
|
layouts:
|
|
141
59
|
cover:
|
|
142
|
-
layout_source: none
|
|
143
60
|
decorations: cover
|
|
144
|
-
variants:
|
|
145
|
-
rule:
|
|
146
|
-
decorations: cover_rule
|
|
147
|
-
regions:
|
|
148
|
-
title:
|
|
149
|
-
x: 0.84
|
|
150
|
-
y: 2.60
|
|
151
|
-
w: 8.8
|
|
152
|
-
h: 1.6
|
|
153
|
-
font_role: cover_title
|
|
154
61
|
regions:
|
|
155
62
|
title:
|
|
156
|
-
x: 0.
|
|
157
|
-
y: 2.
|
|
158
|
-
w:
|
|
159
|
-
h:
|
|
63
|
+
x: 0.518
|
|
64
|
+
y: 2.665
|
|
65
|
+
w: 8.743
|
|
66
|
+
h: 0.740
|
|
160
67
|
font_role: cover_title
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
68
|
+
metadata:
|
|
69
|
+
x: 0.600
|
|
70
|
+
y: 3.898
|
|
71
|
+
w: 3.100
|
|
72
|
+
h: 1.227
|
|
73
|
+
font_role: cover_metadata
|
|
74
|
+
|
|
75
|
+
content:
|
|
76
|
+
decorations: body
|
|
77
|
+
regions:
|
|
78
|
+
title:
|
|
79
|
+
x: 0.394
|
|
80
|
+
y: 0.315
|
|
81
|
+
w: 8.110
|
|
82
|
+
h: 0.472
|
|
83
|
+
font_role: section_title
|
|
84
|
+
body:
|
|
85
|
+
x: 0.394
|
|
86
|
+
y: 1.044
|
|
87
|
+
w: 10.188
|
|
88
|
+
font_role: body_text
|
|
89
|
+
|
|
90
|
+
main:
|
|
91
|
+
decorations: body
|
|
92
|
+
regions:
|
|
93
|
+
title:
|
|
94
|
+
x: 0.394
|
|
95
|
+
y: 0.315
|
|
96
|
+
w: 8.110
|
|
97
|
+
h: 0.472
|
|
98
|
+
font_role: section_title
|
|
99
|
+
body:
|
|
100
|
+
x: 0.394
|
|
101
|
+
y: 1.044
|
|
102
|
+
w: 10.188
|
|
103
|
+
font_role: body_text
|
|
104
|
+
main_box:
|
|
105
|
+
x: 0.761
|
|
106
|
+
y: 5.691
|
|
107
|
+
w: 9.582
|
|
108
|
+
h: 0.757
|
|
109
|
+
border: { width: 2, color: "#000000", opacity: 0.99 }
|
|
110
|
+
font_role: body_text
|
|
111
|
+
|
|
112
|
+
summary:
|
|
113
|
+
decorations: body
|
|
114
|
+
regions:
|
|
115
|
+
title:
|
|
116
|
+
x: 0.394
|
|
117
|
+
y: 0.315
|
|
118
|
+
w: 8.110
|
|
119
|
+
h: 0.472
|
|
120
|
+
font_role: section_title
|
|
121
|
+
group_top:
|
|
122
|
+
x: 0.394
|
|
123
|
+
y: 1.044
|
|
124
|
+
w: 10.188
|
|
125
|
+
group_bottom:
|
|
126
|
+
x: 0.394
|
|
127
|
+
y: 3.863
|
|
128
|
+
w: 10.188
|
|
129
|
+
|
|
130
|
+
closing:
|
|
131
|
+
decorations: closing
|
|
132
|
+
regions:
|
|
133
|
+
title:
|
|
134
|
+
x: 0.745
|
|
135
|
+
y: 3.290
|
|
136
|
+
w: 9.344
|
|
137
|
+
h: 0.737
|
|
138
|
+
font_role: closing_title
|
|
139
|
+
align: center
|
|
165
140
|
```
|
|
166
141
|
|
|
167
|
-
###
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
`decorations:` map, `regions`, and optionally `variants`. A region is a rectangle with `x`, `y`, `w`
|
|
171
|
-
and usually `h`, plus these optional keys:
|
|
172
|
-
|
|
173
|
-
| Key | Meaning |
|
|
174
|
-
|---|---|
|
|
175
|
-
| `font_role` | Entry of `font_roles` in `capabilities.yaml` used for the text |
|
|
176
|
-
| `heading_role`, `sub_item_role` | Roles for a summary group's heading and its items |
|
|
177
|
-
| `font_role_header`, `font_role_data` | Roles for a table region (default `table_header`, `table_data`) |
|
|
178
|
-
| `align`, `valign` | Horizontal and vertical alignment; `valign` is `top`, `middle` or `bottom` |
|
|
179
|
-
| `autofit` | `resize` grows the frame to the text, `shrink` shrinks the text; any other value leaves it fixed |
|
|
180
|
-
| `border` | `width` and `color` of an outline, used by `main_box` |
|
|
181
|
-
|
|
182
|
-
### 6.2 Region names and the blocks they hold
|
|
183
|
-
|
|
184
|
-
| Region | Block it holds |
|
|
185
|
-
|---|---|
|
|
186
|
-
| `title` | `title` |
|
|
187
|
-
| `body` | `body` |
|
|
188
|
-
| `table` (content, summary), `kpi_table` (main) | `kpi-table` and `table` |
|
|
189
|
-
| `image` | `image` (several images share the region as a grid) |
|
|
190
|
-
| `main_box` | `main-box` |
|
|
191
|
-
| `key_message` | `key-message` |
|
|
192
|
-
| `figure_caption`, `table_caption` | the caption blocks, numbered across the deck |
|
|
193
|
-
| `group_top`, `group_bottom` | `summary-group`, by its position |
|
|
194
|
-
| `metadata`, `subtitle`, `eyebrow`, `date_line` | cover text, filled from the frontmatter |
|
|
195
|
-
|
|
196
|
-
On a cover, `date_line` joins `date` and `department` with two spaces, a bar and two spaces. Any other
|
|
197
|
-
cover region whose name equals a frontmatter key (`subtitle`, `eyebrow`) is filled from that key. A
|
|
198
|
-
slide's own `::: region name=<region>` line overrides the default mapping.
|
|
199
|
-
|
|
200
|
-
### 6.3 Decorations
|
|
201
|
-
|
|
202
|
-
`decorations.<key>.elements` is a list drawn behind the regions, in order. Element types:
|
|
203
|
-
|
|
204
|
-
| `type` | Keys |
|
|
205
|
-
|---|---|
|
|
206
|
-
| `image` | `asset`, optional `dir: azure`, `x`, `y`, `w`, `h`, `rotate` |
|
|
207
|
-
| `rect`, `roundRect`, `pill` | `x`, `y`, `w`, `h`, `fill`, `line`, `line_width`, `alpha`, `radius`, optional `text` with `size`, `bold`, `text_color` |
|
|
208
|
-
| `ellipse`, `ring` | `x`, `y`, `w`, `h`, `fill` or `line`, `line_width`, `alpha` |
|
|
209
|
-
| `text` | `text`, `x`, `y`, `w`, `h`, `size`, `color`, `align`, `valign`, `bold` |
|
|
210
|
-
| `line` | `x`, `y`, `w`, `color`, `width` |
|
|
211
|
-
| `confidential_mark` | `x`, `y`, `w`, `h`; draws a bordered Korean confidentiality label, styled by the `confidential_mark` font role |
|
|
212
|
-
| `disclaimer` | `x`, `y`, `w`, `h`, optional `text`; styled by the `disclaimer` font role |
|
|
213
|
-
|
|
214
|
-
A `slide_number` element is accepted in the file and the renderer draws nothing for it. Keep a
|
|
215
|
-
one-line `note:` on each element that explains why it exists; the loader ignores it.
|
|
216
|
-
|
|
217
|
-
## 7. `capabilities.yaml`
|
|
142
|
+
### 1.3 `capabilities.yaml`
|
|
143
|
+
|
|
144
|
+
Declares which AST constructs the template supports.
|
|
218
145
|
|
|
219
146
|
```yaml
|
|
220
|
-
supported_layouts:
|
|
147
|
+
supported_layouts:
|
|
148
|
+
- cover
|
|
149
|
+
- content
|
|
150
|
+
- main
|
|
151
|
+
- summary
|
|
152
|
+
- closing
|
|
153
|
+
|
|
221
154
|
supported_blocks:
|
|
222
155
|
cover: [title]
|
|
223
|
-
content: [title, body, image, notes, kpi-table
|
|
156
|
+
content: [title, body, image, notes, kpi-table]
|
|
157
|
+
main: [title, body, main-box, image, kpi-table]
|
|
158
|
+
summary: [title, summary-group]
|
|
224
159
|
closing: [title]
|
|
225
|
-
|
|
160
|
+
|
|
161
|
+
supported_body_items:
|
|
162
|
+
- bullet
|
|
163
|
+
- numbered
|
|
164
|
+
- section
|
|
165
|
+
|
|
226
166
|
font_roles:
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
167
|
+
cover_title: { font: "Brand Sans Bold", size: 33.45, char_spacing: -0.7, line_spacing: 1.0, align: left }
|
|
168
|
+
cover_metadata: { font: "Brand Sans Medium", size: 16.73, char_spacing: -0.7, line_spacing: 1.0, align: left }
|
|
169
|
+
section_title: { font: "Brand Sans Bold", size: 24, char_spacing: -0.7, line_spacing: 1.0, align: left }
|
|
170
|
+
body_text: { font: "Brand Sans Medium", size: 16, char_spacing: -0.7, line_spacing: 1.25, align: left }
|
|
171
|
+
section_header: { font: "Brand Sans Bold", size: 18, char_spacing: -0.7, line_spacing: 1.5, align: left }
|
|
172
|
+
numbered_item: { font: "Brand Sans Medium", size: 16, char_spacing: -0.7, align: left }
|
|
173
|
+
closing_title: { font: "Brand Sans Medium", size: 44, char_spacing: null, line_spacing: 0.9, align: center }
|
|
174
|
+
disclaimer: { font: "Brand Sans Light", size: 6, char_spacing: null, line_spacing: 1.0, align: left }
|
|
175
|
+
|
|
176
|
+
decoration_presets:
|
|
177
|
+
cover:
|
|
178
|
+
- { type: image, asset: image11.png, position: background_right }
|
|
179
|
+
- { type: image, asset: image12.png, position: top_left_logo }
|
|
180
|
+
- { type: confidential_mark }
|
|
181
|
+
- { type: disclaimer }
|
|
182
|
+
body:
|
|
183
|
+
- { type: line, color: "#00AE41", width: 1.5, y: 0.787 }
|
|
184
|
+
- { type: image, asset: image10.png, position: top_right_logo }
|
|
185
|
+
- { type: confidential_mark }
|
|
186
|
+
- { type: slide_number }
|
|
187
|
+
closing:
|
|
188
|
+
- { type: line, color: "#00823D", width: 6, y: 4.079, full_width: true }
|
|
189
|
+
- { type: image, asset: image9.png, position: top_right_logo }
|
|
239
190
|
```
|
|
240
191
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
192
|
+
## 2. Enrollment Validation
|
|
193
|
+
|
|
194
|
+
When a deck targets an enrolled template, the compiler MUST verify:
|
|
195
|
+
|
|
196
|
+
1. The template name exists in the enrollment directory.
|
|
197
|
+
2. Each slide layout is listed in `supported_layouts`.
|
|
198
|
+
3. Each block type is listed in `supported_blocks` for that layout.
|
|
199
|
+
4. Each body item type is listed in `supported_body_items`.
|
|
200
|
+
|
|
201
|
+
Violation of any check produces an error naming the specific unsupported construct, the slide index, and the template name.
|
|
202
|
+
|
|
203
|
+
## 3. Required Assets
|
|
204
|
+
|
|
205
|
+
Each enrolled template must provide or reference the following assets:
|
|
206
|
+
|
|
207
|
+
### 3.1 Image assets
|
|
208
|
+
|
|
209
|
+
Decoration presets in `capabilities.yaml` reference image files. These must exist in an `assets/` directory discoverable by the render adapter.
|
|
210
|
+
|
|
211
|
+
| Asset role | Purpose | Required |
|
|
212
|
+
|------------|---------|----------|
|
|
213
|
+
| `top_left_logo` | Cover slide logo (large, light version) | yes |
|
|
214
|
+
| `top_right_logo` | Body/closing slide logo (small, dark version) | yes |
|
|
215
|
+
| `background_right` | Cover slide right-side decorative image | cover layouts only |
|
|
216
|
+
| `background_full` | Optional full-slide background | no |
|
|
217
|
+
|
|
218
|
+
Asset files are placed in `templates/enrolled/<TEMPLATE-NAME>/assets/` or a shared `assets/` directory.
|
|
219
|
+
|
|
220
|
+
### 3.2 Font availability
|
|
221
|
+
|
|
222
|
+
All fonts declared in `template.yaml` and `capabilities.yaml` must be installed on the rendering machine. The enrollment contract does not bundle fonts — it assumes they are available system-wide.
|
|
223
|
+
|
|
224
|
+
For MY-BRAND, the required fonts are:
|
|
225
|
+
- `Brand Sans Bold` (1 space)
|
|
226
|
+
- `Brand Sans Medium` (2 spaces)
|
|
227
|
+
- `Brand Sans Light` (2 spaces)
|
|
228
|
+
|
|
229
|
+
### 3.3 Fixture decks
|
|
230
|
+
|
|
231
|
+
At minimum, two fixture Markdown decks must exist for regression testing:
|
|
232
|
+
|
|
233
|
+
- `tests/fixtures/decks/<template-name>-basic.md` — 5-slide deck (cover, content, main, summary, closing)
|
|
234
|
+
- `tests/fixtures/decks/<template-name>-complex.md` — deck with tables, images, and all supported block types
|
|
235
|
+
|
|
236
|
+
### 3.4 AST fixtures
|
|
237
|
+
|
|
238
|
+
Corresponding AST snapshot files must exist:
|
|
239
|
+
|
|
240
|
+
- `tests/fixtures/ast/<template-name>-basic.json`
|
|
241
|
+
- `tests/fixtures/ast/<template-name>-complex.json`
|
|
242
|
+
|
|
243
|
+
## 4. Adding a New Template (MY-BRAND-N)
|
|
244
|
+
|
|
245
|
+
To enroll a new template:
|
|
246
|
+
|
|
247
|
+
1. Create `templates/enrolled/MY-BRAND-N/` with all three YAML files.
|
|
248
|
+
2. Place required image assets in the assets directory.
|
|
249
|
+
3. Create fixture decks and AST snapshots (see §3.3–3.4).
|
|
250
|
+
4. Create mapping tests: `tests/test_template_example_N_mapping.js`.
|
|
251
|
+
5. Fill in all required fields from the YAML templates in §1.
|
|
252
|
+
6. Verify the enrollment by running:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
node --test tests/test_template_example_N_mapping.js
|
|
256
|
+
python -m pytest tests/test_template_regression.py -v
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
7. No changes to compiler code are required — the template registry discovers enrolled templates by directory scan.
|
|
260
|
+
|
|
261
|
+
## 5. Regression Gate
|
|
262
|
+
|
|
263
|
+
Before an enrolled template is considered production-ready, it must pass the regression gate:
|
|
264
|
+
|
|
265
|
+
### 5.1 Gate checks
|
|
266
|
+
|
|
267
|
+
| Gate | Tool | Pass criteria |
|
|
268
|
+
|------|------|---------------|
|
|
269
|
+
| Compilation | `compile-deck.js` | Both fixture decks compile without error |
|
|
270
|
+
| Dimensions | python-pptx | Slide width/height within 5000 EMU of declared dimensions |
|
|
271
|
+
| Slide count | python-pptx | Matches expected count per fixture |
|
|
272
|
+
| Hygiene | `validate_pptx.py` | `pass: true` (no hard failures) |
|
|
273
|
+
| Inventory | `layout_inventory.py --issues-only` | No overflow, overlap, or formatting issues |
|
|
274
|
+
| Content | python-pptx | Every slide has text content |
|
|
275
|
+
| Score baseline | `evaluate_pptx.py` | Composite score within 2 points of established baseline |
|
|
276
|
+
|
|
277
|
+
### 5.2 Baseline establishment
|
|
278
|
+
|
|
279
|
+
On first run, the regression harness records baseline scores to `tests/baselines/`. Subsequent runs compare against these baselines. A regression of more than 2 composite points triggers a failure.
|
|
280
|
+
|
|
281
|
+
To reset baselines (e.g., after intentional template changes):
|
|
289
282
|
|
|
290
283
|
```bash
|
|
291
|
-
|
|
284
|
+
rm tests/baselines/baseline_*.json
|
|
285
|
+
python -m pytest tests/test_template_regression.py -v
|
|
292
286
|
```
|
|
293
287
|
|
|
294
|
-
|
|
295
|
-
input: it requires a `.pptx` with `ppt/presentation.xml`, caps the package at 5000 entries and 500 MB
|
|
296
|
-
uncompressed, and rejects an entry with a compression ratio above 200. XML is parsed with
|
|
297
|
-
`defusedxml`.
|
|
288
|
+
### 5.3 Running the gate
|
|
298
289
|
|
|
299
|
-
|
|
290
|
+
```bash
|
|
291
|
+
# Full regression suite
|
|
292
|
+
python -m pytest tests/test_template_regression.py -v
|
|
300
293
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
294
|
+
# Node.js mapping tests (per template)
|
|
295
|
+
node --test tests/test_template_example_1_mapping.js
|
|
296
|
+
|
|
297
|
+
# Full verification pipeline
|
|
298
|
+
node --test tests/test_compile_deck.js tests/test_template_example_1_mapping.js
|
|
299
|
+
python -m pytest tests/test_template_regression.py -v
|
|
300
|
+
python validate_pptx.py test_output.pptx
|
|
301
|
+
python3 "$SKILL_ROOT/scripts/layout_inventory.py" test_output.pptx --issues-only
|
|
302
|
+
```
|
|
307
303
|
|
|
308
|
-
|
|
309
|
-
decoration lists, so logos and background art stay with the original deck and are added to the
|
|
310
|
-
template by hand.
|
|
304
|
+
## 6. Enrollment Review Checklist
|
|
311
305
|
|
|
312
|
-
|
|
306
|
+
Before approving enrollment, verify every item:
|
|
313
307
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
without the slot fails closed. Fix it by adding the missing theme colour to the source deck.
|
|
308
|
+
### 6.1 File completeness
|
|
309
|
+
- [ ] All three YAML files exist and are valid YAML.
|
|
310
|
+
- [ ] `template.yaml` has all required fields (name, version, label, fonts, dimensions, palette).
|
|
311
|
+
- [ ] `layout-mapping.yaml` has regions for every supported layout with numeric positions.
|
|
312
|
+
- [ ] `capabilities.yaml` lists supported layouts, blocks, body items, font roles, and decoration presets.
|
|
313
|
+
- [ ] Required image assets exist in the assets directory.
|
|
314
|
+
- [ ] Fixture decks and AST snapshots exist.
|
|
322
315
|
|
|
323
|
-
|
|
316
|
+
### 6.2 Contract correctness
|
|
317
|
+
- [ ] `font_roles` match the actual template typography exactly.
|
|
318
|
+
- [ ] `decoration_presets` reference assets that exist.
|
|
319
|
+
- [ ] `supported_blocks` per layout are accurate and complete.
|
|
320
|
+
- [ ] `supported_body_items` covers all bullet/numbering styles used.
|
|
321
|
+
- [ ] Position values (x, y, w, h) are accurate to within 0.01 inches.
|
|
324
322
|
|
|
325
|
-
|
|
326
|
-
|
|
323
|
+
### 6.3 Compiler independence
|
|
324
|
+
- [ ] No hardcoded values in compiler code reference this template.
|
|
325
|
+
- [ ] The template is discoverable by the registry via directory scan alone.
|
|
327
326
|
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
### 6.4 Regression gate
|
|
328
|
+
- [ ] Node.js mapping tests pass.
|
|
329
|
+
- [ ] Python regression tests pass (all 7 gates).
|
|
330
|
+
- [ ] Baseline scores are established and recorded.
|
|
331
|
+
- [ ] `validate_pptx.py` reports `pass: true` on compiled output.
|
|
330
332
|
|
|
331
|
-
|
|
333
|
+
## 7. Enrollment File Format Rules
|
|
334
|
+
|
|
335
|
+
- YAML files use 2-space indentation.
|
|
336
|
+
- Positions are in inches (convert from EMU: `inches = EMU / 914400`).
|
|
337
|
+
- Font sizes are in points.
|
|
338
|
+
- Color values are hex strings without `#` prefix where used in code, with `#` prefix in YAML.
|
|
339
|
+
- Asset filenames reference files in the `assets/` directory.
|
|
340
|
+
|
|
341
|
+
## Variants and the open layout set (spec v2)
|
|
342
|
+
|
|
343
|
+
A template may declare any layout name matching `^[a-z][a-z0-9-]*$`. When it declares a
|
|
344
|
+
layout but publishes no `supported_blocks` entry for it, the allowed blocks are derived
|
|
345
|
+
from the regions that layout declares, so adding a layout does not mean editing a table
|
|
346
|
+
in the resolver.
|
|
347
|
+
|
|
348
|
+
`free` needs no declaration at all. It means "this slide uses no template region", so
|
|
349
|
+
every template supports it by construction; a template that declares its own `free`
|
|
350
|
+
layout still wins.
|
|
351
|
+
|
|
352
|
+
A **variant** is declared under the layout it belongs to:
|
|
332
353
|
|
|
333
354
|
```yaml
|
|
334
355
|
layouts:
|
|
@@ -345,61 +366,17 @@ layouts:
|
|
|
345
366
|
h: 2.6
|
|
346
367
|
font_role: cover_title
|
|
347
368
|
regions:
|
|
348
|
-
title:
|
|
349
|
-
x: 0.84
|
|
350
|
-
y: 1.55
|
|
351
|
-
w: 7.4
|
|
352
|
-
h: 1.85
|
|
353
|
-
font_role: cover_title
|
|
369
|
+
title: { ... }
|
|
354
370
|
```
|
|
355
371
|
|
|
356
|
-
`decorations` names another entry
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
3. Place image assets and point `dir` / `asset` at them.
|
|
368
|
-
4. Write two fixture decks: a 5-slide deck (cover, content, main, summary, closing) and a deck that
|
|
369
|
-
uses a table, an image and every block the template supports.
|
|
370
|
-
5. Run the gate below on both. No compiler change is needed.
|
|
371
|
-
|
|
372
|
-
## 13. Verification gate
|
|
373
|
-
|
|
374
|
-
| Gate | Tool | Pass condition |
|
|
375
|
-
|---|---|---|
|
|
376
|
-
| Discovery | `compile-deck.js --list-templates` and `--list-layouts <NAME>` | The name and every layout appear with the expected blocks |
|
|
377
|
-
| Compilation | `compile-deck.js <fixture>.md --template <NAME> --pptx out.pptx` | Both fixtures compile |
|
|
378
|
-
| Canvas | python-pptx | Slide width and height within 5000 EMU of `dimensions` |
|
|
379
|
-
| Slide count | python-pptx | Matches the fixture |
|
|
380
|
-
| Hygiene | `scripts/validate_pptx.py out.pptx` | `pass: true` |
|
|
381
|
-
| Inventory | `scripts/layout_inventory.py out.pptx --issues-only` | No overflow, overlap or off-slide shape |
|
|
382
|
-
| Honest gate | `scripts/qa_deck.py out.pptx` | Exit 0 |
|
|
383
|
-
| Look | `scripts/render_pages.py out.pptx --out-dir renders --pages 5` | Pages open and show no clipped or empty region |
|
|
384
|
-
|
|
385
|
-
## 14. Review checklist
|
|
386
|
-
|
|
387
|
-
File completeness:
|
|
388
|
-
- [ ] Three YAML files parse and use the subset in section 4.
|
|
389
|
-
- [ ] `template.yaml` carries name, version, label, fonts, dimensions and palette.
|
|
390
|
-
- [ ] Every supported layout has numeric regions.
|
|
391
|
-
- [ ] Referenced image assets exist.
|
|
392
|
-
- [ ] Both fixture decks exist.
|
|
393
|
-
|
|
394
|
-
Contract correctness:
|
|
395
|
-
- [ ] `font_roles` match the real typography.
|
|
396
|
-
- [ ] `supported_blocks` per layout is accurate and complete.
|
|
397
|
-
- [ ] Region positions match the source within 0.01 in.
|
|
398
|
-
- [ ] Per-weight families set `no_bold_on_bold_fonts: true` and `bold: false` on every role.
|
|
399
|
-
|
|
400
|
-
Compiler independence:
|
|
401
|
-
- [ ] The template appears in `--list-templates` from directory scanning alone.
|
|
402
|
-
- [ ] No compiler file mentions the template's name.
|
|
403
|
-
|
|
404
|
-
Gate:
|
|
405
|
-
- [ ] Every row of section 13 passes on both fixtures.
|
|
372
|
+
`decorations` names another entry in the top-level `decorations:` map. `regions` is
|
|
373
|
+
merged over the layout's own, and exists because new furniture displaces content: a
|
|
374
|
+
split cover needs a narrower title than a full-bleed one, and shipping the two apart
|
|
375
|
+
guarantees they drift.
|
|
376
|
+
|
|
377
|
+
**Move the region whenever you move the thing it sits on.** A date pill relocated
|
|
378
|
+
without its `date_line` region leaves white text on a white ground — which the contrast
|
|
379
|
+
check will fail, but only after someone renders the deck.
|
|
380
|
+
|
|
381
|
+
Placement blocks (`box`, `shape`, `columns`) and `notes` are allowed in every layout and
|
|
382
|
+
need no capability entry, since they do not depend on a region existing.
|