@maestro-ai/cli 1.0.0 → 1.1.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/README.md +121 -19
- package/content/rules/GEMINI.md +841 -0
- package/content/rules/RULES.md +835 -0
- package/content/rules/adapters/copilot.md +10 -0
- package/content/rules/adapters/cursor.md +10 -0
- package/content/rules/adapters/gemini.md +13 -0
- package/content/rules/adapters/windsurf.md +10 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +47 -15
- package/dist/index.js +10 -2
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
system: maestro
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: Adapter for Gemini/Antigravity IDE
|
|
6
|
+
target_path: .gemini/GEMINI.md
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Gemini Adapter
|
|
10
|
+
|
|
11
|
+
Este adaptador adiciona o frontmatter específico para Gemini/Antigravity.
|
|
12
|
+
|
|
13
|
+
O conteúdo de `RULES.md` será inserido automaticamente pelo CLI.
|
package/dist/commands/init.d.ts
CHANGED
package/dist/commands/init.js
CHANGED
|
@@ -5,6 +5,24 @@ import fse from 'fs-extra';
|
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
import ora from 'ora';
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const IDE_CONFIGS = {
|
|
9
|
+
gemini: {
|
|
10
|
+
path: '.gemini/GEMINI.md',
|
|
11
|
+
header: '---\ntrigger: always_on\nsystem: maestro\nversion: 1.0.0\n---\n\n'
|
|
12
|
+
},
|
|
13
|
+
cursor: {
|
|
14
|
+
path: '.cursorrules',
|
|
15
|
+
header: ''
|
|
16
|
+
},
|
|
17
|
+
copilot: {
|
|
18
|
+
path: '.github/copilot-instructions.md',
|
|
19
|
+
header: ''
|
|
20
|
+
},
|
|
21
|
+
windsurf: {
|
|
22
|
+
path: '.windsurfrules',
|
|
23
|
+
header: ''
|
|
24
|
+
}
|
|
25
|
+
};
|
|
8
26
|
export async function init(options = {}) {
|
|
9
27
|
const cwd = process.cwd();
|
|
10
28
|
const spinner = ora();
|
|
@@ -58,11 +76,29 @@ export async function init(options = {}) {
|
|
|
58
76
|
await fse.copy(workflowsSrc, workflowsDest, { overwrite: options.force });
|
|
59
77
|
}
|
|
60
78
|
spinner.succeed('Workflows copiados para .agent/workflows/');
|
|
61
|
-
// 5. Gerar
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
spinner.
|
|
79
|
+
// 5. Gerar arquivos de regras por IDE
|
|
80
|
+
const targetIdes = options.ide === 'all'
|
|
81
|
+
? Object.keys(IDE_CONFIGS)
|
|
82
|
+
: [options.ide || 'gemini'];
|
|
83
|
+
spinner.start(`Gerando regras para IDE(s): ${targetIdes.join(', ')}...`);
|
|
84
|
+
// Ler RULES.md base
|
|
85
|
+
const rulesPath = join(contentSource, 'rules', 'RULES.md');
|
|
86
|
+
let rulesContent = '';
|
|
87
|
+
if (await fse.pathExists(rulesPath)) {
|
|
88
|
+
rulesContent = await fse.readFile(rulesPath, 'utf-8');
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
rulesContent = generateDefaultRules();
|
|
92
|
+
}
|
|
93
|
+
// Gerar arquivo para cada IDE alvo
|
|
94
|
+
for (const ide of targetIdes) {
|
|
95
|
+
const config = IDE_CONFIGS[ide];
|
|
96
|
+
const targetPath = join(cwd, config.path);
|
|
97
|
+
await fse.ensureDir(dirname(targetPath));
|
|
98
|
+
const content = config.header + rulesContent;
|
|
99
|
+
await fse.writeFile(targetPath, content);
|
|
100
|
+
}
|
|
101
|
+
spinner.succeed(`Regras geradas para: ${targetIdes.join(', ')}`);
|
|
66
102
|
// Resumo
|
|
67
103
|
console.log(chalk.green.bold('\n✅ Maestro inicializado com sucesso!\n'));
|
|
68
104
|
console.log(chalk.dim('Estrutura criada:'));
|
|
@@ -79,7 +115,9 @@ export async function init(options = {}) {
|
|
|
79
115
|
console.log(chalk.dim(' .agent/'));
|
|
80
116
|
console.log(chalk.dim(' ├── skills/'));
|
|
81
117
|
console.log(chalk.dim(' └── workflows/'));
|
|
82
|
-
|
|
118
|
+
for (const ide of targetIdes) {
|
|
119
|
+
console.log(chalk.dim(` ${IDE_CONFIGS[ide].path}`));
|
|
120
|
+
}
|
|
83
121
|
console.log(chalk.blue('\n📋 Próximos passos:'));
|
|
84
122
|
console.log(' 1. Configure o MCP na sua IDE:');
|
|
85
123
|
console.log(chalk.gray(' "mcpServers": { "maestro": { "serverUrl": "https://maestro.deluna.dev.br/mcp" } }'));
|
|
@@ -92,16 +130,10 @@ export async function init(options = {}) {
|
|
|
92
130
|
process.exit(1);
|
|
93
131
|
}
|
|
94
132
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
97
|
-
trigger: always_on
|
|
98
|
-
system: maestro
|
|
99
|
-
version: 1.0.0
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
# Maestro - Desenvolvimento Assistido por IA
|
|
133
|
+
function generateDefaultRules() {
|
|
134
|
+
return `# MCP Maestro Development Kit - AI Rules
|
|
103
135
|
|
|
104
|
-
> Este
|
|
136
|
+
> Este arquivo define como a IA deve se comportar ao trabalhar com o sistema MCP Maestro.
|
|
105
137
|
|
|
106
138
|
## Configuração MCP
|
|
107
139
|
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,20 @@ const program = new Command();
|
|
|
6
6
|
program
|
|
7
7
|
.name('maestro')
|
|
8
8
|
.description('CLI para inicializar projetos com Maestro - Desenvolvimento assistido por IA')
|
|
9
|
-
.version('1.0.0')
|
|
9
|
+
.version('1.0.0')
|
|
10
|
+
.option('-f, --force', 'Sobrescreve arquivos existentes')
|
|
11
|
+
.option('--minimal', 'Instala apenas workflows e rules')
|
|
12
|
+
.option('--ide <ide>', 'IDE alvo: gemini, cursor, copilot, windsurf, all (default: all)', 'all')
|
|
13
|
+
.action(async (options) => {
|
|
14
|
+
// Comportamento padrão: executa init quando chamado sem subcomando
|
|
15
|
+
await init(options);
|
|
16
|
+
});
|
|
10
17
|
program
|
|
11
18
|
.command('init')
|
|
12
19
|
.description('Inicializa Maestro no projeto atual')
|
|
13
20
|
.option('-f, --force', 'Sobrescreve arquivos existentes')
|
|
14
|
-
.option('--minimal', 'Instala apenas workflows e
|
|
21
|
+
.option('--minimal', 'Instala apenas workflows e rules')
|
|
22
|
+
.option('--ide <ide>', 'IDE alvo: gemini, cursor, copilot, windsurf, all (default: all)', 'all')
|
|
15
23
|
.action(init);
|
|
16
24
|
program
|
|
17
25
|
.command('update')
|