# Changelog

All notable changes to this project will be documented in this file.

---

## [Unreleased]

<!-- Auto-generated 2025-12-21 by update-changelog.sh -->

### Added

- **workflow**: implement Phase 1 documentation detection ([1324721](https://github.com/Data-Wise/aiterm/commit/1324721))

### Documentation

- session completion - Phase 1 documentation automation ([8f2750b](https://github.com/Data-Wise/aiterm/commit/8f2750b))

### Added
- 🍺 **Homebrew Distribution** - macOS users can now install via `brew install data-wise/tap/aiterm`
  - Added formula to private Homebrew tap
  - Automatic dependency management
  - Simple updates with `brew upgrade aiterm`
  - Primary installation method for macOS

### Workflow & Documentation
- 🔧 **Created `/workflow:done` Command** - Critical missing ADHD-friendly session completion
  - Captures session progress from git changes (commits, diffs, file changes)
  - Updates .STATUS file automatically
  - Generates commit messages based on work completed
  - 474 lines, comprehensive implementation
  - Location: `~/.claude/commands/workflow/done.md`
  - Integrates with `/workflow:recap` for context restoration
  - ADHD-optimized with 30-second fast path

### Changed
- Updated README with Homebrew as recommended macOS installation method
- Added installation methods comparison table
- Updated website documentation (docs/getting-started/*.md, docs/index.md)
- Enhanced CLAUDE.md with Homebrew installation methods

### Documentation
- Created `HOMEBREW-DISTRIBUTION-PLAN.md` - comprehensive Homebrew roadmap
- Created `HOMEBREW-QUICKSTART.md` - quick implementation guide
- Updated `IDEAS.md` with:
  - Phase 2.6: Workflow Commands & Documentation Automation
  - Phase 2.7: Distribution & Installation (Homebrew complete)
  - Phase 3: Public Homebrew release plan
  - Phase 4.5: Official Homebrew Core submission plan
- Updated `ROADMAP.md` with Phase 2.6 (Workflow & Documentation Automation)
  - 3-phase enhancement plan for `/workflow:done`
  - Detection methods for CLAUDE.md, mkdocs.yml staleness
  - Auto-update strategies for documentation ecosystem
- Deployed updated documentation to GitHub Pages

---

## [0.1.0] - 2024-12-18 - FIRST PRODUCTION RELEASE 🎉

**First production release of aiterm!**

### 🎉 Highlights

- ✅ Production-ready CLI with 51 tests (83% coverage)
- ✅ Comprehensive documentation (2,647 lines)
- ✅ UV-optimized installation (10-100x faster than pip)
- ✅ Repository renamed to "aiterm"
- ✅ Deployed docs to GitHub Pages

### Installation

```bash
# Recommended (UV - fastest!)
uv tool install git+https://github.com/Data-Wise/aiterm

# Alternative (pipx)
pipx install git+https://github.com/Data-Wise/aiterm
```

**Documentation:** https://data-wise.github.io/aiterm/

### What's New in v0.1.0

#### Core Features
- 🎯 Smart context detection (8 project types)
- 🎨 Auto profile switching for iTerm2
- ⚙️ Claude Code integration
- 📦 8 auto-approval presets
- 🧪 Well-tested (51 tests, 83% coverage)

#### Documentation (NEW!)
- Complete installation guide (UV, pipx, dev)
- CLI reference with all commands
- Claude Code integration guide (8 presets explained)
- Real-world workflows guide (10+ examples)
- Contributing guide
- Architecture documentation

#### Performance
- UV build system (10-100x faster installation)
- < 100ms for all operations
- < 2 minutes full setup

#### Testing
- Comprehensive testing report
- Real workflow validation
- All 51 tests passing

### Repository
- Renamed from `iterm2-context-switcher` to `aiterm`
- GitHub: https://github.com/Data-Wise/aiterm
- Docs: https://data-wise.github.io/aiterm/

---

## [0.1.0-dev] - 2024-12-16 - Development Preview

### 🎉 aiterm Python CLI is Here!

The first functional Python release of aiterm, migrated from zsh to a modern CLI.

### Installation

```bash
# Recommended (uv)
uv tool install git+https://github.com/Data-Wise/aiterm

# Alternative (pipx)
pipx install git+https://github.com/Data-Wise/aiterm
```

### New Features

#### Context Detection (8 types)
- **Production** 🚨 - Red theme for `*/production/*` paths
- **AI Sessions** 🤖 - Purple theme for `*/claude-sessions/*`
- **R Packages** 📦 - Blue theme (DESCRIPTION file)
- **Python** 🐍 - Green theme (pyproject.toml)
- **Node.js** 📦 - Dark theme (package.json)
- **Quarto** 📊 - Blue theme (_quarto.yml)
- **Emacs** ⚡ - Purple theme (init.el, Cask)
- **Dev-Tools** 🔧 - Amber theme (commands/, scripts/)

#### Claude Code Integration
- `ait claude settings` - View settings summary
- `ait claude backup` - Backup settings.json
- `ait claude approvals list` - Show allow/deny permissions
- `ait claude approvals presets` - List 8 ready-to-use presets
- `ait claude approvals add <preset>` - Add preset permissions

#### Auto-Approval Presets
- **safe-reads** - Safe read-only operations
- **git-ops** - Git commands (status, diff, log, branch)
- **github-cli** - GitHub CLI (gh pr, gh issue)
- **python-dev** - Python tools (pytest, pip, ruff)
- **node-dev** - Node.js tools (npm, yarn, pnpm)
- **r-dev** - R development (R, Rscript)
- **web-tools** - Web utilities (curl, wget, jq)
- **minimal** - Basic safe commands only

#### CLI Commands
```bash
ait --version          # Show version
ait doctor             # Health check
ait detect             # Detect project context
ait switch             # Apply context to terminal
ait context detect     # Full context detection
ait context apply      # Apply to iTerm2
ait profile list       # List profiles
```

### Tech Stack
- **Language:** Python 3.10+
- **CLI Framework:** Typer
- **Terminal Output:** Rich
- **Testing:** pytest (51 tests, 83% coverage)
- **Distribution:** uv/pipx/PyPI

### Files Added
- `src/aiterm/` - Main package (cli, context, terminal, claude, utils)
- `tests/` - 51 tests across 4 files
- `templates/commands/` - 6 hub commands + 5 archived
- `pyproject.toml` - Modern Python project config

### What's Next (v0.2.0)
- Hook management system
- Command template library
- MCP server integration
- Gemini CLI support

---

## [3.0.0] - 2025-12-15 - PROJECT PIVOT

### 🎉 Major Change: aiterm → **aiterm**

**Vision Evolution:**
- **Was:** zsh-based iTerm2 context switcher
- **Now:** Python CLI for optimizing terminals for AI development

**Why the pivot:**
- Expand beyond iTerm2 to support multiple terminals
- Deep integration with Claude Code and Gemini CLI
- Hook/command/MCP management systems
- Easier to extend and maintain in Python
- Better testing and distribution (PyPI)

### Project Reorganization
- **New name:** aiterm (AI Terminal optimizer)
- **New architecture:** Python CLI (Typer + Rich)
- **New scope:** Multi-tool terminal optimization
- **Target users:** DT first, then public release

### Documentation Overhaul
- ✅ `IDEAS.md` - Full feature roadmap (Phases 1-4)
- ✅ `ROADMAP.md` - Week 1 MVP plan (day-by-day)
- ✅ `ARCHITECTURE.md` - Technical design
- ✅ `CLAUDE.md` - Updated for Python project
- ✅ `README.md` - Complete rewrite
- ✅ `.STATUS` - Reset to v0.1.0-dev

### v2.5.0 Features Preserved
All existing functionality will be ported to Python:
- 8 context types (R, Python, Node, Quarto, MCP, Production, AI sessions, Dev-tools)
- Profile switching
- Tab titles with icons
- Git branch + dirty indicator
- Status bar integration
- 15 comprehensive tests

### What's Next
See `ROADMAP.md` for Week 1 MVP plan:
- Day 1-2: Python project setup
- Day 3-4: Core terminal integration
- Day 5: Claude Code settings management
- Day 6: Testing & documentation
- Day 7: Polish & dogfooding

**Target:** DT using aiterm daily by Dec 22, 2025

---

## [2.5.0] - 2025-12-15 - Final zsh-based release

### Added
- **Comprehensive test suite** - `scripts/test-context-switcher.sh`
  - Tests all 8 context detection scenarios
  - Validates profile switching and title/badge setting
  - Includes git dirty indicator testing
  - 15 test cases with full coverage
- **Statusline theme alternatives** - `statusline-alternatives/`
  - 3 color theme variants (cool-blues, forest-greens, purple-charcoal)
  - Preview and installation scripts
  - Theme comparison documentation
- **Expanded auto-approvals** - Updated `.claude/settings.local.json`
  - Added 40+ common safe commands (gh, mkdocs, find, grep, jq, etc.)
  - Reduces approval friction for routine operations

## [2.5.0] - 2025-12-15

### Added
- **Comprehensive test suite** - `scripts/test-context-switcher.sh`
  - Tests all 8 context detection scenarios
  - Validates profile switching and title/badge setting
  - Includes git dirty indicator testing
  - 15 test cases with full coverage
- **Statusline theme alternatives** - `statusline-alternatives/`
  - 3 color theme variants (cool-blues, forest-greens, purple-charcoal)
  - Preview and installation scripts
  - Theme comparison documentation
- **Expanded auto-approvals** - Updated `.claude/settings.local.json`
  - Added 40+ common safe commands (gh, mkdocs, find, grep, jq, etc.)
  - Reduces approval friction for routine operations

## [2.4.0] - 2025-12-14

### Added
- **Status Bar Integration** - Display context in iTerm2 status bar
  - `\(user.ctxIcon)` - Context icon (📦, 🐍, 🔧, etc.)
  - `\(user.ctxName)` - Project name
  - `\(user.ctxBranch)` - Git branch
  - `\(user.ctxProfile)` - Active profile name
- **Status bar documentation** - New docs/guide/status-bar.md with setup guide

### Changed
- Refactored detection to set user variables alongside profile/title
- Variables update on every directory change

## [2.3.0] - 2025-12-14

### Added
- **iTerm2 Triggers for Claude Code** - Auto-notifications in AI-Session profile
  - Bounce Dock Icon when tool approval needed (`Allow .+?`)
  - Highlight errors in red (`Error:|error:|failed`)
  - macOS notification on `/cost` command
  - Highlight success markers in green (`✓|completed`)
- **Trigger documentation** - Updated docs/guide/triggers.md with customization guide

### Changed
- AI-Session profile now includes built-in triggers
- Triggers activate automatically when using AI-Session profile

## [2.2.0] - 2025-12-14

### Added
- **Git branch in title** - Shows current branch: `📦 medfit (main)`
- **Git dirty indicator** - Shows `*` when uncommitted changes: `📦 medfit (main)*`
- **Install script** - `scripts/install-profiles.sh` for easy setup
- **Profiles in repo** - `profiles/context-switcher-profiles.json` for distribution

### Changed
- Titles now include git info for all contexts
- Long branch names truncated (>20 chars)

## [2.1.0] - 2025-12-14

### Added
- **Dynamic Profiles** - Auto-installed color themes for all project types
  - R-Dev: Blue theme 📦
  - AI-Session: Purple theme 🤖
  - Production: Red theme 🚨
  - Dev-Tools: Amber/orange theme 🔧
  - Emacs: Purple/magenta theme ⚡
  - Python-Dev: Green theme 🐍
  - Node-Dev: Dark theme 📦
- **Quarto profile switching** - Uses R-Dev profile (blue theme) 📊
- **MCP profile switching** - Uses AI-Session profile 🔌
- **Emacs profile switching** - New dedicated purple theme ⚡

### Changed
- All project types now have profile + icon switching
- Profiles auto-load via iTerm2 Dynamic Profiles

## [2.0.1] - 2025-12-14

### Added
- **Dev-Tools profile** - New profile for dev-tools projects with 🔧 icon
- **scripts/ detection** - Dev-tools now detected by `scripts/` directory (not just `commands/`)

### Fixed
- **Shared detector bypass** - Skip generic "project" type, use local detection for specifics
- **False positive fix** - Require `.git` for dev-tools detection (prevents `~/scripts` false positive)
- **iTerm2 title setting** - Profiles must use "Session Name" for escape sequences to work

### Changed
- Detection now more specific: dev-tools requires git repo + commands/ or scripts/

## [2.0.0] - 2025-12-14

### Added
- **MkDocs documentation site** - Material theme, dark/light toggle
- **GitHub Pages deployment** - Auto-deploy on push to main
- **Tab title support** - Icons + project names in tab title
- **Profile caching** - Prevents redundant profile switches
- **Hook registration guard** - Prevents duplicate hooks
- **New commands** (in ~/.claude/commands/):
  - `/mkdocs-init` - Create new documentation site
  - `/mkdocs` - Status and actions menu
  - `/mkdocs-preview` - Quick preview

### Changed
- **Removed badges** - Using tab titles instead (more reliable)
- **Simplified detection** - File-based only, no glob patterns
- **OSC 2 for titles** - Window title escape sequence
- **Emacs detection** - Now checks `Cask`, `.dir-locals.el`, `init.el`, `early-init.el`
- **Dev-tools detection** - Checks for `commands/` directory

### Fixed
- Loop issues with badge escape sequences
- OMZ title conflicts (DISABLE_AUTO_TITLE)
- Profile switch escape sequence format (`it2profile -s`)

### Documentation
- 7 documentation pages covering installation, guides, and reference
- Live site: https://data-wise.github.io/aiterm/

## [1.1.0] - 2025-12-13

### Added
- **Git dirty indicator** - Badges now show `✗` when repo has uncommitted changes
- **New context patterns:**
  - Python projects (`pyproject.toml`) → Python-Dev profile
  - Node.js projects (`package.json`) → Node-Dev profile
  - Quarto projects (`_quarto.yml`) → 📊 icon
  - MCP server projects → 🔌 icon
  - Emacs Lisp projects → ⚡ icon
- **Verification script** - `scripts/verify-setup.sh`

### Changed
- Refactored main function with clear priority sections
- Improved code organization with helper functions

## [1.0.0] - 2025-12-13

### Added
- Initial project structure
- Core auto-switching integration (iterm2-integration.zsh)
- Profile creation guide
- Setup guide with verification tests
- ADHD-friendly quick reference

## [Unreleased]

### Planned
- Production warning sound/bell
- Smart triggers for test results

---

**Project Status:** Complete (v2.4.0)
**Live Docs:** https://data-wise.github.io/aiterm/
