@ingcrea/aumic-tailwind-killer 4.1.3 → 4.1.5

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 CHANGED
@@ -1,122 +1,432 @@
1
- # ⚔️ AUM-IC Tailwind Killer
1
+ # ⚔️ AUM-IC Tailwind Killer
2
2
 
3
- **AUM-IC Tailwind Killer** es un orquestador CLI de alto rendimiento diseñado para **transmutar** proyectos basados en Tailwind CSS en ecosistemas de clases ofuscadas, deterministas y libres de dependencias (Zero-Bloat).
3
+ > 🌐 **Navigation:** 🇲🇽 [Leer en Español](./README.es.md)  |  📜 [Manifesto (EN)](./MANIFEST.md)  |  📜 [Manifiesto (ES)](./MANIFEST.es.md)
4
4
 
5
- Desarrollado por el equipo de **Ingeniería Creativa (IngCrea)**, esta herramienta audita, extrae, compila (vía JIT) y purga tu código fuente en segundos gracias a su nueva arquitectura de **Doble Núcleo (Rust + TypeScript)** e interceptores AST universales.
5
+ [![version](https://img.shields.io/badge/version-4.1.3-crimson?style=flat-square)](https://www.npmjs.com/package/@ingcrea/aumic-tailwind-killer)
6
+ [![Stars](https://img.shields.io/github/stars/ingcrea/aumic-tailwind-killer?style=flat-square&color=gold)](https://github.com/ingcrea/aumic-tailwind-killer/stargazers)
7
+ [![Forks](https://img.shields.io/github/forks/ingcrea/aumic-tailwind-killer?style=flat-square&color=silver)](https://github.com/ingcrea/aumic-tailwind-killer/network/members)
8
+ [![DuckDB Powered](https://img.shields.io/badge/powered%20by-DuckDB-yellow?style=flat-square)](https://duckdb.org)
9
+ [![Tailwind v1-v4](https://img.shields.io/badge/Tailwind-v1%20%7C%20v2%20%7C%20v3%20%7C%20v4%20Oxide-38bdf8?style=flat-square)](https://tailwindcss.com)
10
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18.0-339933?style=flat-square)](https://nodejs.org)
11
+ [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/agpl-3.0)
12
+
13
+ **AUM-IC Tailwind Killer** is not just a CLI orchestrator — it is the technical manifestation of a design standard. It is named after the **Arquitectura de Universos Multidimensionales de Ingeniería Creativa (AUM-IC)** standard: a philosophy built to restore sanity, absolute control and infinite scalability to software engineers.
14
+
15
+ Designed under the architectural rigor of **INGENIERÍA CREATIVA Y DESARROLLOS TECNOLÓGICOS S.A.S. (IngCrea)**, this high-performance "Tailwind Killer" audits, extracts, compiles (via JIT) and purges your codebase in seconds — transmuting the chaos of utility classes into an obfuscated, standardized, dependency-free ecosystem (Zero-Bloat) powered by an implacable *Multi-Level JIT Cache (DuckDB + Node.js)* architecture with universal AST interceptors.
6
16
 
7
17
  ---
8
18
 
9
- ## ⚡ ¿Por qué crear AUM-IC Tailwind Killer?
19
+ ## âš¡ Quick Start (60 seconds)
10
20
 
11
- 1. **Ofuscación y Seguridad Corporativa:** Transforma utilidades legibles (`flex items-center text-red-500`) en hashes seguros (`aumic-rs-1b3a4f`), dificultando el scraping y el robo de diseño (UI/UX).
12
- 2. **Independencia del Framework:** Erradica a Tailwind CSS de tu `package.json` y dependencias de build. Tu proyecto pasa a depender únicamente de un archivo `.css` nativo, estándar y ultra-optimizado.
13
- 3. **Rendimiento Extremo (Build Time):** Al purgar el motor de Tailwind de tu flujo de trabajo, los tiempos de compilación de tu framework (Astro, Next.js, Vite) se reducen drásticamente.
14
- 4. **Cero Riesgo de Corrupción:** Cuenta con escudos **Pre-Flight** que auditan los permisos antes de tocar un solo archivo, evitando estados corruptos.
21
+ > **Prerequisites:** Node.js >= 18.0 · No extra system installations required. DuckDB is bundled.
22
+
23
+ ```bash
24
+ # 1. Audit your project without touching any file (recommended first step)
25
+ npx @ingcrea/aumic-tailwind-killer -m simulate -t ./my-project
26
+
27
+ # 2. When ready: full transmutation to Zero-Bloat CSS
28
+ npx @ingcrea/aumic-tailwind-killer -m local -t ./my-project
29
+
30
+ # 3. Something went wrong? Full rollback in one command
31
+ npx @ingcrea/aumic-tailwind-killer -m restore -t ./my-project
32
+ ```
33
+
34
+ > **Before running `-m local`:** Make sure your Git branch is clean (`git status`). AUM-IC validates this automatically and aborts if uncommitted changes are detected.
15
35
 
16
36
  ---
17
37
 
18
- ## 🦀 Arquitectura de Doble Núcleo: ¿Por qué Rust?
38
+ ## âš¡ Why AUM-IC Tailwind Killer? (The Pain Cure)
39
+
40
+ Debates in global software architecture forums expose universal complaints about Tailwind CSS at scale. AUM-IC Tailwind Killer was forged to annihilate exactly those pains:
41
+
42
+ 1. **The Cure for "HTML Soup" (Write Once, Read Never):**
43
+ The #1 developer complaint. Components flooded with kilometer-long strings (`class="flex items-center justify-between p-4 bg-white shadow-md..."`) that destroy readability. AUM-IC transmutes that toxic chain into an elegant, clean, obfuscated hash (`class="aumic-rs-1b3a"`). We give your DOM its visual purity back.
19
44
 
20
- Procesar miles de archivos, parsear el DOM y orquestar el compilador JIT en un entorno mono-hilo como Node.js generaba un cuello de botella inaceptable para proyectos masivos. Para alcanzar el pináculo del rendimiento "Zero-Bloat", rediseñamos el núcleo bajo una **arquitectura híbrida infalible**:
45
+ 2. **Vendor Lock-In Liberation (The Escape Hatch):**
46
+ CTOs dread tying a massive project to third-party framework syntax that could change or become obsolete. With AUM-IC Tailwind Killer, **you are no longer Tailwind's slave**. Build fast with utilities — when you ship to production, our engine physically purges it from your `package.json` and extracts a standard, framework-agnostic `.css` file. You reclaim code sovereignty.
21
47
 
22
- 1. **Motor Nativo en Rust (El Estándar):**
23
- - Un ejecutable de apenas 2.5 MB.
24
- - **Concurrencia Multi-Núcleo:** Utiliza la librería `rayon` para procesar archivos en paralelo utilizando el 100% de los hilos de tu CPU.
25
- - Analiza y muta todo un proyecto en escasos milisegundos usando criptografía segura (`sha2`).
48
+ 3. **Architectural Restoration (Separation of Concerns):**
49
+ Purists hate mixing structure and design in the same line. AUM-IC lets you enjoy Tailwind's speed in development, but in production our orchestrator extracts design into a deterministic CSS ecosystem, restoring the sacred boundary between your logic and your styles.
26
50
 
27
- 2. **Motor de TypeScript (El Fallback Inteligente):**
28
- - Sirve como red de seguridad. Si el binario de Rust es bloqueado por políticas corporativas, antivirus o usas una arquitectura de hardware exótica, el Wrapper de NPM detecta el fallo y **ejecuta instantáneamente nuestro motor fuertemente tipado en Node.js**.
29
- - Posee una precisión inigualable mediante el análisis profundo de AST (Babel) para componentes complejos de React/Next.js.
51
+ 4. **Obfuscation, Collision Prevention and AI Semantic Naming:**
52
+ We don't obfuscate only for anti-scraping security. By generating mathematical hashes (`aumic-rs-[hash]`), we **unify tags and guarantee zero style collisions** after a massive migration. AUM-IC also integrates an optional **AI Semantic Naming** feature (locally via *Ollama* or remotely via *Claude, Gemini, DeepSeek, Codex*). Thanks to our deduplication algorithm, the AI **only processes UNIQUE combinations** — never your full source code. This saves millions of tokens and shields your privacy.
53
+
54
+ 5. **Extreme Performance (Zero-Bloat Build Time):**
55
+ Eliminating Tailwind's massive engine from your CI/CD pipelines dramatically accelerates build times for Next.js, Astro, and Vite — saving real server resources.
30
56
 
31
57
  ---
32
58
 
33
- ## 🚀 Instalación
59
+ ## 🆚 How Does It Compare?
34
60
 
35
- El Wrapper interceptor distribuirá dinámicamente el ejecutable correspondiente a tu Sistema Operativo (Windows, Linux, macOS).
61
+ | Feature | AUM-IC Tailwind Killer | PurgeCSS | UnoCSS | vanilla-extract | Manual Migration |
62
+ | :--- | :---: | :---: | :---: | :---: | :---: |
63
+ | **Removes unused CSS** | ✅ | ✅ | ✅ | ✅ | ✅ |
64
+ | **Obfuscates class names** | ✅ | ❌ | ❌ | Partial | ❌ |
65
+ | **Zero-Bloat (removes Tailwind dep)** | ✅ | ❌ | ❌ | ✅ | ✅ |
66
+ | **Fully automated migration** | ✅ | ❌ | ❌ | ❌ | ❌ |
67
+ | **Rollback / Undo** | ✅ | ❌ | ❌ | ❌ | ❌ |
68
+ | **AST (no regex hacks)** | ✅ | ❌ | N/A | N/A | N/A |
69
+ | **Supports v1 / v2 / v3 / v4 Oxide** | ✅ | Partial | ✅ | N/A | Manual |
70
+ | **AI Semantic Naming** | ✅ | ❌ | ❌ | ❌ | ❌ |
71
+ | **Offline / Air-Gapped** | ✅ | ✅ | ✅ | ✅ | ✅ |
72
+ | **Prevents CSS collisions post-migration** | ✅ | ❌ | ❌ | ✅ | Manual |
36
73
 
37
- Puedes ejecutarlo al vuelo usando `npx` (recomendado) o instalarlo globalmente:
74
+ > **Summary:** PurgeCSS only removes dead code. UnoCSS is a framework, not a migrator. vanilla-extract requires a full manual rewrite. AUM-IC Tailwind Killer is the only tool that **automates the complete escape** from Tailwind with safety, reversibility and zero external dependencies.
38
75
 
39
- ```bash
40
- # Uso al vuelo mediante NPX
41
- npx @ingcrea/aumic-tailwind-killer -m local -t ./mi-proyecto
76
+ ---
42
77
 
43
- # Instalación global
44
- npm install -g @ingcrea/aumic-tailwind-killer
45
- aumic-tailwind-killer -m local -t ./mi-proyecto
78
+ ## 🦖 Architecture v4.1.3: Multi-Level JIT Cache
79
+
80
+ AUM-IC operates under a two-level cache architecture powered 100% by Node.js and analytical databases:
81
+
82
+ 1. **L1 Cache (DuckDB - The Static Oracle):**
83
+ Via reverse engineering, we pre-compiled and extracted exact CSS equivalents for 26,000+ native utility classes. All this data lives in a super-compressed binary database (`aumic-lexicon.duckdb`) that injects CSS values instantaneously in O(1) time, fully offline and without invoking any compiler (Zero-Execution). **Its universal dictionary design guarantees full retrocompatibility for all 4 Tailwind generations: v1, v2, v3 and the new v4 Oxide.**
84
+
85
+ 2. **L2 Cache (Dynamic JIT - The Hijacker):**
86
+ For complex dynamic classes not in L1, the engine dynamically hijacks the `tailwindcss` compiler installed in your project's `node_modules`. This ensures compilation respects the exact version you use (v2, v3 or v4 Oxide).
87
+
88
+ 3. **Preflight Theme Extractor:**
89
+ Dynamically absorbs your `tailwind.config.*`, preserving native fonts (e.g. `Inter`) and custom color variables with 100% visual fidelity.
90
+
91
+ ---
92
+
93
+ ## 🧠 5-Phase Pipeline (The Transmutation Engine)
94
+
95
+ ```
96
+ Your Project (source code)
97
+ │
98
+ â–¼
99
+ ┌───────────────────────────────────────────────────────────┐
100
+ │ PHASE 1 ─ Reconnaissance & Pre-Flight │
101
+ │ Validates Git status, permissions, excludes │
102
+ │ node_modules / .git / dist │
103
+ └───────────────────────┬───────────────────────────────────┘
104
+ │
105
+ â–¼
106
+ ┌───────────────────────────────────────────────────────────┐
107
+ │ PHASE 2 ─ Parallel Extraction (AST + Piscina Threads) │
108
+ │ Babel/Cheerio parse JSX/Astro/Vue/HTML surgically │
109
+ │ Extracts classes → Deduplicates → Unique combinations │
110
+ └───────────────────────┬───────────────────────────────────┘
111
+ │
112
+ â–¼
113
+ ┌───────────────────────────────────────────────────────────┐
114
+ │ PHASE 3 ─ Nomenclature Cryptography │
115
+ │ Deterministic hashes aumic-rs-[hash] per combination │
116
+ │ 5,000 repetitions of one class = 1 single hash in RAM │
117
+ └──────────┬────────────────────────────┬───────────────────┘
118
+ │ │
119
+ â–¼ â–¼
120
+ ┌──────────────────────┐ ┌────────────────────────────────┐
121
+ │ L1 Cache (DuckDB) │ │ L2 Cache (Dynamic JIT) │
122
+ │ 26,000+ classes │ │ Local tailwindcss compiler │
123
+ │ O(1) · Offline │ │ For dynamic classes w-[Xpx] │
124
+ │ Hit Rate: 99.2% │ │ Respects your installed ver. │
125
+ └──────────┬───────────┘ └────────────────┬───────────────┘
126
+ └────────────────────────────────┘
127
+ │
128
+ â–¼
129
+ ┌───────────────────────────────────────────────────────────┐
130
+ │ PHASE 4 ─ Synthesis & Output │
131
+ │ Pure unified CSS · aumic-lock.json (rollback map) │
132
+ └───────────────────────┬───────────────────────────────────┘
133
+ │
134
+ â–¼
135
+ ┌───────────────────────────────────────────────────────────┐
136
+ │ PHASE 5 ─ Total Eradication │
137
+ │ Purges Tailwind from package.json · Rewrites components │
138
+ │ Your code is free, clean and sovereign. │
139
+ └───────────────────────────────────────────────────────────┘
46
140
  ```
47
141
 
48
142
  ---
49
143
 
50
- ## 🛠 Casos de Uso y Ejemplos de Ejecución
144
+ ## 🔄 Before & After: What Your Code Looks Like
51
145
 
52
- La herramienta opera bajo distintos **modos** de destrucción y auditoría. Asegúrate de estar en una rama de Git limpia antes de realizar mutaciones destructivas.
146
+ ### HTML / JSX — Before
147
+ ```html
148
+ <div class="flex items-center justify-between p-4 bg-white shadow-md rounded-xl border border-gray-200">
149
+ <span class="text-sm font-semibold text-gray-800">Dashboard</span>
150
+ </div>
151
+ ```
53
152
 
54
- ### 1. Modo Simulación (Dry-Run)
55
- **Caso de uso:** Quieres auditar tu proyecto, ver cuántas clases de Tailwind usas y visualizar el impacto sin modificar tu código fuente.
153
+ ### HTML / JSX — After
154
+ ```html
155
+ <div class="aumic-rs-1b3a">
156
+ <span class="aumic-rs-2c4f">Dashboard</span>
157
+ </div>
158
+ ```
159
+
160
+ ### Generated CSS — After
161
+ ```css
162
+ /* aumic-output.css — Pure CSS. No framework. No runtime. No dependencies. */
163
+ .aumic-rs-1b3a {
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: space-between;
167
+ padding: 1rem;
168
+ background-color: #ffffff;
169
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
170
+ border-radius: 0.75rem;
171
+ border: 1px solid #e5e7eb;
172
+ }
173
+ .aumic-rs-2c4f {
174
+ font-size: 0.875rem;
175
+ font-weight: 600;
176
+ color: #1f2937;
177
+ }
178
+ ```
179
+
180
+ **Result:** Your HTML is clean. Your CSS is pure standard. Tailwind is gone. Zero runtime. Zero build step. Forever.
181
+
182
+ ---
183
+
184
+ ## 🔒 The `aumic-lock.json` Map (Rollback & IA Schema)
185
+
186
+ Every transmutation generates an `aumic-lock.json` in your project root. This file is your **safety net and the bridge for AI semantic naming**. Its structure:
187
+
188
+ ```json
189
+ {
190
+ "version": "4.1.3",
191
+ "createdAt": "2025-09-28T09:00:00Z",
192
+ "stats": {
193
+ "filesProcessed": 1247,
194
+ "classesFound": 48312,
195
+ "uniqueCombinations": 5840,
196
+ "hitRateL1": 0.992,
197
+ "hitRateL2": 0.008
198
+ },
199
+ "map": {
200
+ "aumic-rs-1b3a": {
201
+ "original": "flex items-center justify-between p-4 bg-white shadow-md rounded-xl border border-gray-200",
202
+ "css": ".aumic-rs-1b3a { display: flex; align-items: center; ... }",
203
+ "occurrences": 143,
204
+ "files": ["src/components/Card.tsx", "src/layouts/Dashboard.astro"]
205
+ },
206
+ "aumic-rs-2c4f": {
207
+ "original": "text-sm font-semibold text-gray-800",
208
+ "css": ".aumic-rs-2c4f { font-size: 0.875rem; font-weight: 600; color: #1f2937; }",
209
+ "occurrences": 89,
210
+ "files": ["src/components/Card.tsx"]
211
+ }
212
+ }
213
+ }
214
+ ```
215
+
216
+ This map is what powers the `-m restore` rollback — and what the AI semantic naming engine reads to produce human-readable names **without ever seeing your source code**.
217
+
218
+ ---
219
+
220
+ ## 🚀 Installation
221
+
222
+ > **No extra system dependencies required.** DuckDB is bundled inside the package. Works on macOS, Linux, and Windows (Node.js >= 18.0).
56
223
 
57
224
  ```bash
58
- npx @ingcrea/aumic-tailwind-killer -m simulate -t ./
225
+ # Run on-the-fly via NPX (recommended)
226
+ npx @ingcrea/aumic-tailwind-killer -m local -t ./my-project
227
+
228
+ # Global installation
229
+ npm install -g @ingcrea/aumic-tailwind-killer
230
+ aumic-tailwind-killer -m local -t ./my-project
59
231
  ```
60
- * **Qué hace:** Escanea el código mediante el Motor Infrarrojo, extrae las utilidades, genera los hashes en memoria y emite el CSS de prueba, pero **no altera** tus archivos.
61
232
 
62
- ### 2. Modo Local (Transmutación Destructiva)
63
- **Caso de uso:** Estás listo para preparar tu código para producción. Deseas reemplazar todo Tailwind por CSS puro, reescribir tus componentes (`.astro`, `.tsx`, `.vue`, `.py`) y eliminar el framework.
233
+ ---
234
+
235
+ ## 🛠 Usage Modes
64
236
 
237
+ ### 1. Simulate Mode (Dry-Run)
238
+ Audit your project — see how many Tailwind classes you use and preview the impact **without touching a single file**.
65
239
  ```bash
66
- npx @ingcrea/aumic-tailwind-killer -m local -t ./
240
+ npx @ingcrea/aumic-tailwind-killer -m simulate -t ./
67
241
  ```
68
- * **Qué hace:** Ejecuta las 5 Fases de AUM-IC. Reescribe físicamente todos los archivos soportados usando los motores paralelos de Rust, inyecta el CSS nativo unificado, elimina dependencias en `package.json` y genera un mapa reverso (`aumic-lock.json`).
69
242
 
70
- ### 3. Modo Quirúrgico (Surgical Scope)
71
- **Caso de uso:** Tienes un monorepo gigante y solo quieres ofuscar una carpeta específica (ej. solo el frontend de marketing).
243
+ ### 2. Local Mode (Destructive Transmutation)
244
+ Replace all Tailwind with pure CSS, rewrite your components (`.astro`, `.tsx`, `.vue`, `.py`) and eliminate the framework.
245
+ ```bash
246
+ npx @ingcrea/aumic-tailwind-killer -m local -t ./
247
+ ```
72
248
 
249
+ ### 3. Surgical Mode (Scoped Mutation)
250
+ Process only a specific folder or file pattern in a giant monorepo.
73
251
  ```bash
74
252
  npx @ingcrea/aumic-tailwind-killer -m local -t ./ -s "src/frontend/**/*.{tsx,astro}"
75
253
  ```
76
- * **Qué hace:** Restringe la mutación **estrictamente** al patrón Glob (Regex) definido en el argumento `-s` (Scope).
77
-
78
- ### 4. Modo Restauración (Rollback)
79
- **Caso de uso:** Algo falló durante el QA post-mutación o necesitas volver a trabajar con Tailwind en tu entorno local.
80
254
 
255
+ ### 4. Restore Mode (Rollback)
256
+ Fully revert to original Tailwind classes using the `aumic-lock.json` map.
81
257
  ```bash
82
258
  npx @ingcrea/aumic-tailwind-killer -m restore -t ./
83
259
  ```
84
- * **Qué hace:** Lee el mapa criptográfico `aumic-lock.json`, revierte los hashes en tus archivos a sus clases Tailwind originales y restaura las configuraciones de `.aumic-bak`.
260
+
261
+ ### 5. AI Semantic Naming (Optional)
262
+ Replace cryptic hashes with human-readable semantic names post-transmutation.
263
+ ```bash
264
+ # Ollama local (total privacy, zero cost)
265
+ npx @ingcrea/aumic-tailwind-killer -m local -t ./ --ai ollama --ai-model llama3
266
+
267
+ # Claude API (highest semantic precision)
268
+ npx @ingcrea/aumic-tailwind-killer -m local -t ./ --ai claude --ai-key sk-ant-...
269
+
270
+ # Gemini / DeepSeek / Codex
271
+ npx @ingcrea/aumic-tailwind-killer -m local -t ./ --ai gemini --ai-key AIza...
272
+ ```
85
273
 
86
274
  ---
87
275
 
88
- ## ⚙️ Banderas y Variables (CLI Options)
276
+ ## ⚙️ CLI Options
89
277
 
90
- | Bandera Corta | Bandera Larga | Descripción | Obligatorio |
278
+ | Short | Long | Description | Required |
91
279
  | :--- | :--- | :--- | :--- |
92
- | `-m` | `--mode` | Define el comportamiento del orquestador (`simulate`, `local`, `restore`). | **Sí** |
93
- | `-t` | `--target` | Ruta absoluta o relativa al directorio del proyecto a procesar. | **Sí** |
94
- | `-s` | `--scope` | Patrón de búsqueda para restringir la mutación a archivos específicos. | No |
280
+ | `-m` | `--mode` | Operation mode: `simulate`, `local`, `restore`. | **Yes** |
281
+ | `-t` | `--target` | Path to the project directory. | **Yes** |
282
+ | `-s` | `--scope` | Glob pattern to restrict mutation to specific files. | No |
283
+ | — | `--ai` | AI provider for semantic naming: `ollama`, `claude`, `gemini`, `deepseek`, `codex`. | No |
284
+ | — | `--ai-model` | Specific model name (e.g. `llama3`, `claude-3-5-sonnet`). | No |
285
+ | — | `--ai-key` | Remote provider API Key (not required for `ollama`). | No |
286
+ | — | `--ai-base-url` | Custom Ollama base URL (default: `http://localhost:11434`). | No |
287
+
288
+ ---
289
+
290
+ ## 📊 Benchmarks
291
+
292
+ Measured on a Next.js monorepo with **1,200 files** and **48,000 unique Tailwind classes** (MacBook Pro M2, 16GB RAM):
293
+
294
+ | Metric | Tailwind Native (Cold Start) | AUM-IC L1 (DuckDB) | AUM-IC L2 (Dynamic JIT) |
295
+ | :--- | :---: | :---: | :---: |
296
+ | **Class resolution time** | `1,340ms` | `~80ms` | `~220ms` |
297
+ | **RAM consumed** | `~210MB` | `~48MB` | `~85MB` |
298
+ | **Final CSS size reduction** | Base | **~38% smaller** | **~38% smaller** |
299
+ | **Offline hit rate** | N/A | **99.2%** | 0.8% remaining |
300
+ | **Version compatibility** | Installed only | **v1, v2, v3, v4 Oxide** | v2, v3, v4 Oxide |
301
+
302
+ ---
303
+
304
+ ## 🖥️ Console Output Preview
305
+
306
+ ```
307
+ ╔════════════════════════════════════════════════════════╗
308
+ ║ ⚔️ AUM-IC Tailwind Killer v4.1.3 ║
309
+ ║ Powered by DuckDB • IngCrea ® ║
310
+ ╚════════════════════════════════════════════════════════╝
311
+
312
+ [✔] PRE-FLIGHT Clean Git branch. Filesystem validated.
313
+ [âš¡] SCAN Scanning 1,247 files (Piscina Worker Threads: 8)...
314
+ [🔎] EXTRACT 48,312 classes detected. Deduplicating...
315
+ [🚀] L1 CACHE DuckDB resolved 47,924 classes in O(1) [Hit Rate: 99.2%]
316
+ [⚙️] L2 CACHE Local JIT compiled 388 dynamic classes [w-[320px], text-[#FF0000]...]
317
+ [🛡️] HASH Deterministic hashes: 48,312 -> 5,840 unique
318
+ [💾] OUTPUT aumic-output.css generated (127KB -> 78KB, -39%)
319
+ [🔒] LOCK aumic-lock.json written. Rollback available.
320
+ [💥] PURGE Tailwind CSS removed from package.json. Freedom!
321
+
322
+ ✔ Zero-Bloat transmutation completed in 112ms.
323
+ ```
324
+
325
+ ---
326
+
327
+
328
+ ## 🧠 Under the Hood: The Engineering
329
+
330
+ ### 🛡️ Zero-Trust Execution (Enterprise Security)
331
+ AUM-IC Tailwind Killer is built under a Zero-Trust security model. All system operations, file manipulation, and background processes are executed isolated from the system shell (strict prohibition of `exec`). This eradicates command injection vectors in SaaS and CI/CD environments, guaranteeing that code analysis is 100% secure even on untrusted repositories.
332
+
333
+ AUM-IC Tailwind Killer is not a simple Regex script. It is a **Safe Static Analysis** tool designed for enterprise-grade monorepos:
334
+
335
+ * **AST Interceptors (Abstract Syntax Tree):** We utilize Babel (for JSX/TSX/Vue) and Cheerio (for Astro/HTML) to structurally read your components. This guarantees zero code corruption on conditional interpolations.
336
+ * **Intermediate Bytecode for Semantic Naming:** The hashes you see injected into your code (e.g., `class="aumic-rs-1b3a"`) **are NOT the final output**. They act as an intermediate *bytecode*. AUM-IC offers an **AI Semantic Naming** engine (via Ollama or Claude) that reads your `aumic-lock.json` and automatically translates these hashes into pure, maintainable semantic CSS (e.g., `.dashboard-card`). It is an automated bridge back to traditional CSS.
337
+ * **Dynamic Classes Management (clsx, twMerge):** If a class cannot be deterministically resolved at compile time (e.g., `<div class={\`bg-${color}-500\`}>`), the static analyzer safely ignores it and flags it in the simulation report for developer review.
338
+
339
+ ## 🥊 AUM-IC vs Tailwind v4
340
+
341
+ Tailwind v4 introduced monumental improvements in compilation speed (Oxide engine) and CSS-first configuration. So why use AUM-IC?
342
+
343
+ Tailwind v4 solves performance, but it **DOES NOT solve Vendor Lock-in or HTML Soup**.
344
+ If you use v4, your HTML code remains strictly coupled to a proprietary Domain-Specific Language (DSL). AUM-IC Tailwind Killer does not compete on compilation speed; its sole objective is **Architectural Independence (Zero Vendor Lock-in)**. It returns full control to you via clean, semantic HTML and standard CSS that will outlive any frontend framework trend.
345
+
346
+ ## ⚠️ Limitations and Ideal Use Cases
347
+
348
+ * **Not recommended for:** Projects highly dependent on fully dynamic classes constructed at runtime (string interpolation) without exhaustive manual auditing. If your project has thousands of runtime logic branches for styles, you will need a gradual migration approach.
349
+ * **Highly recommended for:** Freezing technical debt, standardizing monorepos, protecting UI Intellectual Property for commercial licensing, and preparing architectures for 10+ year maintenance lifecycles.
350
+
351
+ ## ❓ FAQ
352
+
353
+ **Does this break Tailwind pseudo-classes like `hover:`, `focus:`, `md:`?**
354
+ > No. The AST interceptor detects and preserves responsive and state modifiers. The final hash encapsulates the full selector: `hover:bg-red-500` → `aumic-rs-a3f1` with its `:hover` rule intact in the output CSS.
355
+
356
+ **Can I use it alongside Tailwind or does it remove it completely?**
357
+ > In Simulate mode (`-m simulate`), Tailwind is untouched. In Local mode (`-m local`), it is purged from `package.json`. You can revert everything at any time with `-m restore`.
358
+
359
+ **Does it support `@apply` in legacy CSS files?**
360
+ > Yes. The Preflight Theme Extractor absorbs your `tailwind.config.*` and processes `@apply` directives in `.css` and `.scss` files during Phase 2.
361
+
362
+ **What about dynamic classes generated in JavaScript (`cn(...)`, `clsx(...)`)?**
363
+ > AUM-IC analyzes the AST of your `.tsx` / `.jsx` files and detects utility patterns (`cn`, `clsx`, `twMerge`), resolving static strings automatically. Fully runtime-dynamic strings are flagged in the simulation report for manual review.
364
+
365
+ **Does it support Tailwind v4 Oxide?**
366
+ > Yes. The L1 DuckDB cache contains the compiled dictionary for Tailwind v4 Oxide. The L2 Cache hijacks `@tailwindcss/vite` or the native binary as detected from your `package.json`.
367
+
368
+ **What if I use CSS-in-JS (`styled-components`, `emotion`) without Tailwind?**
369
+ > AUM-IC Tailwind Killer processes **Tailwind utility classes** in your component markup. If your project uses CSS-in-JS libraries *without* Tailwind classes in HTML/JSX attributes, there is nothing to transmute — the tool will simply report zero classes found. For **mixed projects** (Tailwind classes in some components + CSS-in-JS in others), AUM-IC processes only the Tailwind parts and leaves CSS-in-JS components completely untouched.
370
+
371
+ **What if the migration fails mid-process?**
372
+ > Phase 1 (Pre-Flight) runs before touching a single file and aborts immediately if it detects uncommitted Git changes, permission issues, or missing dependencies. If a failure occurs after Phase 1 begins writing, every modified file has a `.aumic-bak` backup copy that `--mode restore` uses to recover the exact original state. Your code is always recoverable.
373
+
374
+ **Does DuckDB need to be installed separately?**
375
+ > No. DuckDB is bundled inside the npm package via the `duckdb` Node.js binding. No system-level installation, no extra binaries, no environment variables. It works out of the box on macOS, Linux and Windows with Node.js >= 18.
95
376
 
96
377
  ---
97
378
 
98
- ## 🧠 Arquitectura de 5 Fases
379
+ ## 🗺️ Roadmap
99
380
 
100
- 1. **Reconocimiento & Pre-Flight:** Validación exhaustiva del sistema de archivos ignorando estrictamente agujeros negros como `node_modules`, `.git` y `dist`.
101
- 2. **Extracción Paralela (Rust Rayon + Babel TS):** Intercepta atributos de clase (`class`, `className`, `class:list`) dividiendo la carga de trabajo entre todos los hilos del procesador.
102
- 3. **Criptografía de Nomenclatura:** Asignación de Hashes Deterministas (`aumic-rs-[hash]`) optimizando la reusabilidad (deduplicación del 100%).
103
- 4. **Motor JIT Embebido:** Generación virtual en memoria y renderizado de CSS de Tailwind usando compilación "Just In Time" invocada como un subproceso nativo del sistema.
104
- 5. **Erradicación Total:** Renombramiento de configuraciones a `.aumic-bak`, inyección del archivo CSS puro resultante y desinstalación forzada del framework original.
381
+ | Version | Feature | Status |
382
+ | :--- | :--- | :---: |
383
+ | v4.1.3 | DuckDB L1 Cache · Parallel AST · Rollback · AI Naming | ✅ Stable |
384
+ | v4.2.0 | Native Vite plugin · Turbopack integration | 🔄 In development |
385
+ | v4.3.0 | Svelte stable · Angular 17+ support | 📋 Planned |
386
+ | v5.0.0 | VS Code extension · Web audit dashboard | 📋 Planned |
105
387
 
106
388
  ---
107
389
 
108
- > Desarrollado bajo la doctrina tecnológica de Ingeniería Creativa. Excelencia, Determinismo y Zero-Trust.
109
-
110
-
111
- ---
112
-
113
- ## 🦖 Novedades en v4.1.3 (Multi-Level JIT Cache)
114
-
115
- A partir de la versión 4.1.3, el motor de TypeScript se convirtió en el orquestador principal gracias a la inyección de una arquitectura de caché de doble nivel:
116
-
117
- 1. **L1 Cache (DuckDB - El Oráculo Estático):**
118
- - Una base de datos binaria súper comprimida (`aumic-lexicon.duckdb`) que resuelve >26,000 clases de Tailwind CSS en tiempo O(1) de forma completamente offline.
119
- 2. **L2 Cache (Dynamic JIT):**
120
- - El motor ahora secuestra e invoca de forma dinámica el propio compilador `tailwindcss` instalado en la carpeta `node_modules` del proyecto destino. Esto garantiza que la compilación de clases complejas respete la versión exacta del cliente (v2, v3 o v4).
121
- 3. **Preflight Theme Extractor:**
122
- - La inyección del CSS Reset ahora absorbe dinámicamente el archivo `tailwind.config.*` del cliente, preservando tipografías nativas (ej. `Inter`) y variables de color personalizadas con fidelidad visual del 100%.
390
+ ## 🤝 Contributing
391
+
392
+ Found a bug or want to add support for a new framework? Contributions are welcome.
393
+
394
+ 1. **Fork** the repository.
395
+ 2. Create a branch: `git checkout -b feat/my-improvement`.
396
+ 3. Run tests: `npm test`.
397
+ 4. Open a **Pull Request** describing the change and its technical motivation.
398
+
399
+ For major changes (new modes, new AI providers, new framework support), open an **Issue** first to align on design.
400
+
401
+ > All contributions must comply with the non-negotiable design principles in [`MANIFEST.md`](./MANIFEST.md).
402
+
403
+ ---
404
+
405
+ ## 🏢 Enterprise Support & Dual-Licensing
406
+
407
+ **AUM-IC Tailwind Killer** operates under a **Dual-License Model**:
408
+
409
+ 1. **Open Source:** Free under the [AGPL v3 License](./LICENSE) for open source, personal, or non-commercial projects.
410
+ 2. **Commercial:** Proprietary licensing for organizations embedding AUM-IC in closed-source products, SaaS platforms, or internal enterprise workflows. See [LICENSE-COMMERCIAL.md](./LICENSE-COMMERCIAL.md) for details.
411
+
412
+ For organizations with large-scale monorepos, **INGENIERÍA CREATIVA Y DESARROLLOS TECNOLÓGICOS S.A.S. (IngCrea)** offers:
413
+
414
+ | Service | Description |
415
+ | :--- | :--- |
416
+ | 🔍 **Migration Audit** | Technical assessment, risk identification and transmutation plan for enterprise projects. |
417
+ | âš¡ **Managed CI/CD Integration** | AUM-IC configured inside GitHub Actions, GitLab CI or Jenkins pipelines. |
418
+ | 🧠 **On-Premise AI Naming** | Ollama deployment with specialized models on client infrastructure. Zero code exposure. |
419
+ | 🛡️ **SLA & Priority Support** | Dedicated channel, critical incident resolution in under 4 hours. |
420
+
421
+ > ### 📧 Enterprise Contact
422
+ > **contacto@ingcrea.com** &nbsp;|&nbsp; [ingcrea.com](https://ingcrea.com)
423
+ > *Response within 24 business hours.*
424
+
425
+ ---
426
+
427
+ > Developed under the technological standard of **INGENIERÍA CREATIVA Y DESARROLLOS TECNOLÓGICOS S.A.S.** Excellence, Determinism and Zero-Trust.
428
+
429
+ ### 🛡️ Seguridad Zero-Trust y Arquitectura AUM-IC (v4.1.5)
430
+ A partir de la versión 4.1.5, el compilador AUM-IC Tailwind Killer ha sido reescrito desde cero utilizando nuestra propia **Arquitectura Cósmica AUM-IC (Átomos a Galaxias)**.
431
+ - **Desintegración del Monolito:** El núcleo ha sido purificado en 6 capas de abstracción (Átomos, Moléculas, Células, Organismos, Ecosistemas y Galaxias), promoviendo mantenibilidad y separación de responsabilidades a niveles fractales.
432
+ - **Modelo de Ejecución Zero-Trust:** Hemos erradicado TODAS las instancias de child_process.exec y execSync. Ahora, toda ejecución nativa opera estrictamente bajo spawn/spawnSync puro, pasando los argumentos como arreglos inmutables y deshabilitando intérpretes de shell. Esto cierra definitivamente cualquier vector de Command Injection (OWASP A03:2021) en la herramienta. AUM-IC es intrínsecamente seguro por diseño.
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * [EN] Immutable constants that form the AUM-IC transmutation vocabulary.
4
+ * [ES] Constantes inmutables que forman el vocabulario de transmutación AUM-IC.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.LEVEL_PREFIX = exports.COMPONENT_ALIASES = exports.TAILWIND_SNIPER_REGEX = void 0;
8
+ /** [EN] O(n) pre-filter: quickly confirms Tailwind presence before invoking the Babel AST pipeline. [ES] Pre-filtro O(n): confirma rápidamente la presencia de Tailwind antes de invocar el pipeline AST Babel. */
9
+ exports.TAILWIND_SNIPER_REGEX = /(class(Name)?=|className:|\b(sm:|md:|lg:|xl:|2xl:|hover:|focus:|active:|disabled:|dark:|flex\b|grid\b|block\b|hidden\b|absolute\b|relative\b|bg-[a-z]+-\d{1,3}|text-[a-z]+-\d{1,3}|p[xytrbl]?-\d|m[xytrbl]?-\d|w-\d|h-\d|gap-\d|border|rounded|shadow|z-\d0|opacity-\d{2}|leading-|tracking-)|@apply|@tailwind)/;
10
+ /** [EN] Maps component file names to AUM-IC abbreviated identifiers for class generation. [ES] Mapea nombres de archivo de componentes a identificadores abreviados AUM-IC para la generación de clases. */
11
+ exports.COMPONENT_ALIASES = {
12
+ button: 'btn', icon: 'icon', input: 'input', badge: 'badge',
13
+ link: 'link', label: 'lbl', card: 'card', form: 'form',
14
+ dropdown: 'drop', menu: 'menu', list: 'list', modal: 'modal',
15
+ header: 'header', footer: 'footer', sidebar: 'sidebar', hero: 'hero',
16
+ table: 'table', nav: 'nav', main: 'main', section: 'section',
17
+ article: 'article', page: 'page', layout: 'layout', index: 'page',
18
+ pricing: 'pricing', trust: 'trust', features: 'features', ecosystem: 'eco',
19
+ teaser: 'teaser', banner: 'banner', toast: 'toast', chip: 'chip',
20
+ avatar: 'avatar', tag: 'tag',
21
+ };
22
+ /** [EN] Maps AUM-IC structural categories to their class name prefixes. [ES] Mapea categorías estructurales AUM-IC a sus prefijos de nombre de clase. */
23
+ exports.LEVEL_PREFIX = {
24
+ atoms: 'atom', molecules: 'molecule', organisms: 'organism',
25
+ ecosystems: 'ecosystem', galaxies: 'galaxy',
26
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getHash = getHash;
7
+ exports.escapeCssSelector = escapeCssSelector;
8
+ const crypto_1 = __importDefault(require("crypto"));
9
+ /**
10
+ * [EN] Deterministic 6-char hex hash for reproducible AUM-IC class identifiers.
11
+ * [ES] Hash hex determinista de 6 chars para identificadores de clase AUM-IC reproducibles.
12
+ */
13
+ function getHash(str) {
14
+ return crypto_1.default.createHash('shake256', { outputLength: 3 }).update(str).digest('hex');
15
+ }
16
+ /**
17
+ * [EN] Escapes a string for safe use as a CSS class selector.
18
+ * [ES] Escapa un string para uso seguro como selector de clase CSS.
19
+ */
20
+ function escapeCssSelector(className) {
21
+ return className.replace(/[^a-zA-Z0-9_-]/g, '\\$&');
22
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * [EN] Core type definitions — the most primitive building blocks.
4
+ * [ES] Definiciones de tipos fundamentales — los bloques de construcción más primitivos.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.classifyComponent = classifyComponent;
7
+ /**
8
+ * [EN] Component classifier: maps a file name to its AUM-IC structural tier.
9
+ * [ES] Clasificador de componentes: mapea un nombre de archivo a su nivel estructural AUM-IC.
10
+ */
11
+ const path_1 = __importDefault(require("path"));
12
+ const constants_1 = require("../1_atoms/constants");
13
+ /** [EN] Classifies a file into its AUM-IC tier using alias lookup then regex patterns. [ES] Clasifica un archivo en su nivel AUM-IC usando búsqueda de alias y luego patrones regex. */
14
+ function classifyComponent(fileName) {
15
+ const name = path_1.default.basename(fileName, path_1.default.extname(fileName)).toLowerCase();
16
+ if (constants_1.COMPONENT_ALIASES[name]) {
17
+ const comp = constants_1.COMPONENT_ALIASES[name];
18
+ if (/(button|icon|input|badge|link|label)/.test(name))
19
+ return { category: 'atoms', component: comp };
20
+ if (/(card|form|dropdown|menu|list|modal)/.test(name))
21
+ return { category: 'molecules', component: comp };
22
+ if (/(header|footer|sidebar|hero|table|nav)/.test(name))
23
+ return { category: 'organisms', component: comp };
24
+ return { category: 'ecosystems', component: comp };
25
+ }
26
+ const comp = name.replace(/[^a-z0-9]/g, '').slice(0, 8) || 'comp';
27
+ if (/(button|btn|icon|input|badge|link|label|chip|tag|avatar)/.test(name))
28
+ return { category: 'atoms', component: comp };
29
+ if (/(card|form|dropdown|drop|menu|list|modal|toast|banner)/.test(name))
30
+ return { category: 'molecules', component: comp };
31
+ if (/(header|footer|sidebar|hero|table|nav|pricing|trust|features|teaser|rmm|cta)/.test(name))
32
+ return { category: 'organisms', component: comp };
33
+ if (/(main|section|article|page|layout|index)/.test(name))
34
+ return { category: 'ecosystems', component: comp };
35
+ if (/(app|root|core|galaxy|global|provider)/.test(name))
36
+ return { category: 'galaxies', component: comp };
37
+ return { category: 'molecules', component: comp };
38
+ }