Control Plane — Overview¶
The Factory Control Plane is the governance and orchestration brain of the ConnectSoft AI Software Factory — the platform that operates the factory itself. Where the Agent Mesh executes work and the Knowledge Platform supplies grounded context, the Control Plane decides what should happen, who is allowed to make it happen, in what order, and whether the result is acceptable. It is the authoritative system of record for every tenant, project, blueprint, workflow instance, agent task, policy decision, audit entry, and cost record in the factory.
Target Architecture — Final-State Design
This page describes the final-state target architecture of the Control Plane as a set of cooperating, independently deployable microservices under the ConnectSoft.Factory.ControlPlane.* namespace. It is an AI-native software factory platform, not a chatbot or assistant. Workflow orchestration is grounded in the existing factory coordinators (Project Bootstrap, Sprint Execution, Milestone Lifecycle, Microservice Assembly, Release) and the orchestration domain already implemented in ConnectSoft.AI.SoftwareFactory.Platform.
Purpose¶
The Control Plane exists to make the factory governable and repeatable at multi-tenant scale. Every customer SaaS the factory produces is the output of a long-running, multi-step, multi-agent process that spans intent capture, blueprint design, code generation, validation, integration, and release. That process must be:
- Traceable — every action correlates back to a single
traceIdfrom business intent to running SaaS (see the Event Envelope and Metadata Schema). - Reusable — blueprints, workflow definitions, agent and skill definitions, and policies are versioned, catalogued assets reused across tenants and projects.
- Autonomous — workflows advance without human intervention by default, escalating to humans only at defined approval gates or on failure.
- Governed — policy is evaluated and recorded for sensitive transitions; nothing irreversible happens without a recorded decision.
- Observable — the full lifecycle of every workflow and task is queryable, replayable, and emits canonical events.
- Multi-tenant — strict tenant isolation, edition-based entitlements, and quota enforcement are enforced at every entry point.
Role in the Factory¶
flowchart LR
Studio["Factory Studio<br/>(human intent & review)"] -->|commands| ControlPlane["Control Plane<br/>(orchestration brain)"]
ControlPlane -->|assigns AgentTasks| AgentMesh["Agent Mesh<br/>(execution)"]
AgentMesh -->|requests context| Knowledge["Knowledge Platform"]
AgentMesh -->|produces artifacts| ControlPlane
ControlPlane -->|drives pipelines| DevOps["DevOps & GitOps"]
ControlPlane -->|evaluates policy| Governance["Governance, Security & Compliance"]
ControlPlane -->|emits events| Observability["Observability & Feedback"]
The Control Plane is the conductor: it receives intent from Factory Studio, instantiates workflows from versioned definitions, assigns agent tasks to the Agent Mesh, enforces governance, drives DevOps & GitOps pipelines, and publishes the canonical event stream that the rest of the factory observes.
Core Responsibilities¶
| Responsibility | Description |
|---|---|
| Identity & access | Authenticate humans and services (OpenIddict-based), issue and validate tokens, and authorize every operation against tenant and project scope. |
| Tenancy & entitlement | Own tenants, editions, subscriptions, feature flags, and quotas; enforce multi-tenant isolation and edition-based capabilities. |
| Project & module management | Maintain the catalogue of factory projects, their environments, modules, and inter-module dependencies. |
| Blueprint lifecycle | Parse, validate, version, and store blueprints, context maps, and domain models that define what the factory will build. |
| Workflow orchestration | Instantiate workflow definitions, drive their state machines, assign agent tasks, persist process state, and support deterministic replay. |
| Agent & skill governance | Register agent and skill definitions, manage agent pool capacity, and apply model policies that constrain which models agents may use. |
| Policy, approval & audit | Evaluate policy on sensitive transitions, manage human approval gates, and write an immutable audit trail. |
| Cost & usage | Meter token, compute, and task consumption per tenant/project and roll it up for billing and quota enforcement. |
| Integration | Manage outbound/inbound connections to external systems (Git providers, identity providers, cloud, billing). |
Key Capabilities¶
- Definition-driven orchestration — workflows, agents, skills, and policies are declarative, versioned definitions seeded from
ConnectSoft.AI.SoftwareFactory.Platform(definitions, registry, schemas) and editable as governed assets. - Durable, replayable workflows — every workflow instance is an event-sourced state machine. The complete history can be replayed to reconstruct state, debug a failure, or re-derive an outcome.
- Interchangeable agents — the Control Plane assigns work via the Agent Task Contract; any registered agent satisfying the required role and skill can execute it.
- Policy as a gate, not an afterthought — the
PolicyEngineServiceis consulted before sensitive transitions, and everyPolicyDecisionis recorded for audit. - Quota and cost awareness — orchestration respects edition entitlements and quotas; usage is metered continuously and rolled up for billing.
- Tenant-isolated by construction — every aggregate, store, event, and API carries
tenantId; isolation is enforced in handlers, indexes, and Service Bus subscription filters.
High-Level Component View¶
The Control Plane is composed of ten bounded contexts, each realised as one or more microservices with its own datastore (database-per-service). The container diagram below shows the contexts as deployable containers and the principal flows between them.
flowchart TB
subgraph IdentityAccess["Identity & Access"]
IdentityService
AuthorizationService
end
subgraph TenantEdition["Tenant & Edition"]
TenantService
EditionService
QuotaService
end
subgraph ProjectMgmt["Project Management"]
ProjectService
EnvironmentService
ModuleCatalogService
end
subgraph BlueprintMgmt["Blueprint Management"]
BlueprintService
BlueprintValidatorService
DomainModelService
end
subgraph WorkflowOrch["Workflow Orchestration"]
WorkflowOrchestrator
TaskAssignmentService
ProcessStateService
end
subgraph AgentMgmt["Agent Management"]
AgentRegistryService
SkillRegistryService
AgentPoolManager
end
subgraph GovernanceCtx["Governance"]
PolicyEngineService
ApprovalService
AuditService
end
subgraph CostUsageCtx["Cost & Usage"]
CostUsageService
end
subgraph IntegrationCtx["Integration"]
IntegrationService
end
subgraph ArtifactMgmt["Artifact Management"]
ArtifactService
LineageService
end
IdentityAccess -->|authorizes| WorkflowOrch
TenantEdition -->|entitlements & quota| WorkflowOrch
ProjectMgmt -->|project & module context| WorkflowOrch
BlueprintMgmt -->|validated blueprints| WorkflowOrch
WorkflowOrch -->|AgentTasks| AgentMgmt
WorkflowOrch -->|policy checks| GovernanceCtx
WorkflowOrch -->|artifacts| ArtifactMgmt
WorkflowOrch -->|usage| CostUsageCtx
IntegrationCtx -->|external systems| WorkflowOrch
GovernanceCtx -->|audit trail| ArtifactMgmt
A complete mapping of contexts to their microservices and aggregate roots is on the Bounded Contexts page, and every service is detailed on Microservices.
Integration with Other Platforms¶
| Platform | Relationship |
|---|---|
| Factory Studio | Human-facing entry point. Submits intent and approvals as commands; reads workflow/task state and audit from Control Plane APIs. |
| Agent Mesh | Executes the agent tasks the Control Plane assigns; returns execution results and emitted artifacts. |
| Knowledge Platform | Consumes the canonical event stream for lineage; supplies context packages that agents use during task execution. |
| Governance, Security & Compliance | Shares policy definitions and consumes audit/decision events; the Control Plane embeds the policy decision point. |
| DevOps & GitOps | Receives release/promotion commands from Release workflows; reports pipeline outcomes back as integration events. |
| Observability & Feedback | Subscribes to all Control Plane events via the canonical envelope for tracing, metrics, and feedback loops. |
The orchestration mechanics are grounded in the existing implementation described in the Orchestration Layer, Orchestration Domain, Coordinators, and Projects Management documentation.
Final-State Summary¶
In the final state, the Control Plane is a fleet of independently deployable .NET 10 / ASP.NET Core microservices following Clean Architecture and DDD, communicating over MassTransit on Azure Service Bus, persisting to per-service Azure SQL / PostgreSQL databases with Redis caching, secured with OpenIddict-based identity and multi-tenant SaaS extensions (ConnectSoft.Extensions.Saas.*). It is the single authority that turns business intent into governed, traceable, reusable, autonomously executed factory workflows — the brain that makes the ConnectSoft AI Software Factory a controllable, auditable, multi-tenant production system rather than a collection of agents.
Related¶
- Bounded Contexts · Microservices · APIs · Workers
- Events · Aggregate Roots · Storage · Workflows · Deployment · Extension Roadmap
- Reference: Event Envelope · Naming Conventions · Metadata Schema · Agent Task Contract