docs: actualizar skills /create-bot y /create-agent con nuevos scripts

- /create-bot: usa create-full.sh --type robot (pipeline de 6 pasos)
- /create-agent: documenta --type robot y notificacion a developers
- Referencia actualizada: agents/test-bot/ como ejemplo de robot

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 20:36:45 +00:00
parent 7edbbad6b3
commit 9e6d831ea9
2 changed files with 29 additions and 53 deletions
+9 -1
View File
@@ -37,15 +37,23 @@ Si `$ARGUMENTS` contiene el agent-id, usarlo directamente: `$0` = agent-id, `$1`
### Paso 2: Ejecutar pipeline de scaffold
Para **agentes** (con LLM):
```bash
./dev-scripts/agent/create-full.sh <agent-id> "<display-name>"
```
Este script ejecuta 4 etapas:
Para **robots** (command-only, sin LLM):
```bash
./dev-scripts/agent/create-full.sh <agent-id> "<display-name>" --type robot
```
El script ejecuta automaticamente:
1. **Scaffold**: copia `_template/`, personaliza archivos, actualiza launcher
2. **Build**: compila con `go build -tags goolm ./...`
3. **Register**: crea usuario Matrix, genera token + password + pickle key
4. **Verify E2EE**: genera cross-signing keys, recovery key
5. **(robots)** **Convert**: convierte a robot (config minimo, sin prompts, `command_prefix: ""`)
6. **Notify**: envia DM a los developers (`DEVELOPER_MATRIX_USERS` en `.env`) presentandose
Si alguna etapa falla, revisar el error y corregir antes de continuar.
+20 -52
View File
@@ -2,7 +2,7 @@
name: create-bot
description: >
Crear un nuevo robot Matrix (command-only, sin LLM). Ejecuta el pipeline
scaffold + build + register + verify, luego personaliza config.yaml y
scaffold + build + register + verify + convert + notify, luego personaliza
comandos custom segun los inputs del usuario.
allowed-tools: Bash Read Write Edit Grep Glob Agent
argument-hint: "<bot-id> [display-name]"
@@ -34,60 +34,27 @@ Si `$ARGUMENTS` contiene el bot-id, usarlo directamente: `$0` = bot-id, `$1` = d
2. Verificar que no existe `agents/<bot-id>/`
3. Si faltan inputs, preguntar al usuario
### Paso 2: Ejecutar pipeline de scaffold
### Paso 2: Ejecutar pipeline completo
```bash
./dev-scripts/agent/create-full.sh <bot-id> "<display-name>"
./dev-scripts/agent/create-full.sh <bot-id> "<display-name>" --type robot
```
Este script ejecuta 4 etapas: scaffold → build → register Matrix → verify E2EE.
Este script ejecuta 6 etapas automaticamente:
1. **Scaffold**: crea agent.go, config.yaml, prompts/ desde template
2. **Build**: verifica compilacion con `-tags goolm`
3. **Register**: registra usuario Matrix, genera token + password + pickle key
4. **Verify E2EE**: genera cross-signing keys + recovery key
5. **Convert**: convierte a robot (config minimo, sin prompts, sin LLM, `command_prefix: ""`)
6. **Notify**: envia DM a los developers (DEVELOPER_MATRIX_USERS) presentandose
Si alguna etapa falla, revisar el error y corregir antes de continuar.
### Paso 3: Convertir a robot
### Paso 3: Personalizar config
El scaffold crea un agente por defecto. Convertirlo a robot:
#### 3.1 Reemplazar `agents/<bot-id>/agent.go`
```go
package <pkgname> // sin guiones ni _bot: "ping-bot" → package ping
import (
"github.com/enmanuel/agents/agents"
"github.com/enmanuel/agents/pkg/decision"
)
func init() {
agents.Register("<bot-id>", Rules)
}
// Rules returns nil — robots don't use decision rules.
// All behavior is via RegisterCommand in the launcher.
func Rules() []decision.Rule {
return nil
}
```
Package name = bot-id sin guiones ni `_bot` (ej: `ping-bot``package ping`).
#### 3.2 Reemplazar `agents/<bot-id>/config.yaml`
Consultar [templates/config.yaml.md](templates/config.yaml.md) para el template base.
Ajustes obligatorios:
- `agent.id`: debe coincidir con el nombre del directorio
- `agent.type: robot` (CRITICO — sin esto se lanza como agent completo)
Editar `agents/<bot-id>/config.yaml`:
- `agent.description`: la descripcion del usuario
- `personality.prefix`: emoji representativo del bot
- Env vars: normalizar bot-id → mayusculas, guiones → underscores (NUNCA eliminar sufijos)
#### 3.3 Eliminar `agents/<bot-id>/prompts/system.md`
Los robots no necesitan system prompt. Eliminar el directorio prompts/ completo:
```bash
rm -rf agents/<bot-id>/prompts/
```
- `personality.prefix`: emoji representativo del bot (opcional)
### Paso 4: Crear comandos custom (si el usuario los pidio)
@@ -133,7 +100,7 @@ Luego registrar en `cmd/launcher/main.go` despues de `agents.NewRobot()`:
```go
if cfg.Agent.ID == "<bot-id>" {
for _, cmd := range <pkg>.Commands() {
r.RegisterCommand(cmd.Spec, cmd.Handler)
robot.RegisterCommand(cmd.Spec, cmd.Handler)
}
}
```
@@ -153,7 +120,7 @@ Verificar y reportar al usuario:
- [ ] `go build -tags goolm ./...` compila sin errores
- [ ] `agents/<id>/agent.go` exporta `Rules()` que retorna `nil`
- [ ] `agents/<id>/config.yaml` tiene `agent.type: robot` y `agent.id` coincide con directorio
- [ ] `cmd/launcher/main.go` tiene blank import del paquete del bot
- [ ] `cmd/launcher/main.go` tiene import del paquete del bot
- [ ] `.env` contiene las 4 env vars: `MATRIX_TOKEN_<NORM>`, `MATRIX_PASSWORD_<NORM>`, `PICKLE_KEY_<NORM>`, `SSSS_RECOVERY_KEY_<NORM>`
- [ ] No existe `agents/<id>/prompts/` (robots no necesitan system prompt)
- [ ] Si tiene comandos custom, estan registrados en el launcher
@@ -163,11 +130,11 @@ Informar al usuario:
Robot <bot-id> creado. Para arrancar:
./dev-scripts/server/start.sh
Comandos built-in: !help, !ping, !status, !info, !version
Comandos built-in: help, ping, status, info, version
Comandos custom: <lista si hay>
(Sin prefijo ! — el robot acepta comandos directamente)
Archivos a revisar:
agents/<bot-id>/agent.go — reglas (nil para robots)
agents/<bot-id>/config.yaml — configuracion
agents/<bot-id>/commands.go — comandos custom (si aplica)
```
@@ -183,6 +150,7 @@ Archivos a revisar:
| Reglas | Si (agent.go con Rules) | nil |
| Tools | Opcionales | No |
| Memoria/Knowledge | Opcionales | No |
| Prefijo comandos | `!` (obligatorio) | `""` (sin prefijo por defecto) |
| Comandos built-in | help, ping, tools, tool, status, info, clear, prompts, version | help, ping, status, info, version |
## Notas importantes
@@ -191,5 +159,5 @@ Archivos a revisar:
- **Nunca commitear tokens ni passwords** — van en `.env`
- **Homeserver**: `https://matrix-af2f3d.organic-machine.com`
- **Server name**: `matrix-af2f3d.organic-machine.com`
- Referencia de robot existente: `agents/_template_robot/`
- Referencia de robot existente: `agents/test-bot/`
- El bot-id DEBE coincidir entre directorio, config.yaml y `agents.Register()`