# Advanced Renamer .aren generation contract

This technical reference is for LLMs generating `.aren` files. Format target: Advanced Renamer 4.29; revision: 6 November 2026. Earlier-version compatibility is unspecified. Application usage and feature behavior belong to the [user guide](https://www.advancedrenamer.com/user_guide/gettingstarted) and its subpages.

## File encoding and root object

Emit UTF-8 JSON containing one object. The root `type` is always `"project"`. Use exact property names and lowercase identifiers from the [field reference](format-reference.md). Include no comments, Markdown fences, or explanatory text inside the file.

```json
{
  "type": "project",
  "batchmode": "rename",
  "pairrename": false,
  "foldermode": false,
  "namecollision.rule": "fail",
  "methods": [
    {
      "methodname": "replace",
      "active": true,
      "applyto": "name",
      "replace": "_",
      "replacewith": " ",
      "casesensitive": false,
      "regularexpressions": false,
      "occurrence": 0
    }
  ]
}
```

## Generation constraints

- Include all six root properties shown above. Rename requires at least one active method. Move/copy requires a nonempty `outputfolder`; `methods: []` preserves filenames.
- Methods appear in execution order. Include `methodname`, `active`, and `applyto` on every method. Timestamp has a separate `applyto` vocabulary.
- Preserve JSON types. Positional fields such as Add's `position` are strings; Renumber's `numberposition` is an integer. List's `newnames` is a string; List Replace's `replace` and `replacewith` are arrays of strings.
- Use `applyto: "name"` to preserve the current extension. Do not append an extension to a mask selecting only the basename.
- Encode [tags](tags-and-patterns.md), [regexes, and scripts](regex-reference.md) as JSON strings. Escape backslashes, double quotes, and line breaks at the JSON layer.
- Use only documented fields. Omit application identity, build identifiers, UI state, and project data outside this reference.
- Resolve missing transformation details using the user guide or clarification. Do not invent fields, tags, metadata identifiers, or script APIs.
- Identify any required item order, metadata, or application settings alongside the generated file. This format does not select or sort input items.

The [JSON Schema](aren-project.schema.json) validates this authoring profile. It does not establish tag, regex, calendar date, filename, or transformation validity. See [worked examples](examples.md) for requests, complete files, and expected results.
