This change removes the legacy logs/ directory and consolidates all
session data, error logs, and discovery files under the .g3/ directory.
New directory structure:
- .g3/sessions/<session_id>/session.json - session logs
- .g3/errors/ - error logs (was logs/errors/)
- .g3/background_processes/ - background process logs
- .g3/discovery/ - planner discovery files (was workspace/logs/)
Changes:
- paths.rs: Remove get_logs_dir()/logs_dir(), add get_errors_dir(),
get_background_processes_dir(), get_discovery_dir()
- session.rs: Anonymous sessions now use .g3/sessions/anonymous_<ts>/
- error_handling.rs: Errors now saved to .g3/errors/
- project.rs: Remove logs_dir() and ensure_logs_dir() methods
- feedback_extraction.rs: Remove logs_dir field and fallback logic
- planner: Use .g3/ for workspace data and .g3/discovery/ for reports
- flock.rs: Look for session metrics in .g3/sessions/
- coach_feedback.rs: Remove fallback to logs/ path
- Update all tests to use new paths
- Update README.md and .gitignore
Extract three cohesive modules from the monolithic lib.rs (3188 -> 2785 lines):
- metrics.rs (147 lines): Turn metrics tracking and histogram generation
- TurnMetrics struct
- format_elapsed_time() for human-readable durations
- generate_turn_histogram() for performance visualization
- Added unit tests for core functions
- project_files.rs (181 lines): Project file reading utilities
- read_agents_config() for AGENTS.md loading
- read_project_readme() for README detection
- read_project_memory() for .g3/memory.md
- extract_readme_heading() for display
- Added unit tests
- coach_feedback.rs (129 lines): Coach feedback extraction from session logs
- extract_from_logs() main entry point
- Helper functions for log parsing and text extraction
All modules have clear single responsibilities, improved documentation,
and maintain identical behavior to the original inline functions.
Agent: carmack