feat: sistema de personalidades enriquecido + agente template

Fase 1: Sistema de personalidades enriquecido
- Ampliar PersonalityCfg con role, backstory, expertise, limitations
- Añadir CommunicationCfg (formality, humor, personality, response_style, quirks, catchphrases)
- Crear tipos puros en pkg/personality/traits.go
- Implementar BuildPersonalityPrompt() para generar bloque de system prompt
- Integrar personalidad en agents/runtime.go (FromConfig + concatenacion al system prompt)

Fase 2: Agente plantilla
- Añadir campo Template bool a AgentMeta
- Filtrar agentes template en launcher (skip si template: true)
- Crear agents/_template/ con config.yaml completo y documentado
- Incluir TODAS las secciones (skills, shared_knowledge, schedules, security)
- agent.go minimo + prompts/system.md plantilla
- Actualizar dev-scripts/agent/new-agent.sh para copiar desde _template/

Fase 3: Ejemplos de personalidades
- Crear agents/_template/PERSONALITIES.md con 4 perfiles:
  * DevOps pragmatico
  * Analista meticuloso
  * Asistente amigable
  * Guardian de seguridad

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-03-08 22:28:40 +00:00
parent 25c7ca7d85
commit e743a3e982
11 changed files with 985 additions and 55 deletions
+26
View File
@@ -28,6 +28,7 @@ type AgentMeta struct {
Name string `yaml:"name"`
Version string `yaml:"version"`
Enabled bool `yaml:"enabled"`
Template bool `yaml:"template"` // if true, launcher will skip this agent
Description string `yaml:"description"`
Tags []string `yaml:"tags"`
}
@@ -35,6 +36,7 @@ type AgentMeta struct {
// ── Personality ───────────────────────────────────────────────────────────
type PersonalityCfg struct {
// --- campos existentes (sin cambios) ---
Tone string `yaml:"tone"`
Verbosity string `yaml:"verbosity"`
Language string `yaml:"language"`
@@ -44,6 +46,19 @@ type PersonalityCfg struct {
ErrorStyle string `yaml:"error_style"`
Templates TemplatesCfg `yaml:"templates"`
Behavior BehaviorCfg `yaml:"behavior"`
// --- NUEVOS campos ---
// Identidad narrativa
Role string `yaml:"role"` // rol principal: "asistente general", "devops engineer", "analista de datos"
Backstory string `yaml:"backstory"` // breve historia/contexto del personaje (1-3 frases)
Expertise []string `yaml:"expertise"` // areas de experiencia: ["linux", "docker", "monitoring"]
Limitations []string `yaml:"limitations"` // que NO sabe o no debe intentar
// Estilo de comunicacion
Communication CommunicationCfg `yaml:"communication"`
// Directivas de comportamiento en texto libre
CustomDirectives []string `yaml:"custom_directives"` // instrucciones adicionales para el system prompt
}
type TemplatesCfg struct {
@@ -64,6 +79,17 @@ type BehaviorCfg struct {
AcknowledgeReceipt bool `yaml:"acknowledge_receipt"`
}
// CommunicationCfg define como se expresa el agente mas alla del tone basico.
type CommunicationCfg struct {
Formality string `yaml:"formality"` // formal | semiformal | casual | coloquial
Humor string `yaml:"humor"` // none | subtle | moderate | frequent
Personality string `yaml:"personality"` // analytical | creative | pragmatic | empathetic | assertive
ResponseStyle string `yaml:"response_style"` // structured | conversational | bullet_points | narrative
Quirks []string `yaml:"quirks"` // rasgos unicos: ["usa analogias de cocina", "cita a Linus Torvalds"]
AvoidTopics []string `yaml:"avoid_topics"` // temas que evita o redirige
Catchphrases []string `yaml:"catchphrases"` // frases tipicas que usa ocasionalmente
}
// ── LLM ───────────────────────────────────────────────────────────────────
type LLMCfg struct {