Action Plans

ActionPlan is the execution contract between model output and runtime behavior.

Core shape

{
  "summary": "one sentence",
  "actions": [
    {"kind": "read", "path": "..."},
    {"kind": "list", "path": "src", "glob": "**/*.py", "limit": 100},
    {"kind": "search", "query": "RunStepService", "path": "src", "glob": "**/*.py", "limit": 20},
    {"kind": "write", "path": "...", "content": "..."},
    {"kind": "run", "command": "pytest -q"},
    {"kind": "emit", "event_type": "progress", "message": "...", "blocking": false, "payload": {}}
  ]
}

Supported action kinds

  • read
  • write
  • list
  • search
  • run
  • emit

Validation behavior

  • Invalid JSON or schema mismatch -> parse failure.
  • Unsupported action shape -> parse failure.
  • Valid plan but policy violation -> execution failure event.

Why this contract matters

  • deterministic parser behavior,
  • auditable runtime decisions,
  • clear boundary between model and executor.

Tooling commands

hexi plan-check --file examples/action_plans/mixed_step.json
hexi apply --plan examples/action_plans/mixed_step.json --task "ActionPlan debug run"