Fix spec_runner.py path resolution after move to runners/ directory

- spec_runner.py: Update sys.path to add parent directory (auto-claude/)
  instead of current directory (runners/) so imports work correctly
- spec_runner.py: Fix .env file path resolution for the new location
- analyzer.py: Add CLI entry point to shim so it works when run as script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
AndyMik90
2025-12-17 00:15:52 +01:00
parent 460c76de42
commit ce9c2cddc1
2 changed files with 8 additions and 4 deletions
+4
View File
@@ -1,3 +1,7 @@
"""Backward compatibility shim - import from analysis.analyzer instead."""
from analysis.analyzer import * # noqa: F403
from analysis.analyzer import main
if __name__ == "__main__":
main()
+4 -4
View File
@@ -38,14 +38,14 @@ import os
import sys
from pathlib import Path
# Add auto-claude to path
sys.path.insert(0, str(Path(__file__).parent))
# Add auto-claude to path (parent of runners/)
sys.path.insert(0, str(Path(__file__).parent.parent))
# Load .env file
from dotenv import load_dotenv
env_file = Path(__file__).parent / ".env"
dev_env_file = Path(__file__).parent.parent / "dev" / "auto-claude" / ".env"
env_file = Path(__file__).parent.parent / ".env"
dev_env_file = Path(__file__).parent.parent.parent / "dev" / "auto-claude" / ".env"
if env_file.exists():
load_dotenv(env_file)
elif dev_env_file.exists():