ワンクリックで
replicate
// Apply the replication protocol to a paper. Inventory the replication package, record gold-standard targets with tolerances, translate the analysis to this project's Stata pipeline, and report a tolerance-by-tolerance comparison.
// Apply the replication protocol to a paper. Inventory the replication package, record gold-standard targets with tolerances, translate the analysis to this project's Stata pipeline, and report a tolerance-by-tolerance comparison.
Combine saved Stata estimates into publication-ready tables via esttab. Produces both .tex (for paper) and .csv (for audit) with consistent formatting.
Simulate a fresh-clone reproduction of the entire pipeline and diff the new outputs against the committed ones. Catches drift before paper submission or release.
End-to-end Stata analysis workflow — load, explore, clean, estimate, and produce publication-ready tables and figures with full logging.
Run a holistic narrative review on a Quarto report or Markdown document. Checks reader prerequisites, worked examples, notation clarity, structural arc, and pacing.
Render a Quarto report (Stata engine) to HTML / PDF / DOCX. Performs freshness check on included tables/figures, verifies the Stata Quarto engine, and validates numerical claims before rendering.
Run the stata-reviewer agent on a do-file. Produces a structured code-review report covering reproducibility, logging, naming, magic numbers, table/figure quality, and conformance to project conventions.
| name | replicate |
| description | Apply the replication protocol to a paper. Inventory the replication package, record gold-standard targets with tolerances, translate the analysis to this project's Stata pipeline, and report a tolerance-by-tolerance comparison. |
| disable-model-invocation | true |
| argument-hint | [paper short-name or target file] |
| allowed-tools | ["Bash","Read","Edit","Write","Grep","Glob","Task"] |
Apply .claude/rules/replication-protocol.md end-to-end.
Identify the paper from $ARGUMENTS and locate any provided replication package (often in master_supporting_docs/supporting_papers/).
Record gold-standard targets in quality_reports/<paper>_replication_targets.md (use templates/replication-targets.md):
quality-gates.md defaults, or override per project)Get user approval on the target list.
Translate the original code line-by-line into Stata under dofiles/03_analysis/<paper>_replication.do. Do NOT "improve" during this phase — match the original specification exactly.
Apply stata-coding-conventions for header, version pin, log, etc.
Use replication-protocol's translation pitfall table to avoid silent divergences (e.g., xtreg vs reghdfe, cluster() df-adjust differences).
Run via /run-stata dofiles/03_analysis/<paper>_replication.do.
For each target, locate the corresponding number in the log (or in output/tables/) and compare to the gold standard via the log-validator agent + the tolerance from Phase 1.
Build a comparison table in quality_reports/<paper>_replication_report.md:
| Target | Paper | Ours | Diff | Within tolerance? | Status |
|--------|-------|------|------|-------------------|--------|
| ATT (Tab 2 col 3) | -1.632 | -1.6321 | 0.0001 | yes | PASS |
| First-stage F | 28.4 | 27.9 | 0.5 | yes | PASS |
| Sample N | 12,453 | 12,420 | 33 | NO | INVESTIGATE |
For any FAIL or INVESTIGATE row:
Replicate <Paper>: all MUST targets within tolerance/replicate AbadieDiamondHainmueller2010
→ Inventories targets from the paper, translates, compares.
/replicate quality_reports/CallawaySantanna2021_replication_targets.md
→ Resumes from an already-recorded target list.
replication-protocol's Stata↔R / Stata↔Python tables. Beware default-difference traps.quality-gates tolerance._merge handling difference. Walk the funnel.−1.632 and you get −1.521, you have NOT replicated, even if both are negative and "look similar."log-validator agent enforces this strictly.