"""Section attribution: which parts of a config earn their keep.

Three stages (ADR-0007, docs/07-ablation.md):

0. **Static token cost** — exact, zero variance, zero API calls. Available on
   its own as `ablate cost`, and for a lot of users it alone justifies the
   install.
1. **Randomized subset screening** — `R ≈ 2K + 8` variants with each section
   independently kept at p=0.5, one trial per (variant, task), fit
   `y ~ task fixed effects + Σ β_k · mask_k` under a ridge penalty. Every trial
   informs every β, which is why this beats leave-one-out at equal budget.
   **Screening-grade: ranked candidates for follow-up, not verdicts.**
2. **Confirmatory paired A/B** at full N on the target model, for the top-|β|
   sections and the large-token/near-zero-β deletion candidates.

The two-stage split exists because stage 1 runs on a cheap model, and config
sensitivity may not transfer across model tiers. Stage 2 contains that risk and
is not optional.
"""

from ablate.ablation.apply import ApplyPlan, plan_apply, write_apply
from ablate.ablation.design import (
    EXTRA_VARIANTS,
    MAX_PAIRWISE_CORR,
    DesignConditioning,
    ScreeningDesign,
    build_design,
)
from ablate.ablation.pipeline import (
    DEFAULT_CONFIRMATIONS,
    AblationResult,
    Confirmation,
    ScreeningResult,
    ScreenRow,
    ablatable,
    confirm,
    screen,
    select_candidates,
)
from ablate.ablation.regression import RidgeFit, SectionEffect, fit_sections

__all__ = [
    "DEFAULT_CONFIRMATIONS",
    "ApplyPlan",
    "plan_apply",
    "write_apply",
    "AblationResult",
    "Confirmation",
    "RidgeFit",
    "ScreenRow",
    "ScreeningResult",
    "SectionEffect",
    "ablatable",
    "confirm",
    "fit_sections",
    "screen",
    "select_candidates",
    "EXTRA_VARIANTS",
    "MAX_PAIRWISE_CORR",
    "DesignConditioning",
    "ScreeningDesign",
    "build_design",
]
