//! Curated re-exports for plugin and capability authors.
//!
//! `use maat::prelude::*;` brings into scope every type, trait, and
//! macro needed for daily rules + entity authoring (the 95% case).
//!
//! # Public API contract (DOC-1)
//!
//! **This module is the public API surface plugin authors depend on.**
//! Post-marketplace, third-party plugins on crates.io will pin
//! `maat = "x.y.z"` and import these symbols. The contract:
//!
//! - **Adding** a re-export here is a minor (semver-additive) change.
//! - **Removing or renaming** a re-export is a **breaking change** and
//!   requires a major version bump. Every published plugin importing
//!   the symbol breaks otherwise.
//!
//! The single source of truth for the full prelude surface is
//! [`prelude_coverage.rs`](../../tests/prelude_coverage.rs) — every
//! exported symbol is referenced there as `let _: Option<T> = None;`,
//! so removing one breaks the test. Modify the test in lockstep with
//! the prelude; that's the review checkpoint.
//!
//! # Curation policy
//!
//! This prelude is for **daily rules + entity authoring** only. Wizard
//! imperative machinery (`Wizard`/`WizardAction`/`WizardResponse`) is
//! engine-internal post-WI1-7. Manifest types (`PluginManifest`,
//! `PluginKind`, etc.) are macro-generated and live in
//! [`super::manifest`] for the rare direct-construction case (tests,
//! dynamic plugins). For rarer surface area, use the targeted
//! sub-preludes:
//!
//! - [`maat::traits`](super::traits) — plugin extension-point traits
//! - [`maat::manifest`](super::manifest) — plugin manifest types
//! - [`maat::view`](super::view) — view template machinery
//!
//! See `docs/superpowers/specs/completed/2026-05-11-fa1-facade-curation.md`
//! for the curation rationale.

// ── Core identifiers ──────────────────────────────────────────────────────
pub use maat_sdk_types::types::{
    CombatId, EntityId, EntityTypeId, PhaseId, PlayerId, PoolId, SeatId,
    TagSet, TeamId,
};
pub use maat_sdk_types::types::entity_type_id_for;

// ── Board ─────────────────────────────────────────────────────────────────
pub use maat_sdk_types::types::Position;
pub use maat_sdk_types::board::ids::{BoardNodeId, EdgeId, FaceId};
pub use maat_sdk_types::board::{BoardGraph, FaceCoord};
pub use maat_sdk_types::board::builders::BoardBuilder;

// ── Events and pipeline ───────────────────────────────────────────────────
pub use maat_sdk_types::events::{Decider, EventKind, GameEvent, ProposeResult};
pub use maat_sdk_types::handler::{Decision, HandlerResponse};
pub use maat_sdk_types::trait_data::PipelineRole;
pub use maat_sdk_types::priority::Priority;

// ── Trait data (entity components) ───────────────────────────────────────
pub use maat_sdk_types::trait_data::{
    ActivatableData, AreaShape, ArealData, AttachedData, ConnectorData,
    ContainerData, ContainerType, CostHint, FeaturedData, GatedData,
    MorphableData, MorphCondition, MovableData, MovementType, NamedData,
    NarratedData, ObservableData, ObscurableData, OwnableData,
    PerceivabilityFlags, QuantifiedData, RangeKind, RangedData, SenseData,
    SustainedData, SustainGroup, TangibleData, TargetMode, TemporalData,
    TraitChangeSet, TraitSet,
};

// ── Pools and ownership ───────────────────────────────────────────────────
pub use maat_sdk_types::types::Owner;
pub use maat_sdk_types::trait_data::{PoolDisplay, PoolType, ResourcePool};

// ── Phase system ─────────────────────────────────────────────────────────
pub use maat_sdk_types::phases::{
    ActivePlayers, ActiveTurn, PhaseDescriptor, PhaseNext, TurnCompletion,
    TurnOrder, TurnStyle, TurnsPerActor,
};

// ── Entity blueprint ──────────────────────────────────────────────────────
pub use maat_sdk_types::blueprint::EntityBlueprint;

// ── Predicate IR + dice + roller ──────────────────────────────────────────
pub use maat_sdk_types::predicate::{
    EntityRef, EntitySet, MetricKind, Op, PoolMode, Predicate, Value,
};
pub use maat_sdk_types::types::{DiceSpec, RollerId};

// ── Settings schema (plugin model_settings / view_settings) ───────────────
pub use maat_sdk_types::settings::{
    SettingsField, SettingsFieldType, SettingsSchema, SettingsValue,
};

// ── Direction (board topology) ────────────────────────────────────────────
pub use maat_sdk_types::view::Direction;

// ── Requirements (WI1) ─────────────────────────────────────────────────────
pub use maat_sdk_types::requirement::{
    AmountSpec, CountSpec, OptionSource, Requirement, RequirementBinding,
    RequirementGroup, RequirementHistory, RequirementSpec,
};

// ── Entity creation pipeline (CR1, generalized by WI1 phase 2) ────────────
pub use maat_sdk_types::creation::{
    ComposeCtx, CreationField, CreationGroup, CreationHistory, CreationSpec,
    CreationStatus, PrefillValue,
};
pub use maat_sdk_types::composition_registry::ComposeResult;

// ── Distance / metric / board-fit ─────────────────────────────────────────
pub use maat_sdk_types::distance::DistanceMetric;
pub use maat_sdk_types::types::BoardFit;
pub use maat_sdk_types::trait_data::MorphForm;

// ── Movement patterns (Step, etc.) ────────────────────────────────────────
pub use maat_sdk_types::movement::Step;

// ── View coverage (VS1) ───────────────────────────────────────────────────
pub use maat_sdk::{EntityTypeDeclaration, TagSpec};
pub use maat_sdk_types::coverage::{
    CanvasMode, CanvasModeStatus, ViewAssetDeclaration, ViewCoverageReport,
};

// ── Catalog + components + entity state + suspension ─────────────────────
pub use maat_sdk_types::catalog::{EntityCatalogEntry};
pub use maat_sdk_types::components::ComponentStore;
pub use maat_sdk_types::entity_state::EntityState;
pub use maat_sdk_types::events::{Suspension, SuspensionKind, SuspensionOption};
pub use maat_sdk_types::predicate::SourceKey;
pub use maat_sdk_types::predicate::eval::EvalContext;
pub use maat_sdk_types::predicate::explain::{ExplainNode, ResolvedValue};
pub use maat_sdk_types::reachability::ReachableSet;
pub use maat_sdk_types::plugin_version::PluginRef;
pub use maat_sdk_types::staged_decision::{GroupDecl, OpenGroup};

// ── Staged decisions (plugin-facing surface used by Filter handlers)
// Plugins emit `Decision::Wizard(StagedDecision::new(_, kind, _))` and
// declare race-group composers via `register_wizard_spec`. The imperative
// `Wizard<'_>` / `WizardAction` / `WizardResponse` surface was retired by
// WI1-7 — those are engine-internal now (`maat_engine::composer`).
pub use maat_sdk_types::staged_decision::{
    ChoicePayload, ChoiceValue, CompletionRule, DecisionOption,
    DecisionStage, GroupId, InputShape, PresentationMode, ResolvedGroup,
    StagedDecision, StagedDecisionDecl, StageId, WizardKind,
};

// ── Plugin manifest types ────────────────────────────────────────────────
// 0750: removed `PluginManifest`, `PluginKind`, `PluginBackend`, and
// `SpdxLicenseId` from the prelude. PG1's `#[model_plugin]` /
// `#[view_plugin]` / `#[capability_plugin]` macros generate the
// manifest now; plugin authors no longer construct it by hand. Any
// remaining direct callers can import from `maat_sdk_types::plugin_manifest`.
pub use maat_sdk_types::plugin_id::CanonicalId;
pub use maat_sdk_types::plugin_version::Blake3;

// ── View template machinery (interim) ─────────────────────────────────────
pub use maat_sdk_types::view::{
    Condition, FieldRef, GenericWidgetRegistry, PoolField, Slot, SlottedHint,
    TextSource, ViewNode, ViewTemplate,
};

// ── Handler context + core plugin traits ─────────────────────────────────
pub use maat_sdk_types::plugin_slices::GameContext;
pub use maat_sdk::{ModelPlugin, SetupContext};
// `CapabilityPlugin` and `ViewPluginMetadata` live in `maat::traits`.
// View renderer trait `ViewPlugin` lives in `maat_view_sdk::prelude`.

// ── Derive and attribute macros (sdk-derive) ─────────────────────────────
pub use maat_sdk_derive::{
    capability_plugin, gate, handler, handlers, model_plugin, plugin,
    view_plugin, EntityType,
};
