--- name: plantuml-class-diagram description: Generate and refine UML class diagrams in PlantUML from domain models, source code, APIs, or requirements. Use for clases, interfaces de código, attributes, methods, inheritance, realization, composition, aggregation, and navigability. Do not model runtime deployment, component interfaces, temporal messages, or database tables/cardinalities unless explicitly mapping persistence classes. --- # PlantUML Class Diagram Model the static structure and behavior contracts of types. ## Workflow 1. Determine whether the source describes domain concepts or implementation classes; state the selected level. 2. Extract classes, code interfaces, attributes, operations, visibility, and types only when supported. 3. Distinguish inheritance, realization, composition, aggregation, and plain association. 4. Add multiplicities only when explicit or logically required. 5. Apply [conventions.md](references/conventions.md). Apply [LANG-001 and LANG-002](references/language.md) to every user-visible label and response field. 6. Render and inspect crossings, member density, and hierarchy. 7. Return one `@startuml ... @enduml` block plus assumptions. ## Hard rules - Do not represent services, nodes, APIs, or databases as classes merely because they appear in architecture notes. - Generate all user-visible content in Spanish. Preserve exact class/code identifiers when translation would break traceability. - Do not turn database foreign keys into class relationships automatically. - Do not invent methods, visibility, types, inheritance, or multiplicities. - Hide implementation members when the requested view is conceptual. - Use unique aliases and no remote includes. When user feedback is reusable, update `references/conventions.md`.