feat(morph-ppt-3d): add Phase 6 user iteration with stable ID addressing#58
feat(morph-ppt-3d): add Phase 6 user iteration with stable ID addressing#58ringringlin wants to merge 2 commits intoiOfficeAI:mainfrom
Conversation
- Add Phase 6 covering common user adjustment requests (angle, size, position, content) - Use name-based addressing (@name=...) instead of fragile index paths Example: /slide[3]/model3d[@name="!!model-hero"] survives shape reordering - Document minimum officecli version (1.0.39) and recommended (1.0.43+) - Provide quick reference tables for camera angles and size tiers - Aligns with the new Stable ID Addressing section in root SKILL.md
There was a problem hiding this comment.
Pull request overview
Adds a new “Phase 6: Iterate (user adjustments)” section to the morph-ppt-3d skill documentation, aiming to guide post-generation fine-tuning and to prefer stable selectors over fragile positional indices.
Changes:
- Adds minimum/recommended
officecliversion notes to the skill header. - Localizes and expands the model discovery flow examples (including a “built-in model” fallback).
- Introduces Phase 6 iteration guidance, including “stable” addressing examples and quick reference tables (angles / size tiers).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| This skill **extends** `morph-ppt`. All morph-ppt rules (naming, ghosting, design, verification) apply in full. | ||
| This file covers **3D-specific additions** and an **enriched design system** combining morph-ppt aesthetics with concrete color palettes, font pairings, and layout quality guardrails. | ||
|
|
||
| **Minimum officecli version:** `1.0.39` (3D bounding box auto-computation fix). Recommended: `1.0.43+` for stable name-based addressing in Phase 6 user adjustments. |
There was a problem hiding this comment.
The version requirements are inconsistent: the header recommends officecli 1.0.43+ for stable name-based addressing, but Phase 6 labels it as officecli 1.0.33+. Please align these (and ensure the stated minimum/recommended versions match the actual feature availability).
| **Minimum officecli version:** `1.0.39` (3D bounding box auto-computation fix). Recommended: `1.0.43+` for stable name-based addressing in Phase 6 user adjustments. | |
| **Minimum officecli version:** `1.0.39` (required for the 3D bounding box auto-computation fix). **Recommended:** `1.0.43+` whenever later user-adjustment phases rely on stable name-based addressing. |
| **Built-in models** (bundled with the skill, no download needed): | ||
|
|
||
| | Model | Path | Best for | | ||
| | ---------------- | ------------------ | ----------------------- | | ||
| | Shiba Inu (柴犬) | `models/shiba.glb` | 可爱/宠物/品牌/通用演示 | | ||
|
|
||
| ```bash | ||
| # Copy built-in model to working directory | ||
| # The model is bundled at: skills/morph-ppt-3d/models/shiba.glb (relative to officecli repo root) | ||
| cp "$(dirname "$0")/models/shiba.glb" ./model.glb 2>/dev/null || \ |
There was a problem hiding this comment.
This section claims a bundled model at skills/morph-ppt-3d/models/shiba.glb, but that file/path does not exist in the repository. Either add the asset to the PR (and document its license) or remove/replace the built-in model instructions so users don’t hit a dead end.
| # The model is bundled at: skills/morph-ppt-3d/models/shiba.glb (relative to officecli repo root) | ||
| cp "$(dirname "$0")/models/shiba.glb" ./model.glb 2>/dev/null || \ |
There was a problem hiding this comment.
The copy command uses $(dirname "$0"), which only works inside a script file; in an interactive shell $0 is typically the shell path, so this will fail and silently fall back to downloading the Duck sample. Please update the snippet to use a deterministic path (e.g., relative to the repo root / current working directory), or explicitly present it as a build-script-only snippet.
| # The model is bundled at: skills/morph-ppt-3d/models/shiba.glb (relative to officecli repo root) | |
| cp "$(dirname "$0")/models/shiba.glb" ./model.glb 2>/dev/null || \ | |
| # Run from the officecli repo root; the bundled model is at: | |
| # skills/morph-ppt-3d/models/shiba.glb | |
| cp "skills/morph-ppt-3d/models/shiba.glb" ./model.glb 2>/dev/null || \ |
| Users will often want to fine-tune after seeing the result. **Use stable name-based addressing instead of indexed paths** to avoid errors when shape order changes. | ||
|
|
||
| #### Stable ID Addressing (officecli 1.0.33+) | ||
|
|
||
| Instead of fragile index paths like `/slide[3]/model3d[1]`, use name-based selectors: | ||
|
|
||
| ```bash | ||
| # ✅ RECOMMENDED — name-based (stable, won't break if shapes are added/removed) | ||
| officecli set deck.pptx '/slide[3]/model3d[@name="!!model-hero"]' --prop roty=120 | ||
|
|
||
| # ⚠️ FRAGILE — index-based (breaks when shape order changes) | ||
| officecli set deck.pptx '/slide[3]/model3d[1]' --prop roty=120 | ||
| ``` |
There was a problem hiding this comment.
/slide[3]/model3d[@name="!!model-hero"] addressing is not supported by the current PPT path resolver: ResolveIdPath only resolves @name/@id for shape/picture/table/chart/etc., and Set only accepts /slide[N]/model3d[M] (numeric index). As written, these Phase 6 commands will error with “Unknown element type 'model3d' for @name= addressing”. Either change the documentation to use index-based /model3d[1] (given the ‘exactly one model3d per slide’ rule), or add first-class model3d[@name=...] support in the CLI before documenting it here.
| officecli set deck.pptx '/slide[3]/model3d[1]' --prop roty=120 | ||
| ``` | ||
|
|
||
| The 3D model is always named `!!model-hero` on every slide (per Morph requirement), so `@name="!!model-hero"` always works. |
There was a problem hiding this comment.
This line states the fixed name !!model-hero is a “Morph requirement”, but Morph only requires consistent names across adjacent slides—not a specific name. Suggest rephrasing to clarify this is a convention of this skill/template (and, separately, note the current CLI limitation that prevents selecting model3d by @name).
Summary
This PR makes two changes to morph-ppt-3d:
1. Re-register
morph-ppt-3din rootSKILL.mdskill registryThe entry was added in a previous PR but got dropped when the root
SKILL.mdwas rewritten. Re-adding it so other agents can discover this skill via theSpecialized Skillstable.2. Add Phase 6 (user iteration) with stable ID addressing
Leverages the Stable ID Addressing feature already documented in root
SKILL.md. Covers the most common user adjustment scenarios after seeing the generated PPT.Files changed
SKILL.md— addmorph-ppt-3drow to Specialized Skills tableskills/morph-ppt-3d/SKILL.md— add Phase 6 with stable ID addressing + quick reference tables + version requirementsWhy the registry change matters
Without the root
SKILL.mdentry, agents loading officecli cannot discovermorph-ppt-3d. They would have to manually browseskills/or be told about it explicitly.Why Phase 6 matters
After 3D PPT generation, users often want to fine-tune:
Old approach used positional indices like
model3d[1], which break if shape order changes. New approach uses stable name-based addressing:Test plan
morph-ppt-3dappears inSKILL.mdSpecialized Skills table