orchestrator-refactor

Refactor a legacy MasterOrchestrator into modular services using dependency injection and factory-based instantiation.

2|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/stackconsult/RE-Engine --skill orchestrator-refactor
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: orchestrator-refactor
Source: https://github.com/stackconsult/RE-Engine/tree/main/.agent/skills/orchestrator-refactor
Command: npx skills add https://github.com/stackconsult/RE-Engine --skill orchestrator-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Break down a tightly coupled MasterOrchestrator into a modular, testable system by introducing dependency injection and strategy-based design.

Core Features & Use Cases

  • Interface-first design: defines clear contracts for all collaborators.
  • Factory-based instantiation: centralizes creation to enable easy swapping of implementations.
  • Incremental migration: allow service-by-service refactors with minimal risk.
  • Enhanced testability: decoupled components simplify unit and integration tests.
  • Use Case: migrate a monolithic orchestrator to support multiple deployment targets without changing business logic.

Quick Start

Create interfaces for all dependencies and wire them through a MasterOrchestrator factory.

Frequently Asked Questions about orchestrator-refactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor a monolithic orchestrator with dependency injection in TypeScript?▼

Refactor a monolithic orchestrator with dependency injection by defining clear interfaces for collaborators and wiring them through a central factory. This achieves loose coupling and testability without altering business logic.

What's the best way to decouple tightly coupled TypeScript services for better testing?▼

Decouple tightly coupled TypeScript services by applying strategy-based design and interface-first contracts. Decoupled components simplify unit and integration tests by allowing easy swapping of implementations.

Can I migrate legacy orchestrator services incrementally without breaking existing logic?▼

You can migrate legacy orchestrator services incrementally by refactoring service-by-service with minimal risk. This approach allows progressive modularization while maintaining clear dependency contracts.

When do I need strategy pattern and factory-based instantiation for orchestrator architecture?▼

You need strategy pattern and factory-based instantiation when migrating a monolithic orchestrator to support multiple deployment targets. Factory instantiation centralizes creation, enabling easy implementation swapping.

Does interface-first design work for orchestrators targeting multiple deployment targets?▼

Interface-first design works for orchestrators targeting multiple deployment targets by establishing clear contracts for all collaborators. This enables deployment flexibility without changing core business logic.