ada-ui-interaction-protocol-contracts

Defines and validates cross-layer UI interaction protocols for drag-drop, tabs, and docking operations.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/wubing7755/Ada --skill ada-ui-interaction-protocol-contracts-wubing7755
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ada-ui-interaction-protocol-contracts
Source: https://github.com/wubing7755/Ada/tree/main/skills/software-development/ada-ui-interaction-protocol-contracts
Command: npx skills add https://github.com/wubing7755/Ada --skill ada-ui-interaction-protocol-contracts-wubing7755

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? UI interactions like drag-and-drop, tab reordering, and docking often cross a DOM/JavaScript boundary into a host or domain operation, where numeric positions lose semantic meaning and stale or forged messages corrupt state. This Skill defines protocol contracts that carry stable identity, kind, relation, and named index domains so both producer and consumer validate intents correctly. ## Core Features & Use Cases - Compatibility Matrix & Intent Envelope: Define source kind × target kind × same/cross-container operation rules and a typed intent schema with protocol version, stable IDs, and explicit relations (before/after/inside/tail). - Named Index Domains & Validation: Distinguish logical, presentation, filtered, DOM, and virtualized orders, and enforce consumer-side rejection of stale, forged, mismatched, or obsolete messages. - Drop-Zone Feedback Protocol: Diagnose and fix drag highlight rendering across logic, detector, CSS, and test layers, including RTL coordinate-space rules and real-browser geometry verification. - Use Case: When a toolbar's display order differs from its model order and JavaScript must send reorder intents to a C# host, use this Skill to design the contract, write producer/consumer TDD tests, and verify the built artifact at runtime. ## Quick Start Ask the agent to design a drag-and-drop intent protocol between your JavaScript UI and host backend, including the compatibility matrix, index-domain mapping, and hostile-message validation tests.

Frequently Asked Questions about ada-ui-interaction-protocol-contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a drag-and-drop protocol between JavaScript and a C# host?

Define a compatibility matrix of source kind × target kind × same/cross container, then build an intent envelope carrying stable item identity, relation (before/after/inside/tail), and a named index domain. Validate the intent again at the consumer boundary rather than trusting UI reachability.

Why does same-container drag reorder land one position off?

The usual cause is reusing a raw numeric index across domains: after removing the source item, the destination index shifts. Resolve the target by stable identity, derive before/after, then normalize for source removal in the destination index domain.

How do I prevent forged or stale drag-drop messages from reaching the backend?

Validate at the consumer/host boundary: reject stale, forged, mismatched, unknown, and obsolete intents by checking identity, index domain, bounds, revision, and compatibility. Keep producer-side checks too, since the two layers defend different boundaries.

Why does my drop-zone highlight render the same for every zone?

The detection logic usually already resolves zone kinds; the failure is a single generic CSS rule rendering one block. Add kind-specific ::before shape rules scoped to the owning element kind, and test boundary points and non-center kinds explicitly.

When should I not use a UI interaction protocol contract?

Skip it for pure rendering or lifecycle issues with no protocol boundary, cosmetic-only styling changes, or when the UI directly mutates one authoritative list with no message crossing layers. Those cases belong to ordinary rendering or domain workflows.