fix: correct .auto-claude path mismatch causing discovery phase timeout (#1748)
* fix: correct .auto-claude path mismatch causing discovery phase timeout
The spec pipeline reads project_index.json from `auto-claude/` (no dot)
but the orchestrator saves it to `.auto-claude/` (with dot). This mismatch
means the cached index is never found, forcing discovery to re-run
analyzer.py as a subprocess every time. On larger projects this subprocess
hits the 300-second timeout, making spec creation fail at Phase 1.
The mismatch was introduced in 757e5e04 (Dec 20 2025) when
_ensure_fresh_project_index() was added with the correct `.auto-claude/`
save path, but the existing read paths were never updated to match.
Files fixed:
- spec/discovery.py (primary fix - unblocks discovery phase)
- spec/complexity.py (heuristic assessment fallback)
- spec/pipeline/orchestrator.py (heuristic assessment in orchestrator)
- spec/phases/utils.py (generic script runner)
- spec/context.py (context discovery script path)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove duplicate .auto-claude segment in complexity.py path
spec_dir.parent.parent already resolves to the .auto-claude directory,
so adding another .auto-claude segment created a non-existent path:
.auto-claude/.auto-claude/project_index.json
Now correctly resolves to: .auto-claude/project_index.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Andy <119136210+AndyMik90@users.noreply.github.com>
This commit is contained in:
@@ -382,7 +382,7 @@ async def run_ai_complexity_assessment(
|
||||
context += f"\n**Task Description**: {task_description or 'Not provided'}\n"
|
||||
|
||||
# Add project index if available
|
||||
auto_build_index = spec_dir.parent.parent / "auto-claude" / "project_index.json"
|
||||
auto_build_index = spec_dir.parent.parent / "project_index.json"
|
||||
if auto_build_index.exists():
|
||||
context += f"\n**Project Index**: Available at {auto_build_index}\n"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ def run_context_discovery(
|
||||
if context_file.exists():
|
||||
return True, "context.json already exists"
|
||||
|
||||
script_path = project_dir / "auto-claude" / "context.py"
|
||||
script_path = project_dir / ".auto-claude" / "context.py"
|
||||
if not script_path.exists():
|
||||
return False, f"Script not found: {script_path}"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ def run_discovery_script(
|
||||
(success, output_message)
|
||||
"""
|
||||
spec_index = spec_dir / "project_index.json"
|
||||
auto_build_index = project_dir / "auto-claude" / "project_index.json"
|
||||
auto_build_index = project_dir / ".auto-claude" / "project_index.json"
|
||||
|
||||
# Check if project_index already exists
|
||||
if auto_build_index.exists() and not spec_index.exists():
|
||||
|
||||
@@ -22,7 +22,7 @@ def run_script(project_dir: Path, script: str, args: list[str]) -> tuple[bool, s
|
||||
Returns:
|
||||
Tuple of (success: bool, output: str)
|
||||
"""
|
||||
script_path = project_dir / "auto-claude" / script
|
||||
script_path = project_dir / ".auto-claude" / script
|
||||
|
||||
if not script_path.exists():
|
||||
return False, f"Script not found: {script_path}"
|
||||
|
||||
@@ -603,7 +603,7 @@ class SpecOrchestrator:
|
||||
The complexity assessment
|
||||
"""
|
||||
project_index = {}
|
||||
auto_build_index = self.project_dir / "auto-claude" / "project_index.json"
|
||||
auto_build_index = self.project_dir / ".auto-claude" / "project_index.json"
|
||||
if auto_build_index.exists():
|
||||
with open(auto_build_index, encoding="utf-8") as f:
|
||||
project_index = json.load(f)
|
||||
|
||||
Reference in New Issue
Block a user