Coordinator Agent
The persistent agent for cross-project orchestration — aggregating status, cascading deploys, and routing commands across multiple projects.
Coordinator Agent
The Coordinator Agent is the cross-project orchestrator. While Project Agents manage individual repositories, the Coordinator works across all projects — aggregating status, orchestrating cascading deploys, and routing commands to the right project based on aliases or context.
Characteristics
| Property | Value |
|---|---|
| Lifecycle | Persistent — runs for the lifetime of the system |
| Cardinality | One per CodeSpar instance |
| Color | Slate (#6B7280) |
When to Use the Coordinator
The Coordinator is useful when you manage multiple interconnected projects and need to:
- Get a unified view of all projects' health
- Deploy multiple services in a specific order
- Route a command to a project by alias without switching channels
- Orchestrate operations that span multiple repositories
Project Registry
The Coordinator maintains a registry of all projects and their aliases:
Registering Projects
Projects are automatically registered when a Project Agent starts up. You can also set aliases for quick reference:
Now you can reference projects by alias in any command:
Cross-Project Status
The Coordinator's most common use case is aggregating status across all projects:
This queries every Project Agent and returns a unified dashboard:
Implementation
Cascading Deploys
The Coordinator's most powerful feature is cascading deploys — deploying multiple services in a specified order, waiting for each to succeed before proceeding to the next:
Cascading Deploy Flow
Implementation
Example: Cascading Deploy
Example: Cascade Failure
Command Routing
The Coordinator routes commands that target a specific project by alias:
Project Resolution
The resolveProject method finds a project by its ID, name, or any registered alias:
Common Commands
| Command | Example | Action |
|---|---|---|
all status | @codespar all status | Aggregate status from all projects |
deploy ... then ... | @codespar deploy gw then front | Cascading deploy in order |
alias | @codespar alias fe → myorg/frontend | Register a project alias |
<alias> <command> | @codespar gw status | Route command to specific project |
list projects | @codespar list projects | Show all registered projects and aliases |
Relationship with Project Agents
The Coordinator does not replace Project Agents — it orchestrates them. Each project still has its own persistent Project Agent that handles all project-specific logic. The Coordinator simply provides a cross-cutting view and coordination layer:
If you only manage a single project, you won't interact with the Coordinator directly — the Project Agent handles everything. The Coordinator becomes valuable when your system grows to multiple interconnected services.