Docs refresh: trim README to a 188-line landing page; redirect contributor conventions#372
Docs refresh: trim README to a 188-line landing page; redirect contributor conventions#372
Conversation
|
Overall Assessment No estimator/math/inference code changed, so I did not find new numerical-method defects. The blockers are in the new documentation contract itself: the PR makes Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
Path to Approval
|
P1 - docs/references.rst incomplete (5 missing citations) - Add Baker, Larcker, Wang & Wang (2025) - "Difference-in-Differences Designs: A Practitioner's Guide" arXiv:2503.13323; backs the 8-step Practitioner Workflow now surfaced in README and llms-practitioner.txt. - Add Callaway, Goodman-Bacon & Sant'Anna (2024) - "Difference-in-Differences with a Continuous Treatment" NBER WP 32117; backs ContinuousDiD (under new "Continuous Treatment DiD" section). - Add Chen, Sant'Anna & Xie (2025) - "Efficient Difference-in-Differences and Event Study Estimators"; backs EfficientDiD. - Add de Chaisemartin & D'Haultfoeuille (2022, revised 2024) NBER WP 29873; dynamic companion to dCDH 2020, backs the cohort-recentered plug-in variance formula. - Add Wooldridge (2025) Empirical Economics + Wooldridge (2023) Econometrics Journal under new "Wooldridge ETWFE" sub-section; backs WooldridgeDiD's saturated OLS and logit/Poisson QMLE paths. P1 - .claude/commands/docs-check.md - Replace broken `awk '/^## Estimators/,/^## /'` (self-terminates on opening H2) with a flag-based extractor that skips the heading and stops at the next H2. - Special-case diagnostic-class items (HonestDiD): the workflow text now routes them to `## Diagnostics & Sensitivity` in both llms.txt and README, matching the existing table. P2 - docs/doc-deps.yaml - Retarget HonestDiD's README entry from "Estimators (one-line catalog entry)" to "Diagnostics & Sensitivity (one-line entry)" so /docs-impact flags the correct README section. - Add `- path: docs/references.rst` (type: user_guide) to all 18 method- backed source modules so /docs-impact and /pre-merge-check warnings surface bibliography updates when source code changes. P2 - README.md absolute links - L83 docs/methodology/REPORTING.md, L182 CITATION.cff, L184 CONTRIBUTORS.md switched to absolute https://github.com/igerber/diff-diff/blob/main/... URLs so they resolve on PyPI (which does not auto-resolve relative paths). P3 - README.md tutorial count - Drop the "18" hard-coded count in the Tutorials bullet to prevent future drift; repo currently has 19 notebooks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good This re-review resolves the prior P1-level concerns. I did not find any unmitigated P0/P1 issues in the PR diff; the remaining items are P2 documentation-tooling consistency gaps. Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
|
/ai-review |
P2 - docs/doc-deps.yaml partially migrated to new doc-surface contract - Add `diff_diff/guides/llms.txt` entries to 12 estimator blocks that already had llms-full.txt (CallawaySantAnna, SunAbraham, ImputationDiD, TwoStageDiD, EfficientDiD, ContinuousDiD, StackedDiD, SyntheticDiD, TripleDifference, TROP, HonestDiD, WooldridgeDiD, ChaisemartinDHaultfoeuille, Survey). Section labels match the actual llms.txt heading the entry belongs under: "Estimators", "Diagnostics and Sensitivity Analysis" (HonestDiD), "Survey Support" (survey). - Backfill bacon.py with llms-full.txt + llms.txt entries (and the missing 02_staggered_did tutorial reference for Bacon decomposition). - Backfill staggered_triple_diff.py with full surface mapping (16_survey_did tutorial, README, references.rst, llms-full.txt, llms.txt). - Net: all 17 method-backed estimator sources now have the required README + llms.txt + llms-full.txt + references.rst entries. BusinessReport / DiagnosticReport intentionally lack llms.txt entries (not in llms.txt per their experimental-preview status). P2 - StaggeredTripleDifference API doc target - Add `.. autoclass:: diff_diff.StaggeredTripleDifference` and `StaggeredTripleDiffResults` sections to docs/api/staggered.rst. - Update docs-check.md table row from index.rst (where it was a false-pass) to staggered.rst (where the autoclass actually lives now). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment✅ Looks good I did not find any unmitigated P0/P1 issues in this re-review. The PR remains documentation-only, and the method-adjacent additions I checked are consistent with the Methodology Registry and existing guide files. Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
I did not run a full Sphinx/docutils build in this environment. |
|
/ai-review |
P2 - StaggeredTripleDifference catalog link points at api/index.html which does not list it - Update README.md L116 catalog link from `api/index.html` to `api/staggered.html#staggeredtripledifference` (where the autoclass added in the prior commit actually renders). - Sync the same fix in diff_diff/guides/llms.txt L67 so the bundled AI-agent guide and the README agree on the canonical URL. P3 - docs/api/staggered.rst intro counted "two main estimators" but page now also documents StaggeredTripleDifference (added in prior commit) - Update intro to list three estimators (CS, SA, StaggeredTripleDifference) and clarify the robustness-check note applies to CS+SA only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
|
/ai-review |
P1 - docs/references.rst incomplete (5 missing citations) - Add Baker, Larcker, Wang & Wang (2025) - "Difference-in-Differences Designs: A Practitioner's Guide" arXiv:2503.13323; backs the 8-step Practitioner Workflow now surfaced in README and llms-practitioner.txt. - Add Callaway, Goodman-Bacon & Sant'Anna (2024) - "Difference-in-Differences with a Continuous Treatment" NBER WP 32117; backs ContinuousDiD (under new "Continuous Treatment DiD" section). - Add Chen, Sant'Anna & Xie (2025) - "Efficient Difference-in-Differences and Event Study Estimators"; backs EfficientDiD. - Add de Chaisemartin & D'Haultfoeuille (2022, revised 2024) NBER WP 29873; dynamic companion to dCDH 2020, backs the cohort-recentered plug-in variance formula. - Add Wooldridge (2025) Empirical Economics + Wooldridge (2023) Econometrics Journal under new "Wooldridge ETWFE" sub-section; backs WooldridgeDiD's saturated OLS and logit/Poisson QMLE paths. P1 - .claude/commands/docs-check.md - Replace broken `awk '/^## Estimators/,/^## /'` (self-terminates on opening H2) with a flag-based extractor that skips the heading and stops at the next H2. - Special-case diagnostic-class items (HonestDiD): the workflow text now routes them to `## Diagnostics & Sensitivity` in both llms.txt and README, matching the existing table. P2 - docs/doc-deps.yaml - Retarget HonestDiD's README entry from "Estimators (one-line catalog entry)" to "Diagnostics & Sensitivity (one-line entry)" so /docs-impact flags the correct README section. - Add `- path: docs/references.rst` (type: user_guide) to all 18 method- backed source modules so /docs-impact and /pre-merge-check warnings surface bibliography updates when source code changes. P2 - README.md absolute links - L83 docs/methodology/REPORTING.md, L182 CITATION.cff, L184 CONTRIBUTORS.md switched to absolute https://github.com/igerber/diff-diff/blob/main/... URLs so they resolve on PyPI (which does not auto-resolve relative paths). P3 - README.md tutorial count - Drop the "18" hard-coded count in the Tutorials bullet to prevent future drift; repo currently has 19 notebooks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
P2 - docs/doc-deps.yaml partially migrated to new doc-surface contract - Add `diff_diff/guides/llms.txt` entries to 12 estimator blocks that already had llms-full.txt (CallawaySantAnna, SunAbraham, ImputationDiD, TwoStageDiD, EfficientDiD, ContinuousDiD, StackedDiD, SyntheticDiD, TripleDifference, TROP, HonestDiD, WooldridgeDiD, ChaisemartinDHaultfoeuille, Survey). Section labels match the actual llms.txt heading the entry belongs under: "Estimators", "Diagnostics and Sensitivity Analysis" (HonestDiD), "Survey Support" (survey). - Backfill bacon.py with llms-full.txt + llms.txt entries (and the missing 02_staggered_did tutorial reference for Bacon decomposition). - Backfill staggered_triple_diff.py with full surface mapping (16_survey_did tutorial, README, references.rst, llms-full.txt, llms.txt). - Net: all 17 method-backed estimator sources now have the required README + llms.txt + llms-full.txt + references.rst entries. BusinessReport / DiagnosticReport intentionally lack llms.txt entries (not in llms.txt per their experimental-preview status). P2 - StaggeredTripleDifference API doc target - Add `.. autoclass:: diff_diff.StaggeredTripleDifference` and `StaggeredTripleDiffResults` sections to docs/api/staggered.rst. - Update docs-check.md table row from index.rst (where it was a false-pass) to staggered.rst (where the autoclass actually lives now). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
P2 - StaggeredTripleDifference catalog link points at api/index.html which does not list it - Update README.md L116 catalog link from `api/index.html` to `api/staggered.html#staggeredtripledifference` (where the autoclass added in the prior commit actually renders). - Sync the same fix in diff_diff/guides/llms.txt L67 so the bundled AI-agent guide and the README agree on the canonical URL. P3 - docs/api/staggered.rst intro counted "two main estimators" but page now also documents StaggeredTripleDifference (added in prior commit) - Update intro to list three estimators (CS, SA, StaggeredTripleDifference) and clarify the robustness-check note applies to CS+SA only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(Branch rebased onto origin/main first - 32 landed commits replayed cleanly, zero file overlap with the docs-refresh changeset.) P2 - llms-practitioner.txt Step 6 inconsistent on dCDH HonestDiD support - The high-level workflow surfaces (README, bundled llms.txt) and the practitioner guide's estimator tree (L177-180) all advertise compute_honest_did(results) on MultiPeriodDiD / CallawaySantAnna / ChaisemartinDHaultfoeuille, but Step 6 still said "MultiPeriodDiD and CallawaySantAnna only". - Update Step 6 to add dCDH with the registry caveats: requires L_max >= 1, bounds use placebo estimates as pre-period coefficients (not standard event-study pre-treatment coefficients), uses diagonal variance (no full VCV available), emits UserWarning. Cross-references the REGISTRY.md "Note (HonestDiD integration)" entry under ChaisemartinDHaultfoeuille for the full caveat list. P3 - docs/doc-deps.yaml unsectioned llms.txt entries - Add `section: "Estimators"` to the 5 remaining unsectioned `diff_diff/guides/llms.txt` mappings (estimators.py, staggered.py, chaisemartin_dhaultfoeuille.py, results.py, __init__.py). Now every llms.txt mapping in doc-deps.yaml carries a section label, matching the new "first-class documentation surface" contract. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
P2 - docs/references.rst misattributed Baker (2025) "A Practitioner's Guide" - Wrong author list "Baker, A. C., Larcker, D. F., Wang, C. C. Y., & Wang, X." conflates the 2022 JFE staggered-DiD paper (Baker/Larcker/Wang) with the 2025 arXiv:2503.13323 practitioner's guide. Per the canonical citation in diff_diff/guides/llms-practitioner.txt L610-614 and arXiv metadata, the actual authors of arXiv:2503.13323 are Baker, Callaway, Cunningham, Goodman-Bacon & Sant'Anna. - Fix: replace the author list (title and arXiv ID unchanged). - Audit: grep for `Baker.*Larcker|Larcker.*Wang` across docs/, README.md, llms.txt, diff_diff/guides/, CHANGELOG.md, CLAUDE.md, CONTRIBUTING.md shows no other misattributions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good. All prior re-review findings appear addressed. The highest remaining unmitigated issue is a P2 documentation-contract gap, which is compatible with ✅ under the stated criteria. Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…cross all canonical surfaces P2 - HeterogeneousAdoptionDiD shipped (Phases 1a-3 + 3-followup + 4.5 A/B/C0 merged via PRs #366/#367) but missing from the new authoritative documentation surfaces this PR establishes - README.md ## Estimators catalog: add one-line entry after ContinuousDiD (de Chaisemartin, Ciccia, D'Haultfoeuille & Knau 2026; alias HAD). - diff_diff/guides/llms.txt ## Estimators: add matching one-liner. - .claude/commands/docs-check.md required-estimators table: add HAD row pointing at had.rst as the API target. - docs/references.rst: add new "Heterogeneous Adoption (No-Untreated Designs)" sub-section with the de Chaisemartin et al. (2026) arXiv:2405.04465v6 citation. - docs/api/index.rst: add HeterogeneousAdoptionDiD to estimators autosummary; add HeterogeneousAdoptionDiDResults + HeterogeneousAdoptionDiDEventStudyResults to results autosummary. - docs/api/had.rst (NEW): autoclass page for the three classes with a brief intro and a "When to use HAD" note pointing at sibling estimators (ContinuousDiD for never-treated controls, dCDH for binary reversible). - docs/doc-deps.yaml: add diff_diff/had.py + diff_diff/had_pretests.py source mappings (REGISTRY methodology, had.rst api_reference, README catalog, references.rst, llms.txt). The llms-full.txt mapping is intentionally omitted with a comment - that section is deferred to the Phase 5 follow-up tracked in TODO.md. TODO.md: narrow the Phase 5 entry from "llms.txt updates" to "llms-full.txt HeterogeneousAdoptionDiD section" since the catalog one-liner, API page, and bibliography landed here. practitioner_next_steps() integration and tutorial notebook remain deferred. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
Path to Approval
|
…ctree
P1 - HAD descriptions disagreed with REGISTRY.md and shipped code
- Reviewer caught factual errors I introduced when drafting HAD copy:
- "Strictly positive heterogeneous dose" excludes Design 1' (the QUG
case where d̲ = 0 is allowed; mass-point fraction at d̲ matters
for the support-plausibility heuristic but `d.min() == 0` is the
canonical Design 1' invariant per REGISTRY L2504-2508).
- "HC2 / Bell-McCaffrey small-sample SEs" is wrong for HAD: the
mass-point path only exposes `classical` / `hc1` (HC2 / HC2_BM
raise NotImplementedError pending 2SLS-specific leverage); the
continuous paths use the CCT-2014 weighted-robust SE from the
in-house lprobust port.
- "Per-horizon WAS effects with correlated standard errors and sup-t
bands" is wrong: per-horizon CIs are pointwise by default and have
NO cross-horizon covariance (deferred to TODO follow-up). Sup-t
is available ONLY on the weighted event-study path via
`cband=True`.
- "Multi-period event-study extension" silent on staggered handling:
the estimator auto-filters staggered-timing panels to the
last-treatment cohort (which retains never-treated units as
comparisons) per paper Appendix B.2 prescription.
- Rewrite docs/api/had.rst, README.md catalog one-liner, and
diff_diff/guides/llms.txt catalog one-liner to match REGISTRY exactly:
Design 1' (d̲=0 / QUG) and Design 1 (d̲>0) both supported; three SE
regimes documented (unweighted CCT-2014; `weights=` shortcut with
classical/hc1 mass-point; `survey=` with Binder TSL); pointwise CIs
per horizon; sup-t restricted to weighted event-study + cband=True;
last-treatment-cohort restriction noted explicitly.
P3 - docs/api/had.rst cited Calonico/Cattaneo/Titiunik (2014) but it
was not in docs/references.rst (CONTRIBUTING.md now treats references.rst
as the bibliography source of truth)
- Drop the CCT 2014 inline citation from had.rst; the bias-correction
primitive is an implementation detail tracked in REGISTRY.md and not
needed at the user-facing API page level. The CCF 2018/2019 nprobust
port reference is preserved as "ported from the nprobust machinery"
without a specific citation, also matching how other API pages handle
underlying numerical-method machinery.
P3 - had.rst was added to docs/api/index.rst autosummary but missed
the Module Documentation > Estimators toctree at the same file
- Add `had` between `continuous_did` and `efficient_did` in the
Estimators toctree so the new page is navigable from the RTD API
landing page.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality Performance Maintainability Tech Debt Security Documentation/Tests
|
…nference
P3 - HAD blurb in docs/references.rst still said "strictly positive"
- I corrected README, llms.txt, and api/had.rst in R7 but missed the
bibliography blurb. Rewrite to match: "panels where no unit remains
untreated...nonnegative dose...both Design 1' (d̲=0 / QUG) and
Design 1 (d̲>0) supported."
P3 - api/had.rst names CCT-2014 and Binder (1983) but those weren't
in docs/references.rst (the new bibliography source of truth)
- Add three new sub-sections to references.rst:
- "Nonparametric Bias-Corrected Inference" with CCT 2014 (Econometrica
bias-combined design matrix) + CCF 2018 (JASA coverage accuracy) +
CCF 2019 (JSS nprobust). All three back the in-house lprobust port
used by HAD continuous-dose paths.
- "Survey-Design Inference (Taylor-Series Linearization)" with Binder
(1983) International Statistical Review. Backs the survey= paths
across diff-diff (compute_survey_if_variance and per-estimator IF
compositions including dCDH and HAD).
- These are also CONTRIBUTING.md "bibliography source of truth" entries
for general inference machinery, not just HAD: the survey paths
reference Binder TSL across all survey-aware estimators, and CCF
nprobust is also used by ContinuousDiD's bias-correction path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…ction
P3 - HAD summary copy compressed both Design 1' and Design 1 into "targets
WAS", but the shipped class contract distinguishes them:
- Design 1' (`d̲ = 0`, `continuous_at_zero` path): identifies the original
Weighted Average Slope (WAS, paper Equation 2). `target_parameter == "WAS"`
on the result class.
- Design 1 (`d̲ > 0`, `continuous_near_d_lower` or `mass_point` paths):
identifies `WAS_{d̲}` under Assumption 6 (or sign identification only
under Assumption 5; both are non-testable via pre-trends).
`target_parameter == "WAS_d_lower"` on the result class.
Rewrite the HAD summaries in three places (docs/api/had.rst, README.md
catalog one-liner, diff_diff/guides/llms.txt one-liner) to surface the
distinction explicitly. The api/had.rst summary also flags that callers
can key on the resolved `target_parameter` attribute, and that Design 1
identification requires the additional non-testable assumption beyond
parallel trends.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality No findings. Performance No findings. Maintainability
Tech Debt
Security No findings. Documentation/Tests No blocking findings. Manual review only; I did not run a Sphinx build, README render, or link checker in this environment. |
…tor conventions The README had grown to 3,119 lines (~48K tokens) because workflow conventions told contributors to add a per-estimator section, full usage examples, and a scholarly references list to README on every release. Trimming the file alone would regrow within a few releases. This PR trims AND redirects the conventions. ## README + new surfaces - README.md: 3,119 -> 188 lines (-94%). Hero image, 6 badges (preserved), lean catalog, 14 H2 sections (down from 17). Tagline tightened per Nakora 2026 "what / who / when / how-different" rubric. PyPI snippet now scannable. - docs/references.rst: new RST page lifting the 137-line bibliography out of README (mechanical markdown -> RST conversion). Added to docs/index.rst toctree under "Getting Started". - llms.txt: new repo-root pointer file for AI-crawler discovery; mirrors the RTD-hosted llms.txt / llms-full.txt / llms-practitioner.txt and lists the in-process get_llm_guide() modes. - diff-diff.png: existing 1731x909 hero asset committed to git so the absolute raw.githubusercontent.com URL resolves on PyPI and on GitHub main post-merge. ## Convention redirects (prevent regression) - CONTRIBUTING.md: replaced "For New Estimators: add to README" with a "README is a landing page, not the docs" section. New estimator workflow now routes to llms.txt (AI contract), docs/api/*.rst (technical), docs/references.rst (bibliography), docs/tutorials/ (examples), CHANGELOG.md (release notes). README only gets a one-line catalog entry. - CLAUDE.md: new "README discipline" section documenting the source-of-truth surfaces and the landing-page constraint. - .claude/commands/docs-check.md: replaced per-estimator "README Section" requirement with "llms.txt entry + flat-catalog one-liner". Scholarly references check redirected from README to docs/references.rst. All 18 estimators retabled. - .claude/commands/dev-checklists.md, pre-merge-check.md, review-pr.md, review-plan.md: Documentation Sync checklists now name llms.txt / docs/api/ / docs/references.rst first; README only for landing-page changes. - docs/doc-deps.yaml: 18 stale README.md section pointers (per-estimator sections that no longer exist) redirected to "Estimators (one-line catalog entry)" / "For Data Scientists" / "Survey Support". /docs-impact will now flag the right action when adding a new estimator. ## SEO + discoverability External research (pyOpenSci, Nakora 2026, OtterlyAI GEO study, scikit-learn benchmark) drove three small additions: hero image with keyword-rich alt text, sharper tagline, repo-root llms.txt. Repo metadata changes done out of band (3 new GitHub topics: synthetic-control / survey-design / geo-experiments / marketing-analytics; "python" topic dropped as redundant signal; custom social preview image uploaded). ## Verification - README is 188 lines (target 165-220). - 14 H2 sections (target 14). - All 30 RTD links in README resolve (excluding new references.html which resolves after RTD rebuild). - All 3 RTD links in /llms.txt resolve. - get_llm_guide() unchanged (13,166 chars, smoke-tested). - PyPI readme-renderer produces valid HTML with hero image and all 14 H2s. - Hero image embedded in first 20 lines with all 4 marquee estimator names + "Difference-in-Differences" in alt text; required blank line after </p>. - docs/references.rst parses cleanly via docutils (no warnings). - Zero em dashes across README / references.rst / llms.txt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
P1 - docs/references.rst incomplete (5 missing citations) - Add Baker, Larcker, Wang & Wang (2025) - "Difference-in-Differences Designs: A Practitioner's Guide" arXiv:2503.13323; backs the 8-step Practitioner Workflow now surfaced in README and llms-practitioner.txt. - Add Callaway, Goodman-Bacon & Sant'Anna (2024) - "Difference-in-Differences with a Continuous Treatment" NBER WP 32117; backs ContinuousDiD (under new "Continuous Treatment DiD" section). - Add Chen, Sant'Anna & Xie (2025) - "Efficient Difference-in-Differences and Event Study Estimators"; backs EfficientDiD. - Add de Chaisemartin & D'Haultfoeuille (2022, revised 2024) NBER WP 29873; dynamic companion to dCDH 2020, backs the cohort-recentered plug-in variance formula. - Add Wooldridge (2025) Empirical Economics + Wooldridge (2023) Econometrics Journal under new "Wooldridge ETWFE" sub-section; backs WooldridgeDiD's saturated OLS and logit/Poisson QMLE paths. P1 - .claude/commands/docs-check.md - Replace broken `awk '/^## Estimators/,/^## /'` (self-terminates on opening H2) with a flag-based extractor that skips the heading and stops at the next H2. - Special-case diagnostic-class items (HonestDiD): the workflow text now routes them to `## Diagnostics & Sensitivity` in both llms.txt and README, matching the existing table. P2 - docs/doc-deps.yaml - Retarget HonestDiD's README entry from "Estimators (one-line catalog entry)" to "Diagnostics & Sensitivity (one-line entry)" so /docs-impact flags the correct README section. - Add `- path: docs/references.rst` (type: user_guide) to all 18 method- backed source modules so /docs-impact and /pre-merge-check warnings surface bibliography updates when source code changes. P2 - README.md absolute links - L83 docs/methodology/REPORTING.md, L182 CITATION.cff, L184 CONTRIBUTORS.md switched to absolute https://github.com/igerber/diff-diff/blob/main/... URLs so they resolve on PyPI (which does not auto-resolve relative paths). P3 - README.md tutorial count - Drop the "18" hard-coded count in the Tutorials bullet to prevent future drift; repo currently has 19 notebooks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
P2 - docs/doc-deps.yaml partially migrated to new doc-surface contract - Add `diff_diff/guides/llms.txt` entries to 12 estimator blocks that already had llms-full.txt (CallawaySantAnna, SunAbraham, ImputationDiD, TwoStageDiD, EfficientDiD, ContinuousDiD, StackedDiD, SyntheticDiD, TripleDifference, TROP, HonestDiD, WooldridgeDiD, ChaisemartinDHaultfoeuille, Survey). Section labels match the actual llms.txt heading the entry belongs under: "Estimators", "Diagnostics and Sensitivity Analysis" (HonestDiD), "Survey Support" (survey). - Backfill bacon.py with llms-full.txt + llms.txt entries (and the missing 02_staggered_did tutorial reference for Bacon decomposition). - Backfill staggered_triple_diff.py with full surface mapping (16_survey_did tutorial, README, references.rst, llms-full.txt, llms.txt). - Net: all 17 method-backed estimator sources now have the required README + llms.txt + llms-full.txt + references.rst entries. BusinessReport / DiagnosticReport intentionally lack llms.txt entries (not in llms.txt per their experimental-preview status). P2 - StaggeredTripleDifference API doc target - Add `.. autoclass:: diff_diff.StaggeredTripleDifference` and `StaggeredTripleDiffResults` sections to docs/api/staggered.rst. - Update docs-check.md table row from index.rst (where it was a false-pass) to staggered.rst (where the autoclass actually lives now). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
P2 - StaggeredTripleDifference catalog link points at api/index.html which does not list it - Update README.md L116 catalog link from `api/index.html` to `api/staggered.html#staggeredtripledifference` (where the autoclass added in the prior commit actually renders). - Sync the same fix in diff_diff/guides/llms.txt L67 so the bundled AI-agent guide and the README agree on the canonical URL. P3 - docs/api/staggered.rst intro counted "two main estimators" but page now also documents StaggeredTripleDifference (added in prior commit) - Update intro to list three estimators (CS, SA, StaggeredTripleDifference) and clarify the robustness-check note applies to CS+SA only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(Branch rebased onto origin/main first - 32 landed commits replayed cleanly, zero file overlap with the docs-refresh changeset.) P2 - llms-practitioner.txt Step 6 inconsistent on dCDH HonestDiD support - The high-level workflow surfaces (README, bundled llms.txt) and the practitioner guide's estimator tree (L177-180) all advertise compute_honest_did(results) on MultiPeriodDiD / CallawaySantAnna / ChaisemartinDHaultfoeuille, but Step 6 still said "MultiPeriodDiD and CallawaySantAnna only". - Update Step 6 to add dCDH with the registry caveats: requires L_max >= 1, bounds use placebo estimates as pre-period coefficients (not standard event-study pre-treatment coefficients), uses diagonal variance (no full VCV available), emits UserWarning. Cross-references the REGISTRY.md "Note (HonestDiD integration)" entry under ChaisemartinDHaultfoeuille for the full caveat list. P3 - docs/doc-deps.yaml unsectioned llms.txt entries - Add `section: "Estimators"` to the 5 remaining unsectioned `diff_diff/guides/llms.txt` mappings (estimators.py, staggered.py, chaisemartin_dhaultfoeuille.py, results.py, __init__.py). Now every llms.txt mapping in doc-deps.yaml carries a section label, matching the new "first-class documentation surface" contract. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
P2 - docs/references.rst misattributed Baker (2025) "A Practitioner's Guide" - Wrong author list "Baker, A. C., Larcker, D. F., Wang, C. C. Y., & Wang, X." conflates the 2022 JFE staggered-DiD paper (Baker/Larcker/Wang) with the 2025 arXiv:2503.13323 practitioner's guide. Per the canonical citation in diff_diff/guides/llms-practitioner.txt L610-614 and arXiv metadata, the actual authors of arXiv:2503.13323 are Baker, Callaway, Cunningham, Goodman-Bacon & Sant'Anna. - Fix: replace the author list (title and arXiv ID unchanged). - Audit: grep for `Baker.*Larcker|Larcker.*Wang` across docs/, README.md, llms.txt, diff_diff/guides/, CHANGELOG.md, CLAUDE.md, CONTRIBUTING.md shows no other misattributions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…cross all canonical surfaces P2 - HeterogeneousAdoptionDiD shipped (Phases 1a-3 + 3-followup + 4.5 A/B/C0 merged via PRs #366/#367) but missing from the new authoritative documentation surfaces this PR establishes - README.md ## Estimators catalog: add one-line entry after ContinuousDiD (de Chaisemartin, Ciccia, D'Haultfoeuille & Knau 2026; alias HAD). - diff_diff/guides/llms.txt ## Estimators: add matching one-liner. - .claude/commands/docs-check.md required-estimators table: add HAD row pointing at had.rst as the API target. - docs/references.rst: add new "Heterogeneous Adoption (No-Untreated Designs)" sub-section with the de Chaisemartin et al. (2026) arXiv:2405.04465v6 citation. - docs/api/index.rst: add HeterogeneousAdoptionDiD to estimators autosummary; add HeterogeneousAdoptionDiDResults + HeterogeneousAdoptionDiDEventStudyResults to results autosummary. - docs/api/had.rst (NEW): autoclass page for the three classes with a brief intro and a "When to use HAD" note pointing at sibling estimators (ContinuousDiD for never-treated controls, dCDH for binary reversible). - docs/doc-deps.yaml: add diff_diff/had.py + diff_diff/had_pretests.py source mappings (REGISTRY methodology, had.rst api_reference, README catalog, references.rst, llms.txt). The llms-full.txt mapping is intentionally omitted with a comment - that section is deferred to the Phase 5 follow-up tracked in TODO.md. TODO.md: narrow the Phase 5 entry from "llms.txt updates" to "llms-full.txt HeterogeneousAdoptionDiD section" since the catalog one-liner, API page, and bibliography landed here. practitioner_next_steps() integration and tutorial notebook remain deferred. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ctree
P1 - HAD descriptions disagreed with REGISTRY.md and shipped code
- Reviewer caught factual errors I introduced when drafting HAD copy:
- "Strictly positive heterogeneous dose" excludes Design 1' (the QUG
case where d̲ = 0 is allowed; mass-point fraction at d̲ matters
for the support-plausibility heuristic but `d.min() == 0` is the
canonical Design 1' invariant per REGISTRY L2504-2508).
- "HC2 / Bell-McCaffrey small-sample SEs" is wrong for HAD: the
mass-point path only exposes `classical` / `hc1` (HC2 / HC2_BM
raise NotImplementedError pending 2SLS-specific leverage); the
continuous paths use the CCT-2014 weighted-robust SE from the
in-house lprobust port.
- "Per-horizon WAS effects with correlated standard errors and sup-t
bands" is wrong: per-horizon CIs are pointwise by default and have
NO cross-horizon covariance (deferred to TODO follow-up). Sup-t
is available ONLY on the weighted event-study path via
`cband=True`.
- "Multi-period event-study extension" silent on staggered handling:
the estimator auto-filters staggered-timing panels to the
last-treatment cohort (which retains never-treated units as
comparisons) per paper Appendix B.2 prescription.
- Rewrite docs/api/had.rst, README.md catalog one-liner, and
diff_diff/guides/llms.txt catalog one-liner to match REGISTRY exactly:
Design 1' (d̲=0 / QUG) and Design 1 (d̲>0) both supported; three SE
regimes documented (unweighted CCT-2014; `weights=` shortcut with
classical/hc1 mass-point; `survey=` with Binder TSL); pointwise CIs
per horizon; sup-t restricted to weighted event-study + cband=True;
last-treatment-cohort restriction noted explicitly.
P3 - docs/api/had.rst cited Calonico/Cattaneo/Titiunik (2014) but it
was not in docs/references.rst (CONTRIBUTING.md now treats references.rst
as the bibliography source of truth)
- Drop the CCT 2014 inline citation from had.rst; the bias-correction
primitive is an implementation detail tracked in REGISTRY.md and not
needed at the user-facing API page level. The CCF 2018/2019 nprobust
port reference is preserved as "ported from the nprobust machinery"
without a specific citation, also matching how other API pages handle
underlying numerical-method machinery.
P3 - had.rst was added to docs/api/index.rst autosummary but missed
the Module Documentation > Estimators toctree at the same file
- Add `had` between `continuous_did` and `efficient_did` in the
Estimators toctree so the new page is navigable from the RTD API
landing page.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nference
P3 - HAD blurb in docs/references.rst still said "strictly positive"
- I corrected README, llms.txt, and api/had.rst in R7 but missed the
bibliography blurb. Rewrite to match: "panels where no unit remains
untreated...nonnegative dose...both Design 1' (d̲=0 / QUG) and
Design 1 (d̲>0) supported."
P3 - api/had.rst names CCT-2014 and Binder (1983) but those weren't
in docs/references.rst (the new bibliography source of truth)
- Add three new sub-sections to references.rst:
- "Nonparametric Bias-Corrected Inference" with CCT 2014 (Econometrica
bias-combined design matrix) + CCF 2018 (JASA coverage accuracy) +
CCF 2019 (JSS nprobust). All three back the in-house lprobust port
used by HAD continuous-dose paths.
- "Survey-Design Inference (Taylor-Series Linearization)" with Binder
(1983) International Statistical Review. Backs the survey= paths
across diff-diff (compute_survey_if_variance and per-estimator IF
compositions including dCDH and HAD).
- These are also CONTRIBUTING.md "bibliography source of truth" entries
for general inference machinery, not just HAD: the survey paths
reference Binder TSL across all survey-aware estimators, and CCF
nprobust is also used by ContinuousDiD's bias-correction path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ction
P3 - HAD summary copy compressed both Design 1' and Design 1 into "targets
WAS", but the shipped class contract distinguishes them:
- Design 1' (`d̲ = 0`, `continuous_at_zero` path): identifies the original
Weighted Average Slope (WAS, paper Equation 2). `target_parameter == "WAS"`
on the result class.
- Design 1 (`d̲ > 0`, `continuous_near_d_lower` or `mass_point` paths):
identifies `WAS_{d̲}` under Assumption 6 (or sign identification only
under Assumption 5; both are non-testable via pre-trends).
`target_parameter == "WAS_d_lower"` on the result class.
Rewrite the HAD summaries in three places (docs/api/had.rst, README.md
catalog one-liner, diff_diff/guides/llms.txt one-liner) to surface the
distinction explicitly. The api/had.rst summary also flags that callers
can key on the resolved `target_parameter` attribute, and that Design 1
identification requires the additional non-testable assumption beyond
parallel trends.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(Branch rebased onto origin/main first - 5 landed commits replayed cleanly,
zero file overlap with the docs-refresh changeset.)
P3 - HAD catalog one-liners omit panel-only restriction
- Both README.md L113 and diff_diff/guides/llms.txt L64 describe the
estimator without noting that the validator rejects repeated
cross-section inputs (per REGISTRY L2511-2512 and had.py
_validate_had_panel). Append "Panel-only in this release - repeated
cross-sections rejected by the validator" so practitioners with RCS
data are not misrouted.
P3 - api/had.rst inference contract under-specifies mass-point survey
vcov rejections
- Reviewer caught that the inference contract section says only HC2 /
HC2_BM are unsupported, but the shipped code also rejects
vcov_type="classical" on:
- design="mass_point" + survey= (static and event-study)
- design="mass_point" + weights= + aggregate="event_study" + cband=True
The HC1-scaled per-unit 2SLS IF would silently target V_HC1 under a
classical label.
- Add a paragraph to api/had.rst mirroring REGISTRY L2377-L2379 and
the front-door NotImplementedError messages at had.py L3360-3380 and
L4090-4115 (pointing users to vcov_type="hc1" or robust=True).
P3 - REGISTRY checklist disagrees with TODO.md on HAD Phase 5 status
- TODO.md L108 says the README catalog / llms.txt / API page /
references.rst portion of HAD Phase 5 landed in PR #372, but
REGISTRY L2531 still says "Phase 5: Tutorial notebook + llms.txt +
llms-full.txt updates" as one undone item.
- Split the REGISTRY checklist row: mark the PR #372 portion as [x]
with explicit scope (README catalog, bundled llms.txt, docs/api/had.rst,
docs/references.rst), keep the remaining tutorial + llms-full.txt
work as [ ].
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment✅ Looks good No unmitigated P0/P1 findings. This remains a docs/workflow/asset PR; the methodology-facing changes are mostly aligned with the shipped HAD and dCDH contracts. Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…actitioner caveats
P3 - REGISTRY.md L2511 had a stale "Phase 2a/2b scope" note saying
HAD `weights=` and `survey=` raise NotImplementedError, contradicting
both the new HAD API page and the implementation (Phase 4.5 A/B/C0
lifted both gates with the per-design vcov contract documented at
L2340-L2379).
- Mark the note as "superseded by Phase 4.5" and explicitly cross-
reference the current contract block (mass-point vcov_type="classical"
deviation, cband=True sup-t restriction, Binder TSL via
compute_survey_if_variance on both IFs).
P3 - dCDH HonestDiD caveat in diff_diff/guides/llms-practitioner.txt
pointed offline get_llm_guide("practitioner") users at
docs/methodology/REGISTRY.md, but the wheel only ships
diff_diff/guides/*.txt (per pyproject.toml). The pointer is dead for
the no-network workflow the README advertises.
- Replace the pointer with inline expansion of the most load-bearing
caveats: DeltaRM Mbar=1.0 + l_vec=None default targets the equal-
weight average over post horizons; R's HonestDiD defaults to the
first post effect (pass l_vec for parity); trends_linear=True bounds
the second-differenced estimand; trends_nonparam grid gaps trigger a
largest-consecutive-block filter with warning.
- Practitioners running `get_llm_guide("practitioner")` now get the
full applicable caveats without needing network access or a
source-tree clone.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…uniform contract P2 - README.md L131-137 advertised "all estimators accept survey_design" with "weight types pweight/fweight/aweight" as a uniform contract, but: - HeterogeneousAdoptionDiD.fit() uses survey= / weights= (not survey_design=) - HAD continuous path rejects non-pweight survey designs - CallawaySantAnna and StackedDiD are also pweight-only A reader could reasonably try `SurveyDesign(..., weight_type="aweight")` on any estimator and hit a NotImplementedError. Rewrite the Survey Support section to: - Say "Most" not "All" estimators accept survey_design, with explicit callout of HAD's distinct survey= / weights= API - Defer per-estimator weight-type support to the existing compatibility matrix on RTD instead of claiming uniform pweight/fweight/aweight - Note explicitly that some surfaces (CS, StackedDiD, HAD continuous) are pweight-only while others accept all three weight types - Cite Binder (1983) for TSL alongside the methods list Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology No findings. The new HAD docs match the existing registry/code contract on panel-only support, Code Quality No findings. Performance No findings. Maintainability No findings. Tech Debt
Security No findings. Documentation/Tests
Validation note: I did not run a Sphinx build or README renderer; this review is based on targeted source cross-checks of the diff and surrounding implementation. |
Summary
docs/references.rstlifts the 137-line bibliography out of README into a dedicated RTD page (added todocs/index.rsttoctree).llms.txtfor AI-crawler discovery; mirrors the RTD-hostedllms.txt/llms-full.txt/llms-practitioner.txtand lists the in-processget_llm_guide()modes.diff-diff.png(1731x909 hero asset) committed to git so the absoluteraw.githubusercontent.comURL resolves on PyPI and on GitHubmainpost-merge.CONTRIBUTING.md"README is a landing page" rewrite,CLAUDE.mdnew## README disciplinesection,docs-check.mdper-estimator README requirement replaced withllms.txt+ flat-catalog requirement,dev-checklists.md/pre-merge-check.md/review-pr.md/review-plan.mdDocumentation Sync sections updated.docs/doc-deps.yaml18 staleREADME.md / section: "<EstimatorName>"pointers redirected to the new flat-catalog convention.Methodology references (required if estimator / math changes)
Validation
references.htmlwhich resolves after first RTD rebuild post-merge)./llms.txtresolve 200.get_llm_guide()smoke-tested and unchanged (13,166 chars).readme-rendererproduces valid HTML with hero image and all 14 H2s.</p>confirmed.docs/references.rstparses cleanly via docutils (no warnings; full Sphinx build deferred to CI).README.md,docs/references.rst,llms.txt.Security / privacy