Files
affaan-m--everything-claude…/docs/es/commands/instinct-import.md
T
wehub-resource-sync d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:55 +08:00

115 lines
3.0 KiB
Markdown

---
name: instinct-import
description: Importar instintos desde archivo o URL al alcance del proyecto/global
command: true
---
# Comando Instinct Import
## Implementación
Ejecutar la CLI de instintos usando la ruta raíz del plugin:
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cli.py" import <archivo-o-url> [--dry-run] [--force] [--min-confidence 0.7] [--scope project|global]
```
O si `CLAUDE_PLUGIN_ROOT` no está configurado (instalación manual):
```bash
python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <archivo-o-url>
```
Importar instintos desde rutas de archivos locales o URLs HTTP(S).
## Uso
```
/instinct-import team-instincts.yaml
/instinct-import https://github.com/org/repo/instincts.yaml
/instinct-import team-instincts.yaml --dry-run
/instinct-import team-instincts.yaml --scope global --force
```
## Qué Hacer
1. Obtener el archivo de instintos (ruta local o URL)
2. Parsear y validar el formato
3. Verificar duplicados con instintos existentes
4. Fusionar o añadir nuevos instintos
5. Guardar en el directorio de instintos heredados:
- Alcance de proyecto: `~/.claude/homunculus/projects/<project-id>/instincts/inherited/`
- Alcance global: `~/.claude/homunculus/instincts/inherited/`
## Proceso de Importación
```
Importando instintos desde: team-instincts.yaml
================================================
12 instintos encontrados para importar.
Analizando conflictos...
## Nuevos Instintos (8)
Estos se añadirán:
✓ use-zod-validation (confianza: 0.7)
✓ prefer-named-exports (confianza: 0.65)
✓ test-async-functions (confianza: 0.8)
...
## Instintos Duplicados (3)
Ya existen instintos similares:
ADVERTENCIA: prefer-functional-style
Local: confianza 0.8, 12 observaciones
Importado: confianza 0.7
→ Conservar local (mayor confianza)
ADVERTENCIA: test-first-workflow
Local: confianza 0.75
Importado: confianza 0.9
→ Actualizar al importado (mayor confianza)
¿Importar 8 nuevos, actualizar 1?
```
## Comportamiento de Fusión
Al importar un instinto con un ID existente:
- El importado con mayor confianza se convierte en candidato de actualización
- El importado con igual/menor confianza se omite
- El usuario confirma a menos que se use `--force`
## Seguimiento de Fuente
Los instintos importados se marcan con:
```yaml
source: inherited
scope: project
imported_from: "team-instincts.yaml"
project_id: "a1b2c3d4e5f6"
project_name: "my-project"
```
## Flags
- `--dry-run`: Vista previa sin importar
- `--force`: Omitir el prompt de confirmación
- `--min-confidence <n>`: Solo importar instintos por encima del umbral
- `--scope <project|global>`: Seleccionar el alcance destino (por defecto: `project`)
## Salida
Después de la importación:
```
¡Importación completada!
Añadidos: 8 instintos
Actualizados: 1 instinto
Omitidos: 3 instintos (ya existe igual/mayor confianza)
Nuevos instintos guardados en: ~/.claude/homunculus/instincts/inherited/
Ejecutar /instinct-status para ver todos los instintos.
```