clckernel 1.2.9 → 1.2.10
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.es.md +25 -0
- package/README.md +25 -0
- package/package.json +1 -1
- package/src/adapters/agent-os.js +1 -0
- package/src/generator.js +1 -0
- package/src/index.js +9 -2
- package/src/updater.js +92 -0
package/README.es.md
CHANGED
|
@@ -22,6 +22,7 @@ Los agentes de programación con IA (Cursor, Claude Code, Windsurf, Copilot) cod
|
|
|
22
22
|
- [🏛️ El Proceso Unificado de IA (AIUP)](#️-el-proceso-unificado-de-ia-aiup)
|
|
23
23
|
- [⚡ Guía Paso a Paso (Ciclo Completo)](#-guía-paso-a-paso-ciclo-completo)
|
|
24
24
|
- [🎮 Interfaz Universal de Comandos](#-interfaz-universal-de-comandos)
|
|
25
|
+
- [🔄 Actualización de Proyectos Existentes](#-actualización-de-proyectos-existentes)
|
|
25
26
|
- [🌐 Ecosistemas Soportados y Arquetipos](#-ecosistemas-soportados-y-arquetipos)
|
|
26
27
|
- [🧩 Herramientas Complementarias (Opcionales)](#-herramientas-complementarias-opcionales)
|
|
27
28
|
- [📄 Licencia](#-licencia)
|
|
@@ -123,10 +124,34 @@ CLC Kernel provee una gramática de comandos determinista soportada de forma nat
|
|
|
123
124
|
| `clckernel doctor` | Diagnóstico | Valida hooks pre-commit de Git, symlinks espejo para IDEs e integridad del motor AST. |
|
|
124
125
|
| `clckernel commit <mensaje>` | Control de Versiones | Auditoría pre-flight, verificación de scope diff vs SDD y commit con Conventional Commits (cero atribución de IA). |
|
|
125
126
|
| `clckernel guard create <nombre>` | Salvaguardas | Genera el scaffold de un nuevo script de guard AST en el lenguaje nativo del stack en `tools/guards/`. |
|
|
127
|
+
| `clckernel update` | Mantenimiento | Actualización no destructiva: refresca herramientas core, skills y symlinks de IDEs sin sobreescribir SDDs, guards personalizados ni `.clckernel.yaml`. |
|
|
126
128
|
| `clckernel start` | Configuración | Detecta el stack automáticamente, propone el ciclo de vida AIUP y genera `.clckernel.yaml`. |
|
|
127
129
|
|
|
128
130
|
---
|
|
129
131
|
|
|
132
|
+
<a id="actualizacion-de-proyectos-existentes"></a>
|
|
133
|
+
## 🔄 Actualización de Proyectos Existentes (No Destructiva)
|
|
134
|
+
|
|
135
|
+
Cuando se publican nuevas versiones de CLC Kernel con nuevos guards AST, playbooks actualizados o reglas optimizadas para IDEs, podés actualizar tu repositorio de forma segura sin perder tu trabajo:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npx clckernel update
|
|
139
|
+
```
|
|
140
|
+
O directamente desde el chat de tu agente IA:
|
|
141
|
+
```bash
|
|
142
|
+
clckernel update
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 🔒 La Garantía de Actualización No Destructiva:
|
|
146
|
+
- **Refresca y Actualiza:** Orquestadores centrales (`tools/audit.js`, `tools/audit.py`), guards AST nativos, Skills de agentes (`.agents/skills/`) y symlinks de IDEs (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, Copilot, Antigravity).
|
|
147
|
+
- **100% Preservado:**
|
|
148
|
+
- `sdds/`: Todas las especificaciones locales, planes y recibos de verificación permanecen intactos.
|
|
149
|
+
- `tools/guards/`: Todos los guards AST personalizados creados por el equipo se conservan sin modificaciones.
|
|
150
|
+
- `.clckernel.yaml`: Todas las configuraciones y umbrales personalizados se mantienen.
|
|
151
|
+
- El código fuente de la aplicación y modelos de dominio jamás se tocan.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
130
155
|
<a id="ecosistemas-soportados"></a>
|
|
131
156
|
## 🌐 Ecosistemas Soportados y Arquetipos
|
|
132
157
|
|
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ AI coding agents (Cursor, Claude Code, Windsurf, Copilot) code fast, but without
|
|
|
22
22
|
- [🏛️ The AI Unified Process (AIUP)](#️-the-ai-unified-process-aiup)
|
|
23
23
|
- [⚡ Step-by-Step Guide (Full Lifecycle)](#-step-by-step-guide-full-lifecycle)
|
|
24
24
|
- [🎮 Universal Command Interface](#-universal-command-interface)
|
|
25
|
+
- [🔄 Updating an Existing Project](#-updating-an-existing-project)
|
|
25
26
|
- [🌐 Supported Stacks & Archetypes](#-supported-stacks--archetypes)
|
|
26
27
|
- [🧩 Optional Ecosystem Companions](#-optional-ecosystem-companions)
|
|
27
28
|
- [📄 License](#-license)
|
|
@@ -123,10 +124,34 @@ CLC Kernel provides a deterministic command grammar supported natively by **Clau
|
|
|
123
124
|
| `clckernel doctor` | Diagnostics | Checks Git pre-commit hooks, IDE mirror symlinks, and AST engine integrity. |
|
|
124
125
|
| `clckernel commit <message>` | Version Control | Pre-flight audit, verifies diff vs SDD scope, and commits with Conventional Commits (zero AI attribution). |
|
|
125
126
|
| `clckernel guard create <name>` | Safeguards | Scaffolds a new AST guard script in the stack's native language in `tools/guards/`. |
|
|
127
|
+
| `clckernel update` | Maintenance | Non-destructive update: refreshes core tools, skills & IDE symlinks without overwriting SDDs, custom guards, or `.clckernel.yaml`. |
|
|
126
128
|
| `clckernel start` | Setup | Auto-detects stack, proposes AIUP lifecycle, and generates `.clckernel.yaml`. |
|
|
127
129
|
|
|
128
130
|
---
|
|
129
131
|
|
|
132
|
+
<a id="updating-an-existing-project"></a>
|
|
133
|
+
## 🔄 Updating an Existing Project (Non-Destructive)
|
|
134
|
+
|
|
135
|
+
When new versions of CLC Kernel are released with new AST guards, upgraded playbooks, or improved IDE rules, update your project safely without losing your work:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npx clckernel update
|
|
139
|
+
```
|
|
140
|
+
Or from your AI agent chat:
|
|
141
|
+
```bash
|
|
142
|
+
clckernel update
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 🔒 The Non-Destructive Update Guarantee:
|
|
146
|
+
- **Refreshes & Upgrades:** Core orchestrators (`tools/audit.js`, `tools/audit.py`), built-in AST guards, Agent Skills (`.agents/skills/`), and IDE symlinks (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, Copilot, Antigravity).
|
|
147
|
+
- **100% Preserved:**
|
|
148
|
+
- `sdds/`: All local specifications, plans, and verification receipts remain intact.
|
|
149
|
+
- `tools/guards/`: All team-authored custom AST guards are preserved without modification.
|
|
150
|
+
- `.clckernel.yaml`: All custom thresholds and active safeguard selections are preserved.
|
|
151
|
+
- Application source code and domain models are never touched.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
130
155
|
<a id="supported-stacks"></a>
|
|
131
156
|
## 🌐 Supported Stacks & Archetypes
|
|
132
157
|
|
package/package.json
CHANGED
package/src/adapters/agent-os.js
CHANGED
|
@@ -165,6 +165,7 @@ When given a command matching \`clckernel <action>\` or \`/clckernel <action>\`,
|
|
|
165
165
|
| \`clckernel doctor\` | Diagnostics | Check git pre-commit hooks, IDE symlinks, and AST engine integrity. |
|
|
166
166
|
| \`clckernel commit <message>\` | Version Control | Run full audit, verify tests pass, ensure no changes outside SDD scope, and commit with conventional commits (never add AI attribution). |
|
|
167
167
|
| \`clckernel guard create <name>\` | Safeguards | Scaffold a new AST guard in the stack's native language in \`tools/guards/\`. |
|
|
168
|
+
| \`clckernel update\` | Maintenance | Non-destructive update: refresh core tools, playbooks & symlinks (preserves SDDs & custom guards). |
|
|
168
169
|
| \`clckernel start\` | Setup | Scan codebase, propose governance plan, and materialize \`.clckernel.yaml\`. |
|
|
169
170
|
|
|
170
171
|
---
|
package/src/generator.js
CHANGED
|
@@ -338,6 +338,7 @@ When given a command matching \`clckernel <action>\` or \`/clckernel <action>\`,
|
|
|
338
338
|
| \`clckernel doctor\` | Diagnostics | Check git pre-commit hooks, IDE symlinks, and AST engine integrity. |
|
|
339
339
|
| \`clckernel commit <message>\` | Version Control | Run full audit, verify tests pass, ensure no changes outside SDD scope, and commit with conventional commits (never add AI attribution). |
|
|
340
340
|
| \`clckernel guard create <name>\` | Safeguards | Scaffold a new AST guard in the stack's native language in \`tools/guards/\`. |
|
|
341
|
+
| \`clckernel update\` | Maintenance | Non-destructive update: refresh core tools, playbooks & symlinks (preserves SDDs & custom guards). |
|
|
341
342
|
| \`clckernel start\` | Setup | Scan codebase, propose governance plan, and materialize \`.clckernel.yaml\`. |
|
|
342
343
|
`;
|
|
343
344
|
fs.writeFileSync(path.join(targetDir, 'AGENTS.md'), agentsContent, 'utf-8');
|
package/src/index.js
CHANGED
|
@@ -14,16 +14,23 @@ async function runCli() {
|
|
|
14
14
|
const command = args[0];
|
|
15
15
|
|
|
16
16
|
let targetDir = process.cwd();
|
|
17
|
-
if (command && !command.startsWith('-') && command !== 'doctor') {
|
|
17
|
+
if (command && !command.startsWith('-') && command !== 'doctor' && command !== 'update') {
|
|
18
18
|
targetDir = path.resolve(command);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
if (command === 'doctor' || args.includes('--doctor')) {
|
|
22
|
-
if (args[1]) targetDir = path.resolve(args[1]);
|
|
22
|
+
if (args[1] && args[1] !== '--doctor') targetDir = path.resolve(args[1]);
|
|
23
23
|
runDoctor(targetDir);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
if (command === 'update' || args.includes('--update')) {
|
|
28
|
+
if (args[1] && args[1] !== '--update') targetDir = path.resolve(args[1]);
|
|
29
|
+
const { runUpdate } = require('./updater');
|
|
30
|
+
await runUpdate(targetDir);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
27
34
|
// 1. Print Pro ASCII Banner
|
|
28
35
|
printBanner();
|
|
29
36
|
|
package/src/updater.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLC Kernel — Non-Destructive Harness Updater
|
|
3
|
+
* Safely updates core AST tools, skills, playbooks, and IDE symlinks in an existing
|
|
4
|
+
* project while guaranteeing 100% preservation of:
|
|
5
|
+
* - Local specifications (sdds/)
|
|
6
|
+
* - Custom AST guards (tools/guards/)
|
|
7
|
+
* - Project configuration and custom thresholds (.clckernel.yaml / .clc-forge.yaml)
|
|
8
|
+
* - Application source code and domain models
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
const { autoDetectStack } = require('./detector');
|
|
14
|
+
const { generateHarness } = require('./generator');
|
|
15
|
+
|
|
16
|
+
function updateHarness(targetDir = process.cwd(), options = {}) {
|
|
17
|
+
const resolvedDir = path.resolve(targetDir);
|
|
18
|
+
|
|
19
|
+
if (!fs.existsSync(resolvedDir)) {
|
|
20
|
+
throw new Error(`Target directory "${resolvedDir}" does not exist.`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 1. Detect Stack
|
|
24
|
+
const detected = autoDetectStack(resolvedDir);
|
|
25
|
+
|
|
26
|
+
// 2. Identify existing preserved assets
|
|
27
|
+
const preserved = {
|
|
28
|
+
sdds: fs.existsSync(path.join(resolvedDir, 'sdds')),
|
|
29
|
+
customGuards: fs.existsSync(path.join(resolvedDir, 'tools', 'guards')),
|
|
30
|
+
configYaml: fs.existsSync(path.join(resolvedDir, '.clckernel.yaml')) || fs.existsSync(path.join(resolvedDir, '.clc-forge.yaml')),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// 3. Run harness generation (refreshes tools, hooks, skills, and symlinks)
|
|
34
|
+
generateHarness(resolvedDir, detected);
|
|
35
|
+
|
|
36
|
+
// 4. Ensure AGENTS.md includes the update command in the command table
|
|
37
|
+
const agentsPath = path.join(resolvedDir, 'AGENTS.md');
|
|
38
|
+
if (fs.existsSync(agentsPath)) {
|
|
39
|
+
let agentsContent = fs.readFileSync(agentsPath, 'utf-8');
|
|
40
|
+
if (!agentsContent.includes('clckernel update')) {
|
|
41
|
+
if (agentsContent.includes('| `clckernel start`')) {
|
|
42
|
+
agentsContent = agentsContent.replace(
|
|
43
|
+
'| `clckernel start`',
|
|
44
|
+
'| `clckernel update` | Maintenance | Non-destructive update: refresh core tools, playbooks & symlinks (preserves SDDs & custom guards). |\n| `clckernel start`'
|
|
45
|
+
);
|
|
46
|
+
fs.writeFileSync(agentsPath, agentsContent, 'utf-8');
|
|
47
|
+
} else if (agentsContent.includes('## 3. Universal Command Interface')) {
|
|
48
|
+
agentsContent += '\n| `clckernel update` | Maintenance | Non-destructive update: refresh core tools, playbooks & symlinks (preserves SDDs & custom guards). |\n';
|
|
49
|
+
fs.writeFileSync(agentsPath, agentsContent, 'utf-8');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
success: true,
|
|
56
|
+
targetDir: resolvedDir,
|
|
57
|
+
preserved,
|
|
58
|
+
refreshed: {
|
|
59
|
+
tools: true,
|
|
60
|
+
skills: true,
|
|
61
|
+
symlinks: true,
|
|
62
|
+
hooks: true,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function runUpdate(targetDir = process.cwd()) {
|
|
68
|
+
const { colors, printBanner } = require('./ui');
|
|
69
|
+
printBanner();
|
|
70
|
+
|
|
71
|
+
console.log(`\n${colors.cyan}🔄 Actualizando CLC Kernel en:${colors.reset} ${targetDir}\n`);
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
const result = updateHarness(targetDir);
|
|
75
|
+
|
|
76
|
+
console.log(`${colors.green}✔ Salvaguardas estándar actualizadas en tools/${colors.reset}`);
|
|
77
|
+
console.log(`${colors.green}✔ Playbooks y Skills agénticos actualizados en .agents/skills/${colors.reset}`);
|
|
78
|
+
console.log(`${colors.green}✔ Enlaces simbióticos de IDEs actualizados (Cursor, Claude, Copilot, Antigravity)${colors.reset}`);
|
|
79
|
+
console.log(`${colors.green}✔ Hooks de git sincronizados${colors.reset}`);
|
|
80
|
+
console.log(`\n${colors.bold}🔒 ACTIVOS PRESERVADOS AL 100%:${colors.reset}`);
|
|
81
|
+
console.log(` • ${colors.emerald}sdds/${colors.reset} (Especificaciones locales intactas)`);
|
|
82
|
+
console.log(` • ${colors.emerald}tools/guards/${colors.reset} (Reglas y salvaguardas personalizadas intactas)`);
|
|
83
|
+
console.log(` • ${colors.emerald}.clckernel.yaml${colors.reset} (Configuraciones de equipo intactas)\n`);
|
|
84
|
+
console.log(`${colors.green}✨ ¡Proyecto actualizado con éxito a la última versión de CLC Kernel!${colors.reset}\n`);
|
|
85
|
+
return result;
|
|
86
|
+
} catch (err) {
|
|
87
|
+
console.error(`\n❌ Error actualizando el arnés: ${err.message}`);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
module.exports = { updateHarness, runUpdate };
|