Solution generator

From I-Synergy/I-Synergy.Framework · View interactive version

Solution generator is an AI agent skill from the GitHub repository I-Synergy/I-Synergy.Framework. Generates a complete .NET solution scaffold from an architecture document and design interrogation deliverables. Use after running design-interrogation to translate the architecture document, ubiquitous language, and use cases into a working solution structure with all projects, CQRS handlers, and e

How to use this skill

Skill file

Solution Generator

Translates a completed architecture document into a .NET solution scaffold — projects, folder structure, domain entities, and CQRS handler stubs — following Clean Architecture and the patterns in this template.

Inputs

| Input | Source | Role |

|-------|--------|------|

| Architecture document | docs/architecture/{SolutionName}-architecture.md | Primary input — all parameters derived from here |

| Ubiquitous Language | UBIQUITOUS_LANGUAGE.md | Domain naming, aggregate identification |

| Use Cases | docs/bounded-contexts/{Domain}/use-cases.md | Each use case → CQRS Command or Query stub |

| User Stories | docs/bounded-contexts/{Domain}/user-stories.md | Acceptance criteria → test stubs |

| Session Decisions | docs/session-decisions.md | Technology and pattern choices |

Generation Steps

  1. Parse the architecture document for:
  1. Map aggregates to entities — one EF Core entity class per aggregate root per bounded context
  1. Map use cases to CQRS — each use case main flow becomes a Command or Query + Handler stub:
  1. Generate the solution structure (see below)
  1. Generate entity configurations — IEntityTypeConfiguration<T> per entity
  1. Generate service registration — Extensions/ServiceCollectionExtensions.cs per domain project
  1. Generate test stubs — one test class per handler, every stub traced to the acceptance

criterion it is evidence for:

below the // File: line

written first

source.acceptance_criteria, or from the criteria of its source.user_stories when that

key is omitted; a criterion may have several methods

are in .ai/reference/traceability.md

an identifier rather than inventing one

Solution Structure

Generate this layout for each bounded context, following the reference architecture in .ai/project/architecture.md:

src/
├── {Solution}.Contracts.{Domain}/
├── {Solution}.Entities.{Domain}/
├── {Solution}.Models.{Domain}/
├── {Solution}.Domain.{Domain}/
│   ├── Features/
│   │   └── {Entity}/
│   │       ├── Commands/
│   │       │   ├── Create{Entity}/
│   │       │   │   ├── Create{Entity}Command.cs
│   │       │   │   ├── Create{Entity}CommandHandler.cs
│   │       │   │   └── Create{Entity}Response.cs
│   │       │   ├── Update{Entity}/
│   │       │   └── Delete{Entity}/
│   │       ├── Queries/
│   │       │   ├── Get{Entity}ById/
│   │       │   └── Get{Entities}List/
│   │       └── Events/
│   ├── Models/
│   │   └── {Entity}.cs
│   └── Extensions/
│       └── ServiceCollectionExtensions.cs
└── {Solution}.Services.{Domain}/
tests/
└── {Solution}.{Domain}.Tests/

CQRS Stubs

Follow the patterns in:

Key rules (from AGENTS.md Critical Coding Rules):

Service Registration Stub

// Extensions/ServiceCollectionExtensions.cs
public static IServiceCollection With{Domain}DomainHandlers(
    this IServiceCollection services)
{
    var assembly = typeof(ServiceCollectionExtensions).Assembly;
    services.AddCQRS().AddHandlers(assembly);
    return services;
}

After Generation

Run gap-review to validate the generated solution against the original architecture document and session decisions.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.