{
  "catalogVersion": "1.0",
  "configurationVersion": 1,
  "format": "UTF-8 JSON",
  "instructions": [
    "Match the user's intent to an importable workflow or a manual UI example.",
    "For an importable workflow, ask for missing sheet, table and field names. Return only a single JSON object conforming to its schema.",
    "Use the selected workbook. Validate names in Excel. Import only stages settings. The user reviews them and starts the run.",
    "For other combinations, give the UI steps and describe which choices require the user. Do not invent JSON properties or claim execution.",
    "All examples use fictional names. This file contains no workbook data or engine source."
  ],
  "importPath": [
    "Excel ribbon",
    "Corraidhin",
    "Choose the module",
    "Profiles",
    "Configuration library",
    "Paste JSON or Open JSON",
    "Import settings"
  ],
  "importableWorkflows": [
    {
      "module": "Sheeter",
      "workflow": "sheeter.merge-all-except",
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "version": {
            "const": 1
          },
          "workflow": {
            "const": "sheeter.merge-all-except"
          },
          "excludeWorksheets": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 31,
              "pattern": "[^ \\t\\r\\n]"
            },
            "minItems": 0,
            "maxItems": 10000
          },
          "mergeName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 31,
            "pattern": "[^ \\t\\r\\n]"
          }
        },
        "required": [
          "version",
          "workflow",
          "excludeWorksheets"
        ]
      },
      "example": {
        "version": 1,
        "workflow": "sheeter.merge-all-except",
        "excludeWorksheets": [
          "Instructions",
          "Archive"
        ],
        "mergeName": "Combined"
      }
    },
    {
      "module": "Appender",
      "workflow": "appender.transfer-delete",
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "version": {
            "const": 1
          },
          "workflow": {
            "const": "appender.transfer-delete"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "worksheet": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 31,
                  "pattern": "[^ \\t\\r\\n]"
                },
                "table": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "pattern": "[^ \\t\\r\\n]"
                }
              },
              "required": [
                "worksheet"
              ]
            },
            "minItems": 1,
            "maxItems": 10000
          },
          "criteria": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "pattern": "[^ \\t\\r\\n]"
                },
                "comparison": {
                  "enum": [
                    "Equals",
                    "Not Equals",
                    ">",
                    ">=",
                    "<",
                    "<=",
                    "Contains",
                    "Not Contains"
                  ]
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32767,
                  "pattern": "[^ \\t\\r\\n]"
                }
              },
              "required": [
                "field",
                "comparison",
                "value"
              ]
            },
            "minItems": 1,
            "maxItems": 100
          },
          "join": {
            "enum": [
              "AND",
              "OR"
            ],
            "default": "AND"
          },
          "destination": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "newWorksheet": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 31,
                    "pattern": "[^ \\t\\r\\n]"
                  }
                },
                "required": [
                  "newWorksheet"
                ]
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "existingTable": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "[^ \\t\\r\\n]"
                  }
                },
                "required": [
                  "existingTable"
                ]
              }
            ]
          }
        },
        "required": [
          "version",
          "workflow",
          "sources",
          "criteria",
          "destination"
        ]
      },
      "example": {
        "version": 1,
        "workflow": "appender.transfer-delete",
        "sources": [
          {
            "worksheet": "Orders",
            "table": "OrdersTable"
          }
        ],
        "criteria": [
          {
            "field": "Status",
            "comparison": "Equals",
            "value": "Closed"
          }
        ],
        "join": "AND",
        "destination": {
          "newWorksheet": "Closed Orders"
        }
      }
    },
    {
      "module": "Summary",
      "workflow": "summary.total-by-key",
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "version": {
            "const": 1
          },
          "workflow": {
            "const": "summary.total-by-key"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "worksheet": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 31,
                  "pattern": "[^ \\t\\r\\n]"
                },
                "table": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "pattern": "[^ \\t\\r\\n]"
                }
              },
              "required": [
                "worksheet"
              ]
            },
            "minItems": 1,
            "maxItems": 10000
          },
          "groupBy": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "[^ \\t\\r\\n]"
          },
          "amount": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "[^ \\t\\r\\n]"
          }
        },
        "required": [
          "version",
          "workflow",
          "sources",
          "groupBy",
          "amount"
        ]
      },
      "example": {
        "version": 1,
        "workflow": "summary.total-by-key",
        "sources": [
          {
            "worksheet": "Orders",
            "table": "OrdersTable"
          }
        ],
        "groupBy": "Vendor Name",
        "amount": "Amount"
      }
    },
    {
      "module": "Mapper",
      "workflow": "mapper.flag-matches",
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "version": {
            "const": 1
          },
          "workflow": {
            "const": "mapper.flag-matches"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "worksheet": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 31,
                  "pattern": "[^ \\t\\r\\n]"
                },
                "table": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "pattern": "[^ \\t\\r\\n]"
                }
              },
              "required": [
                "worksheet"
              ]
            },
            "minItems": 1,
            "maxItems": 10000
          },
          "field": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "[^ \\t\\r\\n]"
          },
          "reference": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "worksheet": {
                "type": "string",
                "minLength": 1,
                "maxLength": 31,
                "pattern": "[^ \\t\\r\\n]"
              },
              "table": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "pattern": "[^ \\t\\r\\n]"
              },
              "column": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "pattern": "[^ \\t\\r\\n]"
              }
            },
            "required": [
              "worksheet",
              "table",
              "column"
            ]
          }
        },
        "required": [
          "version",
          "workflow",
          "sources",
          "field",
          "reference"
        ]
      },
      "example": {
        "version": 1,
        "workflow": "mapper.flag-matches",
        "sources": [
          {
            "worksheet": "Orders",
            "table": "OrdersTable"
          }
        ],
        "field": "Vendor Name",
        "reference": {
          "worksheet": "Directory",
          "table": "Vendors",
          "column": "Vendor Name"
        }
      }
    }
  ],
  "manualExamples": {
    "Sheeter": [
      {
        "path": [
          "Manage sources"
        ],
        "example": "Include January through March, use Find to narrow the list, then fill the selection down."
      },
      {
        "path": [
          "Source setup",
          "Source ranges"
        ],
        "example": "Use row 3 as the header and read columns B through K."
      },
      {
        "path": [
          "Output headers"
        ],
        "example": "Map Purchase Amount and Amount to the same output header."
      },
      {
        "path": [
          "Output options"
        ],
        "example": "Keep the worksheet name and source row with each merged record."
      },
      {
        "path": [
          "Output values"
        ],
        "example": "Use Preserve text to keep leading zeros in account codes."
      },
      {
        "path": [
          "Destination",
          "Export options"
        ],
        "example": "Choose another workbook as the merge destination."
      }
    ],
    "Appender": [
      {
        "path": [
          "Manage sources"
        ],
        "example": "Include both Orders tables, keeping the reference directory separate."
      },
      {
        "path": [
          "Source setup"
        ],
        "example": "Override the header row for an unusual worksheet layout."
      },
      {
        "path": [
          "Filter Criteria"
        ],
        "example": "Move approved invoices with Amount greater than 500 using AND."
      },
      {
        "path": [
          "Filter Criteria",
          "Advanced"
        ],
        "example": "Check the maximum Amount for each Vendor Name."
      },
      {
        "path": [
          "Additional criteria"
        ],
        "example": "Add a second group to match Approved OR Paid invoices."
      },
      {
        "path": [
          "Rows",
          "All Rows"
        ],
        "example": "Copy every source record to the existing archive table."
      },
      {
        "path": [
          "Operation",
          "Split"
        ],
        "example": "Route records into outputs by department."
      },
      {
        "path": [
          "Destination Write Mode"
        ],
        "example": "Select Source Formulas to carry over each row’s formula."
      },
      {
        "path": [
          "Output headers"
        ],
        "example": "Rename a field for just one worksheet using Change source key."
      }
    ],
    "Summary": [
      {
        "path": [
          "Manage sources"
        ],
        "example": "Combine January and February even when a grouping field exists only in January."
      },
      {
        "path": [
          "Field selections"
        ],
        "example": "Use Vendor as Row, Amount as Amount, and Region as Column."
      },
      {
        "path": [
          "Field selections",
          "Excel view"
        ],
        "example": "Edit a larger field-role selection in a worksheet."
      },
      {
        "path": [
          "Filters"
        ],
        "example": "Include Approved or Paid records in a single OR group."
      },
      {
        "path": [
          "Compare"
        ],
        "example": "Compare amounts across sources for each account."
      },
      {
        "path": [
          "Summary details"
        ],
        "example": "Rank vendors by total purchases."
      },
      {
        "path": [
          "Date periods"
        ],
        "example": "Group invoices by the month of their invoice date."
      },
      {
        "path": [
          "Edit calculations"
        ],
        "example": "Calculate a fee from the grouped Amount."
      },
      {
        "path": [
          "Output headers"
        ],
        "example": "Rename an output column before generating the summary."
      }
    ],
    "Mapper": [
      {
        "path": [
          "Manage sources"
        ],
        "example": "Designate invoices as Lookup Value and the vendor directory as Lookup Array."
      },
      {
        "path": [
          "Criteria"
        ],
        "example": "Check whether Vendor Name occurs in both selected lookup arrays using AND."
      },
      {
        "path": [
          "Criteria",
          "Advanced"
        ],
        "example": "Compare the rightmost three characters on both sides."
      },
      {
        "path": [
          "Criteria",
          "Settings"
        ],
        "example": "Configure the current match criterion."
      },
      {
        "path": [
          "Return values"
        ],
        "example": "Return unique vendor categories from the matching rows."
      },
      {
        "path": [
          "Calculations",
          "Proration"
        ],
        "example": "Allocate a source amount using matched weights for a selected period."
      },
      {
        "path": [
          "Header Mapping"
        ],
        "example": "Rename a returned vendor column to distinguish it from the source column."
      },
      {
        "path": [
          "Add results to sources"
        ],
        "example": "Write the match flag beside the original invoice rows."
      }
    ]
  }
}
