mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-02 23:33:35 +00:00
feat: move autocoder runtime files into .autocoder/ subdirectory
Add centralized path resolution module (autocoder_paths.py) that consolidates all autocoder-generated file paths behind a dual-path strategy: check .autocoder/X first, fall back to root-level X for backward compatibility, default to .autocoder/X for new projects. Key changes: - New autocoder_paths.py with dual-path resolution for features.db, assistant.db, lock files, settings, prompts dir, and progress cache - migrate_project_layout() safely moves old-layout projects to new layout with SQLite WAL flush and integrity verification - Updated 22 files to delegate path construction to autocoder_paths - Reset/delete logic cleans both old and new file locations - Orphan lock cleanup checks both locations per project - Migration called automatically at agent start in autonomous_agent_demo.py - Updated markdown commands/skills to reference .autocoder/prompts/ - CLAUDE.md documentation updated with new project structure Files at project root that remain unchanged: - CLAUDE.md (Claude SDK reads from cwd via setting_sources=["project"]) - app_spec.txt root copy (agent templates reference it via cat) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
12
progress.py
12
progress.py
@@ -46,7 +46,8 @@ def has_features(project_dir: Path) -> bool:
|
||||
return True
|
||||
|
||||
# Check SQLite database
|
||||
db_file = project_dir / "features.db"
|
||||
from autocoder_paths import get_features_db_path
|
||||
db_file = get_features_db_path(project_dir)
|
||||
if not db_file.exists():
|
||||
return False
|
||||
|
||||
@@ -71,7 +72,8 @@ def count_passing_tests(project_dir: Path) -> tuple[int, int, int]:
|
||||
Returns:
|
||||
(passing_count, in_progress_count, total_count)
|
||||
"""
|
||||
db_file = project_dir / "features.db"
|
||||
from autocoder_paths import get_features_db_path
|
||||
db_file = get_features_db_path(project_dir)
|
||||
if not db_file.exists():
|
||||
return 0, 0, 0
|
||||
|
||||
@@ -120,7 +122,8 @@ def get_all_passing_features(project_dir: Path) -> list[dict]:
|
||||
Returns:
|
||||
List of dicts with id, category, name for each passing feature
|
||||
"""
|
||||
db_file = project_dir / "features.db"
|
||||
from autocoder_paths import get_features_db_path
|
||||
db_file = get_features_db_path(project_dir)
|
||||
if not db_file.exists():
|
||||
return []
|
||||
|
||||
@@ -144,7 +147,8 @@ def send_progress_webhook(passing: int, total: int, project_dir: Path) -> None:
|
||||
if not WEBHOOK_URL:
|
||||
return # Webhook not configured
|
||||
|
||||
cache_file = project_dir / PROGRESS_CACHE_FILE
|
||||
from autocoder_paths import get_progress_cache_path
|
||||
cache_file = get_progress_cache_path(project_dir)
|
||||
previous = 0
|
||||
previous_passing_ids = set()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user