Skip to content

Release v0.11.0

Project Config & Smart Diff - Team-Shared Configuration and Intelligent Diff Truncation

Introduces project-level configuration for team-shared conventions, commit convention definitions (Conventional/Gitmoji/Custom), and intelligent file-level diff truncation that replaces the old byte-level approach.

Added

Project-Level Configuration

  • New .gcop/config.toml for team-shared, non-sensitive configuration
  • Searches upward from working directory, bounded by .git root
  • Merges with user-level config; project config overrides user config
  • Security check warns if api_key is found in project config
  • New gcop-rs init --project command to scaffold .gcop/config.toml in repo root

Commit Convention Definitions

  • New [commit.convention] config section to guide LLM-generated commit messages
  • Three built-in styles: conventional (type(scope): description), gitmoji (:emoji: description), custom
  • Optional types list to restrict allowed commit types
  • Optional template and extra_prompt for full customization
  • Convention is injected into LLM prompt as guidance (no hard validation)

Smart Diff Truncation

  • Replaces byte-level truncation with file-level intelligent truncation
  • Auto-detects generated files (.lock, .min.js, package-lock.json, pnpm-lock.yaml, go.sum, etc.) and downgrades to summary-only
  • Sorts remaining files by size, greedily packs within token budget
  • All files retain at least a stats summary (+N -M lines)
  • New FileDiff struct and split_diff_by_file() / smart_truncate_diff() functions

Changed

Configuration Load Priority Updated

  • New 5-level priority (low to high): Defaults, User config, Project config, GCOP__* env vars, CI mode
  • load_config_from_path() now accepts optional project config path

Diff Truncation Message Improved

  • Old: "Diff too large, truncated to avoid exceeding LLM token limit"
  • New: "Diff too large, some files shown as summary only to fit LLM token limit"

Documentation Updated

  • init command docs: added --project option
  • Configuration guide: added project-level config section with priority table and security notes
  • Provider and installation docs: minor corrections for macOS paths and Gemini references

Upgrade

bash
# Homebrew
brew upgrade gcop-rs

# Cargo
cargo install gcop-rs

# pip
pip install --upgrade gcop-rs