# Framework (Privacy-First Mode)
# ================================================================================
# This project uses Framework's privacy-first structure.
# All */private/ directories are gitignored by default.
#
# WORKFLOW:
#   1. Protected data goes in */private/ directories (NEVER committed)
#   2. Reviewed metadata goes in inputs/metadata/ (ignored; agents can read it)
#   3. Simulated data stays in inputs/private/simulated/ on both machines
#   4. Analysis scripts are committed, but outputs are carefully controlled
#
# CRITICAL: Private directories are NEVER committed to version control.
# ================================================================================

# ============================================================================
# SENSITIVE DATA - NEVER COMMIT
# ============================================================================

# Private directories - explicit paths for this project type
/inputs/private/
/reference/private/
/outputs/private/

# Generic private directory patterns (defense-in-depth)
**/private/**
**/*_private/**
**/sensitive/**

# Allow structure documentation (README and .gitkeep files in private dirs)
!/inputs/**/README.md
!/inputs/**/.gitkeep
!/reference/**/README.md
!/reference/**/.gitkeep
!/outputs/**/README.md
!/outputs/**/.gitkeep

# Reviewed metadata stays gitignored. Simulated files stay under private/.
# Keep only empty folder markers in the repository.
/inputs/metadata/**
!/inputs/metadata/**/
!/inputs/metadata/**/.gitkeep

# ============================================================================
# SECRETS AND CREDENTIALS - NEVER COMMIT
# ============================================================================

.env
.env.local
.env.*.local
.Renviron
.httr-oauth
**/credentials/**
**/secrets/**
*.key
*.pem
*.p12
*.pfx

# ============================================================================
# UTILITY & CACHE - SAFE TO IGNORE
# ============================================================================

# Temporary processing directories
**/cache/**
**/scratch/**
**/tmp/**
**/temp/**

# Logs (run logs, cluster job output)
**/logs/**
slurm-*.out

# ============================================================================
# R ENVIRONMENT
# ============================================================================

# R session files
.Rproj.user/
.Rhistory
.RData
.Ruserdata
.Rapp.history
.Rprofile

# renv (package management)
# NOTE: Consider committing renv.lock for reproducibility
renv/library/
renv/local/
renv/cellar/
renv/lock/
renv/python/
renv/sandbox/
renv/staging/

# ============================================================================
# FRAMEWORK INTERNALS
# ============================================================================

framework.db
framework.db-wal
framework.db-shm
.initiated
.framework_renv_enabled
.framework_scaffolded

# ============================================================================
# QUARTO / RMARKDOWN ARTIFACTS
# ============================================================================

# Quarto adds these two lines, in this form, unless they are here already
/.quarto/
**/*.quarto_ipynb
# A folder with its own _quarto.yml gets its own .quarto/
.quarto/
_freeze/
# Backups from quarto_regenerate() before Framework 2.0.1
.quarto_backups/
*_cache/
*_files/

# ============================================================================
# PYTHON (if using reticulate)
# ============================================================================

__pycache__/
.ipynb_checkpoints/
*.pyc
.pytest_cache/
venv/
.venv/

# ============================================================================
# IDE & SYSTEM FILES
# ============================================================================

# IDE - personal settings only (commit workspace settings if desired)
.idea/
.vscode/.history/
.positron/.history/
.history/

# macOS
.DS_Store
.AppleDouble
.LSOverride

# Windows
Thumbs.db
ehthumbs.db

# Linux
*~

# ============================================================================
# CLOUD/AWS CONFIG
# ============================================================================

.aws/
.config/

# ============================================================================
# TEMPORARY FILES
# ============================================================================

*.tmp
*.log
*.bak
*.swp
*~

# --- from base framework/project_sensitive v4 ---
# Private data and credentials
**/private/**
**/*_private/**
.env
.env.*
!.env.example
.Renviron
**/credentials/**
**/secrets/**

# Local records and caches
framework.db
framework.db-wal
framework.db-shm
.DS_Store

# Sensitive project folders
/inputs/private/
/reference/private/
/outputs/private/
**/sensitive/**


# Keep the secure simulated folder in downloads without tracking its data.
!/inputs/private/
/inputs/private/**
!/inputs/private/simulated/
!/inputs/private/simulated/.gitkeep

# The workshop ZIP adds secure.Rproj and ai-enabled.Rproj, one per copy.
/*.Rproj
