orca-multiagent-kit 1.1.0 → 1.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.
- package/CHANGELOG.md +24 -1
- package/README.md +6 -4
- package/VERSION +1 -1
- package/bin/omk.js +39 -11
- package/bin/ui.js +165 -0
- package/core/AGENTS.md +1 -1
- package/docs/MANUAL.md +1 -1
- package/install.sh +183 -77
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ El formato sigue [Keep a Changelog](https://keepachangelog.com/es-ES/1.1.0/) y e
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [1.2.0] - 2026-11-07
|
|
9
|
+
|
|
10
|
+
### Añadido
|
|
11
|
+
- **Salida nueva de `omk`**: spinner por fase, color lima, símbolos de estado (`+` creado, `=` sin cambios, `!` aviso) y tiempo total. Sin dependencias.
|
|
12
|
+
- El resumen final separa **Pendiente** (lo que tienes que hacer tú) de **Para tu información**, y acaba con los siguientes pasos (`omk verify`, `omk init`, `omk restore`).
|
|
13
|
+
- `omk verify` agrupa las comprobaciones por agente y da un total.
|
|
14
|
+
- Cursor: el instalador detecta si ya tienes la regla de usuario y deja de pedirla.
|
|
15
|
+
- `./install.sh` sin `omk` muestra la misma estructura en texto, con color en terminal.
|
|
16
|
+
- `omk update` compara con la última versión de npm y, si no tienes permisos (instalación con `sudo`), explica cómo arreglarlo en vez de mostrar el error de npm.
|
|
17
|
+
- La release se publica sola al fusionar en `main` un cambio de `VERSION` (GitHub y npm).
|
|
18
|
+
- `check.sh` detecta `$VAR` pegado a un carácter no ASCII, que rompe bash 3.2 en macOS.
|
|
19
|
+
|
|
20
|
+
### Corregido
|
|
21
|
+
- `omk init` en un proyecto con spec-kit fallaba con «Directory not found: ~/.agents/speckit-ext/orca» si aún no se había ejecutado `omk install` con esta versión. Ahora usa la extensión del propio kit y avisa de que falta `omk install`.
|
|
22
|
+
- macOS: un mensaje con `«$FIX»` cortaba el instalador (bash 3.2 tomaba `«` como parte del nombre de la variable).
|
|
23
|
+
- «deshacer» solo aparece cuando hay copia de seguridad que restaurar.
|
|
24
|
+
- Banner: la barra de carga del pie, que no representaba nada, se sustituye por las skills que instala el kit.
|
|
25
|
+
|
|
26
|
+
### Cambiado
|
|
27
|
+
- Publicado en npm: `npx orca-multiagent-kit install` y `npm i -g orca-multiagent-kit`, sin el prefijo `github:`.
|
|
28
|
+
- Las releases publican en npm con Trusted Publishing (OIDC), sin tokens guardados en el repo.
|
|
29
|
+
|
|
8
30
|
## [1.1.0] - 2026-11-07
|
|
9
31
|
|
|
10
32
|
Orquestación automática: ya no hace falta conocer ni invocar fases. Escribes `/speckit.implement` (o pides la tarea con normalidad) y el kit decide si compensa repartirla.
|
|
@@ -51,6 +73,7 @@ Primera versión de **Orca Multiagent Kit**. Une CSR (Claude Session Rules, de [
|
|
|
51
73
|
### Eliminado
|
|
52
74
|
- Copias duplicadas de reglas y skills `csr-*` dentro de cada agente, y el plugin `claude-session-rules` de Antigravity.
|
|
53
75
|
|
|
54
|
-
[Unreleased]: https://github.com/FernandoBaqueroo/orca-multiagent-kit/compare/v1.
|
|
76
|
+
[Unreleased]: https://github.com/FernandoBaqueroo/orca-multiagent-kit/compare/v1.2.0...HEAD
|
|
77
|
+
[1.2.0]: https://github.com/FernandoBaqueroo/orca-multiagent-kit/compare/v1.1.0...v1.2.0
|
|
55
78
|
[1.1.0]: https://github.com/FernandoBaqueroo/orca-multiagent-kit/compare/v1.0.0...v1.1.0
|
|
56
79
|
[1.0.0]: https://github.com/FernandoBaqueroo/orca-multiagent-kit/releases/tag/v1.0.0
|
package/README.md
CHANGED
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|

|
|
22
22
|

|
|
23
23
|
|
|
24
|
+
[](https://www.npmjs.com/package/orca-multiagent-kit)
|
|
25
|
+
|
|
24
26
|
[**Descargar ZIP**](https://github.com/FernandoBaqueroo/orca-multiagent-kit/releases/latest/download/orca-multiagent-kit.zip) · [Web interactiva](https://fernandobaqueroo.github.io/orca-multiagent-kit/) · [Guía visual](https://fernandobaqueroo.github.io/orca-multiagent-kit/guia.html) · [Manual](docs/MANUAL.md) · [Changelog](CHANGELOG.md)
|
|
25
27
|
|
|
26
28
|
</div>
|
|
27
29
|
|
|
28
30
|
```bash
|
|
29
|
-
npx
|
|
31
|
+
npx orca-multiagent-kit install
|
|
30
32
|
```
|
|
31
33
|
|
|
32
34
|
---
|
|
@@ -68,13 +70,13 @@ Cuatro formas. Todas instalan lo mismo, hacen backup de lo que tocan y se deshac
|
|
|
68
70
|
|
|
69
71
|
**1. npx** (Node ≥ 18, sin instalar nada global)
|
|
70
72
|
```bash
|
|
71
|
-
npx
|
|
72
|
-
npx
|
|
73
|
+
npx orca-multiagent-kit install --dry-run # qué haría
|
|
74
|
+
npx orca-multiagent-kit install
|
|
73
75
|
```
|
|
74
76
|
|
|
75
77
|
**2. npm global**: deja el comando `omk` disponible siempre
|
|
76
78
|
```bash
|
|
77
|
-
npm install -g
|
|
79
|
+
npm install -g orca-multiagent-kit
|
|
78
80
|
omk install
|
|
79
81
|
```
|
|
80
82
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.2.0
|
package/bin/omk.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// omk — CLI de Orca Multiagent Kit. Sin dependencias: envuelve install.sh con comandos cortos.
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
const { spawnSync } = require('node:child_process');
|
|
5
|
+
const { spawn, spawnSync } = require('node:child_process');
|
|
6
6
|
const fs = require('node:fs');
|
|
7
7
|
const os = require('node:os');
|
|
8
8
|
const path = require('node:path');
|
|
9
9
|
|
|
10
10
|
const KIT = path.resolve(__dirname, '..');
|
|
11
11
|
const VERSION = fs.readFileSync(path.join(KIT, 'VERSION'), 'utf8').trim();
|
|
12
|
-
const REPO = '
|
|
12
|
+
const REPO = 'orca-multiagent-kit';
|
|
13
13
|
const AGENTS_HOME = process.env.AGENT_KIT_HOME || path.join(os.homedir(), '.agents');
|
|
14
14
|
|
|
15
15
|
const color = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
@@ -30,7 +30,7 @@ ${bold('Comandos')}
|
|
|
30
30
|
${lime('adopt')} <carpeta-skill> Comparte una skill externa con todos los agentes
|
|
31
31
|
${lime('backups')} Lista las copias de seguridad
|
|
32
32
|
${lime('restore')} <fecha> Deshace una instalación (fecha de "omk backups")
|
|
33
|
-
${lime('update')} Actualiza
|
|
33
|
+
${lime('update')} Actualiza a la última versión de npm y reinstala
|
|
34
34
|
${lime('where')} Muestra dónde está cada cosa
|
|
35
35
|
${lime('version')} Muestra la versión
|
|
36
36
|
${lime('help')} Esta ayuda
|
|
@@ -38,7 +38,7 @@ ${bold('Comandos')}
|
|
|
38
38
|
${bold('Agentes')} claude · antigravity · codex · copilot · cursor · devin (opcional)
|
|
39
39
|
|
|
40
40
|
${bold('Ejemplos')}
|
|
41
|
-
npx
|
|
41
|
+
npx orca-multiagent-kit install --dry-run
|
|
42
42
|
omk install
|
|
43
43
|
omk init ~/Dev/mi-app
|
|
44
44
|
omk adopt ~/.gemini/config/plugins/user-workflows/skills/impeccable
|
|
@@ -63,9 +63,14 @@ function findBash() {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
function runInstaller(args) {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const child = spawn(findBash(), [path.join(KIT, 'install.sh'), ...args], {
|
|
67
|
+
stdio: ['inherit', 'pipe', 'pipe'],
|
|
68
|
+
env: { ...process.env, OMK_CLI: '1', OMK_EVENTS: '1' },
|
|
69
|
+
});
|
|
70
|
+
child.on('error', (e) => die(e.message));
|
|
71
|
+
// Ctrl+C: deja la terminal limpia (sin el spinner a medias)
|
|
72
|
+
process.on('SIGINT', () => { process.stdout.write('\r\x1b[2K'); child.kill('SIGINT'); process.exit(130); });
|
|
73
|
+
require('./ui').render(child).then((code) => process.exit(code));
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
function listBackups() {
|
|
@@ -113,11 +118,34 @@ switch (cmd) {
|
|
|
113
118
|
break;
|
|
114
119
|
|
|
115
120
|
case 'update': {
|
|
116
|
-
console.log(lime('Actualizando desde ' + REPO + ' …'));
|
|
117
121
|
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
const sh = { encoding: 'utf8', shell: process.platform === 'win32' };
|
|
123
|
+
const latest = (spawnSync(npm, ['view', REPO, 'version'], sh).stdout || '').trim();
|
|
124
|
+
if (!latest) die('no se pudo consultar npm. ¿Hay conexión?');
|
|
125
|
+
if (latest === VERSION && !rest.includes('--force')) {
|
|
126
|
+
console.log(`${lime('✓')} Ya tienes la última versión (${VERSION}). Reaplicando la instalación…`);
|
|
127
|
+
} else {
|
|
128
|
+
console.log(`${lime('›')} Actualizando ${dim(VERSION)} → ${lime(latest)}`);
|
|
129
|
+
const prefix = (spawnSync(npm, ['prefix', '-g'], sh).stdout || '').trim();
|
|
130
|
+
const libdir = process.platform === 'win32' ? prefix : path.join(prefix, 'lib', 'node_modules');
|
|
131
|
+
let writable = true;
|
|
132
|
+
try {
|
|
133
|
+
fs.accessSync(libdir, fs.constants.W_OK);
|
|
134
|
+
if (fs.existsSync(path.join(libdir, REPO))) fs.accessSync(path.join(libdir, REPO), fs.constants.W_OK);
|
|
135
|
+
} catch { writable = false; }
|
|
136
|
+
if (!writable) {
|
|
137
|
+
die(`no tienes permiso para escribir en ${libdir} (instalaste omk con sudo o Node está en una carpeta del sistema).
|
|
138
|
+
|
|
139
|
+
Rápido: sudo npm i -g ${REPO}@latest && omk install
|
|
140
|
+
Recomendado: que npm instale en tu carpeta de usuario, una sola vez:
|
|
141
|
+
mkdir -p ~/.npm-global && npm config set prefix ~/.npm-global
|
|
142
|
+
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
|
|
143
|
+
sudo npm rm -g ${REPO} && npm i -g ${REPO}`);
|
|
144
|
+
}
|
|
145
|
+
const u = spawnSync(npm, ['install', '-g', `${REPO}@latest`], { stdio: 'inherit', shell: sh.shell });
|
|
146
|
+
if (u.status !== 0) die('no se pudo actualizar con npm. Prueba: npx ' + REPO + '@latest install');
|
|
147
|
+
}
|
|
148
|
+
const r = spawnSync('omk', ['install', ...rest.filter((a) => a !== '--force')], { stdio: 'inherit', shell: process.platform === 'win32' });
|
|
121
149
|
process.exit(r.status === null ? 1 : r.status);
|
|
122
150
|
}
|
|
123
151
|
|
package/bin/ui.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Render de la salida de install.sh para omk: spinner por fase, color y resumen final.
|
|
2
|
+
// install.sh emite (con OMK_EVENTS=1) líneas «::tipo::campo::campo»; lo demás se muestra tal cual.
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const readline = require('node:readline');
|
|
6
|
+
|
|
7
|
+
const tty = Boolean(process.stdout.isTTY) && !process.env.NO_COLOR && process.env.TERM !== 'dumb';
|
|
8
|
+
const truecolor = /truecolor|24bit/i.test(process.env.COLORTERM || '');
|
|
9
|
+
const paint = (code) => (s) => (tty ? `\x1b[${code}m${s}\x1b[0m` : String(s));
|
|
10
|
+
const c = {
|
|
11
|
+
lime: paint(truecolor ? '38;2;198;255;61' : '38;5;154'),
|
|
12
|
+
limeDk: paint(truecolor ? '38;2;92;138;18' : '38;5;64'),
|
|
13
|
+
grey: paint(truecolor ? '38;2;139;147;132' : '38;5;245'),
|
|
14
|
+
amber: paint(truecolor ? '38;2;255;210;90' : '38;5;221'),
|
|
15
|
+
red: paint(truecolor ? '38;2;255;107;107' : '38;5;203'),
|
|
16
|
+
bold: paint('1'),
|
|
17
|
+
dim: paint('2'),
|
|
18
|
+
};
|
|
19
|
+
const sym = {
|
|
20
|
+
ok: c.lime('✓'), fail: c.red('✗'), warn: c.amber('!'), add: c.lime('+'), keep: c.grey('='), dry: c.amber('~'),
|
|
21
|
+
todo: c.amber('›'), info: c.grey('·'), dot: c.grey('·'),
|
|
22
|
+
};
|
|
23
|
+
const FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
24
|
+
const MIN_PHASE_MS = 160; // que cada fase se vea, aunque tarde menos
|
|
25
|
+
const cols = () => Math.max(50, Math.min(process.stdout.columns || 80, 110));
|
|
26
|
+
const out = (s = '') => process.stdout.write(s + '\n');
|
|
27
|
+
|
|
28
|
+
const vis = (s) => s.replace(/\x1b\[[0-9;]*m/g, '');
|
|
29
|
+
|
|
30
|
+
// Corta una línea larga en varias con sangría colgante.
|
|
31
|
+
function wrap(text, first, rest) {
|
|
32
|
+
const width = cols() - rest.length - 1;
|
|
33
|
+
const words = text.split(' ');
|
|
34
|
+
const lines = [];
|
|
35
|
+
let line = '';
|
|
36
|
+
for (const w of words) {
|
|
37
|
+
if (line && vis(line + ' ' + w).length > width) { lines.push(line); line = w; } else line = line ? line + ' ' + w : w;
|
|
38
|
+
}
|
|
39
|
+
if (line) lines.push(line);
|
|
40
|
+
return lines.map((l, i) => (i === 0 ? first : rest) + l).join('\n');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Separa «Agente: texto» para resaltar el agente.
|
|
44
|
+
function lead(text) {
|
|
45
|
+
const m = /^([^:]{2,40}):\s(.*)$/.exec(text);
|
|
46
|
+
return m ? `${c.bold(m[1])}${c.dim(':')} ${m[2]}` : text;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function header(title, sub) {
|
|
50
|
+
const [name, ver] = title.split(/ (?=v\d)/);
|
|
51
|
+
out();
|
|
52
|
+
out(` ${c.lime('◆')} ${c.bold(c.lime(name.toUpperCase()))}${ver ? ' ' + c.grey(ver) : ''}`);
|
|
53
|
+
if (sub) out(` ${c.grey(sub)}`);
|
|
54
|
+
out();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function section(label, color, items, mark) {
|
|
58
|
+
out();
|
|
59
|
+
out(` ${color(c.bold(label))} ${c.grey('(' + items.length + ')')}`);
|
|
60
|
+
for (const t of items) out(wrap(lead(t), ` ${mark} `, ' '));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function footer(kind, stamp, dry, todos, infos, started) {
|
|
64
|
+
if (todos.length) section('Pendiente', c.amber, todos, sym.todo);
|
|
65
|
+
if (infos.length) section('Para tu información', c.grey, infos, sym.info);
|
|
66
|
+
out();
|
|
67
|
+
if (dry === '1') { out(` ${c.amber('Simulación:')} no se ha escrito nada. Para aplicarlo, quita ${c.bold('--dry-run')}.`); out(); return; }
|
|
68
|
+
const secs = ((Date.now() - started) / 1000).toFixed(1);
|
|
69
|
+
const rows = [];
|
|
70
|
+
if (kind === 'restore') { out(` ${sym.ok} ${c.bold('Restaurado')} ${c.grey('en ' + secs + ' s')}`); out(); return; }
|
|
71
|
+
out(` ${sym.ok} ${c.bold(todos.length ? 'Hecho, con ' + todos.length + ' pendiente' + (todos.length > 1 ? 's' : '') : 'Hecho')} ${c.grey('en ' + secs + ' s')}`);
|
|
72
|
+
if (kind === 'global') {
|
|
73
|
+
rows.push(['comprobar', 'omk verify']);
|
|
74
|
+
rows.push(['proyectos', 'omk init ' + c.grey('(dentro de cada proyecto)')]);
|
|
75
|
+
} else {
|
|
76
|
+
rows.push(['siguiente', 'en el agente: «inicializa el proyecto»']);
|
|
77
|
+
}
|
|
78
|
+
if (stamp) rows.push(['deshacer', 'omk restore ' + stamp]);
|
|
79
|
+
for (const [k, v] of rows) out(` ${c.grey(k.padEnd(10))} ${c.lime(v)}`);
|
|
80
|
+
out();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Ejecuta install.sh dibujando sus eventos. Devuelve el código de salida. */
|
|
84
|
+
function render(child) {
|
|
85
|
+
const started = Date.now();
|
|
86
|
+
const queue = [];
|
|
87
|
+
let wake = null;
|
|
88
|
+
let closed = false;
|
|
89
|
+
let code = 0;
|
|
90
|
+
const push = (ev) => { queue.push(ev); if (wake) { wake(); wake = null; } };
|
|
91
|
+
const next = () => (queue.length ? Promise.resolve(queue.shift()) : closed ? Promise.resolve(null) : new Promise((r) => { wake = () => r(queue.shift() ?? null); }));
|
|
92
|
+
|
|
93
|
+
readline.createInterface({ input: child.stdout }).on('line', (l) => push({ src: 'out', l }));
|
|
94
|
+
readline.createInterface({ input: child.stderr }).on('line', (l) => push({ src: 'err', l }));
|
|
95
|
+
child.on('close', (status) => { code = status === null ? 1 : status; closed = true; if (wake) { wake(); wake = null; } });
|
|
96
|
+
|
|
97
|
+
const todos = [];
|
|
98
|
+
const infos = [];
|
|
99
|
+
let phase = null; // { label, items, since, timer, frame, warn }
|
|
100
|
+
let checks = { ok: 0, fail: 0 };
|
|
101
|
+
|
|
102
|
+
const spin = () => {
|
|
103
|
+
if (!tty || !phase) return;
|
|
104
|
+
phase.frame = (phase.frame + 1) % FRAMES.length;
|
|
105
|
+
process.stdout.write(`\r\x1b[2K ${c.lime(FRAMES[phase.frame])} ${phase.label}${c.grey('…')}`);
|
|
106
|
+
};
|
|
107
|
+
const startPhase = (label) => {
|
|
108
|
+
phase = { label, items: [], since: Date.now(), frame: 0, warn: false, timer: null };
|
|
109
|
+
if (tty) { spin(); phase.timer = setInterval(spin, 80); }
|
|
110
|
+
};
|
|
111
|
+
const endPhase = async (summary) => {
|
|
112
|
+
if (!phase) return;
|
|
113
|
+
const wait = MIN_PHASE_MS - (Date.now() - phase.since);
|
|
114
|
+
if (tty && wait > 0) await new Promise((r) => setTimeout(r, wait));
|
|
115
|
+
if (phase.timer) clearInterval(phase.timer);
|
|
116
|
+
if (tty) process.stdout.write('\r\x1b[2K');
|
|
117
|
+
const mark = phase.items.some((i) => i.kind === 'fail') ? sym.fail : phase.warn ? sym.warn : sym.ok;
|
|
118
|
+
const label = c.bold(phase.label);
|
|
119
|
+
const pad = Math.max(2, 30 - phase.label.length);
|
|
120
|
+
out(` ${mark} ${label}${summary ? ' '.repeat(pad) + c.grey(summary) : ''}`);
|
|
121
|
+
const dry = phase.items.filter((i) => i.kind === 'dry');
|
|
122
|
+
for (const i of phase.items.filter((x) => x.kind !== 'dry')) out(wrap(i.kind === 'keep' ? c.grey(i.text) : i.text, ` ${sym[i.kind] || sym.dot} `, ' '));
|
|
123
|
+
if (dry.length) {
|
|
124
|
+
for (const i of dry.slice(0, 4)) out(wrap(c.grey(i.text), ` ${sym.dry} `, ' '));
|
|
125
|
+
if (dry.length > 4) out(` ${c.grey('… y ' + (dry.length - 4) + ' acciones más')}`);
|
|
126
|
+
}
|
|
127
|
+
phase = null;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
return (async () => {
|
|
131
|
+
for (;;) {
|
|
132
|
+
const ev = await next();
|
|
133
|
+
if (!ev) break;
|
|
134
|
+
if (ev.src === 'err') { if (phase && tty) process.stdout.write('\r\x1b[2K'); out(` ${c.red(ev.l)}`); continue; }
|
|
135
|
+
if (!ev.l.startsWith('::')) { if (ev.l.trim()) { if (phase && tty) process.stdout.write('\r\x1b[2K'); out(` ${c.grey('│ ' + ev.l)}`); } continue; }
|
|
136
|
+
const [type, ...f] = ev.l.slice(2).split('::');
|
|
137
|
+
switch (type) {
|
|
138
|
+
case 'title': header(f[0], f[1]); break;
|
|
139
|
+
case 'begin': await endPhase(); startPhase(f[0]); break;
|
|
140
|
+
case 'item': if (phase) { phase.items.push({ kind: f[0], text: f.slice(1).join('::') }); if (f[0] === 'warn') phase.warn = true; } break;
|
|
141
|
+
case 'end': await endPhase(f.join('::')); break;
|
|
142
|
+
case 'todo': todos.push(f.join('::')); break;
|
|
143
|
+
case 'info': infos.push(f.join('::')); break;
|
|
144
|
+
case 'check': {
|
|
145
|
+
const [k, ...t] = f;
|
|
146
|
+
checks[k === 'fail' ? 'fail' : 'ok'] += k === 'info' ? 0 : 1;
|
|
147
|
+
out(wrap(lead(t.join('::')), ` ${k === 'ok' ? sym.ok : k === 'fail' ? sym.fail : sym.info} `, ' '));
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case 'result':
|
|
151
|
+
out();
|
|
152
|
+
if (checks.fail === 0) out(` ${sym.ok} ${c.bold('Todo correcto')} ${c.grey(checks.ok + ' comprobaciones')}`);
|
|
153
|
+
else out(` ${sym.fail} ${c.bold(c.red(checks.fail + (checks.fail > 1 ? ' fallos' : ' fallo')))} ${c.grey('repáralos con')} ${c.lime('omk install')}`);
|
|
154
|
+
out();
|
|
155
|
+
break;
|
|
156
|
+
case 'footer': await endPhase(); footer(f[0], f[1], f[2], todos, infos, started); break;
|
|
157
|
+
default: break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
await endPhase();
|
|
161
|
+
return code;
|
|
162
|
+
})();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
module.exports = { render, c, sym, tty };
|
package/core/AGENTS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Reglas operativas globales (Orca Multiagent Kit v1.
|
|
1
|
+
# Reglas operativas globales (Orca Multiagent Kit v1.2.0 · CSR + MAW)
|
|
2
2
|
<!-- Fuente única: ~/.agents/AGENTS.md. Todos los agentes la cargan (import o enlace). Edita SOLO aquí, o en el kit y reinstala. -->
|
|
3
3
|
|
|
4
4
|
## 0. Precedencia
|
package/docs/MANUAL.md
CHANGED
|
@@ -69,7 +69,7 @@ orca-multiagent-kit/
|
|
|
69
69
|
|
|
70
70
|
## 4. Instalación (y migración desde CSR / MAW sueltos)
|
|
71
71
|
|
|
72
|
-
Con Node ≥ 18 lo más cómodo es el CLI: `npx
|
|
72
|
+
Con Node ≥ 18 lo más cómodo es el CLI: `npx orca-multiagent-kit install`, o `npm install -g orca-multiagent-kit` para tener `omk` siempre (`omk install`, `omk init`, `omk verify`, `omk adopt`, `omk restore`, `omk update`). Sin Node, con el zip o un clon:
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
cd ~/Documents/orca-multiagent-kit
|
package/install.sh
CHANGED
|
@@ -29,7 +29,7 @@ OLD_SKILLS="maw-route maw-brief maw-plan maw-dispatch maw-worker maw-integrate m
|
|
|
29
29
|
OLD_RULES="00-router.md 10-communication.md 20-clean-code.md 30-security.md 31-security-audit.md 40-testing.md 50-done-gate.md 60-git-workflow.md 70-performance.md 75-reliability.md 80-supply-chain.md 90-docs-comments.md 95-multi-agent.md comunicacion-densa.md idioma-siempre.md"
|
|
30
30
|
OLD_LANGS="cpp csharp dart-flutter go infra java kotlin php python react ruby rust shell sql swift typescript web"
|
|
31
31
|
|
|
32
|
-
PROJECT=""; PROJECT_ONLY=0; VERIFY=0; DRY=0; AGENTS=""; RESTORE=""; ADOPT=""
|
|
32
|
+
PROJECT=""; PROJECT_ONLY=0; VERIFY=0; DRY=0; AGENTS=""; RESTORE=""; ADOPT=""
|
|
33
33
|
while [ $# -gt 0 ]; do
|
|
34
34
|
case "$1" in
|
|
35
35
|
--project) PROJECT="${2:-}"; shift 2 ;;
|
|
@@ -44,10 +44,54 @@ while [ $# -gt 0 ]; do
|
|
|
44
44
|
esac
|
|
45
45
|
done
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
# ------------------------------------------------------------------ salida
|
|
48
|
+
# Con OMK_EVENTS=1 (lo pone omk) se emiten eventos «::tipo::…» que omk dibuja con spinner y color.
|
|
49
|
+
# Sin él (./install.sh), el mismo contenido en texto, con color si es una terminal.
|
|
50
|
+
EV="${OMK_EVENTS:-}"
|
|
51
|
+
C_L=''; C_D=''; C_Y=''; C_R=''; C_B=''; C_0=''
|
|
52
|
+
if [ -z "$EV" ] && [ -t 1 ] && [ -z "${NO_COLOR:-}" ]; then
|
|
53
|
+
C_L=$'\033[38;5;154m'; C_D=$'\033[2m'; C_Y=$'\033[38;5;221m'; C_R=$'\033[38;5;203m'; C_B=$'\033[1m'; C_0=$'\033[0m'
|
|
54
|
+
fi
|
|
55
|
+
TODO=""; INFO=""; MOVED=0
|
|
56
|
+
ev() { printf '::%s\n' "$1"; }
|
|
57
|
+
title() { if [ -n "$EV" ]; then ev "title::$1::${2:-}"; else printf '\n%s%s%s %s%s%s\n%s%s%s\n\n' "$C_L$C_B" "■" "$C_0" "$C_B" "$1" "$C_0" "$C_D" "${2:-}" "$C_0"; fi; }
|
|
58
|
+
phase() { if [ -n "$EV" ]; then ev "begin::$1"; else printf ' %s›%s %s%s%s\n' "$C_L" "$C_0" "$C_B" "$1" "$C_0"; fi; }
|
|
59
|
+
done_phase() { if [ -n "$EV" ]; then ev "end::${1:-}"; elif [ -n "${1:-}" ]; then printf ' %s%s%s\n' "$C_D" "$1" "$C_0"; fi; return 0; }
|
|
60
|
+
item() { # $1 add|keep|dry|warn|fail · $2 texto
|
|
61
|
+
if [ -n "$EV" ]; then ev "item::$1::$2"; return 0; fi
|
|
62
|
+
case "$1" in add) m="$C_L+$C_0" ;; keep) m="$C_D=$C_0" ;; dry) m="$C_Y~$C_0" ;; fail) m="${C_R}✗${C_0}" ;; *) m="$C_Y!$C_0" ;; esac
|
|
63
|
+
printf ' %s %s\n' "$m" "$2"; }
|
|
64
|
+
todo() { TODO="${TODO}$1
|
|
65
|
+
"; if [ -n "$EV" ]; then ev "todo::$1"; fi; return 0; }
|
|
66
|
+
info() { INFO="${INFO}$1
|
|
67
|
+
"; if [ -n "$EV" ]; then ev "info::$1"; fi; return 0; }
|
|
68
|
+
short() { local x="$*"; x="${x//"$SRC"/<kit>}"; printf '%s' "${x//"$HOME"/~}"; }
|
|
69
|
+
run() { if [ "$DRY" -eq 1 ]; then item dry "$(short "$*")"; else "$@"; fi; }
|
|
70
|
+
# Resumen final: pendientes, información y siguientes pasos (solo texto; omk lo dibuja él)
|
|
71
|
+
footer() { # $1 global|project|both
|
|
72
|
+
local st=""; [ -d "$BK" ] && [ "$DRY" -eq 0 ] && st="$STAMP"
|
|
73
|
+
if [ -n "$EV" ]; then ev "footer::$1::$st::$DRY"; return 0; fi
|
|
74
|
+
if [ -n "$TODO" ]; then printf '\n%sPendiente%s\n' "$C_Y$C_B" "$C_0"; printf '%s' "$TODO" | while IFS= read -r l; do printf ' %s›%s %s\n' "$C_Y" "$C_0" "$l"; done; fi
|
|
75
|
+
if [ -n "$INFO" ]; then printf '\n%sPara tu información%s\n' "$C_D$C_B" "$C_0"; printf '%s' "$INFO" | while IFS= read -r l; do printf ' %s· %s%s\n' "$C_D" "$l" "$C_0"; done; fi
|
|
76
|
+
if [ "$DRY" -eq 1 ]; then printf '\n%sSimulación: no se ha escrito nada.%s\n\n' "$C_Y" "$C_0"; return 0; fi
|
|
77
|
+
printf '\n%s✓ Hecho%s\n' "$C_L$C_B" "$C_0"
|
|
78
|
+
case "$1" in
|
|
79
|
+
global) printf ' %scomprobar%s ./install.sh --verify\n %sproyecto%s ./install.sh --project-only <ruta>\n' "$C_D" "$C_0" "$C_D" "$C_0" ;;
|
|
80
|
+
*) printf ' %ssiguiente%s en el agente: «inicializa el proyecto»\n' "$C_D" "$C_0" ;;
|
|
81
|
+
esac
|
|
82
|
+
[ -n "$st" ] && printf ' %sdeshacer%s ./install.sh --restore %s\n' "$C_D" "$C_0" "$st"
|
|
83
|
+
printf '\n'; }
|
|
84
|
+
NSK=0; for _s in $KIT_SKILLS; do NSK=$((NSK+1)); done
|
|
85
|
+
# Cursor guarda las reglas de usuario en su base de datos de estado: basta con buscar la ruta del núcleo.
|
|
86
|
+
cursor_rule_set() {
|
|
87
|
+
local f
|
|
88
|
+
for f in "$HOME/Library/Application Support/Cursor/User/globalStorage/state.vscdb" "$HOME/.config/Cursor/User/globalStorage/state.vscdb"; do
|
|
89
|
+
[ -f "$f" ] && grep -aq '.agents/AGENTS.md' "$f" 2>/dev/null && return 0
|
|
90
|
+
done
|
|
91
|
+
return 1; }
|
|
92
|
+
agent_names() { local o="" a; for a in $(printf '%s' "$AGENTS" | tr ',' ' '); do
|
|
93
|
+
case "$a" in claude) a="Claude Code" ;; antigravity) a="Antigravity" ;; codex) a="Codex" ;; copilot) a="Copilot CLI" ;; cursor) a="Cursor" ;; devin) a="Devin" ;; esac
|
|
94
|
+
o="${o:+$o · }$a"; done; printf '%s' "$o"; }
|
|
51
95
|
has_agent() { case ",$AGENTS," in *",$1,"*) return 0 ;; *) return 1 ;; esac; }
|
|
52
96
|
|
|
53
97
|
# Mueve una ruta al backup conservando su ruta relativa a $HOME.
|
|
@@ -57,6 +101,7 @@ stash() {
|
|
|
57
101
|
rel="${p#$HOME/}"
|
|
58
102
|
run mkdir -p "$BK/$(dirname "$rel")"
|
|
59
103
|
run mv "$p" "$BK/$rel"
|
|
104
|
+
MOVED=$((MOVED+1))
|
|
60
105
|
}
|
|
61
106
|
# Copia (sin mover) una ruta al backup.
|
|
62
107
|
snapshot() {
|
|
@@ -90,24 +135,32 @@ extract_overrides() { # $1 fichero -> stdout
|
|
|
90
135
|
inb && ov && !/^<!--/ && !/^-[[:space:]]*$/ && NF>0 {print}' "$1"
|
|
91
136
|
}
|
|
92
137
|
write_file() { # $1 destino, stdin contenido
|
|
93
|
-
if [ "$DRY" -eq 1 ]; then cat >/dev/null;
|
|
138
|
+
if [ "$DRY" -eq 1 ]; then cat >/dev/null; item dry "escribir $(short "$1")"; else mkdir -p "$(dirname "$1")"; cat > "$1"; fi
|
|
94
139
|
}
|
|
95
140
|
|
|
96
141
|
[ -f "$SRC/core/AGENTS.md" ] || { echo "No encuentro core/AGENTS.md en $SRC" >&2; exit 1; }
|
|
97
142
|
|
|
98
143
|
# ------------------------------------------------------------------ restore
|
|
99
144
|
if [ -n "$RESTORE" ]; then
|
|
100
|
-
R="$AG/backups/$RESTORE"; [ -d "$R" ] || { echo "No existe $R" >&2; exit 1; }
|
|
101
|
-
|
|
102
|
-
|
|
145
|
+
R="$AG/backups/$RESTORE"; [ -d "$R" ] || { echo "No existe la copia $R (consulta: omk backups)" >&2; exit 1; }
|
|
146
|
+
title "Restaurar" "copia $RESTORE"
|
|
147
|
+
phase "Devolviendo ficheros a su sitio"
|
|
148
|
+
N=0
|
|
149
|
+
while IFS= read -r rel; do
|
|
150
|
+
[ -n "$rel" ] || continue
|
|
103
151
|
dest="$HOME/$rel"
|
|
104
152
|
# si algun directorio padre es ahora un enlace (p. ej. una skill enlazada), quita el enlace: no escribir a traves de el
|
|
105
153
|
p="$(dirname "$dest")"
|
|
106
154
|
while [ "$p" != "$HOME" ] && [ "$p" != "/" ]; do [ -L "$p" ] && run rm -f "$p"; p="$(dirname "$p")"; done
|
|
107
155
|
if [ -L "$dest" ] || [ -f "$dest" ]; then run rm -f "$dest"; fi
|
|
108
156
|
run mkdir -p "$(dirname "$dest")"; run cp -a "$R/$rel" "$dest"
|
|
109
|
-
|
|
110
|
-
|
|
157
|
+
N=$((N+1))
|
|
158
|
+
done <<EOF
|
|
159
|
+
$(cd "$R" && find . \( -type f -o -type l \) | sed 's#^\./##')
|
|
160
|
+
EOF
|
|
161
|
+
done_phase "$N ficheros restaurados"
|
|
162
|
+
info "Los enlaces que el kit creó donde antes no había nada siguen ahí; bórralos a mano si quieres."
|
|
163
|
+
if [ -n "$EV" ]; then ev "footer::restore::$RESTORE::$DRY"; else printf '\n%s✓ Restaurado%s\n\n' "$C_L$C_B" "$C_0"; fi
|
|
111
164
|
exit 0
|
|
112
165
|
fi
|
|
113
166
|
|
|
@@ -128,56 +181,71 @@ if [ -n "$ADOPT" ]; then
|
|
|
128
181
|
[ -L "$SKD" ] && { echo "Ya es un enlace: $SKD -> $(readlink "$SKD")" >&2; exit 1; }
|
|
129
182
|
NAME="$(basename "$SKD")"; DEST="$AG/skills/$NAME"
|
|
130
183
|
[ -e "$DEST" ] && { echo "Ya existe $DEST. Si es la misma skill, borra una de las dos copias antes." >&2; exit 1; }
|
|
131
|
-
|
|
184
|
+
title "Adoptar skill" "$NAME"
|
|
185
|
+
phase "Compartiendo $NAME con todos los agentes"
|
|
132
186
|
run mkdir -p "$BK" "$AG/skills"
|
|
133
187
|
run cp -a "$SKD" "$BK/$NAME.orig"
|
|
134
188
|
run mv "$SKD" "$DEST"
|
|
135
189
|
run ln -s "$DEST" "$SKD"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
190
|
+
item add "copia única en $(short "$DEST")"
|
|
191
|
+
item add "en su sitio original queda un enlace"
|
|
192
|
+
case "$SKD" in "$CLAUDE_DIR"/skills/*) ;; *) has_agent claude && { link "$DEST" "$CLAUDE_DIR/skills/$NAME"; item add "enlazada en Claude Code"; } ;; esac
|
|
193
|
+
case "$SKD" in "$GEMINI_DIR"/*) ;; *) has_agent antigravity && { link "$DEST" "$GEMINI_DIR/config/skills/$NAME"; item add "enlazada en Antigravity"; } ;; esac
|
|
194
|
+
done_phase "Codex, Copilot y Cursor la leen desde ~/.agents/skills"
|
|
195
|
+
info "Si la skill se actualiza con su propio instalador, vuelve a adoptarla."
|
|
196
|
+
footer global
|
|
139
197
|
exit 0
|
|
140
198
|
fi
|
|
141
199
|
|
|
142
200
|
# ------------------------------------------------------------------ verify
|
|
143
201
|
if [ "$VERIFY" -eq 1 ]; then
|
|
144
|
-
bad=0
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
[ -
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
for s in $
|
|
202
|
+
bad=0; nok=0
|
|
203
|
+
vok() { nok=$((nok+1)); if [ -n "$EV" ]; then ev "check::ok::$1"; else printf ' %s✓%s %s\n' "$C_L" "$C_0" "$1"; fi; }
|
|
204
|
+
vfail() { bad=$((bad+1)); if [ -n "$EV" ]; then ev "check::fail::$1"; else printf ' %s✗ %s%s\n' "$C_R" "$1" "$C_0"; fi; }
|
|
205
|
+
vinfo() { if [ -n "$EV" ]; then ev "check::info::$1"; else printf ' %s· %s%s\n' "$C_D" "$1" "$C_0"; fi; }
|
|
206
|
+
chk_link() { if [ -L "$3" ] && [ "$(readlink "$3")" = "$2" ]; then vok "$1"; else vfail "$1: $(short "$3") no enlaza a $(short "$2")"; fi; }
|
|
207
|
+
title "Verificación" "$(agent_names)"
|
|
208
|
+
[ -f "$AG/AGENTS.md" ] && vok "núcleo en ~/.agents/AGENTS.md (v$(cat "$AG/AGENT_KIT_VERSION" 2>/dev/null || echo '?'))" || vfail "falta ~/.agents/AGENTS.md: ejecuta omk install"
|
|
209
|
+
n=$(ls -1 "$AG/rules/lang"/*.md 2>/dev/null | wc -l | tr -d ' '); [ "$n" -ge 17 ] && vok "$n guías de lenguaje" || vfail "guías de lenguaje: $n de 17"
|
|
210
|
+
ms=""; for s in $KIT_SKILLS; do [ -f "$AG/skills/$s/SKILL.md" ] || ms="$ms $s"; done
|
|
211
|
+
[ -z "$ms" ] && vok "$NSK skills del kit" || vfail "faltan skills:$ms"
|
|
212
|
+
[ -f "$AG/speckit-ext/orca/extension.yml" ] && vok "extensión de spec-kit" || vfail "falta la extensión de spec-kit (~/.agents/speckit-ext/orca)"
|
|
213
|
+
for s in $OLD_SKILLS; do [ -e "$AG/skills/$s" ] && vfail "skill retirada sigue instalada: $s"; done
|
|
153
214
|
if has_agent claude; then
|
|
154
|
-
grep -q '@~/.agents/AGENTS.md' "$CLAUDE_DIR/CLAUDE.md" 2>/dev/null &&
|
|
155
|
-
grep -Eq '<!-- (CSR|MAW):BEGIN' "$CLAUDE_DIR/CLAUDE.md" 2>/dev/null &&
|
|
156
|
-
for r in $OLD_RULES; do [ -e "$CLAUDE_DIR/rules/$r" ] &&
|
|
157
|
-
for s in $KIT_SKILLS; do
|
|
215
|
+
grep -q '@~/.agents/AGENTS.md' "$CLAUDE_DIR/CLAUDE.md" 2>/dev/null && vok "Claude Code: CLAUDE.md importa el núcleo" || vfail "Claude Code: CLAUDE.md no importa el núcleo"
|
|
216
|
+
grep -Eq '<!-- (CSR|MAW):BEGIN' "$CLAUDE_DIR/CLAUDE.md" 2>/dev/null && vfail "Claude Code: CLAUDE.md conserva bloques CSR/MAW antiguos" || true
|
|
217
|
+
for r in $OLD_RULES; do [ -e "$CLAUDE_DIR/rules/$r" ] && vfail "Claude Code: copia antigua $(short "$CLAUDE_DIR/rules/$r") (Claude la carga siempre)"; done
|
|
218
|
+
ms=""; for s in $KIT_SKILLS; do [ -L "$CLAUDE_DIR/skills/$s" ] && [ "$(readlink "$CLAUDE_DIR/skills/$s")" = "$AG/skills/$s" ] || ms="$ms $s"; done
|
|
219
|
+
[ -z "$ms" ] && vok "Claude Code: skills enlazadas" || vfail "Claude Code: skills sin enlazar:$ms"
|
|
158
220
|
fi
|
|
159
221
|
if has_agent antigravity; then
|
|
160
|
-
chk_link "$AG/AGENTS.md" "$GEMINI_DIR/GEMINI.md"
|
|
161
|
-
for r in $OLD_RULES; do [ -e "$GEMINI_DIR/rules/$r" ] &&
|
|
162
|
-
[ -e "$GEMINI_DIR/config/plugins/claude-session-rules" ] &&
|
|
163
|
-
for s in $KIT_SKILLS; do
|
|
222
|
+
chk_link "Antigravity: GEMINI.md es el núcleo" "$AG/AGENTS.md" "$GEMINI_DIR/GEMINI.md"
|
|
223
|
+
for r in $OLD_RULES; do [ -e "$GEMINI_DIR/rules/$r" ] && vfail "Antigravity: copia antigua $(short "$GEMINI_DIR/rules/$r")"; done
|
|
224
|
+
[ -e "$GEMINI_DIR/config/plugins/claude-session-rules" ] && vfail "Antigravity: el plugin claude-session-rules sigue instalado (duplica csr-*)"
|
|
225
|
+
ms=""; for s in $KIT_SKILLS; do [ -L "$GEMINI_DIR/config/skills/$s" ] && [ "$(readlink "$GEMINI_DIR/config/skills/$s")" = "$AG/skills/$s" ] || ms="$ms $s"; done
|
|
226
|
+
[ -z "$ms" ] && vok "Antigravity: skills enlazadas" || vfail "Antigravity: skills sin enlazar:$ms"
|
|
227
|
+
fi
|
|
228
|
+
has_agent codex && chk_link "Codex: AGENTS.md es el núcleo" "$AG/AGENTS.md" "$CODEX_DIR/AGENTS.md"
|
|
229
|
+
has_agent copilot && chk_link "Copilot CLI: copilot-instructions.md es el núcleo" "$AG/AGENTS.md" "$COPILOT_DIR/copilot-instructions.md"
|
|
230
|
+
has_agent devin && chk_link "Devin: AGENTS.md es el núcleo" "$AG/AGENTS.md" "$DEVIN_DIR/AGENTS.md"
|
|
231
|
+
if has_agent cursor; then
|
|
232
|
+
if cursor_rule_set; then vok "Cursor: regla de usuario configurada"; else vinfo "Cursor: no veo la regla de usuario que apunta a ~/.agents/AGENTS.md (Settings → Rules)"; fi
|
|
164
233
|
fi
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
has_agent cursor && echo " INFO cursor: lee ~/.agents/skills solo; reglas globales en Settings -> Rules (no hay fichero)"
|
|
169
|
-
[ "$bad" -eq 0 ] && { step "Verificacion: OK ($AGENTS)"; exit 0; }
|
|
170
|
-
step "Verificacion: con fallos"; exit 1
|
|
234
|
+
if [ -n "$EV" ]; then ev "result::$bad::$nok"; exit $((bad > 0)); fi
|
|
235
|
+
if [ "$bad" -eq 0 ]; then printf '\n%s✓ Todo correcto%s %s%s comprobaciones%s\n\n' "$C_L$C_B" "$C_0" "$C_D" "$nok" "$C_0"; exit 0; fi
|
|
236
|
+
printf '\n%s✗ %s fallos%s %sejecuta «omk install» para repararlos%s\n\n' "$C_R$C_B" "$bad" "$C_0" "$C_D" "$C_0"; exit 1
|
|
171
237
|
fi
|
|
172
238
|
|
|
173
239
|
# ------------------------------------------------------------------ global
|
|
174
240
|
if [ "$PROJECT_ONLY" -eq 0 ]; then
|
|
175
|
-
[ -n "$AGENTS" ] || { echo "No detecto
|
|
176
|
-
|
|
177
|
-
|
|
241
|
+
[ -n "$AGENTS" ] || { echo "No detecto ningún agente (Claude Code, Antigravity, Codex, Copilot o Cursor). Indica cuáles con --agents." >&2; exit 1; }
|
|
242
|
+
SUB="$(agent_names)"; [ "$DRY" -eq 1 ] && SUB="$SUB · simulación, no se escribe nada"
|
|
243
|
+
title "Orca Multiagent Kit v${VERSION}" "$SUB"
|
|
178
244
|
run mkdir -p "$BK"
|
|
179
245
|
|
|
180
246
|
# 1. Fuente canonica
|
|
247
|
+
phase "Fuente única en ~/.agents"
|
|
248
|
+
PREV="$(cat "$AG/AGENT_KIT_VERSION" 2>/dev/null || true)"
|
|
181
249
|
[ -f "$AG/AGENTS.md" ] && snapshot "$AG/AGENTS.md"
|
|
182
250
|
run mkdir -p "$AG/rules" "$AG/skills" "$AG/templates" "$AG/output-styles"
|
|
183
251
|
run cp "$SRC/core/AGENTS.md" "$AG/AGENTS.md"
|
|
@@ -190,21 +258,31 @@ if [ "$PROJECT_ONLY" -eq 0 ]; then
|
|
|
190
258
|
run cp -R "$SRC/templates/." "$AG/templates/"
|
|
191
259
|
run cp -R "$SRC/output-styles/." "$AG/output-styles/"
|
|
192
260
|
run cp "$SRC/VERSION" "$AG/AGENT_KIT_VERSION"
|
|
261
|
+
run mkdir -p "$AG/speckit-ext"
|
|
262
|
+
[ -e "$AG/speckit-ext/orca" ] && run rm -rf "$AG/speckit-ext/orca"
|
|
263
|
+
run cp -R "$SRC/speckit-extension/orca" "$AG/speckit-ext/orca"
|
|
264
|
+
NR=$(find "$SRC/rules" -name '*.md' | wc -l | tr -d ' '); NS=$NSK
|
|
265
|
+
if [ -z "$PREV" ]; then item add "instalada v${VERSION}"; elif [ "$PREV" = "$VERSION" ]; then item keep "v${VERSION} reinstalada"; else item add "actualizada de v${PREV} a v${VERSION}"; fi
|
|
266
|
+
done_phase "núcleo · $NR reglas · $NS skills · extensión de spec-kit"
|
|
267
|
+
|
|
268
|
+
# 2. Restos de versiones anteriores
|
|
269
|
+
phase "Versiones anteriores"
|
|
270
|
+
M0=$MOVED
|
|
193
271
|
[ -d "$AG/maw" ] && stash "$AG/maw" # restos de MAW v1
|
|
194
272
|
for s in $OLD_SKILLS; do
|
|
195
273
|
stash "$AG/skills/$s"; stash "$CLAUDE_DIR/skills/$s"; stash "$GEMINI_DIR/config/skills/$s"
|
|
196
274
|
done
|
|
197
|
-
|
|
198
|
-
[ -e "$AG/speckit-ext/orca" ] && run rm -rf "$AG/speckit-ext/orca"
|
|
199
|
-
run cp -R "$SRC/speckit-extension/orca" "$AG/speckit-ext/orca"
|
|
275
|
+
if [ $((MOVED-M0)) -gt 0 ]; then done_phase "$((MOVED-M0)) elementos retirados a la copia de seguridad"; else done_phase "nada que retirar"; fi
|
|
200
276
|
|
|
201
|
-
#
|
|
277
|
+
# 3. Claude Code: import en CLAUDE.md; reglas fuera de ~/.claude/rules (Claude carga TODO lo que hay ahi)
|
|
202
278
|
if has_agent claude; then
|
|
203
|
-
|
|
279
|
+
phase "Claude Code"
|
|
280
|
+
M0=$MOVED
|
|
204
281
|
if [ -L "$CLAUDE_DIR/CLAUDE.md" ]; then stash "$CLAUDE_DIR/CLAUDE.md"; fi
|
|
205
282
|
[ -f "$CLAUDE_DIR/CLAUDE.md" ] && snapshot "$CLAUDE_DIR/CLAUDE.md"
|
|
206
283
|
TMP="$(mktemp)"; [ -f "$CLAUDE_DIR/CLAUDE.md" ] && strip_blocks "$CLAUDE_DIR/CLAUDE.md" > "$TMP"
|
|
207
284
|
{ printf '<!-- AGENTS:BEGIN v%s Orca Multiagent Kit -- reglas globales: edita ~/.agents/AGENTS.md, no este bloque -->\n@~/.agents/AGENTS.md\n<!-- AGENTS:END -->\n' "$VERSION"; [ -s "$TMP" ] && { printf '\n'; cat "$TMP"; }; true; } | write_file "$CLAUDE_DIR/CLAUDE.md"
|
|
285
|
+
[ -s "$TMP" ] && KEPT=1 || KEPT=0
|
|
208
286
|
rm -f "$TMP"
|
|
209
287
|
for r in $OLD_RULES; do stash "$CLAUDE_DIR/rules/$r"; done
|
|
210
288
|
for l in $OLD_LANGS; do stash "$CLAUDE_DIR/rules/lang/$l.md"; done
|
|
@@ -212,17 +290,21 @@ if [ "$PROJECT_ONLY" -eq 0 ]; then
|
|
|
212
290
|
for s in $KIT_SKILLS; do link "$AG/skills/$s" "$CLAUDE_DIR/skills/$s"; done
|
|
213
291
|
link "$AG/output-styles/csr-minimal.md" "$CLAUDE_DIR/output-styles/csr-minimal.md"
|
|
214
292
|
stash "$CLAUDE_DIR/templates/STACK.md"; stash "$CLAUDE_DIR/templates/project-CLAUDE.md"
|
|
215
|
-
|
|
293
|
+
item add "CLAUDE.md importa el núcleo"
|
|
294
|
+
[ "$KEPT" -eq 1 ] && item keep "tu contenido propio de CLAUDE.md se conserva debajo"
|
|
295
|
+
item add "$NS skills enlazadas · estilo csr-minimal"
|
|
296
|
+
[ $((MOVED-M0)) -gt 0 ] && item add "$((MOVED-M0)) copias antiguas de reglas retiradas"
|
|
297
|
+
done_phase
|
|
298
|
+
info "Claude Code: en la app de escritorio (Cowork) no se cargan imports de fuera de la carpeta de trabajo; en la terminal y el IDE sí."
|
|
216
299
|
fi
|
|
217
300
|
|
|
218
|
-
#
|
|
301
|
+
# 4. Antigravity: GEMINI.md pasa a ser un enlace a la fuente unica
|
|
219
302
|
if has_agent antigravity; then
|
|
220
|
-
|
|
303
|
+
phase "Antigravity"
|
|
304
|
+
M0=$MOVED
|
|
221
305
|
if [ -f "$GEMINI_DIR/GEMINI.md" ] && [ ! -L "$GEMINI_DIR/GEMINI.md" ]; then
|
|
222
306
|
EXTRA="$(strip_blocks "$GEMINI_DIR/GEMINI.md" | grep -v '^[[:space:]]*$' || true)"
|
|
223
|
-
|
|
224
|
-
warn "Antigravity: GEMINI.md tenia contenido fuera de los bloques (va al backup). Idioma y comunicacion ya estan en AGENTS.md; si habia algo mas tuyo, pasalo a ~/.agents/rules/personal.md"
|
|
225
|
-
fi
|
|
307
|
+
[ -n "$EXTRA" ] && info "Antigravity: lo que tenías en GEMINI.md fuera de los bloques está en la copia de seguridad. Si era tuyo, pásalo a ~/.agents/rules/personal.md."
|
|
226
308
|
fi
|
|
227
309
|
link "$AG/AGENTS.md" "$GEMINI_DIR/GEMINI.md"
|
|
228
310
|
for r in $OLD_RULES; do stash "$GEMINI_DIR/rules/$r"; done
|
|
@@ -232,66 +314,90 @@ if [ "$PROJECT_ONLY" -eq 0 ]; then
|
|
|
232
314
|
stash "$GEMINI_DIR/output-styles/csr-minimal.md"
|
|
233
315
|
if [ -e "$GEMINI_DIR/config/plugins/claude-session-rules" ]; then
|
|
234
316
|
stash "$GEMINI_DIR/config/plugins/claude-session-rules"
|
|
235
|
-
|
|
317
|
+
item add "plugin claude-session-rules retirado (ya está en la fuente única)"
|
|
318
|
+
info "Antigravity: si se queja de un plugin ausente (claude-session-rules), desactívalo en su configuración."
|
|
236
319
|
fi
|
|
237
320
|
for s in $KIT_SKILLS; do link "$AG/skills/$s" "$GEMINI_DIR/config/skills/$s"; done
|
|
238
|
-
|
|
321
|
+
item add "GEMINI.md es un enlace al núcleo"
|
|
322
|
+
item add "$NS skills enlazadas"
|
|
323
|
+
[ $((MOVED-M0)) -gt 0 ] && item add "$((MOVED-M0)) copias antiguas retiradas"
|
|
324
|
+
done_phase
|
|
325
|
+
[ -d "$GEMINI_DIR/config/plugins/user-workflows/skills/planificar" ] && todo "Antigravity: desactiva la skill «planificar» cuando hayas probado «orca», que la sustituye."
|
|
239
326
|
fi
|
|
240
327
|
|
|
241
|
-
#
|
|
242
|
-
if has_agent codex; then
|
|
243
|
-
if has_agent copilot; then
|
|
244
|
-
if has_agent devin; then
|
|
245
|
-
|
|
246
|
-
if has_agent cursor; then
|
|
247
|
-
|
|
248
|
-
|
|
328
|
+
# 5. Agentes que leen ~/.agents/skills de forma nativa: solo hay que enlazar las reglas globales
|
|
329
|
+
if has_agent codex; then phase "Codex"; link "$AG/AGENTS.md" "$CODEX_DIR/AGENTS.md"; item add "AGENTS.md es un enlace al núcleo"; item add "skills: las lee de ~/.agents/skills"; done_phase; fi
|
|
330
|
+
if has_agent copilot; then phase "Copilot CLI"; link "$AG/AGENTS.md" "$COPILOT_DIR/copilot-instructions.md"; item add "copilot-instructions.md es un enlace al núcleo"; item add "skills: las lee de ~/.agents/skills"; done_phase; fi
|
|
331
|
+
if has_agent devin; then phase "Devin"; link "$AG/AGENTS.md" "$DEVIN_DIR/AGENTS.md"; item add "AGENTS.md es un enlace al núcleo"; done_phase
|
|
332
|
+
info "Devin: también lee ~/.claude/CLAUDE.md; si ves reglas duplicadas, quita uno de los dos."; fi
|
|
333
|
+
if has_agent cursor; then phase "Cursor"
|
|
334
|
+
item add "skills: las lee de ~/.agents/skills"
|
|
335
|
+
if cursor_rule_set; then item keep "regla de usuario ya configurada"; else
|
|
336
|
+
item warn "falta la regla de usuario (Cursor no la guarda en un fichero)"
|
|
337
|
+
todo "Cursor: añade en Settings → Rules → User Rules una regla con este texto: «Al empezar, lee y aplica ~/.agents/AGENTS.md y, bajo demanda, ~/.agents/rules/»"
|
|
338
|
+
fi
|
|
339
|
+
done_phase
|
|
340
|
+
has_agent claude && info "Cursor: también lee ~/.claude/skills, así que puede listar las skills dos veces (con el mismo contenido)."
|
|
341
|
+
fi
|
|
249
342
|
fi
|
|
250
343
|
|
|
251
344
|
# ------------------------------------------------------------------ proyecto
|
|
252
345
|
if [ -n "$PROJECT" ]; then
|
|
253
346
|
[ -d "$PROJECT" ] || { echo "No existe la ruta de proyecto: $PROJECT" >&2; exit 1; }
|
|
254
|
-
|
|
347
|
+
PNAME="$(basename "$PROJECT")"
|
|
348
|
+
[ "$PROJECT_ONLY" -eq 1 ] && title "Orca Multiagent Kit v${VERSION}" "proyecto $(short "$PROJECT")$([ "$DRY" -eq 1 ] && echo ' · simulación')"
|
|
349
|
+
phase "Proyecto $PNAME"
|
|
350
|
+
INSTALLED="$(cat "$AG/AGENT_KIT_VERSION" 2>/dev/null || true)"
|
|
351
|
+
if [ "$PROJECT_ONLY" -eq 1 ] && [ "$INSTALLED" != "$VERSION" ]; then
|
|
352
|
+
if [ -n "${OMK_CLI:-}" ]; then FIX="omk install"; else FIX="./install.sh"; fi
|
|
353
|
+
todo "Instalación global: en ~/.agents hay ${INSTALLED:-una versión sin instalar} y este kit es v${VERSION}. Ejecuta «${FIX}» para tener las skills orca y kit-init."
|
|
354
|
+
fi
|
|
255
355
|
OV=""
|
|
256
356
|
for f in "$PROJECT/CLAUDE.md" "$PROJECT/AGENTS.md"; do [ -f "$f" ] && OV="$OV$(extract_overrides "$f")
|
|
257
357
|
"; done
|
|
258
358
|
OV="$(printf '%s' "$OV" | awk 'NF && !seen[$0]++')"
|
|
259
359
|
for f in AGENTS.md CLAUDE.md; do [ -f "$PROJECT/$f" ] && snapshot "$PROJECT/$f"; done
|
|
360
|
+
[ -f "$PROJECT/AGENTS.md" ] && HADAG=1 || HADAG=0
|
|
260
361
|
|
|
261
362
|
TMP="$(mktemp)"; [ -f "$PROJECT/AGENTS.md" ] && strip_blocks "$PROJECT/AGENTS.md" > "$TMP"
|
|
262
363
|
{ if [ -n "$OV" ]; then OV="$OV" awk '/^-$/ && !d {print ENVIRON["OV"]; d=1; next} {print}' "$SRC/templates/AGENTS.md"; else cat "$SRC/templates/AGENTS.md"; fi
|
|
263
364
|
[ -s "$TMP" ] && { printf '\n'; cat "$TMP"; }; true; } | write_file "$PROJECT/AGENTS.md"
|
|
264
365
|
REST="$(mktemp)"; [ -f "$PROJECT/CLAUDE.md" ] && strip_blocks "$PROJECT/CLAUDE.md" > "$REST"
|
|
265
366
|
{ cat "$SRC/templates/CLAUDE.md"; [ -s "$REST" ] && { printf '\n'; cat "$REST"; }; true; } | write_file "$PROJECT/CLAUDE.md"
|
|
266
|
-
|
|
367
|
+
if [ "$HADAG" -eq 1 ]; then item add "AGENTS.md actualizado (tu contenido se conserva)"; else item add "AGENTS.md creado"; fi
|
|
368
|
+
[ -n "$OV" ] && item add "overrides del proyecto movidos a AGENTS.md"
|
|
369
|
+
item add "CLAUDE.md importa AGENTS.md"
|
|
370
|
+
grep -q '[^[:space:]]' "$REST" && todo "$PNAME: CLAUDE.md tiene reglas propias que solo ve Claude. Pide al agente «inicializa el proyecto» para pasarlas a AGENTS.md y que las vean todos."
|
|
267
371
|
rm -f "$TMP" "$REST"
|
|
268
|
-
[ -n "$OV" ] && step " overrides migrados a AGENTS.md"
|
|
269
372
|
for f in STACK.md ORCHESTRATION.md orca.yaml .worktreeinclude; do
|
|
270
|
-
if [ -e "$PROJECT/$f" ]; then
|
|
373
|
+
if [ -e "$PROJECT/$f" ]; then item keep "$f ya existía: no se toca"; else run cp "$SRC/templates/$f" "$PROJECT/$f"; item add "$f creado"; fi
|
|
271
374
|
done
|
|
272
|
-
if [ ! -e "$PROJECT/.claude/settings.json" ] && has_agent claude; then run mkdir -p "$PROJECT/.claude"; run cp "$SRC/templates/claude-settings.json" "$PROJECT/.claude/settings.json";
|
|
375
|
+
if [ ! -e "$PROJECT/.claude/settings.json" ] && has_agent claude; then run mkdir -p "$PROJECT/.claude"; run cp "$SRC/templates/claude-settings.json" "$PROJECT/.claude/settings.json"; item add ".claude/settings.json creado"; fi
|
|
273
376
|
if [ -d "$PROJECT/.specify" ]; then
|
|
274
377
|
EXT="$PROJECT/.specify/extensions.yml"
|
|
275
|
-
if grep -q 'speckit.orca.implement' "$EXT" 2>/dev/null; then
|
|
378
|
+
if grep -q 'speckit.orca.implement' "$EXT" 2>/dev/null; then item keep "spec-kit: el hook de orquestación ya estaba activo"
|
|
276
379
|
elif command -v specify >/dev/null 2>&1; then
|
|
277
|
-
|
|
278
|
-
|
|
380
|
+
SKX="$AG/speckit-ext/orca"; [ -f "$SKX/extension.yml" ] || SKX="$SRC/speckit-extension/orca"
|
|
381
|
+
if (cd "$PROJECT" && run specify extension add --dev "$SKX") >/dev/null 2>&1; then item add "spec-kit: extensión orca instalada (hook before_implement)"
|
|
382
|
+
else item warn "spec-kit: «specify extension add» ha fallado"; todo "$PNAME: no se pudo activar el hook de spec-kit. Pide al agente «inicializa el proyecto» y lo añadirá."; fi
|
|
279
383
|
elif [ ! -e "$EXT" ]; then
|
|
280
384
|
# mismo formato que escribe 'specify extension add'
|
|
281
385
|
printf '%s\n' 'installed:' '- orca' 'settings:' ' auto_execute_hooks: true' 'hooks:' ' before_implement:' ' - extension: orca' \
|
|
282
386
|
' command: speckit.orca.implement' ' enabled: true' ' optional: false' ' priority: 10' \
|
|
283
387
|
' description: "Orquestacion multiagente: reparte las user stories si compensa"' | write_file "$EXT"
|
|
284
|
-
|
|
388
|
+
item add "spec-kit: hook before_implement creado en .specify/extensions.yml"
|
|
285
389
|
else
|
|
286
|
-
warn "
|
|
390
|
+
item warn "spec-kit: hay extensions.yml y no está el comando specify"
|
|
391
|
+
todo "$PNAME: pide al agente «inicializa el proyecto» para añadir el hook de spec-kit sin romper tu extensions.yml."
|
|
287
392
|
fi
|
|
393
|
+
else
|
|
394
|
+
item keep "sin spec-kit (.specify/): no hace falta hook"
|
|
288
395
|
fi
|
|
289
396
|
if ! grep -qxF '.work/' "$PROJECT/.gitignore" 2>/dev/null; then
|
|
290
|
-
if [ "$DRY" -eq 1 ]; then
|
|
291
|
-
|
|
397
|
+
if [ "$DRY" -eq 1 ]; then item dry "añadir .work/ a .gitignore"; else printf '\n# Orca Multiagent Kit: briefs e informes de runs multiagente\n.work/\n' >> "$PROJECT/.gitignore"; fi
|
|
398
|
+
item add ".work/ añadido a .gitignore"
|
|
292
399
|
fi
|
|
293
|
-
|
|
400
|
+
done_phase
|
|
294
401
|
fi
|
|
295
402
|
|
|
296
|
-
[ -n "$
|
|
297
|
-
step "Hecho. Comprueba con: ./install.sh --verify · deshacer: ./install.sh --restore $STAMP"
|
|
403
|
+
if [ -n "$PROJECT" ] && [ "$PROJECT_ONLY" -eq 0 ]; then footer both; elif [ -n "$PROJECT" ]; then footer project; else footer global; fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orca-multiagent-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Una sola fuente de reglas y skills (CSR + MAW) para Claude Code, Antigravity, Codex, Copilot y Cursor, con orquestación multiagente.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Fernando Baquero (https://github.com/FernandoBaqueroo)",
|