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

# Virtual environments
venv/
.venv/
ENV/
env/

# IDE
.idea/
.vscode/
*.swp
*.swo
*~

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/
.nox/
backend/backend/

# Generated test results and runtime data
detector_test_results_*.json
# Outcome-quality build artifacts — regenerable from data/external/ via
# scripts/build_outcome_training_corpus.py + scripts/train_outcome_models.py.
# Code is the source of truth; the large corpora + fitted models are not tracked.
backend/data/outcome_corpus_*.jsonl
backend/data/outcome_models/
backend/data/outcome_model_validation_*.json
backend/data/fix_feedback.jsonl
backend/data/progress_log.jsonl
backend/data/mast_test_results*.json
backend/data/otel_test_results.json
backend/data/calibration_history.jsonl
backend/data/calibration_report.json
backend/data/baselines/
backend/data/error_analysis_*.json
backend/data/atbench/
backend/app/data/
# FixEffectivenessTracker concurrency artifacts (atomic-write temp, flock
# sidecar, and corrupt-file backups — never committed).
backend/data/.fix_effectiveness.lock
backend/data/.fix_effectiveness.*.tmp
backend/data/fix_effectiveness.json.corrupt-*

# Calibration / audit / experiment scratch (recovery backups, dry-run audits,
# production-scoring sweeps, relabel candidates, hand-crafted checkpoints).
# Ship data is the tracked golden_dataset_*.json / capability_registry.json.
backend/data/*.bak
backend/data/*.bak.*
backend/data/*external_only*.json
backend/data/*dryrun*.json
backend/data/*_production_scoring.json
backend/data/*_checkpoint*.jsonl
backend/data/*_hand-crafted*
backend/data/proposed_relabels_*.json
backend/data/relabel_revert_audit_*.json
backend/data/fp_guard_audit_summary.json
backend/data/pairwise_severity/
# Regenerable staging output of `test_healing_e2e.py --stage`; the cases are
# promoted into the tracked healing_cases/authored_cases.json.
backend/scripts/healing_cases/staged/

# Outreach / LinkedIn network analytics (root-level scratch tables).
/pisama_network_*.csv
/pisama_network_*.md
/pisama_tierA_*.csv
/pisama_tierA_*.md

# Claude Code worktrees (transient agent workspaces)
.claude/worktrees/
# Scheduled-tasks runtime lock (harness scratch).
.claude/scheduled_tasks.lock

# Playwright
frontend/tests/auth/storage-state.json
frontend/test-results/
frontend/playwright-report/
frontend/playwright/.cache/
frontend/.lighthouseci/

# Environment - never commit anything resembling .env unless it has .example suffix
.env
.env.*
!.env.example
!.env.*.example

# Vercel
.vercel

# Scraped traces (large data files) - only at root level
/traces/

# macOS
.DS_Store

# Secrets - never commit
deployment-env-vars.md
frontend/.env.local

# Secrets and credentials
*.pem
*.key
*.crt
credentials.json
*.secret
# Local-only DB connection strings — one careless `git add -A` away
# from leaking the prod URL into a public repo. File mode 600 alone
# doesn't help once it's git-tracked.
.prod-db-url
.*-db-url
*.db-url
# OAuth tokens (Gmail outreach scripts, calendar tokens, etc.)
**/token.json
**/refresh_token.json
**/calendar_token.json
# Browser-session storage from social automation (contains live cookies)
**/.li-chrome-profile/
**/chrome-profile/
**/cookies.sqlite
**/Cookies

# Node (frontend)
node_modules/
.next/
out/

# Logs
*.log
logs/

# Local config
*.local
models/
# Exception: ship the small trained MAST-v4 artifacts. Git can't re-include
# a file whose parent dir is ignored, so un-ignore each parent first. The
# 1.3GB embedder/ and 73MB adaptive_thresholder.pkl stay on the Modal volume
# (pull with `modal volume get pisama-ml-v4-model / backend/data/models`).
!backend/data/models/
!backend/data/models/mast_v4/
backend/data/models/mast_v4/*
!backend/data/models/mast_v4/config.json
!backend/data/models/mast_v4/model.pt
!backend/data/models/mast_v4/scaler.pkl
!backend/data/models/mast_v4/thresholds.json
!backend/data/models/mast_v4/training_report.json
_archived/

# Sensitive environment files (never commit)
frontend/.env.local
frontend/.env.vercel.production
.env.local

# Confidential docs (strategy, pricing, competitive intel)
docs-internal/

# Terraform
.terraform/
*.tfstate
*.tfstate.*
.terraform.lock.hcl
backend/models/
.deck-drive-id
# Synth-agent runtime state (written at repo root, backend/, and the package).
/.synth-state.json
backend/.synth-state.json
packages/pisama-synth-agents/.synth-state.json

# External benchmark datasets (too large for git; download separately)
backend/data/trail/

# Gemini code review reports
reviews/

# Confidential fundraising / strategy materials
fundraise/

# OAuth + service-account credentials (never commit; load via env or local-only paths)
scripts/client_secret*.json
scripts/token*.json
client_secret_*.json
**/credentials.json
**/*service*account*.json
.playwright-mcp/
oauth_client_personal.json
*.tsbuildinfo

# Skill-directory mirror auto-synced from .claude/skills/ (canonical); don't track duplicates
.agents/skills/
