fix(hooks): remove all venv auto-repair code that deleted .venv directories #327

Merged
lmiranda merged 1 commits from fix/remove-venv-auto-repair into development 2026-01-30 16:34:59 +00:00
Owner

Summary

  • Remove scripts/venv-repair.sh that was deleting and recreating .venv directories on every session start
  • Remove auto-repair code from projman/hooks/startup-check.sh
  • Remove venv-repair call from scripts/post-update.sh
  • Remove rm -rf .venv instructions from documentation
  • Add Pre-Change Protocol to CLAUDE.md and claude-config-maintainer plugin
  • Add Development Context section clarifying plugin usage in this project

Problem

The venv auto-repair script was the root cause of repeated MCP server failures. It was:

  1. Running on every SessionStart hook
  2. Deleting existing .venv directories
  3. Attempting to recreate them with symlinks to a cache
  4. Failing silently, leaving MCP servers broken

This required manual setup.sh runs after every session start.

Solution

  • Delete all code that touches .venv directories (except read-only checks)
  • Add mandatory Pre-Change Protocol to catch dependency issues before edits
  • Clarify CLAUDE.md to distinguish between plugins used vs plugins being developed

Test plan

  • Start new Claude Code session
  • Verify MCP tools load without running setup.sh
  • Verify projman commands work (/sprint-status)
  • Verify no venv-related errors in hook output

🤖 Generated with Claude Code

## Summary - Remove `scripts/venv-repair.sh` that was deleting and recreating .venv directories on every session start - Remove auto-repair code from `projman/hooks/startup-check.sh` - Remove venv-repair call from `scripts/post-update.sh` - Remove `rm -rf .venv` instructions from documentation - Add Pre-Change Protocol to CLAUDE.md and claude-config-maintainer plugin - Add Development Context section clarifying plugin usage in this project ## Problem The venv auto-repair script was the root cause of repeated MCP server failures. It was: 1. Running on every SessionStart hook 2. Deleting existing .venv directories 3. Attempting to recreate them with symlinks to a cache 4. Failing silently, leaving MCP servers broken This required manual `setup.sh` runs after every session start. ## Solution - Delete all code that touches .venv directories (except read-only checks) - Add mandatory Pre-Change Protocol to catch dependency issues before edits - Clarify CLAUDE.md to distinguish between plugins used vs plugins being developed ## Test plan - [ ] Start new Claude Code session - [ ] Verify MCP tools load without running setup.sh - [ ] Verify projman commands work (/sprint-status) - [ ] Verify no venv-related errors in hook output 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lmiranda added the Type/BugPriority/Critical labels 2026-01-30 16:34:30 +00:00
lmiranda added 1 commit 2026-01-30 16:34:30 +00:00
BREAKING: Removes automatic venv management that was causing session failures

Changes:
- Delete scripts/venv-repair.sh (was deleting and recreating venvs)
- Remove auto-repair code from projman/hooks/startup-check.sh
- Remove venv-repair call from scripts/post-update.sh
- Remove rm -rf .venv instructions from docs/UPDATING.md and CONFIGURATION.md
- Update docs/CANONICAL-PATHS.md to remove venv-repair.sh reference

Additionally:
- Add Pre-Change Protocol to CLAUDE.md (mandatory dependency check before edits)
- Add Pre-Change Protocol enforcement to claude-config-maintainer plugin
- Add Development Context section to CLAUDE.md clarifying which plugins are
  used in this project vs only being developed
- Reorganize commands table to separate relevant vs non-relevant commands

The venv auto-repair was the root cause of repeated MCP server failures,
requiring manual setup.sh runs after every session start.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lmiranda merged commit 45af713366 into development 2026-01-30 16:34:59 +00:00
lmiranda deleted branch fix/remove-venv-auto-repair 2026-01-30 16:34:59 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#327