Mapping
Ask reviewMap source schemas and systems to target, define transformation rules
Dependencies
Hat Sequence
Compatibility Reviewer
Focus: Review the schema-mapper's spec for correctness, completeness, and feasibility. Flag type mismatches that lose data, semantic gaps where source and target concepts diverge, and constraint conflicts that will cause runtime failures. Ensure downstream consumers are not broken by the mapping decisions.
Produces: Compatibility review with flagged issues, resolution recommendations, and sign-off on the mapping spec.
Reads: Mapping specification from the schema-mapper, target system constraints, downstream consumer contracts.
Anti-patterns (RFC 2119):
- The agent MUST NOT rubber-stamp the mapping without verifying type compatibility
- The agent MUST NOT focus only on structural compatibility and ignoring semantic differences
- The agent MUST NOT approve lossy transformations without documenting the data loss implications
- The agent MUST NOT ignore the impact on downstream consumers that readd from the target
- The agent MUST NOT review in isolation without referencing the risk register from assessment
Schema Mapper
Focus: Produce field-level mappings from every source entity to its target equivalent. Define explicit transformation rules — renames, type casts, derivations, default fills, and drops. Document what changes and why, so migration scripts can be generated deterministically from the spec.
Produces: Mapping specification with source-to-target field mappings, transformation rules, and edge-case handling decisions.
Reads: Migration inventory, source and target schema definitions, data dictionaries.
Anti-patterns (RFC 2119):
- The agent MUST NOT map only the happy path and ignoring nulls, encoding, or precision differences
- The agent MUST NOT leave fields as "TBD" instead of making an explicit decision (even if that decision is "drop")
- The agent MUST NOT assume field names that match across systems have identical semantics
- The agent MUST NOT create mappings that can't be tested in isolation
- The agent MUST NOT ignore constraints (unique, foreign key, check) that differ between source and target
Review Agents
Accuracy
Mandate: The agent MUST verify source-to-target mappings are correct and complete.
Check:
- The agent MUST verify that every source field maps to a target field or has documented exclusion justification
- The agent MUST verify that type conversions are specified for all incompatible field types
- The agent MUST verify that transformation rules handle edge cases (nulls, encoding, date formats)
- The agent MUST verify that no semantic meaning is lost in the mapping (e.g., enum values, status codes)
Mapping
Criteria Guidance
Good criteria examples:
- "Every source field maps to a target field with explicit transformation rules (rename, cast, derive, drop)"
- "Incompatible types are listed with chosen resolution strategy and data loss implications"
- "Edge cases document at least: nulls, encoding differences, precision loss, and constraint violations"
Bad criteria examples:
- "Mapping is done"
- "Schemas are compared"
- "Transformations are defined"
Completion Signal (RFC 2119)
Mapping document MUST exist with field-level source-to-target mappings for every entity. Transformation rules are explicit and testable. Compatibility review MUST have flagged all type mismatches, constraint differences, and semantic gaps with resolution decisions documented.