Preview Docs
Coming Soon
🤖 LLM-Ready

Pragmatic Design
for .NET

The Foundry of Precision Code

A meta-framework powered by Source Generators. You declare intent, the compiler forges the rest. Zero reflection, zero overhead.

PlaceOrder.cs You write
[DomainAction]
[Endpoint(HttpVerb.Post, "/api/orders")]
[Validate]
public partial class PlaceOrder
    : IDomainAction<OrderResult>
{
    public required string CustomerId { get; init; }
    public required List<OrderItem> Items { get; init; }

    public override async Task<Result<OrderResult>>
        Execute(CancellationToken ct)
    {
        // Your business logic — nothing else
    }
}
PlaceOrder.Invoker.g.cs Generated
// Auto-generated at compile time
public partial class PlaceOrder
{
    public sealed class Invoker
        : IDomainActionInvoker<PlaceOrder>
    {
        // ✓ Constructor with DI
        // ✓ Validation pipeline
        // ✓ Authorization check
        // ✓ Structured logging
        // ✓ Activity tracing
    }

    // ✓ HTTP endpoint: POST /api/orders
    // ✓ Request body: PlaceOrderBody
    // ✓ OpenAPI schema with error types
    // ✓ DI registration
}

Invisible Power.
Zero Runtime Overhead.

Everything is resolved at compile time. Your code reads like a spec, the generator produces the implementation.

Source Generators

One unified generator detects your architecture and forges repositories, endpoints, validators, invokers, and more.

🧩

Modular by Design

20+ composable modules — add a NuGet, the generator sees it, code is forged. Remove it, code disappears.

🔒

Type-Safe Everything

Generic attributes, strongly-typed IDs, Result pattern — the compiler catches errors before you do.

🤖

LLM-Ready Architecture

Declarative APIs that AI agents understand natively. Built-in Skills for Claude Code, context-aware documentation, and semantic code patterns.

🚀

AOT-First Design

Zero reflection across the entire framework. Native AOT works today for the full stack — with EF Core as the only external dependency still catching up.

📐

Architecture as Code

Boundaries, modules, startup steps — your architecture is enforced by the type system, not by convention.

The Shift.
Verbosity Becomes Advantage.

For decades, C# developers fought verbosity with abstractions, magic strings, and reflection hacks. Source Generators change the equation entirely.

The Old Approach

You write explicit, descriptive code — but then you pay the price at runtime. The framework uses reflection to discover your types, scan assemblies, build registrations. Startup is slow. Trimming breaks. AOT is a dream.

  • Reflection-based discovery at startup
  • Convention-over-configuration hides intent
  • Runtime errors for compile-time mistakes
  • AI can't reason about magic conventions

The Pragmatic Approach

You write the same explicit, descriptive code — but now the compiler reads it before the runtime does. Attributes and types become instructions for the Source Generator. Verbosity is no longer a cost. It's the input.

  • Compile-time code generation — zero discovery
  • Explicit declarations are the input, not the cost
  • Compile errors for wrong architecture
  • AI reads attributes and understands everything

"The best code is not the shortest — it's the most legible to both humans and machines. Source Generators let you be as descriptive as you want, at zero runtime cost."

Your code speaks.
AI understands.

Pragmatic Design's declarative API is inherently semantic. Attributes like [DomainAction], [Mutation(Mode.Create)], and [Query<T>] carry meaning — not just configuration.

LLMs don't need to reverse-engineer patterns from boilerplate. They read your declarations and understand the architecture instantly. That means better code generation, more accurate refactoring, and fewer hallucinations.

  • Intent is explicit — attributes declare what, not how
  • Patterns are consistent — one way to do each thing
  • Boilerplate is gone — only signal, no noise
CreateAmenity.cs
// An LLM reads this and knows everything:
//   what it does, how it's validated,
//   who can access it, what it returns.

[Mutation(Mode = MutationMode.Create)]
[Endpoint(HttpVerb.Post, "api/amenities")]
[Validate]
[RequirePermission("catalog.amenity.create")]
public partial class CreateAmenity
    : Mutation<Amenity>
{
    [Required] [MaxLength(100)]
    public required string Name { get; init; }

    public AmenityCategory Category { get; init; }
}

Built for the
AI-Assisted Developer.

Pragmatic Design doesn't just work with AI — it's designed to be consumed by it.

📖

LLM-Ready Docs

Every module has adoption-quality documentation: concepts, common mistakes, troubleshooting. 190 pages structured so AI agents can find the right answer fast.

24 modules documented
🛠️

Claude Code Skills

Built-in slash commands teach your AI pair programmer the framework: /use-actions, /use-persistence, /new-module. The AI writes idiomatic Pragmatic code from day one.

20+ skills available
🧠

Context-Aware Generation

Semantic attributes make your codebase a self-documenting spec. AI agents understand your domain model, boundaries, permissions, and validation rules — without reading a single README.

Zero ambiguity

AOT-First. Almost Full-Stack.

Pragmatic Design is built with zero reflection from the ground up. Every module — Actions, Endpoints, Validation, Mapping, Caching, Authorization — is fully compatible with .NET Native AOT. No trimming warnings. No runtime codegen. No surprises.

The one exception? Entity Framework Core. EF still relies on reflection internally for change tracking and query translation. That's not us — that's the only external dependency still catching up. We're watching the Microsoft.EntityFrameworkCore AOT roadmap closely, and when it lands, Pragmatic will be full-stack AOT from day one.

Actions — AOT ready Endpoints — AOT ready Validation — AOT ready Mapping — AOT ready Persistence — waiting for EF Core

What's Being
Forged Next.

Active development, real progress. Here's what's on the anvil.

Shipped

24 Modules, Unified SG

Actions, Persistence, Endpoints, Validation, Mapping, Authorization, Identity, Caching, Events, Composition, and 14 more — all working together through one Source Generator.

Shipped

190-Page Documentation

Every module documented with concepts, getting started, common mistakes, and troubleshooting. Structured for both developers and AI agents.

In Progress

Messaging & Saga

Outbox-based event publishing, multi-transport routing, and saga orchestration — all driven by the Source Generator and your domain model.

In Progress

Entity Traits

Declarative cross-cutting concerns: [HasComments], [HasAttachments], [HasTags]. The SG generates entities, endpoints, and handlers from a single attribute.

Next

Persistence.Native

A reflection-free persistence layer for full-stack AOT. When EF Core AOT lands, Pragmatic will be ready. Until then, we're exploring alternatives.

Next

AI Agent SDK

Claude Code Skills as a first-class distribution channel. Package your domain knowledge as skills, so AI agents write Pragmatic-idiomatic code from day one.

Forging in Progress

Pragmatic Design is under active development. Explore the documentation to see what's already built.

Explore Documentation