Reference
HMS Schema (Generated)

HMS Schema Reference

Auto-Generated Documentation

This page is automatically generated from the HMS JSON Schema to ensure it always matches the current specification. For a human-friendly guide with examples, see HMS Overview.

Schema URL

https://hydra.opiusai.com/schemas/workflow/v1.0.json

Root Properties

PropertyTypeRequiredDescription
$schemastringNoJSON Schema URL for validation
manifest_version1.0YesHMS specification version
namestringYesHuman-readable workflow name
intentstringYesNatural language description of what the workflow accomplishes
contextobjectNoProject-specific context variables
stepsWorkflowStep[]YesOrdered list of workflow steps
outputsobjectNoExpected workflow outputs
adaptersobjectNoIDE-specific adapter configurations

Step Definition

PropertyTypeRequiredDescription
idstringYesUnique step identifier
namestringYesHuman-readable step name
actioncode_agent | research_agent | planning_agent | review_agent | test_agent | docs_agent | custom_agent | github_integration | slack_integration | notion_integration | jira_integration | linear_integration | database_integration | api_integration | webhook_integration | file_read | file_write | shell_execute | search_codebase | condition | loop | parallel | human_input | analyze_code | edit_file | edit_files | generate_code | generate_tests | execute_command | search_references | design_architecture | review_and_commitYesAction type for this step
agentstringNoOptional specialized agent name
depends_onstring[]NoStep IDs that must complete before this step
parametersobjectNoAction-specific parameters
conditionstringNoOptional condition expression
retryobjectNo-

Adapter Configurations

Claude Adapter

PropertyTypeRequiredDescription
modesub_agent | directNo-
configobjectNo-

Cursor Adapter

PropertyTypeRequiredDescription
modecomposer | direct | parallelNo-
configobjectNo-

Codex Adapter

PropertyTypeRequiredDescription
modefunction_calling | directNo-
configobjectNo-

Full JSON Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://hydra.opiusai.com/schemas/workflow/v1.0.json",
  "title": "Hydra Manifest Specification v1.0",
  "description": "Schema for Hydra workflow manifests",
  "type": "object",
  "required": [
    "manifest_version",
    "name",
    "intent",
    "steps"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "description": "JSON Schema URL for validation"
    },
    "manifest_version": {
      "type": "string",
      "enum": [
        "1.0"
      ],
      "description": "HMS specification version"
    },
    "name": {
      "type": "string",
      "description": "Human-readable workflow name"
    },
    "intent": {
      "type": "string",
      "description": "Natural language description of what the workflow accomplishes"
    },
    "context": {
      "type": "object",
      "description": "Project-specific context variables",
      "properties": {
        "repo": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "framework": {
          "type": "string"
        },
        "test_framework": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "steps": {
      "type": "array",
      "description": "Ordered list of workflow steps",
      "items": {
        "$ref": "#/definitions/WorkflowStep"
      },
      "minItems": 1
    },
    "outputs": {
      "type": "object",
      "description": "Expected workflow outputs",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "code",
            "analysis",
            "documentation",
            "mixed"
          ]
        },
        "expected_files": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "schema": {
          "type": "object",
          "description": "JSON Schema for analysis outputs"
        }
      }
    },
    "adapters": {
      "type": "object",
      "description": "IDE-specific adapter configurations",
      "properties": {
        "claude": {
          "$ref": "#/definitions/ClaudeAdapter"
        },
        "cursor": {
          "$ref": "#/definitions/CursorAdapter"
        },
        "codex": {
          "$ref": "#/definitions/CodexAdapter"
        }
      }
    }
  },
  "definitions": {
    "WorkflowStep": {
      "type": "object",
      "required": [
        "id",
        "name",
        "action"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_]*$",
          "description": "Unique step identifier"
        },
        "name": {
          "type": "string",
          "description": "Human-readable step name"
        },
        "action": {
          "type": "string",
          "enum": [
            "code_agent",
            "research_agent",
            "planning_agent",
            "review_agent",
            "test_agent",
            "docs_agent",
            "custom_agent",
            "github_integration",
            "slack_integration",
            "notion_integration",
            "jira_integration",
            "linear_integration",
            "database_integration",
            "api_integration",
            "webhook_integration",
            "file_read",
            "file_write",
            "shell_execute",
            "search_codebase",
            "condition",
            "loop",
            "parallel",
            "human_input",
            "analyze_code",
            "edit_file",
            "edit_files",
            "generate_code",
            "generate_tests",
            "execute_command",
            "search_references",
            "design_architecture",
            "review_and_commit"
          ],
          "description": "Action type for this step"
        },
        "agent": {
          "type": "string",
          "description": "Optional specialized agent name"
        },
        "depends_on": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Step IDs that must complete before this step"
        },
        "parameters": {
          "type": "object",
          "description": "Action-specific parameters",
          "additionalProperties": true
        },
        "condition": {
          "type": "string",
          "description": "Optional condition expression"
        },
        "retry": {
          "type": "object",
          "properties": {
            "max_attempts": {
              "type": "number"
            },
            "backoff": {
              "type": "string"
            }
          }
        }
      }
    },
    "ClaudeAdapter": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "sub_agent",
            "direct"
          ]
        },
        "config": {
          "type": "object",
          "properties": {
            "spawn_agents_per_step": {
              "type": "boolean"
            },
            "max_parallel_agents": {
              "type": "number"
            },
            "tools_per_step": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "CursorAdapter": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "composer",
            "direct",
            "parallel"
          ]
        },
        "config": {
          "type": "object",
          "properties": {
            "use_composer": {
              "type": "boolean"
            },
            "show_diff": {
              "type": "boolean"
            },
            "auto_apply": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "CodexAdapter": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "function_calling",
            "direct"
          ]
        },
        "config": {
          "type": "object",
          "properties": {
            "functions_per_step": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}