Skip to content

Split runtime-playground command handlers by responsibility #376

@chubes4

Description

@chubes4

Goal

Make packages/runtime-playground/src/commands.ts stop being the central dumping ground for Playground command behavior.

Current Problem

commands.ts is still one of the largest source files and mixes multiple responsibilities: WordPress command execution, browser command handling, artifact capture, diagnostics, checks, and command response shaping.

Target Shape

  • Keep commands.ts as a small dispatcher/registration layer.
  • Move coherent command families into focused modules.
  • Preserve all existing command names, inputs, outputs, artifacts, and error behavior.

Candidate Slices

  • WordPress/runtime commands.
  • Browser/probe commands.
  • Artifact/check/diagnostic commands.
  • Response/error shaping helpers if they remain mixed into handlers.

Acceptance Criteria

  • commands.ts is materially smaller and reads as orchestration, not implementation.
  • Each extracted module has one obvious responsibility.
  • Existing command registry/discovery/package smokes pass.
  • Playground-backed smokes are rerun serially when local port collisions occur.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: Drafting this tracker from the current architecture cleanup state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions