Interaction Design Specification Document Generation
Core Principles
Interaction specifications are the constitution of user experience
Interaction design specifications ensure that every interaction behavior in the product has a consistent, predictable, and accessible experience. Specifications are not about limiting creativity, but about guaranteeing the baseline quality of foundational experiences, allowing designers to focus on innovation rather than repeatedly defining basic interactions.
Interaction Mode
AI->Human AI suggests, human approves
Input
| Input Item |
Type |
Required |
Source |
Description |
| User Flow |
JSON |
Yes |
design-userflow |
User flow diagrams, state transitions, decision nodes |
| Prototype Specification |
JSON |
Yes |
design-prototype |
Prototype design, interaction annotations, component specifications |
| Design Handoff Document |
markdown |
No |
design-handoff-spec |
Design tokens, component specifications, responsive breakpoints |
| Brand Guidelines |
text |
No |
User input |
Brand tone, animation style preferences |
Degradation Strategy
| Missing Upstream Input |
Degradation Plan |
Output Impact |
Data Acquisition Instructions |
| User flow missing |
Derive interaction flow from prototype |
Flow pending confirmation, interaction state machine may be less complete |
Request user to describe user tasks and flow, or upload design-userflow output file |
| Prototype specification missing |
Generate interaction spec framework based on user flow |
Pending prototype validation, component interaction specs may be less precise |
Request user to describe page layouts and components, or upload design-prototype output file |
| Design handoff document missing |
Interaction spec uses independent numbering |
Subsequent alignment with handoff document needed, token references may be inconsistent |
Request user to provide design tokens and component specs, or upload design-handoff-spec output file |
| Brand guidelines missing |
Adopt neutral interaction style |
Pending brand confirmation, animation style may need adjustment |
Request user to provide brand tone and animation style preferences |
Execution Steps
Step 1: Interaction State Machine Definition [Core]
Define interaction state machines for each core component and page:
- State Enumeration: Default / Hover / Active / Focus / Disabled / Loading / Error / Empty / Success
- State Transition Table: Trigger conditions, transition actions, transition intents
- State Priority: Priority rules when multiple states overlap (e.g., Disabled + Error)
- State Persistence: Rules for transient vs. persistent state retention
Step 2: Animation and Transition Intents [Core]
Define the intents of animations and transitions in the product; specific implementation parameters are determined by UI Skill (ext-interaction-design + page-builder) based on visual_direction:
- Transition Intents (does not define specific easing functions or durations):
- General transitions: Should feel natural and smooth
- Enter animations: Should have a deceleration feel, elements approaching from a distance
- Exit animations: Should have an acceleration feel, elements moving away into the distance
- Frequent toggles: Should be crisp and decisive, no lingering
- Animation Intent Standards (does not define specific millisecond values):
- Micro-interactions (button feedback, toggle switches): Should be immediately perceptible
- Small transitions (dropdown expand, lightweight feedback): Should complete quickly
- Large transitions (page switches, modals): Should have rhythm
- Complex animations (data visualization, 3D transforms): Should have narrative quality
- Animation Performance: Only use transform and opacity; avoid triggering layout and paint
- Reduced Motion:
prefers-reduced-motion adaptation rules
Step 3: Gesture and Operation Intents [Core]
Define intents and constraints for gesture operations across platforms; specific thresholds are determined by UI Skill based on platform specifications and visual_direction:
- Tap/Press:
- Touch targets should meet platform accessibility standards (iOS/Android/Web each have specifications)
- Long-press operations need haptic or visual feedback
- Double-tap operations need a reasonable time window
- Swipe/Drag:
- Swipe operations should have reasonable trigger sensitivity (avoid accidental triggers)
- Swipes should have inertia and deceleration effects
- Edge swipes must preserve system gestures
- Pinch/Rotate:
- Zoom range should have reasonable upper and lower limits
- Rotation operations should have snap assist
- Keyboard Operations:
- Tab order and focus management rules
- Keyboard shortcut mapping table
- Enter/Space activation rules
Step 4: Feedback Mechanism Specification [Core]
Define feedback standards for user operations:
- Immediate Feedback:
- After user operation, immediately perceive that the system has received it
- Button pressed state, link hover state
- Input field focus state, toggle switch state
- Progress Feedback:
- Long operations need to provide progress awareness
- Loading states need visual placeholders to avoid page jumps
- Quantifiable operations like upload/download need progress indicators
- Result Feedback (after operation completion):
- Success: Operation results must be clearly fed back to users; success state must be distinguishable
- Warning: Must attract user attention but not block operations; users must be able to actively confirm or wait for auto-dismissal
- Error: Error state must be clearly distinguishable from normal state; users must be able to quickly identify and understand the error cause
- Information: Must provide supplementary explanation without interfering with the main flow
- No Feedback Scenarios: Explicitly list operations that don't need feedback and the reasons
Step 5: Exception State Interactions [Core]
Define interaction handling for exception scenarios:
- Network Error: Must clearly inform users that the network is unavailable, provide retry opportunity and locally available content
- Empty Data: Must avoid blank pages, provide ways to guide users to generate content
- Insufficient Permissions: Must explain permission restriction reasons, provide ways to apply or alternative operations
- Data Overflow: Must reasonably display truncated content, provide ways to view complete content
- Concurrent Conflicts: Must detect and inform of conflicts, provide user decision paths
Step 6: Accessibility Interaction Specification [Core]
Ensure interactions meet accessibility standards:
- WCAG 2.1 AA Compliance:
- Perceivable: Text alternatives, time-based media alternatives, adaptability, distinguishability
- Operable: Keyboard operable, sufficient time, seizure safety, navigability
- Understandable: Readability, predictability, input assistance
- Robust: Compatible with assistive technologies
- Focus Management: Focus trap (Modal), focus restoration (after closing Modal), focus order
- ARIA Labels: Role (role), state (aria-state), property (aria-property) usage specifications
- Screen Readers: Read-aloud text and read-aloud order for key interactions
Step 7: Report Assembly [Core]
Assemble the above content into a complete interaction design specification document.
Output Depth Grading
| Depth Level |
Output Scope |
Description |
| quick |
interaction specifications and state design |
Core conclusions + minimum viable deliverable |
| standard |
Full deliverables (default) |
Complete output including all Steps |
| deep |
Full spec + state machine full coverage + motion design specs + accessibility interaction design |
Full deliverables + extended analysis + deep simulation |
Output
Output Files
| File |
Path |
Description |
| Interaction Design Specification |
output/pm-design/interaction-spec/interaction-spec.md |
Human-readable complete specification |
| Structured Data |
output/pm-design/interaction-spec/interaction-spec.json |
Machine-consumable structured data |
Markdown Report Structure
# Interaction Design Specification: {Product Name}
**Output Validation Rules**: See Output Validation Rules section below
## 1. Interaction State Machine
- State enumeration and definitions
- State transition table
- State priority rules
- State persistence rules
## 2. Animation and Transition Intents
- Transition intents (natural and smooth/deceleration feel/acceleration feel/crisp and decisive)
- Animation duration intents (immediately perceptible/quickly complete/rhythmic/narrative)
- Performance constraints
- Reduced motion adaptation
## 3. Gesture and Operation Intents
- Tap/press intents
- Swipe/drag intents
- Pinch/rotate intents
- Keyboard operation specifications
## 4. Feedback Mechanism Specification
- Immediate feedback
- Progress feedback
- Result feedback (success/warning/error/information)
- No feedback scenarios
## 5. Exception State Interactions
- Network error
- Empty data
- Insufficient permissions
- Data overflow
- Concurrent conflicts
## 6. Accessibility Interaction Specification
- WCAG 2.1 AA compliance check
- Focus management rules
- ARIA label specifications
- Screen reader adaptation
## 7. Interaction Specification Index
- Component x State cross-reference table
- Animation x Scenario cross-reference table
JSON Structure
{
"product_name": "",
"report_date": "",
"state_machines": {
"states": [],
"transitions": [
{
"from": "",
"to": "",
"trigger": "",
"transition_intent": "",
"completeness_check": ""
}
],
"priority_rules": [],
"persistence_rules": []
},
"animation": {
"transition_intents": [],
"duration_intents": [],
"performance_constraints": [],
"reduced_motion": {}
},
"gestures": {
"tap_press_intents": {},
"swipe_drag_intents": {},
"pinch_rotate_intents": {},
"keyboard": {}
},
"feedback": {
"immediate": [
{
"trigger": "",
"intent": "",
"completeness_check": ""
}
],
"progress": [
{
"trigger": "",
"intent": "",
"completeness_check": ""
}
],
"result": [
{
"trigger": "",
"intent": "",
"completeness_check": ""
}
],
"no_feedback_scenarios": []
},
"error_states": {
"network_error": {
"intent": "",
"completeness_check": ""
},
"empty_state": {
"intent": "",
"completeness_check": ""
},
"permission_denied": {
"intent": "",
"completeness_check": ""
},
"data_overflow": {
"intent": "",
"completeness_check": ""
},
"concurrent_conflict": {
"intent": "",
"completeness_check": ""
}
},
"accessibility": {
"wcag_compliance": [],
"focus_management": [],
"aria_specifications": [],
"screen_reader": []
}
}
Quality Checks
P0 Checks (must pass for quick/standard/deep)
P1 Checks (must pass for standard/deep)
P2 Checks (must pass for deep only)
Output Validation Rules
| Field Path |
Type |
Required |
Description |
| product_name |
string |
Yes |
Product name |
| report_date |
string |
Yes |
Report date (ISO8601) |
| state_machines |
object |
Yes |
Interaction state machine |
| state_machines.states |
array |
Yes |
State enumeration, at least 8 |
| state_machines.transitions |
array |
Yes |
State transition table, each item includes from/to/trigger/transition_intent/completeness_check |
| state_machines.priority_rules |
array |
Yes |
State priority rules |
| animation |
object |
Yes |
Animation and transition intents |
| animation.transition_intents |
array |
Yes |
Transition intent list |
| animation.duration_intents |
array |
Yes |
Animation duration intent list |
| gestures |
object |
Yes |
Gesture and operation intents |
| feedback |
object |
Yes |
Feedback mechanism specification |
| feedback.immediate |
array |
Yes |
Immediate feedback list, each item includes trigger/intent/completeness_check |
| feedback.result |
array |
Yes |
Result feedback list, each item includes trigger/intent/completeness_check |
| error_states |
object |
Yes |
Exception state interactions |
| accessibility |
object |
Yes |
Accessibility interaction specification |
| accessibility.wcag_compliance |
array |
Yes |
WCAG compliance check items |
Decision Rules
- When both user flow and prototype specification are complete, generate full interaction specification (state machine + animation + gestures + feedback + accessibility)
- When only user flow is available, generate interaction specification framework; animation and gesture specifications marked "Pending prototype validation"
- When platform differences exist (iOS/Android/Web), define platform-specific interaction specifications separately
- Decision points requiring human confirmation: Animation style preferences, accessibility compliance level (AA/AAA), gesture conflict resolution strategy
Degradation Strategy
- When user flow is missing: Derive interaction flow from prototype; state machine may be less complete
- When prototype specification is missing: Generate interaction specification framework based on user flow; component interaction specs pending prototype validation
- When design handoff document is missing: Interaction specification uses independent numbering; subsequent alignment with handoff document needed
- When data is unavailable: Generate generic interaction specification template; all specific values marked "Pending product confirmation"
Upstream Change Response
Upstream Change Impact
| Upstream Change |
Impact Scope |
Response Strategy |
| User flow change (path/branch modification) |
Interaction state machine, feedback mechanisms |
Mark affected state transitions, suggest human confirmation on whether to update interaction specification |
| Prototype specification change (component/interaction modification) |
Gesture operations, feedback mechanisms, exception states |
Mark affected interaction definitions, suggest human confirmation on whether to update |
| Design handoff document change (token/component adjustment) |
Token references in animation specifications |
Mark affected token references, suggest human confirmation on whether to update |
| Brand guidelines change |
Animation style, easing functions |
Mark affected animation definitions, suggest human confirmation on whether to adjust style |
Downstream Notification Mechanism
| Interaction Specification Change Type |
Notification Scope |
Notification Method |
| State machine change |
design-handoff-spec |
Mark state machine change, trigger handoff document update |
| Animation specification change |
design-handoff-spec |
Mark animation change, trigger handoff document interaction rule update |
| Gesture specification change |
design-handoff-spec |
Mark gesture change, trigger handoff document update |
| Accessibility specification change |
design-handoff-spec |
Mark accessibility change, trigger handoff document update |
Alignment with prd.json Data Contract
| This Skill's Output Field |
prd.json Corresponding Field |
Alignment Rule |
| state_machines[].name |
prd.json.pages[].name |
State machine name corresponds to PRD page name |
| state_machines[].states[] |
prd.json.pages[].states[] |
State machine states must cover the 5 special states defined in PRD (empty/loading/error/partial/permission) |
| state_machines[].states[].triggers |
prd.json.pages[].states[].triggers |
State trigger conditions must be consistent with PRD definitions |
1---2name: interaction-spec3description: "Use when translating user flows and prototype designs into interaction design specifications. Generates interaction spec documents including state machines, animation specifications, gesture operations, feedback mechanisms, accessibility interactions, and exception state handling. Keywords: interaction design specification, interaction spec, state machine, animation specification, gesture operations, interaction feedback, accessibility interaction, motion design specification."4metadata:5 source: https://skillmd.com/skills/luckyonetwothree/interaction-spec6 module: "Product Ideation & Design"7 sub-module: "Product Design & Prototyping"8 type: "pipeline"9 version: "3.0"10 domain_tags: ["Internet", "Software", "General"]11 trigger_examples:12 - "How to write interaction specifications"13 - "Help me write an interaction design document"14 - "How to define animations and gestures"15 interaction_mode: "ai_suggest_human_approve"16execution_depth:17 default: standard18 quick_description: "Output interaction specifications and state design"19 deep_description: "Full spec + state machine full coverage + motion design specs + accessibility interaction design"20---2122# Interaction Design Specification Document Generation2324## Core Principles2526**Interaction specifications are the constitution of user experience**2728Interaction design specifications ensure that every interaction behavior in the product has a consistent, predictable, and accessible experience. Specifications are not about limiting creativity, but about guaranteeing the baseline quality of foundational experiences, allowing designers to focus on innovation rather than repeatedly defining basic interactions.2930## Interaction Mode3132AI->Human AI suggests, human approves3334## Input3536| Input Item | Type | Required | Source | Description |37|------------|------|----------|--------|-------------|38| User Flow | JSON | Yes | design-userflow | User flow diagrams, state transitions, decision nodes |39| Prototype Specification | JSON | Yes | design-prototype | Prototype design, interaction annotations, component specifications |40| Design Handoff Document | markdown | No | design-handoff-spec | Design tokens, component specifications, responsive breakpoints |41| Brand Guidelines | text | No | User input | Brand tone, animation style preferences |4243### Degradation Strategy4445| Missing Upstream Input | Degradation Plan | Output Impact | Data Acquisition Instructions |46|------------------------|-----------------|---------------|-------------------------------|47| User flow missing | Derive interaction flow from prototype | Flow pending confirmation, interaction state machine may be less complete | Request user to describe user tasks and flow, or upload design-userflow output file |48| Prototype specification missing | Generate interaction spec framework based on user flow | Pending prototype validation, component interaction specs may be less precise | Request user to describe page layouts and components, or upload design-prototype output file |49| Design handoff document missing | Interaction spec uses independent numbering | Subsequent alignment with handoff document needed, token references may be inconsistent | Request user to provide design tokens and component specs, or upload design-handoff-spec output file |50| Brand guidelines missing | Adopt neutral interaction style | Pending brand confirmation, animation style may need adjustment | Request user to provide brand tone and animation style preferences |5152## Execution Steps5354### Step 1: Interaction State Machine Definition [Core]5556Define interaction state machines for each core component and page:57581. **State Enumeration**: Default / Hover / Active / Focus / Disabled / Loading / Error / Empty / Success592. **State Transition Table**: Trigger conditions, transition actions, transition intents603. **State Priority**: Priority rules when multiple states overlap (e.g., Disabled + Error)614. **State Persistence**: Rules for transient vs. persistent state retention6263### Step 2: Animation and Transition Intents [Core]6465Define the **intents** of animations and transitions in the product; specific implementation parameters are determined by UI Skill (ext-interaction-design + page-builder) based on visual_direction:66671. **Transition Intents** (does not define specific easing functions or durations):68 - General transitions: Should feel natural and smooth69 - Enter animations: Should have a deceleration feel, elements approaching from a distance70 - Exit animations: Should have an acceleration feel, elements moving away into the distance71 - Frequent toggles: Should be crisp and decisive, no lingering722. **Animation Intent Standards** (does not define specific millisecond values):73 - Micro-interactions (button feedback, toggle switches): Should be immediately perceptible74 - Small transitions (dropdown expand, lightweight feedback): Should complete quickly75 - Large transitions (page switches, modals): Should have rhythm76 - Complex animations (data visualization, 3D transforms): Should have narrative quality773. **Animation Performance**: Only use transform and opacity; avoid triggering layout and paint784. **Reduced Motion**: `prefers-reduced-motion` adaptation rules7980### Step 3: Gesture and Operation Intents [Core]8182Define **intents and constraints** for gesture operations across platforms; specific thresholds are determined by UI Skill based on platform specifications and visual_direction:83841. **Tap/Press**:85 - Touch targets should meet platform accessibility standards (iOS/Android/Web each have specifications)86 - Long-press operations need haptic or visual feedback87 - Double-tap operations need a reasonable time window882. **Swipe/Drag**:89 - Swipe operations should have reasonable trigger sensitivity (avoid accidental triggers)90 - Swipes should have inertia and deceleration effects91 - Edge swipes must preserve system gestures923. **Pinch/Rotate**:93 - Zoom range should have reasonable upper and lower limits94 - Rotation operations should have snap assist954. **Keyboard Operations**:96 - Tab order and focus management rules97 - Keyboard shortcut mapping table98 - Enter/Space activation rules99100### Step 4: Feedback Mechanism Specification [Core]101102Define feedback standards for user operations:1031041. **Immediate Feedback**:105 - After user operation, immediately perceive that the system has received it106 - Button pressed state, link hover state107 - Input field focus state, toggle switch state1082. **Progress Feedback**:109 - Long operations need to provide progress awareness110 - Loading states need visual placeholders to avoid page jumps111 - Quantifiable operations like upload/download need progress indicators1123. **Result Feedback** (after operation completion):113 - Success: Operation results must be clearly fed back to users; success state must be distinguishable114 - Warning: Must attract user attention but not block operations; users must be able to actively confirm or wait for auto-dismissal115 - Error: Error state must be clearly distinguishable from normal state; users must be able to quickly identify and understand the error cause116 - Information: Must provide supplementary explanation without interfering with the main flow1174. **No Feedback Scenarios**: Explicitly list operations that don't need feedback and the reasons118119### Step 5: Exception State Interactions [Core]120121Define interaction handling for exception scenarios:1221231. **Network Error**: Must clearly inform users that the network is unavailable, provide retry opportunity and locally available content1242. **Empty Data**: Must avoid blank pages, provide ways to guide users to generate content1253. **Insufficient Permissions**: Must explain permission restriction reasons, provide ways to apply or alternative operations1264. **Data Overflow**: Must reasonably display truncated content, provide ways to view complete content1275. **Concurrent Conflicts**: Must detect and inform of conflicts, provide user decision paths128129### Step 6: Accessibility Interaction Specification [Core]130131Ensure interactions meet accessibility standards:1321331. **WCAG 2.1 AA Compliance**:134 - Perceivable: Text alternatives, time-based media alternatives, adaptability, distinguishability135 - Operable: Keyboard operable, sufficient time, seizure safety, navigability136 - Understandable: Readability, predictability, input assistance137 - Robust: Compatible with assistive technologies1382. **Focus Management**: Focus trap (Modal), focus restoration (after closing Modal), focus order1393. **ARIA Labels**: Role (role), state (aria-state), property (aria-property) usage specifications1404. **Screen Readers**: Read-aloud text and read-aloud order for key interactions141142### Step 7: Report Assembly [Core]143144Assemble the above content into a complete interaction design specification document.145146### Output Depth Grading147148| Depth Level | Output Scope | Description |149|----------|----------|------|150| quick | interaction specifications and state design | Core conclusions + minimum viable deliverable |151| standard | Full deliverables (default) | Complete output including all Steps |152| deep | Full spec + state machine full coverage + motion design specs + accessibility interaction design | Full deliverables + extended analysis + deep simulation |153154## Output155156### Output Files157158| File | Path | Description |159|------|------|-------------|160| Interaction Design Specification | `output/pm-design/interaction-spec/interaction-spec.md` | Human-readable complete specification |161| Structured Data | `output/pm-design/interaction-spec/interaction-spec.json` | Machine-consumable structured data |162163### Markdown Report Structure164165```markdown166# Interaction Design Specification: {Product Name}167168**Output Validation Rules**: See Output Validation Rules section below169170## 1. Interaction State Machine171- State enumeration and definitions172- State transition table173- State priority rules174- State persistence rules175176## 2. Animation and Transition Intents177- Transition intents (natural and smooth/deceleration feel/acceleration feel/crisp and decisive)178- Animation duration intents (immediately perceptible/quickly complete/rhythmic/narrative)179- Performance constraints180- Reduced motion adaptation181182## 3. Gesture and Operation Intents183- Tap/press intents184- Swipe/drag intents185- Pinch/rotate intents186- Keyboard operation specifications187188## 4. Feedback Mechanism Specification189- Immediate feedback190- Progress feedback191- Result feedback (success/warning/error/information)192- No feedback scenarios193194## 5. Exception State Interactions195- Network error196- Empty data197- Insufficient permissions198- Data overflow199- Concurrent conflicts200201## 6. Accessibility Interaction Specification202- WCAG 2.1 AA compliance check203- Focus management rules204- ARIA label specifications205- Screen reader adaptation206207## 7. Interaction Specification Index208- Component x State cross-reference table209- Animation x Scenario cross-reference table210```211212### JSON Structure213214```json215{216 "product_name": "",217 "report_date": "",218 "state_machines": {219 "states": [],220 "transitions": [221 {222 "from": "",223 "to": "",224 "trigger": "",225 "transition_intent": "",226 "completeness_check": ""227 }228 ],229 "priority_rules": [],230 "persistence_rules": []231 },232 "animation": {233 "transition_intents": [],234 "duration_intents": [],235 "performance_constraints": [],236 "reduced_motion": {}237 },238 "gestures": {239 "tap_press_intents": {},240 "swipe_drag_intents": {},241 "pinch_rotate_intents": {},242 "keyboard": {}243 },244 "feedback": {245 "immediate": [246 {247 "trigger": "",248 "intent": "",249 "completeness_check": ""250 }251 ],252 "progress": [253 {254 "trigger": "",255 "intent": "",256 "completeness_check": ""257 }258 ],259 "result": [260 {261 "trigger": "",262 "intent": "",263 "completeness_check": ""264 }265 ],266 "no_feedback_scenarios": []267 },268 "error_states": {269 "network_error": {270 "intent": "",271 "completeness_check": ""272 },273 "empty_state": {274 "intent": "",275 "completeness_check": ""276 },277 "permission_denied": {278 "intent": "",279 "completeness_check": ""280 },281 "data_overflow": {282 "intent": "",283 "completeness_check": ""284 },285 "concurrent_conflict": {286 "intent": "",287 "completeness_check": ""288 }289 },290 "accessibility": {291 "wcag_compliance": [],292 "focus_management": [],293 "aria_specifications": [],294 "screen_reader": []295 }296}297```298299## Quality Checks300301### P0 Checks (must pass for quick/standard/deep)302303- [ ] State machine complete (All 8 basic states covered)304- [ ] Animation performance compliant (Only uses transform/opacity)305306### P1 Checks (must pass for standard/deep)307308- [ ] Accessibility compliant (WCAG 2.1 AA fully covered)309- [ ] Feedback fully covered (Every user operation has corresponding feedback)310311### P2 Checks (must pass for deep only)312313- [ ] Extended analysis complete (deep simulation and roadmap generated)314- [ ] Decision records complete (key decisions have rationale and alternatives)315316## Output Validation Rules317318| Field Path | Type | Required | Description |319|------------|------|----------|-------------|320| product_name | string | Yes | Product name |321| report_date | string | Yes | Report date (ISO8601) |322| state_machines | object | Yes | Interaction state machine |323| state_machines.states | array | Yes | State enumeration, at least 8 |324| state_machines.transitions | array | Yes | State transition table, each item includes from/to/trigger/transition_intent/completeness_check |325| state_machines.priority_rules | array | Yes | State priority rules |326| animation | object | Yes | Animation and transition intents |327| animation.transition_intents | array | Yes | Transition intent list |328| animation.duration_intents | array | Yes | Animation duration intent list |329| gestures | object | Yes | Gesture and operation intents |330| feedback | object | Yes | Feedback mechanism specification |331| feedback.immediate | array | Yes | Immediate feedback list, each item includes trigger/intent/completeness_check |332| feedback.result | array | Yes | Result feedback list, each item includes trigger/intent/completeness_check |333| error_states | object | Yes | Exception state interactions |334| accessibility | object | Yes | Accessibility interaction specification |335| accessibility.wcag_compliance | array | Yes | WCAG compliance check items |336337## Decision Rules338339- When both user flow and prototype specification are complete, generate full interaction specification (state machine + animation + gestures + feedback + accessibility)340- When only user flow is available, generate interaction specification framework; animation and gesture specifications marked "Pending prototype validation"341- When platform differences exist (iOS/Android/Web), define platform-specific interaction specifications separately342- Decision points requiring human confirmation: Animation style preferences, accessibility compliance level (AA/AAA), gesture conflict resolution strategy343344## Degradation Strategy345346- When user flow is missing: Derive interaction flow from prototype; state machine may be less complete347- When prototype specification is missing: Generate interaction specification framework based on user flow; component interaction specs pending prototype validation348- When design handoff document is missing: Interaction specification uses independent numbering; subsequent alignment with handoff document needed349- When data is unavailable: Generate generic interaction specification template; all specific values marked "Pending product confirmation"350351## Upstream Change Response352353### Upstream Change Impact354355| Upstream Change | Impact Scope | Response Strategy |356|-----------------|-------------|-------------------|357| User flow change (path/branch modification) | Interaction state machine, feedback mechanisms | Mark affected state transitions, suggest human confirmation on whether to update interaction specification |358| Prototype specification change (component/interaction modification) | Gesture operations, feedback mechanisms, exception states | Mark affected interaction definitions, suggest human confirmation on whether to update |359| Design handoff document change (token/component adjustment) | Token references in animation specifications | Mark affected token references, suggest human confirmation on whether to update |360| Brand guidelines change | Animation style, easing functions | Mark affected animation definitions, suggest human confirmation on whether to adjust style |361362### Downstream Notification Mechanism363364| Interaction Specification Change Type | Notification Scope | Notification Method |365|--------------------------------------|-------------------|---------------------|366| State machine change | design-handoff-spec | Mark state machine change, trigger handoff document update |367| Animation specification change | design-handoff-spec | Mark animation change, trigger handoff document interaction rule update |368| Gesture specification change | design-handoff-spec | Mark gesture change, trigger handoff document update |369| Accessibility specification change | design-handoff-spec | Mark accessibility change, trigger handoff document update |370371## Alignment with prd.json Data Contract372373| This Skill's Output Field | prd.json Corresponding Field | Alignment Rule |374|--------------------------|----------------------------|----------------|375| state_machines[].name | prd.json.pages[].name | State machine name corresponds to PRD page name |376| state_machines[].states[] | prd.json.pages[].states[] | State machine states must cover the 5 special states defined in PRD (empty/loading/error/partial/permission) |377| state_machines[].states[].triggers | prd.json.pages[].states[].triggers | State trigger conditions must be consistent with PRD definitions |