Skip to content

fix(kernel,dashboard): auto_evolve created skills must go through approval and auto-assign to creator agent #5844

Description

@DaBlitzStein

Problem

When an agent with auto_evolve = true creates or updates a skill via background_skill_review:

  1. No approval gate for creates: the skill is installed directly without appearing in the Pending queue for human review (unless auto_evolve_mode = "controlled" is configured, which is not the default on existing agents)
  2. No approval gate for updates/patches: when the reviewer proposes an update or version bump to an existing skill, it applies directly — no diff review, no approve/reject
  3. Not added to creator's allowlist: agents with skills_mode = "allowlist" create skills they can never use — the new skill is globally installed but not in the agent's capabilities.skills list
  4. Not visible in agent's Skills tab: the agent detail Skills tab only shows assigned skills, with no section for "available but not assigned" skills

Expected behavior

  1. Auto_evolve creates → skill appears in Pending tab for approval
  2. Auto_evolve updates/patches → skill version change appears in Pending with a diff view (old vs new) for approval
  3. On approval, the skill is automatically added to the creating agent's allowlist (for new creates)
  4. The agent's Skills tab shows a section "Available" with skills that exist globally but aren't assigned to this agent, with a + button to assign

Current behavior

  • Creates silently install globally
  • Updates/patches silently apply in-place
  • Agent's allowlist unchanged after create
  • Agent cannot use its own creation
  • No approval, no visibility, no diff review for version changes

Suggested fix

Kernel

  • approve_candidate in skill_workshop/storage.rs: after promoting to active, call registry.add_skill_to_agent(agent_id, skill_name) to update the creator agent's allowlist
  • Store agent_id in the candidate provenance (already done)
  • For updates/patches in controlled mode: create a candidate with the diff (old_content vs new_content) so the reviewer can see what changed before approving

Dashboard

  • Pending tab: show diff view for update/patch candidates (old version vs proposed version)
  • Agent Skills tab: add "Available" section below "Installed" showing unassigned global skills with assign/unassign buttons

Refs #5819, #5798

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiREST/WS endpoints and dashboardarea/kernelCore kernel (scheduling, RBAC, workflows)area/securitySecurity systems and auditingarea/skillsSkill system and FangHub marketplaceauto-close-candidateBot thinks this is resolved; awaiting confirmationbugSomething isn't workinghas-prA pull request has been linked to this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions