name: idmp-workflow-data-import-export description: "IDMP data import and export workflow. Separate package import or export from datasource CSV import, read first, write carefully, and reread records after every write." metadata: author: "TaosData" version: "0.6.0" owner_team: "AI" requires: bins: - idmp-cli
cliHelp: "idmp-cli data --help"
workflow: data import export
Read ../idmp-shared/SKILL.md first.
Recommended references
Missing context to resolve first
- Workflow type.
- Artifact expectation.
- Whether the operator needs package export, package import, or datasource CSV import.
- Which root or artifact record is already known.
- Whether the expected artifact is record-backed or streamed directly to stdout.
Constrained live behaviors
- Accept both valid export branches.
- Always reread records after every write.
- Package import/export and datasource CSV import are different command families.
download getonly works after a record-backed artifact exists.- Some export branches stream ZIP content directly; in that branch the streamed file is the final artifact.
Execution flow
- Start with
idmp-cli data first-level-elements listandidmp-cli data records listto prove the visible roots and current artifact history. - Use
idmp-cli data import-and-export export --ack-risk --dataonly after the root and export mode are clear. - Reread
idmp-cli data records listbefore tryingidmp-cli data download get --params. - Inspect
idmp-cli schema data.import-and-export.importbefore any package import. - Treat
idmp-cli schema datasource.csv.createas the separate datasource CSV chain, and keepidmp-cli datasource csv create --ack-risk --paramsout of package import/export payloads.
Exception paths
- If no export record exists, stop before
download getand explain whether the branch streamed a ZIP directly. - If the operator asked for CSV import but only described package import, stop and rescope instead of mixing workflows.
- After every mutation, reread records so the artifact history is explicit.
Validation scenarios
1. Package export with branch detection
Run idmp-cli data import-and-export export --ack-risk --data, then reread idmp-cli data records list. The result must say whether the branch is record-backed or stdout-ZIP.
2. Package import after schema inspection
Read idmp-cli schema data.import-and-export.import first. Only then is a package import payload discussion valid.
3. Datasource CSV import
Use idmp-cli schema datasource.csv.create to keep CSV import separate from package import/export. Do not reuse package DTO guidance here.
4. ZIP-stdout branch versus record-backed branch
Try idmp-cli data download get --params only after rereading records. If no record exists, record that stdout branch explicitly.
5. Wrong chain detected before write
If the request mixes export and CSV import, stop early. Reread data records list after every export, import, or CSV write.