Skip to content

Redesign CausalPy method selection skill#931

Merged
drbenvincent merged 5 commits into
mainfrom
cursor/redesign-method-selection-skill
Jun 8, 2026
Merged

Redesign CausalPy method selection skill#931
drbenvincent merged 5 commits into
mainfrom
cursor/redesign-method-selection-skill

Conversation

@drbenvincent

@drbenvincent drbenvincent commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace flat keyword routing with ordered intake, a text decision tree, and four output contracts (Matched / Ambiguous / Not identifiable / Not in CausalPy).
  • Add disambiguation cards, a capability matrix, and a not-in-CausalPy reference so agents stop force-fitting unsupported designs.
  • Add CITS routing via InterruptedTimeSeries with comparison series as predictors.
  • Rebased onto current main and polished for review: trimmed YAML description into reference/triggers.md, documented staggered DiD untreated-period identification support (Warn when staggered DiD ATTs lack untreated-period support #949), and cross-linked causal-detective after a matched route.

Why now

choosing-causalpy-methods on main still uses flat Fast Routing. This PR fills the agent force-fitting gap and complements #952's causal-detective skill (post-selection validation).

Reviewer guide

  1. Start with causalpy/skills/choosing-causalpy-methods/SKILL.md.
  2. Read reference/decision_tree.md for the canonical routing algorithm.
  3. Spot-check one disambiguation card (e.g. its_vs_sc_vs_did.md) and method_capability_matrix.md.
  4. Confirm the capability matrix matches running-causalpy-experiments/SKILL.md output exceptions.

Out of scope

  • Decision AI Hub publish (follow-up after merge).
  • Deeper causal-detective integration beyond the Matched-route cross-link.

Test plan

  • prek run on touched skill files
  • Rebased onto current main
  • CI on rebased branch
  • Manual read-through: capability matrix rows match execution-skill exceptions

@read-the-docs-community

read-the-docs-community Bot commented May 25, 2026

Copy link
Copy Markdown

Documentation build overview

📚 causalpy | 🛠️ Build #32840606 | 📁 Comparing eafc26a against latest (c107d4e)

  🔍 Preview build  

1 file changed
± 404.html

@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (2f2685c) to head (1407a3b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #931   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files          89       89           
  Lines       14105    14105           
  Branches      854      854           
=======================================
  Hits        13404    13404           
  Misses        489      489           
  Partials      212      212           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

drbenvincent and others added 5 commits June 8, 2026 16:02
Make method routing more reliable for agents by replacing flat fast routing with ordered intake, text-based routing, explicit no-fit outcomes, and focused disambiguation references.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the method-selection skill easier to discover for plain-language impact questions that imply quasi-experimental causal inference.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route comparative interrupted time-series questions to InterruptedTimeSeries with comparison series as predictors, and clarify when to prefer synthetic control.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep CITS covered in routing without elevating it in the main skill introduction.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rebase onto main and tighten the skill for review: trim YAML description into a triggers reference, document staggered DiD untreated-period identification support, cross-link causal-detective after a matched route, and update the skills README blurb.

Co-authored-by: Cursor <cursoragent@cursor.com>
@drbenvincent drbenvincent force-pushed the cursor/redesign-method-selection-skill branch from eafc26a to 1407a3b Compare June 8, 2026 15:03
@drbenvincent drbenvincent marked this pull request as ready for review June 8, 2026 15:32
@drbenvincent drbenvincent added the agents Agent related issues specifically for use by developers label Jun 8, 2026
@drbenvincent drbenvincent merged commit efaccfe into main Jun 8, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent related issues specifically for use by developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant