π Service Blueprint¶
π§ What Is a Service Blueprint?¶
A Service Blueprint is a domain-centric, functional specification that defines a cohesive set of business capabilities as a logical unit β decoupled from its technical realization (e.g., microservice, module, shared library).
In the ConnectSoft AI Software Factory, a Service is a business-aligned boundary that serves as the primary unit of domain responsibility and orchestration.
It is not necessarily a runtime artifact. Instead, it acts as:
- A domain container for behavior, state, APIs, and events
- A source of truth for related capabilities, workflows, and data contracts
- A bridge between feature-level specifications and physical microservices/modules
π§± Not Just a Microservice¶
While a microservice is a deployable runtime unit, a service blueprint is a domain-first design construct. In some cases:
- A service may be implemented by a single microservice
-
In other cases, it may span:
-
Several collaborating modules
- Internal orchestration within a monolith
- Event processors or background workers
- Libraries or SDKs used across runtimes
π Example Service Domains¶
| Service Name | Description |
|---|---|
ReferralService |
Manages referrals, status flows, and outbound messaging |
NotificationService |
Centralized gateway for email, SMS, and push channels |
DocumentGenerationService |
Handles rendering, templating, versioning of PDFs and reports |
PaymentService |
Encapsulates billing, invoices, transactions |
These services are defined before deciding if they require standalone deployment.
π§ Agent Usage¶
The Microservice Generator Agent, Domain Model Agent, and Product Manager Agent all rely on the Service Blueprint to:
- Drive physical architecture decisions (microservice, module, or gateway)
- Coordinate message contracts
- Align testing scope and boundaries
- Index for reuse in libraries or other platforms
π― Why It Exists in the Factory¶
The Service Blueprint is foundational to the ConnectSoft AI Software Factory because it enables a domain-driven, technology-agnostic representation of business functionality before any decisions are made about:
- Deployment boundaries
- Hosting models
- Implementation strategy
It ensures business-aligned reasoning, promotes clean separation of concerns, and powers downstream orchestration and reuse.
π Core Reasons for Existence¶
| Reason | Description |
|---|---|
| π§ Agent Interoperability | Serves as a shared boundary object across Product, Architecture, and QA agents |
| π Traceable Functional Mapping | Aligns features, stories, and events with a bounded responsibility surface |
| π§± Independent of Implementation | Allows separation of design vs physical topology (microservice, module, lib) |
| β»οΈ Reusability & Composability | Services can be reused across apps, APIs, and domains |
| π¦ Template-Agnostic Design | Precedes and informs template CLI generation (microservice vs shared module) |
π§ Role in Agent System¶
The Service Blueprint is not generated by a single agent β it's an emergent construct, composed from signals and artifacts across multiple upstream agents:
- π§ Vision Architect Agent β Initial domain hints, goals
- π©βπΌ Product Manager Agent β Features and responsibilities
- π§± Domain Model Agent β Aggregates and entities
- π§ Microservice Generator Agent β Realizes service in physical form
π Agent Knowledge Coordination¶
It serves as a semantic glue between:
- Features in Product Blueprint
- Entities in Domain Model
- APIs and contracts in Microservice Blueprint
- Security boundaries in Auth Blueprint
- Deployment strategies in Infra Blueprint
π Example Factory Use Cases¶
- β Validate a service boundary supports all required features
- π§ Regenerate contracts or tests when service structure changes
- ποΈ Delay or change implementation model (from lib β microservice)
- π Support multiple versions of a service with traceability
- π§ Use in prompt memory, search, or code generation scaffolding
Without the Service Blueprint, the Factory would be forced to reason too early about physical artifacts β reducing agility, traceability, and modular evolution.
π§ Agent Responsible¶
The Service Blueprint is a composite artifact, generated through collaborative coordination between multiple intelligent agents within the ConnectSoft AI Software Factory. While no single agent owns the entire blueprint, it is materialized and validated primarily by the following:
π§ Primary Agent: Service Blueprint Generator Agent¶
| Role | Description |
|---|---|
π§ Service Blueprint Generator Agent |
Synthesizes inputs from upstream agents to create or update the blueprint |
| π Memory-aware | Reads previous service artifacts and deltas from prior versions |
| βοΈ Orchestration-aware | Injects outputs into downstream agents (code gen, tests, CI) |
π€ Supporting Agents¶
| Agent | Role in Blueprint Generation |
|---|---|
Vision Architect Agent |
Provides domain problems, constraints, goals |
Product Manager Agent |
Supplies business features and capabilities |
Domain Model Agent |
Supplies aggregates, entities, value objects |
Microservice Generator Agent |
Decides if this blueprint maps to physical microservice(s) |
Test Generator Agent |
Generates contracts, behavior, and scenario test definitions |
Infrastructure Blueprint Agent |
Maps service to hosting/deployment decisions |
𧬠Agent Collaboration Diagram¶
graph TD
Vision["π§ Vision Architect Agent"]
Product["π©βπΌ Product Manager Agent"]
Domain["π¦ Domain Model Agent"]
Generator["ποΈ Service Blueprint Generator Agent"]
Microservice["βοΈ Microservice Generator Agent"]
Test["π§ͺ Test Generator Agent"]
Vision --> Generator
Product --> Generator
Domain --> Generator
Generator --> Microservice
Generator --> Test
The
Service Blueprint Generator Agentis not a passive formatter β it understands semantic structure, computes deltas, and adapts structure based on evolving needs.
π₯ Agent Inputs¶
- π Vision Blueprint
- π¦ Domain model catalog
- π§© Product-feature-service linkage table
- π Prior versions of this service
- π System health & trace logs (observability loop)
π€ Agent Outputs¶
service-blueprint.md/.json- Traceable embeddings for reuse across feature graphs
- Signal triggers for downstream scaffolding or CI
π§± Difference Between Service, Module, Microservice¶
The ConnectSoft AI Software Factory promotes layered abstractions to maximize separation of concerns. At the heart of this structure is the Service β which serves as the functional core. To understand how Service Blueprints relate to other constructs, we distinguish between:
π 1. Service¶
A Service is a domain-aligned unit of business responsibility β not a deployment unit or code artifact. It defines:
- π― What the business logic is
- π§ What entities, processes, and workflows it owns
- π What contracts and messages it manages
It is the semantic center of a capability.
βοΈ 2. Module¶
A Module is a code packaging construct β typically realized as a:
- Shared .NET library (
.csproj) - Internal SDK
- Plug-in or adapter
It may or may not be a full service, and can belong to one or more services.
Modules are technical constructs that group reusable behaviors or data structures.
π 3. Microservice¶
A Microservice is a runtime-deployable, infrastructure-isolated unit that may implement:
- A single service (ideal case)
- Multiple closely related services (less ideal)
- Or a part of a larger monolith (in legacy systems)
Microservices are the deployment boundary, not the business boundary.
π§± Comparison Table¶
| Concept | Defines | Aligned To | Owned By | Deployable | Reusable |
|---|---|---|---|---|---|
| Service | Business capability | Domain Language | Product/Architect | No | Yes |
| Module | Code package/unit | Code structure | Dev team | No | Yes |
| Microservice | Deployment unit | Infra boundary | DevOps | Yes | No |
π§ Factory Behavior¶
| Input Type | Factory Action |
|---|---|
Service |
Generates contracts, tests, orchestration blueprints |
Module |
Generates .csproj, DI setup, unit tests |
Microservice |
Generates full solution, Dockerfile, CI/CD pipelines |
The Service Blueprint is where business logic and functional ownership are defined β it is the most stable and semantic layer in the system. Other layers may change, deploy, or evolve β but services remain aligned to purpose.
π Format and File Shape¶
Every Service Blueprint in the ConnectSoft AI Software Factory is generated as a multi-format artifact that supports both human review and machine processing. This guarantees compatibility across agents, traceability in memory graphs, and visibility in Studio interfaces.
π Primary File Outputs¶
| Format | Description | Used By |
|---|---|---|
.md |
Human-readable Markdown blueprint | Studio UI, architects, reviewers |
.json |
Canonical machine-readable structure | Downstream agents, validators |
embedding |
Semantic vector embedding for memory graph indexing | Retrieval, summarization, search |
π¦ Example File Structure¶
blueprints/services/ReferralService/
βββ service-blueprint.md
βββ service-blueprint.json
βββ embedding.vector
π Blueprint Naming Convention¶
ServiceNameis in PascalCase and must match the internal blueprint ID- Versioned via tagging or suffix (
-v2.md,v2025-06-01.json) - Embeddings are auto-tagged with blueprint hash and version
β¨ Markdown File Structure¶
The .md file includes standardized sections:
# π ReferralService β Service Blueprint
## π― Business Responsibility
## π§© Features Covered
## π¦ Aggregates and Entities
## π APIs and Events
## π§ Role in System
## π§ͺ Tests and Quality Constraints
## π Security Scope
...
Each section is traceable by agents and validated by blueprint checkers.
π§ JSON File Schema (Simplified)¶
{
"id": "ReferralService",
"description": "...",
"features": [...],
"entities": [...],
"apis": {...},
"events": {...},
"constraints": {...},
"version": "v1",
"traceId": "svc-93A7EAF"
}
- Schema is validated and versioned using a shared Factory JSON schema
- Machine-readable format feeds template generation, orchestration, testing, etc.
π§ Embedding & Trace Graph¶
-
All blueprints are indexed in the Factory memory graph using:
-
Blueprint ID
- Version hash
- Feature tags
- Domain scope
- Aggregate references
- Enables search, recall, diffing, and quality scoring
π By producing blueprints in multiple formats, the Factory ensures agents can generate, reason about, evolve, and trace services across their full lifecycle.
π Naming, Storage, Versioning¶
The ConnectSoft AI Software Factory enforces consistent naming conventions, blueprint storage layouts, and versioning policies to ensure traceability, reproducibility, and compatibility of every Service Blueprint across its lifecycle.
π§Ύ Naming Convention¶
| Element | Rule |
|---|---|
| Service Name | PascalCase, must reflect business capability (e.g., BillingService) |
| File Prefix | Always service-blueprint |
| Version Tags | Appended via suffix or folder hierarchy |
| Trace ID | Globally unique and stable across regenerations |
Example Blueprint Files:
blueprints/services/NotificationService/service-blueprint.md
blueprints/services/NotificationService/service-blueprint-v2.json
Traceable ID inside file:
ποΈ Storage Structure¶
blueprints/
βββ services/
βββ NotificationService/
β βββ service-blueprint.md
β βββ service-blueprint.json
β βββ v1/
β β βββ snapshot.md
β β βββ diff-report.json
β βββ embeddings/
β β βββ vector.json
β βββ coverage/
β βββ apis.csv
β βββ tests.md
- Embeddings are stored separately but linked by
traceId - Coverage reports, diffs, and deltas are included for blueprint evolution
π Versioning Strategies¶
| Strategy | Description |
|---|---|
Semver |
e.g., v1.2.3 for functional/service scope versions |
Date-stamped |
e.g., v2025-06-08 used for regenerations tied to Factory orchestration |
Labeled |
e.g., draft, approved, validated, archived |
Blueprints always retain both human-meaningful and machine-consumable version metadata.
π Regeneration Markers¶
Each blueprint version includes:
originPromptIdgeneratedByAgentupstreamDeltaHashchangeSummary
This enables diff auditing, traceable regeneration, and backward-compatible history.
π¦ GitOps Alignment¶
Service blueprints are treated as version-controlled assets. Each update to the blueprint is:
- Committed to Git
- Reviewed via pull request or CI validator
- Associated with automated snapshot tests and diff checks
π§ Factory agents use these structures to identify whether a blueprint needs to be regenerated, evolved, or relinked to new features or contexts.
π§© Input Dependencies¶
To generate and evolve a Service Blueprint, the AI Software Factory relies on a rich network of upstream inputs β from domain models and product plans to memory traces and system constraints. These ensure that each service is semantically valid, contextually grounded, and operationally coherent.
π§ Core Input Sources¶
| Source | Description |
|---|---|
| π§ Vision Blueprint | Provides the purpose, business goals, constraints, and user impact |
| π Product Blueprint | Lists features, epics, and capabilities assigned to this service |
| π¦ Domain Model Blueprint | Defines entities, aggregates, value objects, enums within service boundary |
| π System Interaction Graph | Maps dependencies to APIs, events, and other services |
| π§± Architecture Blueprint | Establishes DDD boundaries, service placement, and responsibilities |
| π§ Memory Graph | Provides historical embeddings, previous versions, quality scores |
π Supporting Inputs¶
| Input | Used For |
|---|---|
Feature-to-Service Mapping |
Determines which features fall under this service scope |
Event Taxonomy |
Establishes which domain events this service publishes or subscribes to |
Security Model / Auth Blueprint |
Clarifies trust zones and role-based access |
Test Coverage Matrix |
Determines expected scenario and behavior tests |
π§ Input Resolution Flow (Orchestration View)¶
flowchart TD
Product[π Product Blueprint]
Vision[π§ Vision Blueprint]
Domain[π¦ Domain Model]
Arch[ποΈ Architecture Blueprint]
Generator[π€ Service Blueprint Generator Agent]
Product --> Generator
Vision --> Generator
Domain --> Generator
Arch --> Generator
The Service Blueprint is not created in isolation β itβs synthesized from upstream cognitive signals and orchestrated artifacts.
π Sample Input Snapshot (ReferralService)¶
{
"visionGoal": "Streamline referral workflows between clinics",
"features": ["SubmitReferral", "UpdateReferralStatus", "NotifyReferrer"],
"entities": ["Referral", "Clinic", "User"],
"events": ["ReferralSubmitted", "ReferralStatusChanged"],
"authScope": "Clinic Admin, Referrer"
}
π This deep set of inputs ensures that each service is richly described, strategically placed, and cross-agent interoperable from its first generation.
π Generation Trigger Events¶
The Service Blueprint is not a static artifact β it is continuously regenerated, evolved, or refined based on meaningful change events in the AI Software Factory. These events may be triggered by humans, other agents, or automated diff watchers in the memory graph.
π When Is a Service Blueprint Created?¶
| Trigger Type | Description |
|---|---|
| π§ New Feature Assigned | A new product capability maps to a domain that has no existing service |
| π¦ New Aggregate Introduced | A new domain entity or process emerges from the Domain Model blueprint |
| ποΈ New Microservice Planned | The Architecture Blueprint defines a new runtime component |
| π Service Coverage Gap | Detected by QA/Test Generator Agent or Audit Agent |
| π€ Human Prompt | A user or engineer explicitly requests a new service via the UI or prompt |
π When Is It Regenerated?¶
| Change Signal | Cause |
|---|---|
| π§ Vision Change | Business goals or constraints evolve |
| π Feature Modified | An existing feature shifts ownership or structure |
| π Event Reassignment | Events published/subscribed shift from one service to another |
| β οΈ Observability Gap Detected | Metrics, tests, or contracts missing or outdated |
| π§ Blueprint Invalidation | A downstream agent fails validation due to stale or missing data |
π§ Trigger Sources by Agent¶
| Agent | Trigger Role |
|---|---|
Product Manager Agent |
Suggests new services based on emerging features |
Domain Model Agent |
Splits or merges service scope when domain changes |
Architecture Blueprint Agent |
Creates new blueprint shell if system topology is updated |
Test Generator Agent |
Requests regeneration when scenarios are uncovered or outdated |
Blueprint Auditor Agent |
Flags blueprint for rebuild if violations or omissions detected |
π Regeneration Event Types¶
| Event Name | Trigger Pattern |
|---|---|
ServiceBlueprintMissing |
No blueprint exists for mapped feature |
ServiceScopeConflictDetected |
Feature mapped to multiple services |
ServiceContractOutdated |
DTOs or events out of sync |
ServiceBlueprintEvolved |
Manually triggered regeneration |
π§ Sample Orchestration Flow¶
sequenceDiagram
participant ProductAgent
participant DomainAgent
participant ServiceGenAgent
participant MicroserviceAgent
ProductAgent->>ServiceGenAgent: Feature β Service Mapping
DomainAgent->>ServiceGenAgent: Entity β Aggregate Inclusion
ServiceGenAgent->>MicroserviceAgent: Blueprint β Runtime Mapping
π Service Blueprints are living artifacts, maintained as part of the Factoryβs evolving knowledge graph β regenerated when the world changes, not just when code changes.
π¦ Outputs and Consumers¶
The Service Blueprint produces structured, traceable outputs that are consumed by multiple agents, templates, and orchestration layers across the ConnectSoft AI Software Factory. These outputs form the foundation for code generation, testing, orchestration, and runtime alignment.
π€ Core Outputs¶
| Output Type | Format | Purpose |
|---|---|---|
π§ service-blueprint.md |
Markdown | Human-readable overview for architects and Studio |
π§ service-blueprint.json |
JSON | Canonical structure for agent interoperability |
π¦ feature-to-service-map.json |
JSON | Lookup table for downstream traceability |
𧬠embedding.vector |
Vector | Injected into memory graph for search, validation, and diffing |
π service-contracts.json |
JSON | Extracted interface shape for tests, DTOs, API consistency |
π§ͺ scenario-tags.yaml |
YAML | Used by Test Generator to seed coverage plans |
π₯ Primary Consumers¶
| Consumer Agent/System | Role |
|---|---|
Microservice Generator Agent |
Maps service into CLI template for physical realization |
Test Generator Agent |
Uses blueprint to create scenario tests, contract verifications |
Observability Agent |
Builds telemetry and tracing plan based on events/APIs in blueprint |
Blueprint Auditor Agent |
Validates blueprint completeness, integrity, alignment with domain model |
Orchestration Agent |
Aligns gateway routing, event choreography, and system flow |
Documentation Agent |
Generates linked markdown pages for Studio users |
π Cross-Blueprint Traceability¶
Service Blueprint β Microservice Blueprint:
-
May result in:
-
A dedicated microservice (if required)
- A shared module (if embedded into another service)
- A service proxy/gateway route (if composed by gateway)
This mapping is tracked using
serviceBlueprintId β microserviceBlueprintIdlinks.
π§ͺ Service-to-Test Coverage¶
-
Each
service-blueprint.jsondeclares: -
Required feature scenarios
- Success and failure cases
- API + Event contract expectations
These are converted to automated test plans and CI hooks.
π§ Memory Graph Entry Example¶
{
"id": "ReferralService",
"type": "ServiceBlueprint",
"traceId": "svc-referral-v2",
"features": ["SubmitReferral", "CancelReferral"],
"mappedTo": ["microservices/referral", "tests/scenarios/referral-tests.md"]
}
π¦ A Service Blueprint is not just documentation β it is a generation contract, traceable node, and cognitive artifact used by the entire AI factory runtime.
π Domain Responsibility & Business Role¶
At its core, every Service Blueprint represents a bounded domain responsibility β a distinct business capability that the software system must own, model, and evolve. It describes what the service exists to do, in language that is understandable to stakeholders and traceable by agents.
π― What a Service Owns¶
A service should:
- Manage a cohesive subset of domain logic
- Own aggregates, policies, and invariants
- Enforce business rules that are consistent across APIs and events
- Serve as the source of truth for one or more business capabilities
π§± Characteristics of a Well-Defined Service¶
| Property | Description |
|---|---|
| π― Aligned Purpose | Clearly tied to a business goal or outcome |
| π¦ Entity Ownership | Defines, persists, and mutates specific domain aggregates |
| π Behavioral Cohesion | Centralizes decisions, transitions, and workflows |
| π§ Cross-Capability Reuse | May be invoked by multiple modules, microservices, or APIs |
π§ Example: ReferralService¶
{
"id": "ReferralService",
"description": "Handles all operations related to medical referrals between clinics.",
"features": [
"SubmitReferral",
"UpdateReferralStatus",
"AttachDocumentsToReferral",
"NotifyReferrer",
"RejectReferral"
],
"entities": [
"Referral",
"ReferralStatus",
"Clinic",
"ReferralAttachment"
],
"ownership": "Manages state transitions and auditability of all referral workflows"
}
π Boundaries in Domain-Driven Design¶
Service blueprints often align with:
- Bounded Contexts in the architecture blueprint
- Capability maps in product planning
- Sagas or processes in orchestration models
This alignment enables traceability across all levels of the Factory β from idea to code to behavior to test.
π§ Used By Agents To:¶
- Validate whether a capability is fully covered
- Identify which service owns a contract or aggregate
- Evaluate test coverage vs. business priority
- Recommend splitting or merging service scope over time
π The βResponsibilityβ section of the Service Blueprint becomes a declarative contract between business intent and system implementation β and is central to domain-driven traceability.
π§Ύ Interfaces and Contracts¶
Every Service Blueprint defines the public-facing contracts that allow other services, frontends, and systems to interact with its domain logic. These contracts are essential for API generation, integration testing, and event choreography across the Factory.
π Types of Interfaces¶
| Interface Type | Description | Protocol |
|---|---|---|
| π‘ REST API | Exposes commands and queries for synchronous interaction | HTTP / OpenAPI |
| π Events | Publishes domain events and listens to others for coordination | Event Bus (Azure SB / Kafka) |
| π§ Internal APIs | Optional private interfaces consumed by other services/modules | gRPC / internal REST |
| π¦ Shared Contracts | DTOs, Enums, Value Objects shared with other components | JSON Schema / ProtoBuf |
π Interface Blueprint Block Example¶
"contracts": {
"restApi": {
"basePath": "/referrals",
"endpoints": [
{
"method": "POST",
"path": "/submit",
"input": "SubmitReferralRequest",
"output": "ReferralResponse"
},
{
"method": "PATCH",
"path": "/{id}/status",
"input": "UpdateReferralStatusRequest",
"output": "ReferralStatusResponse"
}
]
},
"events": {
"publishes": ["ReferralSubmitted", "ReferralRejected"],
"subscribes": ["UserRegistered", "ClinicUpdated"]
}
}
π§ Usage Across the Factory¶
| Component | Role |
|---|---|
API Contract Generator Agent |
Creates OpenAPI or gRPC specs from this blueprint |
Test Generator Agent |
Produces integration and contract tests for each interface |
Microservice Generator Agent |
Scaffolds controllers, handlers, and DTOs |
Observability Agent |
Hooks telemetry into endpoint and event flows |
Gateway Blueprint Agent |
Routes and secures endpoint access via API gateway layer |
π Contract Scope Best Practices¶
-
π Contracts should be:
-
Owned by the service (not shared across boundaries blindly)
- Stable, versioned, and explicitly traceable
- Minimal β exposing only what is necessary for orchestration
- π§ Internal contracts may be reused via generated SDKs (e.g., with
ConnectSoft.ContractGeneratortools)
π Memory Graph Linking¶
Each endpoint and event is linked to:
- Service Blueprint ID
- Feature ID(s)
- Aggregate / DTO definition
- Traceable tests and consumer mappings
π§Ύ A serviceβs contracts are its external promise β defining how the domain can be safely interacted with, reused, and evolved across the platform.
π¦ Entities, Aggregates, and Ownership Scope¶
A core function of a Service Blueprint is to declare which domain objects the service owns, manages, and mutates. This defines its bounded context, informs DDD design, and ensures clean separations between services, avoiding shared write ownership.
π§± Entity Types in the Blueprint¶
| Type | Description |
|---|---|
| π§© Entity | A domain object with identity (e.g., Referral, Invoice) |
| π Aggregate | A root entity and its invariants (e.g., Referral + Attachments) |
| π Value Object | Stateless, immutable type used for modeling attributes (e.g., EmailAddress) |
| π§Ύ Enum | Enumerated set of business states or categories |
π Example: ReferralService¶
"entities": [
{
"name": "Referral",
"type": "Aggregate",
"owned": true,
"description": "Represents the lifecycle of a patient referral between clinics"
},
{
"name": "ReferralStatus",
"type": "Enum",
"description": "Enumerates possible states: Draft, Submitted, Rejected, Completed"
},
{
"name": "Clinic",
"type": "Entity",
"owned": false,
"reference": "OrganizationService"
}
]
π§ Ownership Semantics¶
| Ownership Type | Meaning |
|---|---|
owned: true |
Service can mutate, validate, and store this object |
owned: false |
Service only references this object; managed by another service |
composed |
The object is fully embedded inside an aggregate; no global identity |
Ownership metadata enables clean modeling and prevents write conflicts, aggregate overlap, or event schema duplication.
π§ Used By Agents To:¶
| Agent | Role |
|---|---|
Domain Model Agent |
Enforces aggregate integrity and invariants |
Microservice Generator Agent |
Maps aggregates into folders, repositories, handlers |
Test Generator Agent |
Generates tests aligned to entity lifecycle transitions |
Documentation Agent |
Renders entity diagrams and type hierarchies in markdown |
Security Agent |
Determines RBAC scopes for aggregate-sensitive operations |
π§ Entity Trace Indexing¶
All entities are trace-indexed with:
entityIdandowningServiceIdaggregateGroup,events,scenarios, andfeaturesvector embeddingsfor semantic lookup
π¦ Entity and aggregate modeling is not optional β itβs the semantic backbone of the Factory, enabling clean architecture, valid code generation, and consistent behavior.
π Security & Authorization Scope¶
Each Service Blueprint defines a precise security boundary β identifying who can access what, under what roles, and via which interfaces. This forms the basis for both code-level enforcement and infrastructure policy alignment, ensuring that generated services comply with Zero Trust and Least Privilege principles from day one.
π Whatβs Captured¶
| Security Element | Description |
|---|---|
| π Access Roles | Roles or scopes permitted to interact with APIs and features |
| π‘οΈ Trust Zone | Whether the service is internal-only, public-facing, or shared |
| π Authn Mechanism | Token-based (OAuth2/OpenID), API Key, or session token |
| π Data Access Level | Full, scoped (e.g., own clinic only), or read-only |
| π« Forbidden Actions | Hard limits for certain actors (e.g., no deletes for non-admins) |
π Example Security Declaration¶
"security": {
"accessRoles": ["ClinicAdmin", "Referrer", "SystemAuditor"],
"trustZone": "internal",
"authMechanism": "OpenIdConnect",
"scopedAccess": true,
"scopeFilter": "ClinicId",
"restrictedActions": ["RejectReferral"]
}
π― Authorization Patterns¶
- π RBAC (Role-Based Access Control): Maps OpenId claims or internal roles to permissions
- π ABAC (Attribute-Based Access Control): Enforces clinic-level, region-level, or user-ownership constraints
- π¨ Audit-Only Operations: Allows actions but logs them with elevated observability tags
π§ Used By Agents To:¶
| Agent | Use of Security Scope |
|---|---|
Microservice Generator Agent |
Generates auth decorators, guards, policy attributes |
API Gateway Agent |
Injects policies into reverse proxy rules and middleware |
Security Agent |
Validates RBAC alignment, scopes, token expectations |
Test Generator Agent |
Generates access violation tests and forbidden scenario cases |
Observability Agent |
Tags security-sensitive endpoints with alerts and metrics |
π¦ Artifacts Derived¶
| Artifact | Format | Description |
|---|---|---|
security-policy.json |
JSON | Resolved list of actions, roles, and constraints |
policy-injection.config |
Configuration | Middleware or filter registration for auth policies |
test-auth-cases.yaml |
YAML | Scenario cases for positive and negative access tests |
π Every service in the Factory is security-first by design β access control is modeled, codified, enforced, and tested before the first request hits production.
βοΈ Runtime Characteristics (Resilience, Health, Limits)¶
The Service Blueprint includes key operational metadata that describes how the service should behave at runtime under stress, failure, or degraded conditions. These attributes guide resilience engineering, service health monitoring, and automated platform configuration.
βοΈ Runtime Dimensions¶
| Aspect | Description |
|---|---|
| π Retry Policy | Defines when and how retries occur (e.g., transient fault handling) |
| β³ Timeout Settings | Maximum time per operation or request |
| π§― Circuit Breaker | Flags when a service or downstream dependency should temporarily halt usage |
| β€οΈ Health Checks | Liveness, readiness, startup probes |
| π Resource Limits | CPU, memory, concurrency constraints |
| π§ͺ Fault Injection | Chaos/resilience testing hooks |
π Example Runtime Declaration¶
"runtime": {
"timeoutMs": 3000,
"retryPolicy": {
"maxAttempts": 3,
"backoffStrategy": "exponential"
},
"circuitBreaker": {
"failureThreshold": 0.5,
"cooldownPeriod": 30
},
"healthChecks": ["startup", "liveness", "readiness"],
"resourceLimits": {
"cpu": "500m",
"memory": "256Mi"
}
}
π§ Used By Factory Agents To:¶
| Agent | Runtime Usage |
|---|---|
Microservice Generator Agent |
Injects Polly resilience handlers, timeout tokens, and config bindings |
Deployment Agent |
Maps limits to container resources and startup probes |
Observability Agent |
Wires up health endpoints to telemetry dashboards and alert rules |
Chaos Testing Agent |
Plans fault scenarios (e.g., drop messages, delay APIs, exhaust memory) |
Pipeline Agent |
Creates smoke test hooks and resilience probes in CI/CD |
π Config Output Artifacts¶
| Artifact | Description |
|---|---|
resilience.json |
Formal retry, timeout, breaker rules |
health-check.config.yaml |
K8s and cloud-native probe definitions |
startup-constraints.json |
Startup dependencies and initialization order |
limits.yaml |
CPU, memory, scaling thresholds |
π§ͺ Validation Considerations¶
- π All retry and timeout settings are validated against downstream SLAs
- β€οΈ Health checks are observable, testable, and traced
- π Limits are enforced via Helm charts / Terraform in downstream IaC
βοΈ Runtime behavior is codified in the blueprint, ensuring all generated microservices operate with consistent, observable, and resilient defaults β aligned to their domain impact.
π Observability Tags and Metrics¶
Every Service Blueprint in the Factory explicitly defines how the service should be instrumented, traced, and monitored. This enables deep integration with the platformβs observability mesh, ensuring that every behavior is measurable, debuggable, and traceable β across logs, metrics, traces, and events.
π Observability Dimensions¶
| Dimension | Description |
|---|---|
| π Trace Identity | Unique traceId per request, span propagation, correlation ID headers |
| π§ Agent Metadata | Injected tags like agentId, featureId, scenarioId |
| π Custom Metrics | Domain-specific counters, timers, histograms (e.g., referral_accepted) |
| π Audit Trails | Entity-level change logs and decision justifications |
| π¨ Alerts & Thresholds | Configurable rules for errors, latency, throughput |
π Example Observability Block¶
"observability": {
"traceIdPropagation": true,
"customTags": ["featureId", "scenarioId", "aggregateId"],
"metrics": [
{
"name": "referral_submissions_total",
"type": "counter",
"labels": ["status", "clinicId"]
},
{
"name": "referral_processing_duration_ms",
"type": "histogram"
}
],
"auditTrailEnabled": true
}
π§ Used By Agents To:¶
| Agent | Role |
|---|---|
Observability Agent |
Injects metrics, logs, and trace hooks in the generated service |
Test Generator Agent |
Verifies that observability outputs match service expectations |
Documentation Agent |
Renders observability overview and dashboards |
Security Agent |
Monitors for suspicious access patterns or policy violations |
Orchestration Agent |
Links observability to the event mesh and root-cause workflows |
π οΈ Toolchain Integration¶
| Integration | Example |
|---|---|
| Tracing | OpenTelemetry + Azure Monitor / Zipkin / Jaeger |
| Metrics | Prometheus, Azure Metrics, Grafana dashboards |
| Logging | Serilog + Trace Correlation + Log Enrichment |
| Alerts | Azure Alerts, Grafana Alerts, PagerDuty integrations |
𧬠Blueprint-Driven Metrics¶
Each metric declared in the blueprint is:
- Embedded into generated service code (via metric libraries)
- Registered with monitoring dashboards (via observability provisioning)
- Linked to feature β entity β scenario lineage for fine-grained visibility
π Observability is not an afterthought in the Factory β it is modeled, versioned, validated, and deployed as part of the Service Blueprint contract.
π Event Publishing and Subscriptions¶
Each Service Blueprint explicitly defines its event-driven interactions: the domain events it publishes, those it subscribes to, and how those events are structured, versioned, and processed. This enables true event-driven architecture (EDA) and supports clean service choreography across the Factory.
π¦ Event Contracts¶
| Event Type | Role | Format |
|---|---|---|
| π€ Published Events | Emitted as outcomes of domain transitions | CloudEvent / JSON Schema |
| π₯ Subscribed Events | Trigger state changes or side-effects | CloudEvent / Protobuf |
| π§ Internal Events | Optional in-process triggers or audits | Internal DTOs |
π Example Event Declaration¶
"events": {
"publishes": [
{
"name": "ReferralSubmitted",
"schema": "v1",
"triggeredBy": ["POST /referrals/submit"]
},
{
"name": "ReferralRejected",
"schema": "v1",
"triggeredBy": ["PATCH /referrals/{id}/status"]
}
],
"subscribes": [
{
"name": "UserRegistered",
"sourceService": "UserService",
"usedFor": "Auto-linking referrals"
},
{
"name": "ClinicUpdated",
"sourceService": "OrganizationService"
}
]
}
π‘ Event Metadata (Standardized)¶
| Attribute | Description |
|---|---|
eventType |
Semantic category (e.g., DomainEvent, IntegrationEvent) |
sourceService |
Owning service |
correlationId |
Tied to trace and aggregate |
version |
Allows safe evolution and consumers compatibility |
originFeatureId |
Helps link to upstream planning and scenarios |
π§ Used By Factory Agents To:¶
| Agent | Role |
|---|---|
Microservice Generator Agent |
Creates producer/consumer scaffolding for events |
Event Choreographer Agent |
Plans event sequence, consistency boundaries |
Test Generator Agent |
Produces publish-subscribe tests and contract validators |
Observability Agent |
Instruments event flows with trace and metric hooks |
Security Agent |
Applies role and scope filters on event payloads |
π Memory & Event Mesh Linking¶
Each event is:
- Indexed in the Event Taxonomy
-
Cross-linked with:
-
Aggregate
- Feature
- Scenario
- Test coverage
- Versioned and validated in the event schema registry
π§ͺ Event-Based QA Examples¶
ReferralSubmitted β triggers downstream clinic availability checkReferralRejected β should suppress notification to referrerClinicUpdated β modifies referral eligibility
π Events are first-class citizens in the Factory: observable, testable, traceable, and regenerable β declared upfront in every service blueprint.
π File & Artifact Outputs (Generated by Blueprint)¶
The Service Blueprint doesnβt just guide human understanding β it powers the automated generation of code, tests, configuration, observability hooks, and deployment manifests. This cycle enumerates the full range of files and artifacts created directly from the blueprint by downstream agents or templates.
π¦ Generated Files by Agent¶
| Agent | Artifact Type | Format(s) | Target Path |
|---|---|---|---|
| π§ Microservice Generator | Service code, contracts | .cs, .proto, .json, .csproj |
src/services/{ServiceName}/ |
| π§ͺ Test Generator Agent | Unit + scenario tests | .cs, .feature, .json |
tests/{ServiceName}.Tests/ |
| π Security Agent | Policy configs, auth filters | .json, .cs |
src/services/{ServiceName}/Security/ |
| π Observability Agent | Metrics, logs, traces config | .yaml, .json, .cs |
src/services/{ServiceName}/Observability/ |
| π Event Choreographer | Event bindings + schemas | .json, .proto, .cs |
src/contracts/events/, schemas/ |
| βοΈ Deployment Agent | Helm charts, probes, sidecars | .yaml, .tf, .bicep |
deploy/k8s/services/{ServiceName}/ |
| π Documentation Agent | Markdown, diagrams | .md, .svg, .png |
docs/services/{ServiceName}/ |
π§± Example File Tree (ReferralService)¶
ReferralService/
βββ src/
β βββ Application/
β βββ Domain/
β βββ Infrastructure/
β βββ Api/
βββ tests/
β βββ ReferralService.Tests/
βββ contracts/
β βββ events/
βββ deploy/
β βββ k8s/
βββ docs/
β βββ blueprint.md
π Embedded Files in Memory Graph¶
Every artifact is also:
- π Cross-linked with blueprint sections (e.g.,
api.rest[0] β controller.cs) - π§ Embedded semantically for code search and refactoring
- π Version-tagged (e.g.,
v1,draft,generated-from-service-blueprint-v3)
π§ Trace ID Conventions¶
All generated assets are tagged with:
| Tag | Purpose |
|---|---|
traceId |
Request-level and artifact-level traceability |
originBlueprintId |
Maps back to the blueprint that generated it |
agentId |
Shows which agent generated the file |
featureIds |
Highlights relevant user stories / scenarios |
π οΈ GitOps + DevOps Integration¶
Artifacts are committed to dedicated repositories or mono-repos and integrated into:
- π¦ CI pipelines (build, test, validate)
- π CD pipelines (deploy to QA / staging / prod)
- π§ͺ Regression coverage maps
- π Observability dashboards
π A Service Blueprint is not static documentation β it is a live, generative contract that orchestrates full-fidelity software assets across the ConnectSoft AI Software Factory.
π§ Memory & Traceability Structure¶
Every Service Blueprint is fully integrated into the ConnectSoft Memory Graph β the long-term semantic store that powers context injection, prompt grounding, search, and intelligent reuse across all agents in the Factory.
This cycle outlines how the blueprint and its subcomponents are indexed, traced, and retrieved, ensuring full lifecycle visibility from idea to code to production metrics.
π§ Memory Layers Involved¶
| Memory Type | Purpose |
|---|---|
| π§Ύ Short-Term Memory | Active prompt injection during generation and orchestration |
| 𧬠Vector Memory | Semantic embeddings for search, clustering, validation |
| π Blob Storage | Raw markdown/JSON blueprints, archived outputs |
| πΈοΈ Trace Index | Structured references between entities, agents, features |
π Trace Metadata¶
Each Service Blueprint is automatically tagged with:
| Tag | Description |
|---|---|
blueprintId |
Canonical ID of the service blueprint |
agentId |
Which agent created or updated the blueprint |
originPromptId |
Original signal or intent captured from human input |
featureIds[] |
Features supported by this service |
entityIds[] |
Aggregates/entities it owns or references |
microserviceId? |
Physical microservice realization (if applicable) |
scenarios[] |
Supported business or user scenarios |
π Trace Links Example (ReferralService)¶
{
"blueprintId": "ReferralService",
"featureIds": ["SubmitReferral", "CancelReferral"],
"entityIds": ["Referral", "Clinic"],
"publishedEvents": ["ReferralSubmitted"],
"mappedTo": {
"microservice": "ReferralMicroservice",
"api": "ReferralController.cs",
"testScenario": "referral-tests.feature"
}
}
π§ Queryable via Agent APIs¶
| Function | Result |
|---|---|
FindBlueprintByFeature() |
Return services that fulfill a given capability |
FindConsumersByEvent() |
Show all subscribers to a given domain event |
FindBlueprintDiff() |
Track changes across blueprint versions or feature scope |
InjectContextForAgent() |
Load partial blueprint context into active agent prompt |
π Blueprint Memory Graph Record (Markdown + JSON + Embedding)¶
| Component | Format | Stored As |
|---|---|---|
| Metadata | JSON | TraceIndex + tag index |
| Markdown Spec | Markdown | Blob storage + memory-indexed |
| Semantic Vector | Embedding | Stored in vector DB (e.g., Azure AI Search) |
| Cross-links | Graph Edges | Feature β Entity β Event β Test β Agent paths |
π§ Every decision, output, and artifact in the Factory is memory-traced back to its source blueprint β ensuring visibility, explainability, and intelligent reuse across all generations.
π§ͺ Scenario Mapping & Test Coverage¶
A well-formed Service Blueprint includes explicit mappings to real-world scenarios that the service must support β enabling automated test generation, coverage tracking, and runtime validation against expected business behavior.
These mappings connect features, user actions, and domain transitions directly to code and test outcomes, forming a closed feedback loop in the Factory.
π Scenario Types¶
| Type | Description |
|---|---|
| β Positive Scenarios | Normal flows (e.g., submit referral, update status) |
| β Negative Scenarios | Error paths (e.g., submit referral without clinic ID) |
| π Security Scenarios | Unauthorized access, role checks, scoping constraints |
| π Integration Scenarios | Message-based flows, cross-service orchestration |
| π Degraded Scenarios | Timeouts, retries, circuit-breaking during external dependencies |
π§ Example: ReferralService Scenario Block¶
"scenarios": [
{
"id": "submit-referral-valid",
"type": "positive",
"description": "Clinic admin submits a referral with complete details",
"linkedTo": ["ReferralSubmittedEvent", "POST /referrals/submit"],
"expectedOutcome": "Referral stored and event published"
},
{
"id": "submit-referral-missing-clinic",
"type": "negative",
"description": "Submission fails due to missing clinic context",
"expectedOutcome": "Validation error with 400 response"
}
]
π§ͺ Used By Test Generator Agent To:¶
| Action | Output |
|---|---|
| Generate BDD Feature files | .feature files for SpecFlow or Gherkin |
| Scaffold test cases | Integration tests and domain scenario tests |
| Link scenario ID β test file | Enables observability, test traceability |
| Validate test coverage report | Ensures each blueprint scenario is exercised |
π Round-Trip Coverage Mapping¶
| Link From | Link To |
|---|---|
| Scenario ID | Test ID, Feature File, Execution Log |
| Feature ID | Scenario ID β Endpoint / Event / Command |
| Entity Transition | Scenario outcome (mutation or event) |
| Test Result | Observability span, execution metrics |
π§ Agent Feedback Loop¶
Failed or untested scenarios can trigger blueprint correction workflows, feedback to the
Test QA Agent, or generateBlueprintCoverageAlertevents β driving continuous alignment.
π Blueprint Test Index¶
Each serviceβs blueprint includes:
- β Scenario list (with tags, type, outcome expectations)
- π Test linkage map (
scenarioId β test file) - π Coverage ratio and gap report (live or snapshot)
- π§ Vector embedding of scenario descriptions for retrieval
π§ͺ The Factory treats scenarios as first-class, testable, traceable behaviors β connecting domain intent to working code through blueprint declarations.
ποΈ Blueprint Versioning and Mutation History¶
The Service Blueprint evolves over time β as requirements change, features are added, architecture evolves, or bugs are fixed. The ConnectSoft AI Software Factory tracks every mutation of the blueprint, allowing time-travel debugging, trace-based regeneration, and safe branching during iterative generation.
π Versioning Model¶
| Attribute | Description |
|---|---|
version |
Monotonic version tag (e.g., v1, v2, v2.1, rc, approved) |
status |
draft, generated, reviewed, validated, deprecated |
createdByAgent |
Agent ID that created this version |
mutatedByAgents[] |
Agents that changed it since the last version |
mutationReason |
Natural language explanation of what changed |
timestamp |
Creation/modification datetime |
π Example Blueprint Version Block¶
"versioning": {
"version": "v2.1",
"status": "validated",
"createdByAgent": "MicroserviceGeneratorAgent",
"mutatedByAgents": ["SecurityAgent", "TestGeneratorAgent"],
"mutationReason": "Added scoped role enforcement and new test scenarios",
"timestamp": "2025-06-08T11:32:00Z"
}
π Changelog Format¶
Blueprint changelogs are structured, diffable, and consumable by both humans and agents:
- version: v2.0
changedBy: SecurityAgent
change: "Introduced RBAC on endpoint PATCH /referrals/{id}/status"
timestamp: 2025-05-30
- version: v2.1
changedBy: TestGeneratorAgent
change: "Added tests for access violation scenarios"
timestamp: 2025-06-01
π§ Used By Factory For:¶
| Use Case | Factory Mechanism |
|---|---|
| π Agent Retry/Regeneration | Uses latest stable or fallback blueprint version |
| π§ͺ Scenario Audit Trail | Tracks which blueprint version test cases were generated from |
| 𧬠Diff Analysis | Enables BlueprintDiffAgent to assess structural change impact |
| π§ Semantic Search Time-Slicing | Allows filtering by blueprint version in memory graph |
| π οΈ DevOps Pipeline Checks | Ensures only validated versions go into CD pipelines |
π Files Generated¶
| File | Description |
|---|---|
microservice-blueprint.v1.md |
First version |
microservice-blueprint.v2.json |
Later version in machine-readable format |
changelog.yaml |
Mutation history with timestamps and diffs |
ποΈ A blueprint is a versioned software artifact, with mutation lineage, traceable intent, and rollback capability β enabling safe evolution inside the Factory.
π§ CLI Template Mapping and Code Injection Points¶
Each Service Blueprint defines the mapping between blueprint content and the microservice CLI template used to generate the implementation β including the code structure, injection points, extension hooks, and feature toggles.
This enables automated, deterministic code generation, aligned to Clean Architecture, from the blueprint specification.
π οΈ CLI Template Specification¶
| Section | Description |
|---|---|
templateId |
Name of the CLI template (e.g., connectsoft.microservice) |
templateVersion |
Resolved NuGet package version or Git commit |
customizations |
Parameters to override default behavior (e.g., --includeHangfire) |
featureSwitches[] |
Toggles for optional modules (e.g., caching, localization, auth) |
targetPath |
Destination directory in source repository |
π Example CLI Mapping Block¶
"cliTemplate": {
"templateId": "connectsoft.microservice",
"templateVersion": "2.3.0",
"customizations": {
"domain": "Referrals",
"includeHangfire": true,
"useGrpc": false
},
"featureSwitches": ["audit", "massTransit", "openTelemetry"],
"targetPath": "services/ReferralService"
}
π½ Code Injection Points¶
| Injection Point | Derived From Blueprint Section |
|---|---|
Domain/Aggregates.cs |
entities and aggregates |
Api/Controllers/*.cs |
api.rest |
Messaging/Consumers.cs |
events.subscribes |
Messaging/Producers.cs |
events.publishes |
Security/Policies.cs |
security.accessRoles |
Health/StartupChecks.cs |
runtime.healthChecks |
Observability/Metrics.cs |
observability.metrics |
π§ Used By Factory Agents To:¶
| Agent | Role |
|---|---|
Microservice Generator Agent |
Invokes CLI with resolved parameters |
Orchestration Agent |
Determines service paths and template registration |
Pipeline Agent |
Integrates template scaffolding with CI/CD and lint steps |
Test Generator Agent |
Maps generated endpoints to test paths automatically |
π§© Template Extensibility Rules¶
- π¦ Blueprints define extensions using reserved
x-*fields (e.g.,x-internalRoutes) - π§ Agents can plug in post-processors to append logic to injected files
- 𧬠Supports deterministic diffing for round-trip blueprint updates
π§ CLI templates turn abstract blueprints into fully scaffolded codebases β clean, modular, testable, and aligned with Factory principles.
ποΈ Repository & DevOps Integration Metadata¶
Each Service Blueprint defines the source control, branching, DevOps automation, and artifact lineage associated with the service. This metadata connects the generated microservice to the broader CI/CD pipelines, Git strategy, and deployment orchestration of the Factory.
π Repository Structure¶
| Attribute | Description |
|---|---|
repositoryType |
mono-repo, multi-repo, or hybrid |
repoName |
Azure DevOps or GitHub repo name (e.g., ReferralService) |
pathInRepo |
Directory inside repo where service resides |
defaultBranch |
Usually main, develop, or environment-specific |
featureBranchPattern |
Naming convention for scoped changes (e.g., feature/{featureId}) |
π Example Git & DevOps Block¶
"devOps": {
"repositoryType": "multi-repo",
"repoName": "ReferralService",
"pathInRepo": "/",
"defaultBranch": "main",
"featureBranchPattern": "feature/{featureId}",
"pipelines": {
"ci": "ci-referral-service.yml",
"cd": "cd-referral-service.yml"
},
"artifactId": "ReferralService:2025.06.08.01"
}
π DevOps Metadata¶
| Component | Purpose |
|---|---|
ciPipeline |
Code build, lint, test, publish |
cdPipeline |
Deploy to environments (QA, staging, prod) |
buildTags |
Auto-tag image versions and traceable artifact IDs |
secretsRefs |
Links to Azure Key Vault or config sources |
envMatrix |
Environment-specific configurations (scopes, URLs) |
π§ Used By Factory For:¶
| Agent | Role |
|---|---|
Orchestration Agent |
Initializes Git repo, structure, permissions |
Pipeline Agent |
Generates YAML pipeline scripts for CI/CD |
Release Manager Agent |
Tracks artifact status, rollout phases, and pipeline health |
Security Agent |
Scans repo policies and secret injection patterns |
π Artifacts Stored¶
| Artifact Name | Description |
|---|---|
ci-pipeline.yml |
CI workflow template for the service |
cd-pipeline.yml |
CD deployment steps |
.azure-pipelines.yaml |
If mono-repo, reusable pipeline reference |
service-metadata.json |
Blueprint β Repo β Artifact trace specification |
deployment-badge.svg |
CI/CD status badge for dashboards |
π GitOps Compliance¶
All blueprint-defined metadata supports:
- π¦ Declarative repository provisioning
- π Git-based review + versioning of infrastructure
- π¦ Promotion workflows with approval gates
- π§ Event-sourced CI/CD triggers across Factory agents
ποΈ The Service Blueprint is not just a design document β itβs a DevOps contract, governing how the service is created, shipped, deployed, and traced in real time.
π Documentation Structure and Developer Experience¶
Every Service Blueprint includes structured documentation metadata to ensure that the developer experience (DX) is streamlined, consistent, and immediately useful. This section defines the developer-facing artifacts, how they're generated, and how they evolve with the service.
π§Ύ Documentation Components¶
| Section | Purpose |
|---|---|
| π§ Overview | What the service does, why it exists, who owns it |
| π‘ APIs & Events | REST/gRPC interfaces, published/subscribed events |
| π§± Domain Model | Entities, aggregates, and their relationships |
| π§ͺ Test Scenarios | Documented QA behavior, BDD examples, edge cases |
| π Security Model | Role-based access, auth flows, audit rules |
| π Observability Insights | Key metrics, traces, log patterns, alerting conditions |
| π Deployment Notes | Runtime profiles, health checks, readiness contracts |
| π€ Factory Lineage | Which agents contributed, trace IDs, links to upstream blueprints |
π Blueprint-Generated Docs¶
Each blueprint produces developer-facing markdown in the serviceβs docs/ folder:
services/
ReferralService/
docs/
index.md
api.md
events.md
domain-model.md
observability.md
scenarios.md
deployment.md
These are populated by:
π§ Microservice Generator Agentβ Overview, domain, endpointsπ Observability Agentβ metrics, alerts, logsπ§ͺ Test Generator Agentβ feature/test scenario mappingsπ Security Agentβ RBAC, roles, policiesπ Documentation Agentβ indexes, menus, badges
π§ Developer Portals & MKDocs Integration¶
| Channel | Usage |
|---|---|
MKDocs |
Blueprint docs compiled into live site for engineers |
Azure DevOps Wiki |
Synchronized copies with release notes and change logs |
Studio Mode |
Preview docs in Factory Studio UI |
Semantic Search |
Developer queries against vectorized documentation |
π¦ Artifacts Produced¶
| File | Description |
|---|---|
docs/index.md |
Blueprint summary |
docs/api.md |
Endpoints, input/output contracts |
docs/events.md |
Event schemas and flows |
docs/domain-model.md |
Aggregates and behavior |
docs/scenarios.md |
ScenarioβTest coverage and trace links |
docs/deployment.md |
Health checks, limits, readiness probes |
docs/badges.md |
CI/CD status, blueprint quality, coverage levels |
π§ DX Enhancements¶
| Feature | Blueprint Impact |
|---|---|
π§ Prompt-based support |
Agents answer questions using embedded blueprint docs |
π§© Jump-to-code links |
From doc β file or line in generated repo |
π΅οΈ Auditability |
Each section trace-linked to agent action |
π§ͺ Feedback capture |
Docs include improve/flag scenario links |
π Every service in the Factory is born with docs β machine-authored, memory-linked, developer-grade knowledge portals.
π Tags, Quality Score, and Catalog Integration¶
Each Service Blueprint in the AI Software Factory is enriched with metadata and quality annotations that allow the system to index, evaluate, filter, and reuse microservices effectively β powering the Factory's Blueprint Catalog, quality assurance, and evolution strategies.
π·οΈ Metadata Tags¶
These tags enable semantic classification, discoverability, and agent-based filtering:
| Tag Type | Examples |
|---|---|
domainContext |
Referrals, Billing, Notifications |
serviceType |
Write, ReadModel, SyncAdapter, EventProcessor |
integrationPoints |
Twilio, Braze, Stripe, Segment |
communicationMode |
REST, gRPC, EventOnly |
ownerTeam |
TeamHealth, TeamGrowth |
capabilities |
Idempotent, Retryable, Secure, Multitenant |
π Quality Score (Factory Evaluation)¶
Each Service Blueprint is automatically scored by a BlueprintQualityEvaluatorAgent using structured heuristics:
| Category | Description | Weight |
|---|---|---|
| π¦ Coverage | Features, endpoints, events covered | 30% |
| π Traceability | Links to upstream blueprints and test coverage | 20% |
| π§ͺ Testability | Scenario mapping and validation contracts | 20% |
| π Observability | Metrics, logs, traces, health declarations | 10% |
| π Security Clarity | Role-based model, scopes, threat detection hints | 10% |
| π Documentation | Docs completeness and navigability | 10% |
The score is stored and displayed with π’ Green / π‘ Yellow / π΄ Red visual indicators.
π Example Blueprint Catalog Entry¶
{
"blueprintId": "ReferralService",
"tags": ["Referrals", "Write", "REST", "Retryable", "TeamHealth"],
"qualityScore": 87,
"status": "validated",
"version": "v2.1",
"linkedFeatures": ["SubmitReferral", "CancelReferral"],
"observability": {
"traces": true,
"metrics": true,
"logs": true
}
}
π§ Used By:¶
| Component / Agent | Purpose |
|---|---|
BlueprintCatalog UI |
Allows search, filter, preview of service blueprints |
Orchestration Agent |
Selects matching blueprints by capability or domain |
Audit & QA Agent |
Flags low-scoring blueprints for improvement |
Developer Studio |
Shows badges, scores, and agent contributions visually |
π§© Badging & Visuals¶
Blueprints render with:
- π Name, domain, version
- π― Feature coverage count
- π’/π‘/π΄ Quality ring with hover details
- π·οΈ Semantic tags (clickable in catalog)
- π§ Agent lineage (creator/modifiers)
π Metadata is not decoration β it is the foundation of intelligence and reuse in a platform where 3000+ microservices must remain searchable, composable, and verifiable.
β Final Summary Table & Consolidated Overview¶
The table below consolidates the core elements of the Service Blueprint, enabling downstream agents, human engineers, and validation tools to quickly understand, evaluate, and act on the blueprint as a single, authoritative artifact.
This summary can be rendered at the end of the blueprint file (microservice-blueprint.md) and indexed in memory for analytics and factory dashboards.
π Service Blueprint Summary¶
| Property | Value / Description |
|---|---|
| π Service ID | ReferralService (example) |
| π¦ Domain Context | Referrals |
| π― Business Responsibility | Manage clinic referrals and status transitions |
| 𧬠Aggregates Owned | Referral, ReferralStatus, Clinic |
| π Interfaces | REST endpoints, publishes ReferralSubmittedEvent |
| π οΈ Template Used | connectsoft.microservice v2.3.0 |
| π Repo Location | services/ReferralService |
| π CI/CD Pipelines | ci-referral-service.yml, cd-referral-service.yml |
| π§ͺ Test Scenarios | 6 total (positive, negative, security) |
| π Observability | Traces, metrics, logs, health checks configured |
| π Security Model | Role-based access, tenant-scoped endpoints |
| π§ Created by Agent | Microservice Generator Agent |
| π Blueprint Version | v2.1 β status: validated |
| π§Ύ Generated Artifacts | .csproj, .cs, .json, .md, .feature, .yaml |
| π§ Stored In Memory Graph | Vector DB, TraceIndex, Blob, Catalog |
| π Tags | Write, Referrals, Retryable, Secure, TeamHealth |
| π’ Quality Score | 87/100 β Green |
| π Related Blueprints | Vision: vision-blueprint.md, Product: agentic-saas-product-blueprint.md |
π§ Final Thought¶
The Service Blueprint is the semantic heart of a microservice in the Factory β not just a description, but a living contract that shapes infrastructure, code, testing, and knowledge across generations.
It ensures every service is:
- Memory-indexed
- Trace-linked
- Test-covered
- Security-scoped
- Agent-generated
- Cataloged & versioned
β
β Blueprint Ready for generation, review, test, and deployment in the ConnectSoft AI Software Factory.