Intent Modelers Integration
[!TIP]
Read more if you want to know about the exact three-file wiring recipe and the shared SDK types every model returns, or a specific designer's elements/associations/stereotypes and the full public API of every model type (§9 of each file), or its extension modules' install identities and model API (the
*-extensions.mdfiles) in full:
* Integration Recipe | Domain | Services | Eventing | User Interface
* Extension modules, installed separately from their designer: Domain extensions (Domain Events, Repositories, Domain Services, Stored Procedures, Value Objects) | Services extensions (CQRS Commands/Queries, Domain Interactions, Event Interactions, GraphQL, Proxy Interactions) | User Interface extensions (Core widgets such as Button/Form/Table/Dialog, Service Proxies) (Eventing has none)
(To conserve tokens, only read the resource file(s) for the designer(s) your module actually touches.)
Musts
- Four identities, never interchangeable. For any designer module
X: NuGet PackageId =Intent.Modules.Modelers.X(.csprojPackageReference); Intent module id =Intent.Modelers.X— noModules.— (.imodspec<dependency>,modules.config); API namespace =Intent.Modelers.X.Api(using); assembly =Intent.Modules.Modelers.X.dll. Rule of thumb: NuGet package =Intent.Modules.+ module id minus its leadingIntent.. The split is a deliberateRootNamespace/PackageIdmismatch baked into the designer's own.csproj, not an accident — seeresources/integration-recipe.mdfor the worked, verbatim example. - The dependency must land in three places at the same version, but you only author two of them. Hand-write the
.csprojPackageReference(compile-time) and the.imodspec<dependency>(install-time).modules.configis never hand-edited — it records what is actually installed, and a bad edit corrupts the application's module state. Its entry comes from installing the designer module into the module-building application, metadata-only (Must #7). - Reach elements through the generated extension chain —
_metadataManager.<Designer>(app).Get<X>Models(), never rawGetElementsOfTypewith a hand-typed GUID. - Bind template registrations to the typed model —
FilePerModelTemplateRegistration<ClassModel>(or the designer's own equivalent model type). - To attach your own stereotypes to a foreign designer, model them in your own Module Builder package and ship
<install target="Domain;Module Builder" …>(substituting the target designer name(s)). - Check every extension module's identity independently — never infer one extension module's NuGet id / module id / namespace pattern from a sibling. The four designers' extension modules are inconsistent with each other on this (see each designer's
*-extensions.mdresource file, §1 "Install identities"); the only safe move is reading that module's own.csproj/.imodspec, every time. - Install a designer module metadata-only. In the Installation Settings dialog tick
Install Designer Metadataand leave the rest clear. A module-building application references a designer so its element types become visible to model against — it is not running that designer's generation. TickingEnable Factory Extensions,Install Application SettingsorInstall Template Outputspulls the referenced module's factory extensions, settings and generated output into an application whose only job is to define a module — which is how a module-builder starts emitting code nobody asked for.Install Designersis the one rare addition: use it only when the element types you need still do not appear with metadata alone.
Must Nots
- Never write
Intent.Modules.Modelers.Domainas an.imodspecdependency id, orIntent.Modelers.Domainas aPackageReference— both fail, and confusingly late. - Never add a
PackageReferencetoIntent.Modules.<X>.Api— no such package exists. (A.Apisuffix on a module id likeIntent.Entities.Repositories.Apiis a different thing entirely: a role/contract module.) - Never let the three versions drift — published modules do (e.g.
Services.DomainInteractions'.csprojreference trails its own.imodspecdependency floor); don't copy a stale number from a resource file without checking the current one. A resource's "source at" version can also be newer than your feed offers: take the version fromrun_solution_query→searchAvailableModules("<module id>"), and when you raise a designer package, raiseIntent.Modules.CommonandIntent.SoftwareFactory.SDKto what it depends on (seeresources/integration-recipe.md§1,NU1605). - Never hand-edit a file under
Api/carrying[assembly: IntentTemplate(...)]— it is generated. - Never assume an extension module's namespace mirrors its parent designer, or that its module id keeps (or drops) the
Modules.segment the way another extension module did — each one is independently inconsistent (e.g.Domain.StoredProcedureskeepsModules.in both its module id and namespace where its four siblings drop it, andServices.EventInteractions' namespace has no.Apisegment at all). - Never hand-edit
modules.configto add, change or "fix" a dependency — including typingincludeAssets="none"yourself. That attribute is the result of a metadata-only install, not an input; if it is missing, the install was done with the wrong boxes ticked, so redo the install rather than patching the file. - Reflecting over or decompiling a designer, SDK or
Commonassembly (Assembly.LoadFrom,GetProperties(), a decompiler, a throwaway console app) to discover what a model exposes is discouraged for anything the resources in this skill already cover. §9 "Model API reference" in each designer file lists every public type and member of the base designer, §2 of its*-extensions.mdfile does the same for its extension modules, andresources/integration-recipe.md§6 covers the SDK types they return (IElement,ITypeReference,IStereotype, mappings). Check those first. Fall back to the package's XML docs or source only when a member you need is not listed, for example because you are pinned to a different version.