Reference
Adapters Reference

Adapters Reference

Complete reference for HMS adapter configurations.

Overview

Adapters translate HMS manifests into IDE-specific instructions. Each adapter has its own execution model and configuration options.

Available Adapters

AdapterIDEDefault ModeBest For
claudeClaude Codesub_agentComplex, multi-phase workflows
cursorCursordirectInteractive editing
codexOpenAI CodexdirectAutomated pipelines

Claude Adapter

Execution Model

Claude uses sub-agent spawning for workflow execution. The main orchestrator agent can spawn specialized sub-agents for each step.

Orchestrator
├── Sub-agent: Analyzer
├── Sub-agent: Implementer
└── Sub-agent: Tester

Modes

sub_agent (Default)

Spawns dedicated sub-agents per step.

{
  "adapters": {
    "claude": {
      "mode": "sub_agent",
      "config": {
        "spawn_agents_per_step": true,
        "max_parallel_agents": 3
      }
    }
  }
}

Benefits:

  • Specialized agents per task
  • Parallel execution support
  • Isolated context per step

sequential

Executes all steps in main agent, one at a time.

{
  "adapters": {
    "claude": {
      "mode": "sequential"
    }
  }
}

Benefits:

  • Simpler execution
  • Full context preserved
  • No sub-agent overhead

parallel

Allows independent steps to run concurrently.

{
  "adapters": {
    "claude": {
      "mode": "parallel",
      "config": {
        "max_parallel_agents": 5
      }
    }
  }
}

Configuration Options

OptionTypeDefaultDescription
spawn_agents_per_stepbooleantrueSpawn sub-agent for each step
max_parallel_agentsnumber3Max concurrent sub-agents
context_windowstring"standard"Context size: "standard" or "extended"

Generated Prompt Structure

You are the orchestrator for "{workflow_name}".
Intent: {intent}

## Context
{context}

## Workflow Steps

Step 1: {step_name}
Spawn sub-agent "{agent}" to:
- {action description}
- Report findings

Step 2: {step_name}
After Step 1 completes:
- {action description}

## Instructions
Execute steps in order, spawning sub-agents as specified.
Report progress after each step.

Cursor Adapter

Execution Model

Cursor uses the Composer pattern for multi-file editing with inline diffs.

Modes

direct (Default)

Executes in main Cursor context.

{
  "adapters": {
    "cursor": {
      "mode": "direct",
      "config": {
        "use_composer": true,
        "auto_apply": false,
        "show_diff": true
      }
    }
  }
}

parallel

Allows independent steps to run concurrently.

{
  "adapters": {
    "cursor": {
      "mode": "parallel"
    }
  }
}

Configuration Options

OptionTypeDefaultDescription
use_composerbooleantrueUse Cursor Composer
auto_applybooleanfalseAuto-apply changes
show_diffbooleantrueShow diff before applying

Generated Prompt Structure

# {workflow_name}

{intent}

## Files
@{file1}
@{file2}

## Steps

1. **{step_name}**
   {action description}

2. **{step_name}**
   After step 1:
   {action description}

## Instructions
- Show diff for each change
- Wait for approval before applying

Codex Adapter

Execution Model

Codex uses function calling for workflow execution. Each step translates to a callable function.

Modes

direct (Default)

Sequential function execution.

{
  "adapters": {
    "codex": {
      "mode": "direct",
      "config": {
        "temperature": 0.2,
        "max_tokens": 2000
      }
    }
  }
}

Configuration Options

OptionTypeDefaultDescription
temperaturenumber0.2Model creativity (0-1)
max_tokensnumber2000Max tokens per response

Generated Function Schema

{
  "functions": [
    {
      "name": "analyze_code",
      "description": "Analyze code for {focus}",
      "parameters": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {"type": "string"}
          }
        }
      }
    },
    {
      "name": "edit_file",
      "description": "Edit file to {focus}",
      "parameters": {
        "type": "object",
        "properties": {
          "path": {"type": "string"},
          "changes": {"type": "string"}
        }
      }
    }
  ]
}

Mode Comparison

ModeSub-agentsParallelUse Case
sub_agentComplex, specialized tasks
directSimple, sequential tasks
sequentialStrict ordering required
parallelIndependent tasks

Cross-Adapter Configuration

Configure multiple adapters in one manifest:

{
  "adapters": {
    "claude": {
      "mode": "sub_agent",
      "config": {
        "spawn_agents_per_step": true,
        "max_parallel_agents": 3
      }
    },
    "cursor": {
      "mode": "direct",
      "config": {
        "use_composer": true,
        "show_diff": true
      }
    },
    "codex": {
      "mode": "direct",
      "config": {
        "temperature": 0.1
      }
    }
  }
}

Adapter Selection Guide

What's your primary use case?

├── Complex workflows with specialized steps
│   └── Claude with sub_agent mode

├── Interactive editing with review
│   └── Cursor with direct mode

├── Automated CI/CD pipelines
│   └── Codex with direct mode

├── Parallel independent tasks
│   └── Any adapter with parallel mode

└── Simple sequential steps
    └── Any adapter with sequential mode

Best Practices

Claude

  • Use sub_agent mode for workflows with 3+ steps
  • Set max_parallel_agents based on step dependencies
  • Use context_window: "extended" for large codebases

Cursor

  • Keep show_diff: true for safety
  • Use auto_apply: false until workflow is tested
  • Leverage @codebase for context

Codex

  • Use low temperature (0.1-0.3) for code tasks
  • Increase max_tokens for complex generations
  • Validate function outputs

Related