Skip to content

feat(morph-ppt-3d): add Phase 6 user iteration with stable ID addressing#58

Open
ringringlin wants to merge 2 commits intoiOfficeAI:mainfrom
ringringlin:ringringlin/feat/morph-ppt-3d-stable-id
Open

feat(morph-ppt-3d): add Phase 6 user iteration with stable ID addressing#58
ringringlin wants to merge 2 commits intoiOfficeAI:mainfrom
ringringlin:ringringlin/feat/morph-ppt-3d-stable-id

Conversation

@ringringlin
Copy link
Copy Markdown
Contributor

@ringringlin ringringlin commented Apr 14, 2026

Summary

This PR makes two changes to morph-ppt-3d:

1. Re-register morph-ppt-3d in root SKILL.md skill registry

The entry was added in a previous PR but got dropped when the root SKILL.md was rewritten. Re-adding it so other agents can discover this skill via the Specialized Skills table.

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 — add morph-ppt-3d row to Specialized Skills table
  • skills/morph-ppt-3d/SKILL.md — add Phase 6 with stable ID addressing + quick reference tables + version requirements

Why the registry change matters

Without the root SKILL.md entry, agents loading officecli cannot discover morph-ppt-3d. They would have to manually browse skills/ or be told about it explicitly.

Why Phase 6 matters

After 3D PPT generation, users often want to fine-tune:

  • "这页模型角度不对" — change roty/rotx
  • "模型太大了" — change width/height
  • "挪一下位置" — change x/y

Old approach used positional indices like model3d[1], which break if shape order changes. New approach uses stable name-based addressing:

# Before (fragile)
officecli set deck.pptx '/slide[3]/model3d[1]' --prop roty=120

# After (stable across shape edits)
officecli set deck.pptx '/slide[3]/model3d[@name="!!model-hero"]' --prop roty=120

Test plan

  • Verify morph-ppt-3d appears in SKILL.md Specialized Skills table
  • Verify Phase 6 commands work with officecli 1.0.43+
  • Verify name-based selectors resolve correctly after shape additions/removals

- 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
Copilot AI review requested due to automatic review settings April 14, 2026 03:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 officecli version 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.
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
**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.

Copilot uses AI. Check for mistakes.
Comment on lines +165 to +174
**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 || \
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +173 to +174
# 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 || \
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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 || \

Copilot uses AI. Check for mistakes.
Comment on lines +568 to +580
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
```
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/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.

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants