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.
Goal
Make
packages/runtime-playground/src/commands.tsstop being the central dumping ground for Playground command behavior.Current Problem
commands.tsis 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
commands.tsas a small dispatcher/registration layer.Candidate Slices
Acceptance Criteria
commands.tsis materially smaller and reads as orchestration, not implementation.AI assistance