How to Configure Role Mapping Between Lead and Specialist in Reverse-Skill

Configure the role mapping between lead and specialist in Reverse-Skill by editing the markdown table in skills/ops/role-map.md to bind skill IDs to lead roles and comma-separated specialist roles, then validate with verify-routing-coherence.ps1 and apply via case-init.ps1.

The Reverse-Skill framework automates cybersecurity workflow assignments through a declarative role-mapping system. Located in the zhaoxuya520/reverse-skill repository, this configuration establishes clear ownership boundaries by linking lead coordinators to specialist executors for every defined skill.

Architecture of the Role-Map System

The framework centralizes role definitions in skills/ops/role-map.md. This file acts as the single source of truth that binds skill identifiers to human roles. When skills/scripts/case-init.ps1 executes, it reads this mapping to populate work/<case>/scope.md with the appropriate lead_role and specialist_roles fields, ensuring automated routing matches organizational structure.

Step-by-Step Role Configuration

Locate the Central Role-Map File

Navigate to skills/ops/role-map.md in your repository clone. This markdown file contains a table that maps skill IDs to their respective lead and specialist assignments according to the source code in the ops directory.

Define Lead and Specialist Assignments

Edit the table to establish your mapping. The lead role serves as the primary owner responsible for coordination (e.g., lead-network), while specialist roles provide a comma-separated list of supporting expertise (e.g., spec-recon,spec-exploit).

| Skill | Lead | Specialists |
|-------|------|-------------|
| cloud-k8s | lead-k8s | spec-cluster,spec-network |
| web-app | lead-web | spec-frontend,spec-backend,spec-db |

Save the file after adding or modifying rows.

Validate Configuration Coherence

Run the consistency checker to ensure every skill referenced in routing files has a valid entry:

skills/scripts/verify-routing-coherence.ps1

The script reads skills/ops/role-map.md and reports missing mappings with errors formatted as "Bad role-map missing...", preventing execution with incomplete configurations.

Apply Mapping to Case Initialization

Generate or update a case to inject the configured roles into the scope document:

skills/scripts/case-init.ps1 -Case <case-name>

This creates or updates work/<case>/scope.md, inserting the lead_role and specialist_roles values derived from your role-map configuration.

Automation and Governance Benefits

  • Clear responsibility: The lead coordinates overall execution while specialists focus on specific sub-tasks defined in the mapping.
  • Git-tracked changes: All role assignments reside in version-controlled markdown, providing complete audit history.
  • Prevention of manual errors: Automated population via case-init.ps1 eliminates copy-paste mistakes and ensures every case uses current role definitions.

Summary

  • Role mapping is controlled via the markdown table in skills/ops/role-map.md within the repository.
  • Each row maps a skill ID to one lead role and multiple comma-separated specialist roles.
  • Validate changes using skills/scripts/verify-routing-coherence.ps1 before deployment to catch missing entries.
  • Apply configurations by running skills/scripts/case-init.ps1 -Case <case-name> to populate work/<case>/scope.md with the correct assignments.

Frequently Asked Questions

What happens if a skill is missing from role-map.md?

The verify-routing-coherence.ps1 script emits a "Bad role-map missing..." error and exits with a non-zero status, blocking case creation until you add the required mapping to skills/ops/role-map.md.

Can a single lead manage multiple skills?

Yes. You can reference the same lead role identifier in multiple rows of the skills/ops/role-map.md table, allowing one lead to coordinate several distinct skills, each potentially with different specialist teams.

Where are the assigned roles stored after case initialization?

The skills/scripts/case-init.ps1 script writes the lead_role and specialist_roles fields into work/<case>/scope.md, making them available to downstream automation and human operators throughout the case lifecycle.

How do specialist roles handle task distribution?

The framework treats the comma-separated specialist roles in skills/ops/role-map.md as a pool of available expertise. While the role-map defines eligible personnel, specific task assignments and routing logic reside in the skill implementation files referenced by skills/routing.md.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →