Commit Graph
145 Commits
Author SHA1 Message Date
kaitranntt 24a11e1051 refactor(delegation)!: consolidate commands with intelligent profile selection
BREAKING CHANGE: Replace 4 hardcoded commands with 2 intelligent commands:
- Old: /ccs:glm, /ccs:kimi, /ccs:glm:continue, /ccs:kimi:continue
- New: /ccs (auto-selects), /ccs:continue (auto-dects)
- Override with flags: /ccs --glm "task", /ccs --kimi "task"

This change:
- Adds intelligent profile selection based on task analysis
- Supports custom profiles without creating new commands
- Enhances session management with automatic profile detection
- Updates all help text, examples, and documentation
- Fixes CCS Doctor health checks for new command structure
2025-11-21 20:31:44 -05:00
kaitranntt 31a21d13ad fix(sync): update 'ccs update' references to 'ccs sync' across codebase 2025-11-18 01:19:28 -05:00
Kai (Tam Nhu) TranandGitHub 4df5a7d357 feat!: delegation system overhaul and .claude/ shipping (v4.1.0) (#8)
## 🚀 Release v4.1.0 - Major Update

**Breaking changes from v3.5.0**. This release includes the complete v4.0.0 delegation overhaul plus v4.1.0 architecture improvements.

---

## 🎯 v4.0.0: Delegation System Overhaul

**Complete rewrite of the delegation infrastructure with enhanced decision-making and streaming support.**

### New Delegation Features

**Stream-JSON Communication Protocol:**
- Real-time token streaming with `{type: "content", data: "..."}` format
- Progress indicators during delegation execution
- Clean separation: stdout for data, stderr for errors
- Handles tool calls, thinking blocks, and text content

**Enhanced Decision Framework:**
- `/ccs:glm` and `/ccs:kimi` slash commands with auto-enhancement
- `[AUTO ENHANCE]` prompts for better model understanding
- Context-aware task delegation with clear boundaries
- Continuation support: `/ccs:glm:continue` and `/ccs:kimi:continue`

**Robust Error Handling:**
- Graceful degradation when profiles unconfigured
- Clear error messages with actionable fixes
- Signal handling (SIGINT/SIGTERM) for clean child process termination
- Session state recovery on interruption

**Performance & Reliability:**
- Headless mode (`-p` flag) for background execution
- Slash command detection and auto-routing
- Validation system with `DelegationValidator`
- Profile readiness checks in `ccs --version`

### Delegation Components

**New Files:**
- `bin/delegation/delegation-handler.js` - Core delegation orchestrator
- `bin/delegation/stream-processor.js` - Real-time output handling
- `bin/utils/delegation-validator.js` - Profile validation
- `.claude/commands/ccs/*.md` - Slash command definitions
- `.claude/skills/ccs-delegation/` - AI decision framework
- `.claude/agents/ccs-delegator.md` - Proactive delegation agent

**Documentation:**
- Complete delegation workflows with mermaid diagrams
- Troubleshooting guides for common issues
- Headless execution patterns

---

##  v4.1.0: Selective Symlinking Architecture

**Single source of truth for CCS items with automatic propagation.**

### New Architecture

**Ship .claude/ Directory:**
- CCS items now ship with npm/sh/ps1 packages
- Selective item-level symlinks: `~/.ccs/.claude/` → `~/.claude/`
- Auto-propagation on `npm update` - zero manual sync
- Backward compatible with existing `~/.ccs/shared/` mechanism

**Symlink Chain:**
```
~/.ccs/.claude/ (source) 
    ↓ selective symlinks
~/.claude/ (CCS items installed here)
    ↑ symlinked by
~/.ccs/shared/
    ↑ symlinked by  
profiles (work, personal, team)
```

### New Commands

**Maintenance Tools:**
- `ccs update` - Re-install CCS symlinks to ~/.claude/
- `ccs doctor` - Added Check 9: CCS symlinks health verification

**Safe Installation:**
- Automatic conflict backup before symlinking
- Idempotent operations (safe to run multiple times)
- Health monitoring and recovery

### New Components

- `bin/utils/claude-symlink-manager.js` - Manages selective symlinks
- Updated all 3 installers (npm postinstall, install.sh, install.ps1)
- Enhanced `ccs doctor` with symlink health checks

---

## 💥 Breaking Changes

**From v3.5.0 → v4.x:**

1. **Delegation commands moved**: 
   - Old: User manually created in `~/.claude/commands/`
   - New: Auto-shipped in `~/.ccs/.claude/`, symlinked to `~/.claude/commands/ccs/`

2. **Slash command format**:
   - New: `/ccs:glm`, `/ccs:kimi`, `/ccs:glm:continue`
   - Old custom commands may need migration

3. **Profile validation**:
   - Placeholders (`YOUR_API_KEY_HERE`) now detected and marked invalid
   - Must configure real API keys for delegation to work

4. **Stream output format**:
   - Headless mode (`-p`) now uses stream-JSON protocol
   - Old text output replaced with structured `{type, data}` format
2025-11-16 06:31:55 -05:00
kaitranntt 01cff1114b docs: restructure README files with parallel workflow messaging and user path guidance 2025-11-13 21:59:14 -05:00
kaitranntt f4cd32baf0 docs: update README files with improved structure and GLMT experimental warnings
- Reorganized README structure with collapsible sections for better readability
- Added comprehensive GLMT experimental warnings and troubleshooting guides
- Updated installation instructions with traditional vs npm options
- Added parallel workflow examples and detailed feature comparisons
- Enhanced documentation with proper acknowledgments and security limits
- Standardized language and formatting across all README variants
2025-11-13 21:29:17 -05:00
kaitranntt 3e26937945 docs: update README files with GLMT sections and translations
- Move GLMT section to proper position in English README
- Add missing npm badge to Vietnamese README
- Add GLMT and Architecture sections to all translations
- Update configuration examples with glmt profile
- Add Windows Developer Mode support documentation
- Fix documentation links across all language versions
2025-11-12 13:31:15 -05:00
kaitranntt 7bb2fb92c8 docs: add honest GLMT production warnings and experimental status
- Add prominent NOT PRODUCTION READY warning for GLMT
- Update GLM vs GLMT comparison to reflect experimental nature
- Tone down overconfident marketing language in tool support
- Add honest failure rates for streaming functionality
- Reference CCR hustle with Transformer of Bedolla as alternative
- Update thinking keywords to reflect inconsistent behavior
2025-11-11 22:49:37 -05:00
kaitranntt 66e25b4cc9 refactor(glmt): remove deprecated environment variables
Remove references to deprecated CCS_GLMT_FORCE_ENGLISH, CCS_GLMT_THINKING_BUDGET, and CCS_GLMT_STREAMING environment variables that were removed in v3.4.3.

Changes:
- README.md: Update GLMT environment variable documentation to reflect current intelligent control system
- tests/unit/glmt/locale-enforcer.test.js: Remove outdated test scenario for removed environment variable
- docs/glmt-controls.md: Rewrite documentation to describe new automatic control mechanisms

The GLMT component now uses intelligent, automatic controls instead of manual environment variable configuration.
2025-11-11 22:10:56 -05:00
kaitranntt 513e5b693f fix(glmt): resolve thinking block signature timing race
- guard against empty content in _createSignatureDeltaEvent()

- consolidate debug flags: CCS_DEBUG_LOG, CCS_GLMT_DEBUG → CCS_DEBUG

- add 6 regression tests for signature race condition

- update docs with simplified debug flag usage
2025-11-11 21:47:41 -05:00
kaitranntt 5fae92ac07 feat(glmt): add streaming with real-time thinking blocks
- reorganize bin/ into auth/, glmt/, management/, utils/
- add budget calculator and locale enforcer
- enhance test coverage with unit/integration separation
2025-11-11 15:39:00 -05:00
kaitranntt 80f9cc644e feat: add GLMT streaming with real-time thinking blocks
- SSEParser/DeltaAccumulator for streaming state

- TTFB 5-20x faster (<500ms vs 2-10s)

- DoS protection: buffer limits, 120s timeout

- 51/51 tests passing (+25 streaming tests)
2025-11-11 03:47:30 -05:00
kaitranntt 657f99bfe8 feat: add GLMT proxy and transformer tools
- Add GLMT proxy server for GLM model routing
- Add GLMT transformer for output format conversion
- Update CLI with new proxy and transformer commands
- Add comprehensive test suite for new functionality
- Update documentation and architecture guides
- Bump version and update changelog
2025-11-11 03:08:56 -05:00
kaitranntt d925dfc169 feat(shared): implement shared data architecture (v3.1.0)
Phase 1: Multi-profile shared data via symlinks

Added:

- SharedManager class for symlink orchestration (bin/shared-manager.js)

- Auto-migration from ~/.claude/ to ~/.ccs/shared/ on first run

- Shared directories: commands/, skills/, agents/

- Windows fallback: copies dirs if symlinks fail

Fixed:

- Migration logic now detects empty directories

- Previously skipped migration when postinstall created empty dirs

- Now properly copies from ~/.claude/ when shared dirs are empty

Changed:

- Instance initialization symlinks to shared dirs instead of copying

- Postinstall creates ~/.ccs/shared/ structure automatically

- All implementations (Node.js, bash, PowerShell) updated for consistency

- Help text includes agents/ in shared data section

Technical:

- Profile-specific data remains isolated (settings, sessions, todolists, logs)

- Migration is idempotent: safe to run multiple times

- Cross-platform symlink support with graceful fallback

Closes #4
2025-11-10 20:45:21 -05:00
kaitranntt 96701a4992 docs: streamline READMEs and update project documentation
- Streamline Features section (65% shorter, bullet points only)
- Remove redundant 'Why CCS' table column
- Fix 'Sub-Account' → 'Multiple Accounts' terminology
- Update tagline to highlight v3.0 multi-account capabilities
- Merge duplicate sections (Concurrent Sessions)
- Remove unrealistic usage examples
- Fix weird formatting and stray content
- Streamline Uninstall section with package managers grouped
- Create root-level CONTRIBUTING.md (GitHub standard)
- Remove duplicate docs/en/contributing.md and docs/vi/contributing.vi.md
- Update all README links to point to root CONTRIBUTING.md
- Refactor CLAUDE.md for v3.0 architecture
  - Update project overview to highlight multiple Claude accounts
  - Add v3.0 technical details (CLAUDE_CONFIG_DIR, profiles.json, instances/)
  - Remove redundant high-level flow (now in README)
  - Add Node.js code standards
  - Document two profile types (settings vs account-based)
  - Update testing requirements for v3.0

Total reduction: 46 lines across all READMEs
Cross-language consistency: EN/VI/JA fully synchronized
2025-11-09 17:11:58 -05:00
Tam Nhu (Kai) TranandGitHub 7c93cadf95 docs: add Japanese README, pull request #2 from eltociear/add-ja-doc 2025-11-09 15:01:09 -05:00
kaitranntt 7b25d5d437 feat!: v3.0.0 simplification - login-per-profile model
BREAKING CHANGE: Remove vault/encryption, implement login-per-profile

- Remove vault-manager.js, credential-reader.js, credential-injector.js (~642 lines)
- Implement login-per-profile (no credential copying)
- Rename 'auth save' to 'auth create'
- Fix profile schema (remove vault/subscription/email fields)
- Remove macOS credential switcher (CLAUDE_CONFIG_DIR works everywhere)
- Auto-create missing instance directories
- Maintain GLM/Kimi backward compatibility (settings profiles)

Performance: 50-120ms faster (no decryption overhead)
Code reduction: ~600 lines deleted (40% simpler)

Migration required: Users must recreate profiles with 'ccs auth create'
2025-11-09 05:43:09 -05:00
Ikko Ashimine 014ec48fdd docs: add Japanese README 2025-11-09 16:29:43 +09:00
kaitranntt 385572dc47 feat(kimi): add Kimi for Coding integration as third LLM provider
- Add kimi profile support alongside existing glm and default profiles
- Create base-kimi.settings.json configuration template
- Update all installation methods (npm, Unix, Windows) to auto-create Kimi settings
- Enhance documentation with Kimi examples and API setup instructions
- Update version to 2.5.0 with comprehensive changelog
- Add Kimi detection logic in install scripts for seamless migration
- Maintain backward compatibility with existing GLM and Claude profiles
2025-11-07 01:45:29 -05:00
kaitranntt 2b35bf419f chore: release v2.4.6 with improved npm compatibility and fixes
- fix color detection for cross-platform TTY compatibility
- enhance help command with npm-specific content and npx examples
- remove --install/--uninstall flags pending .claude/ integration testing
- update version across all files and documentation
- preserve implementation code for future release readiness
2025-11-05 16:51:30 -05:00
kaitranntt 966a43f0f9 chore: release v2.4.5 with comprehensive testing and documentation updates 2025-11-05 16:10:03 -05:00
kaitranntt 64925d57ca checkpoint: before test restructure migration 2025-11-05 10:16:18 -05:00
kaitranntt 1a5ae615e3 docs: update npm package name from @kai/ccs to @kaitranntt/ccs 2025-11-04 23:25:36 -05:00
kaitranntt 4110e1bfcb chore: bump version to 2.4.0
- PowerShell 7+ syntax fixes (ampersand, pipe chars, regex)
- Node.js standalone implementation (no shell spawning)
- Add modular architecture (helpers, claude-detector, config-manager)
- Comprehensive test suite with 95% coverage
- Enhanced cross-platform compatibility and error handling
2025-11-04 21:24:37 -05:00
kaitranntt f21b3a6de1 feat(ccs): custom Claude CLI path support with CCS_CLAUDE_PATH
BREAKING CHANGE: None - fully backward compatible

Adds comprehensive custom path support for Claude CLI installations:
- CCS_CLAUDE_PATH environment variable for custom locations
- Smart detection: env var → PATH → common locations fallback
- Enhanced error messages with platform-specific solutions
- Security validation preventing command injection
- D drive Windows installation support
- WSL access to Windows installations
- Performance optimized (<15ms overhead)
- Complete documentation and troubleshooting guides

Technical implementation:
- Added detect_claude_cli() / Find-ClaudeCli functions
- Added validate_claude_cli() / Test-ClaudeCli security validation
- Updated both bash (ccs) and PowerShell (ccs.ps1) executables
- Fixed PowerShell multi-line string syntax errors with here-strings
- Updated all installation scripts and documentation
- Bumped version to v2.3.0

Tested across all platforms with 90% test suite pass rate.
Resolves D drive installation issues for Windows users.
2025-11-04 20:08:27 -05:00
kaitranntt 1714451aef docs: improve README layout and fix documentation issues
- Revert header to simple centered layout (remove table structure)
- Reorganize sections: move Uninstall to end of Quick Start
- Remove non-existent 'ccs claude' command references
- Add Claude CLI login prerequisite to Quick Start
- Replace broken badges with PoweredBy ClaudeKit attribution
- Add ClaudeKit referral link (https://claudekit.cc?ref=HMNKXOHN)
- Fix Mermaid diagram <path> rendering issue
- Add WIP notice to Task Delegation sections
- Improve professional documentation presentation
2025-11-04 14:22:43 -05:00
kaitranntt 86b7d123a7 docs: redesign README with professional layout and logo assets
- Add professional badge styling and two-column HTML table header layout
- Reorganize sections: Quick Start → Why → Architecture Overview
- Remove Technology Stack section for cleaner content
- Add optimized logo assets (medium-sized and original)
- Implement matching improvements in Vietnamese README
- Maintain YAGNI/KISS/DRY philosophy while enhancing visual appeal
2025-11-04 13:54:05 -05:00
kaitranntt 88e6c9d604 fix(ccs): resolve uninstall functionality test failures
- Fix environment variable pattern (HOME vs USERPROFILE) in ccs.ps1
- Implement HOME-first pattern with USERPROFILE fallback for cross-platform compatibility
- Remove PowerShell Start-Process compatibility issues in test scripts
- Add comprehensive uninstall test suite (20 tests total)
- Achieve 100% test pass rate (previously 68.4% failure rate)
- Add testing requirements documentation
- Update project roadmap with completion status
- Production-ready with comprehensive code review approval (9.5/10)

Testing:
- All 20 uninstall tests passing
- Cross-platform compatibility verified
- Security review passed (0 vulnerabilities)
- Performance optimized (<1ms improvement)
2025-11-03 11:57:50 -05:00
kaitranntt 02f299686f feat(installer): add auto PATH config for v2.2.0
- Auto shell detection (bash/zsh/fish) with PATH setup
- Unified ~/.local/bin install (no sudo required)
- ANSI colors with TTY detection, NO_COLOR support
- Security: fix shell injection, error handling
- Replace emojis with ASCII symbols
- Update 16 files: core(6), en-docs(6), vi-docs(4)
2025-11-03 01:32:37 -05:00
kaitranntt 613b92ce60 feat(ccs): add --install command for delegation features
- Add installation function for commands and skills
- Implement --install flag in both bash and PowerShell scripts
- Update documentation with installation instructions
- Add comprehensive test suites for installation functionality
- Refactor delegation command to simplify profile handling
- Remove haiku references, focus on GLM delegation model
- Update usage examples and documentation
2025-11-03 00:29:41 -05:00
kaitranntt bd152e54b1 docs(ccs): refactor README and add comprehensive documentation structure
- Reduce README.md from 640 to 48 lines (92% reduction)
- Add 5 new documentation files: installation, configuration, usage, troubleshooting, contributing
- Follow YAGNI/KISS/DRY principles with essential info in README
- Preserve all content in organized docs/ structure
- Improve user experience with quick start focus
2025-11-02 21:17:31 -05:00
kaitrannttandClaude Code e9eb215d1f fix(core): add VERSION file handling and comprehensive test coverage
This commit fixes version management and argument parsing issues across
both Windows and Linux/macOS platforms, achieving 100% test coverage.

Changes:
- Add VERSION file installation to both installers (install.sh, install.ps1)
- Fix version/help command detection when using 'powershell -File' syntax
- Rename PowerShell param from $Profile to $ProfileOrFlag for clarity
- Add $FirstArg detection to check both ProfileOrFlag and RemainingArgs
- Create comprehensive edge case test suites for both platforms:
  * tests/edge-cases.ps1 - 31 tests for Windows (100% pass)
  * tests/edge-cases.sh - 37 tests for Linux/macOS (100% pass)
- Fix multiline regex matching in tests for error messages
- Update test expectations to match platform-specific behavior
- Reorganize project structure:
  * Move installers to installers/ directory
  * Add scripts/ directory for version management
  * Add config/ directory for configuration templates
  * Add docs/ directory for documentation

Test Results:
- Windows (PowerShell): 31/31 tests passing (100%)
- Linux/macOS (Bash): 37/37 tests passing (100%)

Breaking Changes: None
- Installers moved but GitHub URLs updated in README files
- All existing functionality preserved

Co-authored-by: Claude Code <claude@anthropic.com>
2025-11-02 20:27:45 -05:00
kaitranntt 861467e307 feat(cli): add --help and version support (v1.1.0)
- Add version command: ccs --version, ccs version, ccs -v
- Add help forwarding: ccs --help, ccs -h, ccs help → forwards to Claude CLI
- Fix W1 warning: ccs --help no longer treats --help as profile name
- Consistent implementation across bash and PowerShell
- Update README (EN/VI) with utility commands documentation

Features:
- Version constant: CCS_VERSION = "1.1.0"
- Early return pattern for meta-commands (work without config)
- Help commands forward to Claude CLI --help
- Version commands show CCS version + GitHub URL

Testing:
- All 9 tests passed (100%)
- No regressions in existing functionality
- Verified on Windows PowerShell 5.1

Resolves: W1 warning from comprehensive testing
Tested-by: QA Agent
Reviewed-by: Code Review Agent
2025-11-02 13:47:10 -05:00
kaitranntt ff357f188f refactor(windows): revert to Linux file structure with settings files
Changes:
- ccs.ps1: Read settings files and apply env vars (supports both direct and {"env": {...}} formats)
- install.ps1: Create separate settings files (glm.settings.json, sonnet.settings.json) instead of embedding in config.json
- README.md: Document Linux-style file structure for Windows
- README.vi.md: Add Vietnamese documentation for Windows configuration

Windows now uses same file structure as Linux:
- config.json contains file paths
- Settings files contain environment variables
- Maintains cross-platform consistency
2025-11-02 02:53:22 -05:00
kaitranntt 999f598735 fix(windows): use environment variables instead of settings files
Windows Claude CLI doesn't support --settings flag or settings.json files.
It uses environment variables instead (ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, etc.)

Changes:
- ccs.ps1: Completely rewritten to set environment variables per profile
  - Supports both env var objects (Windows) and file paths (Unix cross-compat)
  - Sets env vars before executing claude, restores after
  - Shows helpful error if user tries to use file paths on Windows

- install.ps1: Updated to create env var-based config
  - config.json now contains env var objects, not file paths
  - GLM profile: Full env var config with API key placeholder
  - Sonnet/default profiles: Empty {} = use Claude subscription

- README.md: Updated Windows configuration section
  - Documents env var approach clearly
  - Shows correct Windows config format
  - Explains difference from Unix approach

Example Windows config:
{
  "profiles": {
    "glm": {
      "ANTHROPIC_AUTH_TOKEN": "your_key",
      "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic"
    },
    "son": {}
  }
}

Fixes: Windows users can now switch profiles with env vars instead of files
2025-11-02 02:47:40 -05:00
kaitranntt a4245e9031 feat(windows): add native PowerShell 5.1+ support with full cross-platform compatibility
- Add ccs.ps1: PowerShell core script with native JSON parsing
- Add install.ps1: Windows installer with provider auto-detection
- Add uninstall.ps1: Clean Windows uninstaller
- Update install.sh: Add platform detection to redirect Windows users
- Update README.md: Add comprehensive Windows installation docs
- Update README.vi.md: Add Vietnamese Windows documentation

Features:
- PowerShell 5.1+ compatible (Windows 10+ built-in)
- Cross-platform config: Unix paths work on all platforms
- Smart path expansion: ~/  → %USERPROFILE%\ on Windows
- Zero breaking changes: Linux/macOS unchanged
- No external dependencies: Uses PowerShell built-in JSON

Install directory: %USERPROFILE%\.ccs\
Usage: irm ccs.kaitran.ca/install.ps1 | iex (after Cloudflare setup)
2025-11-02 02:20:48 -05:00
kaitranntt 40ff512c1b refactor: consolidate CCS files to unified ~/.ccs directory
Major reorganization to provide cleaner, more intuitive directory structure:

Directory changes:
- Move ~/.ccs.json → ~/.ccs/config.json
- Move ~/.claude/glm.settings.json → ~/.ccs/glm.settings.json
- Move ~/.claude/sonnet.settings.json → ~/.ccs/sonnet.settings.json
- Move ~/.local/share/ccs/* → ~/.ccs/
- Keep ~/.claude/settings.json unchanged (Claude CLI default)

Script improvements:
- Fix idempotency: check source != destination before cp
- Update all path references in ccs, install.sh, uninstall.sh
- Consolidate uninstall to single directory removal

Documentation updates:
- Update README badges: remove stars, modernize labels, add platform
- Update all path references in README.md and README.vi.md
- Update INSTALL-WORKFLOW.md diagram
- Update .ccs.example.json template

This provides a unified installation location that's easier to manage and understand.
2025-11-01 19:47:09 -04:00
kaitranntt df464e0296 docs: add Vietnamese translation (README.vi.md)
- add complete Vietnamese version of README

- add language selector to both English and Vietnamese versions

- maintain same structure and content as English version
2025-11-01 19:19:15 -04:00
kaitranntt fd59801b14 docs: update URLs to use correct CloudFlare subdomain
- change from kaitran.ca/ccs/* to ccs.kaitran.ca/*

- update Quick Start, Installation, Upgrade, and Uninstall sections
2025-11-01 19:16:22 -04:00
kaitranntt 780867073d docs: update Quick Start to use short URL and correct profile key
- use kaitran.ca/ccs/install in Quick Start

- fix profile key from 'sonnet' to 'son'
2025-11-01 19:02:49 -04:00
kaitranntt 82eb688a6a docs: add short CloudFlare URLs for install/uninstall
- add kaitran.ca/ccs/install and kaitran.ca/ccs/uninstall

- keep original GitHub URLs as alternatives

- update Quick Start, Upgrade, and Uninstall sections
2025-11-01 19:00:57 -04:00
kaitranntt 08d8c1f21c fix(install): resolve critical standalone install bugs and refactor
- fix BASH_SOURCE unbound variable for piped execution (curl | bash)
- fix missing download logic for standalone installs (added GitHub fetch)
- fix installation method detection (check ccs file, not .git)
- fix git worktree detection (.git file support)
- add GLM default model env vars (ANTHROPIC_DEFAULT_*)
- enhance GLM profile creation (preserve existing API keys)
- improve error handling for mv operations
- refactor install.sh with helper functions (250 lines, cleaner)
- change profile name from 'sonnet' to 'son' (shorter)
- add installation workflow diagram (INSTALL-WORKFLOW.md)
- update documentation with troubleshooting and upgrade guides
2025-11-01 18:44:48 -04:00
kaitranntt aa04966ff4 feat: simplify templates, auto-config, task-based switching docs
Major improvements for user experience and workflow optimization:

## Template Simplification
- GLM template: reduced to 3 essential env vars (was 15 fields)
- Claude template: minimal {env: {}} (uses default auth)
- Removed non-essentials: alwaysThinkingEnabled, includeCoAuthoredBy
- Smart merging: preserves user's existing env vars via jq

## Auto-Configuration
- Auto-creates ~/.ccs.json during install (zero manual steps)
- Smart detection: identifies current provider (GLM/Claude/Custom)
- Creates missing profiles automatically
- Intelligent copying: current config → appropriate profile

## Safety Improvements
- Atomic file operations: all writes use .tmp files
- Race condition prevention: mv -n for concurrent installs
- Error handling: jq failures fall back to heredoc templates
- No corrupted JSON files on errors

## Documentation Enhancements
- Added task-based model selection use case
- Real workflow examples (planning → implementation → review)
- Emphasis on using right model for right task
- Claude Sonnet 4.5 for complex, GLM 4.6 for simple tasks
- Rate limit management as bonus feature

## User Experience
Before: 3 manual steps (copy config, edit, create profiles)
After: 0 manual steps (just add API key to generated template)

Installation time: 5 minutes → 30 seconds
2025-11-01 18:02:18 -04:00
kaitranntt 35505530d0 feat: add default profile, uninstall script, modernize docs
- Default profile: 'ccs' without args uses 'default' profile
- Uninstall script: 'ccs-uninstall' removes installation cleanly
- Install improvements: curl-compatible with uninstall bundling
- Config cleanup: removed obsolete opus profile
- README overhaul: professional badges, quick-start focus, one-liner install
- Security: maintained injection prevention, input validation
- Documentation: removed multiple accounts mention, updated URLs

Closes #1
2025-11-01 17:23:33 -04:00
kaitranntt dd85d37af8 docs: update installation URL with actual repository 2025-11-01 17:02:19 -04:00
kaitranntt c8f85a1220 feat: initial commit - ultra-simple claude code switcher
- Core ccs bash script with profile switching
- Installation script with PATH verification
- Example config template
- Comprehensive README with troubleshooting
- Security: input validation, injection prevention
- MIT license
2025-11-01 17:01:42 -04:00