Skip to content

feat(workflow): choose agent and model separately, ACP as the default runtime #64

Description

@FreshlyBrewedCode

Parent

#62

What to build

The authoring and config surface of ADR 0013 §2–§4. The ACP adapter (#63) becomes the default
runtime.

  • agent?: "claude" | "opencode" next to model at every level: AgentCallOptions, the
    workflow agent defaults, schedule agent, and the run-request override.
  • config.agent:
    • default (agent);
    • models: { claude?: string, opencode?: string };
    • hostSettings: { claude?: "ignore" | "include", opencode?: … }, with "ignore" as the
      default.
    • Keep config.agent.adapter as the injection point for replay and fakes.
  • Resolution rule (ADR 0013 §2):
    • Agent: the most specific level that names one, else config.agent.default.
    • Model: the most specific level that names one, among the level that chose the agent and the
      levels more specific than it. Otherwise config.agent.models[agent].
    • Factory always sends a model. An unresolvable model fails the run at start with a clear
      message.
    • Unit-test the rule as a table.
  • Remove DEFAULT_MODEL. Closes Add a config-level default agent model #40.
  • Remove permissionMode from AgentCallOptions. Closes permissionMode is declared on the authoring surface and read by nobody #39.
  • AgentStepStarted.agent, optional for old logs. Show the agent next to the model in run
    detail.
  • factory init writes agent.default and agent.models (claude: "sonnet",
    opencode: "opencode/big-pickle").
  • This repo's .factory/factory.config.ts gets the same.
  • Daemon start runs feat(runtime): production ACP adapter for opencode and Claude Code #63's availability check for the configured agents and logs anything
    missing.

Acceptance

  • bun run check green.
  • A live factory start hello (or the spike workflow through the CLI path) on each agent picks
    the configured model.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskA single self-contained piece of work that ships as one PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions