feat: Enhanced LOCAL enhancement modes with background/daemon/force options
BREAKING CHANGE: None (backward compatible - headless mode remains default)
Adds 4 execution modes for LOCAL enhancement to support different use cases:
from foreground execution to fully detached daemon processes.
New Features:
------------
- **4 Execution Modes**:
- Headless (default): Runs in foreground, waits for completion
- Background (--background): Runs in background thread, returns immediately
- Daemon (--daemon): Fully detached process with nohup, survives parent exit
- Terminal (--interactive-enhancement): Opens new terminal window (existing)
- **Force Mode (--force/-f)**: Skip all confirmations for automation
- "Dangerously skip mode" requested by user
- Perfect for CI/CD pipelines and unattended execution
- Works with all modes: headless, background, daemon
- **Status Monitoring**:
- New `enhance-status` command for background/daemon processes
- Real-time watch mode (--watch)
- JSON output for scripting (--json)
- Status file: .enhancement_status.json (status, progress, PID, errors)
- **Daemon Features**:
- Fully detached process using nohup
- Survives parent process exit, logout, SSH disconnection
- Logging to .enhancement_daemon.log
- PID tracking in status file
Implementation Details:
-----------------------
- Status file format: JSON with status, message, progress (0.0-1.0), timestamp, PID, errors
- Background mode: Python threading with daemon threads
- Daemon mode: subprocess.Popen with nohup and start_new_session=True
- Exit codes: 0 = success, 1 = failed, 2 = no status found
CLI Integration:
----------------
- skill-seekers enhance output/react/ (headless - default)
- skill-seekers enhance output/react/ --background (background thread)
- skill-seekers enhance output/react/ --daemon (detached process)
- skill-seekers enhance output/react/ --force (skip confirmations)
- skill-seekers enhance-status output/react/ (check status)
- skill-seekers enhance-status output/react/ --watch (real-time)
Files Changed:
--------------
- src/skill_seekers/cli/enhance_skill_local.py (+500 lines)
- Added background mode with threading
- Added daemon mode with nohup
- Added force mode support
- Added status file management (write_status, read_status)
- src/skill_seekers/cli/enhance_status.py (NEW, 200 lines)
- Status checking command
- Watch mode with real-time updates
- JSON output for scripting
- Exit codes based on status
- src/skill_seekers/cli/main.py
- Added enhance-status subcommand
- Added --background, --daemon, --force flags to enhance command
- Added argument forwarding
- pyproject.toml
- Added enhance-status entry point
- docs/ENHANCEMENT_MODES.md (NEW, 600 lines)
- Complete guide to all 4 modes
- Usage examples for each mode
- Status file format documentation
- Advanced workflows (batch processing, CI/CD)
- Comparison table
- Troubleshooting guide
- CHANGELOG.md
- Documented all new features under [Unreleased]
Use Cases:
----------
1. CI/CD Pipelines: --force for unattended execution
2. Long-running tasks: --daemon for tasks that survive logout
3. Parallel processing: --background for batch enhancement
4. Debugging: --interactive-enhancement to watch Claude Code work
Testing Recommendations:
------------------------
- Test headless mode (default behavior, should be unchanged)
- Test background mode (returns immediately, check status file)
- Test daemon mode (survives parent exit, check logs)
- Test force mode (no confirmations)
- Test enhance-status command (check, watch, json modes)
- Test timeout handling in all modes
Addresses User Request:
-----------------------
User asked for "dangeressly skipp mode that didint ask anything" and
"headless instance maybe background task" alternatives. This delivers:
- Force mode (--force): No confirmations
- Background mode: Returns immediately, runs in background
- Daemon mode: Fully detached, survives logout
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>