# `scripts/` — what lives here, and who explains it

<!-- Generated by .claude/skills/docs-consistency/docs-readme.R;
     do not edit by hand.  Regenerate:
     Rscript .claude/skills/docs-consistency/docs-readme.R -->

This index routes; the owning handbook leaves explain.
One row per file,
with the purpose taken from the file's own header line
and the grouping from the handbook leaf that owns the topic —
ownership by topic, navigation by place
([the rules](/handbook/meta/handbook/README.md)).
Root of the documentation tree: [`handbook/`](/handbook/README.md).

## [`architecture/glue/`](/handbook/architecture/glue/README.md)

| File | Purpose |
|---|---|
| [`format.py`](format.py) | Format the source directory; driven by the Makefile's format-* targets. |
| [`python_helpers.py`](python_helpers.py) | Shared file helpers for the Python scripts in this directory (imported by format.py). |

## [`architecture/r-layer/`](/handbook/architecture/r-layer/README.md)

| File | Purpose |
|---|---|
| [`rethrow.R`](rethrow.R) | Generate R/rethrow-gen.R from R/cpp11.R: wrap each rapi_* binding to rethrow errors with call context; sourced by .Rprofile on repo load. |

## [`architecture/rfuns/`](/handbook/architecture/rfuns/README.md)

| File | Purpose |
|---|---|
| [`vendor-rfuns.sh`](vendor-rfuns.sh) | Vendor the rfuns extension: copy sources from a duckdb-rfuns checkout into src/ and commit with the upstream log, one commit per import. |

## [`branches/flavors/`](/handbook/branches/flavors/README.md)

| File | Purpose |
|---|---|
| [`flavor-package-name.R`](flavor-package-name.R) | Guard for the flavor rename. |
| [`flavor.patch`](flavor.patch) | — |
| [`flavor.sh`](flavor.sh) | Apply a package flavor: rewrite scripts/flavor.patch to the target name (say, duckdb.dev), apply it, and commit the rename; see BRANCHES.md. |

## [`build/configuration/`](/handbook/build/configuration/README.md)

| File | Purpose |
|---|---|
| [`setup-makeflags.R`](setup-makeflags.R) | Setup MAKEFLAGS for parallel compilation. |

## [`build/fast-paths/`](/handbook/build/fast-paths/README.md)

| File | Purpose |
|---|---|
| [`install-duckdb-cli.sh`](install-duckdb-cli.sh) | Download the standalone DuckDB CLI matching the vendored DuckDB sources under src/duckdb/. |
| [`install-libduckdb.sh`](install-libduckdb.sh) | Install the libduckdb prebuilt binary matching the vendored DuckDB sources under src/duckdb/. |

## [`meta/handbook/`](/handbook/meta/handbook/README.md)

| File | Purpose |
|---|---|
| [`README.md`](README.md) | (this index) |

## [`operations/ci/per-commit/legs/`](/handbook/operations/ci/per-commit/legs/README.md)

| File | Purpose |
|---|---|
| [`each-shard.sh`](each-shard.sh) | Build one shard of an `each-rcc` plan: many commits, one job, one workspace. |
| [`rcc-one.sh`](rcc-one.sh) | Run the per-commit `rcc` gate against the working tree, once. |

## [`operations/ci/per-commit/planning/`](/handbook/operations/ci/per-commit/planning/README.md)

| File | Purpose |
|---|---|
| [`each-cost.py`](each-cost.py) | Estimate how many unity objects a change invalidates. |
| [`each-partition.py`](each-partition.py) | Partition a commit range into contiguous, cost-balanced `each-rcc` shards. |
| [`each-plan.sh`](each-plan.sh) | Plan the sharded per-commit `rcc` build for the checked-out branch. |

## [`operations/ci/per-commit/selection/`](/handbook/operations/ci/per-commit/selection/README.md)

| File | Purpose |
|---|---|
| [`rcc-decided.sh`](rcc-decided.sh) | Print the SHA of every commit the verdict store has decided, one per line. |

## [`operations/ci/per-commit/store/`](/handbook/operations/ci/per-commit/store/README.md)

| File | Purpose |
|---|---|
| [`rcc-consolidate.sh`](rcc-consolidate.sh) | Consolidate the orphan `rcc2` branch: drop everything past the retention window, and squash the whole history to two commits. |
| [`rcc-cutover.sh`](rcc-cutover.sh) | One-shot: build the `rcc2` verdict store from what the old `rcc` branch holds. |
| [`rcc-lib.sh`](rcc-lib.sh) | Shared helpers for the verdict store on the orphan `rcc2` branch. |
| [`rcc-logs.sh`](rcc-logs.sh) | Collect rcc results and failure logs for commits the verdict store has no record for, and stage them for publication to the orphan `rcc2` branch. |
| [`rcc-publish.sh`](rcc-publish.sh) | Publish a staging directory to the verdict store on the orphan `rcc2` branch. |
| [`rcc-run-fields.jq`](rcc-run-fields.jq) | The subset of a GitHub workflow-run object that a record on the `rcc2` branch carries, applied to `gh api repos/{owner}/{repo}/actions/runs/<id>`. |
| [`rcc-store-test.sh`](rcc-store-test.sh) | Check the invariants the verdict store rests on, offline, against a local bare repository -- optionally seeded from the real `rcc` branch. |

## [`operations/vendoring/pipeline/`](/handbook/operations/vendoring/pipeline/README.md)

| File | Purpose |
|---|---|
| [`VENDORING.md`](VENDORING.md) | DuckDB R Package Vendoring |
| [`merge-version.sh`](merge-version.sh) | Git merge driver for DESCRIPTION. |
| [`rconfigure.py`](rconfigure.py) | Regenerate the vendored build configuration from a DuckDB checkout: src/duckdb/, src/include/sources.mk, R/version.R, the Makevars files and the logos. |
| [`setup-git.sh`](setup-git.sh) | Register repository-local git configuration that cannot live in versioned files. |
| [`vendor-one.sh`](vendor-one.sh) | Vendors DuckDB sources commit-by-commit from the upstream repository. |
| [`vendor.sh`](vendor.sh) | Vendors DuckDB sources from the upstream repository (manual vendoring). |

## [`operations/vendoring/series-loop/`](/handbook/operations/vendoring/series-loop/README.md)

| File | Purpose |
|---|---|
| [`r-universe-check.sh`](r-universe-check.sh) | Read-only: what did r-universe make of the refs this repository publishes? |
| [`series-advance.sh`](series-advance.sh) | The ref motion of the series loop, stages 3 and 5, for one series: fast-forward `<S>-green` over the all-green prefix, set `<S>-build-base` to the equivalent... |
| [`series-check.sh`](series-check.sh) | Read-only diagnosis for the series loop: what should a firing do? |
| [`series-cutover.sh`](series-cutover.sh) | Atomically replace a series with its forward counterpart. |
| [`series-forward-build.sh`](series-forward-build.sh) | Populate `<S>-fwd-build`: replay every vendor commit of the old `<S>-build` onto HEAD, which must be the freshly flavored seed on current `main` (.claude/ski... |
| [`series-glue.sh`](series-glue.sh) | Every R-side glue adaptation a series carries, in one read. |
| [`series-port.sh`](series-port.sh) | Bring a series' -dev branch level with `main` — stage 4 of the series loop (.claude/skills/series-loop.md). |

## [`testing/snapshots/`](/handbook/testing/snapshots/README.md)

| File | Purpose |
|---|---|
| [`snapshot-accept.sh`](snapshot-accept.sh) | Rebuild a commit, run the suite, accept the named snapshots, re-run to confirm they hold. |

