intent-mapping-architect

Generates recursive C# mapping statements from designer-modelled mappings via the MappingManager API.

23|10|Updated Aug 31, 2017
One-click install
npx skills add https://github.com/IntentArchitect/Intent.Modules --skill intent-mapping-architect-intentarchitect
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: intent-mapping-architect
Source: https://github.com/IntentArchitect/Intent.Modules/tree/main/Tests/ModuleBuilderSkills/.opencode/skills/intent-mapping-architect
Command: npx skills add https://github.com/IntentArchitect/Intent.Modules --skill intent-mapping-architect-intentarchitect

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Translating designer-modelled mappings (Terminal or Object, with replacements and MappingOptions) into correct recursive C# assignment and traversal code is error-prone when done by hand, especially for nested objects and collections. This Skill generates the mapping statements through the Intent Architect MappingManager API instead of hardcoded property assignments. ## Core Features & Use Cases - Recursive Mapping Generation: Distinguishes Terminal (leaf) mappings from Object (nested/collection) mappings and emits the correct CSharpAssignmentStatement, null-guarded initialization, or collection reconciliation helper call. - Replacement & Path Resolution: Resolves source/target expressions via SetFromReplacement/SetToReplacement and mapping element IDs and paths, never by hardcoded property names. - Custom Resolver Support: Registers custom IMappingTypeResolver implementations with explicit priority and inherits custom mappings from CSharpMappingBase. - Use Case: When a template must generate update statements for a designer-defined mapping between a request model and an entity, this Skill produces the full recursive statement tree honoring Null-Safe and Validate All MappingOptions. ## Quick Start Generate the recursive C# update statements for the designer-modelled mapping between my request model and entity using the MappingManager API.

Frequently Asked Questions about intent-mapping-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate C# mapping statements from a designer-modelled mapping?▼

Retrieve the mapping with an extension like GetUpdateEntityMapping(), create a CSharpClassMappingManager, set replacements with SetFromReplacement and SetToReplacement, then call GenerateUpdateStatements to produce the recursive statement tree.

How do I handle nested object and collection mappings in Intent Architect?▼

Treat them as Object Mappings rather than scalar terminals. Emit a null-guarded initialization with recursive child statements for single objects, or a CreateOrUpdateCollection helper call with a primary-key comparison for collections.

When should I use a custom IMappingTypeResolver?▼

Use a custom IMappingTypeResolver when the built-in mapping types do not cover your mapping specialization, such as association target ends pointing to value object collections. Register it on the CSharpClassMappingManager with an explicit priority so it runs before default resolvers.

Can I hardcode property-to-property assignments instead of using MappingManager?▼

No. Hardcoded assignments bypass replacement resolution and break when the designer model changes. Always resolve source and target expressions from mapping element IDs and paths through the MappingManager APIs.

What is the difference between Terminal and Object mappings?▼

A Terminal Mapping is a leaf node producing a single CSharpAssignmentStatement between source and target. An Object Mapping is a traversal or complex node requiring recursion into child mappings, often with null guards or collection reconciliation.

When should I not use this mapping generation approach?▼

Do not use it for hardcoded property assignments or for handler bodies of modelled interactions that are not mappings. Transaction, retrieval, and persistence orchestration belongs to the intent-domain-interactions-expert skill instead.