bps-kit 1.4.1 → 1.5.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/.github/agents/teste.agent.md +33 -0
- package/CHANGELOG.md +12 -0
- package/README.md +3 -3
- package/bin/cli.js +2 -2
- package/bin/convert_to_vscode.js +30 -35
- package/package.json +1 -1
- package/templates/agents-template/rules/GEMINI.md +1 -1
- package/templates/agents-template/scripts/convert_to_vscode.js +83 -37
- package/templates/agents-template/workflows/setup-brain.md +2 -2
- package/templates/vault/loki-mode/references/openai-patterns.md +1 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Agente de teste para experimentar capacidades. Use quando quiser testar funcionalidades do bps-kit, explorar a estrutura do workspace, ou validar skills e workflows disponíveis."
|
|
3
|
+
name: "Teste"
|
|
4
|
+
tools: [read, search, todo]
|
|
5
|
+
argument-hint: "Descreva o que deseja testar ou explorar..."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Você é um agente de teste para o workspace **bps-kit**. Seu papel é explorar, validar e demonstrar as capacidades disponíveis no kit.
|
|
9
|
+
|
|
10
|
+
## Responsabilidades
|
|
11
|
+
|
|
12
|
+
- Explorar a estrutura de pastas e arquivos do workspace
|
|
13
|
+
- Listar skills, agents e workflows disponíveis
|
|
14
|
+
- Validar que arquivos de configuração estão corretos
|
|
15
|
+
- Responder perguntas sobre o conteúdo e organização do bps-kit
|
|
16
|
+
|
|
17
|
+
## Restrições
|
|
18
|
+
|
|
19
|
+
- NÃO execute comandos no terminal
|
|
20
|
+
- NÃO modifique arquivos existentes
|
|
21
|
+
- APENAS leia, pesquise e reporte o que encontrar
|
|
22
|
+
|
|
23
|
+
## Abordagem
|
|
24
|
+
|
|
25
|
+
1. Leia os arquivos relevantes para responder à solicitação
|
|
26
|
+
2. Pesquise por padrões específicos se necessário
|
|
27
|
+
3. Responda de forma clara e direta em português
|
|
28
|
+
|
|
29
|
+
## Formato de Saída
|
|
30
|
+
|
|
31
|
+
- Liste itens importantes com bullets
|
|
32
|
+
- Use títulos para organizar informações
|
|
33
|
+
- Indique caminhos de arquivo como links quando relevante
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ Todas as mudanças notáveis neste projeto serão documentadas neste arqui
|
|
|
5
5
|
O formato é baseado no [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
|
|
6
6
|
e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/).
|
|
7
7
|
|
|
8
|
+
## [1.5.0] - 2026-03-12
|
|
9
|
+
### Modificado
|
|
10
|
+
- **Migração estrutural completa para GitHub Copilot**: A conversão `--vscode` agora segue rigorosamente a arquitetura nativa do Copilot:
|
|
11
|
+
- **Rules** (`GEMINI.md`, `AGENTS.md`) agora vão para `.github/instructions/` como `gemini.instructions.md` e `agents.instructions.md` com frontmatter `applyTo: "**"` — anteriormente exportavam para `.github/copilot-instructions.md` e `.github/AGENTS.md` flat files.
|
|
12
|
+
- **Agents** permanecem em `.github/agents/*.agent.md` (sem mudança).
|
|
13
|
+
- **Workflows/Prompts** permanecem em `.github/prompts/*.prompt.md` (sem mudança).
|
|
14
|
+
- **Skills** permanecem em `.copilot-skills/` (sem mudança).
|
|
15
|
+
- **`convert_to_vscode.js`**: Refatorado com helper centralizado `applyPathReplacements()` eliminando duplicação de regex em 3 blocos. Todas as 3 cópias do script (bin/, templates/, src/) foram sincronizadas.
|
|
16
|
+
- **`cli.js`**: Mensagem pós-instalação VS Code atualizada para referenciar `.github/instructions/`.
|
|
17
|
+
- **`README.md`**: Seção "O que acontece após a instalação (VS Code)" reescrita com mapeamento correto.
|
|
18
|
+
- **`setup-brain.md`**: Lista de arquivos protegidos atualizada (ambas cópias: templates/ e src/).
|
|
19
|
+
|
|
8
20
|
## [1.4.1] - 2026-03-11
|
|
9
21
|
### Corrigido
|
|
10
22
|
- **`automation-specialist.md`**: Arquivo faltando em `src/agents/` — criado e sincronizado com `templates/`.
|
package/README.md
CHANGED
|
@@ -41,10 +41,10 @@ npx bps-kit@latest --upgrade
|
|
|
41
41
|
|
|
42
42
|
### ⚡ O que acontece após a instalação? (VS Code / Copilot)
|
|
43
43
|
Se você adicionou a flag `--vscode`, a arquitetura compilada será organicamente moldada para as regras da nuvem do GitHub (`.github/`):
|
|
44
|
-
- O manifesto base e
|
|
45
|
-
- As Skills ativas
|
|
44
|
+
- O manifesto base (GEMINI.md) e o routing (AGENTS.md) serão exportados para `.github/instructions/` como arquivos `.instructions.md` com `applyTo: "**"`.
|
|
45
|
+
- As Skills ativas são preservadas integralmente em `.copilot-skills/` protegendo o ciclo de vida e evitando sobrecarga de tokens.
|
|
46
46
|
- As 22 Personas são mapeadas individualmente em `.github/agents/*.agent.md` — com frontmatter Copilot nativo.
|
|
47
|
-
-
|
|
47
|
+
- As Workflows são convertidas em Copilot Prompts em `.github/prompts/*.prompt.md`.
|
|
48
48
|
- A gigantesca Vault contendo +1000 skills inativas será armazenada inteligentemente em isolamento (`.copilot-vault/`), salvando permanentemente seu limite de Chat no VS Code de travar.
|
|
49
49
|
|
|
50
50
|
### 🪄 Autocalibragem de Base de Código (Workflow Analyzer)
|
package/bin/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const fs = require('fs-extra');
|
|
4
4
|
const path = require('path');
|
|
@@ -254,7 +254,7 @@ async function runInstaller(opts = {}) {
|
|
|
254
254
|
|
|
255
255
|
console.log(chalk.yellow('\n💡 Next Steps:'));
|
|
256
256
|
if (opts.vscode) {
|
|
257
|
-
console.log(chalk.white('1. O GitHub Copilot Agent já deve estar lendo o `.github/
|
|
257
|
+
console.log(chalk.white('1. O GitHub Copilot Agent já deve estar lendo o `.github/instructions/`.'));
|
|
258
258
|
} else {
|
|
259
259
|
console.log(chalk.white('1. O sistema Antigravity já deve estar lendo o `.agents/rules/GEMINI.md`.'));
|
|
260
260
|
}
|
package/bin/convert_to_vscode.js
CHANGED
|
@@ -9,52 +9,55 @@ const chalk = require('chalk');
|
|
|
9
9
|
*/
|
|
10
10
|
async function convertToVsCode(destAgents, destBase) {
|
|
11
11
|
const gitHubDir = path.join(destBase, '.github');
|
|
12
|
+
const instructionsDir = path.join(gitHubDir, 'instructions');
|
|
12
13
|
|
|
13
14
|
console.log(chalk.dim(' [VS Code] Convertendo arquivos para sintaxe do Copilot...'));
|
|
14
15
|
|
|
15
|
-
// Garantir que
|
|
16
|
+
// Garantir que os diretórios .github e .github/instructions existem antes de qualquer escrita
|
|
16
17
|
await fs.ensureDir(gitHubDir);
|
|
18
|
+
await fs.ensureDir(instructionsDir);
|
|
17
19
|
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
if (await fs.pathExists(geminiPath)) {
|
|
21
|
-
let content = await fs.readFile(geminiPath, 'utf8');
|
|
22
|
-
// Adaptamos os caminhos na rule principal para o contexto do .github/ do VS Code
|
|
23
|
-
// Agora, skills são arquivos normais .md fora da pasta .github/ para evitar a autoinjeção estática e o overhead de 66 referências.
|
|
24
|
-
|
|
20
|
+
// Helper: aplica os path replacements padrão de .agents/ → Copilot
|
|
21
|
+
function applyPathReplacements(content) {
|
|
25
22
|
// Specific path patterns FIRST (before general .agents/ catch-all)
|
|
26
23
|
content = content.replace(/\.?\/?\.agents\/skills\//g, '.copilot-skills/');
|
|
27
24
|
content = content.replace(/\.?\/?\.agents\/vault\//g, '.copilot-vault/');
|
|
28
|
-
content = content.replace(/\.?\/?\.agents\/rules\/GEMINI\.md/g, '.github/
|
|
29
|
-
content = content.replace(/\.?\/?\.agents\/rules\/AGENTS\.md/g, '.github/
|
|
25
|
+
content = content.replace(/\.?\/?\.agents\/rules\/GEMINI\.md/g, '.github/instructions/gemini.instructions.md');
|
|
26
|
+
content = content.replace(/\.?\/?\.agents\/rules\/AGENTS\.md/g, '.github/instructions/agents.instructions.md');
|
|
30
27
|
content = content.replace(/\.?\/?\.agents\/VAULT_INDEX\.md/g, '.github/VAULT_INDEX.md');
|
|
31
28
|
content = content.replace(/\.?\/?\.agents\/ARCHITECTURE\.md/g, '.github/ARCHITECTURE.md');
|
|
32
29
|
content = content.replace(/\.?\/?\.agents\/agents\//g, '.github/agents/');
|
|
33
30
|
content = content.replace(/\.?\/?\.agents\/scripts\//g, '.github/scripts/');
|
|
31
|
+
return content;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 1. Converter a rule master GEMINI.md em .github/instructions/gemini.instructions.md
|
|
35
|
+
const geminiPath = path.join(destAgents, 'rules', 'GEMINI.md');
|
|
36
|
+
if (await fs.pathExists(geminiPath)) {
|
|
37
|
+
let content = await fs.readFile(geminiPath, 'utf8');
|
|
38
|
+
|
|
39
|
+
content = applyPathReplacements(content);
|
|
34
40
|
|
|
35
41
|
// Trocar sintaxe bruta de trigger pelo ApplyTo nativo
|
|
36
|
-
content = content.replace(/trigger:\s*always_on/g, 'applyTo: "
|
|
42
|
+
content = content.replace(/trigger:\s*always_on/g, 'applyTo: "**"');
|
|
43
|
+
|
|
44
|
+
// Garantir frontmatter correto para .instructions.md do Copilot
|
|
45
|
+
content = content.replace(/^---[\s\S]*?---/, `---\napplyTo: "**"\n---`);
|
|
37
46
|
|
|
38
47
|
// As workflows no VS Code estao desabrigadas da pasta nativa, sugerimos le-las do vault ou inline
|
|
39
48
|
content += `\n\n## 🔄 Workflows Base\nAs workflows antigas de Cursor (/brainstorm, etc) agora devem ser invocadas naturalmente no chat: "Rode o fluxo de brainstorm". Consulte o diretório .github/prompts/ para contexto.\n`;
|
|
40
49
|
|
|
41
|
-
await fs.writeFile(path.join(
|
|
50
|
+
await fs.writeFile(path.join(instructionsDir, 'gemini.instructions.md'), content);
|
|
42
51
|
}
|
|
43
52
|
|
|
44
|
-
// 1.1 Converter AGENTS.md (routing rules)
|
|
53
|
+
// 1.1 Converter AGENTS.md (routing rules) em .github/instructions/agents.instructions.md
|
|
45
54
|
const agentsMdPath = path.join(destAgents, 'rules', 'AGENTS.md');
|
|
46
55
|
if (await fs.pathExists(agentsMdPath)) {
|
|
47
56
|
let content = await fs.readFile(agentsMdPath, 'utf8');
|
|
48
|
-
content = content
|
|
49
|
-
content = content.replace(
|
|
50
|
-
content = content.replace(
|
|
51
|
-
|
|
52
|
-
content = content.replace(/\.?\/?\.agents\/VAULT_INDEX\.md/g, '.github/VAULT_INDEX.md');
|
|
53
|
-
content = content.replace(/\.?\/?\.agents\/ARCHITECTURE\.md/g, '.github/ARCHITECTURE.md');
|
|
54
|
-
content = content.replace(/\.?\/?\.agents\/agents\//g, '.github/agents/');
|
|
55
|
-
content = content.replace(/\.?\/?\.agents\/scripts\//g, '.github/scripts/');
|
|
56
|
-
content = content.replace(/trigger:\s*always_on/g, 'applyTo: "**/*"');
|
|
57
|
-
await fs.writeFile(path.join(gitHubDir, 'AGENTS.md'), content);
|
|
57
|
+
content = applyPathReplacements(content);
|
|
58
|
+
content = content.replace(/trigger:\s*always_on/g, 'applyTo: "**"');
|
|
59
|
+
content = content.replace(/^---[\s\S]*?---/, `---\napplyTo: "**"\n---`);
|
|
60
|
+
await fs.writeFile(path.join(instructionsDir, 'agents.instructions.md'), content);
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
// 2. Mover as skills ativas inteiras (em vez de achatar) para preservar scripts em python embutidos e sub documentações!
|
|
@@ -118,14 +121,9 @@ ${content}`;
|
|
|
118
121
|
|
|
119
122
|
// Converter referências visuais e lógicas residuais do Antigravity nativo
|
|
120
123
|
// para o equivalente funcional da arquitetura VS Code de forma escalonada!
|
|
121
|
-
content = content
|
|
122
|
-
content = content.replace(/\.?\/?\.agents\/skills\//g, '.copilot-skills/');
|
|
123
|
-
content = content.replace(/\.?\/?\.agents\/vault\//g, '.copilot-vault/');
|
|
124
|
-
content = content.replace(/\.?\/?\.agents\/VAULT_INDEX\.md/g, '.github/VAULT_INDEX.md');
|
|
125
|
-
content = content.replace(/\.?\/?\.agents\/agents\//g, '.github/agents/');
|
|
126
|
-
content = content.replace(/\.?\/?\.agents\/scripts\//g, '.github/scripts/');
|
|
124
|
+
content = applyPathReplacements(content);
|
|
127
125
|
content = content.replace(/\.?\/?\.agents\//g, '.github/');
|
|
128
|
-
content = content.replace(/GEMINI\.md/g, '
|
|
126
|
+
content = content.replace(/GEMINI\.md/g, 'gemini.instructions.md');
|
|
129
127
|
|
|
130
128
|
// Formato exigido para GitHub Copilot Prompts (.prompt.md)
|
|
131
129
|
const vsCodePromptContent = `---
|
|
@@ -143,11 +141,8 @@ ${content}`;
|
|
|
143
141
|
const archSrc = path.join(destAgents, 'ARCHITECTURE.md');
|
|
144
142
|
if (await fs.pathExists(archSrc)) {
|
|
145
143
|
let archContent = await fs.readFile(archSrc, 'utf8');
|
|
146
|
-
archContent = archContent
|
|
147
|
-
archContent = archContent.replace(
|
|
148
|
-
archContent = archContent.replace(/\.agents\/agents\//g, '.github/agents/');
|
|
149
|
-
archContent = archContent.replace(/\.agents\/scripts\//g, '.github/scripts/');
|
|
150
|
-
archContent = archContent.replace(/\.agents\//g, '.github/');
|
|
144
|
+
archContent = applyPathReplacements(archContent);
|
|
145
|
+
archContent = archContent.replace(/\.?\/?\.agents\//g, '.github/');
|
|
151
146
|
await fs.writeFile(path.join(gitHubDir, 'ARCHITECTURE.md'), archContent);
|
|
152
147
|
}
|
|
153
148
|
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@ ANTES de escrever QUALQUER código ou resposta:
|
|
|
35
35
|
- **📖 SKILLS FIRST**: Se não anunciou `📖 Using skill:` → VOLTE e releia este bloco.
|
|
36
36
|
- **⚠️ SEM SKILL**: Se nenhuma skill for relevante, diga: `⚠️ No skill used — responding from base knowledge.`
|
|
37
37
|
- **🛑 NUNCA** pule o Socratic Gate em requests de build/feature/create.
|
|
38
|
-
- **📣 PRE-FLIGHT
|
|
38
|
+
- **📣 PRE-FLIGHT (interno)**: Após rotear agente+skill (passos 1-7), verifique internamente: Agent≠orchestrator (a menos que seja multi-domínio)? Skills corretas? PT-BR ativo? — NÃO imprima esta verificação, apenas valide internamente.
|
|
39
39
|
- **🆘 /recall TRIGGER**: Se o usuário digitar `/recall` → PARE tudo, releia este arquivo imediatamente, e responda: `✅ Re-ancorado. Agent=[X] | Skill=[X] | PT-BR=SIM` antes de continuar.
|
|
40
40
|
|
|
41
41
|
---
|
|
@@ -9,78 +9,124 @@ const chalk = require('chalk');
|
|
|
9
9
|
*/
|
|
10
10
|
async function convertToVsCode(destAgents, destBase) {
|
|
11
11
|
const gitHubDir = path.join(destBase, '.github');
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
await fs.ensureDir(copilotInstructionsDir);
|
|
12
|
+
const instructionsDir = path.join(gitHubDir, 'instructions');
|
|
15
13
|
|
|
16
14
|
console.log(chalk.dim(' [VS Code] Convertendo arquivos para sintaxe do Copilot...'));
|
|
17
15
|
|
|
18
|
-
//
|
|
16
|
+
// Garantir que os diretórios .github e .github/instructions existem antes de qualquer escrita
|
|
17
|
+
await fs.ensureDir(gitHubDir);
|
|
18
|
+
await fs.ensureDir(instructionsDir);
|
|
19
|
+
|
|
20
|
+
// Helper: aplica os path replacements padrão de .agents/ → Copilot
|
|
21
|
+
function applyPathReplacements(content) {
|
|
22
|
+
content = content.replace(/\.?\/?\.agents\/skills\//g, '.copilot-skills/');
|
|
23
|
+
content = content.replace(/\.?\/?\.agents\/vault\//g, '.copilot-vault/');
|
|
24
|
+
content = content.replace(/\.?\/?\.agents\/rules\/GEMINI\.md/g, '.github/instructions/gemini.instructions.md');
|
|
25
|
+
content = content.replace(/\.?\/?\.agents\/rules\/AGENTS\.md/g, '.github/instructions/agents.instructions.md');
|
|
26
|
+
content = content.replace(/\.?\/?\.agents\/VAULT_INDEX\.md/g, '.github/VAULT_INDEX.md');
|
|
27
|
+
content = content.replace(/\.?\/?\.agents\/ARCHITECTURE\.md/g, '.github/ARCHITECTURE.md');
|
|
28
|
+
content = content.replace(/\.?\/?\.agents\/agents\//g, '.github/agents/');
|
|
29
|
+
content = content.replace(/\.?\/?\.agents\/scripts\//g, '.github/scripts/');
|
|
30
|
+
return content;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 1. Converter a rule master GEMINI.md em .github/instructions/gemini.instructions.md
|
|
19
34
|
const geminiPath = path.join(destAgents, 'rules', 'GEMINI.md');
|
|
20
35
|
if (await fs.pathExists(geminiPath)) {
|
|
21
36
|
let content = await fs.readFile(geminiPath, 'utf8');
|
|
22
|
-
|
|
23
|
-
content = content.replace(
|
|
24
|
-
content = content.replace(
|
|
25
|
-
content = content.replace(/\.\/\.agents\/rules\/GEMINI\.md/g, './.github/copilot-instructions.md');
|
|
37
|
+
content = applyPathReplacements(content);
|
|
38
|
+
content = content.replace(/trigger:\s*always_on/g, 'applyTo: "**"');
|
|
39
|
+
content = content.replace(/^---[\s\S]*?---/, `---\napplyTo: "**"\n---`);
|
|
26
40
|
|
|
27
|
-
|
|
28
|
-
content += `\n\n## 🔄 Workflows Base\nAs workflows antigas de Cursor (/brainstorm, etc) agora devem ser invocadas naturalmente no chat: "Rode o fluxo de brainstorm". Consulte o AGENTS.md para contexto.\n`;
|
|
41
|
+
content += `\n\n## 🔄 Workflows Base\nAs workflows antigas de Cursor (/brainstorm, etc) agora devem ser invocadas naturalmente no chat: "Rode o fluxo de brainstorm". Consulte o diretório .github/prompts/ para contexto.\n`;
|
|
29
42
|
|
|
30
|
-
await fs.writeFile(path.join(
|
|
43
|
+
await fs.writeFile(path.join(instructionsDir, 'gemini.instructions.md'), content);
|
|
31
44
|
}
|
|
32
45
|
|
|
33
|
-
//
|
|
46
|
+
// 1.1 Converter AGENTS.md (routing rules) em .github/instructions/agents.instructions.md
|
|
47
|
+
const agentsMdPath = path.join(destAgents, 'rules', 'AGENTS.md');
|
|
48
|
+
if (await fs.pathExists(agentsMdPath)) {
|
|
49
|
+
let content = await fs.readFile(agentsMdPath, 'utf8');
|
|
50
|
+
content = applyPathReplacements(content);
|
|
51
|
+
content = content.replace(/trigger:\s*always_on/g, 'applyTo: "**"');
|
|
52
|
+
content = content.replace(/^---[\s\S]*?---/, `---\napplyTo: "**"\n---`);
|
|
53
|
+
await fs.writeFile(path.join(instructionsDir, 'agents.instructions.md'), content);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 2. Mover as skills ativas inteiras para .copilot-skills/
|
|
34
57
|
const skillsDest = path.join(destAgents, 'skills');
|
|
58
|
+
const copilotSkillsDir = path.join(destBase, '.copilot-skills');
|
|
35
59
|
if (await fs.pathExists(skillsDest)) {
|
|
36
|
-
|
|
37
|
-
for (const skillName of skillsDirs) {
|
|
38
|
-
const skillFile = path.join(skillsDest, skillName, 'SKILL.md');
|
|
39
|
-
if (await fs.pathExists(skillFile)) {
|
|
40
|
-
let content = await fs.readFile(skillFile, 'utf8');
|
|
41
|
-
|
|
42
|
-
// Injetamos um frontmatter basico aceitavel pelo Copilot apontando para tudo (**/*)
|
|
43
|
-
// para que a Skill ative independente do arquivo no Workspace se for convocada.
|
|
44
|
-
const vsCodeContent = `---
|
|
45
|
-
description: ${skillName.replace(/-/g, ' ')}
|
|
46
|
-
applyTo: "**/*"
|
|
47
|
-
---
|
|
48
|
-
${content}`;
|
|
49
|
-
await fs.writeFile(path.join(copilotInstructionsDir, `${skillName}.instructions.md`), vsCodeContent);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
60
|
+
await fs.move(skillsDest, copilotSkillsDir, { overwrite: true });
|
|
52
61
|
}
|
|
53
62
|
|
|
54
|
-
// 3. Converter o Vault Index
|
|
63
|
+
// 3. Converter o Vault Index
|
|
55
64
|
const vaultIndexSrc = path.join(destAgents, 'VAULT_INDEX.md');
|
|
56
65
|
if (await fs.pathExists(vaultIndexSrc)) {
|
|
57
66
|
let content = await fs.readFile(vaultIndexSrc, 'utf8');
|
|
58
|
-
content = content.replace(
|
|
59
|
-
await fs.writeFile(path.join(
|
|
67
|
+
content = content.replace(/\.?\/?\.agents\/vault\//g, '.copilot-vault/');
|
|
68
|
+
await fs.writeFile(path.join(gitHubDir, 'VAULT_INDEX.md'), content);
|
|
60
69
|
}
|
|
61
70
|
|
|
62
|
-
// 4. Mover o Vault inteiro para
|
|
71
|
+
// 4. Mover o Vault inteiro para .copilot-vault/
|
|
63
72
|
const vaultSrc = path.join(destAgents, 'vault');
|
|
64
73
|
const copilotVaultDir = path.join(destBase, '.copilot-vault');
|
|
65
74
|
if (await fs.pathExists(vaultSrc)) {
|
|
66
75
|
await fs.move(vaultSrc, copilotVaultDir, { overwrite: true });
|
|
67
76
|
}
|
|
68
77
|
|
|
69
|
-
// 5.
|
|
78
|
+
// 5. Mover as personas (AGENTS) para .github/agents/ como .agent.md
|
|
70
79
|
const agentsSrc = path.join(destAgents, 'agents');
|
|
80
|
+
const copilotAgentsDir = path.join(gitHubDir, 'agents');
|
|
71
81
|
if (await fs.pathExists(agentsSrc)) {
|
|
82
|
+
await fs.ensureDir(copilotAgentsDir);
|
|
72
83
|
const agentFiles = await fs.readdir(agentsSrc);
|
|
73
|
-
let consolidatedAgents = `# 🤖 Antigravity Copilot Agents Roster\n\n`;
|
|
74
84
|
for (const agent of agentFiles) {
|
|
75
85
|
if (agent.endsWith('.md')) {
|
|
76
86
|
const content = await fs.readFile(path.join(agentsSrc, agent), 'utf8');
|
|
77
|
-
|
|
87
|
+
const agentName = agent.replace('.md', '');
|
|
88
|
+
const vsCodeAgentContent = `---\ndescription: 'Agente especializado: ${agentName}. Use para tarefas relacionadas a esse domínio.'\ntools: []\n---\n${content}`;
|
|
89
|
+
await fs.writeFile(path.join(copilotAgentsDir, `${agentName}.agent.md`), vsCodeAgentContent);
|
|
78
90
|
}
|
|
79
91
|
}
|
|
80
|
-
await fs.writeFile(path.join(gitHubDir, 'AGENTS.md'), consolidatedAgents);
|
|
81
92
|
}
|
|
82
93
|
|
|
83
|
-
//
|
|
94
|
+
// 6. Converter Workflows em Copilot Prompts (.github/prompts/)
|
|
95
|
+
const workflowsSrc = path.join(destAgents, 'workflows');
|
|
96
|
+
const copilotPromptsDir = path.join(gitHubDir, 'prompts');
|
|
97
|
+
if (await fs.pathExists(workflowsSrc)) {
|
|
98
|
+
await fs.ensureDir(copilotPromptsDir);
|
|
99
|
+
const workflowFiles = await fs.readdir(workflowsSrc);
|
|
100
|
+
for (const workflow of workflowFiles) {
|
|
101
|
+
if (workflow.endsWith('.md')) {
|
|
102
|
+
let content = await fs.readFile(path.join(workflowsSrc, workflow), 'utf8');
|
|
103
|
+
const promptName = workflow.replace('.md', '');
|
|
104
|
+
content = applyPathReplacements(content);
|
|
105
|
+
content = content.replace(/\.?\/?\.agents\//g, '.github/');
|
|
106
|
+
content = content.replace(/GEMINI\.md/g, 'gemini.instructions.md');
|
|
107
|
+
const vsCodePromptContent = `---\nagent: agent\n---\n${content}`;
|
|
108
|
+
await fs.writeFile(path.join(copilotPromptsDir, `${promptName}.prompt.md`), vsCodePromptContent);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// 7. Copiar ARCHITECTURE.md para .github/
|
|
114
|
+
const archSrc = path.join(destAgents, 'ARCHITECTURE.md');
|
|
115
|
+
if (await fs.pathExists(archSrc)) {
|
|
116
|
+
let archContent = await fs.readFile(archSrc, 'utf8');
|
|
117
|
+
archContent = applyPathReplacements(archContent);
|
|
118
|
+
archContent = archContent.replace(/\.?\/?\.agents\//g, '.github/');
|
|
119
|
+
await fs.writeFile(path.join(gitHubDir, 'ARCHITECTURE.md'), archContent);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// 8. Mover scripts de validação para .github/scripts/
|
|
123
|
+
const scriptsSrc = path.join(destAgents, 'scripts');
|
|
124
|
+
const scriptsDestDir = path.join(gitHubDir, 'scripts');
|
|
125
|
+
if (await fs.pathExists(scriptsSrc)) {
|
|
126
|
+
await fs.move(scriptsSrc, scriptsDestDir, { overwrite: true });
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Limpeza: remover a pasta .agents/ já migrada
|
|
84
130
|
await fs.remove(destAgents);
|
|
85
131
|
}
|
|
86
132
|
|
|
@@ -38,10 +38,10 @@ Este workflow permite que eu (o seu agente Antigravity) faça uma varredura comp
|
|
|
38
38
|
|
|
39
39
|
6. **Atualização do ARCHITECTURE.md (OBRIGATÓRIO após mover skills)**:
|
|
40
40
|
- Atualize SOMENTE a tabela de skills no `ARCHITECTURE.md` para refletir quais skills estão ativas vs vault.
|
|
41
|
-
- **🔴 NÃO EDITE os arquivos de regras (GEMINI.md, AGENTS.md,
|
|
41
|
+
- **🔴 NÃO EDITE os arquivos de regras (GEMINI.md, AGENTS.md, gemini.instructions.md, agents.instructions.md).** Esses arquivos contêm routing genérico que funciona para qualquer stack — o Intent Map e a Keyword→Agent table são universais e não devem ser alterados pelo setup-brain.
|
|
42
42
|
|
|
43
43
|
### Critérios de Sucesso
|
|
44
44
|
- **Precisão**: Apenas skills de altíssimo valor agregado (diretamente conectadas com a stack) serão movidas. Não encha o contexto em vão. Você foi programado para manter seu Token footprint baixo.
|
|
45
45
|
- O `ARCHITECTURE.md` deve refletir as skills ativas atualizadas.
|
|
46
|
-
- **🔴 PROIBIDO**: Editar GEMINI.md, AGENTS.md, ou
|
|
46
|
+
- **🔴 PROIBIDO**: Editar GEMINI.md, AGENTS.md, gemini.instructions.md, ou agents.instructions.md. O routing é genérico por design.
|
|
47
47
|
- Encerre rodando uma mensagem informando o resultado "Cérebro Calibrado e Otimizado para este ecossistema."
|