choice-resolution
Skill7 starsChanged 10 months agoMITView on GitHub
Unified resolution pipeline for merging parallel choice layers (recipe, emotion, brand, platform) into deterministic animation parameters. Use when generating animations with multiple conflicting inputs or when ensuring video/web timing consistency.
In this repository87 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- motion-designSkill
- 3d-transformsSkill
- accessibilitySkill
- android-nativeSkill
- animation-recipesSkill
- anticipationSkill
- arc-motionSkill
- attention-choreographySkill
- attentionSkill
- audio-reactiveSkill
- blurSkill
- brand-animationSkill
- cameraSkill
- characterSkill
- cinematicSkill
- code-generationSkill
- colorSkill
- component-animationsSkill
- compositingSkill
- consequenceSkill
- container-transformSkill
- css-advancedSkill
- data-visualizationSkill
- depthSkill
- distortionSkill
- dramaturgySkill
- durationSkill
- easingSkill
- emotional-journeySkill
- emotion-mappingSkill
- emotion-selectionSkill
- empty-statesSkill
- entrance-patternsSkill
- exaggerationSkill
- exit-patternsSkill
- exportSkill
- figma-integrationSkill
- follow-throughSkill
- frame-timingSkill
- gesture-motionSkill
- glow-shadowSkill
- intentSkill
- ios-nativeSkill
- loading-statesSkill
- loopingSkill
- lottieSkill
- masksSkill
- microstateSkill
- morphingSkill
- motion-auditSkill
- motion-blurSkill
- motion-principlesSkill
- motion-specsSkill
- narrative-arcSkill
- notificationsSkill
- onboardingSkill
- opacitySkill
- orchestratorSkill
- particlesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 94
When multiple emotions are specified, blend using weighted average:
- Distinctive: line 181
Prefer immediate content start (no intro delay)
- Distinctive: line 182
Use 3-frame minimum (100ms at 30fps)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Choice Resolution
Resolves conflicting animation parameters from multiple sources into a single, deterministic output. Transforms parallel choice systems into a sequential resolution pipeline.
The Problem
Without unified resolution:
- Emotion multipliers stack without bounds (1.2 × 1.4 = 1.68 → exceeds M3's 600ms max)
- Brand "elegant" and emotion "playful" produce contradictory squash-stretch values
- Video timing rules exist separately from the main choice pipeline
- Same inputs can produce different outputs depending on evaluation order
Resolution Pipeline
Recipe (base) → Emotion (modifier) → Brand (constraint) → Platform (adaptation) → Bounds → Accessibility (override)Each layer has a specific role:
| Layer | Role | Operation |
| Recipe | Base | Starting values (duration, easing, principles) |
| Emotion | Modifier | Multiplicative adjustments |
| Brand | Constraint | Upper bounds, feature restrictions |
| Platform | Adaptation | Platform-specific multipliers |
| Bounds | Clamp | Final M3-compliant range enforcement |
| Accessibility | Override | Reduced motion bypasses everything |
Resolution Algorithm
function resolveChoice(
recipe: Recipe,
emotions: WeightedEmotion[],
brand: Brand,
platform: Platform,
context: Context
): ResolvedSpec {
// 1. Start with recipe base
let duration = recipe.duration;
let easing = recipe.easing;
let exaggeration = recipe.exaggeration ?? 1.0;
let squashStretch = recipe.squashStretch ?? "none";
let secondaryEffects = recipe.secondaryEffects ?? [];
// 2. Blend emotions if multiple provided
const blendedEmotion = blendEmotions(emotions);
// 3. Apply blended emotion as modifier
if (blendedEmotion) {
duration *= blendedEmotion.durationMultiplier;
easing = blendedEmotion.easing ?? easing;
exaggeration *= blendedEmotion.exaggerationBoost ?? 1.0;
squashStretch = blendedEmotion.squashStretch ?? squashStretch;
secondaryEffects = mergeEffects(secondaryEffects, blendedEmotion.effects);
}
// 4. Apply brand as constraint
if (brand) {
exaggeration = Math.min(exaggeration, EXAGGERATION_LEVELS[brand.maxExaggeration]);
if (!brand.allowsSquashStretch) {
squashStretch = "none";
}
if (!brand.allowsParticles) {
secondaryEffects = secondaryEffects.filter(e => e.type !== "particles");
}
}
// 5. Apply platform adaptation
duration *= platform.durationMultiplier;
// 6. Clamp to bounds
duration = clamp(duration, platform.minDuration, platform.maxDuration);
exaggeration = clamp(exaggeration, 0, 1.25);
// 7. Accessibility override
if (context.reducedMotion) {
return recipe.reducedMotion ?? DEFAULT_REDUCED_MOTION;
}
return { duration, easing, exaggeration, squashStretch, secondaryEffects };
}Emotion Blending
When multiple emotions are specified, blend using weighted average:
function blendEmotions(emotions: WeightedEmotion[]): BlendedEmotion {
if (emotions.length === 0) return null;
if (emotions.length === 1) return emotions[0].emotion;
// Normalize weights
const totalWeight = emotions.reduce((sum, e) => sum + e.weight, 0);
const normalized = emotions.map(e => ({ ...e, weight: e.weight / totalWeight }));
// Numeric values: weighted average
const durationMultiplier = normalized.reduce(
(sum, e) => sum + e.emotion.durationMultiplier * e.weight, 0
);
// Discrete values: use dominant emotion
const dominant = normalized.reduce((a, b) => a.weight > b.weight ? a : b);
const easing = dominant.emotion.easing;
const spring = dominant.emotion.spring;
// Effects: union if either enables
const effects = mergeEffects(
...normalized.map(e => e.emotion.secondaryEffects)
);
return { durationMultiplier, easing, spring, effects };
}Merge Rules by Parameter
| Parameter | Merge Type | Description |
duration | multiply | Recipe × emotion × platform, then clamp |
easing | override | Emotion > recipe (if specified) |
spring | override | Emotion > recipe (if specified) |
exaggeration | multiply-cap | Recipe × emotion, capped by brand |
squash-stretch | minimum | More conservative of emotion/brand |
secondary-effects | union-filter | Combine all, remove brand-forbidden |
Platform Multipliers
| Platform | Duration | Max | Notes |
| Web | 1.0× | 600ms | M3 baseline |
| Video | 0.6× | 400ms | Faster for engagement |
| Mobile | 1.1× | 500ms | Touch feedback needs |
| Low-end | 0.8× | 400ms | Performance priority |
Brand Constraints
| Brand | Max Exaggeration | Squash | Particles | Bounce |
| elegant | subtle | ✗ | ✗ | ✗ |
| professional | subtle | ✗ | ✗ | ✗ |
| friendly | moderate | ✓ | ✓ | ✓ |
| playful | expressive | ✓ | ✓ | ✓ |
| bold | expressive | ✓ | ✓ | ✓ |
Worked Example
Input:
- Recipe:
success-notification(duration: 300ms, spring-bouncy) - Emotion:
celebratory(1.2× duration, expressive exaggeration) - Brand:
professional(max subtle, no particles) - Platform:
video(0.6×)
Resolution:
1. Recipe base: 300ms, spring-bouncy, exaggeration=1.0
2. + Emotion: 300 × 1.2 = 360ms, expressive → 1.0
3. + Brand cap: exaggeration capped to subtle (0.5), no particles
4. + Platform: 360 × 0.6 = 216ms
5. + Bounds: 216ms (within 50-400ms) ✓
6. Accessibility: Not reduced motion, proceed
Final: 216ms, spring-bouncy, exaggeration=0.5, no particlesVideo-Specific Rules
When platform === "video":
- Apply 0.6× duration multiplier
- Enforce 400ms maximum
- Prefer immediate content start (no intro delay)
- Use 3-frame minimum (100ms at 30fps)
- Never auto-trigger celebrations
Validation Checklist
After resolution, verify:
- Duration within platform bounds (50-600ms web, 50-400ms video)
- Exaggeration between 0 and 1.25
- No brand-forbidden features present
- Reduced motion respected if enabled
- Same inputs produce same outputs (deterministic)
Related Skills
animation-recipes- Recipe definitionsemotion-mapping- Emotion parameter setsplatform-adaptation- Platform-specific adjustmentsaccessibility- Reduced motion handling
See references/resolution-examples.md for additional worked examples.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

