Skip to content

Evolve source generation to atomic adapters and selection-only profiles #17

Description

@woksin

Decision

Evolve the existing neutral Generation architecture; do not rewrite it. Preserve independent AdapterContribution facts/evidence/diagnostics and the single deterministic resolver/lowerer/printer/compiler pipeline, while replacing the long-term one-complete-provider model with a compile-time allowlisted roster of atomic adapters plus selection-only profiles.

User need

A Screenplay host must compose event stores, event-sourcing frameworks, messaging libraries, value-object systems, validation libraries, and genuine integration APIs without creating one facade/package for every combination or allowing one adapter to own another adapter's semantics.

Examples that must fit the same model:

  • Marten + Wolverine + Vogen + FluentValidation
  • EventStoreDB + MassTransit + StronglyTypedId
  • Arc + Vogen
  • mixed event-store/messaging projects
  • a future trusted non-.NET source frontend

Acceptance criteria

  • Add a built-in, compile-time allowlisted adapter catalog with stable adapter ID, implementation/package version, source language, category, required source/API capabilities, emitted fact capabilities, and compatible Generation range.
  • Replace Boolean-only applicability with structured NotApplicable / Applicable / Blocked probe evidence and per-adapter admission.
  • Treat profiles (marten, critter-stack, later arc) as expected adapter/capability selection only; profiles never own semantics or conflict precedence.
  • Keep Vogen, FluentValidation, StronglyTypedId, and similar concerns as independent cross-cutting adapters that execute at most once.
  • Split Marten, Wolverine, and genuine Wolverine–Marten integration identities while retaining current Critter facade/API compatibility.
  • Detect framework evidence across the selected application scope, not only when all frameworks occur in one compilation.
  • Validate and freeze contributions before resolution: producer identity, producer-scoped fact IDs, subject integrity, supported capabilities, and source origin.
  • Add framework-neutral fixed-snapshot derivation with stable rule identity, input lineage, evidence, and deterministic diagnostics; adapters never consume one another.
  • Move concept/type-use binding from a Critter facade-local Roslyn rewrite toward granular neutral type-use facts and central derivation.
  • Give every recognized fact an explicit disposition: Lowered, ProvenanceOnly, OmittedWithDiagnostic, or Conflicted.
  • Report considered, matched, admitted, blocked, and executed adapters plus fact capabilities and derivation provenance independently from profile/provider and target-language versions.
  • Use authoritative host-provided authored syntax trees consistently; generated source may corroborate but never originate semantics.
  • Keep Arc on its existing complete generator until a fixture-by-fixture parity-proven neutral bridge exists; never concatenate documents.
  • Preserve existing public APIs, provider names, output channels, diagnostic codes, package validation, and byte-identical output where semantics are unchanged.

Delivery order

  1. Decision/characterization fixtures and actual package-closure checks.
  2. Authoritative source enforcement.
  3. Contribution verification, freezing, capability metadata, and provenance.
  4. Atomic Marten/Wolverine/integration identities behind compatibility wrappers.
  5. Built-in catalog, structured probes, profiles, and per-adapter admission in CLI.
  6. Granular type-use facts plus central derivation lineage.
  7. Validation contracts before adding FluentValidation.
  8. Measured semantic facts for delivery, responses, side effects, identifiers, backends, fan-out, sagas, and authorization.
  9. Arc neutral bridge after parity evidence.

Non-goals

  • Adapter-emitted Screenplay AST/text or document concatenation.
  • Adapter/profile order as conflict resolution.
  • A facade for every framework combination.
  • Workspace-discovered executable plugins.
  • A public out-of-process protocol before a real non-.NET/deployment need exists.
  • Starting applications, databases, brokers, or silos by default.
  • Inferring semantics from package presence, names, or primitive backing types.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions