conectese 0.1.15 → 0.2.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.
Files changed (168) hide show
  1. package/README.md +2 -2
  2. package/agents/conectese_admin/AGENT.md +10 -5
  3. package/agents/data-extractor/AGENT.md +35 -3
  4. package/agents/direito-administrativo/AGENT.md +68 -22
  5. package/agents/direito-aduaneiro/AGENT.md +55 -0
  6. package/agents/direito-aeroportuario/AGENT.md +53 -0
  7. package/agents/direito-agrario/AGENT.md +73 -0
  8. package/agents/direito-ambiental/AGENT.md +61 -24
  9. package/agents/direito-bancario/AGENT.md +79 -0
  10. package/agents/direito-civil/AGENT.md +71 -20
  11. package/agents/direito-constitucional/AGENT.md +79 -0
  12. package/agents/direito-da-crianca-e-do-adolescente-eca/AGENT.md +69 -0
  13. package/agents/direito-da-propriedade-intelectual/AGENT.md +65 -0
  14. package/agents/direito-de-familia/AGENT.md +92 -0
  15. package/agents/direito-de-transito/AGENT.md +59 -0
  16. package/agents/direito-desportivo/AGENT.md +40 -27
  17. package/agents/direito-digital/AGENT.md +61 -24
  18. package/agents/direito-do-consumidor/AGENT.md +77 -0
  19. package/agents/direito-do-trabalho/AGENT.md +73 -20
  20. package/agents/direito-economico/AGENT.md +58 -0
  21. package/agents/direito-eleitoral/AGENT.md +56 -24
  22. package/agents/direito-empresarial/AGENT.md +62 -24
  23. package/agents/direito-financeiro/AGENT.md +63 -0
  24. package/agents/direito-imobiliario/AGENT.md +79 -0
  25. package/agents/direito-indigena/AGENT.md +72 -0
  26. package/agents/direito-internacional/AGENT.md +55 -24
  27. package/agents/direito-maritimo/AGENT.md +55 -0
  28. package/agents/direito-medico-e-da-saude/AGENT.md +69 -0
  29. package/agents/direito-militar/AGENT.md +54 -24
  30. package/agents/direito-notarial-e-registral/AGENT.md +47 -24
  31. package/agents/direito-penal/AGENT.md +74 -19
  32. package/agents/direito-previdenciario/AGENT.md +84 -0
  33. package/agents/direito-processal-civil/AGENT.md +72 -20
  34. package/agents/direito-processal-do-trabalho/AGENT.md +58 -24
  35. package/agents/direito-processal-militar/AGENT.md +38 -27
  36. package/agents/direito-processal-penal/AGENT.md +62 -24
  37. package/agents/direito-processual-civil/AGENT.md +94 -0
  38. package/agents/direito-processual-do-trabalho/AGENT.md +76 -0
  39. package/agents/direito-processual-militar/AGENT.md +53 -0
  40. package/agents/direito-processual-penal/AGENT.md +80 -0
  41. package/agents/direito-securitario/AGENT.md +75 -0
  42. package/agents/direito-sindical/AGENT.md +46 -24
  43. package/agents/direito-societario/AGENT.md +65 -0
  44. package/agents/direito-tributario/AGENT.md +98 -0
  45. package/agents/direito-urbanistico/AGENT.md +58 -0
  46. package/agents/direitos-humanos/AGENT.md +76 -0
  47. package/agents/legal-analyst/AGENT.md +1 -1
  48. package/agents/legal-designer/AGENT.md +8 -3
  49. package/agents/lgpd-anonymizer/AGENT.md +66 -4
  50. package/agents/lgpd-restorer/AGENT.md +38 -4
  51. package/agents/task-router/AGENT.md +47 -3
  52. package/bin/conectese.js +4 -4
  53. package/dashboard/src/App.tsx +6 -4
  54. package/dashboard/src/components/CheckpointModal.tsx +150 -0
  55. package/dashboard/src/components/StatusBadge.tsx +3 -3
  56. package/dashboard/src/components/StatusBar.tsx +7 -7
  57. package/dashboard/src/components/{SquadCard.tsx → TeamCard.tsx} +7 -7
  58. package/dashboard/src/components/{SquadSelector.tsx → TeamSelector.tsx} +18 -18
  59. package/dashboard/src/hooks/{useSquadSocket.ts → useTeamSocket.ts} +13 -13
  60. package/dashboard/src/lib/normalizeState.ts +3 -3
  61. package/dashboard/src/office/OfficeScene.ts +3 -3
  62. package/dashboard/src/office/PhaserGame.tsx +6 -6
  63. package/dashboard/src/plugin/{squadWatcher.ts → teamWatcher.ts} +83 -44
  64. package/dashboard/src/store/useTeamStore.ts +56 -0
  65. package/dashboard/src/types/state.ts +10 -9
  66. package/dashboard/tsconfig.tsbuildinfo +1 -1
  67. package/dashboard/vite.config.ts +2 -2
  68. package/package.json +12 -9
  69. package/skills/README.md +1 -1
  70. package/skills/conectese-agent-creator/SKILL.md +1 -1
  71. package/skills/conectese-design/SKILL.md +50 -0
  72. package/skills/conectese-skill-creator/SKILL.md +3 -3
  73. package/skills/conectese-skill-creator/references/skill-format.md +4 -4
  74. package/skills/document-analyzer/SKILL.md +40 -0
  75. package/skills/document-analyzer/scripts/parse-doc.js +113 -0
  76. package/skills/image-ai-generator/SKILL.md +5 -5
  77. package/skills/image-creator/SKILL.md +3 -3
  78. package/skills/image-fetcher/SKILL.md +5 -5
  79. package/skills/instagram-publisher/SKILL.md +2 -2
  80. package/skills/jurisprudencia-validator/SKILL.md +45 -0
  81. package/skills/jurisprudencia-validator/scripts/validate-urls.js +103 -0
  82. package/skills/legal-pricing/SKILL.md +33 -0
  83. package/skills/legal-pricing/scripts/pricing-engine.js +72 -0
  84. package/skills/resend/SKILL.md +2 -2
  85. package/skills/template-designer/SKILL.md +29 -29
  86. package/src/agents-cli.js +1 -1
  87. package/src/agents.js +1 -1
  88. package/src/init.js +2 -1
  89. package/src/locales/en.json +2 -2
  90. package/src/locales/es.json +2 -2
  91. package/src/locales/pt-BR.json +2 -2
  92. package/src/readme/README.md +26 -26
  93. package/src/runs.js +14 -14
  94. package/src/skills-cli.js +1 -1
  95. package/src/update.js +1 -1
  96. package/templates/_conectese/.conectese-version +1 -1
  97. package/templates/ide-templates/antigravity/.agent/rules/conectese.md +10 -10
  98. package/templates/ide-templates/antigravity/.agent/workflows/conectese.md +18 -18
  99. package/templates/ide-templates/claude-code/.claude/skills/conectese/SKILL.md +31 -31
  100. package/templates/ide-templates/claude-code/CLAUDE.md +10 -10
  101. package/templates/ide-templates/codex/.agents/skills/conectese/SKILL.md +1 -1
  102. package/templates/ide-templates/codex/AGENTS.md +18 -18
  103. package/templates/ide-templates/cursor/.cursor/commands/conectese.md +1 -1
  104. package/templates/ide-templates/opencode/.opencode/commands/conectese.md +1 -1
  105. package/templates/ide-templates/opencode/AGENTS.md +18 -18
  106. package/templates/ide-templates/vscode-copilot/.github/prompts/conectese.prompt.md +33 -33
  107. package/_conectese/.conectese-version +0 -1
  108. package/_conectese/_memory/company/modelo_contrato.md +0 -18
  109. package/_conectese/_memory/company/modelo_procuracao.md +0 -15
  110. package/_conectese/_memory/company/modelo_recibo.md +0 -13
  111. package/_conectese/config/playwright.config.json +0 -11
  112. package/_conectese/core/architect.agent.yaml +0 -110
  113. package/_conectese/core/best-practices/_catalog.yaml +0 -116
  114. package/_conectese/core/best-practices/blog-post.md +0 -132
  115. package/_conectese/core/best-practices/blog-seo.md +0 -127
  116. package/_conectese/core/best-practices/copywriting.md +0 -426
  117. package/_conectese/core/best-practices/data-analysis.md +0 -401
  118. package/_conectese/core/best-practices/email-newsletter.md +0 -118
  119. package/_conectese/core/best-practices/email-sales.md +0 -110
  120. package/_conectese/core/best-practices/image-design.md +0 -348
  121. package/_conectese/core/best-practices/instagram-feed.md +0 -235
  122. package/_conectese/core/best-practices/instagram-reels.md +0 -112
  123. package/_conectese/core/best-practices/instagram-stories.md +0 -107
  124. package/_conectese/core/best-practices/linkedin-article.md +0 -116
  125. package/_conectese/core/best-practices/linkedin-post.md +0 -121
  126. package/_conectese/core/best-practices/researching.md +0 -349
  127. package/_conectese/core/best-practices/review.md +0 -269
  128. package/_conectese/core/best-practices/social-networks-publishing.md +0 -294
  129. package/_conectese/core/best-practices/strategist.md +0 -344
  130. package/_conectese/core/best-practices/technical-writing.md +0 -365
  131. package/_conectese/core/best-practices/twitter-post.md +0 -105
  132. package/_conectese/core/best-practices/twitter-thread.md +0 -122
  133. package/_conectese/core/best-practices/whatsapp-broadcast.md +0 -107
  134. package/_conectese/core/best-practices/youtube-script.md +0 -122
  135. package/_conectese/core/best-practices/youtube-shorts.md +0 -112
  136. package/_conectese/core/prompts/build.prompt.md +0 -547
  137. package/_conectese/core/prompts/design.prompt.md +0 -469
  138. package/_conectese/core/prompts/discovery.prompt.md +0 -269
  139. package/_conectese/core/prompts/sherlock-instagram.md +0 -123
  140. package/_conectese/core/prompts/sherlock-linkedin.md +0 -73
  141. package/_conectese/core/prompts/sherlock-shared.md +0 -684
  142. package/_conectese/core/prompts/sherlock-twitter.md +0 -78
  143. package/_conectese/core/prompts/sherlock-youtube.md +0 -85
  144. package/_conectese/core/runner.pipeline.md +0 -535
  145. package/_conectese/core/skills.engine.md +0 -381
  146. package/agents/direito-adaneiro/AGENT.md +0 -42
  147. package/agents/direito-aeroporta-rio/AGENT.md +0 -42
  148. package/agents/direito-agra-rio/AGENT.md +0 -42
  149. package/agents/direito-banca-rio/AGENT.md +0 -42
  150. package/agents/direito-constitcional/AGENT.md +0 -42
  151. package/agents/direito-da-crianc-a-e-do-adolescente-eca/AGENT.md +0 -42
  152. package/agents/direito-da-propriedade-intelectal/AGENT.md +0 -42
  153. package/agents/direito-de-ami-lia/AGENT.md +0 -42
  154. package/agents/direito-de-tra-nsito/AGENT.md +0 -42
  155. package/agents/direito-do-consmidor/AGENT.md +0 -42
  156. package/agents/direito-econo-mico/AGENT.md +0 -42
  157. package/agents/direito-imobilia-rio/AGENT.md +0 -42
  158. package/agents/direito-inanceiro/AGENT.md +0 -42
  159. package/agents/direito-mari-timo/AGENT.md +0 -42
  160. package/agents/direito-me-dico-e-da-sa-de/AGENT.md +0 -42
  161. package/agents/direito-ndia-rio/AGENT.md +0 -42
  162. package/agents/direito-previdencia-rio/AGENT.md +0 -42
  163. package/agents/direito-rbani-stico/AGENT.md +0 -42
  164. package/agents/direito-secrita-rio/AGENT.md +0 -42
  165. package/agents/direito-societa-rio/AGENT.md +0 -42
  166. package/agents/direito-tribta-rio/AGENT.md +0 -42
  167. package/agents/direitos-hmanos/AGENT.md +0 -42
  168. package/dashboard/src/store/useSquadStore.ts +0 -56
@@ -0,0 +1,113 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * parse-doc.js
5
+ *
6
+ * Script utilitário integrado à skill document-analyzer.
7
+ * Recebe o caminho de um PDF e extrai o texto bruto para que os
8
+ * agentes possam processá-lo estruturalmente.
9
+ * Fallback embutido com Google Gemini Vision para PDF achatados.
10
+ */
11
+
12
+ import fs from 'fs/promises';
13
+ import path from 'path';
14
+ import * as pdfParse from 'pdf-parse';
15
+ import { GoogleGenAI } from '@google/genai';
16
+
17
+ async function parsePDF(filePath, useVision = false, extractPrompt = null) {
18
+ try {
19
+ const absolutePath = path.resolve(process.cwd(), filePath);
20
+ const dataBuffer = await fs.readFile(absolutePath);
21
+
22
+ // Tentativa 1: Parseia o PDF rapidamente via pdf-parse nativo
23
+ let parsedText = '';
24
+ let numpages = 0;
25
+
26
+ if (!useVision) {
27
+ const parser = typeof pdfParse.default === 'function' ? pdfParse.default : (pdfParse.pdf || pdfParse.extract || pdfParse);
28
+ try {
29
+ const data = await parser(dataBuffer);
30
+ parsedText = data.text.replace(/\s+\n/g, '\n').trim();
31
+ numpages = data.numpages;
32
+ } catch (err) {
33
+ console.error("Aviso: pdf-parse falhou (limitação estrutural do arquivo). Fallback automático requisitado.");
34
+ parsedText = '';
35
+ }
36
+ }
37
+
38
+ // Threshold de segurança: Se retornou pouquíssimo texto, possivelmente é uma imagem/escaneado
39
+ const isImagePdf = parsedText.length < 50;
40
+
41
+ let visionText = null;
42
+ let strategy = 'pdf-parse';
43
+
44
+ if (useVision || isImagePdf) {
45
+ strategy = 'gemini-vision';
46
+ if (!process.env.GEMINI_API_KEY) {
47
+ throw new Error("Arquivo escaneado detectado ou flag --vision usada, mas GEMINI_API_KEY não localizada.");
48
+ }
49
+
50
+ const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
51
+
52
+ let prompt = "Extract all readable text from this document exactly as it is presented. Remove any unnecessary formatting output and just output raw text.";
53
+ if (extractPrompt) {
54
+ prompt = extractPrompt;
55
+ }
56
+
57
+ const response = await ai.models.generateContent({
58
+ model: 'gemini-2.5-flash',
59
+ contents: [
60
+ prompt,
61
+ {
62
+ inlineData: {
63
+ data: dataBuffer.toString("base64"),
64
+ mimeType: "application/pdf"
65
+ }
66
+ }
67
+ ]
68
+ });
69
+ visionText = response.text;
70
+ }
71
+
72
+ const finalResult = {
73
+ success: true,
74
+ file: filePath,
75
+ strategy,
76
+ numpages: numpages || 'unknown',
77
+ text: visionText || parsedText
78
+ };
79
+
80
+ console.log(JSON.stringify(finalResult, null, 2));
81
+
82
+ } catch (error) {
83
+ console.error(JSON.stringify({
84
+ success: false,
85
+ error: error.message || 'Erro crítico ao processar o arquivo.',
86
+ file: filePath
87
+ }, null, 2));
88
+ process.exit(1);
89
+ }
90
+ }
91
+
92
+ const args = process.argv.slice(2);
93
+ let filePath = null;
94
+ let useVision = false;
95
+ let extractPrompt = null;
96
+
97
+ for (let i = 0; i < args.length; i++) {
98
+ if (args[i] === '--vision') {
99
+ useVision = true;
100
+ } else if (args[i].startsWith('--extract=')) {
101
+ extractPrompt = args[i].split('=')[1];
102
+ useVision = true;
103
+ } else {
104
+ filePath = args[i];
105
+ }
106
+ }
107
+
108
+ if (!filePath) {
109
+ console.error("Uso: node parse-doc.js <pdf-path> [--vision] [--extract=\"Prompt json custom\"]");
110
+ process.exit(1);
111
+ }
112
+
113
+ parsePDF(filePath, useVision, extractPrompt);
@@ -28,7 +28,7 @@ categories: [assets, images, ai, generation]
28
28
  Use the Image Generator when you need to create visual assets from text prompts. This skill calls the Openrouter API with AI image generation models and saves the resulting images locally.
29
29
 
30
30
  **IMPORTANT: Think twice before generating images.** Image generation costs money and takes time. Before generating:
31
- 1. Check if a suitable image already exists in the squad's assets folder
31
+ 1. Check if a suitable image already exists in the team's assets folder
32
32
  2. Check if a web search could find a free/open image that works
33
33
  3. Consider if the image is truly necessary for the content quality
34
34
  4. Only generate when no existing alternative is good enough
@@ -57,7 +57,7 @@ Use the Image Generator when you need to create visual assets from text prompts.
57
57
  ```bash
58
58
  python3 skills/image-generator/scripts/generate.py \
59
59
  --prompt "A detailed description of the image to generate" \
60
- --output "squads/{squad}/output/{run_id}/assets/image-name.jpg" \
60
+ --output "teams/{team}/output/{run_id}/assets/image-name.jpg" \
61
61
  --mode test
62
62
  ```
63
63
 
@@ -68,8 +68,8 @@ Use `--reference` to send a local image to the model as visual context. The mode
68
68
  ```bash
69
69
  python3 skills/image-generator/scripts/generate.py \
70
70
  --prompt "A social media banner featuring the company logo prominently in the center" \
71
- --output "squads/{squad}/output/{run_id}/assets/banner.jpg" \
72
- --reference "squads/{squad}/assets/logo.png" \
71
+ --output "teams/{team}/output/{run_id}/assets/banner.jpg" \
72
+ --reference "teams/{team}/assets/logo.png" \
73
73
  --mode production
74
74
  ```
75
75
 
@@ -79,7 +79,7 @@ Supported reference formats: PNG, JPEG, WEBP, GIF.
79
79
 
80
80
  ```bash
81
81
  python3 skills/image-generator/scripts/generate.py \
82
- --batch "squads/{squad}/output/{run_id}/assets/batch.json" \
82
+ --batch "teams/{team}/output/{run_id}/assets/batch.json" \
83
83
  --mode production
84
84
  ```
85
85
 
@@ -34,9 +34,9 @@ Use the Visual Renderer when you need to generate production-ready images from H
34
34
 
35
35
  1. **Generate HTML** -- Write a complete, self-contained HTML file with inline CSS. The HTML IS the design -- all styling, layout, fonts, colors, and content must be embedded.
36
36
 
37
- 2. **Save HTML** -- Write the HTML file to the squad's output folder (e.g., `output/slides/slide-01.html`)
37
+ 2. **Save HTML** -- Write the HTML file to the team's output folder (e.g., `output/slides/slide-01.html`)
38
38
 
39
- 3. **Start HTTP server** -- Before rendering, start a local HTTP server in the squad's output folder:
39
+ 3. **Start HTTP server** -- Before rendering, start a local HTTP server in the team's output folder:
40
40
  ```bash
41
41
  python -m http.server 8765 --directory "OUTPUT_DIR" &
42
42
  for i in $(seq 1 30); do curl -s http://localhost:8765 > /dev/null 2>&1 && break || sleep 0.1; done
@@ -65,7 +65,7 @@ Use these standard dimensions:
65
65
  - Twitter/X Post: 1200 x 675
66
66
  - LinkedIn Post: 1200 x 627
67
67
  - YouTube Thumbnail: 1280 x 720
68
- - Custom: as specified by the squad
68
+ - Custom: as specified by the team
69
69
 
70
70
  ### HTML Template Guidelines
71
71
 
@@ -3,15 +3,15 @@ name: image-fetcher
3
3
  description: >
4
4
  Acquires visual assets from multiple sources: web image search,
5
5
  live website screenshots via Playwright, and user-provided files.
6
- Organizes assets in the squad's reference folder.
6
+ Organizes assets in the team's reference folder.
7
7
  description_pt-BR: >
8
8
  Obtém assets visuais de múltiplas fontes: busca de imagens na web,
9
9
  capturas de sites via Playwright e arquivos fornecidos pelo usuário.
10
- Organiza os assets na pasta de referência do squad.
10
+ Organiza os assets na pasta de referência do team.
11
11
  description_es: >
12
12
  Obtiene assets visuales de múltiples fuentes: búsqueda de imágenes en la web,
13
13
  capturas de sitios vía Playwright y archivos proporcionados por el usuario.
14
- Organiza los assets en la carpeta de referencia del squad.
14
+ Organiza los assets en la carpeta de referencia del team.
15
15
  type: hybrid
16
16
  version: "1.0.0"
17
17
  mcp:
@@ -23,7 +23,7 @@ categories: [assets, scraping, automation, images]
23
23
 
24
24
  ## When to use
25
25
 
26
- Use the Asset Fetcher when you need to acquire visual assets for content creation. It supports three acquisition modes: web image search, live website screenshots via Playwright, and organizing user-provided files. All assets are saved to the squad's reference or output folder with descriptive filenames and metadata.
26
+ Use the Asset Fetcher when you need to acquire visual assets for content creation. It supports three acquisition modes: web image search, live website screenshots via Playwright, and organizing user-provided files. All assets are saved to the team's reference or output folder with descriptive filenames and metadata.
27
27
 
28
28
  ## Instructions
29
29
 
@@ -33,7 +33,7 @@ Use the Asset Fetcher when you need to acquire visual assets for content creatio
33
33
 
34
34
  2. **Live Screenshot** -- Use Playwright MCP to navigate to a URL, set viewport dimensions, and capture a screenshot.
35
35
 
36
- 3. **Asset Organization** -- Save all acquired assets with descriptive filenames in the squad's reference/ or output/ folder.
36
+ 3. **Asset Organization** -- Save all acquired assets with descriptive filenames in the team's reference/ or output/ folder.
37
37
 
38
38
  ### Screenshot Modes
39
39
 
@@ -39,7 +39,7 @@ Use the Instagram Publisher when you need to publish carousel posts directly to
39
39
 
40
40
  ### Workflow
41
41
 
42
- 1. List JPEG files in `squads/{squad}/output/images/` sorted by name.
42
+ 1. List JPEG files in `teams/{team}/output/images/` sorted by name.
43
43
  If no files found: stop and ask the user to add images before continuing.
44
44
  2. Present the image list to the user with AskUserQuestion to confirm order.
45
45
  3. Extract the caption from the content draft:
@@ -47,7 +47,7 @@ Use the Instagram Publisher when you need to publish carousel posts directly to
47
47
  - Max 2200 characters (Instagram limit)
48
48
  4. Run the publish script:
49
49
  ```
50
- node --env-file=.env squads/{squad}/tools/publish.js \
50
+ node --env-file=.env teams/{team}/tools/publish.js \
51
51
  --images "<comma-separated-ordered-paths>" \
52
52
  --caption "<caption>"
53
53
  ```
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: jurisprudencia-validator
3
+ description: Skill de validação de URLs anti-alucinação para links de jurisprudência e doutrina.
4
+ ---
5
+
6
+ # Jurisprudencia Validator
7
+
8
+ ## Objetivo
9
+ O objetivo principal desta skill é auditar petições, teses e pareceres elaborados pelos agentes para evitar a inclusão de "alucinações" - links quebrados, URLs inventadas para jurisprudências e metadados falsos. O script central faz um fetch das URLs, evadindo bloqueios de raspagem simples, para confirmar que a página está ativa e o título condiz com a tese.
10
+
11
+ ## Como Usar
12
+
13
+ Sempre que atuar numa revisão de documento ou após pesquisar jurisprudência para inserção em uma peça, você **DEVE OBRIGATORIAMENTE** passar as URLs citadas pelo validador antes de entregar para o usuário final.
14
+
15
+ ### Executando a Validação
16
+
17
+ Utilize o script Node.js incluso no diretório da skill passando a(s) URL(s) como argumento:
18
+
19
+ ```bash
20
+ node skills/jurisprudencia-validator/scripts/validate-urls.js "https://stj.jus.br/exemplo1" "https://jusbrasil.com.br/exemplo2"
21
+ ```
22
+
23
+ ### Interpretando a Resposta JSON
24
+
25
+ O script joga erros genéricos/logs no banco de dados interno ou `stderr`, então sempre faça o parse do `stdout` na resposta. O retorno será similar a isto:
26
+
27
+ ```json
28
+ [
29
+ {
30
+ "url": "https://stj.jus.br/exemplo1",
31
+ "status": "ok",
32
+ "title": "Superior Tribunal de Justiça - AgRg no Resp 1234..."
33
+ },
34
+ {
35
+ "url": "https://jusbrasil.com.br/exemplo2",
36
+ "status": "dead",
37
+ "reason": "Página não encontrada (404)"
38
+ }
39
+ ]
40
+ ```
41
+
42
+ ### Regras de Ouro
43
+ 1. **Política Zero Alucinação**: Se o link retornar `status: "dead"`, **remova a citação imediatamente** da peça documental e procure outra, ou avise a `Team` que a jurisprudência está inválida e perigosa.
44
+ 2. **Páginas Inconclusivas**: Se o link retornar `status: "unknown"`, você tem permissão legal e discricionária para manter a URL caso a argumentação da jurisprudência seja muito sólida (Tribunais podem estar indisponíveis periodicamente). No entanto, inclua um disclaimer.
45
+ 3. **Validação de Conformidade**: Valide se o `title` retornado pertence ao Tribunal ou assunto narrado para garantir assertividade contextual.
@@ -0,0 +1,103 @@
1
+ import cloudscraper from 'cloudscraper';
2
+ import * as cheerio from 'cheerio';
3
+ import puppeteer from 'puppeteer-extra';
4
+ import StealthPlugin from 'puppeteer-extra-plugin-stealth';
5
+ import { fileURLToPath } from 'url';
6
+ import path from 'path';
7
+
8
+ puppeteer.use(StealthPlugin());
9
+
10
+ /**
11
+ * Valida uma única URL
12
+ * Retorna { url, status: 'ok'|'dead'|'unknown', title: string|null, reason?: string }
13
+ */
14
+ async function validateUrl(url) {
15
+ try {
16
+ // 1. Tentar cloudscraper primeiro para maior velocidade
17
+ const html = await cloudscraper.get(url, { headers: { 'Accept-Language': 'pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7' } });
18
+ const $ = cheerio.load(html);
19
+ const title = $('title').text().trim();
20
+
21
+ // Checar se é bloqueio ou CAPTCHA disfarçado de sucesso
22
+ const titleLower = title.toLowerCase();
23
+ if (titleLower.includes('captcha') || titleLower.includes('acesso negado') || html.includes('Incapsula')) {
24
+ throw new Error('Cloudscraper bloqueado/captcha, caindo para fallback Puppeteer');
25
+ }
26
+
27
+ return {
28
+ url,
29
+ status: 'ok',
30
+ title: title || 'Sem Título',
31
+ };
32
+ } catch (error) {
33
+ // Se for 404 real no cloudscraper
34
+ if (error.statusCode === 404) {
35
+ return { url, status: 'dead', reason: 'Página não encontrada (404)' };
36
+ }
37
+
38
+ // 2. Fallback para Puppeteer (Contorno mais robusto para JS Challenges/Cloudflare)
39
+ let browser = null;
40
+ try {
41
+ browser = await puppeteer.launch({
42
+ headless: "new",
43
+ args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage']
44
+ });
45
+ const page = await browser.newPage();
46
+
47
+ // Timeout longo pois acessos jurídicos podem ser lentos e captchas invisiveis tomam tempo
48
+ page.setDefaultNavigationTimeout(30000);
49
+
50
+ const response = await page.goto(url, { waitUntil: 'domcontentloaded' });
51
+ const status = response ? response.status() : null;
52
+ let title = await page.title();
53
+ title = title ? title.trim() : null;
54
+
55
+ if (status === 404) {
56
+ return { url, status: 'dead', reason: `Erro ${status}` };
57
+ }
58
+
59
+ if (status && status >= 200 && status < 400) {
60
+ return { url, status: 'ok', title: title || 'Sem Título' };
61
+ }
62
+
63
+ return { url, status: 'unknown', reason: `Status HTTP: ${status}` };
64
+
65
+ } catch (pupError) {
66
+ return { url, status: 'unknown', reason: `Inconclusivo (timeout/rede): ${pupError.message}` };
67
+ } finally {
68
+ if (browser) {
69
+ await browser.close();
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ async function main() {
76
+ const args = process.argv.slice(2);
77
+ if (args.length === 0) {
78
+ console.error("Uso: node validate-urls.js <url1> [url2] ...");
79
+ process.exit(1);
80
+ }
81
+
82
+ const results = [];
83
+ for (const url of args) {
84
+ // Log para stderr para não poluir o stdout que terá o JSON
85
+ console.error(`Validando URL: ${url}`);
86
+ const res = await validateUrl(url);
87
+ results.push(res);
88
+ }
89
+
90
+ // Output estrito em JSON para o stdout (útil para parse das LLMs)
91
+ console.log(JSON.stringify(results, null, 2));
92
+ }
93
+
94
+ // Execução direta a partir do terminal
95
+ const __filename = fileURLToPath(import.meta.url);
96
+ if (process.argv[1] === __filename) {
97
+ main().catch(err => {
98
+ console.error(err);
99
+ process.exit(1);
100
+ });
101
+ }
102
+
103
+ export { validateUrl };
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: "Precificação Jurídica"
3
+ description: "Motor de precificação de custas processuais e honorários advocatícios para o Conecte.se, contendo diretrizes anti-alucinação."
4
+ version: "1.0.0"
5
+ category: "Pipeline Secundário"
6
+ ---
7
+
8
+ # Precificação Jurídica - Diretrizes para o Agente
9
+
10
+ ## Objetivo
11
+ Esta skill permite ao agente estimar valores de honorários e custas processuais, utilizando os preceitos de cálculo extraídos dos fatos da causa.
12
+
13
+ ## O Protocolo "Halt & Catch" (Regra Zero Alucinação)
14
+ 1. **NUNCA PRESUMA VALORES FINANCEIROS.**
15
+ * Jamais tente "chutar" qual seja o *valor da causa* ou a *tabela de custas* se não estiver expressa nos documentos extraídos.
16
+ * Não adivinhe a alíquota base de honorários do Estado correspondente, muito menos crie médias inventadas.
17
+
18
+ 2. **Acione o script `pricing-engine.js`:**
19
+ Sempre que precisar precificar, você **DEVE** repassar os fatos e valores brutos ao script `scripts/pricing-engine.js`.
20
+
21
+ O comando esperado no sistema será algo como:
22
+ `node skills/legal-pricing/scripts/pricing-engine.js --payload='{"valorDaCausa": 10000, "taxaHonorarios": 0.20}'`
23
+
24
+ 3. **Se o script retornar falha por dados ausentes (`REQUIRED_USER_INPUT`):**
25
+ * O sistema automaticamente capturará essa falha.
26
+ * O script formatará um bloco em formato de instrução do qual você baseará sua resposta.
27
+ * Repasse EXATAMENTE o erro direcionando ao Advogado (usuário final) para ele responder à dúvida de valores.
28
+
29
+ ## Como Operar
30
+ 1. Forme o payload em JSON baseado na análise dos especialistas (`document-analyzer`).
31
+ 2. Tente calcular através do script de apoio.
32
+ 3. Se o script concluir, gere o "Quadro de Precificação Estimado".
33
+ 4. Se o script requisitar mais informações, interrompa imediatamente a pipeline e formalize o pedido de informações.
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * pricing-engine.js
5
+ *
6
+ * Script que lida com a matemática e as regras de precificação.
7
+ * Sua principal responsabilidade é jogar uma âncora de segurança (Halt & Catch) se faltarem os requisitos brutos
8
+ * da equipe ou dos extratores (por exemplo, qual o valor da causa/imóvel/etc).
9
+ */
10
+
11
+ const args = process.argv.slice(2);
12
+
13
+ // Expected payload format: --payload='{"valorDaCausa": 50000, "tabelaOabTaxa": 0.20, "tipoAcao": "civel"}'
14
+ let payloadStr = args.find(a => a.startsWith('--payload='))?.split('=')[1];
15
+
16
+ if (!payloadStr) {
17
+ console.error(JSON.stringify({
18
+ status: "ERROR",
19
+ message: "--payload ausente"
20
+ }));
21
+ process.exit(1);
22
+ }
23
+
24
+ let payload;
25
+ try {
26
+ payload = JSON.parse(payloadStr);
27
+ } catch (e) {
28
+ console.error(JSON.stringify({
29
+ status: "ERROR",
30
+ message: "Falha no parse do payload JSON"
31
+ }));
32
+ process.exit(1);
33
+ }
34
+
35
+ // HALT & CATCH (User Input Required Mechanism)
36
+ const missingFields = [];
37
+ if (typeof payload.valorDaCausa !== 'number') missingFields.push('valorDaCausa');
38
+
39
+ // If there's missing critical parameters, throw an instruction for the agent to prompt the human
40
+ if (missingFields.length > 0) {
41
+ const response = {
42
+ status: "REQUIRED_USER_INPUT",
43
+ target: "Advogado",
44
+ missingFields: missingFields,
45
+ instruction: `Você não possui dados vitais financeiros para prosseguir. Pergunte explicitamente ao usuário (Advogado): 'Para prosseguir com a precificação, por favor me informe o valor da causa exato. Qual seria este valor?'`
46
+ };
47
+ console.error(JSON.stringify(response, null, 2));
48
+ process.exit(2);
49
+ }
50
+
51
+ // CÁLCULO GERAL (Mockado com premissas base ou customizadas no payload)
52
+ const taxaCustasTj = payload.taxaCustasTj || 0.01; // default 1% custas inciais ex: TJ-SP
53
+ const taxaHonorarios = payload.tabelaOabTaxa || 0.20; // default 20% honorários OAB
54
+
55
+ const valorDaCausa = payload.valorDaCausa;
56
+ const estimativaCustasIniciais = valorDaCausa * taxaCustasTj;
57
+ const honorariosEstimados = valorDaCausa * taxaHonorarios;
58
+ const totalEstimado = valorDaCausa + estimativaCustasIniciais + honorariosEstimados;
59
+
60
+ const result = {
61
+ status: "SUCCESS",
62
+ data: {
63
+ valorDaCausa: valorDaCausa.toFixed(2),
64
+ custasIniciaisEstimadas: estimativaCustasIniciais.toFixed(2),
65
+ honorariosEstimados: honorariosEstimados.toFixed(2),
66
+ totalResponsabilidadeFinanceira: totalEstimado.toFixed(2),
67
+ aviso: "Cálculos matemáticos realizados pelo módulo Engine e validados via script seguro."
68
+ }
69
+ };
70
+
71
+ console.log(JSON.stringify(result, null, 2));
72
+ process.exit(0);
@@ -28,9 +28,9 @@ categories: [email, automation, communication]
28
28
 
29
29
  ## When to use
30
30
 
31
- Use this skill when a squad needs to send emails — welcome messages, notifications,
31
+ Use this skill when a team needs to send emails — welcome messages, notifications,
32
32
  reports, newsletters, or any transactional/marketing email. Resend handles delivery
33
- so the squad only needs to compose the content and call the MCP tools.
33
+ so the team only needs to compose the content and call the MCP tools.
34
34
 
35
35
  ## Instructions
36
36
 
@@ -8,18 +8,18 @@ categories: [design, visual, templates]
8
8
 
9
9
  # Template Designer
10
10
 
11
- Visual template selection and refinement for squad creation and editing.
11
+ Visual template selection and refinement for team creation and editing.
12
12
 
13
13
  ## When to Use
14
14
 
15
- - During squad creation: when the Design phase identifies an image design agent and the user opts to choose a template
16
- - During squad editing: when the user asks to define, edit, or change the visual identity / template of a design agent
17
- - Trigger: presence of `image-creator` skill (or similar image-producing skill) in the squad's skill list
15
+ - During team creation: when the Design phase identifies an image design agent and the user opts to choose a template
16
+ - During team editing: when the user asks to define, edit, or change the visual identity / template of a design agent
17
+ - Trigger: presence of `image-creator` skill (or similar image-producing skill) in the team's skill list
18
18
 
19
19
  ## Prerequisites
20
20
 
21
- - A squad with a design agent that produces images (uses `image-creator` skill)
22
- - Squad's `_build/` directory must exist (created during Discovery/Design phases)
21
+ - A team with a design agent that produces images (uses `image-creator` skill)
22
+ - Team's `_build/` directory must exist (created during Discovery/Design phases)
23
23
  - `image-creator` skill installed (for rendering HTML to PNG)
24
24
 
25
25
  ## How It Works
@@ -74,10 +74,10 @@ Templates that violate these rules are rejected — no exceptions.
74
74
 
75
75
  ### Step 1: Read Context
76
76
 
77
- Read these files to understand the squad:
78
- - `squads/{code}/_build/discovery.yaml` — platform, domain, tone, language
79
- - `squads/{code}/_build/design.yaml` — agents, purpose, skills
80
- - `squads/{code}/_investigations/consolidated-analysis.md` (if exists) — visual patterns from reference profiles
77
+ Read these files to understand the team:
78
+ - `teams/{code}/_build/discovery.yaml` — platform, domain, tone, language
79
+ - `teams/{code}/_build/design.yaml` — agents, purpose, skills
80
+ - `teams/{code}/_investigations/consolidated-analysis.md` (if exists) — visual patterns from reference profiles
81
81
  - `_conectese/_memory/company.md` — company name, brand, industry, target audience
82
82
  - `_conectese/_memory/preferences.md` — user preferences (language, style, tone)
83
83
 
@@ -93,19 +93,19 @@ Read the 3 base templates from `skills/template-designer/base-templates/`:
93
93
  ### Step 3: Generate Adapted Variations
94
94
 
95
95
  For each base template, create an adapted version:
96
- - Adjust colors to match the squad's domain/brand (use Sherlock palette if available, company brand colors from company.md if available)
96
+ - Adjust colors to match the team's domain/brand (use Sherlock palette if available, company brand colors from company.md if available)
97
97
  - Adjust typography following the platform-specific minimum font sizes from `image-design.md`
98
98
  - Replace example content with domain-relevant content that reflects the company's industry, audience, and language
99
99
  - Set the root container to the exact fixed dimensions from HARD RULES above. Never use percentage heights or auto heights.
100
- - Add any visual elements that match the squad's personality
100
+ - Add any visual elements that match the team's personality
101
101
  - Apply proper white space, visual hierarchy, and spacing rhythm per `image-design.md` methodology
102
102
 
103
103
  Write each adapted template as a **complete, self-contained HTML file** (with `<!DOCTYPE html>`, inline CSS, and Google Fonts imports if needed).
104
104
 
105
105
  Save to:
106
- - `squads/{code}/_build/template-a.html`
107
- - `squads/{code}/_build/template-b.html`
108
- - `squads/{code}/_build/template-c.html`
106
+ - `teams/{code}/_build/template-a.html`
107
+ - `teams/{code}/_build/template-b.html`
108
+ - `teams/{code}/_build/template-c.html`
109
109
 
110
110
  ### Step 4: Render as Images
111
111
 
@@ -114,23 +114,23 @@ Use the `image-creator` skill to render each HTML template as a PNG image:
114
114
  1. Read `skills/image-creator/SKILL.md` for rendering instructions
115
115
  2. Render each template HTML to PNG using the image-creator workflow
116
116
  3. Save rendered images to:
117
- - `squads/{code}/_build/template-a.png`
118
- - `squads/{code}/_build/template-b.png`
119
- - `squads/{code}/_build/template-c.png`
117
+ - `teams/{code}/_build/template-a.png`
118
+ - `teams/{code}/_build/template-b.png`
119
+ - `teams/{code}/_build/template-c.png`
120
120
 
121
121
  ### Step 5: Present to User
122
122
 
123
123
  Present the 3 template options to the user using **clickable markdown links with absolute file paths** so they can open and review:
124
124
 
125
- > "Here are 3 template options for your squad's visual identity:
125
+ > "Here are 3 template options for your team's visual identity:
126
126
  >
127
- > - [preview-a.png]({absolute_path}/squads/{code}/_build/template-a.png) — Template A
128
- > - [preview-b.png]({absolute_path}/squads/{code}/_build/template-b.png) — Template B
129
- > - [preview-c.png]({absolute_path}/squads/{code}/_build/template-c.png) — Template C
127
+ > - [preview-a.png]({absolute_path}/teams/{code}/_build/template-a.png) — Template A
128
+ > - [preview-b.png]({absolute_path}/teams/{code}/_build/template-b.png) — Template B
129
+ > - [preview-c.png]({absolute_path}/teams/{code}/_build/template-c.png) — Template C
130
130
  >
131
131
  > Click the links above to open each image. Tell me which one you prefer. I can also mix elements from different templates or adjust colors, fonts, and layout."
132
132
 
133
- **Important:** Always use the full absolute path (e.g., `d:\Coding Projects\conectese\squads\my-squad\_build\template-a.png`) inside the markdown link — relative paths are not clickable in the IDE.
133
+ **Important:** Always use the full absolute path (e.g., `d:\Coding Projects\conectese\teams\my-team\_build\template-a.png`) inside the markdown link — relative paths are not clickable in the IDE.
134
134
 
135
135
  ## Iteration Loop
136
136
 
@@ -146,13 +146,13 @@ When the user approves, create two files:
146
146
 
147
147
  ### 1. Template Reference HTML
148
148
 
149
- Save to: `squads/{code}/pipeline/data/template-reference.html`
149
+ Save to: `teams/{code}/pipeline/data/template-reference.html`
150
150
 
151
151
  The complete, self-contained HTML/CSS of the approved template at full resolution (e.g., 1080x1440). This is the literal example the design agent will use.
152
152
 
153
153
  ### 2. Visual Identity Rules
154
154
 
155
- Save to: `squads/{code}/pipeline/data/visual-identity.md`
155
+ Save to: `teams/{code}/pipeline/data/visual-identity.md`
156
156
 
157
157
  Extract structured rules from the approved template:
158
158
 
@@ -190,12 +190,12 @@ Extract structured rules from the approved template:
190
190
  - Color usage rules (when to use primary vs accent)
191
191
  ~~~
192
192
 
193
- ### 3. Update Squad Files
193
+ ### 3. Update Team Files
194
194
 
195
- If the squad is being created (Build phase hasn't run yet):
195
+ If the team is being created (Build phase hasn't run yet):
196
196
  - The design.yaml context now includes the template data — Build will pick it up
197
197
 
198
- If the squad already exists (editing flow):
199
- - Add `pipeline/data/template-reference.html` and `pipeline/data/visual-identity.md` to `squad.yaml` `data:` list
198
+ If the team already exists (editing flow):
199
+ - Add `pipeline/data/template-reference.html` and `pipeline/data/visual-identity.md` to `team.yaml` `data:` list
200
200
  - Update the design agent's `.agent.md` to reference both files
201
201
  - Update the design agent's tasks to include the rule: "always follow visual-identity.md and use template-reference.html as the base model"
package/src/agents-cli.js CHANGED
@@ -77,7 +77,7 @@ async function runList(targetDir) {
77
77
  console.log(` ${t('agentsNoneInstalled')}`);
78
78
  }
79
79
 
80
- console.log(`\n Browse available agents at: https://github.com/renatoasse/conectese/tree/main/agents\n`);
80
+ console.log(`\n Browse available agents at: https://github.com/henriqueadm-ai/conectese/tree/main/agents\n`);
81
81
  }
82
82
 
83
83
  async function runInstall(id, targetDir) {
package/src/agents.js CHANGED
@@ -81,7 +81,7 @@ export async function getAgentMeta(id) {
81
81
  }
82
82
 
83
83
  function validateAgentId(id) {
84
- if (!/^[a-z0-9][a-z0-9-]*$/.test(id)) {
84
+ if (!/^[a-z0-9][a-z0-9_-]*$/.test(id)) {
85
85
  throw new Error(`Invalid agent id: '${id}'`);
86
86
  }
87
87
  }
package/src/init.js CHANGED
@@ -18,7 +18,7 @@ const CANONICAL_SOURCES = [
18
18
  { src: join(PACKAGE_ROOT, 'dashboard'), dest: 'dashboard' },
19
19
  ];
20
20
 
21
- const DASHBOARD_EXCLUDES = ['node_modules', 'tsconfig.tsbuildinfo', 'squads'];
21
+ const DASHBOARD_EXCLUDES = ['node_modules', 'dist', 'tsconfig.tsbuildinfo', 'teams'];
22
22
 
23
23
  const LANGUAGES = [
24
24
  { label: 'Português (Brasil)', value: 'Português (Brasil)' },
@@ -81,6 +81,7 @@ export async function init(targetDir, options = {}) {
81
81
  await copyCanonicalSources(targetDir);
82
82
  await copyIdeTemplates(ides, targetDir);
83
83
  await installAllSkills(targetDir);
84
+ await mkdir(join(targetDir, 'teams'), { recursive: true });
84
85
  if (!options._skipPrompts) {
85
86
  await installDependencies(targetDir);
86
87
  }