Bulk Ingest
# User-invoked prompt · bulk-ingest (v1.10.0 · issue #3 C1)
> Governed bulk import path. The normal ingestion pipeline (inbox/queue →
> extraction → index registration) is designed for a trickle of items;
> production evidence showed a several-hundred-file archive import landing
> directly in the vault left ~400 files outside the governance chain —
> present on disk, absent from indexes, invisible to patrol entry-count
> reconciliation — and cost multiple repo-wide cleanup sweeps. This job
> closes the gap at WRITE time, not detection time.
## Trigger keywords
- `批量导入` / `导入这批文件` / `bulk import` / `bulk ingest` / `import this archive`
- ROUTER MUST route here (not the normal inbox path) whenever a single import
batch exceeds **20 files** — per `hosts/CLAUDE.md` §Maintenance jobs routing note.
## HARD RULES
1. **Never land batch files directly into live trees** (`wiki/`, `projects/`, `areas/`, `meta/`). Everything stages first.
2. **Manifest before routing** — no file is routed until the batch manifest exists.
3. **Bounded waves with per-wave index registration** — unregistered drift can never exceed one wave (30 files).
4. **Completion is mechanical** — manifest diff shows zero unrouted files; "looks done" is not a completion state.
5. **Flat fan-out only** — if waves are parallelized with subagents, workers MUST NOT spawn further subagents (per `agents/dispatcher.md` §Flat Fan-Out for Bulk Work). Serial waves are the default.
## Gate order
The only permitted sequence is:
1. `sources/<batch-id>/` quarantine containing the incoming files.
2. `sources/<batch-id>/MANIFEST.md` written with one staged row per file.
3. Routing in waves of ≤30 files, with per-wave index registration.
Do not proceed until the previous artifact exists. If a requested action skips
ahead, refuse it with the matching stop line:
- `Stop: I cannot route batch files into live trees yet. Missing precondition: sources/<batch-id>/ quarantine containing the incoming files.`
- `Stop: I cannot route batch files into live trees yet. Missing precondition: sources/<batch-id>/MANIFEST.md written before routing.`
- `Stop: I cannot process this batch in an unbounded wave. Missing precondition: a ≤30-file wave with the previous wave registered.`
## Step 1 · Quarantine staging
1. Generate `batch-id` = `ingest-<YYYYMMDD>-<HHMM>` (real `date` command).
2. Create `sources/<batch-id>/` and move/copy the entire incoming batch there. Nothing else touches the vault yet.
3. Count files: `find sources/<batch-id> -type f | wc -l`. If ≤ 20, tell the user the normal inbox path also works, but continuing here is fine.
4. Gate check: do not proceed to the manifest until `sources/<batch-id>/` exists and contains the incoming files. If it does not, stop with the quarantine refusal line above.
## Step 2 · Batch manifest (before ANY routing)
Do not proceed until the previous artifact exists: `sources/<batch-id>/`
containing the incoming files.
Write `sources/<batch-id>/MANIFEST.md`:when to use it
Community prompt sourced from the open-source GitHub repo jasonhnd/life_OS (NOASSERTION). A "Bulk Ingest" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
jasonhnd/life_OS · NOASSERTION