//! Dirigent Projects
//!
//! Project management crate for the Dirigent system. Trait-based,
//! file-backed, async-first (following the archivist pattern).
//!
//! # Architecture
//!
//! - `ProjectStore` trait defines the storage interface
//! - `FileBasedProjectStore` implements file-backed persistence
//! - Storage uses one directory per project with atomic JSON writes
//! - Protocol types from `dirigent_protocol::project` are shared with WASM
//!
//! # Phases
//!
//! - Phase 1: Project CRUD (implemented)
//! - Phase 2: Repository management, working dir resolution (scaffolded)
//! - Phase 3: Git integration (scaffolded)
//! - Phase 4: Worktree support (scaffolded)
//! - Phase 5: Bindings (scaffolded)

pub mod detection;
pub mod error;
pub mod file_store;
pub mod git;
pub mod params;
pub mod storage;
pub mod traits;

// Re-export commonly used types
pub use error::{ProjectError, Result};
pub use file_store::FileBasedProjectStore;
pub use params::{
    AddRepositoryParams, AddWorktreeParams, BindParams, CreateProjectParams, ProjectFilter,
    ProjectUpdate, WorktreeUpdate,
};
pub use traits::ProjectStore;

// Re-export detection types
pub use detection::{
    create_projects_from_import, detect_projects, detect_worktree, find_multi_path_groups,
    normalize_project_path, DetectedProject, DiscoveredImportProject,
    ImportProjectCreationRequest, ImportProjectCreationResult, MultiPathHint,
    ProjectDetectionResult, ProjectResolution, WorktreeHint,
};
