Skip to content

Commit af4fc74

Browse files
igerberclaude
andcommitted
Add AI agent discoverability for practitioner guide
Three discovery surfaces updated so agents find the practitioner workflow regardless of how they encounter the library: 1. Package docstring (help(diff_diff)) — now mentions the 8-step practitioner workflow and practitioner_next_steps() 2. README.md — new "For AI Agents" section after Quick Start, pointing to docs/llms.txt and docs/llms-practitioner.txt 3. pyproject.toml — "Practitioner Guide" URL in project metadata, visible on PyPI sidebar Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9270874 commit af4fc74

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ Signif. codes: '***' 0.001, '**' 0.01, '*' 0.05, '.' 0.1
6767
======================================================================
6868
```
6969

70+
## For AI Agents
71+
72+
If you are an AI agent or LLM using this library, read [`docs/llms.txt`](docs/llms.txt) for a concise API reference with an 8-step practitioner workflow (based on Baker et al. 2025). The workflow ensures rigorous DiD analysis — not just calling `fit()`, but testing assumptions, running sensitivity analysis, and checking robustness.
73+
74+
After estimation, call `practitioner_next_steps(results)` for context-aware guidance on remaining diagnostic steps.
75+
76+
Detailed guide: [`docs/llms-practitioner.txt`](docs/llms-practitioner.txt)
77+
7078
## Features
7179

7280
- **sklearn-like API**: Familiar `fit()` interface with `get_params()` and `set_params()`

diff_diff/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
44
This library provides sklearn-like estimators for causal inference
55
using the difference-in-differences methodology.
6+
7+
For rigorous analysis, follow the 8-step practitioner workflow in
8+
docs/llms-practitioner.txt (based on Baker et al. 2025). After
9+
estimation, call ``practitioner_next_steps(results)`` for context-aware
10+
guidance on remaining diagnostic steps.
11+
12+
AI agent reference: docs/llms.txt
613
"""
714

815
# Import backend detection from dedicated module (avoids circular imports)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Homepage = "https://github.com/igerber/diff-diff"
7979
Documentation = "https://diff-diff.readthedocs.io"
8080
Repository = "https://github.com/igerber/diff-diff"
8181
Issues = "https://github.com/igerber/diff-diff/issues"
82+
"Practitioner Guide" = "https://github.com/igerber/diff-diff/blob/main/docs/llms-practitioner.txt"
8283

8384
[tool.maturin]
8485
# Build the Rust extension module

0 commit comments

Comments
 (0)