mirror of
https://github.com/humanlayer/humanlayer.git
synced 2025-08-20 19:01:22 +03:00
* Remove chmod restrictions from searchable thoughts directory The chmod 444 restrictions on hard links were fundamentally flawed - hard links share the same inode, so making them read-only also made the original files read-only. This prevented users from editing their own thoughts files. Changes: - Remove chmod commands from sync.ts that set files to 444 - Update CLAUDE.md generation to reflect files are editable - Change language from 'read-only copies' to 'hard links' - Emphasize using canonical paths for consistency, not prevention * Add thoughts uninit command and --directory option for init New features to improve thoughts workflow: - Add 'thoughts uninit' command to cleanly remove thoughts setup from a repository - Add --directory option to 'thoughts init' for non-interactive mode - Uninit removes symlinks, searchable directory, and config mapping - --directory option requires existing directory for safety - Both features support worktree automation workflows * Update worktree scripts for automatic thoughts management Improve developer experience with automatic thoughts setup/teardown: - create_worktree.sh: Auto-run 'thoughts init --directory humanlayer' and sync - cleanup_worktree.sh: Use 'thoughts uninit' with manual fallback - Both scripts handle cases where humanlayer command is not available - Ensures thoughts are ready immediately in new worktrees - Prevents permission issues during worktree cleanup * Refactor directory name sanitization and improve error messaging Address PR feedback for the --directory option: - Extract directory name sanitization into a helper function - Improve error message to clarify that only pre-existing directories are allowed - Change 'Existing directories' to 'Available directories' for better clarity