Skip to content

feat(skills): prompt expansion overhaul — always enrich, require design.md#542

Closed
vanceingalls wants to merge 4 commits intomainfrom
vance/prompt-expansion-v2
Closed

feat(skills): prompt expansion overhaul — always enrich, require design.md#542
vanceingalls wants to merge 4 commits intomainfrom
vance/prompt-expansion-v2

Conversation

@vanceingalls
Copy link
Copy Markdown
Collaborator

Summary

  • Require design.md before prompt expansion (Step 0a)
  • Always run prompt expansion, not gated on sparseness
  • Expansion always enriches — never pass-through
  • Move decorative rule to single source in house-style

Stack: 1/3

vanceingalls and others added 4 commits April 28, 2026 16:05
Make design.md a prerequisite for every composition, not an optional
picker step. Step 0a is now "Design system" and must complete before
prompt expansion (Step 0b), because expansion output is supposed to
cite design.md's palette, typography, and motion energy — expanding
first produces generic breakdowns the downstream agents then ignore.

Resolution order for design.md:
1. Existing design.md in project root → use as-is
2. Invoke /visual-style skill in Create mode → save output to design.md
3. references/design-picker.md (fallback if user prefers pre-built)
4. house-style.md defaults (only with explicit "skip design")

Also expand prompt-expansion.md's scene-breakdown spec to require
2–5 decoratives per scene drawn from house-style's list, each using
design.md's palette values. Spells out that "single ambient motion"
means one looping motion applied to these decoratives, not one
element total — this was the p1 regression root cause in the eval run.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Prompt-expansion.md was re-stating house-style rules in its scene
breakdown and negative-prompt sections. That's duplication — if
house-style changes, expansion drifts. Fix:

- Prerequisites now tell the expansion step to read house-style.md
  and design.md before generating. The expansion generates output
  that conforms to those rules; it doesn't re-state them.
- Scene breakdown template names the three layer slots
  (background/midground/foreground) without re-stating the
  decorative-count rule or palette-compliance rule.
- Negative-prompt no longer hard-codes palette/font rules — those
  live in design.md and house-style.md where they belong.
- The "single ambient motion doesn't mean single element"
  clarification moves to house-style.md where the base rule lives,
  so any reader sees it next to the rule it clarifies.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Expansion is not about lengthening a short prompt — it's about
grounding the user's intent against design.md and house-style.md
and producing a consistent intermediate that every downstream
agent reads the same way.

Even a fully-detailed user prompt benefits:
- Color words ("warm", "cinematic") → resolved to design.md hex values
- Decorative layers the user forgot → added explicitly per house-style
- Vague transitions → specified as morph operations with duration/ease
  tied to design.md energy
- Per-scene timing → verified to sum to stated total

The eval showed p5 (fully-expanded brief) skipping this step and
missing the benefit. When expansion runs on an already-expanded
prompt, it's mostly pass-through, but it still binds the prompt to
design.md and house-style — which is the contract downstream steps
depend on.

Single-scene compositions and trivial edits are the only exceptions.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The p2 eval (sparse prompt, 6 scenes) was dense and alive because
expansion had to invent atmosphere and micro-details to fill in
the 1-sentence input. The scene subagents then built from that
rich spec.

p3/p5/p6 (detailed prompts) produced muted output because the
expansion was framed as "largely pass-through" for already-detailed
inputs. Scene subagents got a thin brief and built thin output.

Make expansion always enrich, never pass-through:

- Every user prompt is a *seed*, not a spec. Expansion takes what
  the user wrote and adds atmosphere, ambient motion, micro-details.
  User's content stays; expansion builds on top.
- Scene-by-scene breakdown now enumerates 5 required fields per
  scene: background (2-5 decoratives with ambient motion), midground,
  foreground, micro-details (2-3 per scene: registration marks, tick
  indicators, monospace labels, background data streams, grid
  patterns), transition morph.
- Framing note: the quality gap between a single-pass composition
  and a multi-scene-pipeline composition comes from this step. If
  expansion front-loads the richness, every scene subagent builds
  from a rich brief; every scene comes out alive.

Addresses user feedback after the eval review: "the only significant
difference I see is in p2" — because p2 was the only case where
expansion had to enrich. Making enrichment mandatory everywhere.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.

1 participant