# Track Specification: Consolidate Temp/Test Cruft & Log Taxonomy

## Overview
This track focuses on cleaning up the project root by consolidating temporary and test-related files into a dedicated directory and establishing a structured taxonomy for session logs. This will improve project organization and make manual file exploration easier before a dedicated GUI log viewer is implemented.

## Goals
1.  **Establish Artifacts Directory:** Create `tests/artifacts/` as the primary location for temporary test data and non-persistent cruft.
2.  **Gitignore Updates:** Update `.gitignore` to ensure this new directory and its contents are not tracked.
3.  **Log Taxonomy Setup:** Organize `./logs/` into clear sub-categories: `sessions/`, `agents/`, and `errors/`.
4.  **Migration Script:** Provide a PowerShell script to move existing files and logs into the new structure.
5.  **Future-Proofing:** Update the application logic (e.g., `session_logger.py`, `project_manager.py`) to ensure all future logs and temp files are created in the correct sub-directories.
6.  **Annotated Names Capability:** Add foundational support for attaching human-readable "annotated names" to log sessions for easier GUI lookup later.

## Functional Requirements
-   **Structure:** Create `tests/artifacts/`, `logs/sessions/`, `logs/agents/`, and `logs/errors/`.
-   **Configuration:** Update the app's default paths for temporary files (e.g., `temp_project.toml`) to use `tests/artifacts/`.
-   **Logging Logic:** Modify `SessionLogger` to use the new taxonomy based on the type of log (e.g., `agents/` for sub-agent runs).
-   **Migration Tool:** A script (`scripts/migrate_cruft.ps1`) that identifies and moves existing root-level `temp_*.toml`, `*.log`, and other cruft.

## Non-Functional Requirements
-   **Non-Destructive:** The migration script should use `Move-Item -Force` but ideally verify file presence before moving.
-   **Cleanliness:** No new temporary files should appear in the project root after this track is implemented.

## Acceptance Criteria
-   `tests/artifacts/` exists and contains redirected temp files.
-   `.gitignore` excludes `tests/artifacts/` and all `logs/` sub-folders.
-   Existing logs are successfully moved into `logs/sessions/`, `logs/agents/`, or `logs/errors/`.
-   A new session correctly places its logs into the categorized sub-folders.

## Out of Scope
-   The full GUI implementation of the log viewer (this is just the filesystem foundation).
-   Consolidation of `.git` or `.venv` directories.
