Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:AMAP ML SkillClaw Service Orchestration

From Leeroopedia
Knowledge Sources
Domains Service_Orchestration, Lifecycle_Management
Last Updated 2026-10-22 00:00 GMT

Overview

A service orchestration pattern that coordinates the lifecycle of multiple cooperating components — proxy server, skill manager, quality scorer, background worker, and CLI agent configuration — through a single launcher entry point.

Description

Service orchestration addresses the problem of initializing, starting, and stopping multiple interdependent components in the correct order. The SkillClaw pattern uses a `SkillClawLauncher` that: reads config, creates the `SkillManager` (if skills enabled), creates the `PRMScorer` (if PRM configured), optionally auto-pulls shared skills, starts the FastAPI proxy server, auto-configures the target CLI agent, and optionally starts a background `ValidationWorker`. Components are initialized in dependency order and stopped in reverse order. A PID file and signal handlers manage the process lifecycle.

Usage

Use this principle when designing systems that need:

  • Ordered initialization of interdependent components
  • Graceful shutdown of multiple services
  • Optional components that activate based on configuration
  • Background task management alongside a primary server

Theoretical Basis

The orchestrator pattern centralizes lifecycle management, ensuring:

  1. Dependency ordering: Config → SkillManager → PRMScorer → Server → Agent config → ValidationWorker
  2. Graceful degradation: Missing optional components (PRM, skills, validation) don't prevent startup
  3. Clean shutdown: Reverse-order stop with signal handlers
# Abstract algorithm (NOT real implementation)
async def orchestrate(config):
    components = []
    if config.use_skills:
        components.append(SkillManager(config))
    if config.use_prm:
        components.append(PRMScorer(config))
    server = APIServer(config, components)
    server.start()
    components.append(server)
    configure_agent(config)
    if config.validation_enabled:
        worker = ValidationWorker(config)
        components.append(worker)
    await wait_for_stop_signal()
    for component in reversed(components):
        component.stop()

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment