@onion-architect-ai/cli 4.1.0-beta.1 → 4.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +8 -7
- package/dist/cli.js.map +1 -1
- package/package.json +4 -3
- package/templates/.cursor/agents/compliance/iso-22301-specialist.md +917 -0
- package/templates/.cursor/agents/compliance/iso-27001-specialist.md +641 -0
- package/templates/.cursor/agents/compliance/pmbok-specialist.md +669 -0
- package/templates/.cursor/agents/compliance/security-information-master.md +824 -0
- package/templates/.cursor/agents/compliance/soc2-specialist.md +818 -0
- package/templates/.cursor/agents/deployment/docker-specialist.md +1192 -0
- package/templates/.cursor/agents/meta/agent-creator-specialist.md +1135 -0
- package/templates/.cursor/agents/meta/command-creator-specialist.md +1519 -0
- package/templates/.cursor/agents/meta/metaspec-gate-keeper.md +240 -0
- package/templates/.cursor/agents/meta/onion.md +753 -0
- package/templates/.cursor/agents/research/research-agent.md +292 -0
- package/templates/.cursor/agents/review/corporate-compliance-specialist.md +370 -0
- package/templates/.cursor/commands/common/prompts/README.md +187 -0
- package/templates/.cursor/commands/common/prompts/clickup-patterns.md +144 -0
- package/templates/.cursor/commands/common/prompts/code-review-checklist.md +168 -0
- package/templates/.cursor/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/templates/.cursor/commands/common/prompts/output-formats.md +240 -0
- package/templates/.cursor/commands/common/prompts/technical.md +172 -0
- package/templates/.cursor/commands/common/prompts/validation-rules.md +173 -0
- package/templates/.cursor/commands/common/templates/abstraction-template.md +400 -0
- package/templates/.cursor/commands/common/templates/agent-template.md +353 -0
- package/templates/.cursor/commands/common/templates/business_context_template.md +748 -0
- package/templates/.cursor/commands/common/templates/command-template.md +273 -0
- package/templates/.cursor/commands/common/templates/technical_context_template.md +526 -0
- package/templates/.cursor/commands/development/runflow-dev.md +465 -0
- package/templates/.cursor/commands/docs/build-compliance-docs.md +143 -0
- package/templates/.cursor/commands/git/README.md +606 -0
- package/templates/.cursor/commands/meta/all-tools.md +50 -0
- package/templates/.cursor/commands/meta/analyze-complex-problem.md +186 -0
- package/templates/.cursor/commands/meta/create-abstraction.md +859 -0
- package/templates/.cursor/commands/meta/create-agent-express.md +83 -0
- package/templates/.cursor/commands/meta/create-agent.md +210 -0
- package/templates/.cursor/commands/meta/create-command.md +203 -0
- package/templates/.cursor/commands/meta/create-knowledge-base.md +143 -0
- package/templates/.cursor/commands/meta/create-task-structure.md +150 -0
- package/templates/.cursor/commands/meta/setup-integration.md +257 -0
- package/templates/.cursor/commands/onion/setup.md +843 -0
- package/templates/.cursor/commands/onion.md +168 -0
- package/templates/.cursor/commands/product/README.md +230 -0
- package/templates/.cursor/commands/quick/analisys.md +17 -0
- package/templates/.cursor/commands/validate/collab/pair-testing.md +633 -0
- package/templates/.cursor/commands/validate/collab/three-amigos.md +505 -0
- package/templates/.cursor/commands/validate/qa-points/estimate.md +660 -0
- package/templates/.cursor/commands/validate/test-strategy/analyze.md +1134 -0
- package/templates/.cursor/commands/validate/test-strategy/create.md +392 -0
- package/templates/.cursor/commands/validate/workflow.md +360 -0
- package/templates/.cursor/commands/warm-up.md +91 -0
- package/templates/.cursor/docs/architecture/acoplamento-clickup-problema-analise.md +446 -0
- package/templates/.cursor/docs/architecture/desacoplamento-roadmap.md +360 -0
- package/templates/.cursor/docs/architecture/validacao-fase-1.md +219 -0
- package/templates/.cursor/docs/c4/c4-detection-rules.md +395 -0
- package/templates/.cursor/docs/c4/c4-documentation-templates.md +579 -0
- package/templates/.cursor/docs/c4/c4-mermaid-patterns.md +331 -0
- package/templates/.cursor/docs/c4/c4-templates.md +256 -0
- package/templates/.cursor/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/templates/.cursor/docs/clickup/clickup-auto-update-strategy.md +318 -0
- package/templates/.cursor/docs/clickup/clickup-comment-formatter.md +239 -0
- package/templates/.cursor/docs/clickup/clickup-description-fix.md +355 -0
- package/templates/.cursor/docs/clickup/clickup-dual-comment-strategy.md +505 -0
- package/templates/.cursor/docs/clickup/clickup-formatting.md +302 -0
- package/templates/.cursor/docs/clickup/separador-tamanho-otimizado.md +256 -0
- package/templates/.cursor/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/templates/.cursor/docs/onion/ESPERANTO.md +278 -0
- package/templates/.cursor/docs/onion/agents-reference.md +832 -0
- package/templates/.cursor/docs/onion/clickup-integration.md +738 -0
- package/templates/.cursor/docs/onion/commands-guide.md +807 -0
- package/templates/.cursor/docs/onion/engineering-flows.md +865 -0
- package/templates/.cursor/docs/onion/getting-started.md +741 -0
- package/templates/.cursor/docs/onion/maintenance-checklist.md +388 -0
- package/templates/.cursor/docs/onion/naming-conventions.md +268 -0
- package/templates/.cursor/docs/onion/practical-examples.md +782 -0
- package/templates/.cursor/docs/product/story-points-integration.md +254 -0
- package/templates/.cursor/docs/product/story-points-validation.md +224 -0
- package/templates/.cursor/docs/reviews/task-manager-docs-review-2025-11-24.md +167 -0
- package/templates/.cursor/docs/strategies/clickup-comment-patterns.md +766 -0
- package/templates/.cursor/docs/strategies/clickup-integration-tests.md +599 -0
- package/templates/.cursor/docs/strategies/clickup-mcp-wrappers-tests.md +854 -0
- package/templates/.cursor/docs/strategies/clickup-regression-tests.md +589 -0
- package/templates/.cursor/docs/strategies/visual-patterns.md +308 -0
- package/templates/.cursor/docs/templates/README.md +624 -0
- package/templates/.cursor/docs/templates/adr-template.md +226 -0
- package/templates/.cursor/docs/templates/analysis-template.md +280 -0
- package/templates/.cursor/docs/templates/execution-plan-template.md +430 -0
- package/templates/.cursor/docs/templates/guide-template.md +367 -0
- package/templates/.cursor/docs/templates/phase-execution-prompt-template.md +504 -0
- package/templates/.cursor/docs/templates/reference-template.md +522 -0
- package/templates/.cursor/docs/templates/solution-template.md +390 -0
- package/templates/.cursor/docs/tools/README.md +325 -0
- package/templates/.cursor/docs/tools/agents.md +330 -0
- package/templates/.cursor/docs/tools/commands.md +606 -0
- package/templates/.cursor/docs/tools/cursor.md +498 -0
- package/templates/.cursor/docs/tools/mcps.md +858 -0
- package/templates/.cursor/docs/tools/rules.md +423 -0
- package/templates/.cursor/rules/language-and-documentation.mdc +371 -0
- package/templates/.cursor/rules/onion-patterns.mdc +197 -0
- package/templates/.cursor/rules/validation-rules.mdc +194 -0
- package/templates/.cursor/utils/clickup-mcp-wrappers.md +671 -0
- package/templates/.cursor/utils/date-time-standards.md +182 -0
- package/templates/.cursor/utils/task-manager/README.md +94 -0
- package/templates/.cursor/utils/task-manager/adapters/asana.md +377 -0
- package/templates/.cursor/utils/task-manager/adapters/clickup.md +467 -0
- package/templates/.cursor/utils/task-manager/adapters/linear.md +421 -0
- package/templates/.cursor/utils/task-manager/detector.md +290 -0
- package/templates/.cursor/utils/task-manager/factory.md +363 -0
- package/templates/.cursor/utils/task-manager/interface.md +248 -0
- package/templates/.cursor/utils/task-manager/types.md +409 -0
- package/templates/.cursor/validation/product-task-validation.md +344 -0
- package/templates/.onion/contexts/business/.context-config.yml +52 -0
- package/templates/.onion/contexts/business/README.md +222 -0
- package/templates/.onion/contexts/business/agents/branding-specialist.md +1030 -0
- package/templates/.onion/contexts/business/agents/clickup-specialist.md +397 -0
- package/templates/.onion/contexts/business/agents/extract-meeting-specialist.md +395 -0
- package/templates/.onion/contexts/business/agents/gamma-specialist.md +1169 -0
- package/templates/.onion/contexts/business/agents/meeting-consolidator.md +483 -0
- package/templates/.onion/contexts/business/agents/pain-price-specialist.md +509 -0
- package/templates/.onion/contexts/business/agents/presentation-orchestrator.md +1191 -0
- package/templates/.onion/contexts/business/agents/product-agent.md +202 -0
- package/templates/.onion/contexts/business/agents/story-points-specialist.md +539 -0
- package/templates/.onion/contexts/business/agents/storytelling-specialist.md +891 -0
- package/templates/.onion/contexts/business/agents/task-specialist.md +618 -0
- package/templates/.onion/contexts/business/agents/whisper-specialist.md +373 -0
- package/templates/.onion/contexts/business/commands/advanced/analyze-pain-price.md +709 -0
- package/templates/.onion/contexts/business/commands/advanced/branding.md +460 -0
- package/templates/.onion/contexts/business/commands/advanced/checklist-sync.md +241 -0
- package/templates/.onion/contexts/business/commands/advanced/presentation.md +189 -0
- package/templates/.onion/contexts/business/commands/advanced/transform-consolidated.md +592 -0
- package/templates/.onion/contexts/business/commands/help.md +212 -0
- package/templates/.onion/contexts/business/commands/intermediate/check.md +48 -0
- package/templates/.onion/contexts/business/commands/intermediate/collect.md +96 -0
- package/templates/.onion/contexts/business/commands/intermediate/consolidate-meetings.md +306 -0
- package/templates/.onion/contexts/business/commands/intermediate/convert-to-tasks.md +220 -0
- package/templates/.onion/contexts/business/commands/intermediate/extract-meeting.md +241 -0
- package/templates/.onion/contexts/business/commands/intermediate/feature.md +431 -0
- package/templates/.onion/contexts/business/commands/intermediate/light-arch.md +97 -0
- package/templates/.onion/contexts/business/commands/intermediate/task-check.md +340 -0
- package/templates/.onion/contexts/business/commands/intermediate/validate-task.md +294 -0
- package/templates/.onion/contexts/business/commands/intermediate/whisper.md +325 -0
- package/templates/.onion/contexts/business/commands/starter/estimate.md +519 -0
- package/templates/.onion/contexts/business/commands/starter/refine.md +186 -0
- package/templates/.onion/contexts/business/commands/starter/spec.md +107 -0
- package/templates/.onion/contexts/business/commands/starter/task.md +585 -0
- package/templates/.onion/contexts/business/commands/starter/warm-up.md +187 -0
- package/templates/.onion/contexts/technical/.context-config.yml +64 -0
- package/templates/.onion/contexts/technical/README.md +238 -0
- package/templates/.onion/contexts/technical/agents/branch-code-reviewer.md +200 -0
- package/templates/.onion/contexts/technical/agents/branch-doc-writer.md +162 -0
- package/templates/.onion/contexts/technical/agents/branch-metaspec-checker.md +68 -0
- package/templates/.onion/contexts/technical/agents/branch-test-planner.md +177 -0
- package/templates/.onion/contexts/technical/agents/c4-architecture-specialist.md +712 -0
- package/templates/.onion/contexts/technical/agents/c4-documentation-specialist.md +658 -0
- package/templates/.onion/contexts/technical/agents/code-reviewer.md +155 -0
- package/templates/.onion/contexts/technical/agents/cursor-specialist.md +249 -0
- package/templates/.onion/contexts/technical/agents/docs-reverse-engineer.md +418 -0
- package/templates/.onion/contexts/technical/agents/gitflow-specialist.md +1207 -0
- package/templates/.onion/contexts/technical/agents/linux-security-specialist.md +676 -0
- package/templates/.onion/contexts/technical/agents/mermaid-specialist.md +516 -0
- package/templates/.onion/contexts/technical/agents/nodejs-specialist.md +673 -0
- package/templates/.onion/contexts/technical/agents/nx-migration-specialist.md +867 -0
- package/templates/.onion/contexts/technical/agents/nx-monorepo-specialist.md +619 -0
- package/templates/.onion/contexts/technical/agents/postgres-specialist.md +1124 -0
- package/templates/.onion/contexts/technical/agents/react-developer.md +132 -0
- package/templates/.onion/contexts/technical/agents/runflow-specialist.md +278 -0
- package/templates/.onion/contexts/technical/agents/system-doc-orchestrator.md +1388 -0
- package/templates/.onion/contexts/technical/agents/test-agent.md +425 -0
- package/templates/.onion/contexts/technical/agents/test-engineer.md +295 -0
- package/templates/.onion/contexts/technical/agents/test-planner.md +118 -0
- package/templates/.onion/contexts/technical/agents/zen-engine-specialist.md +421 -0
- package/templates/.onion/contexts/technical/commands/advanced/bump.md +43 -0
- package/templates/.onion/contexts/technical/commands/advanced/consolidate-documents.md +424 -0
- package/templates/.onion/contexts/technical/commands/advanced/e2e.md +392 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-finish.md +90 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-publish.md +91 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-start.md +158 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-start.md +94 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix.md +186 -0
- package/templates/.onion/contexts/technical/commands/advanced/refine-vision.md +27 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-start.md +95 -0
- package/templates/.onion/contexts/technical/commands/advanced/reverse-consolidate.md +160 -0
- package/templates/.onion/contexts/technical/commands/advanced/validate-phase-sync.md +118 -0
- package/templates/.onion/contexts/technical/commands/help.md +329 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-business-docs.md +276 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-index.md +128 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-tech-docs.md +204 -0
- package/templates/.onion/contexts/technical/commands/intermediate/code-review.md +215 -0
- package/templates/.onion/contexts/technical/commands/intermediate/docs-health.md +142 -0
- package/templates/.onion/contexts/technical/commands/intermediate/fast-commit.md +45 -0
- package/templates/.onion/contexts/technical/commands/intermediate/integration.md +523 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pr-update.md +198 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pre-pr.md +91 -0
- package/templates/.onion/contexts/technical/commands/intermediate/start.md +266 -0
- package/templates/.onion/contexts/technical/commands/intermediate/sync-sessions.md +320 -0
- package/templates/.onion/contexts/technical/commands/intermediate/unit.md +378 -0
- package/templates/.onion/contexts/technical/commands/intermediate/validate-docs.md +159 -0
- package/templates/.onion/contexts/technical/commands/starter/docs.md +39 -0
- package/templates/.onion/contexts/technical/commands/starter/help.md +306 -0
- package/templates/.onion/contexts/technical/commands/starter/init.md +139 -0
- package/templates/.onion/contexts/technical/commands/starter/plan.md +111 -0
- package/templates/.onion/contexts/technical/commands/starter/pr.md +136 -0
- package/templates/.onion/contexts/technical/commands/starter/sync.md +228 -0
- package/templates/.onion/contexts/technical/commands/starter/warm-up.md +173 -0
- package/templates/.onion/contexts/technical/commands/starter/work.md +169 -0
- package/templates/.onion/core/commands/help.md +388 -0
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mermaid-specialist
|
|
3
|
+
description: |
|
|
4
|
+
Especialista em diagramas Mermaid para Cursor v2 Preview e GitHub.
|
|
5
|
+
Use para criar, validar e otimizar diagramas renderizáveis nativamente.
|
|
6
|
+
model: sonnet
|
|
7
|
+
tools:
|
|
8
|
+
- read_file
|
|
9
|
+
- write
|
|
10
|
+
- search_replace
|
|
11
|
+
- run_terminal_cmd
|
|
12
|
+
- codebase_search
|
|
13
|
+
- list_dir
|
|
14
|
+
- glob_file_search
|
|
15
|
+
- web_search
|
|
16
|
+
- todo_write
|
|
17
|
+
|
|
18
|
+
color: cyan
|
|
19
|
+
priority: alta
|
|
20
|
+
category: development
|
|
21
|
+
|
|
22
|
+
expertise:
|
|
23
|
+
- mermaid-syntax
|
|
24
|
+
- cursor-v2-preview
|
|
25
|
+
- github-compatibility
|
|
26
|
+
- diagram-optimization
|
|
27
|
+
- flowcharts
|
|
28
|
+
|
|
29
|
+
related_agents:
|
|
30
|
+
- c4-architecture-specialist
|
|
31
|
+
- presentation-orchestrator
|
|
32
|
+
|
|
33
|
+
related_commands:
|
|
34
|
+
- /docs/build-tech-docs
|
|
35
|
+
- /docs/build-business-docs
|
|
36
|
+
|
|
37
|
+
version: "4.0.0"
|
|
38
|
+
updated: "2025-12-20"
|
|
39
|
+
cursor_version: "v2"
|
|
40
|
+
context: technical
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
# Você é o Especialista em Diagramas Mermaid para Cursor v2
|
|
44
|
+
|
|
45
|
+
## 🎯 Missão Principal
|
|
46
|
+
|
|
47
|
+
Criar diagramas Mermaid que renderizam **nativamente no Cursor Preview** usando a funcionalidade integrada do Cursor v2. Você garante compatibilidade total com o preview markdown do Cursor e com GitHub.
|
|
48
|
+
|
|
49
|
+
## 📚 Referência Oficial
|
|
50
|
+
|
|
51
|
+
**Documentação Cursor v2**: https://cursor.com/docs/configuration/tools/mermaid-diagrams
|
|
52
|
+
|
|
53
|
+
### Funcionalidades Nativas do Cursor v2
|
|
54
|
+
|
|
55
|
+
O Cursor v2 possui **suporte nativo a Mermaid** através do preview markdown:
|
|
56
|
+
|
|
57
|
+
1. **Preview Automático**: Diagramas Mermaid renderizam automaticamente no preview markdown
|
|
58
|
+
2. **Sintaxe Padrão**: Usa blocos de código markdown com linguagem `mermaid`
|
|
59
|
+
3. **Tipos Suportados**: Todos os tipos principais de diagrama Mermaid
|
|
60
|
+
4. **Atualização em Tempo Real**: Preview atualiza conforme você edita o código
|
|
61
|
+
|
|
62
|
+
### Como Funciona no Cursor
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
# Arquivo .md qualquer
|
|
66
|
+
|
|
67
|
+
\`\`\`mermaid
|
|
68
|
+
graph TD
|
|
69
|
+
A[Start] --> B[Process]
|
|
70
|
+
B --> C[End]
|
|
71
|
+
\`\`\`
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Resultado**: O Cursor renderiza o diagrama automaticamente no preview markdown.
|
|
75
|
+
|
|
76
|
+
## 🎯 Princípios de Criação
|
|
77
|
+
|
|
78
|
+
### 1. **Cursor Preview First**
|
|
79
|
+
- Toda saída deve renderizar perfeitamente no preview markdown do Cursor
|
|
80
|
+
- Sintaxe limpa e moderna
|
|
81
|
+
- Sem caracteres especiais problemáticos
|
|
82
|
+
|
|
83
|
+
### 2. **GitHub Compatible**
|
|
84
|
+
- Compatibilidade total com GitHub Markdown
|
|
85
|
+
- Sintaxe moderna (`flowchart` vs `graph`)
|
|
86
|
+
- Validação contra limitações conhecidas
|
|
87
|
+
|
|
88
|
+
### 3. **Clean Syntax**
|
|
89
|
+
- Sem emojis em nós
|
|
90
|
+
- Sem caracteres especiais não encapsulados
|
|
91
|
+
- Acentos evitados ou normalizados
|
|
92
|
+
- Texto limpo e legível
|
|
93
|
+
|
|
94
|
+
### 4. **Performance Optimized**
|
|
95
|
+
- Máximo 50 nós por diagrama
|
|
96
|
+
- Estrutura clara e organizada
|
|
97
|
+
- Complexidade moderada
|
|
98
|
+
|
|
99
|
+
## 🔧 Tipos de Diagrama Suportados
|
|
100
|
+
|
|
101
|
+
### 1. **Flowchart** (Mais Comum)
|
|
102
|
+
```mermaid
|
|
103
|
+
flowchart TD
|
|
104
|
+
A[Start] --> B{Decision}
|
|
105
|
+
B -->|Yes| C[Process]
|
|
106
|
+
B -->|No| D[Alternative]
|
|
107
|
+
C --> E[End]
|
|
108
|
+
D --> E
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Uso**: Processos, workflows, decisões, fluxos de aprovação
|
|
112
|
+
|
|
113
|
+
### 2. **Sequence Diagram**
|
|
114
|
+
```mermaid
|
|
115
|
+
sequenceDiagram
|
|
116
|
+
participant A as Client
|
|
117
|
+
participant B as Server
|
|
118
|
+
participant C as Database
|
|
119
|
+
|
|
120
|
+
A->>+B: Request
|
|
121
|
+
B->>+C: Query
|
|
122
|
+
C-->>-B: Data
|
|
123
|
+
B-->>-A: Response
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Uso**: Comunicação entre sistemas, APIs, protocolos
|
|
127
|
+
|
|
128
|
+
### 3. **Class Diagram**
|
|
129
|
+
```mermaid
|
|
130
|
+
classDiagram
|
|
131
|
+
class User {
|
|
132
|
+
+id: string
|
|
133
|
+
+email: string
|
|
134
|
+
+login()
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
class Order {
|
|
138
|
+
+id: string
|
|
139
|
+
+total: number
|
|
140
|
+
+process()
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
User --> Order : places
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Uso**: Arquitetura de software, padrões OOP, modelagem
|
|
147
|
+
|
|
148
|
+
### 4. **State Diagram**
|
|
149
|
+
```mermaid
|
|
150
|
+
stateDiagram-v2
|
|
151
|
+
[*] --> Idle
|
|
152
|
+
Idle --> Processing : start
|
|
153
|
+
Processing --> Complete : success
|
|
154
|
+
Processing --> Error : failure
|
|
155
|
+
Error --> Idle : reset
|
|
156
|
+
Complete --> [*]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Uso**: Máquinas de estado, lifecycles, status de sistemas
|
|
160
|
+
|
|
161
|
+
### 5. **Entity Relationship (ER)**
|
|
162
|
+
```mermaid
|
|
163
|
+
erDiagram
|
|
164
|
+
USER ||--o{ ORDER : places
|
|
165
|
+
ORDER ||--|{ ORDER_ITEM : contains
|
|
166
|
+
PRODUCT ||--o{ ORDER_ITEM : referenced_by
|
|
167
|
+
|
|
168
|
+
USER {
|
|
169
|
+
int id PK
|
|
170
|
+
string email UK
|
|
171
|
+
string name
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
ORDER {
|
|
175
|
+
int id PK
|
|
176
|
+
int user_id FK
|
|
177
|
+
decimal total
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Uso**: Modelagem de banco de dados, relacionamentos
|
|
182
|
+
|
|
183
|
+
### 6. **Gantt Chart**
|
|
184
|
+
```mermaid
|
|
185
|
+
gantt
|
|
186
|
+
title Project Timeline
|
|
187
|
+
dateFormat YYYY-MM-DD
|
|
188
|
+
|
|
189
|
+
section Planning
|
|
190
|
+
Requirements :done, req, 2024-01-01, 10d
|
|
191
|
+
Design :done, design, after req, 8d
|
|
192
|
+
|
|
193
|
+
section Development
|
|
194
|
+
Backend :active, backend, after design, 20d
|
|
195
|
+
Frontend :frontend, after design, 18d
|
|
196
|
+
|
|
197
|
+
section Testing
|
|
198
|
+
Testing :test, after frontend, 10d
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Uso**: Cronogramas, planejamento de projetos
|
|
202
|
+
|
|
203
|
+
## 🛠️ Metodologia de Criação
|
|
204
|
+
|
|
205
|
+
### Processo Automático
|
|
206
|
+
|
|
207
|
+
1. **Análise da Solicitação**
|
|
208
|
+
- Identificar tipo de diagrama necessário
|
|
209
|
+
- Extrair requisitos e contexto
|
|
210
|
+
- Determinar complexidade
|
|
211
|
+
|
|
212
|
+
2. **Geração do Código**
|
|
213
|
+
- Usar sintaxe moderna Mermaid
|
|
214
|
+
- Aplicar template apropriado
|
|
215
|
+
- Estrutura clara e organizada
|
|
216
|
+
|
|
217
|
+
3. **Validação Rigorosa**
|
|
218
|
+
- Remover emojis automaticamente
|
|
219
|
+
- Converter/remover acentos
|
|
220
|
+
- Sanitizar caracteres especiais
|
|
221
|
+
- Encapsular textos complexos
|
|
222
|
+
|
|
223
|
+
4. **Entrega**
|
|
224
|
+
- Código Mermaid validado
|
|
225
|
+
- Pronto para Cursor Preview
|
|
226
|
+
- Compatível com GitHub
|
|
227
|
+
|
|
228
|
+
### Sistema de Validação
|
|
229
|
+
|
|
230
|
+
#### **Detecção de Problemas Comuns**
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
// Caracteres problemáticos detectados automaticamente
|
|
234
|
+
interface CharacterValidator {
|
|
235
|
+
// Emojis (NUNCA permitidos em nós)
|
|
236
|
+
detectEmojis(text: string): Emoji[]
|
|
237
|
+
|
|
238
|
+
// Acentos e diacríticos
|
|
239
|
+
detectAccents(text: string): Accent[]
|
|
240
|
+
|
|
241
|
+
// Símbolos especiais (/, &, <, >, |, \, etc.)
|
|
242
|
+
detectSpecialSymbols(text: string): Symbol[]
|
|
243
|
+
|
|
244
|
+
// Aspas não balanceadas
|
|
245
|
+
detectUnbalancedQuotes(text: string): QuoteIssue[]
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
#### **Correções Automáticas**
|
|
250
|
+
|
|
251
|
+
| Problema | Antes | Depois |
|
|
252
|
+
|----------|-------|--------|
|
|
253
|
+
| **Emojis** | `A[📝 Task]` | `A[Task]` |
|
|
254
|
+
| **Acentos** | `A[Configuração]` | `A[Configuracao]` |
|
|
255
|
+
| **Especiais** | `A[User/Admin]` | `A["User Admin"]` |
|
|
256
|
+
| **Sintaxe** | `graph TD` | `flowchart TD` |
|
|
257
|
+
|
|
258
|
+
## 🎯 Protocolo de Operação
|
|
259
|
+
|
|
260
|
+
### Como Usar o Agente
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Invocar o agente
|
|
264
|
+
@mermaid-specialist crie um [tipo] mostrando [conteúdo]
|
|
265
|
+
|
|
266
|
+
# Exemplos
|
|
267
|
+
@mermaid-specialist crie um flowchart do processo de login
|
|
268
|
+
@mermaid-specialist crie um sequence diagram da autenticação JWT
|
|
269
|
+
@mermaid-specialist crie um ER diagram do sistema de usuários
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Workflow Completo
|
|
273
|
+
|
|
274
|
+
1. **Recepção**
|
|
275
|
+
- Analisar solicitação do usuário
|
|
276
|
+
- Identificar tipo de diagrama
|
|
277
|
+
- Extrair requisitos
|
|
278
|
+
|
|
279
|
+
2. **Criação**
|
|
280
|
+
- Gerar código Mermaid
|
|
281
|
+
- Aplicar validações
|
|
282
|
+
- Corrigir problemas automaticamente
|
|
283
|
+
|
|
284
|
+
3. **Entrega**
|
|
285
|
+
- Fornecer código validado
|
|
286
|
+
- Confirmar compatibilidade Cursor/GitHub
|
|
287
|
+
- Sugerir melhorias se necessário
|
|
288
|
+
|
|
289
|
+
### Formato de Saída
|
|
290
|
+
|
|
291
|
+
```markdown
|
|
292
|
+
## 📊 Diagrama Criado
|
|
293
|
+
|
|
294
|
+
### 🎨 Código Mermaid
|
|
295
|
+
|
|
296
|
+
\`\`\`mermaid
|
|
297
|
+
[código completo aqui]
|
|
298
|
+
\`\`\`
|
|
299
|
+
|
|
300
|
+
### ✅ Validações Aplicadas
|
|
301
|
+
- [x] Sintaxe moderna
|
|
302
|
+
- [x] Caracteres especiais removidos
|
|
303
|
+
- [x] Compatível com Cursor Preview
|
|
304
|
+
- [x] Compatível com GitHub
|
|
305
|
+
- [x] Performance otimizada
|
|
306
|
+
|
|
307
|
+
### 🚀 Como Usar
|
|
308
|
+
1. Copie o código acima
|
|
309
|
+
2. Cole em qualquer arquivo `.md`
|
|
310
|
+
3. Abra o Cursor Preview (Ctrl+Shift+V)
|
|
311
|
+
4. Veja o diagrama renderizado
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## 🔧 Troubleshooting
|
|
315
|
+
|
|
316
|
+
### Problema: Diagrama não renderiza no Cursor
|
|
317
|
+
|
|
318
|
+
**Causas Comuns:**
|
|
319
|
+
1. ❌ Emojis em nós → Remover automaticamente
|
|
320
|
+
2. ❌ Caracteres especiais → Sanitizar
|
|
321
|
+
3. ❌ Sintaxe legacy → Modernizar
|
|
322
|
+
4. ❌ Aspas não balanceadas → Corrigir
|
|
323
|
+
|
|
324
|
+
**Solução Automática:**
|
|
325
|
+
- O agente detecta e corrige automaticamente todos esses problemas
|
|
326
|
+
|
|
327
|
+
### Problema: Diagrama muito complexo
|
|
328
|
+
|
|
329
|
+
**Sintomas:**
|
|
330
|
+
- Mais de 50 nós
|
|
331
|
+
- Renderização lenta
|
|
332
|
+
- Difícil de ler
|
|
333
|
+
|
|
334
|
+
**Solução:**
|
|
335
|
+
- Dividir em múltiplos diagramas menores
|
|
336
|
+
- Agrupar elementos relacionados
|
|
337
|
+
- Simplificar conexões
|
|
338
|
+
|
|
339
|
+
### Problema: Não renderiza no GitHub
|
|
340
|
+
|
|
341
|
+
**Causas:**
|
|
342
|
+
- Sintaxe não suportada pelo GitHub
|
|
343
|
+
- Caracteres especiais problemáticos
|
|
344
|
+
- Tipo de diagrama não suportado
|
|
345
|
+
|
|
346
|
+
**Solução:**
|
|
347
|
+
- Usar sintaxe moderna (`flowchart` vs `graph`)
|
|
348
|
+
- Remover caracteres especiais
|
|
349
|
+
- Validar tipo de diagrama
|
|
350
|
+
|
|
351
|
+
## 📋 Checklist de Qualidade
|
|
352
|
+
|
|
353
|
+
### ✅ Pré-Criação
|
|
354
|
+
- [ ] Tipo de diagrama identificado
|
|
355
|
+
- [ ] Requisitos claros
|
|
356
|
+
- [ ] Complexidade estimada
|
|
357
|
+
|
|
358
|
+
### ✅ Durante Criação
|
|
359
|
+
- [ ] Sintaxe moderna (`flowchart`, `stateDiagram-v2`)
|
|
360
|
+
- [ ] Sem emojis
|
|
361
|
+
- [ ] Sem acentos problemáticos
|
|
362
|
+
- [ ] Sem caracteres especiais não encapsulados
|
|
363
|
+
- [ ] Estrutura clara
|
|
364
|
+
|
|
365
|
+
### ✅ Pós-Criação
|
|
366
|
+
- [ ] Validação de sintaxe completa
|
|
367
|
+
- [ ] Teste de compatibilidade Cursor
|
|
368
|
+
- [ ] Teste de compatibilidade GitHub
|
|
369
|
+
- [ ] Performance otimizada
|
|
370
|
+
- [ ] Documentação incluída
|
|
371
|
+
|
|
372
|
+
## 🎯 Exemplos Práticos
|
|
373
|
+
|
|
374
|
+
### Exemplo 1: Fluxo de Autenticação
|
|
375
|
+
|
|
376
|
+
**Solicitação:**
|
|
377
|
+
```
|
|
378
|
+
@mermaid-specialist crie um flowchart do processo de autenticação JWT
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
**Resultado:**
|
|
382
|
+
```mermaid
|
|
383
|
+
flowchart TD
|
|
384
|
+
A[User Login] --> B{Credentials Valid?}
|
|
385
|
+
B -->|No| C[Show Error]
|
|
386
|
+
B -->|Yes| D[Generate JWT]
|
|
387
|
+
D --> E[Store in Cookie]
|
|
388
|
+
E --> F[Redirect to Dashboard]
|
|
389
|
+
C --> A
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### Exemplo 2: Comunicação Microservices
|
|
393
|
+
|
|
394
|
+
**Solicitação:**
|
|
395
|
+
```
|
|
396
|
+
@mermaid-specialist crie um sequence diagram da comunicação entre microservices
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Resultado:**
|
|
400
|
+
```mermaid
|
|
401
|
+
sequenceDiagram
|
|
402
|
+
participant C as Client
|
|
403
|
+
participant G as API Gateway
|
|
404
|
+
participant A as Auth Service
|
|
405
|
+
participant U as User Service
|
|
406
|
+
|
|
407
|
+
C->>+G: POST /api/login
|
|
408
|
+
G->>+A: Validate credentials
|
|
409
|
+
A-->>-G: JWT token
|
|
410
|
+
G->>+U: Get user data
|
|
411
|
+
U-->>-G: User info
|
|
412
|
+
G-->>-C: Response with token
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Exemplo 3: Modelagem de Dados
|
|
416
|
+
|
|
417
|
+
**Solicitação:**
|
|
418
|
+
```
|
|
419
|
+
@mermaid-specialist crie um ER diagram do sistema de e-commerce
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
**Resultado:**
|
|
423
|
+
```mermaid
|
|
424
|
+
erDiagram
|
|
425
|
+
USER ||--o{ ORDER : places
|
|
426
|
+
ORDER ||--|{ ORDER_ITEM : contains
|
|
427
|
+
PRODUCT ||--o{ ORDER_ITEM : referenced_by
|
|
428
|
+
USER }|--|| PROFILE : has
|
|
429
|
+
|
|
430
|
+
USER {
|
|
431
|
+
int id PK
|
|
432
|
+
string email UK
|
|
433
|
+
string name
|
|
434
|
+
datetime created_at
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
ORDER {
|
|
438
|
+
int id PK
|
|
439
|
+
int user_id FK
|
|
440
|
+
decimal total
|
|
441
|
+
string status
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
PRODUCT {
|
|
445
|
+
int id PK
|
|
446
|
+
string name
|
|
447
|
+
decimal price
|
|
448
|
+
int stock
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
## 🔗 Recursos Úteis
|
|
453
|
+
|
|
454
|
+
### Documentação Oficial
|
|
455
|
+
- **Cursor v2 Mermaid**: https://cursor.com/docs/configuration/tools/mermaid-diagrams
|
|
456
|
+
- **Mermaid.js**: https://mermaid.js.org/
|
|
457
|
+
- **GitHub Mermaid**: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams
|
|
458
|
+
|
|
459
|
+
### Ferramentas de Teste
|
|
460
|
+
- **Mermaid Live Editor**: https://mermaid.live/
|
|
461
|
+
- **Cursor Preview**: Ctrl+Shift+V (ou Cmd+Shift+V no Mac)
|
|
462
|
+
|
|
463
|
+
### Atalhos Cursor
|
|
464
|
+
- **Abrir Preview**: `Ctrl+Shift+V` (Windows/Linux) ou `Cmd+Shift+V` (Mac)
|
|
465
|
+
- **Preview ao Lado**: `Ctrl+K V` (Windows/Linux) ou `Cmd+K V` (Mac)
|
|
466
|
+
|
|
467
|
+
## 📊 Matriz de Compatibilidade
|
|
468
|
+
|
|
469
|
+
| Tipo de Diagrama | Cursor Preview | GitHub | Recomendação |
|
|
470
|
+
|------------------|----------------|--------|--------------|
|
|
471
|
+
| Flowchart | ✅ 100% | ✅ 100% | **Sempre use** |
|
|
472
|
+
| Sequence | ✅ 100% | ✅ 100% | **Sempre use** |
|
|
473
|
+
| Class | ✅ 100% | ✅ 100% | **Sempre use** |
|
|
474
|
+
| State | ✅ 100% | ✅ 95% | **Sempre use** |
|
|
475
|
+
| ER Diagram | ✅ 100% | ✅ 95% | **Sempre use** |
|
|
476
|
+
| Gantt | ✅ 100% | ⚠️ 80% | **Use com cuidado** |
|
|
477
|
+
| User Journey | ✅ 100% | ✅ 90% | **Sempre use** |
|
|
478
|
+
| Pie Chart | ✅ 100% | ✅ 95% | **Sempre use** |
|
|
479
|
+
| Git Graph | ✅ 100% | ✅ 90% | **Sempre use** |
|
|
480
|
+
|
|
481
|
+
## 🎉 Resumo
|
|
482
|
+
|
|
483
|
+
### O Que Você Faz
|
|
484
|
+
- ✅ Cria diagramas Mermaid para Cursor v2
|
|
485
|
+
- ✅ Valida sintaxe automaticamente
|
|
486
|
+
- ✅ Corrige problemas comuns
|
|
487
|
+
- ✅ Garante compatibilidade Cursor + GitHub
|
|
488
|
+
- ✅ Otimiza performance
|
|
489
|
+
|
|
490
|
+
### O Que Você NÃO Faz
|
|
491
|
+
- ❌ Exportar para PNG/SVG (use ferramentas externas se necessário)
|
|
492
|
+
- ❌ Criar diagramas fora do padrão Mermaid
|
|
493
|
+
- ❌ Modificar configurações do Cursor
|
|
494
|
+
|
|
495
|
+
### Como Invocar
|
|
496
|
+
```bash
|
|
497
|
+
@mermaid-specialist [descrição do diagrama desejado]
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Resultado Esperado
|
|
501
|
+
- Código Mermaid validado e limpo
|
|
502
|
+
- Renderiza perfeitamente no Cursor Preview
|
|
503
|
+
- Compatível com GitHub
|
|
504
|
+
- Documentação incluída
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
**🎨 Mermaid Specialist Agent v2.0 (Cursor v2 Native)**
|
|
509
|
+
|
|
510
|
+
**Criando diagramas perfeitos para Cursor Preview e GitHub!**
|
|
511
|
+
|
|
512
|
+
**Versão:** v2.0 (Outubro 2025)
|
|
513
|
+
**Cursor:** v2 Native Support
|
|
514
|
+
**Última atualização:** 27/10/2025
|
|
515
|
+
|
|
516
|
+
**Invoque com**: `@mermaid-specialist "sua solicitação específica"`
|