What problem does it solve?
This Skill enforces a consistent and scalable architecture for Datastar components within the repository, ensuring commands mutate server state predictably and updates are communicated efficiently via a global SSE stream.
Core Features & Use Cases
- Command Handling: Ensures commands mutate server state and return appropriate status codes (
204 or 202), avoiding JSON state payloads.
- Global SSE Stream: Directs all app-authority state updates through a single
/events SSE stream using datastar-patch-signals.
- Spec Compliance: Mandates that Datastar component specifications adhere to specific SSE mapping rules for backend responses and event triggers.
- Use Case: Streamlining the development of interactive web applications by providing a clear, enforced pattern for handling user input and broadcasting state changes across the system.
Quick Start
Ensure all Datastar command handlers are marked with // ci: datastar-command <handler_name> and return StatusCode::NO_CONTENT or StatusCode::ACCEPTED.