You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs refresh: trim README to 188-line landing page; redirect contributor 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>
Copy file name to clipboardExpand all lines: .claude/commands/dev-checklists.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,8 +152,11 @@ Final checklist before approving a PR:
152
152
153
153
3. **Documentation Sync**:
154
154
- [ ] Docstrings updated for all changed signatures
155
-
- [ ] README updated if user-facing behavior changes
156
-
- [ ] REGISTRY.md updated if methodology edge cases change
155
+
- [ ] `diff_diff/guides/llms.txt` updated if a new estimator/feature appears in the public API (this is the AI-agent contract; it cascades to RTD)
156
+
- [ ] `docs/api/*.rst` updated for new modules / signatures
157
+
- [ ] `docs/references.rst` updated if a new scholarly source is cited
158
+
- [ ] `README.md` updated ONLY if (a) new estimator catalog one-liner, (b) hero/badges/tagline change, or (c) top-level capability paragraph (Diagnostics & Sensitivity, Survey Support). Do NOT add usage examples, parameter tables, or per-estimator sections.
159
+
- [ ] `REGISTRY.md` updated if methodology edge cases change
The README is a **landing page**, not the documentation. Each estimator/feature has documentation across multiple authoritative surfaces:
24
+
25
+
-**`diff_diff/guides/llms.txt`** - AI-agent contract (one-line catalog entry per estimator with paper citation + RTD link). Source of truth that mirrors into RTD via `html_extra_path` and into the wheel via `get_llm_guide()`.
26
+
-**`docs/api/*.rst`** - Sphinx API reference (autoclass).
27
+
-**`docs/references.rst`** - Bibliography (one entry per scholarly source, organized by sub-section).
Do NOT search for per-estimator README sections - they were intentionally removed in the 2026-04 docs refresh. The README's `## Estimators` heading is the only valid catalog surface.
130
+
110
131
### 3. Scholarly References Check
111
132
112
133
For each reference category:
113
-
1. Search README.md References section for required citations
134
+
1. Search `docs/references.rst` for required citations (NOT README.md - the bibliography moved out of README in the 2026-04 docs refresh)
114
135
2. Verify author names and year appear together
115
136
3. Report missing references
116
137
117
-
Check patterns (case-insensitive):
138
+
Check patterns (case-insensitive, run against `docs/references.rst`):
118
139
- "Arkhangelsky.*2021" for Synthetic DiD
119
140
- "Callaway.*Sant.Anna.*2021" for staggered
120
141
- "Rambachan.*Roth.*2023" for Honest DiD
121
142
- "Athey.*Imbens.*Qu.*Viviano.*2025" for TROP
122
143
- "Goodman.Bacon.*2021" for Bacon decomposition
123
144
- etc.
124
145
146
+
```bash
147
+
# Example
148
+
grep -i 'Arkhangelsky.*2021' docs/references.rst
149
+
```
150
+
125
151
### 4. API Documentation Check
126
152
127
153
For each RST file in `docs/api/`:
@@ -176,12 +202,12 @@ Generate a summary report:
176
202
```
177
203
=== Documentation Completeness Check ===
178
204
179
-
README Sections:
180
-
[PASS] DifferenceInDifferences - Found in "Basic Difference-in-Differences"
181
-
[PASS] CallawaySantAnna - Found in "Staggered Adoption"
182
-
[FAIL] NewEstimator - NOT FOUND
205
+
llms.txt + README Catalog:
206
+
[PASS] DifferenceInDifferences - Found in llms.txt and README Estimators catalog
207
+
[PASS] CallawaySantAnna - Found in both surfaces
208
+
[FAIL] NewEstimator - missing from llms.txt and README catalog
Copy file name to clipboardExpand all lines: .claude/commands/pre-merge-check.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,7 +187,9 @@ Based on your changes to: <list of changed files>
187
187
```
188
188
### Documentation Sync
189
189
- [ ] Docstrings updated for changed function signatures
190
-
- [ ] README updated if user-facing behavior changes
190
+
- [ ] `diff_diff/guides/llms.txt` updated if the public API surface changed (AI-agent contract)
191
+
- [ ] `docs/api/*.rst` and `docs/references.rst` updated as appropriate
192
+
- [ ] `README.md` updated ONLY for landing-page-relevant changes (catalog one-liner, hero/badges/tagline, top-level capability paragraph). Per CONTRIBUTING.md, README is not the place for usage examples or per-estimator sections.
- Documentation updates (`diff_diff/guides/llms.txt` for new public-API surfaces, `docs/api/*.rst`, `docs/references.rst` for new citations, tutorials, CONTRIBUTING.md, CLAUDE.md if design patterns change). README updates only if the change affects the landing page (new estimator catalog one-liner, hero/badges/tagline, top-level capability paragraph) - per CONTRIBUTING.md, README is not the place for usage examples or per-estimator sections.
229
229
- For bug fixes: did the plan grep for ALL occurrences of the pattern, or just the one reported?
Copy file name to clipboardExpand all lines: .claude/commands/review-pr.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,8 +45,10 @@ Analyze PRs across 6 dimensions:
45
45
46
46
### 4. Documentation Review
47
47
- Docstrings for new/modified functions
48
-
- README updates if needed
49
-
- API documentation (RST files)
48
+
-`diff_diff/guides/llms.txt` updated if a new public-API surface landed (AI-agent contract)
49
+
- API documentation (RST files in `docs/api/`)
50
+
-`docs/references.rst` updated for new scholarly citations
51
+
- README updated ONLY for landing-page-relevant changes (catalog one-liner, hero/badges/tagline, top-level capability paragraph). Per CONTRIBUTING.md, README is not the place for usage examples or per-estimator sections.
50
52
- Inline comments for complex logic
51
53
52
54
### 5. Performance
@@ -133,7 +135,7 @@ If no PR number is provided, use AskUserQuestion to request it.
133
135
134
136
## Part 4: Documentation Assessment
135
137
136
-
[Check for docstrings, README updates, API docs as needed]
138
+
[Check docstrings, llms.txt for new public-API surfaces, API RST docs, references.rst for new citations, README only for landing-page-relevant changes]
Copy file name to clipboardExpand all lines: CLAUDE.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,21 @@ category (`Methodology/Correctness`, `Performance`, or `Testing/Docs`):
114
114
|-------|----------|----|----------|
115
115
| Description of deferred item |`file.py`| #NNN | Medium/Low |
116
116
117
+
## README discipline
118
+
119
+
`README.md` is a **landing page**, not the documentation. Target ~190 lines. The 3,119-line README that existed before the 2026-04 docs refresh grew because workflow conventions told contributors to add to README on every change.
120
+
121
+
When adding new functionality, the source of truth is:
122
+
123
+
-**`diff_diff/guides/llms.txt`** for the AI-agent contract (one-line catalog entry per estimator with paper citation + RTD link). This file is bundled in the wheel and published on RTD via `docs/conf.py``html_extra_path`.
124
+
-**`docs/api/*.rst`** for full API reference.
125
+
-**`docs/references.rst`** for scholarly citations.
126
+
-**`docs/tutorials/*.ipynb`** for hands-on examples.
127
+
-**`CHANGELOG.md`** for release notes.
128
+
-**`README.md`** for ONE LINE in the `## Estimators` flat catalog (or `## Diagnostics & Sensitivity` for diagnostic-class features). Do NOT add usage examples, parameter tables, per-estimator sections, or full bibliographies.
129
+
130
+
`/docs-impact` and `/docs-check` enforce these surfaces. See `CONTRIBUTING.md` "README is a landing page, not the docs" for the full convention.
131
+
117
132
## Testing Conventions
118
133
119
134
-**`ci_params` fixture** (session-scoped in `conftest.py`): Use `ci_params.bootstrap(n)` and
0 commit comments