Execution Environment Curation & Routing

Author: e-generosoCreated Sep 15, 2026Updated Sep 15, 2026
Labelsagents

Execution Environment Curation

Objective

Add an execution environment curation layer to oh-my-claude-code responsible for determining which environment each execution should be planned and/or performed in.

The curator should be able to select between environments such as:

  • Local — execution on the user's machine;
  • Cloud — execution on remote/cloud infrastructure;
  • Other — additional environments or execution strategies that may be appropriate for specific workloads.

The goal is not simply to add an environment configuration option, but to introduce a decision/orchestration layer capable of determining the most appropriate execution environment for each workload.


Problem

There is currently no explicit curation step that answers:

"Where should this execution run?"

The appropriate environment may depend on characteristics of the execution, such as:

  • computational requirements;
  • GPU requirements;
  • available local resources;
  • cost;
  • latency;
  • execution duration;
  • privacy and security requirements;
  • access to local files or resources;
  • required dependencies;
  • network requirements;
  • availability of the target environment;
  • resource utilization;
  • other workload-specific constraints.

However, the correct criteria, priorities, and trade-offs for making this decision are not defined by this issue.

We should not arbitrarily assume which factors matter most or create a decision matrix based on assumptions.


Core Requirement

Before defining the final architecture or implementing the decision criteria, the responsible agent must conduct a discovery interview with the user.

The interview should establish:

  1. What types of executions oh-my-claude-code needs to support;
  2. Which execution environments are currently available;
  3. Which environments may be added in the future;
  4. Which characteristics of an execution should influence environment selection;
  5. What the cost constraints are;
  6. What privacy and security constraints exist;
  7. What local resources are available;
  8. Which executions must remain local;
  9. When an execution may or should be delegated to the cloud;
  10. How to handle situations where no environment is suitable;
  11. Whether the decision should be deterministic, configurable, heuristic, score-based, or use another mechanism;
  12. Whether the user should be able to override the curator's decision;
  13. How the decision should be recorded and explained.

The discovery interview is part of this task and must not be treated as optional.


Expected Discovery Output

The interview should result in a clear specification covering at least the following.

1. Execution Environments

Define the supported environments and their capabilities.

For example:

LOCAL
CLOUD
OTHER

This list is illustrative only and should not be treated as a final architectural decision.

2. Decision Criteria

For each relevant criterion, document:

  • what is evaluated;
  • how it is measured;
  • how it affects the decision;
  • whether it is mandatory or preferential;
  • whether it is configurable by the user.

3. Selection Policy

Define how the criteria are combined to produce the final environment decision.

A conceptual flow could be:

Execution
    ↓
Analyze execution characteristics
    ↓
Apply curation policy
    ↓
Select recommended environment
    ↓
Validate environment availability/capacity
    ↓
Execute

The actual implementation of this policy must be determined after discovery.

4. Explainability

The curator should ideally be capable of explaining why it selected a particular environment.

For example:

Selected environment: CLOUD

Reasons:
- execution requires GPU;
- local capacity is insufficient;
- estimated execution time is long;
- estimated cloud cost is within the configured limit.

The exact format and level of detail should be determined during discovery.

5. User Override

Determine during the interview whether the user should be able to override the curator's decision.

For example:

Curator: CLOUD
User: Run LOCALLY anyway

If an override mechanism is required, its precedence and behavior must be defined.


Implementation Requirements

The implementation should:

  • introduce a clear abstraction for execution environment curation;
  • separate environment-selection logic from actual execution logic;
  • allow new execution environments to be added without rewriting the entire decision system;
  • make curation criteria and policies independently testable;
  • avoid scattering infrastructure-specific decision logic throughout the execution code;
  • make curation decisions observable;
  • allow the decision policy to evolve without requiring a major architectural rewrite.

The final architecture should be proposed after the discovery interview, rather than being assumed beforehand.


Explicitly Out of Scope / Do Not Assume

This task does not authorize assuming that:

  • cloud is always better for computationally intensive workloads;
  • local execution is always preferable because it is cheaper;
  • GPU requirements alone determine the environment;
  • privacy always has absolute priority;
  • cost always has absolute priority;
  • every execution should be eligible for cloud execution;
  • there is only one type of cloud environment;
  • there is only one local execution environment;
  • a simple if/else rule will be sufficient;
  • a weighted scoring matrix is necessarily the correct solution.

These are discovery questions, not predetermined requirements.


Acceptance Criteria

The task is considered complete when:

  • A discovery interview with the user has been conducted;
  • Supported execution environments have been defined;
  • Curation criteria have been identified and documented;
  • Priorities and trade-offs between criteria have been defined;
  • The environment selection policy has been specified;
  • Behavior when an environment is unavailable or unsuitable has been defined;
  • User override behavior has been defined, if applicable;
  • The architecture of the curation layer has been documented;
  • Curation logic is separated from execution logic;
  • Tests cover the main curation decisions;
  • Curation decisions are observable and, where appropriate, explainable;
  • Technical documentation has been updated.

Important Instruction for the Implementer / Coding Agent

Do not begin implementing the decision criteria based on assumptions.

The first step of this task must be a discovery interview with the user to determine the requirements that are currently unspecified.

If an architectural or behavioral decision depends on user preferences that have not yet been established, pause implementation and ask the user for clarification.

The purpose of this task is to establish a general execution-environment curation capability, not to prematurely impose a specific execution policy.

Source: Yeachan-Heo/oh-my-claudecode