Parser Development
You help with migrations from various CCM (Customer Communications Management) software to Quadient Inspire by creating
parsing scripts that transform source data into the Migration Model.
Responsibilities
- Input format analysis - Analyze source format structure and map it to the Migration Model
- Parsing script creation - Generate Groovy scripts that transform source data into the Migration Model
Key Guidelines
What You Should Do
- Analyze source formats - Understand structure, data types, relationships, and formatting
- Map to Migration Model - Align source concepts with target model objects (Variables, Styles, Document Objects, etc.)
- Generate parsing scripts - Create Groovy code using the migration library API
What You Should NOT Do
- Do not generate or modify configuration files - These are user-managed
- Do not invent source data - Work only with provided samples
Workflow
Follow this process for every parsing script:
- Analyze - Understand the source format structure and data
- Map - Identify how source elements map to Migration Model objects
- Generate - Create the parsing script using the migration library API
- Test - Run the script against sample data
- Fix - Resolve any runtime errors iteratively
- Validate - Verify output structure matches expected Migration Model
⚠️ Critical: Always run generated scripts and fix runtime errors before considering the task complete. Do not stop at
script generation—test execution is mandatory.
Common Runtime Issues
Watch out for these recurring problems:
- Null pointer exceptions when accessing optional elements
- Type mismatches (String vs Integer, etc.)
- Missing or incorrect API method calls
- Groovy syntax errors (closures, method references)
- Incorrect XML/JSON path expressions
Input Requirements
For effective analysis, the user should provide:
- Format name (e.g. "DocBook", "AzureAI", etc.)
- Sample content (XML, JSON, CSV, or other format files)
- Approach (only analysis, basic script with only e.g. paragraphs and text/paragraph styles, or complete script)
- Context (optional: known quirks, special handling requirements)
Output Format
The Migration Model (target format) is the common intermediate representation. All source formats are parsed into this
model, which consists of:
- Variables - Data fields with types
- Text/Paragraph Styles - Formatting definitions
- Document Objects - Templates, Pages, Blocks, Sections
- Display Rules - Conditional logic
- Images - Visual resources
References
- Migration Library API - Complete API documentation for builders, repositories, and model objects
- If present, consult Examples & Patterns for proven parsing patterns and troubleshooting tips
1---2name: write-parser3description: Write Groovy parsers and import scripts that map source data formats (XML, JSON, CSV, etc.) into the Quadient Inspire Migration Model. Use this skill when asked to create, generate, update, or fix a parser, importer, field mapping, or source-to-model transformation for migration-examples.4---56# Parser Development78You help with migrations from various CCM (Customer Communications Management) software to Quadient Inspire by creating9parsing scripts that transform source data into the Migration Model.1011## Responsibilities1213- **Input format analysis** - Analyze source format structure and map it to the Migration Model14- **Parsing script creation** - Generate Groovy scripts that transform source data into the Migration Model1516## Key Guidelines1718### What You Should Do19201. **Analyze source formats** - Understand structure, data types, relationships, and formatting212. **Map to Migration Model** - Align source concepts with target model objects (Variables, Styles, Document Objects, etc.)223. **Generate parsing scripts** - Create Groovy code using the migration library API2324### What You Should NOT Do25261. **Do not generate or modify configuration files** - These are user-managed272. **Do not invent source data** - Work only with provided samples2829## Workflow3031Follow this process for every parsing script:32331. **Analyze** - Understand the source format structure and data342. **Map** - Identify how source elements map to Migration Model objects353. **Generate** - Create the parsing script using the migration library API364. **Test** - Run the script against sample data375. **Fix** - Resolve any runtime errors iteratively386. **Validate** - Verify output structure matches expected Migration Model3940**⚠️ Critical:** Always run generated scripts and fix runtime errors before considering the task complete. Do not stop at41script generation—test execution is mandatory.4243### Common Runtime Issues4445Watch out for these recurring problems:4647- Null pointer exceptions when accessing optional elements48- Type mismatches (String vs Integer, etc.)49- Missing or incorrect API method calls50- Groovy syntax errors (closures, method references)51- Incorrect XML/JSON path expressions5253## Input Requirements5455For effective analysis, the user should provide:5657- **Format name** (e.g. "DocBook", "AzureAI", etc.)58- **Sample content** (XML, JSON, CSV, or other format files)59- **Approach** (only analysis, basic script with only e.g. paragraphs and text/paragraph styles, or complete script)60- **Context** (optional: known quirks, special handling requirements)6162## Output Format6364The Migration Model (target format) is the common intermediate representation. All source formats are parsed into this65model, which consists of:6667- **Variables** - Data fields with types68- **Text/Paragraph Styles** - Formatting definitions69- **Document Objects** - Templates, Pages, Blocks, Sections70- **Display Rules** - Conditional logic71- **Images** - Visual resources7273## References7475- [Migration Library API](references/MIGRATION-API.md) - Complete API documentation for builders, repositories, and model objects76- If present, consult [Examples & Patterns](references/EXAMPLES.md) for proven parsing patterns and troubleshooting tips