gitstack 5.3.0

Git history viewer with insights - Author stats, file heatmap, code ownership
Documentation
//! # gitstack
//!
//! Git history viewer & analysis tool. Intuitively explore Git repositories via TUI.
//!
//! ## Key Features
//!
//! - **Commit history browsing**: Graph-annotated commit log, branch topology analysis
//! - **Code analysis**: File heatmap, code ownership, Change Coupling
//! - **Quality metrics**: Impact score, quality score, technical debt analysis
//! - **AI integration**: Context pack generation, review pack, MCP integration
//! - **i18n support**: Full Japanese/English internationalization (300+ translation keys)
//!
//! ## Usage
//!
//! ```bash
//! # Launch TUI inside a Git repository
//! gitstack
//!
//! # CLI analysis mode
//! gitstack stats --json
//! gitstack heatmap --csv
//! gitstack health
//! ```
//!
//! ## Crate Structure
//!
//! - [`app`] - Application state management (`App` struct)
//! - [`git`] - Git operations wrapper (`git2`-based)
//! - [`stats`] - Statistics & analysis engine
//! - [`tui`] - Terminal UI rendering (`ratatui`-based)
//! - [`i18n`] - Internationalization macros & translation definitions
//! - [`navigation`] - List navigation (`ListNavigation` struct)

pub mod app;
pub mod cache;
pub mod cli;
pub mod compare;
pub mod config;
pub mod event;
pub mod export;
pub mod filter;
pub mod git;
pub mod graph;
pub mod i18n;
pub mod index;
pub mod insights;
pub mod intent;
pub mod metrics;
pub mod navigation;
pub mod pr;
pub mod related_files;
pub mod relevance;
pub mod review_queue;
pub mod risk;
pub mod session;
pub mod split;
pub mod staging;
pub mod stats;
pub mod suggestion;
pub mod topology;
pub mod tui;

pub use app::{App, CommitType, InputMode, QuickAction, SidebarPanel};
pub use cache::{clear_analysis_cache, load_or_compute, load_or_compute_with_repo};
pub use cli::{
    parse_cli_args, parse_tui_options, run_cli_mode, CliCommand, TuiFocusTarget, TuiOptions,
};
pub use compare::{BranchCompare, CompareCommit, CompareTab};
pub use config::{FilterPreset, FilterPresets, LanguageConfig, PRESET_SLOT_COUNT};
pub use event::{GitEvent, GitEventKind};
pub use export::{
    bus_factor_to_json, coupling_to_json, export_coupling_csv, export_coupling_json,
    export_heatmap_csv, export_heatmap_json, export_impact_csv, export_impact_json,
    export_ownership_csv, export_ownership_json, export_quality_csv, export_quality_json,
    export_stats_csv, export_stats_json, export_timeline_csv, export_timeline_json, health_to_json,
    health_to_markdown, heatmap_to_json, impact_to_json, log_to_json, ownership_to_json,
    quality_to_json, stats_to_json, tech_debt_to_json, timeline_to_json,
};
pub use filter::FilterQuery;
pub use git::{
    checkout_branch, checkout_branch_in_repo, compare_branches, compare_branches_from_repo,
    create_branch, create_branch_in_repo, create_commit, create_commit_in_repo, delete_branch,
    delete_branch_in_repo, fetch_remote_at_path, get_blame, get_blame_from_repo, get_commit_diff,
    get_commit_diff_from_repo, get_commit_files, get_commit_files_from_repo, get_file_history,
    get_file_history_from_repo, get_file_patch, get_file_patch_from_repo, get_head_hash,
    get_head_hash_cached, get_head_hash_from_repo, get_index_mtime, get_index_mtime_cached,
    get_index_mtime_from_repo, get_repo_info_cached, get_stash_list, get_status, get_status_cached,
    get_status_from_repo, get_working_file_diff, get_working_file_diff_from_repo, has_staged_files,
    has_staged_files_in_repo, list_branches, list_branches_cached, list_branches_from_repo,
    load_events, load_events_fast, load_events_from_repo, pull, pull_in_repo, push, push_in_repo,
    stage_all, stage_all_in_repo, stage_file, stage_file_in_repo, stash_apply, stash_drop,
    stash_pop, stash_save, unstage_all, unstage_all_in_repo, unstage_file, unstage_file_in_repo,
    BlameLine, BranchInfo, CommitDiff, DiffLine, DiffStats, FileChange, FileChangeStatus,
    FileHistoryEntry, FilePatch, FileStatus, FileStatusKind, RepoInfo, StashEntry,
};
pub use graph::{build_graph, get_graph_color, GraphCell, GraphLayout, GraphRow};
pub use i18n::Language;
pub use index::{
    load_review_pack as load_cached_review_pack, save_review_pack as save_cached_review_pack,
};
pub use insights::{
    actions_to_markdown, build_context_pack, build_context_summary, build_handoff_context,
    build_next_actions, build_review_pack, compute_signals_for_event, explain_recommendation,
    handoff_to_markdown, pack_to_markdown, review_pack_to_markdown, summary_to_markdown,
    verify_patch_risk, ActionRecommendation, ContextPack, ContextSummary, EvidenceLink,
    HandoffContext, ReviewOwnerCandidate, ReviewPack, ReviewRisk, SignalContext, SignalSet,
    MIN_COMMITS_FOR_COUPLING, MIN_COUPLING_RATIO,
};
pub use intent::{classify_intent, ChangeIntent};
pub use metrics::{
    load_metrics, quick_action_usage_enabled, record_quick_action_usage, reset_metrics,
    ActionUsageEntry, MetricsData,
};
pub use navigation::ListNavigation;
pub use pr::{check_gh_available, create_pr, PrCreateState};
pub use related_files::{analyze_related_files, RelatedFiles};
pub use relevance::{calculate_relevance, RelevanceScore};
pub use review_queue::{ReviewItem, ReviewQueue, ReviewStatus};
pub use risk::{calculate_staged_risk, RiskLevel};
pub use session::{detect_sessions, AiSession, SessionStats};
pub use split::{suggest_splits, SplitGroup, SplitSuggestion};
pub use staging::{suggest_groups, StagingGroup};
pub use stats::{
    calculate_activity_timeline, calculate_bus_factor, calculate_change_coupling,
    calculate_file_heatmap, calculate_impact_scores, calculate_ownership, calculate_project_health,
    calculate_quality_scores, calculate_stats, calculate_tech_debt, is_test_file, ActivityTimeline,
    AggregationLevel, AlertSeverity, AuthorStats, BusFactorAnalysis, BusFactorEntry, BusFactorRisk,
    ChangeCouplingAnalysis, CodeOwnership, CodeOwnershipEntry, CommitImpactAnalysis,
    CommitImpactScore, CommitQualityAnalysis, CommitQualityScore, ConfidenceLevel, ContributorInfo,
    FileCoupling, FileHeatmap, FileHeatmapEntry, HealthAlert, HealthAlertKind, HealthConfidence,
    HealthScoreComponent, ProjectHealth, RepoStats, TechDebtAnalysis, TechDebtEntry, TechDebtLevel,
};
pub use suggestion::{generate_suggestions, CommitSuggestion};
pub use topology::{
    analyze_branch_recommendations, analyze_topology, analyze_topology_from_repo, BranchHealth,
    BranchRecommendation, BranchRecommendations, BranchRelation, BranchStatus, BranchTopology,
    HealthWarning, RecommendedAction, TopologyBranch, TopologyConfig,
};