Skip to content

Inconsistent hook system - Mix of Node.js and Python scripts #3

@AmbushData

Description

@AmbushData

Problem

The hooks system has both Node.js (.js) and Python (.py) implementations, causing confusion and potential execution issues.

Current State

  • Python scripts: scripts/hooks/session_end.py, scripts/hooks/suggest_compact.py
  • JavaScript scripts: scripts/hooks/session-end.js, scripts/hooks/suggest-compact.js, scripts/hooks/evaluate-session.js
  • Shell scripts: hooks/memory-persistence/session-end.sh
  • hooks.json: References Python scripts in some places, Node.js in others
  • hooks.json.backup: Contains old Node.js references

Expected State

  • Consistent language choice (Python preferred based on conversion)
  • Remove duplicate implementations
  • Update all hook references in hooks.json
  • Clear documentation on which scripts are active

Impact

  • Runtime Issues: Users may not have both Node.js and Python available
  • Maintenance: Duplicate code in two languages
  • Confusion: Unclear which scripts are actually being used

Files Affected

  • scripts/hooks/*.js (7 JavaScript files)
  • scripts/hooks/*.py (2 Python files)
  • hooks/hooks.json
  • hooks/hooks.json.backup
  • hooks/memory-persistence/*.sh

Suggested Approach

  1. Complete Python conversion of all hooks
  2. Remove JavaScript hook implementations
  3. Update hooks.json to use Python exclusively
  4. Remove hooks.json.backup
  5. Document hook dependencies in README

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions