"""Gold Corpus management — sampling, splits, and inter-annotator agreement.

This package provides tooling to:
1. Sample a stratified corpus from document metadata (task 7.1, 7.2)
2. Create dataset splits with a frozen holdout (task 7.4)
3. Compute inter-annotator agreement metrics (task 7.3)
"""

from services.intelligence_pipeline_v3.gold_corpus.agreement import (
    AgreementThresholds,
    InterAnnotatorReport,
    compute_cohens_kappa,
    compute_weighted_kappa,
)
from services.intelligence_pipeline_v3.gold_corpus.sampler import (
    CorpusSamplingConfig,
    DiversityRequirements,
    DocumentMetadata,
    LengthBucket,
    SourceType,
    StratificationDimensions,
    sample_corpus,
    validate_corpus_coverage,
)
from services.intelligence_pipeline_v3.gold_corpus.splits import (
    CorpusSplit,
    SplitConfig,
    SplitManifest,
    create_splits,
    freeze_holdout,
    select_hard_cases,
)

__all__ = [
    # Sampler
    "CorpusSamplingConfig",
    "DiversityRequirements",
    "DocumentMetadata",
    "LengthBucket",
    "SourceType",
    "StratificationDimensions",
    "sample_corpus",
    "validate_corpus_coverage",
    # Splits
    "CorpusSplit",
    "SplitConfig",
    "SplitManifest",
    "create_splits",
    "freeze_holdout",
    "select_hard_cases",
    # Agreement
    "AgreementThresholds",
    "InterAnnotatorReport",
    "compute_cohens_kappa",
    "compute_weighted_kappa",
]
