prune_cluster
Remove paper notes from a cluster based on their frontmatter label, either archiving or deleting them, to clean up after fit-check labeling.
Instructions
Archive or delete paper notes in a cluster whose frontmatter carries label.
Cluster cleanup operation that acts on the label sidecars written
by apply_fit_check_to_labels (e.g. deprecated,
off_topic, low_relevance). Moves matching paper notes to
the cluster's _archive/ subfolder by default, or deletes them
outright if delete=True. Pairs with apply_fit_check_to_labels
as a two-step "decide → act" workflow: that tool labels papers
based on fit-check sidecars; this tool acts on the labels.
When to use:
After running
apply_fit_check_to_labels(or manually labelling papers), you want to physically move the off-topic notes out of the active cluster folder.You want to keep an audit trail (default
archive=True) so the moves are reversible.
When NOT to use:
You want to ADD labels, not act on them; use
apply_fit_check_to_labelsinstead.You want to delete the entire cluster (not just labelled papers); use
research-hub clusters delete(CLI) instead.You want to rebind orphans to a different cluster, not archive them; use
cluster_rebindinstead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_slug | Yes | Cluster whose papers are scanned. | |
| label | No | Frontmatter label string to match (e.g. ``"deprecated"``, ``"off_topic"``). Papers without this label in their frontmatter are skipped. Defaults to ``"deprecated"``. | deprecated |
| archive | No | When ``True`` (default), move matched papers to ``hub/<slug>/_archive/`` rather than deleting them. Set to ``False`` only when paired with ``delete=True``. | |
| delete | No | When ``True``, permanently delete matched papers instead of archiving. Defaults to ``False`` (safer). Has no effect when ``archive=True``. | |
| dry_run | No | When ``True`` (default), report what WOULD be affected without touching the filesystem. Pass ``False`` to execute the moves/deletes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||