--- name: plantuml-sequence-diagram description: Generate and refine UML sequence diagrams in PlantUML from use cases, API flows, webhooks, queues, retries, callbacks, or architecture notes. Use when the user asks for secuencia, flujo temporal, order of calls, request/response, asynchronous events, alternatives, loops, errors, timeouts, or participant lifelines. Do not show deployment containment, static component topology, class structure, or database entity relationships. --- # PlantUML Sequence Diagram Model who communicates, in what order, with which message, and under which conditions. ## Workflow 1. Define the scenario start, success outcome, and relevant failure boundary. 2. Select participants by runtime role, not every internal class. 3. Order messages from top to bottom and name messages by intent. 4. Use solid arrows for calls/messages and dashed arrows for returns. 5. Use `alt`, `opt`, `loop`, `par`, and `break` only when supported. 6. Distinguish synchronous calls, asynchronous events, callbacks, retries, and timeouts. 7. Apply [conventions.md](references/conventions.md). Apply [LANG-001 and LANG-002](references/language.md) to every user-visible label and response field. 8. Render and inspect chronology and activation readability. 9. Return one `@startuml ... @enduml` block plus assumptions. ## Hard rules - A sequence arrow represents a message, not a component dependency or provided/required interface. - Generate all user-visible content in Spanish. Preserve official products, protocols, event names, and exact API/code identifiers. - Do not show nodes, regions, containers, class members, or DER cardinalities. - Do not invent retries, timeouts, response payloads, or error paths. - Keep one primary scenario per diagram; use a separate diagram for unrelated workflows. - Use unique aliases and no remote includes. When user feedback is reusable, update `references/conventions.md`.