@onion-ai/cli 1.0.0-beta.1
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/LICENSE +21 -0
- package/README.md +529 -0
- package/bin/onion.js +6 -0
- package/framework/CLAUDE.md +45 -0
- package/framework/VERSION +1 -0
- package/framework/agents/compliance/iso-22301-specialist.md +985 -0
- package/framework/agents/compliance/iso-27001-specialist.md +713 -0
- package/framework/agents/compliance/pmbok-specialist.md +739 -0
- package/framework/agents/compliance/security-information-master.md +907 -0
- package/framework/agents/compliance/soc2-specialist.md +889 -0
- package/framework/agents/deployment/docker-specialist.md +1192 -0
- package/framework/agents/development/c4-architecture-specialist.md +745 -0
- package/framework/agents/development/c4-documentation-specialist.md +695 -0
- package/framework/agents/development/clickup-specialist.md +396 -0
- package/framework/agents/development/cursor-specialist.md +277 -0
- package/framework/agents/development/docs-reverse-engineer.md +417 -0
- package/framework/agents/development/gamma-api-specialist.md +1168 -0
- package/framework/agents/development/gitflow-specialist.md +1206 -0
- package/framework/agents/development/linux-security-specialist.md +675 -0
- package/framework/agents/development/mermaid-specialist.md +515 -0
- package/framework/agents/development/nodejs-specialist.md +672 -0
- package/framework/agents/development/nx-migration-specialist.md +866 -0
- package/framework/agents/development/nx-monorepo-specialist.md +618 -0
- package/framework/agents/development/postgres-specialist.md +1123 -0
- package/framework/agents/development/react-developer.md +131 -0
- package/framework/agents/development/runflow-specialist.md +277 -0
- package/framework/agents/development/system-documentation-orchestrator.md +1387 -0
- package/framework/agents/development/task-specialist.md +677 -0
- package/framework/agents/git/branch-code-reviewer.md +225 -0
- package/framework/agents/git/branch-documentation-writer.md +161 -0
- package/framework/agents/git/branch-metaspec-checker.md +67 -0
- package/framework/agents/git/branch-test-planner.md +176 -0
- package/framework/agents/meta/agent-creator-specialist.md +1266 -0
- package/framework/agents/meta/command-creator-specialist.md +1676 -0
- package/framework/agents/meta/metaspec-gate-keeper.md +240 -0
- package/framework/agents/meta/onion.md +824 -0
- package/framework/agents/product/branding-positioning-specialist.md +1029 -0
- package/framework/agents/product/extract-meeting-specialist.md +394 -0
- package/framework/agents/product/meeting-consolidator.md +482 -0
- package/framework/agents/product/pain-price-specialist.md +508 -0
- package/framework/agents/product/presentation-orchestrator.md +1190 -0
- package/framework/agents/product/product-agent.md +201 -0
- package/framework/agents/product/story-points-framework-specialist.md +538 -0
- package/framework/agents/product/storytelling-business-specialist.md +890 -0
- package/framework/agents/research/research-agent.md +292 -0
- package/framework/agents/review/code-reviewer.md +154 -0
- package/framework/agents/review/corporate-compliance-specialist.md +370 -0
- package/framework/agents/testing/test-agent.md +424 -0
- package/framework/agents/testing/test-engineer.md +294 -0
- package/framework/agents/testing/test-planner.md +117 -0
- package/framework/commands/common/prompts/README.md +208 -0
- package/framework/commands/common/prompts/clickup-patterns.md +144 -0
- package/framework/commands/common/prompts/code-review-checklist.md +168 -0
- package/framework/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/framework/commands/common/prompts/output-formats.md +240 -0
- package/framework/commands/common/prompts/technical.md +194 -0
- package/framework/commands/common/templates/abstraction-template.md +399 -0
- package/framework/commands/common/templates/agent-template.md +353 -0
- package/framework/commands/common/templates/business_context_template.md +748 -0
- package/framework/commands/common/templates/command-template.md +273 -0
- package/framework/commands/common/templates/technical_context_template.md +526 -0
- package/framework/commands/design/screen-spec.md +505 -0
- package/framework/commands/development/runflow-dev.md +465 -0
- package/framework/commands/docs/build-business-docs.md +299 -0
- package/framework/commands/docs/build-compliance-docs.md +143 -0
- package/framework/commands/docs/build-index.md +119 -0
- package/framework/commands/docs/build-tech-docs.md +221 -0
- package/framework/commands/docs/docs-health.md +141 -0
- package/framework/commands/docs/help.md +278 -0
- package/framework/commands/docs/refine-vision.md +25 -0
- package/framework/commands/docs/reverse-consolidate.md +158 -0
- package/framework/commands/docs/sync-sessions.md +354 -0
- package/framework/commands/docs/validate-docs.md +157 -0
- package/framework/commands/engineer/bump.md +29 -0
- package/framework/commands/engineer/docs.md +11 -0
- package/framework/commands/engineer/hotfix.md +183 -0
- package/framework/commands/engineer/plan.md +85 -0
- package/framework/commands/engineer/pr-update.md +219 -0
- package/framework/commands/engineer/pr.md +117 -0
- package/framework/commands/engineer/pre-pr.md +81 -0
- package/framework/commands/engineer/start.md +254 -0
- package/framework/commands/engineer/validate-phase-sync.md +134 -0
- package/framework/commands/engineer/warm-up.md +20 -0
- package/framework/commands/engineer/work.md +155 -0
- package/framework/commands/f/company-context-extractor.md +93 -0
- package/framework/commands/f/process-meetings.md +103 -0
- package/framework/commands/git/README.md +682 -0
- package/framework/commands/git/code-review.md +213 -0
- package/framework/commands/git/fast-commit.md +43 -0
- package/framework/commands/git/feature/finish.md +88 -0
- package/framework/commands/git/feature/publish.md +89 -0
- package/framework/commands/git/feature/start.md +172 -0
- package/framework/commands/git/help.md +100 -0
- package/framework/commands/git/hotfix/finish.md +96 -0
- package/framework/commands/git/hotfix/start.md +92 -0
- package/framework/commands/git/init.md +111 -0
- package/framework/commands/git/release/finish.md +96 -0
- package/framework/commands/git/release/start.md +93 -0
- package/framework/commands/git/sync.md +199 -0
- package/framework/commands/meta/all-tools.md +58 -0
- package/framework/commands/meta/analyze-complex-problem.md +186 -0
- package/framework/commands/meta/create-abstraction.md +882 -0
- package/framework/commands/meta/create-agent-express.md +98 -0
- package/framework/commands/meta/create-agent.md +210 -0
- package/framework/commands/meta/create-command.md +203 -0
- package/framework/commands/meta/create-knowledge-base.md +143 -0
- package/framework/commands/meta/create-task-structure.md +150 -0
- package/framework/commands/meta/setup-integration.md +274 -0
- package/framework/commands/onion.md +169 -0
- package/framework/commands/product/README.md +249 -0
- package/framework/commands/product/analyze-pain-price.md +694 -0
- package/framework/commands/product/branding.md +458 -0
- package/framework/commands/product/check.md +46 -0
- package/framework/commands/product/checklist-sync.md +239 -0
- package/framework/commands/product/collect.md +95 -0
- package/framework/commands/product/consolidate-meetings.md +291 -0
- package/framework/commands/product/estimate.md +511 -0
- package/framework/commands/product/extract-meeting.md +226 -0
- package/framework/commands/product/feature.md +416 -0
- package/framework/commands/product/light-arch.md +82 -0
- package/framework/commands/product/presentation.md +174 -0
- package/framework/commands/product/refine.md +161 -0
- package/framework/commands/product/spec.md +79 -0
- package/framework/commands/product/task-check.md +378 -0
- package/framework/commands/product/task.md +603 -0
- package/framework/commands/product/validate-task.md +325 -0
- package/framework/commands/product/warm-up.md +24 -0
- package/framework/commands/quick/analisys.md +17 -0
- package/framework/commands/test/e2e.md +377 -0
- package/framework/commands/test/integration.md +508 -0
- package/framework/commands/test/unit.md +381 -0
- package/framework/commands/validate/collab/pair-testing.md +657 -0
- package/framework/commands/validate/collab/three-amigos.md +534 -0
- package/framework/commands/validate/qa-points/estimate.md +660 -0
- package/framework/commands/validate/test-strategy/analyze.md +1201 -0
- package/framework/commands/validate/test-strategy/create.md +411 -0
- package/framework/commands/validate/workflow.md +370 -0
- package/framework/commands/warm-up.md +20 -0
- package/framework/docs/architecture/acoplamento-clickup-problema-analise.md +468 -0
- package/framework/docs/architecture/desacoplamento-roadmap.md +364 -0
- package/framework/docs/architecture/validacao-fase-1.md +235 -0
- package/framework/docs/c4/c4-detection-rules.md +395 -0
- package/framework/docs/c4/c4-documentation-templates.md +579 -0
- package/framework/docs/c4/c4-mermaid-patterns.md +331 -0
- package/framework/docs/c4/c4-templates.md +256 -0
- package/framework/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/framework/docs/clickup/clickup-auto-update-strategy.md +340 -0
- package/framework/docs/clickup/clickup-comment-formatter.md +239 -0
- package/framework/docs/clickup/clickup-description-fix.md +384 -0
- package/framework/docs/clickup/clickup-dual-comment-strategy.md +528 -0
- package/framework/docs/clickup/clickup-formatting.md +302 -0
- package/framework/docs/clickup/separador-tamanho-otimizado.md +258 -0
- package/framework/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/framework/docs/onion/ESPERANTO.md +293 -0
- package/framework/docs/onion/agents-reference.md +832 -0
- package/framework/docs/onion/clickup-integration.md +780 -0
- package/framework/docs/onion/commands-guide.md +924 -0
- package/framework/docs/onion/engineering-flows.md +900 -0
- package/framework/docs/onion/getting-started.md +803 -0
- package/framework/docs/onion/maintenance-checklist.md +421 -0
- package/framework/docs/onion/naming-conventions.md +286 -0
- package/framework/docs/onion/practical-examples.md +854 -0
- package/framework/docs/product/story-points-integration.md +269 -0
- package/framework/docs/product/story-points-validation.md +237 -0
- package/framework/docs/reviews/task-manager-docs-review-2025-11-24.md +184 -0
- package/framework/docs/strategies/clickup-comment-patterns.md +766 -0
- package/framework/docs/strategies/clickup-integration-tests.md +602 -0
- package/framework/docs/strategies/clickup-mcp-wrappers-tests.md +888 -0
- package/framework/docs/strategies/clickup-regression-tests.md +587 -0
- package/framework/docs/strategies/visual-patterns.md +315 -0
- package/framework/docs/templates/README.md +649 -0
- package/framework/docs/templates/adr-template.md +226 -0
- package/framework/docs/templates/analysis-template.md +280 -0
- package/framework/docs/templates/execution-plan-template.md +430 -0
- package/framework/docs/templates/guide-template.md +367 -0
- package/framework/docs/templates/phase-execution-prompt-template.md +504 -0
- package/framework/docs/templates/reference-template.md +522 -0
- package/framework/docs/templates/solution-template.md +390 -0
- package/framework/docs/tools/README.md +356 -0
- package/framework/docs/tools/agents.md +365 -0
- package/framework/docs/tools/commands.md +669 -0
- package/framework/docs/tools/cursor.md +539 -0
- package/framework/docs/tools/mcps.md +937 -0
- package/framework/docs/tools/rules.md +461 -0
- package/framework/rules/language-and-documentation.mdc +371 -0
- package/framework/rules/nestjs-controllers.md +83 -0
- package/framework/rules/nestjs-dtos.md +255 -0
- package/framework/rules/nestjs-modules.md +141 -0
- package/framework/rules/nestjs-services.md +230 -0
- package/framework/rules/nx-rules.mdc +41 -0
- package/framework/rules/onion-patterns.mdc +197 -0
- package/framework/skills/codebase-visualizer/SKILL.md +26 -0
- package/framework/skills/codebase-visualizer/scripts/visualize.py +131 -0
- package/framework/skills/collect/SKILL.md +84 -0
- package/framework/skills/create-rule/SKILL.md +152 -0
- package/framework/skills/db-schema-visualizer/SKILL.md +49 -0
- package/framework/skills/db-schema-visualizer/scripts/visualize.py +1191 -0
- package/framework/skills/sync-meetings/SKILL.md +239 -0
- package/framework/utils/clickup-mcp-wrappers.md +744 -0
- package/framework/utils/date-time-standards.md +200 -0
- package/framework/utils/task-manager/README.md +94 -0
- package/framework/utils/task-manager/adapters/asana.md +377 -0
- package/framework/utils/task-manager/adapters/clickup.md +467 -0
- package/framework/utils/task-manager/adapters/linear.md +421 -0
- package/framework/utils/task-manager/detector.md +299 -0
- package/framework/utils/task-manager/factory.md +363 -0
- package/framework/utils/task-manager/interface.md +248 -0
- package/framework/utils/task-manager/types.md +409 -0
- package/package.json +41 -0
- package/src/cli.js +73 -0
- package/src/commands/doctor.js +191 -0
- package/src/commands/init.js +287 -0
- package/src/commands/install.js +261 -0
- package/src/commands/list.js +152 -0
- package/src/commands/uninstall.js +90 -0
- package/src/commands/update.js +26 -0
- package/src/utils/fs.js +89 -0
- package/src/utils/log.js +35 -0
- package/src/utils/paths.js +32 -0
- package/src/utils/prompt.js +76 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow
|
|
3
|
+
description: Validar completude de workflows do Sistema Onion.
|
|
4
|
+
model: sonnet
|
|
5
|
+
category: validate
|
|
6
|
+
tags: [validation, workflow, completeness]
|
|
7
|
+
version: '3.0.0'
|
|
8
|
+
updated: '2025-11-24'
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# 🔍 Validação Completa de Workflow
|
|
12
|
+
|
|
13
|
+
Você é um assistente especializado em **validação de completude de workflows** do Sistema Onion. Seu papel é verificar que todos os passos de um workflow foram executados corretamente e identificar pendências.
|
|
14
|
+
|
|
15
|
+
## 🎯 **Objetivo**
|
|
16
|
+
|
|
17
|
+
Validar que workflows do Sistema Onion foram executados completamente:
|
|
18
|
+
|
|
19
|
+
- **Git workflows**: PR, sync, branch management
|
|
20
|
+
- **Session management**: Arquivamento, organização
|
|
21
|
+
- **Repository state**: Sincronização, limpeza
|
|
22
|
+
- **Compliance**: Branch protection, GitFlow
|
|
23
|
+
|
|
24
|
+
## 📋 **Parâmetros**
|
|
25
|
+
|
|
26
|
+
### **Sintaxe:**
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
/validate/workflow # Validação completa atual
|
|
30
|
+
/validate/workflow pr-merge # Validação específica de PR merge
|
|
31
|
+
/validate/workflow cleanup # Validação de limpeza/housekeeping
|
|
32
|
+
/validate/workflow development # Validação de desenvolvimento
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 🔍 **Sistema de Validação**
|
|
36
|
+
|
|
37
|
+
### **Validações Executadas:**
|
|
38
|
+
|
|
39
|
+
#### **1. 🔄 Sincronização Local vs Remoto**
|
|
40
|
+
|
|
41
|
+
- Verificar se commits locais foram pushados
|
|
42
|
+
- Detectar divergências entre local e remoto
|
|
43
|
+
- Validar conectividade com remote
|
|
44
|
+
- Status de branches protegidas
|
|
45
|
+
|
|
46
|
+
#### **2. 🧹 Estado do Working Directory**
|
|
47
|
+
|
|
48
|
+
- Verificar mudanças não commitadas
|
|
49
|
+
- Validar arquivos não trackados
|
|
50
|
+
- Compliance com branch protection
|
|
51
|
+
- Status de staging area
|
|
52
|
+
|
|
53
|
+
#### **3. 📁 Gestão de Sessões**
|
|
54
|
+
|
|
55
|
+
- Sessões ativas vs arquivadas
|
|
56
|
+
- Completude de documentação
|
|
57
|
+
- Organização de arquivos históricos
|
|
58
|
+
- Integridade de metadados
|
|
59
|
+
|
|
60
|
+
#### **4. 🌿 Limpeza de Branches**
|
|
61
|
+
|
|
62
|
+
- Branches temporárias órfãs
|
|
63
|
+
- Branches merged não removidas
|
|
64
|
+
- Remote branch cleanup
|
|
65
|
+
- Protection compliance
|
|
66
|
+
|
|
67
|
+
#### **5. 🛡️ Compliance e Segurança**
|
|
68
|
+
|
|
69
|
+
- Branch protection ativa
|
|
70
|
+
- PR workflow compliance
|
|
71
|
+
- GitFlow best practices
|
|
72
|
+
- Security validations
|
|
73
|
+
|
|
74
|
+
#### **6. 🔗 Integração ClickUp**
|
|
75
|
+
|
|
76
|
+
- Status de tasks sincronizado
|
|
77
|
+
- Comments e updates realizados
|
|
78
|
+
- Tags apropriadas aplicadas
|
|
79
|
+
- Workflow completion tracking
|
|
80
|
+
|
|
81
|
+
## ⚙️ **Implementação**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Função principal de validação
|
|
85
|
+
function executeWorkflowValidation() {
|
|
86
|
+
local validation_type="${1:-complete}"
|
|
87
|
+
local session_name="$2"
|
|
88
|
+
|
|
89
|
+
echo "🔍 VALIDAÇÃO DE WORKFLOW: $validation_type"
|
|
90
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
91
|
+
echo ""
|
|
92
|
+
|
|
93
|
+
local total_checks=0
|
|
94
|
+
local passed_checks=0
|
|
95
|
+
local warnings=0
|
|
96
|
+
local errors=0
|
|
97
|
+
|
|
98
|
+
# Array para armazenar resultados
|
|
99
|
+
local validation_results=()
|
|
100
|
+
|
|
101
|
+
# 1. VALIDAÇÃO DE SINCRONIZAÇÃO
|
|
102
|
+
echo "🔄 [1/6] Sincronização Local vs Remoto"
|
|
103
|
+
if validateSyncStatus; then
|
|
104
|
+
validation_results+=("✅ Sincronização: Local e remoto alinhados")
|
|
105
|
+
((passed_checks++))
|
|
106
|
+
else
|
|
107
|
+
validation_results+=("❌ Sincronização: Discrepâncias detectadas")
|
|
108
|
+
((errors++))
|
|
109
|
+
fi
|
|
110
|
+
((total_checks++))
|
|
111
|
+
|
|
112
|
+
# 2. VALIDAÇÃO DE WORKING DIRECTORY
|
|
113
|
+
echo "🧹 [2/6] Working Directory"
|
|
114
|
+
if validateWorkingDirectory; then
|
|
115
|
+
validation_results+=("✅ Working Dir: Limpo e organizado")
|
|
116
|
+
((passed_checks++))
|
|
117
|
+
else
|
|
118
|
+
validation_results+=("⚠️ Working Dir: Mudanças pendentes")
|
|
119
|
+
((warnings++))
|
|
120
|
+
fi
|
|
121
|
+
((total_checks++))
|
|
122
|
+
|
|
123
|
+
# 3. VALIDAÇÃO DE SESSÕES
|
|
124
|
+
echo "📁 [3/6] Gestão de Sessões"
|
|
125
|
+
if validateSessionManagement "$session_name"; then
|
|
126
|
+
validation_results+=("✅ Sessões: Corretamente organizadas")
|
|
127
|
+
((passed_checks++))
|
|
128
|
+
else
|
|
129
|
+
validation_results+=("⚠️ Sessões: Requer organização")
|
|
130
|
+
((warnings++))
|
|
131
|
+
fi
|
|
132
|
+
((total_checks++))
|
|
133
|
+
|
|
134
|
+
# 4. VALIDAÇÃO DE BRANCHES
|
|
135
|
+
echo "🌿 [4/6] Limpeza de Branches"
|
|
136
|
+
if validateBranchCleanup; then
|
|
137
|
+
validation_results+=("✅ Branches: Limpeza completa")
|
|
138
|
+
((passed_checks++))
|
|
139
|
+
else
|
|
140
|
+
validation_results+=("⚠️ Branches: Limpeza recomendada")
|
|
141
|
+
((warnings++))
|
|
142
|
+
fi
|
|
143
|
+
((total_checks++))
|
|
144
|
+
|
|
145
|
+
# 5. VALIDAÇÃO DE COMPLIANCE
|
|
146
|
+
echo "🛡️ [5/6] Compliance e Segurança"
|
|
147
|
+
if validateCompliance; then
|
|
148
|
+
validation_results+=("✅ Compliance: Todas as proteções ativas")
|
|
149
|
+
((passed_checks++))
|
|
150
|
+
else
|
|
151
|
+
validation_results+=("❌ Compliance: Proteções requeridas")
|
|
152
|
+
((errors++))
|
|
153
|
+
fi
|
|
154
|
+
((total_checks++))
|
|
155
|
+
|
|
156
|
+
# 6. VALIDAÇÃO DE INTEGRAÇÃO
|
|
157
|
+
echo "🔗 [6/6] Integração ClickUp"
|
|
158
|
+
if validateClickUpIntegration; then
|
|
159
|
+
validation_results+=("✅ ClickUp: Integração sincronizada")
|
|
160
|
+
((passed_checks++))
|
|
161
|
+
else
|
|
162
|
+
validation_results+=("⚠️ ClickUp: Verificar sincronização")
|
|
163
|
+
((warnings++))
|
|
164
|
+
fi
|
|
165
|
+
((total_checks++))
|
|
166
|
+
|
|
167
|
+
# RESULTADO FINAL
|
|
168
|
+
echo ""
|
|
169
|
+
echo "📊 RESULTADO FINAL DA VALIDAÇÃO"
|
|
170
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
171
|
+
echo ""
|
|
172
|
+
|
|
173
|
+
# Estatísticas
|
|
174
|
+
echo "📈 ESTATÍSTICAS:"
|
|
175
|
+
echo " ▶ Total de verificações: $total_checks"
|
|
176
|
+
echo " ▶ Aprovadas: $passed_checks"
|
|
177
|
+
echo " ▶ Avisos: $warnings"
|
|
178
|
+
echo " ▶ Erros: $errors"
|
|
179
|
+
echo ""
|
|
180
|
+
|
|
181
|
+
# Score de qualidade
|
|
182
|
+
local quality_score=$(( (passed_checks * 100) / total_checks ))
|
|
183
|
+
echo "🎯 SCORE DE QUALIDADE: $quality_score%"
|
|
184
|
+
echo ""
|
|
185
|
+
|
|
186
|
+
# Resultados detalhados
|
|
187
|
+
echo "📋 RESULTADOS DETALHADOS:"
|
|
188
|
+
for result in "${validation_results[@]}"; do
|
|
189
|
+
echo " $result"
|
|
190
|
+
done
|
|
191
|
+
echo ""
|
|
192
|
+
|
|
193
|
+
# Status final e recomendações
|
|
194
|
+
if [[ $errors -eq 0 ]]; then
|
|
195
|
+
if [[ $warnings -eq 0 ]]; then
|
|
196
|
+
echo "🎉 STATUS: WORKFLOW PERFEITO!"
|
|
197
|
+
echo "✅ Todos os critérios atendidos"
|
|
198
|
+
echo "🚀 Sistema pronto para próximas operações"
|
|
199
|
+
|
|
200
|
+
# Adicionar comentário no ClickUp se aplicável
|
|
201
|
+
if [[ -n "$CLICKUP_TASK_ID" ]]; then
|
|
202
|
+
echo ""
|
|
203
|
+
echo "📝 Adicionando validação ao ClickUp..."
|
|
204
|
+
# Aqui seria a integração real com ClickUp
|
|
205
|
+
fi
|
|
206
|
+
|
|
207
|
+
return 0
|
|
208
|
+
else
|
|
209
|
+
echo "🔶 STATUS: WORKFLOW VÁLIDO COM RECOMENDAÇÕES"
|
|
210
|
+
echo "💡 $warnings itens recomendados para otimização"
|
|
211
|
+
echo "✅ Funcionalidade não comprometida"
|
|
212
|
+
|
|
213
|
+
echo ""
|
|
214
|
+
echo "🛠️ AÇÕES RECOMENDADAS:"
|
|
215
|
+
if [[ $warnings -gt 0 ]]; then
|
|
216
|
+
echo " • Revisar avisos listados acima"
|
|
217
|
+
echo " • Aplicar melhorias sugeridas"
|
|
218
|
+
echo " • Re-executar validação após ajustes"
|
|
219
|
+
fi
|
|
220
|
+
|
|
221
|
+
return 1
|
|
222
|
+
fi
|
|
223
|
+
else
|
|
224
|
+
echo "🚨 STATUS: WORKFLOW INCOMPLETO"
|
|
225
|
+
echo "❌ $errors erro(s) crítico(s) detectado(s)"
|
|
226
|
+
echo "🛠️ Correção obrigatória antes de prosseguir"
|
|
227
|
+
|
|
228
|
+
echo ""
|
|
229
|
+
echo "🚨 AÇÕES OBRIGATÓRIAS:"
|
|
230
|
+
echo " • Corrigir todos os erros listados"
|
|
231
|
+
echo " • Verificar integridade do sistema"
|
|
232
|
+
echo " • Re-executar validação completa"
|
|
233
|
+
echo " • Não prosseguir até resolução"
|
|
234
|
+
|
|
235
|
+
return 2
|
|
236
|
+
fi
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
# Funções auxiliares de validação
|
|
240
|
+
function validateSyncStatus() {
|
|
241
|
+
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
242
|
+
|
|
243
|
+
if git show-ref --verify --quiet refs/remotes/origin/$current_branch; then
|
|
244
|
+
local_commit=$(git rev-parse HEAD)
|
|
245
|
+
remote_commit=$(git rev-parse origin/$current_branch)
|
|
246
|
+
|
|
247
|
+
[[ "$local_commit" == "$remote_commit" ]]
|
|
248
|
+
else
|
|
249
|
+
false
|
|
250
|
+
fi
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function validateWorkingDirectory() {
|
|
254
|
+
[[ $(git status --porcelain | wc -l) -eq 0 ]]
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function validateSessionManagement() {
|
|
258
|
+
local session_name="$1"
|
|
259
|
+
|
|
260
|
+
if [[ -n "$session_name" ]]; then
|
|
261
|
+
# Verificar se sessão está arquivada
|
|
262
|
+
[[ ! -d ".claude/sessions/$session_name" ]] &&
|
|
263
|
+
[[ -d ".claude/sessions/archived" ]] &&
|
|
264
|
+
ls .claude/sessions/archived/ | grep -q "$session_name"
|
|
265
|
+
else
|
|
266
|
+
# Verificar se há sessões ativas desnecessárias
|
|
267
|
+
active_sessions=$(find .claude/sessions -maxdepth 1 -type d ! -name "sessions" ! -name "archived" | wc -l)
|
|
268
|
+
[[ $active_sessions -eq 0 ]]
|
|
269
|
+
fi
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function validateBranchCleanup() {
|
|
273
|
+
orphan_branches=$(git branch | grep -E "feature/|hotfix/|bugfix/" | wc -l)
|
|
274
|
+
[[ $orphan_branches -eq 0 ]]
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function validateCompliance() {
|
|
278
|
+
# Verificar se sistema de proteção está ativo
|
|
279
|
+
# (Simplified check - would need more sophisticated validation)
|
|
280
|
+
[[ -f ".claude/commands/git/sync.md" ]] &&
|
|
281
|
+
grep -q "Branch Protection" ".claude/commands/git/sync.md"
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function validateClickUpIntegration() {
|
|
285
|
+
# Verificar se há task ID configurada ou se integração está funcionando
|
|
286
|
+
# (Simplified check)
|
|
287
|
+
true # Sempre retorna true por agora
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
# Execução baseada em parâmetros
|
|
291
|
+
case "${1:-complete}" in
|
|
292
|
+
"pr-merge")
|
|
293
|
+
executeWorkflowValidation "pr-merge" "$2"
|
|
294
|
+
;;
|
|
295
|
+
"cleanup")
|
|
296
|
+
executeWorkflowValidation "cleanup" "$2"
|
|
297
|
+
;;
|
|
298
|
+
"development")
|
|
299
|
+
executeWorkflowValidation "development" "$2"
|
|
300
|
+
;;
|
|
301
|
+
"complete"|*)
|
|
302
|
+
executeWorkflowValidation "complete" "$2"
|
|
303
|
+
;;
|
|
304
|
+
esac
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## 🎯 **Uso Recomendado**
|
|
308
|
+
|
|
309
|
+
### **Quando Usar:**
|
|
310
|
+
|
|
311
|
+
- **Após /git/sync**: Validar sincronização completa
|
|
312
|
+
- **Após /engineer/pr**: Validar PR workflow
|
|
313
|
+
- **Após housekeeping**: Validar limpeza
|
|
314
|
+
- **Diagnóstico**: Quando algo parecer errado
|
|
315
|
+
- **Antes de deploy**: Validação final de qualidade
|
|
316
|
+
|
|
317
|
+
### **Integração Sugerida:**
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Uso nos outros comandos
|
|
321
|
+
/git/sync develop && /validate/workflow cleanup
|
|
322
|
+
|
|
323
|
+
# Uso independente para diagnóstico
|
|
324
|
+
/validate/workflow
|
|
325
|
+
|
|
326
|
+
# Uso específico para validation de PR
|
|
327
|
+
/validate/workflow pr-merge
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## 📊 **Output de Exemplo**
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
🔍 VALIDAÇÃO DE WORKFLOW: complete
|
|
334
|
+
|
|
335
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
336
|
+
|
|
337
|
+
🔄 [1/6] Sincronização Local vs Remoto
|
|
338
|
+
🧹 [2/6] Working Directory
|
|
339
|
+
📁 [3/6] Gestão de Sessões
|
|
340
|
+
🌿 [4/6] Limpeza de Branches
|
|
341
|
+
🛡️ [5/6] Compliance e Segurança
|
|
342
|
+
🔗 [6/6] Integração ClickUp
|
|
343
|
+
|
|
344
|
+
📊 RESULTADO FINAL DA VALIDAÇÃO
|
|
345
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
346
|
+
|
|
347
|
+
📈 ESTATÍSTICAS:
|
|
348
|
+
▶ Total de verificações: 6
|
|
349
|
+
▶ Aprovadas: 6
|
|
350
|
+
▶ Avisos: 0
|
|
351
|
+
▶ Erros: 0
|
|
352
|
+
|
|
353
|
+
🎯 SCORE DE QUALIDADE: 100%
|
|
354
|
+
|
|
355
|
+
📋 RESULTADOS DETALHADOS:
|
|
356
|
+
✅ Sincronização: Local e remoto alinhados
|
|
357
|
+
✅ Working Dir: Limpo e organizado
|
|
358
|
+
✅ Sessões: Corretamente organizadas
|
|
359
|
+
✅ Branches: Limpeza completa
|
|
360
|
+
✅ Compliance: Todas as proteções ativas
|
|
361
|
+
✅ ClickUp: Integração sincronizada
|
|
362
|
+
|
|
363
|
+
🎉 STATUS: WORKFLOW PERFEITO!
|
|
364
|
+
✅ Todos os critérios atendidos
|
|
365
|
+
🚀 Sistema pronto para próximas operações
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
_Sistema Onion - Comando `/validate/workflow` v1.0_
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: warm-up
|
|
3
|
+
description: Prepare general project context. Review README and docs.
|
|
4
|
+
model: sonnet
|
|
5
|
+
category: general
|
|
6
|
+
tags: [warmup, context, preparation]
|
|
7
|
+
version: '3.0.0'
|
|
8
|
+
updated: '2025-11-24'
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Project Preparation
|
|
12
|
+
|
|
13
|
+
To prepare for this session, please:
|
|
14
|
+
|
|
15
|
+
1 - Review the README.md at the root of this project and read the doc `docs/context/company-context.md`. Also, keep a list of files in the docs/ folder in your context so you can refer to them later when needed.
|
|
16
|
+
|
|
17
|
+
2 - Meta Specifications
|
|
18
|
+
|
|
19
|
+
- Review the index.md of the META SPECIFICATIONS for this project and memorize it so you know which files you can read later when needed.
|
|
20
|
+
- The meta specifications are located in the docs/meta-specs/ folder of the project
|