Vapora/config/agents.ncl
Jesús Pérez c5f4caa2ab
feat(agents): stable identity + hot-reload for zero learning loss on config change
Introduce stable_id = role on AgentMetadata so learning profiles and KG
  execution records survive process restarts and hot-reloads. Previously
  every Uuid::new_v4() rotation orphaned accumulated expertise.

  - registry: add stable_id field (serde default, backward-compatible),
    stable_id_or_role() fallback helper, drain_role(), list_roles()
  - coordinator: profile lookup and KG writes use stable_id_or_role()
    instead of the ephemeral UUID; drain_role() drops Sender to close
    mpsc channels after in-flight messages drain; registry_arc() accessor
  - executor: agent_id written to KG now uses stable_id_or_role()
  - server: reload_agents() drain-and-respawn function; SIGHUP handler
    via while sighup.recv().await.is_some(); POST /reload endpoint;
    AppState extended with config_path, router, cap_registry
  - fix: SIGHUP recv() spin-loop guard (is_some())
  - fix: io_other_error clippy lint in vapora-agents, vapora-llm-router,
    vapora-workflow-engine (std::io::Error::other instead of Error::new)
  - docs: ADR-0040, CHANGELOG entry, README hot-reload section
2026-03-02 22:54:28 +00:00

120 lines
3.7 KiB
Text

let C = import "../nickel/agents/contracts.ncl" in
{
registry | C.RegistryConfig = {
max_agents_per_role = 5,
health_check_interval = 30,
agent_timeout = 300,
},
agents | Array C.AgentDefinition = [
{
role = "architect",
description = "System design, architecture decisions, ADRs",
llm_provider = "claude",
llm_model = "claude-opus-4-20250514",
parallelizable = false,
priority = 100,
capabilities = ["system_design", "architecture", "adr", "patterns"],
},
{
role = "developer",
description = "Code implementation, feature development",
llm_provider = "claude",
llm_model = "claude-sonnet-4-5-20250929",
parallelizable = true,
priority = 80,
capabilities = ["coding", "implementation", "debugging"],
},
{
role = "code_reviewer",
description = "Code quality assurance, style checking",
llm_provider = "claude",
llm_model = "claude-sonnet-4-5-20250929",
parallelizable = true,
priority = 70,
capabilities = ["code_review", "quality", "best_practices"],
},
{
role = "tester",
description = "Tests, benchmarks, quality validation",
llm_provider = "claude",
llm_model = "claude-sonnet-4-5-20250929",
parallelizable = true,
priority = 75,
capabilities = ["testing", "benchmarks", "validation"],
},
{
role = "documenter",
description = "Documentation, root files (README, CHANGELOG)",
llm_provider = "openai",
llm_model = "gpt-4o",
parallelizable = true,
priority = 60,
capabilities = ["documentation", "readme", "changelog", "guides"],
},
{
role = "marketer",
description = "Marketing content, announcements",
llm_provider = "claude",
llm_model = "claude-sonnet-4-5-20250929",
parallelizable = true,
priority = 40,
capabilities = ["marketing", "content", "announcements"],
},
{
role = "presenter",
description = "Presentations, slides, demos",
llm_provider = "claude",
llm_model = "claude-sonnet-4-5-20250929",
parallelizable = false,
priority = 50,
capabilities = ["presentations", "slides", "demos"],
},
{
role = "devops",
description = "CI/CD, deployment, infrastructure",
llm_provider = "claude",
llm_model = "claude-sonnet-4-5-20250929",
parallelizable = true,
priority = 85,
capabilities = ["cicd", "deployment", "kubernetes", "infrastructure"],
},
{
role = "monitor",
description = "System health, alerting, observability",
llm_provider = "gemini",
llm_model = "gemini-2.0-flash",
parallelizable = false,
priority = 90,
capabilities = ["monitoring", "health", "alerts", "metrics"],
},
{
role = "security",
description = "Security audit, vulnerability detection",
llm_provider = "claude",
llm_model = "claude-opus-4-20250514",
parallelizable = true,
priority = 95,
capabilities = ["security", "audit", "vulnerabilities"],
},
{
role = "project_manager",
description = "Roadmap, task tracking, coordination",
llm_provider = "claude",
llm_model = "claude-sonnet-4-5-20250929",
parallelizable = false,
priority = 65,
capabilities = ["planning", "tracking", "coordination"],
},
{
role = "decision_maker",
description = "Conflict resolution, strategic decisions",
llm_provider = "claude",
llm_model = "claude-opus-4-20250514",
parallelizable = false,
priority = 100,
capabilities = ["decisions", "conflict_resolution", "strategy"],
},
],
}