import_tasks
Imports a BATCH of tasks from an external system (Linear, Jira, Spec Kit…) in the PIVOT FORMAT (resource orggen://import/pivot). Two inputs: items in the pivot format (source required) — extraction and mapping are then YOUR job — OR the format of a framework (values of the enumeration; mapping in the resource) + text = its file pasted as is, which the product reads without you; cellId/cellRef then file everything under one block, and an unrecognized text is REFUSED instead of being imported empty. OrgGen guarantees in both cases: (1) a REPLAY never duplicates — the key is (source, externalId); (2) dryRun is TRUE by default: the call returns the plan (created / updated / skipped / conflicts / errors), which you can show to the human, without writing anything; writing is a second call with dryRun: false; (3) a batch is rolled back as a whole (rollback_import); (4) the historical doneAt date of done tasks is kept. onExisting: "update" rewrites the supplied fields of an already imported task ONLY if nobody has modified it since — otherwise conflicts is reported instead of an overwrite (except an edit that arrives DURING the call, between the plan and the write: not detected). Up to 500 items per call; an invalid item writes nothing, and neither do the items that reference it. No assignment notification is sent. Source comments have no slot: they are concatenated into body. Assignees are labels resolved against the people of the project, otherwise kept as they are (unresolvedAssignees). Leaves ONE aggregated event in the activity log per call that wrote (import.applied: the number of tasks created and updated), not one line per task; list_imports remains the history of the BATCH. An imported task has no observed creation or claim. For each update or conflict the plan returns the before → after values of each field (fields, truncated values); notTransported says what the format that was read does not carry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | With a `format` other than `pivot`: the content of the file, as is (at most 400000 characters). An unrecognized text is REFUSED instead of being imported empty. | |
| items | No | The tasks in the PIVOT FORMAT (resource `orggen://import/pivot`) — with `format: "pivot"` (the default). An invalid item writes nothing; neither do the items that reference it (parent, dependency). | |
| cellId | No | With `text`: the block under which to file ALL the tasks read (e.g. the feature). Mutually exclusive with `cellRef`. | |
| dryRun | No | Default TRUE: computes and returns the plan WITHOUT writing anything. `false` to write. | |
| format | No | Default `pivot`: you supply `items`. Any other format reads the file of a framework PASTED AS IS into `text` (mapping, identity and limits: resource `orggen://import/pivot`). | |
| source | No | The originating system (e.g. "linear"). REQUIRED with `items`; with a text `format`, defaults to the format's own (e.g. "speckit"). Enters the derived identifier "<source>-<externalId>". | |
| cellRef | No | With `text`: the NAME of the block under which to file all the tasks read (ambiguous or not found = named refusal). Mutually exclusive with `cellId`. | |
| importId | No | Identifier of the batch; generated by the product if omitted. | |
| onExisting | No | Default `skip`: an already imported task is left as it is. `update`: rewrites the SUPPLIED fields, only if nobody has modified it since the import (otherwise `conflicts`). | |
| expectedProjectId | No | UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted. |