@ruyfranca/myskills 1.0.28 → 1.0.30

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/index.js CHANGED
@@ -54,18 +54,33 @@ program
54
54
  .command('init')
55
55
  .description('Inicializa o Antigravity no projeto atual (instala todas as skills, agents, workflows, rules e scripts)')
56
56
  .action(async () => {
57
- const sourceDir = path.join(__dirname, '.agent');
58
- const destDir = path.join(process.cwd(), '.agent');
57
+ const destRoot = process.cwd();
58
+ const sourceAgentDir = path.join(__dirname, '.agent');
59
+ const destAgentDir = path.join(destRoot, '.agent');
59
60
 
60
61
  console.log(chalk.cyan('\n🚀 Inicializando kit completo do Antigravity...\n'));
61
62
 
62
63
  try {
63
- await fs.ensureDir(destDir);
64
- await fs.copy(sourceDir, destDir);
65
- console.log(chalk.green.bold('✅ Pasta .agent instalada com sucesso!\n'));
66
- console.log(chalk.gray('Isso inclui todas as skills, agents, workflows, rules e scripts de automação.\n'));
64
+ // Copy .agent/ folder (skills, agents, workflows, rules, scripts)
65
+ await fs.ensureDir(destAgentDir);
66
+ await fs.copy(sourceAgentDir, destAgentDir);
67
+ console.log(chalk.green(' Pasta .agent instalada!'));
68
+
69
+ // Copy root rule files so Antigravity picks them up automatically
70
+ const rootRuleFiles = ['AGENTS.md', 'GEMINI.md'];
71
+ for (const ruleFile of rootRuleFiles) {
72
+ const src = path.join(__dirname, ruleFile);
73
+ const dest = path.join(destRoot, ruleFile);
74
+ if (await fs.pathExists(src)) {
75
+ await fs.copy(src, dest, { overwrite: true });
76
+ console.log(chalk.green(` ✅ ${ruleFile} instalado na raiz!`));
77
+ }
78
+ }
79
+
80
+ console.log(chalk.green.bold('\n✅ Kit inicializado com sucesso!\n'));
81
+ console.log(chalk.gray('Inclui: skills, agents, workflows, rules, scripts e AGENTS.md na raiz.\n'));
67
82
  } catch (err) {
68
- console.error(chalk.red(`\n❌ Erro ao inicializar .agent: ${err.message}\n`));
83
+ console.error(chalk.red(`\n❌ Erro ao inicializar: ${err.message}\n`));
69
84
  }
70
85
  });
71
86
 
@@ -169,12 +184,13 @@ program
169
184
 
170
185
  program
171
186
  .command('update')
172
- .description('Atualiza skills, agents e workflows do projeto atual com a versão mais recente do kit')
187
+ .description('Atualiza skills, agents, workflows e rules do projeto atual com a versão mais recente do kit')
173
188
  .option('-s, --skills', 'Atualiza apenas as skills')
174
189
  .option('-a, --agents', 'Atualiza apenas os agents')
175
190
  .option('-w, --workflows', 'Atualiza apenas os workflows')
191
+ .option('-r, --rules', 'Atualiza apenas os arquivos de rules (AGENTS.md, GEMINI.md)')
176
192
  .action(async (options) => {
177
- const updateAll = !options.skills && !options.agents && !options.workflows;
193
+ const updateAll = !options.skills && !options.agents && !options.workflows && !options.rules;
178
194
  const destRoot = process.cwd();
179
195
  const srcRoot = __dirname;
180
196
 
@@ -257,6 +273,23 @@ program
257
273
  }
258
274
  }
259
275
 
276
+ // Update root rule files (AGENTS.md, GEMINI.md)
277
+ if (updateAll || options.rules) {
278
+ const rootRuleFiles = ['AGENTS.md', 'GEMINI.md'];
279
+ for (const ruleFile of rootRuleFiles) {
280
+ const src = path.join(srcRoot, ruleFile);
281
+ const dest = path.join(destRoot, ruleFile);
282
+ if (await fs.pathExists(src)) {
283
+ try {
284
+ await fs.copy(src, dest, { overwrite: true });
285
+ console.log(chalk.green(` ✅ ${ruleFile}: atualizado na raiz`));
286
+ } catch (err) {
287
+ console.error(chalk.red(` ❌ ${ruleFile}: ${err.message}`));
288
+ }
289
+ }
290
+ }
291
+ }
292
+
260
293
  // Instalar workflows globalmente para aparecerem no / do Antigravity
261
294
  if (updateAll || options.workflows) {
262
295
  const homeDir = process.env.HOME || process.env.USERPROFILE || '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruyfranca/myskills",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "Biblioteca de skills customizadas para Antigravity / Claude Code",
5
5
  "main": "index.js",
6
6
  "bin": {