feat: add worktree support and refactor do skill to Python

- Add worktree module for git worktree management
- Refactor do skill scripts from shell to Python for better maintainability
- Add install.py for do skill installation
- Update stop-hook to Python implementation
- Enhance executor with additional configuration options
- Update CLAUDE.md with first-principles thinking guidelines

Generated with SWE-Agent.ai

Co-Authored-By: SWE-Agent.ai <noreply@swe-agent.ai>
This commit is contained in:
cexll
2026-02-03 21:58:08 +08:00
parent 04fa1626ae
commit 74e4d181c2
19 changed files with 1257 additions and 433 deletions

View File

@@ -57,14 +57,18 @@ if [[ ":${PATH}:" != *":${BIN_DIR}:"* ]]; then
echo ""
echo "WARNING: ${BIN_DIR} is not in your PATH"
# Detect shell and set config files
if [ -n "$ZSH_VERSION" ]; then
RC_FILE="$HOME/.zshrc"
PROFILE_FILE="$HOME/.zprofile"
else
RC_FILE="$HOME/.bashrc"
PROFILE_FILE="$HOME/.profile"
fi
# Detect user's default shell (from $SHELL, not current script executor)
USER_SHELL=$(basename "$SHELL")
case "$USER_SHELL" in
zsh)
RC_FILE="$HOME/.zshrc"
PROFILE_FILE="$HOME/.zprofile"
;;
*)
RC_FILE="$HOME/.bashrc"
PROFILE_FILE="$HOME/.profile"
;;
esac
# Idempotent add: check if complete export statement already exists
EXPORT_LINE="export PATH=\"${BIN_DIR}:\$PATH\""