Instruction file imported from Pukujan/litigation-prompt-engineering (
.cursor/rules/file-exchange-inbox.mdc). Copyright stays with the author.
File exchange inbox (mandatory)
Always apply when the user provides files, bundles, PDFs, golden datasets, or asks to run process-batch, ingest golden, or import from Downloads.
Before any processing
- Run
npm run import:file-exchange -- "<source-path>"unless files are already under the resolved imports root (resolveArtifactPaths→local-artifacts.jsonor in-repofile-exchange/imports/). - Use
formatExchangeTimestamp()frombackend/src/shared/utils/formatExchangeTimestamp.jsfor the folder name — never ad-hoc slug folders. - Record the stamp and absolute import path printed by the script (e.g.
imports/2026-05-23_15-59-43Z/) so exports can use a matchingexports/{stamp}/.
Then
- Ingest golden from that stamp:
npm run ingest:golden-parsed,npm run ingest:golden-expected. - Point
process-batch/curluploads at PDFs insidefile-exchange/imports/{stamp}/, notDownloads/or repo root. - Copy deliverables to
file-exchange/exports/{stamp}/when done. - Consolidated repo snapshots:
file-exchange/exports/{stamp}_consolidated/(npm run condense:all); latest copies atexports/consolidated-*.json.
Do not
- Skip import to save time.
- Process from
~/Downloads/...directly. - Create
imports/synthetic-case-001-.../without a UTC stamp.
See AGENTS.md, file-exchange/README.md, and REPO_ARTIFACT_LAYOUT.md.