# ═══════════════════════════════════════════════════════════════
#  PROJECT JAMES — .gitignore
# ═══════════════════════════════════════════════════════════════

# ── 시크릿 / 환경변수 (절대 커밋 금지) ─────────────────────────
.env
.env.local
.env.*.local
*.key
*.pem
secrets/

# ── Python ─────────────────────────────────────────────────────
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# ── 가상환경 ────────────────────────────────────────────────────
venv/
env/
ENV/
.venv/

# ── 데이터베이스 / 사용자 데이터 (런타임 생성) ─────────────────
*.db
*.sqlite
*.sqlite3
# SQLite WAL/SHM/journal 사이드카 — *.db 글롭이 못 잡음
*.db-shm
*.db-wal
*.db-journal
*.sqlite-shm
*.sqlite-wal
*.sqlite-journal
james_users.db
james_audit.db
james_sessions.db
james_episodic.db
chroma_db/
/memory/
workspace/
uploads/
backups/

# RAGAS run outputs (Issue #46) — committed baseline lives in eval/ragas/
reports/ragas_*.json
# bench.py per-run reports (Issue #45) — committed baseline lives in eval/regression/
reports/bench_*.json
# Per-trace observability files (Issue #47) — one JSONL per request, kept locally
reports/trace/

# Per-model chroma directories (BL-9 swap pattern) — chroma_db_bge_m3/ etc.
# Existing `chroma_db/` line above covers the legacy MiniLM default.
# This wildcard covers any future embedding-model swap.
chroma_db_*/

# Benchmark workspace caches (regeneratable from upstream fixture sources)
workspaces/hotpot_eval/eval/

# Cycle γ external benchmark caches + run reports (regeneratable from
# upstream fixture sources; ALCE/MuSiQue/2Wiki licensed, RGB GitHub-raw).
# The loaders re-fetch on demand. Cycle γ reports live alongside the
# code so per-PR reviewers can read them inline, but the raw JSON is
# large (~MB) and bench result deltas land in summary docs anyway.
eval/external/_fixtures/
reports/cycle_gamma/

# QVT measurement cell JSONs — large (~50-250 KB each), regeneratable via
# `scripts/qvt_ablation_matrix.py --resume`. Committed baseline references
# stay in eval/qvt/. Workspace-scoped variants under workspaces/*/ also
# stay local-only.
reports/research-runs/qvt-ablation-cells/
workspaces/*/reports/research-runs/qvt-ablation-cells/

# Smoke test outputs (ephemeral, prefixed `_smoke-*`)
reports/research-runs/_smoke-*.md

# ChromaDB snapshot JSONs (history backups before re-chunk experiments;
# regeneratable but large). Restore via
# `scripts/research/restore_chroma_from_snapshot.py`.
reports/research-runs/chroma-snapshot-*.json

# Internal drafts (DM drafts, joint-piece skeletons, cross-stack drafts,
# cleanup decision docs) — must not appear in public git history before
# 3-author meeting consensus per
# `memory/feedback_intent_vehicle_gap_collective_archival` +
# `memory/feedback_dm_collab_response_eagerness_trap`.
# Specific prefixes only (NOT general `*-draft-*.md` — that pattern would
# catch e.g. `architecture-md-...-draft-DEFERRED.md` which is meant to
# document deferred-state in repo for future revival).
reports/research-runs/ali-*-draft-*.md
reports/research-runs/m9-*-draft-*.md
reports/research-runs/track-2c-phase-5-cross-stack-draft-*.md
reports/research-runs/untracked-cleanup-decision-*.md

# 사용자 PDF에서 추출된 wiki entity (개인 데이터, repo에 푸시 X)
# [W7-hotfix 2026-05-10, W1 진단 §2-C] 이전엔 5 카테고리 한정 패턴이라
# food/event/relation 등 신규 카테고리 추가 시 자동으로 ignored 되지 않아
# 누수 위험. wildcard 로 모든 카테고리 커버 + 미래 카테고리도 자동 보호.
wiki/entity/prod/**/*.md
# defense — entity/ 없이 prod 직속에 데이터를 넣는 경로도 차단
# (구조 의도와 별개로 누수 가능 경로 막음).
wiki/prod/
# media (audio/video) 추출 산출물 — entity 와 동일한 사용자 데이터
wiki/media/prod/
# test wiki — 검증/디버깅용 임시 데이터 (production 과 동일한 schema 라
# 누수 위험은 적지만 git 추적할 가치 없음).
wiki/entity/test/**/*.md
# 메타 파일은 명시적으로 추적 — 카테고리 인덱스 / 폴더 보존용 .gitkeep
!wiki/entity/prod/**/index.md
!wiki/entity/prod/**/.gitkeep

# Knowledge Cascade Phase A 마이그레이션 백업 (2026-05-13) — 운영자가
# 최종 검증 후 수동 삭제. repo 에 들어가면 wiki/ 와 같은 개인 데이터
# 누수 위험.
wiki.pre-v03-migration/
wiki.rollback-trash/

# α-5 benchmark workspaces — corpus / chroma / ingested wiki / per-cell
# JSON outputs are all re-derivable from the dataset adapter
# (scripts/hotpot/download_multihop_rag.py) + the build_fixture script
# + the matrix runner. Only the structural files (README, .env,
# ATTRIBUTION) are tracked so reviewers see the layout.
workspaces/*/raw/
workspaces/*/uploads/
workspaces/*/wiki/
workspaces/*/chroma_db*/
workspaces/*/eval/multihop_rag_raw_queries.json
workspaces/*/eval/multihop_rag_queries.json
workspaces/*/eval/qvt/baseline_*.json
workspaces/*/reports/

# 운영자 튜닝 가능한 런타임 설정 (web search role/threshold 등).
# 코드 안에 안전한 기본값 존재 — 운영자별 오버라이드는 로컬에만.
web_search_config.json

# ── ML 모델 / 임베딩 캐시 ──────────────────────────────────────
models/
*.bin
*.gguf
*.safetensors

# ── 로그 / 임시 ────────────────────────────────────────────────
*.log
*.jsonl
james_attack_log.jsonl
.cache/
tmp/
temp/

# RAB SPEC §4 re-verification artifacts MUST be tracked — they are
# part of every released RAB result triple (result.json + log.jsonl
# + mapping.json). Override the global *.jsonl rule for reports/rab/.
!reports/rab/*.jsonl

# ── IDE / OS ───────────────────────────────────────────────────
.vscode/
.idea/
.claude/
*.swp
*.swo
.DS_Store
Thumbs.db
desktop.ini

# ── 테스트 결과 / 리포트 ───────────────────────────────────────
reports/*.json
reports/*.txt
.coverage
.pytest_cache/
htmlcov/

# ── 한국어 내부 노트 (개인 작업 파일) ──────────────────────────
자메스_프로젝트_*
레이어별_*
중간_진행_*
*.korean_notes
docs/internal/

# ── 백업 ───────────────────────────────────────────────────────
*.bak
*.backup
james_backup_*/
backup_*.zip
*.old
