Skip to content

Decouple state machine and context from LLM modules #514

Description

@20001LastOrder

The core of the modernization. Split Sherpa into (a) a state machine + context management core that owns workflow, transitions, guardrails and what-to-keep/what-to-throw, and (b) the LLM modules that currently do generation, tool calling and parsing. Once separated, the LLM half can be supplied by a host agent — Claude Code, Codex, or another — and Sherpa becomes the explicit-workflow layer they plug into.

Everything else in this project is downstream of this split.

  • Draw the seam: what the state machine and context layer actually need from an LLM, expressed as a narrow host interface (propose a step, judge a condition, produce structured output)
  • Identify every place the core reaches into model wrappers / policies / providers today
  • Extract the core so an external caller can step it one transition at a time
  • Keep the current in-process LLM modules as the reference host implementation — no behaviour change for existing users
  • Standalone mode has to keep working, or the decoupling costs Sherpa its current users

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions