# =============================================================================
# Python
# =============================================================================
__pycache__/
*.py[cod]
*$py.class
*.so

# Virtual environments
.venv/
venv/
.env/

# Distribution / packaging
dist/
build/
*.egg-info/
*.egg
.eggs/

# =============================================================================
# Testing
# =============================================================================
.pytest_cache/
.coverage
htmlcov/
.tox/
.nox/
coverage.xml
coverage.json
*.cover
test_output/
validation_results/

# =============================================================================
# Type checking / Linting
# =============================================================================
.mypy_cache/
.ruff_cache/
.dmypy.json
dmypy.json

# =============================================================================
# Spellcheck
# =============================================================================
# cSpell cache (dictionary cache for performance)
.cspell/.cache/

# =============================================================================
# Package managers
# =============================================================================
# uv cache (if using uv package manager)
.uv-cache/

# =============================================================================
# IDE / Editors
# =============================================================================
.idea/
*.swp
*.swo
*~
.project
.pydevproject
.settings/

# VS Code - keep config but ignore user-specific
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
!.vscode/markdown.css
!.vscode/tasks.json
!.vscode/README.md

# =============================================================================
# Operating System
# =============================================================================
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Thumbs.db
ehthumbs.db
Desktop.ini

# =============================================================================
# Project-specific
# =============================================================================
# Temporary files
/tmp/
*.tmp
*.temp
*.bak

# Logs
*.log
logs/

# Generated outputs
output/

# =============================================================================
# LaTeX Generated Files
# =============================================================================
# PDF output files (generated by latexmk/lualatex)
examples/latex/*.pdf

# latexindent backup files
*.bak[0-9]
*.bak[0-9][0-9]

# GHDL work files
work-obj*.cf

# =============================================================================
# Test Data
# =============================================================================
# Exclude large legacy test data with legal concerns
test_data/Data_Capture/
test_data/*.zip
tracekit_test_data/

# Root-level test artifacts and data snapshots
/*.zip
/test_*.py
/spde_data_analysis_snapshot_*.zip

# Performance test data (generated, large files)
tests/performance/test_data/*.npz

# Include synthetic test data (small, legally safe, reproducible)
!test_data/synthetic/
!test_data/README.md

# =============================================================================
# Claude Code Configuration
# =============================================================================
# Track agents, commands, and hooks (critical for repo functionality)
# These files MUST be in git for clones to work properly
# Only ignore runtime-generated agent outputs

.claude/agent-outputs/*
!.claude/agent-outputs/.gitkeep

# Keep all configuration files (already tracked by default now)
!.claude/settings.json
!.claude/paths.yaml
!.claude/template.lock

# =============================================================================
# Session Working Files (Temporary)
# =============================================================================
# Orchestration working files (session-specific)
.coordination/orchestration-*.md
.coordination/ORCHESTRATION_SUMMARY.md
.coordination/phase*.md
.coordination/test-improvement-*.yaml
.coordination/test-improvement-*.json
.coordination/checkpoints/.archive/

# Test result files (temporary)
test-results*.txt

# Hypothesis testing data
.hypothesis/

# Coverage progress tracking (generated)
.coverage_progress

# Claude runtime state (changes every session)
.claude/agent-registry.json
.claude/agent-registry.backup.json
.claude/hooks/.context_state.json
.claude/hooks/orchestration-metrics.json

# Generated reports (runtime artifacts)
generated_reports/

# Backup directories (temporary artifacts)
demo_reports.backup/

# Root-level validation scripts (moved to scripts/)
/validate_all_fixes.py

# =============================================================================
# Development Artifacts (NOT for public repo)
# =============================================================================
# Claude session artifacts
.claude/archive/
.claude/checkpoints/*.json
.claude/checkpoints/archive/
.claude/summaries/*.md
!.claude/summaries/.gitkeep
.claude/work-archive/
.claude/workflow-archive/
.claude/workflow-progress-*.json
.claude/agents/references/

# Coordination directory (internal development tracking - NOT for public)
.coordination/

# Claude session/internal files
.claude/active_work.json
.claude/TESTING_GUIDE.md

# Development-only documentation
docs/*AUDIT*.md
docs/*CRASH*.md
docs/*DEVICE*.md
docs/*SOLUTION*.md

# Root-level development artifacts
/*IMPROVEMENT*.md
/*DETECTION*.md
/*INTERVAL*.md

# Test data development artifacts
test_data/*REPORT*.md
test_data/*results*.json
test_data/REMEDIATION_REPORT.md

# Temporary validation/remediation scripts
scripts/*remediate*.py
scripts/*validate_all*.py
scripts/*verify_test_data*.py

# Validation result files
**/validation_results.json
**/remediation_results.json
