Auto-import roles from agent_roles_list in skills registry #1

Open
opened 2026-05-20 17:41:01 +00:00 by casper-stevens · 0 comments
Member

Problem

The Hero skills registry (~/hero/code/hero_skills/skills/roles/agent_roles_list.md) defines 12 canonical agent roles with their skill assignments. These are never automatically seeded into the hero_team database — a user has to create each role manually through the admin UI.

The current skill_sync only operates on roles that already exist in the OSIS store. Nothing reads the role definitions from the registry and creates them.

Proposed solution

  1. Create skills/roles/roles.toml — machine-readable version of the role definitions (name, default_model, skills list per role), alongside the existing agent_roles_list.md.

  2. Add role_import() -> ImportResult to the OSchema — reads that TOML, upserts each role (create if missing, update skills if present), returns created/updated counts.

  3. Wire an "Import from registry" button into the admin Roles tab that calls role_import and refreshes the list.

Expected behaviour

After clicking Import from registry, the 12 canonical roles (mos_expert, hero_core_architect, hero_backend_engineer, etc.) appear in the Roles tab pre-populated with their skill whitelists, ready to sync and write config.

Roles to import

Role Skills
mos_expert mycelium_sdk
hero_core_architect hero_router, hero_context, hero_sockets, hero_macro_openrpc, hero_proxy_admin_api, herolib_openrpc_authorize
hero_backend_engineer hero_code_sdk, hero_db, hero_log, hero_libs, hero_tests_create, herolib_base, herolib_import, herolib_git, herolib_os, herolib_text
hero_backend_reviewer hero_tests_run, hero_tests_fix_errors, rhai_bindings_check
hero_ui_engineer hero_browser, hero_web, hero_website, web_embed
hero_security_engineer hero_claim_format, hero_context, herolib_openrpc_authorize, hero_proxy_admin_api
hero_devops_engineer lab, lab_lib, rust_hero_repo_create, rust_versions, rust_shutdownsignals, herolib_base
hero_git_forge_engineer forge_api, forge_issue_mgmt, hero_branching, code_sync, hs_forge
hero_scripting_engineer hs_herodo, hs_proc, rhai_bindings_reference, rhai_bindings_troubleshooting, rhai_bindings_check
hero_data_engineer oschema, oschema_code_generation, naming_convention, hero_db
hero_ai_engineer herolib_ai, herolib_ai_agent
hero_ops_integrator lab, hero_libs, code_sync
## Problem The Hero skills registry (`~/hero/code/hero_skills/skills/roles/agent_roles_list.md`) defines 12 canonical agent roles with their skill assignments. These are never automatically seeded into the `hero_team` database — a user has to create each role manually through the admin UI. The current `skill_sync` only operates on roles that already exist in the OSIS store. Nothing reads the role definitions *from* the registry and creates them. ## Proposed solution 1. **Create `skills/roles/roles.toml`** — machine-readable version of the role definitions (name, default_model, skills list per role), alongside the existing `agent_roles_list.md`. 2. **Add `role_import() -> ImportResult` to the OSchema** — reads that TOML, upserts each role (create if missing, update skills if present), returns created/updated counts. 3. **Wire an "Import from registry" button** into the admin Roles tab that calls `role_import` and refreshes the list. ## Expected behaviour After clicking **Import from registry**, the 12 canonical roles (`mos_expert`, `hero_core_architect`, `hero_backend_engineer`, etc.) appear in the Roles tab pre-populated with their skill whitelists, ready to sync and write config. ## Roles to import | Role | Skills | |------|--------| | `mos_expert` | `mycelium_sdk` | | `hero_core_architect` | `hero_router`, `hero_context`, `hero_sockets`, `hero_macro_openrpc`, `hero_proxy_admin_api`, `herolib_openrpc_authorize` | | `hero_backend_engineer` | `hero_code_sdk`, `hero_db`, `hero_log`, `hero_libs`, `hero_tests_create`, `herolib_base`, `herolib_import`, `herolib_git`, `herolib_os`, `herolib_text` | | `hero_backend_reviewer` | `hero_tests_run`, `hero_tests_fix_errors`, `rhai_bindings_check` | | `hero_ui_engineer` | `hero_browser`, `hero_web`, `hero_website`, `web_embed` | | `hero_security_engineer` | `hero_claim_format`, `hero_context`, `herolib_openrpc_authorize`, `hero_proxy_admin_api` | | `hero_devops_engineer` | `lab`, `lab_lib`, `rust_hero_repo_create`, `rust_versions`, `rust_shutdownsignals`, `herolib_base` | | `hero_git_forge_engineer` | `forge_api`, `forge_issue_mgmt`, `hero_branching`, `code_sync`, `hs_forge` | | `hero_scripting_engineer` | `hs_herodo`, `hs_proc`, `rhai_bindings_reference`, `rhai_bindings_troubleshooting`, `rhai_bindings_check` | | `hero_data_engineer` | `oschema`, `oschema_code_generation`, `naming_convention`, `hero_db` | | `hero_ai_engineer` | `herolib_ai`, `herolib_ai_agent` | | `hero_ops_integrator` | `lab`, `hero_libs`, `code_sync` |
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_team#1
No description provided.