cleudocode-core 1.0.0
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/.cleudocode-core +497 -0
- package/AGENTS.md +175 -0
- package/LICENSE +23 -0
- package/README.md +568 -0
- package/bin/cleudocode.js +581 -0
- package/package.json +75 -0
- package/src/index.js +24 -0
- package/templates/.cleudocode-core +213 -0
- package/templates/.cleudocode-core-backend +77 -0
- package/templates/.cleudocode-core-cli +68 -0
- package/templates/.cleudocode-core-frontend +70 -0
- package/templates/eslintrc.json +21 -0
- package/templates/gitignore +54 -0
- package/templates/prettierrc +13 -0
package/.cleudocode-core
ADDED
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
# Cleudocode Core Configuration
|
|
2
|
+
# Configuração central do Cleudocode Hub para orquestração de agentes AI
|
|
3
|
+
# Baseado em: AIOS, AIOX-Core, BMAD-METHOD
|
|
4
|
+
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
name: "cleudocode-core"
|
|
7
|
+
description: "Cleudocode Hub - AI Orchestration Framework"
|
|
8
|
+
|
|
9
|
+
# =============================================================================
|
|
10
|
+
# CONFIGURAÇÕES GERAIS
|
|
11
|
+
# =============================================================================
|
|
12
|
+
settings:
|
|
13
|
+
language: "pt-BR"
|
|
14
|
+
default_agent: "general-purpose"
|
|
15
|
+
auto_save: true
|
|
16
|
+
verbose: false
|
|
17
|
+
log_mode: "console" # console | file
|
|
18
|
+
environment: "development" # development | production
|
|
19
|
+
|
|
20
|
+
# =============================================================================
|
|
21
|
+
# CHAVES DE API (use variáveis de ambiente em produção)
|
|
22
|
+
# =============================================================================
|
|
23
|
+
api_keys:
|
|
24
|
+
openai: "${OPENAI_API_KEY}"
|
|
25
|
+
gemini: "${GEMINI_API_KEY}"
|
|
26
|
+
groq: "${GROQ_API_KEY}"
|
|
27
|
+
anthropic: "${ANTHROPIC_API_KEY}"
|
|
28
|
+
huggingface:
|
|
29
|
+
auth_token: "${HF_AUTH_TOKEN}"
|
|
30
|
+
cache_dir: "${HF_CACHE_DIR}"
|
|
31
|
+
|
|
32
|
+
# =============================================================================
|
|
33
|
+
# CONFIGURAÇÃO DE LLMs
|
|
34
|
+
# =============================================================================
|
|
35
|
+
llms:
|
|
36
|
+
models:
|
|
37
|
+
# OpenAI Models
|
|
38
|
+
- name: "gpt-4o-mini"
|
|
39
|
+
backend: "openai"
|
|
40
|
+
enabled: false
|
|
41
|
+
- name: "gpt-4o"
|
|
42
|
+
backend: "openai"
|
|
43
|
+
enabled: false
|
|
44
|
+
|
|
45
|
+
# Google Models
|
|
46
|
+
- name: "gemini-2.0-flash"
|
|
47
|
+
backend: "gemini"
|
|
48
|
+
enabled: false
|
|
49
|
+
|
|
50
|
+
# Anthropic Models
|
|
51
|
+
- name: "claude-3-5-sonnet"
|
|
52
|
+
backend: "anthropic"
|
|
53
|
+
enabled: false
|
|
54
|
+
|
|
55
|
+
# Ollama Models (padrão)
|
|
56
|
+
- name: "qwen3:4b"
|
|
57
|
+
backend: "ollama"
|
|
58
|
+
hostname: "http://localhost:11434"
|
|
59
|
+
enabled: true
|
|
60
|
+
- name: "qwen3:1.7b"
|
|
61
|
+
backend: "ollama"
|
|
62
|
+
hostname: "http://localhost:11434"
|
|
63
|
+
enabled: true
|
|
64
|
+
|
|
65
|
+
# HuggingFace Models
|
|
66
|
+
- name: "meta-llama/Llama-3.1-8B-Instruct"
|
|
67
|
+
backend: "huggingface"
|
|
68
|
+
max_gpu_memory: {0: "48GB"}
|
|
69
|
+
eval_device: "cuda:0"
|
|
70
|
+
enabled: false
|
|
71
|
+
|
|
72
|
+
# vLLM Models
|
|
73
|
+
- name: "meta-llama/Llama-3.1-8B-Instruct"
|
|
74
|
+
backend: "vllm"
|
|
75
|
+
hostname: "http://localhost:8091"
|
|
76
|
+
enabled: false
|
|
77
|
+
|
|
78
|
+
router:
|
|
79
|
+
strategy: "sequential" # sequential | round_robin | load_balanced
|
|
80
|
+
bootstrap_url: ""
|
|
81
|
+
log_mode: "console"
|
|
82
|
+
use_context_manager: false
|
|
83
|
+
|
|
84
|
+
# =============================================================================
|
|
85
|
+
# CONFIGURAÇÃO DE AGENTES
|
|
86
|
+
# =============================================================================
|
|
87
|
+
agents:
|
|
88
|
+
enabled:
|
|
89
|
+
- "general-purpose"
|
|
90
|
+
- "code-review"
|
|
91
|
+
- "documentation"
|
|
92
|
+
- "testing"
|
|
93
|
+
- "architect"
|
|
94
|
+
- "dev"
|
|
95
|
+
- "devops"
|
|
96
|
+
- "qa"
|
|
97
|
+
|
|
98
|
+
default: "general-purpose"
|
|
99
|
+
|
|
100
|
+
max_workers: 8
|
|
101
|
+
timeout: 300
|
|
102
|
+
|
|
103
|
+
# Atalhos de ativação (similar ao AIOX-Core)
|
|
104
|
+
shortcuts:
|
|
105
|
+
"@architect": ".agents/agents/architect.md"
|
|
106
|
+
"@dev": ".agents/agents/dev.md"
|
|
107
|
+
"@devops": ".agents/agents/devops.md"
|
|
108
|
+
"@qa": ".agents/agents/qa.md"
|
|
109
|
+
"@analyst": ".agents/agents/analyst.md"
|
|
110
|
+
"@pm": ".agents/agents/pm.md"
|
|
111
|
+
"@po": ".agents/agents/po.md"
|
|
112
|
+
"@sm": ".agents/agents/sm.md"
|
|
113
|
+
"@ux": ".agents/agents/ux-designer.md"
|
|
114
|
+
|
|
115
|
+
# =============================================================================
|
|
116
|
+
# REGRAS DE CÓDIGO E ESTILO
|
|
117
|
+
# =============================================================================
|
|
118
|
+
rules:
|
|
119
|
+
# JavaScript/TypeScript
|
|
120
|
+
javascript:
|
|
121
|
+
indentation: "space"
|
|
122
|
+
indent_size: 2
|
|
123
|
+
quote_style: "single"
|
|
124
|
+
semicolons: false
|
|
125
|
+
trailing_comma: "es5"
|
|
126
|
+
line_length: 100
|
|
127
|
+
arrow_parens: "avoid"
|
|
128
|
+
bracket_spacing: true
|
|
129
|
+
|
|
130
|
+
# Python
|
|
131
|
+
python:
|
|
132
|
+
indentation: "space"
|
|
133
|
+
indent_size: 4
|
|
134
|
+
quote_style: "single"
|
|
135
|
+
line_length: 100
|
|
136
|
+
type_hints: true # obrigatório em funções públicas
|
|
137
|
+
max_line_length: 100
|
|
138
|
+
|
|
139
|
+
# Naming conventions
|
|
140
|
+
naming:
|
|
141
|
+
files: "kebab-case" # my-file.js, my-module.py
|
|
142
|
+
functions: "camelCase" # myFunction, process_data
|
|
143
|
+
methods: "camelCase" # myMethod
|
|
144
|
+
classes: "PascalCase" # MyClass, DataProcessor
|
|
145
|
+
constants: "UPPER_SNAKE_CASE" # MAX_SIZE, API_KEY
|
|
146
|
+
components: "PascalCase" # MyComponent, UserProfile
|
|
147
|
+
variables: "camelCase" # myVariable, user_count
|
|
148
|
+
|
|
149
|
+
# Commits (Conventional Commits)
|
|
150
|
+
commits:
|
|
151
|
+
style: "conventional"
|
|
152
|
+
signoff: false
|
|
153
|
+
max_subject_length: 72
|
|
154
|
+
max_body_length: 100
|
|
155
|
+
require_scope: false
|
|
156
|
+
types:
|
|
157
|
+
feat: "Nova funcionalidade"
|
|
158
|
+
fix: "Correção de bug"
|
|
159
|
+
perf: "Melhoria de performance"
|
|
160
|
+
revert: "Reversão de commit"
|
|
161
|
+
docs: "Mudança em documentação"
|
|
162
|
+
chore: "Tarefas de manutenção"
|
|
163
|
+
refactor: "Refatoração de código"
|
|
164
|
+
test: "Adição/modificação de testes"
|
|
165
|
+
ci: "Mudanças em CI/CD"
|
|
166
|
+
style: "Formatação/código visual"
|
|
167
|
+
|
|
168
|
+
# Quality gates
|
|
169
|
+
quality_gates:
|
|
170
|
+
enabled: true
|
|
171
|
+
checks:
|
|
172
|
+
- name: "lint"
|
|
173
|
+
command: "npm run lint"
|
|
174
|
+
required: true
|
|
175
|
+
- name: "typecheck"
|
|
176
|
+
command: "npm run typecheck"
|
|
177
|
+
required: true
|
|
178
|
+
- name: "test"
|
|
179
|
+
command: "npm test"
|
|
180
|
+
required: true
|
|
181
|
+
- name: "build"
|
|
182
|
+
command: "npm run build"
|
|
183
|
+
required: false
|
|
184
|
+
|
|
185
|
+
# Métricas mínimas
|
|
186
|
+
metrics:
|
|
187
|
+
test_coverage_min: 80
|
|
188
|
+
max_complexity: 10
|
|
189
|
+
max_lines_per_function: 50
|
|
190
|
+
max_params_per_function: 4
|
|
191
|
+
|
|
192
|
+
# Code review
|
|
193
|
+
code_review:
|
|
194
|
+
required: true
|
|
195
|
+
min_approvals: 1
|
|
196
|
+
require_resolving_comments: true
|
|
197
|
+
auto_request_review: true
|
|
198
|
+
checklist:
|
|
199
|
+
- "Código segue estilo do projeto"
|
|
200
|
+
- "Testes adicionados/atualizados"
|
|
201
|
+
- "Documentação atualizada"
|
|
202
|
+
- "Sem console.log/debug deixado"
|
|
203
|
+
- "Commits com mensagens claras"
|
|
204
|
+
- "Branch atualizada com main"
|
|
205
|
+
|
|
206
|
+
# Segurança
|
|
207
|
+
security:
|
|
208
|
+
scan_secrets: true
|
|
209
|
+
scan_dependencies: true
|
|
210
|
+
deny_patterns:
|
|
211
|
+
- "api_key"
|
|
212
|
+
- "api_secret"
|
|
213
|
+
- "password"
|
|
214
|
+
- "token"
|
|
215
|
+
- "credential"
|
|
216
|
+
- "private_key"
|
|
217
|
+
|
|
218
|
+
# =============================================================================
|
|
219
|
+
# INTEGRAÇÕES
|
|
220
|
+
# =============================================================================
|
|
221
|
+
integrations:
|
|
222
|
+
git:
|
|
223
|
+
enabled: true
|
|
224
|
+
auto_stage: false
|
|
225
|
+
auto_commit: false
|
|
226
|
+
gpg_sign: false
|
|
227
|
+
|
|
228
|
+
github:
|
|
229
|
+
enabled: false
|
|
230
|
+
auto_pr: false
|
|
231
|
+
auto_review: true
|
|
232
|
+
|
|
233
|
+
gitlab:
|
|
234
|
+
enabled: false
|
|
235
|
+
|
|
236
|
+
bitbucket:
|
|
237
|
+
enabled: false
|
|
238
|
+
|
|
239
|
+
# =============================================================================
|
|
240
|
+
# CAMINHOS
|
|
241
|
+
# =============================================================================
|
|
242
|
+
paths:
|
|
243
|
+
rules: ".agents/rules"
|
|
244
|
+
agents: ".agents/agents"
|
|
245
|
+
templates: ".agents/templates"
|
|
246
|
+
workflows: ".agents/workflows"
|
|
247
|
+
tasks: ".agents/tasks"
|
|
248
|
+
outputs: ".agents/outputs"
|
|
249
|
+
logs: ".agents/logs"
|
|
250
|
+
storage: ".agents/storage"
|
|
251
|
+
constitution: ".agents/constitution.md"
|
|
252
|
+
agents_manifest: "AGENTS.md"
|
|
253
|
+
|
|
254
|
+
# =============================================================================
|
|
255
|
+
# RECURSOS HABILITADOS
|
|
256
|
+
# =============================================================================
|
|
257
|
+
features:
|
|
258
|
+
task_delegation: true
|
|
259
|
+
code_generation: true
|
|
260
|
+
auto_documentation: true
|
|
261
|
+
testing: true
|
|
262
|
+
linting: true
|
|
263
|
+
type_checking: true
|
|
264
|
+
context_manager: false
|
|
265
|
+
memory_persistence: true
|
|
266
|
+
vector_search: true
|
|
267
|
+
mcp_integration: false
|
|
268
|
+
|
|
269
|
+
# =============================================================================
|
|
270
|
+
# MEMÓRIA E CONTEXTO
|
|
271
|
+
# =============================================================================
|
|
272
|
+
memory:
|
|
273
|
+
log_mode: "console"
|
|
274
|
+
type: "vector"
|
|
275
|
+
storage: "chroma" # chroma | qdrant
|
|
276
|
+
collection_name: "cleudocode_memory"
|
|
277
|
+
|
|
278
|
+
context:
|
|
279
|
+
max_length: 4096
|
|
280
|
+
truncation_strategy: "oldest_first" # oldest_first | newest_first | summarize
|
|
281
|
+
compression:
|
|
282
|
+
enabled: true
|
|
283
|
+
threshold: 0.8
|
|
284
|
+
method: "summary" # summary | truncate | sliding_window
|
|
285
|
+
|
|
286
|
+
session:
|
|
287
|
+
persistence: true
|
|
288
|
+
save_interval: 60 # segundos
|
|
289
|
+
max_sessions: 10
|
|
290
|
+
|
|
291
|
+
# =============================================================================
|
|
292
|
+
# ARMAZENAMENTO
|
|
293
|
+
# =============================================================================
|
|
294
|
+
storage:
|
|
295
|
+
type: "local"
|
|
296
|
+
root_dir: ".agents/storage"
|
|
297
|
+
use_vector_db: true
|
|
298
|
+
vector_db_backend: "chroma" # chroma | qdrant
|
|
299
|
+
|
|
300
|
+
# Configuração Qdrant (se usar qdrant)
|
|
301
|
+
qdrant:
|
|
302
|
+
host: "localhost"
|
|
303
|
+
port: 6333
|
|
304
|
+
api_key: "${QDRANT_API_KEY}"
|
|
305
|
+
model_name: "sentence-transformers/all-MiniLM-L6-v2"
|
|
306
|
+
|
|
307
|
+
# =============================================================================
|
|
308
|
+
# FERRAMENTAS
|
|
309
|
+
# =============================================================================
|
|
310
|
+
tools:
|
|
311
|
+
mcp:
|
|
312
|
+
enabled: false
|
|
313
|
+
server_script: ".agents/tools/mcp_server.py"
|
|
314
|
+
|
|
315
|
+
shell:
|
|
316
|
+
enabled: true
|
|
317
|
+
allowed_commands:
|
|
318
|
+
- "git"
|
|
319
|
+
- "npm"
|
|
320
|
+
- "yarn"
|
|
321
|
+
- "pnpm"
|
|
322
|
+
- "bun"
|
|
323
|
+
- "docker"
|
|
324
|
+
- "node"
|
|
325
|
+
- "python"
|
|
326
|
+
- "bash"
|
|
327
|
+
denied_commands:
|
|
328
|
+
- "rm -rf /"
|
|
329
|
+
- "sudo"
|
|
330
|
+
- "chmod -R 777"
|
|
331
|
+
|
|
332
|
+
# =============================================================================
|
|
333
|
+
# SCHEDULER
|
|
334
|
+
# =============================================================================
|
|
335
|
+
scheduler:
|
|
336
|
+
log_mode: "console"
|
|
337
|
+
max_workers: 8
|
|
338
|
+
queue_size: 100
|
|
339
|
+
timeout: 300
|
|
340
|
+
retry_attempts: 3
|
|
341
|
+
retry_delay: 1000 # ms
|
|
342
|
+
|
|
343
|
+
# =============================================================================
|
|
344
|
+
# LOGGING
|
|
345
|
+
# =============================================================================
|
|
346
|
+
logging:
|
|
347
|
+
level: "INFO" # DEBUG | INFO | WARNING | ERROR | CRITICAL
|
|
348
|
+
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
349
|
+
log_mode: "console" # console | file
|
|
350
|
+
file_path: ".agents/logs/cleudocode.log"
|
|
351
|
+
max_file_size: "10MB"
|
|
352
|
+
backup_count: 5
|
|
353
|
+
|
|
354
|
+
# =============================================================================
|
|
355
|
+
# SERVIDOR (para API/CLI remoto)
|
|
356
|
+
# =============================================================================
|
|
357
|
+
server:
|
|
358
|
+
enabled: false
|
|
359
|
+
host: "localhost"
|
|
360
|
+
port: 8000
|
|
361
|
+
cors_enabled: true
|
|
362
|
+
allowed_origins:
|
|
363
|
+
- "http://localhost:3000"
|
|
364
|
+
- "http://localhost:8080"
|
|
365
|
+
|
|
366
|
+
# =============================================================================
|
|
367
|
+
# ARQUIVOS E PASTAS IGNORADOS
|
|
368
|
+
# =============================================================================
|
|
369
|
+
excludes:
|
|
370
|
+
# Dependências
|
|
371
|
+
- "node_modules"
|
|
372
|
+
- "vendor"
|
|
373
|
+
- ".venv"
|
|
374
|
+
- "venv"
|
|
375
|
+
- "__pycache__"
|
|
376
|
+
|
|
377
|
+
# Build/Dist
|
|
378
|
+
- "dist"
|
|
379
|
+
- "build"
|
|
380
|
+
- "out"
|
|
381
|
+
- "target"
|
|
382
|
+
|
|
383
|
+
# Git
|
|
384
|
+
- ".git"
|
|
385
|
+
- ".svn"
|
|
386
|
+
- ".hg"
|
|
387
|
+
|
|
388
|
+
# IDE
|
|
389
|
+
- ".idea"
|
|
390
|
+
- ".vscode"
|
|
391
|
+
- "*.swp"
|
|
392
|
+
- "*.swo"
|
|
393
|
+
|
|
394
|
+
# Logs e cache
|
|
395
|
+
- "logs"
|
|
396
|
+
- "*.log"
|
|
397
|
+
- ".cache"
|
|
398
|
+
- ".npm"
|
|
399
|
+
- ".yarn"
|
|
400
|
+
|
|
401
|
+
# Arquivos compilados/minificados
|
|
402
|
+
- "*.min.js"
|
|
403
|
+
- "*.min.css"
|
|
404
|
+
- "*.pyc"
|
|
405
|
+
- "*.pyo"
|
|
406
|
+
|
|
407
|
+
# Testes
|
|
408
|
+
- "coverage"
|
|
409
|
+
- ".nyc_output"
|
|
410
|
+
|
|
411
|
+
# Ambiente
|
|
412
|
+
- ".env"
|
|
413
|
+
- ".env.local"
|
|
414
|
+
- ".env.*.local"
|
|
415
|
+
|
|
416
|
+
# OS
|
|
417
|
+
- ".DS_Store"
|
|
418
|
+
- "Thumbs.db"
|
|
419
|
+
|
|
420
|
+
# =============================================================================
|
|
421
|
+
# HOOKS DE EXECUÇÃO
|
|
422
|
+
# =============================================================================
|
|
423
|
+
hooks:
|
|
424
|
+
pre_task: null # script ou comando executado antes de cada tarefa
|
|
425
|
+
post_task: null # script ou comando executado após cada tarefa
|
|
426
|
+
on_error: "log" # log | notify | halt
|
|
427
|
+
pre_commit: null
|
|
428
|
+
post_commit: null
|
|
429
|
+
on_agent_activate: null
|
|
430
|
+
on_agent_deactivate: null
|
|
431
|
+
|
|
432
|
+
# =============================================================================
|
|
433
|
+
# CONSTITUIÇÃO (similar ao AIOX-Core)
|
|
434
|
+
# =============================================================================
|
|
435
|
+
constitution:
|
|
436
|
+
principles:
|
|
437
|
+
- "CLI First"
|
|
438
|
+
- "Agent Authority"
|
|
439
|
+
- "Story-Driven Development"
|
|
440
|
+
- "No Invention"
|
|
441
|
+
- "Quality First"
|
|
442
|
+
- "Absolute Imports"
|
|
443
|
+
|
|
444
|
+
workflow:
|
|
445
|
+
- "Start from story in docs/stories/"
|
|
446
|
+
- "Implement only what acceptance criteria require"
|
|
447
|
+
- "Update checklist and file list"
|
|
448
|
+
- "Run quality gates before completing"
|
|
449
|
+
|
|
450
|
+
quality_gates:
|
|
451
|
+
- "npm run lint"
|
|
452
|
+
- "npm run typecheck"
|
|
453
|
+
- "npm test"
|
|
454
|
+
|
|
455
|
+
# =============================================================================
|
|
456
|
+
# WORKFLOWS PRÉ-DEFINIDOS
|
|
457
|
+
# =============================================================================
|
|
458
|
+
workflows:
|
|
459
|
+
code_review:
|
|
460
|
+
steps:
|
|
461
|
+
- "analyze_changes"
|
|
462
|
+
- "check_style"
|
|
463
|
+
- "run_tests"
|
|
464
|
+
- "security_scan"
|
|
465
|
+
- "generate_report"
|
|
466
|
+
|
|
467
|
+
feature_development:
|
|
468
|
+
steps:
|
|
469
|
+
- "understand_requirements"
|
|
470
|
+
- "design_solution"
|
|
471
|
+
- "implement_code"
|
|
472
|
+
- "write_tests"
|
|
473
|
+
- "update_docs"
|
|
474
|
+
|
|
475
|
+
bug_fix:
|
|
476
|
+
steps:
|
|
477
|
+
- "reproduce_bug"
|
|
478
|
+
- "identify_root_cause"
|
|
479
|
+
- "implement_fix"
|
|
480
|
+
- "verify_fix"
|
|
481
|
+
- "add_regression_test"
|
|
482
|
+
|
|
483
|
+
# =============================================================================
|
|
484
|
+
# PERSONALIZAÇÃO ESPECÍFICA DO PROJETO
|
|
485
|
+
# =============================================================================
|
|
486
|
+
project:
|
|
487
|
+
type: "fullstack" # frontend | backend | fullstack | library | cli
|
|
488
|
+
framework: "auto-detect"
|
|
489
|
+
package_manager: "auto-detect" # npm | yarn | pnpm | bun
|
|
490
|
+
|
|
491
|
+
# Scripts personalizados
|
|
492
|
+
scripts:
|
|
493
|
+
build: "npm run build"
|
|
494
|
+
test: "npm test"
|
|
495
|
+
lint: "npm run lint"
|
|
496
|
+
typecheck: "npm run typecheck"
|
|
497
|
+
dev: "npm run dev"
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# AGENTS.md - Cleudocode Hub
|
|
2
|
+
|
|
3
|
+
Este arquivo configura o comportamento esperado de agentes AI no Cleudocode Hub.
|
|
4
|
+
|
|
5
|
+
## 📜 Constituição
|
|
6
|
+
|
|
7
|
+
Siga `.agents/constitution.md` como fonte de verdade:
|
|
8
|
+
|
|
9
|
+
1. **CLI First** - Sempre preferir interface de linha de comando
|
|
10
|
+
2. **Agent Authority** - Respeitar a autoridade do agente especializado
|
|
11
|
+
3. **Story-Driven** - Desenvolvimento baseado em histórias/requirements
|
|
12
|
+
4. **No Invention** - Não inventar features não solicitadas
|
|
13
|
+
5. **Quality First** - Qualidade antes de velocidade
|
|
14
|
+
6. **Absolute Imports** - Usar imports absolutos sempre que possível
|
|
15
|
+
|
|
16
|
+
## 🔄 Workflow Obrigatório
|
|
17
|
+
|
|
18
|
+
### 1. Iniciar por uma Story
|
|
19
|
+
- Localizar story em `docs/stories/` ou criar nova
|
|
20
|
+
- Ler acceptance criteria cuidadosamente
|
|
21
|
+
|
|
22
|
+
### 2. Implementação
|
|
23
|
+
- Implementar apenas o que os acceptance criteria pedem
|
|
24
|
+
- Seguir regras de código em `.agents/rules/code-style.md`
|
|
25
|
+
- Commits frequentes e atômicos
|
|
26
|
+
|
|
27
|
+
### 3. Atualizar Documentação
|
|
28
|
+
- Checklist: `[ ]` → `[x]`
|
|
29
|
+
- File list com arquivos modificados
|
|
30
|
+
- README se necessário
|
|
31
|
+
|
|
32
|
+
### 4. Quality Gates (ANTES de concluir)
|
|
33
|
+
```bash
|
|
34
|
+
# JavaScript/TypeScript
|
|
35
|
+
npm run lint
|
|
36
|
+
npm run typecheck
|
|
37
|
+
npm test
|
|
38
|
+
|
|
39
|
+
# Python
|
|
40
|
+
ruff check .
|
|
41
|
+
mypy .
|
|
42
|
+
pytest
|
|
43
|
+
|
|
44
|
+
# Build
|
|
45
|
+
npm run build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 📁 Estrutura Principal
|
|
49
|
+
|
|
50
|
+
| Diretório | Descrição |
|
|
51
|
+
|-----------|-----------|
|
|
52
|
+
| `.agents/` | Configuração de agentes AI |
|
|
53
|
+
| `.agents/agents/` | Definições de agentes (personas) |
|
|
54
|
+
| `.agents/rules/` | Regras e triggers |
|
|
55
|
+
| `.agents/tasks/` | Tarefas e workflows |
|
|
56
|
+
| `.agents/templates/` | Templates de código |
|
|
57
|
+
| `src/` | Código fonte principal |
|
|
58
|
+
| `tests/` | Testes unitários, integração, E2E |
|
|
59
|
+
| `docs/` | Documentação e stories |
|
|
60
|
+
| `scripts/` | Scripts utilitários |
|
|
61
|
+
|
|
62
|
+
## 🤖 Agentes Disponíveis
|
|
63
|
+
|
|
64
|
+
### Atalhos de Ativação
|
|
65
|
+
|
|
66
|
+
| Agente | Atalho | Descrição |
|
|
67
|
+
|--------|--------|-----------|
|
|
68
|
+
| Master | `@master` | Orquestrador principal |
|
|
69
|
+
| Architect | `@architect` | Arquitetura e design |
|
|
70
|
+
| Analyst | `@analyst` | Análise de requisitos |
|
|
71
|
+
| Dev | `@dev` | Desenvolvimento |
|
|
72
|
+
| DevOps | `@devops` | Infra e CI/CD |
|
|
73
|
+
| QA | `@qa` | Qualidade e testes |
|
|
74
|
+
| PM | `@pm` | Product Manager |
|
|
75
|
+
| PO | `@po` | Product Owner |
|
|
76
|
+
| SM | `@sm` | Scrum Master |
|
|
77
|
+
| UX | `@ux` | UX Designer |
|
|
78
|
+
|
|
79
|
+
### Como Ativar
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
@architect - Ativa o agente arquiteto
|
|
83
|
+
/dev - Ativa o agente desenvolvedor
|
|
84
|
+
@qa --verbose - Ativa QA com verbose
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Resposta Esperada
|
|
88
|
+
|
|
89
|
+
Ao ativar um agente:
|
|
90
|
+
1. Confirmar agente ativado
|
|
91
|
+
2. Mostrar 3-6 comandos principais
|
|
92
|
+
3. Seguir na persona do agente até `*exit`
|
|
93
|
+
|
|
94
|
+
## 🎯 Comandos do Sistema
|
|
95
|
+
|
|
96
|
+
### Gerais
|
|
97
|
+
- `*help` - Mostrar ajuda
|
|
98
|
+
- `*status` - Status atual
|
|
99
|
+
- `*exit` - Sair do modo agente
|
|
100
|
+
- `*reset` - Resetar contexto
|
|
101
|
+
|
|
102
|
+
### Desenvolvimento
|
|
103
|
+
- `*generate` - Gerar código
|
|
104
|
+
- `*review` - Revisar código
|
|
105
|
+
- `*test` - Executar testes
|
|
106
|
+
- `*build` - Build do projeto
|
|
107
|
+
|
|
108
|
+
### Documentação
|
|
109
|
+
- `*docs` - Gerar documentação
|
|
110
|
+
- `*explain` - Explicar código
|
|
111
|
+
- `*summarize` - Resumir mudanças
|
|
112
|
+
|
|
113
|
+
## 📚 Regras de Código
|
|
114
|
+
|
|
115
|
+
Ver `.agents/rules/code-style.md` para:
|
|
116
|
+
- Estilo de código (JS/TS, Python)
|
|
117
|
+
- Naming conventions
|
|
118
|
+
- Commits (Conventional Commits)
|
|
119
|
+
- Quality gates
|
|
120
|
+
- Code review checklist
|
|
121
|
+
- Segurança
|
|
122
|
+
|
|
123
|
+
## 🔧 Configuração
|
|
124
|
+
|
|
125
|
+
Arquivo principal: `.cleudocode-core`
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
settings:
|
|
129
|
+
language: pt-BR
|
|
130
|
+
default_agent: general-purpose
|
|
131
|
+
verbose: false
|
|
132
|
+
|
|
133
|
+
agents:
|
|
134
|
+
enabled:
|
|
135
|
+
- general-purpose
|
|
136
|
+
- code-review
|
|
137
|
+
- testing
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## 🚨 Erros Comuns
|
|
141
|
+
|
|
142
|
+
### ❌ Evitar
|
|
143
|
+
- Inventar features não solicitadas
|
|
144
|
+
- Ignorar quality gates
|
|
145
|
+
- Commits grandes sem descrição
|
|
146
|
+
- Hardcoded values (usar .env)
|
|
147
|
+
- Console.log em produção
|
|
148
|
+
|
|
149
|
+
### ✅ Fazer
|
|
150
|
+
- Seguir acceptance criteria
|
|
151
|
+
- Rodar lint/test antes de commit
|
|
152
|
+
- Commits atômicos e descritivos
|
|
153
|
+
- Usar variáveis de ambiente
|
|
154
|
+
- Logger apropriado
|
|
155
|
+
|
|
156
|
+
## 📈 Métricas de Qualidade
|
|
157
|
+
|
|
158
|
+
| Métrica | Mínimo | Ideal |
|
|
159
|
+
|---------|--------|-------|
|
|
160
|
+
| Cobertura de testes | 80% | 90%+ |
|
|
161
|
+
| Complexidade ciclomática | < 10 | < 5 |
|
|
162
|
+
| Linhas por função | < 50 | < 30 |
|
|
163
|
+
| Parâmetros por função | < 4 | < 3 |
|
|
164
|
+
|
|
165
|
+
## 🔗 Links Úteis
|
|
166
|
+
|
|
167
|
+
- [Constituição](.agents/constitution.md)
|
|
168
|
+
- [Regras de Código](.agents/rules/code-style.md)
|
|
169
|
+
- [Configuração Core](.cleudocode-core)
|
|
170
|
+
- [Documentação](docs/)
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
**Versão**: 1.0.0
|
|
175
|
+
**Última atualização**: 2026-03-06
|
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Cleudocode Core - License
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2026 Cleudocode Team
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|