3fa9bee166
Add lock mechanism to prevent concurrent access to worktrees: - Add LOCKS_DIR constant (\~/.kugetsu/locks) - Add acquire_lock() - acquires lock file with PID, session_id, timestamp - Add release_lock() - releases lock if held by current process - Add release_all_locks() - releases all locks for a session - Add check_lock() - check if issue is locked - Modify cmd_start to acquire lock before creating worktree - Modify cmd_destroy to release lock when destroying session - Add trap for cleanup on EXIT/INT/TERM Lock files are named after issue ref with format: <issue-ref>.lock Contains: PID:session_id:timestamp Stale lock detection: if PID no longer exists, lock is considered stale. This prevents concurrent processes from modifying the same worktree. Fixes #71