Replication Package
Produce the deposit an economist hands a journal at acceptance: a directory tree (data/, code/, output/, README) plus a DCAS compliance checklist, built to the AEA Data and Code Availability Standard, openICPSR deposit expectations, and the Social Science Reproduction Platform reproduction protocol. This skill moves the repo from auditing reproducibility to producing the deposit — /audit-reproducibility proves the numbers; this skill packages everything a third party needs to regenerate them from scratch.
Core principle: the package is reproducible by a stranger with the data and the README — no tacit knowledge, no "ask the author" steps. Every table and figure maps to the exact script and line that produces it.
When to use
- At acceptance. The journal's data editor (AEA, REStud, JPE, EJ, ...) requests a DCAS-compliant deposit before the paper is typeset.
- Before an openICPSR / Zenodo / Dataverse upload. Build the tree and README once, locally, before the web upload.
- Pre-submission dry run. Catch the "I never wrote down where Table 3 comes from" gap while it is cheap to fix.
- Confidential-data papers. Produce the access-restricted-data note and a runnable-on-restricted-data package even when the data itself cannot be deposited.
Inputs
$0— path to the manuscript (.tex,.qmd,.md,.pdf). Required (the source of the Table/Figure inventory).$1— outputs directory. Defaults tooutput/, where every language's pipeline writes. Recognised alternative:_targets/objects/. Ifoutput/does not exist but a pre-v2.6scripts/<lang>/_outputs/does, use that and say so.
Workflow
Phase 0: Pre-flight — detect language(s) and outputs
- Detect the analysis language(s) by scanning for
scripts/R/*.R(+renv.lock/DESCRIPTION),scripts/stata/*.do,scripts/python/*.py(+requirements.txt/environment.yml/pyproject.toml). A project may be polyglot — record all detected languages. - Locate the outputs directory (
$1) and the one-command entry point (00_run_all.R,99_run_all.do,run.py,Makefile). If none exists, flag it — DCAS requires a single master script. - If
quality_reports/passports/<paper-slug>.yamlexists, load it; itsclaims:entries are the authoritative Table/Figure →source_file:source_linemap for Phase 1.
Phase 1: Generate the standard replication README
Write replication_package/README.md (the AEA template, fields below). Leave a [FILL] marker on any field you cannot infer — never fabricate a data source or license.
- Overview / paper citation — title, authors, abstract one-liner.
- Data Availability Statement — for each dataset: public / restricted / proprietary, and whether it is redistributed in the package. This is the single most-rejected DCAS field; be explicit.
- Dataset manifest — a table, one row per file:
filename | description | source (URL/citation) | access (public / DUA / purchase) | license | provided in package? (Y/N). Start it frompython3 scripts/data-inventory.py data/raw --format md(add--headeronce you have checked that each CSV's first row is a header), which lists each file's size, SHA-256, rows, column names, and the columns whose names suggest personal data, and never a value. Everything in it is still derived from the data. On restricted data the author runs it on the permitted machine, and the whole manifest (file names, sizes, row counts, column names) goes through the agreement's disclosure review (/disclosure-check) before it leaves that machine or reaches a model.--no-countsdrops the row counts. - Computational requirements — OS, software + versions (R / Stata / Python), key packages, approximate runtime, RAM, any HPC/cluster need.
- AI-generated analytical outputs (only if the analysis used a model to produce data, such as variables coded by an LLM, classified text, or extracted fields) — for each output: the exact model ID or snapshot and the date it ran, the prompts verbatim, the parameters, where the raw model output is kept, the post-processing applied, and who checked a sample and how. AI help with writing code is not an analytical output; it is disclosed under the journal's AI policy (
/submission-disclosures). The distinction follows the World Bank's reproducibility guidance (worldbank/wb-reproducible-research-repository). - Step-by-step run instructions — the single master-script invocation, then the expected outputs.
- Table/Figure → script:line map — one row per exhibit:
Exhibit | Program | Line | Output file. Read from the passport if present; otherwise grep the manuscript for\input{}/\includegraphics{}and trace each to the producing script. This map is what a reproducer follows; it is the heart of the package.
Phase 2: Capture the computational environment
Generate the dependency lockfile(s) and an environment snapshot for each detected language. Prefer