π Blueprints in the AI Software Factory¶
π§© Overview of Blueprints¶
π§© What Is a Blueprint?¶
In the ConnectSoft AI Software Factory, a blueprint is a structured, declarative plan that guides intelligent agents in generating, validating, and delivering autonomous software components. It is more than configuration β it is an execution contract between planning agents and generation agents.
π Why Blueprints Matter¶
Most code generation tools stop at producing a file. In contrast, the AI Software Factory uses blueprints to:
- Orchestrate modular service generation across microservices, infrastructure, tests, and UI.
- Ensure traceability of every action with metadata like
traceId,blueprintId,agentId. - Link agent decisions to outcomes, enabling retries, auditing, and debugging.
- Structure multi-agent collaboration by defining shared inputs and validated outputs.
π§ Key Properties of a Blueprint¶
| Property | Description |
|---|---|
| Declarative | Describes intent and structure, not implementation |
| AI-Readable | Used by semantic agents and planners as structured input |
| Composable | Can embed or reference DSLs (Domain-Specific Language fragments) |
| Traceable | Every blueprint is tied to execution metadata (e.g., traceId, version) |
| Versioned | Stored as versioned files in memory and Git-compatible formats |
| Reusable | Indexed and semantically linked across services and tenants |
π How Blueprints Fit Into the Factory Flow¶
flowchart TD
Idea["π‘ Prompt / Feature Request"]
VBP["π§© Vision Blueprint"]
SBP["π§© Service Blueprint"]
MBP["π§© Module Blueprint"]
ART["π οΈ Artifacts: Code, Tests, Infra, Docs"]
Idea --> VBP
VBP --> SBP
SBP --> MBP
MBP --> ART
This diagram represents the flow from idea to execution. Each blueprint refines the previous one and adds structure until artifacts are fully generated.
ποΈ Blueprint vs DSL vs Artifact¶
| Layer | Role | Example |
|---|---|---|
| DSL | Atomic building block | AppointmentBookedEvent, UserEntity |
| Blueprint | Composite plan for generation | booking-service-blueprint.yaml |
| Artifact | Output from agent execution | .cs, .bicep, .feature, .md |
π Blueprints compose DSLs and produce artifacts.
ποΈ Format and Structure¶
Blueprints are typically stored as structured YAML files with consistent fields:
blueprintId: booking-service-v1
type: Service
traceId: 2b3471f9
version: 1.0.0
dsl:
- ref: dsls/entities/Appointment.yaml
- ref: dsls/events/AppointmentBooked.yaml
outputs:
- service: BookingService
handlers:
- BookAppointmentCommand
π§ Who Produces Blueprints?¶
Blueprints are emitted or consumed by agents during generation orchestration:
| Agent Type | Blueprint Roles |
|---|---|
| Vision Architect Agent | Produces VisionBlueprint |
| Product Manager Agent | Produces ServiceBlueprint |
| DevOps Agent | Produces PipelineBlueprint |
| QA Agent | Consumes ServiceBlueprint and produces TestBlueprint |
Each blueprint is traceable to its originating agent and skill.
β Summary¶
- Blueprints are central knowledge artifacts in the AI Software Factory.
- They serve as structured contracts between idea and implementation.
- DSLs are reusable fragments used inside or referenced by blueprints.
- Blueprints drive the generation of real artifacts through orchestrated agents.
π§© DSL vs Blueprint vs Artifact¶
In the AI Software Factory, it's essential to clearly distinguish between:
- DSLs (Domain-Specific Languages): fine-grained declarative building blocks
- Blueprints: structured, traceable plans that orchestrate generation
- Artifacts: tangible outputs like code files, diagrams, tests, and pipelines
π£ 1. What Is a DSL?¶
A DSL is a small, focused language designed to represent a narrow concept in a reusable, composable way.
| Characteristic | Description |
|---|---|
| Atomic | Represents a single concern (e.g., Entity, Event, Scope) |
| Reusable | Can be referenced across multiple blueprints |
| Validatable | Has a schema, supports linting and safety checks |
| Versioned | Stored as *.yaml or *.dsl.yaml, often in dsls/ folder |
π§Ύ Example: EventDSL¶
type: Event
name: AppointmentBooked
source: BookingService
payload:
- field: appointmentId
type: Guid
- field: time
type: DateTime
π§© 2. What Is a Blueprint?¶
A blueprint is a composite, structured contract that defines how agents will generate or validate part of the system. Blueprints typically:
- Reference or embed multiple DSLs
- Define orchestration metadata (
blueprintId,traceId) - Serve as inputs/outputs for agent workflows
- Govern generation behavior, not just description
π§Ύ Example: Blueprint referencing DSLs¶
blueprintId: booking-service
type: Service
version: 1.0.0
agent: ProductManager
traceId: abc-123
dsl:
- ref: dsls/entities/Appointment.yaml
- ref: dsls/events/AppointmentBooked.yaml
outputs:
- project: BookingService
handlers:
- name: BookAppointmentHandler
π οΈ 3. What Is an Artifact?¶
An artifact is the final output emitted by a code-generation agent or orchestration pipeline. It can be:
| Artifact Type | Format | Examples |
|---|---|---|
| Code | .cs, .ts, .py |
BookAppointmentHandler.cs |
| Test | .feature, .spec.ts |
appointment-booking.feature |
| Infrastructure | .bicep, .tf, .yaml |
queue-provisioning.bicep |
| Documentation | .md, .svg, .png |
HowItWorks.md, architecture.svg |
| Configuration | .json, .env, .yaml |
pipeline.config.yaml |
These artifacts are always traceable back to the blueprint and DSLs used to generate them.
π 4. DSL vs Blueprint vs Artifact: Side-by-Side Table¶
| Category | DSL | Blueprint | Artifact |
|---|---|---|---|
| Role | Declarative fragment | Structured generation contract | Tangible result |
| Format | *.dsl.yaml or inline YAML |
*.blueprint.yaml |
.cs, .bicep, .md, etc. |
| Ownership | Domain architects, platform agents | Orchestration and planning agents | Generation agents |
| Versioning | Independent, reusable | Project/module scoped | Git-based or published pipeline |
| Stored In | DSL registry (Git/blob/memory) | Blueprint registry (Git/blob/memory) | Artifact repo or output storage |
| Used By | Multiple blueprints | Consumed by agents during execution | Used by DevOps, runtime systems |
| Example | UserEntity, AppointmentEvent |
booking-service-blueprint.yaml |
BookingService.cs, bicep.yaml |
π§ 5. Blueprint as an Execution Contract¶
Agents treat a blueprint as a contract between planning and execution:
- Input to the generation pipeline
- Output of Vision, Product, Architect agents
- Consumed by Engineering, QA, DevOps agents
flowchart LR
subgraph Inputs
A[π Prompt]
B[π§Ύ DSLs]
end
subgraph Blueprint
C[π§© booking-service-blueprint.yaml]
end
subgraph Outputs
D[π οΈ BookAppointmentHandler.cs]
E[π booking.feature]
F[π§ provisioning.bicep]
end
A --> C
B --> C
C --> D
C --> E
C --> F
β Summary¶
- DSLs are reusable fragments defining atomic elements like entities or events.
- Blueprints are structured plans that compose DSLs and control agent generation.
- Artifacts are the end products generated from a blueprint via agent orchestration.
Blueprints are the intelligent bridge between structured domain knowledge and working, observable software.
π§© Blueprint Lifecycle Overview¶
The blueprint lifecycle defines how blueprints are created, validated, versioned, used by agents, and evolved over time in the AI Software Factory. Each blueprint is not just a static file β it's a living, traceable, versioned object at the heart of generation orchestration.
π 1. Blueprint Lifecycle Phases¶
| Phase | Description |
|---|---|
| Created | Initial generation from Vision, Product, or Architect agents |
| Validated | Checked against schemas, DSLs, references, and required fields |
| Indexed | Embedded semantically and stored in memory/registry for reuse |
| Consumed | Used by downstream generation agents (e.g., Engineering, QA, DevOps) |
| Versioned | Tagged, updated, and optionally frozen for reproducibility |
| Regenerated | Modified in response to feedback, failed validation, or scope changes |
| Archived | Older versions retained for traceability or replay |
π§ 2. Lifecycle Events¶
Blueprints emit system events at key stages:
| Event Type | Emitted By | Purpose |
|---|---|---|
BlueprintCreated |
Vision/Product Agent | A new blueprint has been generated |
BlueprintValidated |
Validator Agent/Skill | All structural and reference checks passed |
BlueprintUsed |
Generation Agent | A blueprint has triggered artifact generation |
BlueprintVersioned |
Orchestrator/DevOps | A blueprint version is tagged and locked |
BlueprintInvalid |
Validator Agent/Skill | A validation failure occurred |
BlueprintUpdated |
Feedback Loop Agent | A newer revision was produced |
BlueprintArchived |
Blueprint Lifecycle Agent | Blueprint no longer active but retained for trace |
Each event carries full trace metadata: traceId, blueprintId, agentId, runId, timestamp.
π¦ 3. Storage and Representation¶
Blueprints are persisted in the following places:
| Layer | Storage Format | Purpose |
|---|---|---|
| Git Repo | *.blueprint.yaml |
Auditable, version-controlled |
| Blob Storage | Structured YAML/JSON | Large-scale raw storage |
| Vector DB | Embedded text/vector | Semantic search and similarity |
| Execution Memory | Indexed object metadata | Runtime state and cross-agent access |
π All blueprints are traceable to their originating prompt, agent, and artifacts.
π 4. Blueprint Lifecycle Diagram¶
flowchart TD
A[π§ Prompt or Requirement]
B[π§© Blueprint Created]
C[βοΈ Blueprint Validated]
D[π Blueprint Indexed]
E[π§ Agent Consumes]
F[π οΈ Artifacts Generated]
G[π Blueprint Versioned]
H[β»οΈ Blueprint Updated or Regenerated]
I[π¦ Blueprint Archived]
A --> B --> C --> D --> E --> F --> G
G --> H --> C
G --> I
π§ 5. Regeneration Scenarios¶
Blueprints may be automatically or manually updated when:
- β Validation fails (e.g., missing DSL, invalid DSL version)
- π Scope expands (e.g., new feature added)
- π§ͺ Tests fail and require new flows
- π Feedback loop suggests improved DSL coverage or structure
Agents like the Feedback Handler, Regression Tracker, or Blueprint Refiner are responsible for initiating these updates.
π§ 6. Agent Roles in the Lifecycle¶
| Agent | Lifecycle Action |
|---|---|
| Vision Architect Agent | Emits initial VisionBlueprint |
| Product Manager Agent | Emits and links ServiceBlueprint |
| Validator Agent | Performs validation, emits events |
| DevOps Agent | Tags, versions, and stores blueprint |
| QA Agent | Consumes TestBlueprint |
| Documentation Agent | Uses blueprint metadata for docs |
| Feedback Loop Agent | Regenerates or evolves blueprint |
All steps are coordinated through the Event Mesh, ensuring decoupled yet traceable interactions.
β Summary¶
- Every blueprint follows a structured lifecycle β from creation to consumption and evolution.
- Lifecycle events are emitted at every step for observability and traceability.
- Multiple agents participate in the lifecycle, both as producers and consumers.
- Regeneration and versioning are core to enabling adaptive, iterative generation.
π§© Traceability and Metadata¶
Blueprints are not just generation plans β they are traceable, semantically indexed, and observable objects that encode provenance, purpose, and usage context throughout the AI Software Factory.
π°οΈ 1. Why Traceability Matters¶
Every blueprint must answer:
- π§ Who generated it? (Agent identity, skill name)
- π§ Why was it generated? (Prompt, feature, requirement)
- π Where is it used? (Linked microservices, pipelines, test cases)
- π What version? (Hash, timestamp, tags)
- π§Ύ What artifacts resulted from it?
This traceability ensures:
| Benefit | Outcome |
|---|---|
| Debuggability | Trace bugs back to blueprint origin |
| Compliance & Auditing | Show why a change was made, by whom, and from what spec |
| Regeneration triggers | Change in DSL/requirement auto-updates blueprints |
| Semantic reuse | Discover similar blueprints via vector search |
𧬠2. Core Metadata Fields¶
Every blueprint includes standard metadata fields in its header:
blueprintId: booking-service-v1
type: Service
agent: ProductManager
skill: GenerateServiceBlueprint
traceId: 9fae23ab-28a9-4cf2-a4ed-a839fa8e4cb1
runId: 20240601-BookingFlow
version: 1.2.0
status: Validated
createdAt: 2024-06-01T13:42:00Z
updatedAt: 2024-06-01T14:17:22Z
| Field | Purpose |
|---|---|
blueprintId |
Unique identifier for this blueprint instance |
type |
Category: Vision, Service, Test, etc. |
agent |
Name of the emitting agent persona |
skill |
The specific skill/prompt/function that generated it |
traceId |
Trace context for tracking across all downstream actions |
runId |
Factory execution ID (batch or orchestrated run) |
version |
SemVer-compatible version |
status |
Enum: Draft, Validated, Used, Invalid, Archived |
createdAt |
UTC timestamp of creation |
updatedAt |
UTC timestamp of last modification |
π 3. DSL and Artifact References¶
Blueprints maintain direct references to both inputs and outputs:
dsl:
- ref: dsls/entities/Appointment.yaml
- ref: dsls/events/AppointmentBooked.yaml
artifacts:
- ref: artifacts/services/BookingService.cs
- ref: artifacts/bicep/booking-queue.bicep
- ref: artifacts/tests/booking.feature
These references support:
- π Artifact regeneration on DSL change
- π§ Full
Prompt β DSL β Blueprint β Artifactlineage - π Smart diffing and version navigation
π§ 4. Semantic Embedding and Memory Indexing¶
Every blueprint is embedded into the factoryβs vector-based memory graph:
| Memory Layer | Whatβs Stored | Purpose |
|---|---|---|
| Short-Term Memory | Contextual use during current run | Prompt-to-agent-to-output linkage |
| Long-Term Memory | Embedded semantic vectors | Similarity, reuse, memory recall |
| Persistent Memory | Versioned YAML and metadata | Audit, rollback, archiving |
Blueprint trace IDs are also linked to events, logs, prompts, test results, and documentation.
π‘ 5. Traceability Diagram¶
flowchart TD
P[π Prompt: "Add Booking Feature"]
D1[π§Ύ DSL: AppointmentBookedEvent]
D2[π§Ύ DSL: AppointmentEntity]
B[π§© booking-service-blueprint.yaml]
A1[π οΈ BookingService.cs]
A2[π booking.feature]
A3[π§ booking.bicep]
P --> B
D1 --> B
D2 --> B
B --> A1
B --> A2
B --> A3
π§· 6. Events and Trace Hooks¶
Blueprints inject trace data into the observability layer via:
traceIdpropagation into:- Logs (
LogContext.TraceId) - Events (
EventGrid.Metadata) - Test spans (
OpenTelemetry.SpanId)
- Logs (
- Event mesh metadata headers:
X-Blueprint-IdX-Agent-NameX-DSL-Hash
This allows for full-stack traceability across platform telemetry.
β Summary¶
- Every blueprint is tagged, versioned, and traceable across the factory.
- DSLs and artifacts are explicitly linked for auditing and regeneration.
- Trace IDs connect blueprints to events, logs, test runs, and final outputs.
- Semantic memory enables intelligent reuse and similarity-based navigation.
π§© Blueprint Memory Indexing and Retrieval¶
Every blueprint generated within the AI Software Factory is embedded and indexed in multiple memory layers β enabling retrieval, reuse, regeneration, and similarity-based orchestration.
This memory system ensures that blueprints aren't lost or static β they are continuously discoverable, learnable, and updatable based on historical traces.
π§ 1. Multi-Layer Memory Model¶
Blueprints are indexed in three coordinated memory layers:
| Memory Layer | Scope | Storage | Purpose |
|---|---|---|---|
| Short-Term | Current agent run | In-context memory | Used to resolve prompts & generate output |
| Long-Term | Cross-agent semantic graph | Vector DB (e.g., Azure Cognitive Search, Redis, Qdrant) | Recall similar blueprints or DSLs |
| Persistent | Immutable file/archive | Blob storage + Git-compatible YAML | Versioned audit log, replay, governance |
π 2. Semantic Embedding of Blueprints¶
Each blueprint is semantically embedded into vector memory using a transformer model (e.g., text-embedding-3-large or openai/azure-embedding) with fields like:
title,purpose,dsl.refs,outputs.project,agent,traceId, andartifact paths
These embeddings power:
- π Reuse detection ("Find similar service blueprint")
- 𧬠Merge suggestions ("Combine two booking flows")
- π Memory-driven prompting ("You already built a similar test for 'UserRegistered'")
π§ 3. Blueprint Retrieval Interfaces¶
| Interface Type | Purpose | Used By |
|---|---|---|
MemorySkill.SearchBlueprints(query) |
Semantic similarity query | Planner, Vision, Refiner Agents |
BlueprintMemory.GetById(blueprintId) |
Exact blueprint fetch | Generator and DevOps Agents |
MemorySkill.ListByTag(tag: Booking) |
Return all tagged blueprints | Studio UI, AutoDocs Agent |
BlueprintHistory.FindByTrace(traceId) |
Find all versions linked to a trace run | Validator, QA Agent |
π 4. Example: Vectorized Blueprint¶
{
"blueprintId": "booking-service-v1",
"type": "Service",
"agent": "ProductManager",
"dsl.refs": [
"dsls/entities/Appointment.yaml",
"dsls/events/AppointmentBooked.yaml"
],
"embedding": [0.013, -0.144, 0.251, ...]
}
This record is stored in a vector index alongside other structured fields.
πΈοΈ 5. Blueprint Memory Graph¶
Each blueprint is also linked into a traceable memory graph for reasoning and planning:
graph TD
Prompt["π§ Prompt: Add Booking Flow"]
VisionBP["π§© Vision Blueprint"]
ServiceBP["π§© Service Blueprint"]
TestBP["π§© Test Blueprint"]
Artifact1["π booking.feature"]
Artifact2["π οΈ BookAppointmentHandler.cs"]
Prompt --> VisionBP --> ServiceBP --> TestBP
TestBP --> Artifact1
ServiceBP --> Artifact2
This enables contextual reasoning for agents like:
- π§ͺ "Did we test all flows from the booking blueprint?"
- π "Which blueprints were affected when Appointment DSL changed?"
- π§ "Have we built something like this before?"
π 6. Memory-Driven Blueprint Reuse¶
Agents can auto-suggest or copy patterns from similar blueprints:
βYouβve already built a blueprint for
PrescriptionService. Do you want to reuse its event structure forReminderService?β
This mechanism makes the factory progressively smarter over time.
β Summary¶
- Blueprints are indexed in multi-layer memory for intelligent retrieval and orchestration.
- Semantic vectors enable fuzzy matching, reuse, and similarity detection.
- The memory system is fully trace-linked, powering traceability and observability.
- Retrieval is available via agents, orchestration flows, and Studio UI.
π§© Agents That Use and Produce Blueprints¶
In the AI Software Factory, blueprints are the core shared language between intelligent agents. They are:
- π οΈ Produced by upstream planning agents (vision, product, architecture)
- π₯ Consumed by downstream generation agents (engineering, QA, DevOps, documentation)
- π Refined by agents in the feedback loop (test, runtime, observability)
π§ 1. Blueprint as the Core Artifact Exchange Format¶
Instead of relying on plain prompts or raw YAML snippets, ConnectSoft agents collaborate through structured, versioned blueprints.
Blueprints encapsulate:
- DSL references (semantic)
- Purpose and traceability
- Input/output expectations
- Agent/system context
- Memory hooks and trace metadata
π€ 2. Which Agents Produce Blueprints?¶
| Agent Type | Blueprint Types Produced |
|---|---|
| Vision Architect Agent | VisionBlueprint (modules, personas, flows) |
| Product Manager Agent | ServiceBlueprint, EntityBlueprint |
| Enterprise Architect | InfrastructureBlueprint, SecurityBlueprint |
| QA Engineer Agent | TestBlueprint (BDD, test matrix) |
| DevOps Agent | PipelineBlueprint, DeploymentBlueprint |
| Documentation Agent | DocumentationBlueprint from services/modules |
These agents emit BlueprintCreated events and store generated YAML files into memory, blob, or Git.
π 3. Which Agents Consume Blueprints?¶
| Agent Type | Blueprint Types Consumed |
|---|---|
| Software Engineer Agent | ServiceBlueprint, ModuleBlueprint |
| Test Automation Agent | TestBlueprint, ServiceBlueprint |
| Load & Performance Agent | TestBlueprint, InfraBlueprint |
| Resiliency & Chaos Agent | SecurityBlueprint, PipelineBlueprint |
| Feedback Loop Agent | All types (to refine or regenerate) |
| Code Reviewer Agent | Service blueprints to validate design vs code |
These consumers often emit:
BlueprintUsedBlueprintValidatedBlueprintUpdated
π 4. Agent-to-Agent Blueprint Flow¶
flowchart LR
Prompt["π Prompt"]
Vision["π§ Vision Architect Agent"]
Product["π Product Manager Agent"]
Architect["π§± Enterprise Architect Agent"]
QA["π§ͺ QA Engineer Agent"]
Engineer["π§βπ» Software Engineer Agent"]
DevOps["π DevOps Agent"]
Prompt --> Vision --> Product --> Architect --> Engineer
Product --> QA
Architect --> DevOps
- π€ Each stage emits a blueprint
- π₯ Downstream agents consume, validate, or evolve the blueprint
π 5. Multi-Agent Blueprint Collaboration Patterns¶
| Pattern | Description |
|---|---|
| Fan-out | One blueprint feeds multiple agents (ServiceBlueprint β Engineer + QA) |
| Cascade | Each blueprint evolves into the next (Vision β Service β Infra) |
| Feedback Loop | Agents suggest improvements or corrections (TestAgent β ProductManager) |
| Branch per Edition | Blueprints are forked and scoped to tenant or edition variants |
𧬠6. Agent-Blueprint Registry¶
All agent/blueprint interactions are logged to a registry for:
- π Studio inspection
- π Observability dashboards
- π Feedback loops and auto-repair
- π§ Meta-learning of agent effectiveness
Example registry row:
{
"agent": "ProductManager",
"blueprintId": "booking-service-v2",
"producedAt": "2024-06-01T14:42:00Z",
"traceId": "abc-123",
"status": "Validated"
}
β Summary¶
- Agents interact with each other through structured blueprints, not raw text.
- Every blueprint has a producing and consuming agent, creating a traceable chain.
- Blueprint creation, usage, and validation are observable and version-controlled.
- Collaboration flows are event-driven, decoupled, and semantically rich.
π§© Vision Blueprint¶
The Vision Blueprint is the foundational planning artifact produced by the Vision Architect Agent. It captures the high-level structure, purpose, and modular breakdown of the product or system to be generated.
This blueprint seeds the downstream generation of all other blueprints β service, test, infra, etc.
π§ 1. Purpose¶
The Vision Blueprint defines:
- π§ Product goals, business flows, and personas
- π§© System modularization into domains, services, and capabilities
- π§΅ Key event flows and integration boundaries
- π§ Semantic signals for AI agents (naming, scope, responsibility hints)
It answers the question:
βWhat should we build, for whom, and how should it be structured?β
𧬠2. Example Structure¶
blueprintId: vision-booking-system
type: Vision
agent: VisionArchitect
traceId: efd2a43b
version: 1.0.0
status: Validated
personas:
- name: PetOwner
goals:
- Book appointments
- Get reminders
- name: ClinicAdmin
goals:
- Manage scheduling
- Review patient history
modules:
- name: BookingService
purpose: Handle new appointment creation
events:
- emits: AppointmentBooked
- listensTo: UserRegistered
- name: ReminderService
purpose: Send notifications
events:
- emits: ReminderSent
- listensTo: AppointmentBooked
- name: UserService
purpose: Register and manage users
domain: VetClinic
businessGoal: Enable self-service appointment booking with reminders
π 3. DSLs Referenced or Embedded¶
| DSL Type | Purpose |
|---|---|
ModuleDSL |
Defines high-level service modules |
EventDSL |
Key events in the system (AppointmentBooked) |
PersonaDSL |
End-user goals, journeys, and actors |
Blueprints can either:
- Embed small DSL fragments directly
- Or reference them externally via
ref: dsls/...
π§ 4. Agent Usage¶
| Agent | Usage |
|---|---|
| Product Manager Agent | Uses module definitions to generate ServiceBlueprints |
| Enterprise Architect | Uses event flow to model infrastructure |
| QA Agent | Uses events and personas to generate test coverage |
| Feedback Loop Agent | Links test feedback to originating goals or modules |
π§ 5. Vision Blueprint Diagram¶
graph TD
VA[π― Vision Architect Agent]
VB[π§© Vision Blueprint]
PM[π Product Manager Agent]
EA[π§± Enterprise Architect Agent]
QA[π§ͺ QA Agent]
VA --> VB
VB --> PM
VB --> EA
VB --> QA
π 6. Evolution and Refinement¶
The Vision Blueprint may be refined when:
- π¬ Requirements change
- β¨ New modules are added
- π QA discovers missing scenarios
- π§ Similar blueprints are detected and merged
The updated blueprint emits BlueprintUpdated events, and downstream agents are re-triggered with new versioned inputs.
β Summary¶
- The Vision Blueprint defines the high-level intent and modular scope of the product.
- It contains personas, modules, and event flows that seed downstream generation.
- Itβs produced by the Vision Architect Agent and consumed by multiple downstream agents.
- It supports embedding or referencing DSLs for persona, module, and event design.
π§© Service Blueprint¶
The Service Blueprint defines the structure, responsibilities, and interaction surfaces of a specific microservice or backend module. It is produced by the Product Manager Agent, based on the upstream Vision Blueprint and DSL references.
This blueprint drives the generation of handler classes, commands, events, REST/gRPC APIs, contracts, and configuration layers.
π§ 1. Purpose¶
The Service Blueprint answers:
- π οΈ What is this service responsible for?
- π¬ What commands and events does it handle?
- π‘ What APIs does it expose?
- π§± What entities does it manage internally?
It guides the creation of production-grade, modular, agent-compatible services.
𧬠2. Example Structure¶
blueprintId: booking-service-v1
type: Service
agent: ProductManager
version: 1.0.0
traceId: svc-9fae23ab
dsl:
- ref: dsls/entities/Appointment.yaml
- ref: dsls/events/AppointmentBooked.yaml
- ref: dsls/commands/BookAppointment.yaml
responsibility: Handle all appointment scheduling
boundedContext: Scheduling
api:
- POST /appointments β BookAppointment
- GET /appointments/{id} β GetAppointment
handlers:
- BookAppointmentCommand β AppointmentBooked
- CancelAppointmentCommand β AppointmentCancelled
storage:
entity: Appointment
projections:
- UpcomingAppointments
- AppointmentsByUser
π 3. DSLs Referenced¶
| DSL Type | Description |
|---|---|
EntityDSL |
Defines aggregates like Appointment |
CommandDSL |
Incoming actions (e.g., BookAppointment) |
EventDSL |
Outgoing domain events |
ApiDSL |
REST or gRPC interface definition |
These DSLs allow the blueprint to remain lightweight while reusing validated domain logic.
π§ 4. Agent Usage¶
| Agent | Action |
|---|---|
| Software Engineer Agent | Generates actual service code (handlers, contracts, infra) |
| Test Automation Agent | Generates endpoint and command tests |
| DevOps Agent | Uses handler map to emit health checks, routes, policies |
| Documentation Agent | Produces API reference pages and architecture docs |
π 5. Collaboration Flow¶
graph TD
PM[π Product Manager Agent]
SB[π§© Service Blueprint]
ENG[π¨βπ» Software Engineer Agent]
QA[π§ͺ Test Agent]
DOC[π Doc Agent]
OPS[π DevOps Agent]
PM --> SB
SB --> ENG
SB --> QA
SB --> DOC
SB --> OPS
π§° 6. Output Examples (Generated Artifacts)¶
| Output Type | Filename |
|---|---|
| Command handler | BookAppointmentHandler.cs |
| Domain entity | Appointment.cs |
| Event class | AppointmentBooked.cs |
| API controller | AppointmentController.cs |
| Tests | appointment-booking.feature, AppointmentTests.cs |
| OpenAPI Spec | booking-api.yaml |
| Infrastructure | booking-service.bicep |
These artifacts inherit trace IDs and metadata from the blueprint for observability and traceability.
β Summary¶
- The Service Blueprint defines a complete backend service module.
- It references entities, commands, events, and APIs via DSLs.
- It orchestrates handler logic, API surface, projections, and tests.
- Itβs generated by the Product Manager Agent and consumed by Engineers, QA, Docs, and DevOps agents.
π§© Module Blueprint¶
The Module Blueprint defines a focused functional unit or adapter within a larger service or frontend application. It can represent:
- Internal components (e.g., logging module, email adapter)
- External integrations (e.g., Stripe adapter, Kafka publisher)
- UI feature modules (e.g., BookingCalendar UI component)
It is typically emitted by agents like the Software Engineer Agent, Frontend Developer Agent, or Platform Adapter Agent.
π§ 1. Purpose¶
Module Blueprints allow for:
- π§± Explicit modeling of reusable units inside a service or app
- π§© Composability and isolation of logic (e.g., auth, payments)
- π Reuse across services (e.g., NotificationModule)
- π§ͺ Targeted test generation and instrumentation
They serve as a fine-grained blueprint layer underneath or alongside Service Blueprints.
𧬠2. Example Structure¶
blueprintId: notification-module-v1
type: Module
agent: SoftwareEngineer
traceId: mod-41cf8b12
version: 1.0.1
dsl:
- ref: dsls/integration/SendGridAdapter.yaml
- ref: dsls/events/ReminderSent.yaml
purpose: Send email reminders for appointments
dependsOn:
- AuthModule
- EventBusClient
outputs:
- EmailSender.cs
- NotificationController.cs
- NotificationSent event
runtime:
language: C#
mode: background worker
retryPolicy: exponential backoff
π 3. DSLs Referenced¶
| DSL Type | Description |
|---|---|
AdapterDSL |
Defines integration boundary (e.g., SMTP) |
EventDSL |
Emitted or consumed events |
RetryPolicyDSL |
Describes reliability semantics |
UIComponentDSL |
For frontend modules (optional) |
π§ 4. Agent Usage¶
| Agent | Action |
|---|---|
| Software Engineer Agent | Implements internal module logic |
| Adapter Generator Agent | Produces external connector logic |
| Frontend Developer Agent | Maps to UI widgets, reactive components |
| QA Agent | Generates unit/integration tests for the module |
| Observability Agent | Injects tracing, metrics, logs into module template |
π§© 5. Relationship to Other Blueprints¶
| Relation | How it connects |
|---|---|
ServiceBlueprint |
A module is a unit within a service |
InfrastructureBlueprint |
May require config (e.g., email provider setup) |
TestBlueprint |
Used to define test boundaries for specific unit |
PipelineBlueprint |
Can be deployed independently (e.g., worker) |
π§ͺ 6. Example Outputs¶
| Output Artifact | File Name |
|---|---|
| Adapter Implementation | SendGridAdapter.cs |
| Handler or Worker | ReminderEmailWorker.cs |
| Event Contract | ReminderSent.cs |
| UI Component (if UI) | BookingCalendarComponent.tsx |
| Module Config | notification.module.config.yaml |
π§ 7. Blueprint Fan-out Diagram¶
graph TD
SB[π§© Service Blueprint]
MB1[π§© Notification Module]
MB2[π§© Auth Module]
MB3[π§© Retry Policy Module]
ENG[π¨βπ» Engineer Agent]
SB --> MB1
SB --> MB2
SB --> MB3
MB1 --> ENG
MB2 --> ENG
MB3 --> ENG
β Summary¶
- Module Blueprints define scoped, reusable, testable software units.
- They support both backend and frontend components (e.g., adapters, widgets).
- DSLs used include adapters, events, UI components, retry policies, etc.
- They are essential for micro-composability, reusability, and isolation within the factory.
π§© Test Blueprint¶
The Test Blueprint defines structured, agent-readable test plans for verifying the correctness, coverage, and resiliency of generated components. It is typically produced by the QA Engineer Agent, Test Automation Agent, or indirectly derived from Service and Module Blueprints.
It ensures that all business logic, contracts, and flows are validatable, observable, and traceable via generated test cases.
π§ 1. Purpose¶
The Test Blueprint answers:
- β What should we test?
- π§ͺ How should we test it?
- π― What are the acceptance criteria or edge cases?
- π What happens under load, failure, or retries?
It drives the generation of both automated tests and test monitoring hooks.
𧬠2. Example Structure¶
blueprintId: booking-service-tests-v1
type: Test
agent: QAEngineer
version: 1.0.0
traceId: test-93df8ea9
dsl:
- ref: dsls/events/AppointmentBooked.yaml
- ref: dsls/commands/BookAppointment.yaml
- ref: dsls/entities/Appointment.yaml
scenarios:
- title: Book appointment successfully
type: happy-path
steps:
- Given user is authenticated
- When user sends BookAppointment command
- Then AppointmentBooked event is emitted
- And appointment is persisted in DB
- title: Double-booking prevention
type: edge-case
steps:
- Given appointment already exists
- When another BookAppointment is sent
- Then a validation error is returned
- And no duplicate event is emitted
coverageMatrix:
- feature: Booking
commands: [BookAppointment]
events: [AppointmentBooked, AppointmentRejected]
testCases: [happy, invalid, concurrency, load]
testFormats:
- type: BDD
output: `appointment-booking.feature`
- type: Integration
output: `BookingFlowTests.cs`
π 3. DSLs Referenced¶
| DSL Type | Description |
|---|---|
CommandDSL |
Specifies what actions are being tested |
EventDSL |
Validates that correct outputs are emitted |
EntityDSL |
Used for setup, assertions, and projections |
ErrorDSL |
Maps expected exceptions or validation scenarios |
π§ 4. Agent Usage¶
| Agent | Action |
|---|---|
| Test Automation Agent | Generates BDD or integration test files |
| QA Engineer Agent | Asserts coverage and completeness |
| Load & Chaos Agents | Extend scenarios for performance or fault-injection |
| Code Reviewer Agent | Verifies that critical paths are covered |
π§© 5. Collaboration Example¶
flowchart TD
SB[π§© Service Blueprint]
TB[π§© Test Blueprint]
QA[π§ͺ QA Engineer Agent]
TA[π€ Test Automation Agent]
LPA[π₯ Load Test Agent]
SB --> TB
TB --> QA
TB --> TA
TB --> LPA
π§ͺ 6. Example Outputs¶
| Output Type | Filename |
|---|---|
| BDD Feature File | appointment-booking.feature |
| Integration Tests | AppointmentTests.cs |
| Test Runner Config | xunit.runner.json, jest.config.js |
| Load Test Plan | locust_booking_test.py |
| Resiliency Profile | booking-chaos-profile.yaml |
π 7. Coverage and Feedback Loops¶
Test Blueprints integrate with observability:
- Export test results as spans with trace ID
- Emit
BlueprintValidated,TestPassed, orTestFailedevents - Trigger blueprint regeneration on assertion or coverage gap
- Store feedback for next test planning cycle
β Summary¶
- Test Blueprints define structured, DSL-driven testing plans.
- They support BDD, integration, chaos, and performance testing.
- Generated from commands, events, and service responsibilities.
- They ensure factory outputs are verifiable, traceable, and auditable.
π§© Infrastructure Blueprint¶
The Infrastructure Blueprint defines the cloud-native, environment-specific resources and configurations required to support the deployment, communication, and operation of a service or system. It is produced by the Enterprise Architect Agent, and later consumed by DevOps, Security, and Resiliency Agents.
It ensures that infrastructure is declarative, reproducible, and event-aligned β and matches the design requirements in the Vision and Service Blueprints.
π§ 1. Purpose¶
The Infrastructure Blueprint answers:
- βοΈ What cloud resources are needed for this module or service?
- π What configurations and access rules must be enforced?
- π How do we wire event-driven components and messaging systems?
- ποΈ Which environments and deployment modes are supported?
It drives the generation of IaC templates, deployment configs, and environment-specific overlays.
𧬠2. Example Structure¶
blueprintId: infra-booking-service-v1
type: Infrastructure
agent: EnterpriseArchitect
version: 1.0.0
traceId: infra-23fe88c2
dsl:
- ref: dsls/queues/AppointmentQueue.yaml
- ref: dsls/secrets/SendGridKey.yaml
- ref: dsls/k8s/deployment-strategy.yaml
resources:
- type: Queue
name: appointment-queue
provider: AzureServiceBus
access: BookingService, ReminderService
- type: Secret
name: SENDGRID_API_KEY
scope: BookingService
rotate: true
- type: Deployment
target: Kubernetes
replicas: 3
autoscaling: enabled
strategy: rolling
probes:
- readiness: /healthz
- liveness: /healthz
environments:
- name: dev
suffix: -dev
replicas: 1
- name: prod
suffix: ""
replicas: 3
π 3. DSLs Referenced¶
| DSL Type | Purpose |
|---|---|
QueueDSL |
Defines event queues and routing |
SecretDSL |
Defines secrets, credentials, rotation rules |
K8sStrategyDSL |
Describes deployment strategy and autoscaling |
EnvDSL |
Captures environment-specific config |
π§ 4. Agent Usage¶
| Agent | Usage |
|---|---|
| DevOps Agent | Generates .bicep, .yaml, .tf, or arm.json |
| Security Agent | Validates secrets, scopes, RBAC policies |
| Observability Agent | Adds dashboards, logging volumes, metrics exporters |
| Resiliency Agent | Extends strategy with chaos injection & retry configs |
π§© 5. Cross-Blueprint Relationships¶
| Source Blueprint | Usage in Infra Blueprint |
|---|---|
ServiceBlueprint |
Defines service to provision for |
EventDSL |
Mapped to queue and topic definitions |
PipelineBlueprint |
Uses infra resources as targets and outputs |
SecurityBlueprint |
Validates that proper network and secret boundaries exist |
βοΈ 6. Sample Output Artifacts¶
| Type | File |
|---|---|
| Azure Bicep | booking-service.bicep |
| Kubernetes YAML | booking-deployment.yaml |
| Terraform | main.tf |
| Helm Chart | helm/booking-service/values.yaml |
| Secret Manager Config | sendgrid-key.config.json |
π‘ 7. Observability Integration¶
Infra Blueprints may include:
- Probes (
readiness,liveness) - Prometheus annotations
- Distributed tracing injectors
- Alert rule definitions
- Cost visibility tags
These are used by Observability and DevOps agents for dashboards and alerting.
β Summary¶
- Infrastructure Blueprints define all cloud-native resources needed for a service.
- They reference secrets, queues, deployment strategies, and environments via DSLs.
- They produce standardized IaC artifacts, Helm charts, and secrets configurations.
- They are consumed by DevOps, Security, and Observability agents for full-lifecycle support.
π§© Security Blueprint¶
The Security Blueprint defines the access controls, trust boundaries, scopes, secrets, and attack surfaces for a service or system. It is generated by the Enterprise Architect Agent or the Security Analyst Agent, based on inputs from Vision, Service, and Infra Blueprints.
It ensures that every blueprint-generated system follows Security-First design principles β with proactive controls, validations, and audits embedded by design.
π§ 1. Purpose¶
The Security Blueprint answers:
- π What data is sensitive?
- π§ What are the internal vs external boundaries?
- ποΈ What secrets or credentials are needed?
- π‘οΈ What authentication and authorization models are used?
- π What attack surfaces must be tested and monitored?
It drives security middleware, role definitions, token policies, and span-level observability.
𧬠2. Example Structure¶
blueprintId: security-booking-service-v1
type: Security
agent: SecurityAnalyst
version: 1.0.0
traceId: sec-71cbf13a
dsl:
- ref: dsls/secrets/SendGridKey.yaml
- ref: dsls/roles/User.yaml
- ref: dsls/trust-boundaries/booking.yaml
trustBoundaries:
- context: BookingService
type: internal
- context: AppointmentAPI
type: external
requires: AuthToken
authentication:
provider: OpenIddict
requiredScopes:
- booking:read
- booking:write
authorization:
policies:
- role: ClinicAdmin
access: full
- role: PetOwner
access: own-appointments
secrets:
- name: SENDGRID_API_KEY
usage: email-sending
rotation: monthly
owner: BookingService
attackSurfaces:
- path: /appointments
type: public-api
test: enabled
π 3. DSLs Referenced¶
| DSL Type | Description |
|---|---|
TrustBoundaryDSL |
Defines internal/external service boundaries |
SecretDSL |
Specifies usage and lifecycle of credentials |
RoleDSL |
Role-based permissions and mappings |
ScopeDSL |
OAuth2 scopes and token design |
π§ 4. Agent Usage¶
| Agent | Action |
|---|---|
| Code Generator Agent | Injects [Authorize] filters, policies, and scopes |
| DevOps Agent | Ensures secrets are wired and scoped to correct service only |
| Observability Agent | Adds security spans to tracing and logs |
| QA & Test Agent | Generates attack surface penetration tests |
| Documentation Agent | Emits public trust boundary diagrams |
π‘οΈ 5. Security Blueprint Diagrams¶
flowchart TD
A[π External Client]
B[π API Gateway]
C[π§ BookingService]
D[π OpenIddict]
E[π¦ Secret Store]
A -->|AuthToken| B --> C
C --> E
B --> D
This represents a trust boundary-aware path from a public request through secured service layers.
π 6. Compliance and Observability Integration¶
Security Blueprints automatically emit:
SecurityPolicyPublishedeventsSecurityViolationDetectedhooks (optional)Changelog.mdif policies change over time-
SpanTemplatesfor: -
unauthorized_access token_expiredinvalid_scope
β Summary¶
- Security Blueprints model trust boundaries, roles, scopes, secrets, and threats.
- They are generated from and reinforce Vision, Service, and Infra Blueprints.
- Outputs feed directly into middleware, policies, monitoring, and secrets wiring.
- They provide traceable, auditable security overlays for every agent-generated service.
π§© Pipeline Blueprint¶
The Pipeline Blueprint defines the end-to-end CI/CD automation, build strategy, and release workflows for a specific service, module, or entire product line. It is produced by the DevOps Agent, based on Service, Test, Infra, and Security Blueprints.
It ensures every component generated by the AI Factory is deployable, testable, and promotable via observable, idempotent pipelines.
π§ 1. Purpose¶
The Pipeline Blueprint answers:
- π§ͺ How do we test and validate this component automatically?
- π What is the deployment path per environment?
- π§© What are the pipeline stages, triggers, and conditions?
- π‘οΈ How do we integrate with secrets, approvals, and observability?
It drives YAML-based pipelines, Git hooks, and promotion flows across dev β staging β prod.
𧬠2. Example Structure¶
blueprintId: pipeline-booking-service-v1
type: Pipeline
agent: DevOpsAgent
version: 1.0.0
traceId: pipe-8f21cb77
dsl:
- ref: dsls/pipeline-steps/build-test.yaml
- ref: dsls/deployments/k8s-deploy.yaml
- ref: dsls/env/dev.yaml
- ref: dsls/env/prod.yaml
stages:
- name: build
runsOn: ubuntu-latest
steps:
- dotnet restore
- dotnet build
- dotnet test
- name: quality-gate
steps:
- sonar scan
- code coverage check
- name: deploy-dev
environment: dev
approvals: none
steps:
- helm upgrade
- run smoke tests
- name: deploy-prod
environment: prod
approvals:
- required: true
steps:
- helm upgrade --values=env/prod.yaml
- notify ops team
artifacts:
- build: `booking-service.zip`
- publish: `container registry + Helm chart`
π 3. DSLs Referenced¶
| DSL Type | Description |
|---|---|
PipelineStepDSL |
Defines individual reusable pipeline steps |
EnvironmentDSL |
Describes per-env differences |
DeploymentDSL |
Encapsulates platform-specific deploy logic |
ApprovalDSL |
Workflow gates and approvers (optional) |
π§ 4. Agent Usage¶
| Agent | Purpose |
|---|---|
| DevOps Agent | Generates azure-pipelines.yaml, GitHub Actions |
| QA/Test Agents | Inject test stages and coverage checks |
| Observability Agent | Adds logging, span IDs, dashboard hooks |
| Security Agent | Adds secrets, RBAC scopes, and approval workflows |
π οΈ 5. Sample Output Files¶
| Output Type | File Name |
|---|---|
| Azure Pipelines | azure-pipelines.yaml |
| GitHub Actions | .github/workflows/build.yaml |
| K8s Job YAML | job-booking-deploy.yaml |
| Helm Release Step | helm-release-step.yaml |
| Deployment Diagram | pipeline-flow.mmd |
π 6. Traceability and Observability Integration¶
Each stage emits events or metrics:
| Hook | Emitted To |
|---|---|
PipelineStarted |
Event Grid + Dashboard + Trace Store |
PipelineStepCompleted |
OpenTelemetry, traceId enriched logs |
PipelineFailed |
Notification mesh + retry orchestrator |
ArtifactPublished |
Registry metadata with blueprint ID |
These ensure pipelines are observable and self-healing.
π‘ 7. CI/CD Flow Diagram¶
flowchart TD
Commit[π Code Commit]
Build[ποΈ Build Stage]
Test[β
Test Stage]
Dev[π Deploy Dev]
Prod[π Deploy Prod]
Commit --> Build --> Test --> Dev --> Prod
Each stage is blueprint-aware and can be traced via traceId, runId, and artifactId.
β Summary¶
- Pipeline Blueprints define the full CI/CD automation lifecycle for generated services.
- They reference reusable DSLs for steps, approvals, environments, and deployment logic.
- They produce observable YAML pipelines and emit events for orchestration feedback loops.
- They ensure that every artifact is testable, deployable, and traceable from source to prod.
π§© Documentation Blueprint¶
The Documentation Blueprint defines the structured, contextual documentation required for a service, module, UI component, or entire system. It is generated by the Documentation Agent, often based on Service, Vision, and Test Blueprints.
This blueprint ensures that generated software is also self-explaining, navigable, and onboarding-friendly β supporting both internal developers and external users.
π§ 1. Purpose¶
The Documentation Blueprint answers:
- π What should we explain and to whom?
- π Where are the entry points for understanding this system?
- π§© How do we organize API, domain, and architectural knowledge?
- π§ͺ Can we explain decisions, variations, and system behaviors?
It creates navigable, structured markdown docs and links to diagrams, DSLs, and blueprints.
𧬠2. Example Structure¶
blueprintId: docs-booking-service-v1
type: Documentation
agent: DocumentationAgent
version: 1.0.0
traceId: doc-91ceabd3
dsl:
- ref: dsls/entities/Appointment.yaml
- ref: dsls/events/AppointmentBooked.yaml
- ref: dsls/api/booking.yaml
sections:
- title: Overview
file: `docs/booking-service/index.md`
includes:
- businessGoal
- personaMap
- contextDiagram
- title: Domain Model
file: `docs/booking-service/domain.md`
includes:
- entityList
- aggregateRoots
- eventList
- title: API Reference
file: `docs/booking-service/api.md`
source: OpenAPI
format: Markdown + Mermaid
- title: Test Scenarios
file: `docs/booking-service/tests.md`
source: TestBlueprint
format: BDD Table
- title: Deployment & Infra
file: `docs/booking-service/infra.md`
includes:
- Helm chart overview
- pipeline link
- K8s deploy config
π 3. DSLs Referenced¶
| DSL Type | Purpose |
|---|---|
EntityDSL |
Documents domain models |
EventDSL |
Explains event contracts and triggers |
ApiDSL |
Generates OpenAPI or gRPC docs |
PersonaDSL |
Embedded into overview and use cases |
BlueprintRef |
Cross-links Vision, Test, Infra blueprints |
π§ 4. Agent Usage¶
| Agent | Action |
|---|---|
| Documentation Agent | Generates docs, diagrams, and navigation structure |
| Product Owner Agent | Validates onboarding and user journey clarity |
| QA/Test Agent | Inserts test flow visualizations and outcome maps |
| Studio UI | Renders preview and cross-referenced doc portal |
π 5. Output Artifacts¶
| Output File | Description |
|---|---|
docs/index.md |
Overview, scope, personas |
docs/domain.md |
Entity-event diagrams |
docs/api.md |
REST/gRPC reference |
docs/tests.md |
Scenario summaries and examples |
docs/infra.md |
Infra structure, endpoints, probes |
docs/images/context.mmd |
Mermaid diagram source |
mkdocs.yml |
Injected nav tree and metadata |
π§ 6. Rendering Integration (Markdown to Portal)¶
Documentation Blueprints integrate with:
- MkDocs with Material theme (internal developer portals)
- Swagger/OpenAPI UIs (API surfacing)
- Mermaid for sequence, flow, context diagrams
- AI indexers (e.g.,
docs/folder is embedded in vector memory)
π 7. Live Documentation Flow Diagram¶
flowchart TD
SB[π§© Service Blueprint]
TB[π§© Test Blueprint]
AB[π§© API DSL]
DB[π§© Documentation Blueprint]
DOC[π Markdown Pages]
SB --> DB
TB --> DB
AB --> DB
DB --> DOC
β Summary¶
- Documentation Blueprints structure all human-readable outputs of the Factory.
- They integrate DSLs, blueprints, and metadata into usable markdown or web outputs.
- They support onboarding, auditing, collaboration, and platform discoverability.
- They are automatically updated when upstream inputs change β always trace-linked.
π§© Event Flow Blueprint¶
The Event Flow Blueprint defines the end-to-end message-driven behavior across services, modules, and external systems. It is created by the Enterprise Architect Agent or Solution Architect Agent, based on the Vision, Service, and Module Blueprints.
This blueprint is essential for enabling event-driven, decoupled systems and aligns with the platformβs Event-Driven Mindset.
π§ 1. Purpose¶
The Event Flow Blueprint answers:
- π‘ Which events are emitted, listened to, or transformed?
- π What is the event lifecycle across the system?
- π Which services or modules are coupled via events?
- π¨ Where do retries, dead-letter queues, or compensations apply?
It provides a formal map of the semantic event backbone of a product or domain.
𧬠2. Example Structure¶
blueprintId: event-flow-booking-v1
type: EventFlow
agent: EnterpriseArchitect
version: 1.0.0
traceId: evtflow-7a1b9b3a
events:
- name: AppointmentBooked
publisher: BookingService
subscribers:
- ReminderService
- AnalyticsService
- name: ReminderSent
publisher: ReminderService
subscribers:
- LoggingService
- name: AppointmentCancelled
publisher: BookingService
subscribers:
- NotificationService
- ReminderService
bus:
provider: AzureServiceBus
retryPolicy: exponential
deadLetterQueue: enabled
topologies:
- type: topic
name: appointments
partitioning: by location
routes:
- event: AppointmentBooked
path: `appointments/{region}`
π 3. DSLs Referenced¶
| DSL Type | Description |
|---|---|
EventDSL |
Defines schema and metadata for each event |
TopicDSL |
Specifies messaging patterns and bus topology |
RetryPolicyDSL |
Describes event delivery behavior |
DeadLetterDSL |
Optional dead-letter queue definitions |
π§ 4. Agent Usage¶
| Agent | Action |
|---|---|
| Service Engineer Agent | Uses to wire publisher/subscriber handlers |
| Infra/DevOps Agent | Creates queue/topic infrastructure |
| QA/Test Agent | Builds event flow test cases |
| Observability Agent | Configures distributed tracing across event hops |
| Chaos/Resiliency Agent | Validates message loss, retry, duplicate handling |
π 5. Traceability and Replayability¶
-
Each event includes:
-
traceId correlationIdspanIdoriginService- Enables distributed tracing of cross-service event flow
- Blueprint can emit
EventFlowViolationDetectedif expected subscriber is missing
π 6. Event Flow Diagram¶
graph TD
Booking[π¦ BookingService]
Reminder[π ReminderService]
Analytics[π AnalyticsService]
Notification[π§ NotificationService]
Booking -->|AppointmentBooked| Reminder
Booking -->|AppointmentBooked| Analytics
Booking -->|AppointmentCancelled| Notification
Booking -->|AppointmentCancelled| Reminder
Reminder -->|ReminderSent| Logging
π 7. Output Artifacts¶
| Type | File |
|---|---|
| Topic Definition | appointments.topic.yaml |
| Subscription Config | booking-subscribers.yaml |
| Retry Policy Config | retry-policies.yaml |
| Dead Letter Strategy | deadletter-config.yaml |
| Event Flow Diagram | event-flow-booking.mmd |
β Summary¶
- Event Flow Blueprints define the system-wide message choreography across microservices.
- They power decoupled, observable architectures and enable event tracing and debugging.
- They are generated by architectural agents and consumed by engineering, QA, and DevOps.
- Outputs include routing rules, topic maps, retry policies, and visualization diagrams.
π§© SaaS Product Blueprint¶
The SaaS Product Blueprint defines a productized, multi-tenant-aware configuration of a system composed of services, modules, capabilities, and constraints. It is produced by the Product Owner Agent and optionally extended by the Growth Strategist Agent or Tenant Modeling Agent.
This blueprint allows the factory to generate, customize, and evolve SaaS variants with edition-specific logic, entitlements, feature toggles, and business models β while reusing core components.
π§ 1. Purpose¶
The SaaS Product Blueprint answers:
- π§± Which services, features, and flows are part of this SaaS edition?
- π° What business model applies (subscription, freemium, usage-based)?
- π₯ Which tenants or user groups does this apply to?
- π What overrides or constraints differ from the default blueprint?
It formalizes product configuration-as-code for SaaS delivery at scale.
𧬠2. Example Structure¶
blueprintId: saas-booking-lite-v1
type: SaaSProduct
agent: ProductOwner
version: 1.0.0
traceId: edition-94e0cd45
baseProduct: booking-platform
edition: Lite
enabledModules:
- BookingService
- UserService
- ReminderService
disabledModules:
- AnalyticsService
- IntegrationHub
featureToggles:
- name: EnableManualConfirmation
default: false
businessModel:
type: subscription
billingCycle: monthly
pricePerSeat: 12.99
freeTier: true
usageLimits:
appointmentsPerMonth: 50
tenantScopes:
- name: vet-clinics-limited
locationGroup: "Tier-2 Cities"
branding:
theme: "blue-silver"
logo: "vet-lite.png"
π 3. DSLs Referenced¶
| DSL Type | Description |
|---|---|
EditionDSL |
Declares which modules/features are enabled |
PricingModelDSL |
Defines billing and entitlement model |
FeatureToggleDSL |
Flags and rollout configurations |
TenantProfileDSL |
Multitenant-specific customizations |
π§ 4. Agent Usage¶
| Agent | Purpose |
|---|---|
| Product Owner Agent | Creates and evolves the blueprint |
| Business Analyst Agent | Maps edition to feature set, tenant profiles |
| Pricing & Growth Agents | Suggest pricing models and usage limits |
| Docs & Studio Agent | Renders edition documentation and matrix comparisons |
| Engineering Agents | Use the blueprint to inject if edition == Lite logic |
π§© 5. Blueprint Relationships¶
| Blueprint | Integration |
|---|---|
VisionBlueprint |
SaaS editions originate from the productβs vision |
ServiceBlueprint |
Selects which services to include per edition |
FeatureBlueprint (TBD) |
Controls fine-grained feature availability and overrides |
PricingBlueprint (TBD) |
Optional future split for pricing schema and invoice flows |
π 6. Edition Modeling Diagram¶
flowchart TD
P[π§ Vision Blueprint]
E[π§© SaaS Product Blueprint]
F[βοΈ Feature Toggles]
T[π₯ Tenant Profiles]
B[π° Billing Model]
P --> E
E --> F
E --> T
E --> B
π 7. Output Artifacts¶
| File | Description |
|---|---|
edition-config-lite.yaml |
Full SaaS product blueprint |
feature-flags.json |
Toggle settings for SDK |
pricing-rules.yaml |
Monthly cost model and seat limits |
tenant-scope.json |
Tenant targeting, branding, and overrides |
edition-docs.md |
Rendered comparison table and docs |
β Summary¶
- SaaS Product Blueprints define edition-aware configurations for productized delivery.
- They formalize which modules, features, and business models apply to each variant.
- They enable agents to create logic and flows scoped to editions or tenants.
- They drive customization, monetization, and rollout β all from a central artifact.
π§© Cross-Blueprint Traceability Blueprint¶
The Cross-Blueprint Traceability Blueprint defines the explicit links, lineage, and references between multiple blueprints, DSLs, and generated artifacts. It is produced by the Knowledge Orchestration Agent or automatically inferred by the Studio Memory Graph Engine.
It creates a trace map for auditability, observability, explainability, and regeneration across all stages of the AI Software Factory.
π§ 1. Purpose¶
The blueprint answers:
- 𧬠Which blueprints or DSLs does this blueprint depend on?
- π What was the generating prompt, agent, or source artifact?
- π Which outputs (files, APIs, diagrams) did this blueprint create?
- π§ Can I trace an event, test, or class back to its design origin?
It powers studio navigation, AI memory embedding, and impact analysis.
𧬠2. Example Structure¶
blueprintId: trace-map-booking-service-v1
type: Traceability
agent: KnowledgeOrchestrator
version: 1.0.0
traceId: trace-cc84bafe
sources:
- blueprint: vision-booking-system
- blueprint: service-booking-service-v1
- dsl: dsls/events/AppointmentBooked.yaml
- input: prompt://create-booking-service
outputs:
- file: src/BookingService/Handlers/BookAppointmentHandler.cs
- file: tests/BookingTests.cs
- file: docs/booking-service/api.md
- diagram: mermaid://booking-flow.mmd
- testCase: appointment-booking.feature
lineage:
- from: vision-booking-system β module:BookingService
- to: service-booking-service-v1 β handler:BookAppointment
- to: test-blueprint-booking β scenario:DoubleBooking
π 3. DSLs and Inputs Referenced¶
| Type | Description |
|---|---|
BlueprintRef |
Pointers to other blueprints (by ID or version) |
DSLRef |
DSL dependencies (commands, events, etc.) |
InputPrompt |
Prompt or seed input that led to this blueprint |
ArtifactRef |
Output artifacts linked to trace IDs |
π§ 4. Agent Usage¶
| Agent | Usage |
|---|---|
| Studio UI Agent | Renders graph of all trace relationships |
| Test & QA Agents | Trace failed test β blueprint β logic source |
| Observability Agent | Correlates logs β spans β blueprint context |
| Feedback Loop Agent | Suggests regeneration or improvement targets |
πΈοΈ 5. Traceability Graph Diagram¶
graph TD
Prompt["π¨ Prompt"]
Vision["π Vision Blueprint"]
Service["π§© Service Blueprint"]
Test["π§ͺ Test Blueprint"]
Docs["π Documentation"]
Code["π¦ Handler.cs"]
TestFile["β
Tests.cs"]
Prompt --> Vision --> Service --> Code
Service --> Test --> TestFile
Service --> Docs
π 6. Observability Integration¶
- Emits
TraceMapCreated,ArtifactLinked,BlueprintLineageDiscovered -
Powers:
-
Search by trace ID
- Backtrace from file to blueprint
- Audit logs per generated cluster
π 7. Output Artifacts¶
| Artifact | Description |
|---|---|
trace-map.yaml |
Full cross-blueprint reference map |
trace-index.json |
Indexed view for Studio navigation |
span-links.yaml |
Trace/Span correlation for Observability agents |
lineage-diagram.mmd |
Generated flow of origin-to-output |
β Summary¶
- The Traceability Blueprint connects all blueprints, DSLs, inputs, and artifacts.
- It powers explainability, navigation, observability, and trace-based regeneration.
- It is automatically built and maintained by orchestration and memory agents.
- It is central to how the factory learns, audits, and evolves from past outputs.
π§© Blueprint Observability Metadata & Span Templates¶
The Blueprint Observability Metadata defines structured telemetry annotations, span templates, metrics hooks, and trace enrichments that agents must inject into their generated components and outputs. This blueprint metadata is auto-attached to each blueprint via the Observability Agent and serves the foundation for tracing, debugging, SLO compliance, and cost visibility.
It standardizes the observability contract of every blueprint.
π§ 1. Purpose¶
It answers:
- π How do we observe and monitor this blueprintβs output?
- π Which metrics, spans, logs, and traces are emitted?
- π How do we correlate blueprint inputs with production behavior?
- π¨ What hooks exist for alerting and auto-regeneration?
This metadata makes each blueprint self-traceable, self-monitoring, and studio-indexed.
𧬠2. Example Structure¶
blueprintId: service-booking-service-v1
observability:
traceId: svc-9fae23ab
spanTemplates:
- id: BookAppointment
type: command
tags:
blueprintType: service
module: BookingService
commandName: BookAppointment
logs:
- onStart: "Booking started"
- onError: "Booking failed"
- onSuccess: "Booking completed"
metrics:
- name: booking_duration
type: histogram
unit: ms
- id: AppointmentBooked
type: event
emitSpan: true
tags:
eventName: AppointmentBooked
originatingService: BookingService
links:
- fromCommand: BookAppointment
- toHandler: SendReminder
π 3. Metadata Components¶
| Component | Description |
|---|---|
traceId |
Global trace identifier per blueprint |
spanTemplates |
Templates for OpenTelemetry spans |
tags |
Key/value pairs for span indexing and filtering |
logs |
Lifecycle log messages (start, error, success, retry) |
metrics |
Custom metrics auto-registered with blueprint context |
links |
Cross-span links to represent causality |
π§ 4. Agent Usage¶
| Agent | Action |
|---|---|
| Observability Agent | Injects span templates and exports to tracing systems |
| QA/Test Agent | Uses spans for test coverage and failure correlation |
| Feedback Loop Agent | Triggers retraining/regeneration based on failures |
| Code Review Agent | Validates missing observability contract |
π 5. Example Emitted Artifacts¶
| File | Purpose |
|---|---|
observability-span-map.yaml |
All span templates and log templates |
otel-tags.json |
Key-value label definitions per blueprint |
metrics.yaml |
Metric definitions (latency, error rate, etc.) |
logs-template.yaml |
Structured log messages with blueprint metadata |
traceability-overlay.yaml |
Trace links across multiple blueprints |
π‘ 6. Distributed Span View¶
sequenceDiagram
participant Client
participant API
participant BookingService
participant ReminderService
Client->>API: BookAppointment
activate API
API->>BookingService: Command β BookAppointment (traceId: svc-9fae23ab)
activate BookingService
BookingService-->>ReminderService: Emit β AppointmentBooked (span linked)
deactivate BookingService
deactivate API
π§ͺ 7. Studio Integration¶
This metadata:
- Is auto-indexed into vector memory
- Enables prompt-to-span correlation
- Supports backtrace from span to blueprint
- Visualized in the Blueprint Inspector UI with metrics, spans, test traces
β Summary¶
- Every blueprint contains built-in observability metadata and span templates.
- This enables full traceability from input prompt β blueprint β span β log β metric.
- Enforced and injected by Observability Agents with links to test and feedback agents.
- Forms the backbone of observability-first architecture in the ConnectSoft AI Factory.
π§© Blueprint Feedback Loop Blueprint¶
The Blueprint Feedback Loop Blueprint defines how each blueprint integrates with runtime feedback, observability signals, test failures, user input, or design drift to trigger updates, corrections, or full regenerations. It is coordinated by the Feedback Loop Agent and relies on observability, memory, and test metadata.
This blueprint creates a closed-loop system where live behavior improves design artifacts β aligning the factory with continuous learning.
π§ 1. Purpose¶
It answers:
- π What kinds of runtime feedback can affect this blueprint?
- π What errors or failures should trigger blueprint updates?
- π§ How are memory, traces, and feedback ingested into the blueprint pipeline?
- β Can human and AI review both contribute to blueprint improvement?
It links production insights back into the AI software generation process.
𧬠2. Example Structure¶
blueprintId: service-booking-service-v1
type: FeedbackLoop
agent: FeedbackLoopAgent
version: 1.0.0
traceId: fb-loop-b74c23ed
monitoredOutputs:
- artifact: BookingService.cs
- artifact: BookAppointmentHandler.cs
- spanId: booking_duration
- test: appointment-booking.feature
feedbackTriggers:
- type: test-failure
source: BookingTests.cs
action: regenerate TestBlueprint
- type: span-error
match: "booking failed"
action: notify ObservabilityAgent
- type: metrics-degradation
metric: booking_duration
threshold: p95 > 1000ms
action: reroute to PerformanceTunerAgent
- type: human-feedback
source: GitHub PR comment
tag: "incorrect-appointment-type"
action: suggest blueprint refinement
π 3. Signal Types Referenced¶
| Signal Source | Description |
|---|---|
test-failure |
Automated test or QA result deviation |
span-error |
Log/error emitted during span execution |
metric-anomaly |
Latency, error rate, or usage pattern deviation |
human-feedback |
Comments, issue reports, inline feedback |
drift-detection |
Code diverges from blueprint (via trace map mismatch) |
π§ 4. Agent Usage¶
| Agent | Role in the Feedback Loop |
|---|---|
| Feedback Loop Agent | Listens to signals, decides when to regenerate |
| Observability Agent | Emits actionable metrics and logs |
| QA/Test Agent | Adds test failure hooks into feedback stream |
| Engineering Agents | Re-ingest refined blueprint or correct outputs |
| Knowledge Agent | Updates memory + traceability with feedback results |
π 5. Trigger-Action Mapping¶
| Trigger | Action Taken |
|---|---|
TestFailure: E2E |
Rerun generator for Service + Test |
Metric Spike |
Insert tracing + retry suggestions |
PR Comment: βedge case not coveredβ |
Link to feature DSL + regenerate tests |
Missing Event: ReminderSent |
Link back to Service/Event Blueprint |
π 6. Closed Feedback Diagram¶
flowchart TD
Blueprint -->|Generates| Artifact
Artifact -->|Runs| Observability
Observability -->|Emits| Signal
Signal -->|Triggers| FeedbackLoopAgent
FeedbackLoopAgent -->|Refines| Blueprint
π 7. Output Artifacts¶
| File | Description |
|---|---|
feedback-loop.yaml |
Full trigger-action-feedback mapping |
failure-insights.json |
Linked feedback + test + trace analysis |
feedback-events.log |
Runtime events consumed and resolved |
blueprint-regeneration-report.md |
Summary of changes per feedback cycle |
β Summary¶
- Feedback Loop Blueprints create a self-correcting, runtime-aware generation system.
- They integrate metrics, tests, logs, and user input into blueprint regeneration logic.
- Enable continuous improvement and blueprint evolution based on real-world behavior.
- Close the loop between AI-generated software and production reality.
π§© Blueprint Composition & Inheritance¶
The Blueprint Composition & Inheritance pattern enables blueprints to be modular, reusable, and hierarchical, supporting shared logic, layered overrides, and context-specific variants. It is orchestrated by the Blueprint Resolver Engine and supported by the Knowledge Graph.
This capability allows large systems to be modeled as composable blueprint trees, where common parts (like logging, error handling, or cross-cutting concerns) are inherited or reused across multiple blueprints.
π§ 1. Purpose¶
It enables:
- π§± Modularization of repeated patterns across services or editions
- πͺ Hierarchical layering (e.g., base product β SaaS edition β custom tenant)
- π Reuse of DSLs, sections, or test cases across teams and services
- 𧬠Override and patch support for edition-based or tenant-specific mutations
It transforms blueprints from static specs into scalable building blocks.
𧬠2. Example Structure¶
blueprintId: service-booking-lite-v1
extends: service-booking-base-v1
type: Service
version: 1.1.0
agent: ServiceEngineer
traceId: comp-bf23ddc1
overrides:
endpoints:
- name: BookAppointment
policies:
authorization: disabled
featureFlag: EnableManualConfirmation
merge:
- from: shared/error-handling-snippets.yaml
- from: shared/audit-logging-blocks.yaml
π§© 3. Composition Mechanisms¶
| Mechanism | Description |
|---|---|
extends: |
Inherits from another blueprint (same type or a base-type) |
merge: |
Includes external YAML/DSL/snippets into the blueprint body |
override: |
Replaces specific sections or fields of the parent blueprint |
ref: |
Soft-link to other blueprint parts without full inclusion |
π 4. Use Cases¶
| Use Case | Composition Strategy |
|---|---|
| Common Error Handling | merge: common handlers into all services |
| SaaS Edition Variants | extends: a base edition with overrides |
| Multitenancy | override: branding, feature flags |
| Environment-Specific Infra | merge: env files per deployment stage |
| Shared Pipeline Segments (e.g. test gate) | merge: pipeline DSLs into all blueprints |
π§ 5. Agent Usage¶
| Agent | Role |
|---|---|
| Blueprint Resolver | Merges, overrides, validates blueprint composition |
| DevOps Agent | Reuses composed pipeline and infrastructure blocks |
| Product Owner Agent | Composes SaaS editions with inherited defaults |
| Studio Knowledge Agent | Visualizes and indexes blueprint hierarchies |
𧬠6. Composition Diagram¶
graph TD
A[π§© Base Booking Service Blueprint]
B[π§© Booking Lite SaaS Edition]
C[π§© Custom Vet Tenant Blueprint]
D[π§± Error Handling Block]
E[π§± Audit Logging Block]
B --> A
C --> B
A --> D
A --> E
π 7. Output Artifacts¶
| File | Purpose |
|---|---|
booking-service.yaml |
Final merged blueprint |
edition-booking-lite.yaml |
Overlayed SaaS variant |
custom-vet-tenant.yaml |
Final output with tenant-specific branding |
blueprint-inheritance.graph.yaml |
Hierarchical graph of all blueprint relations |
β Summary¶
- Blueprint Composition enables modular reuse, inheritance, and override across artifacts.
- It is essential for scaling the factory across editions, tenants, and shared logic layers.
- Used by Product, Infra, DevOps, and Documentation agents alike.
- Powers maintainability, consistency, and evolution of platform-wide blueprint systems.
π§© Blueprint Validation, Linting & Policy Enforcement¶
The Validation & Linting System ensures that all blueprints across the ConnectSoft AI Software Factory are syntactically valid, semantically consistent, and policy-compliant before being consumed by downstream agents or generation pipelines. It is enforced by the Validation Engine embedded within the Orchestration Kernel.
This guarantees that each blueprint is safe to generate, traceable, and aligned with platform-wide standards and enterprise rules.
π§ 1. Purpose¶
Validation answers:
- βοΈ Is this blueprint structurally correct and complete?
- π Are all referenced DSLs, artifacts, and IDs resolvable and versioned?
- π‘οΈ Does this blueprint comply with security, privacy, and naming policies?
- π Is this blueprint compatible with other referenced blueprints (composition graph)?
It prevents invalid or misconfigured blueprints from reaching generation or deployment stages.
𧬠2. Example Validation Rule Set¶
validationProfile: service-default
blueprintType: Service
rules:
- id: must-have-traceId
condition: blueprint.traceId != null
severity: error
- id: must-reference-entity-dsl
condition: blueprint.dsl contains "entity/"
severity: warning
- id: blueprint-id-format
condition: blueprint.blueprintId matches /^[a-z0-9\-]+$/
severity: error
- id: forbidden-hardcoded-secret
condition: no value matches /^API_KEY=.+/
severity: critical
- id: max-pipeline-steps
condition: count(pipeline.stages.steps) <= 20
severity: warning
β 3. Validator Outputs¶
| Output Type | File/Format |
|---|---|
| Errors & Warnings | blueprint-lint-report.json |
| Policy Violations | compliance-failures.yaml |
| Auto-Fixes (optional) | blueprint-patched.yaml |
| Studio UI Integration | Rendered inline in visual inspectors |
π§ 4. Agent Participation¶
| Agent | Responsibility |
|---|---|
| Validation Engine | Core validator across all blueprint types |
| Compliance Agent | Registers global policies and enforcement rules |
| Editor Agent | Lints during authoring or blueprint merge operations |
| Feedback Agent | Suggests regeneration if validation fails persistently |
π 5. Enforced Policy Types¶
| Category | Sample Policy Description |
|---|---|
| Naming | All blueprint IDs must follow kebab-case |
| Secrets | No hardcoded secrets or credentials in blueprint bodies |
| Limits | Max steps per pipeline, max retries per handler |
| Compliance | Must include data classification for all entities |
| Versioning | Must lock DSL versions before promotion to staging or prod |
π οΈ 6. Validation Flow Diagram¶
flowchart TD
Draft[π Draft Blueprint]
Validator[π Validation Engine]
Report[π Lint Report]
Generator[βοΈ Agent Generator]
Draft --> Validator --> Report
Validator -->|valid| Generator
Validator -->|invalid| halt
π§ͺ 7. Studio and Automation Integration¶
-
Lint checks run in:
-
CI pipelines
- Studio preview environment
-
Agent authoring lifecycle
-
Auto-fix support:
-
Inject missing traceId
- Suggest valid enum values for blueprint fields
- Flag outdated DSL references for upgrade
β Summary¶
- Validation and linting ensure all blueprints are production-safe, standardized, and secure.
- Driven by policy definitions, schema rules, and trace resolution checks.
- Integrated across authoring, generation, promotion, and CI flows.
- Protects against errors, inconsistencies, and misalignment with factory standards.
π§© Blueprint Promotion Lifecycle (Draft β Review β Published)¶
The Blueprint Promotion Lifecycle defines the state machine, governance, and traceable transitions each blueprint goes through β from initial generation to review, publishing, and deprecation. This process is managed by the Blueprint Registry, supervised by the Blueprint Librarian Agent and optionally validated by human reviewers or external policy agents.
It ensures every blueprint follows a transparent, controlled, and versioned lifecycle aligned with enterprise standards.
π§ 1. Purpose¶
It answers:
- π§ͺ Is this blueprint in a usable and trusted state?
- π οΈ Has it passed validation, feedback, and policy reviews?
- π When was it last promoted or deprecated?
- 𧬠Which version is stable, draft, or deprecated for this domain or edition?
This lifecycle enables safe collaboration, continuous improvement, and release readiness.
π 2. Promotion States¶
| State | Description |
|---|---|
draft |
Initial state; editable by agents or humans |
validated |
Passed linting, schema checks, and DSL linking |
under-review |
Marked for peer/agent approval, possibly includes CI/CD dry runs |
published |
Locked; referenced by downstream generation pipelines or other blueprints |
deprecated |
No longer used; may have a successor or be removed in next generation |
𧬠3. Example Promotion Metadata¶
promotion:
currentState: published
promotedBy: BlueprintLibrarianAgent
version: 1.2.0
promotedOn: 2025-06-01T12:40:23Z
replaces: version 1.1.3
changelog:
- Updated retry policies for booking event
- Fixed traceId injection missing for POST /book
reviewStatus:
reviewers:
- name: ProductOwnerAgent
approval: approved
time: 2025-05-31T16:23:00Z
- name: QAEngineerAgent
approval: approved
time: 2025-06-01T09:18:55Z
π§ 4. Agent Roles¶
| Agent | Action |
|---|---|
| Blueprint Librarian Agent | Coordinates promotion transitions and changelogs |
| Review Agents (QA, Arch) | Validate for completeness, observability, traceability |
| Product Owner Agent | Marks feature-complete and usable for release |
| Feedback Agent | May trigger rollback or reversion to draft on failure |
π 5. Promotion Workflow¶
stateDiagram-v2
[*] --> Draft
Draft --> Validated : schema + lint pass
Validated --> UnderReview : manual or agent trigger
UnderReview --> Published : approvals complete
Published --> Deprecated : superseded or retired
Deprecated --> Draft : optional resurrection
π 6. Registry and Audit Integration¶
Each blueprint is stored in the Blueprint Registry (backed by blob storage, versioned Git, and search index) with:
promotion-metadata.jsonchangelog.mdpromotion-events.logsemantic version tagging
All transitions are auditable and traceable via the traceId + event log chain.
π 7. Studio UI Integration¶
- Blueprint status indicators (
π‘ draft,π’ published,π΄ deprecated) - Promotion UI with changelog, diffs, reviewers
- Button to rollback or republish previous version
- Cross-linked to all consuming artifacts (pipelines, APIs, services)
β Summary¶
- Every blueprint follows a promotion lifecycle from draft to published or deprecated.
- Each state is validated, versioned, and auditable by both agents and humans.
- Promoted blueprints become stable contract points across the AI Software Factory.
- The registry and Studio provide visibility, rollback, and governance interfaces.
π§© DSL Referencing in Blueprints (vs. Embedding)¶
A key design principle of the ConnectSoft AI Software Factory is that blueprints do not embed full DSL definitions, but instead reference versioned DSL documents. This ensures reusability, consistency, traceability, and version control across all generated artifacts and blueprints.
π§ 1. Purpose¶
This design pattern answers:
- π How do blueprints reuse DSL definitions without duplicating content?
- π How do agents know which DSLs were used to generate this blueprint?
- π How is version consistency ensured across DSL consumers (e.g., services, tests, pipelines)?
- π§ How does the factory trace which part of the DSL influenced the output?
Blueprints become semantic scaffolds that reference DSLs, not contain them.
π 2. Referencing Syntax¶
dsl:
- ref: dsls/entities/Appointment.yaml@v1.2.0
- ref: dsls/events/AppointmentBooked.yaml@latest
- ref: dsls/api/booking-api.yaml
- ref: dsls/policies/rate-limits.yaml
ref:points to a semantic DSL URI- Optional version suffix (
@vX.Y.Z) ensures traceable reproducibility - Supports wildcards, semantic tags, or pinned commits
π 3. Comparison: Referencing vs. Embedding¶
| Aspect | Referencing DSLs | Embedding DSLs |
|---|---|---|
| π Reusability | High β many blueprints can reference | Low β content duplicated |
| π Traceability | Full β ref tracked by knowledge graph | Weak β embedded blocks hard to trace |
| π¦ Output size | Compact β no bloated blueprint files | Larger β DSLs repeated across blueprints |
| 𧬠Evolvability | Easier β DSLs can evolve independently | Risky β embedded versions go stale |
| π Validation support | DSL can be linted independently | Blueprint validation harder |
π§ 4. Agent Behavior When Referencing DSLs¶
| Agent Type | Behavior When Encountering ref: |
|---|---|
| Blueprint Generator | Resolves the referenced DSL from registry |
| Validator Agent | Ensures referenced DSL exists and is valid |
| Documentation Agent | Includes ref headers or tooltips in output |
| Feedback Agent | Links test failures to exact DSL ref line |
π 5. Example DSL Registry Organization¶
dsls/
βββ entities/
βββ Appointment.yaml
βββ User.yaml
βββ events/
βββ AppointmentBooked.yaml
βββ api/
βββ booking-api.yaml
βββ pipelines/
βββ build-release-default.yaml
- DSLs are stored in registry-backed folders, with semantic versioning
-
Registry supports:
-
Tags (
@latest,@approved) - Hashes (commit-based pinning)
- Dependencies (DSL importing other DSLs)
π 6. DSL Usage in Multi-Agent Pipelines¶
flowchart TD
DSL["𧬠DSL: Appointment.yaml"]
ServiceBP["π§© Service Blueprint"]
TestBP["π§ͺ Test Blueprint"]
DocBP["π Docs Blueprint"]
DSL --> ServiceBP
DSL --> TestBP
DSL --> DocBP
One DSL β many blueprints β many artifacts All traceable back to one canonical definition
π 7. Blueprint Snippet Example (Referencing DSLs)¶
blueprintId: booking-service-v2
type: Service
dsl:
- ref: dsls/entities/Appointment.yaml@v1.0.3
- ref: dsls/commands/BookAppointment.yaml@latest
Output files (e.g., Appointment.cs, BookAppointmentHandler.cs) embed generated logic but point back to source DSL via metadata and traceId.
β Summary¶
- Blueprints reference DSLs, never embed them β ensuring modularity, traceability, and reusability.
- DSLs are stored and versioned independently in the DSL Registry.
- All agents are equipped to resolve, validate, and trace these references automatically.
- This principle powers the semantic contract layer of the entire AI Software Factory.
π§© Blueprint Diagrams and Visualizations¶
To enhance understanding, explainability, and collaboration, every blueprint in the ConnectSoft AI Software Factory supports automated visual representations. These visualizations are generated by the Diagram Renderer Agent and embedded in both markdown docs and the Studio UI.
Blueprint diagrams help users and agents quickly grasp structure, flow, dependencies, events, and system behavior.
π§ 1. Purpose¶
Blueprint diagrams answer:
- π§© What is the structural layout or flow of this blueprint?
- π How do agents, services, modules, or events interact?
- π Can a human or AI review this quickly without parsing YAML?
- π What dependencies and references does this blueprint include?
Visuals serve as both documentation and runtime-explainable models.
𧬠2. Diagram Types by Blueprint¶
| Blueprint Type | Diagram Type |
|---|---|
| Service Blueprint | Component and handler flow diagrams |
| SaaS Product Blueprint | Edition matrix and scope graphs |
| Event Flow Blueprint | Event choreography and causality maps |
| Documentation Blueprint | Site tree and source inclusion maps |
| Feedback Blueprint | Signal-response-feedback chains |
| Composition Graphs | Hierarchical inheritance tree |
π¨ 3. Diagram Technologies Used¶
| Type | Description |
|---|---|
Mermaid |
Default for flows, sequences, graphs |
PlantUML |
Optional for class, component diagrams |
Graphviz |
Complex dependency graphs |
Studio UI |
Interactive blueprint canvas |
πΌοΈ 4. Example Mermaid Diagrams¶
π¦ Service Blueprint: Booking Flow¶
graph TD
UI[UI Layer]
API[API Gateway]
Book[BookAppointment Handler]
Event[AppointmentBooked Event]
Reminder[ReminderService Subscriber]
UI --> API --> Book --> Event --> Reminder
π Event Flow Blueprint¶
sequenceDiagram
participant BookingService
participant ReminderService
participant LoggingService
BookingService->>ReminderService: Emit β AppointmentBooked
ReminderService->>LoggingService: Emit β ReminderSent
𧬠Composition Hierarchy¶
graph TD
Base[service-base.yaml]
Lite[service-booking-lite.yaml]
Custom[service-booking-custom-vet.yaml]
Lite --> Base
Custom --> Lite
π§ 5. Agent Usage¶
| Agent | Action |
|---|---|
| Diagram Renderer Agent | Converts blueprint β visual β markdown embed |
| Documentation Agent | Inserts visual into markdown files and doc sites |
| Studio UI Agent | Shows visual overlays for blueprint navigation |
| Review Agents | Validate structure visually during promotion review |
π 6. Output Artifacts¶
| File Name | Description |
|---|---|
booking-service.mmd |
Raw Mermaid syntax |
booking-service.svg/png |
Rendered visual used in docs |
blueprint-composition.graph.yaml |
Graph source for Studio rendering |
docs/booking-flow-diagram.md |
Rendered + captioned explanation section |
π 7. Dynamic Visual Updates¶
Diagrams are automatically:
- Regenerated when the blueprint content changes
- Linked via traceId to source blueprint sections
- Embedded into vector memory for explainable AI responses
- Enhanced with click-to-navigate references in Studio
β Summary¶
- All blueprints are rendered with consistent, rich diagrams to explain their structure and behavior.
- Diagrams are automatically generated and versioned alongside blueprint files.
- They are used by agents, reviewers, and end users across documentation and Studio interfaces.
- This visual layer is essential for explainability, onboarding, auditing, and traceability.
π§© Blueprint-Based Generation vs. Template-Based Generation¶
One of the foundational innovations in the ConnectSoft AI Software Factory is the shift from template-based code generation to blueprint-driven, semantic generation. While templates still play a role, they are no longer the top-level driver β blueprints are.
This cycle defines the distinction, trade-offs, and orchestration strategy between high-level blueprints and low-level templates.
π§ 1. Purpose¶
This contrast answers:
- π§ Why are blueprints the primary orchestration layer in the AI factory?
- π¦ What is the role of templates β when are they used and how?
- 𧬠How are blueprints, templates, DSLs, and prompts connected?
- π Can templates evolve independently from the product design intent?
It enables full separation of intent (blueprint) and form (template).
π 2. Comparison Table¶
| Feature | Blueprint-Based | Template-Based |
|---|---|---|
| Level of Abstraction | High-level, semantic | Low-level, structural |
| Origin | AI agents, planning prompts | Code generators, prewritten stubs |
| Structure | YAML-based, modular, composable | File/folder skeletons with tokens |
| Traceability | Fully traceable via traceId + DSLs | Limited trace, harder to backtrack |
| Reusability | Blueprint logic applies across templates | Templates reused per project |
| Evolvability | Change vision β regenerate multiple outputs | Change template β need manual sync |
| Studio Visibility | Full visual canvas & DSL graph | Hidden logic behind token injection |
π§© 3. Architecture View¶
graph TD
Vision --> Blueprint
Blueprint --> DSLs
Blueprint --> Templates
Templates --> Artifacts
DSLs --> Artifacts
Artifacts --> Observability
- Blueprints orchestrate templates
- Templates render structure, based on DSL + blueprint context
π§ 4. Template Invocation from Blueprints¶
Example blueprint section:
templates:
- use: template/service-handler
input:
command: BookAppointment
entity: Appointment
featureToggle: EnableManualConfirmation
output: src/BookingService/BookAppointmentHandler.cs
The template/service-handler is reused across services β input fields come from blueprint context and DSL resolution.
π§ 5. Agent Participation¶
| Agent | Role |
|---|---|
| Blueprint Orchestrator Agent | Chooses which templates to use, with which inputs |
| Code Generator Agent | Executes template render with blueprint + DSL context |
| Validator Agent | Verifies template injection matches blueprint intent |
| Editor Agent | Lets human override or inspect rendered template output |
𧬠6. Summary Rules¶
- β Always define what you want in a blueprint
- β Templates define how that intent is materialized
- β DSLs define vocabulary and contracts reused by both
- π Templates can be updated across all consuming blueprints if versioned
- π Templates are linked via semantic URIs like
template://service/handler@v2
π§ͺ 7. Output Files¶
| File | Description |
|---|---|
booking-service.yaml |
Blueprint input |
BookAppointmentHandler.cs |
Rendered artifact from template |
.factory/trace-map.yaml |
Links blueprint β template β DSL β output |
template-usage.log |
Diagnostic record of used templates |
β Summary¶
- Blueprints orchestrate generation via high-level design intent.
- Templates are implementation mechanisms scoped by blueprint context.
- The shift from template-first to blueprint-first powers automation, reuse, and consistency.
- The factory uses this layered model for maximum scalability and control.
π§© Blueprint-Aware Testing and Coverage Mapping¶
In the AI Software Factory, tests are not just code artifacts β they are tightly coupled with blueprint definitions, DSL references, and system intents. This allows agents to generate, trace, validate, and regenerate tests based on blueprint scope, ensuring semantic coverage and behavioral fidelity.
This blueprint-aware model unlocks full test traceability, coverage visualization, and AI-driven validation feedback loops.
π§ 1. Purpose¶
This approach answers:
- π§ͺ Are all blueprint-defined behaviors covered by tests?
- 𧬠Which commands, events, or features are untested?
- π Can we regenerate tests from blueprint or DSL changes?
- π Whatβs the test coverage across services, agents, and editions?
It powers automated QA pipelines with end-to-end semantic test scaffolding.
𧬠2. Example Blueprint Test Mapping¶
blueprintId: booking-service-v1
testCoverage:
commands:
- name: BookAppointment
tests:
- scenario: should prevent double booking
file: tests/booking/double-booking.feature
- scenario: should allow urgent slots
file: tests/booking/urgent.feature
events:
- name: AppointmentBooked
tests:
- scenario: should emit event
file: tests/booking/event-emission.feature
errors:
- name: InvalidSlot
tests:
- scenario: should reject past appointment
file: tests/booking/invalid-past.feature
uncovered:
- command: CancelAppointment
- event: AppointmentRescheduled
π 3. Coverage Report Output¶
| Item | Status | Coverage Source |
|---|---|---|
BookAppointment |
β Covered | 2 BDD scenarios |
CancelAppointment |
β Missing | DSL referenced, test not found |
AppointmentBooked |
β Covered | Event span + test + log |
InvalidSlot |
β Covered | Test and span validated |
AppointmentRescheduled |
β Missing | Event defined, not tested |
π§ 4. Agent Participation¶
| Agent | Role |
|---|---|
| Test Generator Agent | Generates BDD/specflow tests from DSL + blueprint |
| QA Coverage Agent | Maps existing tests to blueprint structure |
| Feedback Agent | Suggests regeneration if test fails or is missing |
| Studio Inspector Agent | Renders coverage maps and test linkage graphs |
π 5. Coverage Mapping Diagram¶
graph TD
DSL["π DSL: BookAppointment"]
BP["π§© Service Blueprint"]
T1["β
Test: should prevent double booking"]
T2["β
Test: should allow urgent slots"]
T3["β Missing: CancelAppointment test"]
DSL --> BP --> T1
BP --> T2
BP --> T3
This visual helps track which blueprint segments are covered or missing in tests.
π 6. Output Files¶
| File | Purpose |
|---|---|
test-coverage-map.yaml |
Links between blueprint commands/events/tests |
coverage-report.md |
Human-readable summary of test coverage |
uncovered-commands.log |
List of missing test coverage |
studio-coverage-view.json |
Used by Studio UI for rendering test graphs |
β Summary¶
- Blueprint-aware testing ensures all generated logic is validated against its intent.
- Semantic mapping connects DSLs β blueprints β tests β runtime behavior.
- Missing test coverage is automatically detected and flagged for regeneration.
- Enables high-trust generation with continuous, explainable test feedback loops.
π§© Final Summary and Blueprinting Principles Recap¶
The Blueprint System is the semantic heart of the ConnectSoft AI Software Factory. It captures intent, structure, traceability, and coordination of everything the platform generates β from microservices to documentation, from pipelines to UI, from SaaS editions to observability.
This cycle consolidates all principles, best practices, and strategic value of blueprinting into a clear, actionable reference for both human architects and AI agents.
π― Blueprinting Principles¶
| Principle | Description |
|---|---|
| Intent-First | Blueprints encode what to build, not how to build it |
| Composability | Blueprints are modular, hierarchical, and can extend or override others |
| Traceability by Design | Every artifact maps to its blueprint, DSL, agent, and originating intent |
| Separation of Concerns | DSLs define semantics, templates define structure, blueprints orchestrate |
| Observability-First | Each blueprint emits spans, logs, metrics, and feedback hooks |
| Policy-Aware | Validated, linted, and compliant with global platform constraints |
| Multi-Agent Ready | Blueprints are designed for collaborative AI agent workflows |
| Reusable Across Domains | Blueprints work across microservices, pipelines, tests, docs, and editions |
| Memory-Integrated | Blueprint traceIds and lineage power memory systems and regeneration loops |
| Promotion-Governed | Draft β Validated β Reviewed β Published β Deprecated lifecycle enforced |
π§± Types of Blueprints (Recap)¶
| Category | Examples |
|---|---|
| Structural | Microservice, API, Auth Server, SaaS Product |
| Behavioral | Events, Commands, Handlers, Features, Workflows |
| Operational | Pipelines, Observability, Runtime Configuration |
| Documentation | Markdown artifacts, diagrams, help docs |
| Testing & QA | SpecFlow files, test scenarios, feedback triggers |
| System Coordination | Traceability, Feedback Loops, Promotion metadata |
π οΈ Core Outputs Produced from Blueprints¶
| Output Type | Generated By |
|---|---|
| Source Code | Templates parameterized via blueprint + DSL context |
| Tests & Features | Derived from command/event/handler sections |
| Diagrams | Mermaid/PlantUML rendered from structural metadata |
| Docs & Markdown | Enriched markdown rendered from blueprint hierarchy |
| CI/CD Pipelines | Assembled via orchestration pipeline blueprints |
| Observability | Span maps, metric hooks, and traceId propagation |
| Feedback Triggers | Auto-correction inputs to retrain or regenerate flows |
π Blueprint System Mindmap¶
graph TD
Vision --> Blueprints
Blueprints --> DSLs
Blueprints --> Templates
Blueprints --> Artifacts
Blueprints --> Observability
Blueprints --> Testing
Blueprints --> Promotion
Blueprints --> FeedbackLoop
Blueprints --> Composition
Blueprints --> Traceability
π§ Strategic Value¶
- β Scalable across 3,000+ services and SaaS variants
- π Regenerable from source intent at any time
- π Auditable across all generated outputs
- π€ Collaborative between agents and humans
- π Composable and traceable across the entire platform
β Final Summary¶
The Blueprint System is the semantic contract layer that powers the entire ConnectSoft AI Software Factory:
βTemplates render, DSLs define, but blueprints decide what gets built, how it's structured, and why it exists.β
From vision to runtime, from planning to regeneration β every action, artifact, and agent in the factory revolves around the Blueprint System.