# Build artifacts
build/
dist/
*.egg-info/
*.egg

# Cache
__pycache__/
.pytest_cache/
*.pyc
*.pyo
node_modules/
*.tsbuildinfo
.tscache/

# Backups
.moai-backups/
*.backup/
*-backup/
*_backup_*/
hooks_backup_*/
docs_backup_*/

# Virtual environment
venv/
.venv/
env/
.env/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~
*.sublime-workspace
*.sublime-project
.vscode/settings.json
.vscode/launch.json
.idea/workspace.xml
.idea/misc.xml

# OS
.DS_Store
Thumbs.db
desktop.ini
.AppleDouble
.LSOverride
._*

# Logs
*.log
logs/
*.log.*

# Documentation
docs/

# Temporary files
*.tmp
*.temp
*.bak
*.backup
*~
.#*

# Database files
*.db
*.sqlite
*.sqlite3
*.dbm
*.rdb

# Secrets and credentials (CRITICAL)
.env
.env.local
.env.*.local
.env.production.local
.env.development.local
secrets/
credentials/
*.pem
*.key
*.pfx
*.p12
*.jks
.aws/credentials
.aws/config
.gcloud/
google-credentials.json
firebase-key.json

# Test coverage
.coverage
coverage.json

# Docs build artifacts (but track documentation files)
docs/.next/
docs/node_modules/
docs/.turbo/

# Environment variables and deployment secrets
.vercel/
.vercel/project.json
.netlify/
.netlify/state.json
.firebase/
.mypy_cache
.mypy_cache/
.playwright-mcp
.ruff_cache
.uv_cache
.uv-cache
.venv_issue43_py313

# Python specific
*.egg
*.eggs
*.pot
*.po
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Node specific
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Build tools
.turbo/
.next/
out/
.nuxt/
dist-ssr/
*.local

# Editor directories and files
.DS_Store
.idea/
.idea_modules/
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.project
.pydevproject
.settings/

# Mac
.AppleDouble
.LSOverride
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Windows
[Dd]esktop.ini
[Ss]ystem32/
Thumbs.db
ehthumbs.db

# Linux
.directory

# CI/CD
.github/workflows/*.yml.bak
.gitlab-ci.yml.bak

# Package lock files (uv.lock excluded for package distribution)
uv.lock

# ============================================================================
# Local Development Files (TRACKED for synchronization)
# Note: These are synced from package templates but NOT deployed
# ============================================================================
# ✅ DO TRACK: .claude/, .moai/config/, .moai/scripts/, CLAUDE.md, .mcp.json
# These are needed for local development and syncing with package templates

# ============================================================================
# Local-Only Runtime Files (IGNORED - Never Track)
# ============================================================================
# .moai/ runtime files (local-only, never deploy)
.moai/cache/              # Runtime cache (version checks, git info)
.moai/logs/               # Session logs and command invocations
.moai/memory/             # Runtime state (command execution, subagent logs)
.moai/docs/               # Local documentation (not in template)
.moai/temp/               # Temporary files
.moai/backups/            # Backup files


# ============================================================================
# Package Template Exclusions (Never Deploy)
# These files exist in package templates but should NEVER be deployed
# ============================================================================

# Development-only scripts in templates (never deploy)
src/moai_adk/templates/.moai/scripts/dev/
src/moai_adk/templates/.moai/scripts/*/test_*.py

# Template backups and temp files (never deploy)
src/moai_adk/templates/.moai/backups/
src/moai_adk/templates/.moai/temp/

# ============================================================================
# IMPORTANT: What IS Tracked (Do NOT Add to .gitignore)
# ============================================================================
# ✅ TRACKED: Package templates (source of truth)
#    - src/moai_adk/templates/.claude/ (except Yoda)
#    - src/moai_adk/templates/.moai/config/
#    - src/moai_adk/templates/.moai/scripts/statusline.py
#    - src/moai_adk/templates/CLAUDE.md
#    - src/moai_adk/templates/.mcp.json
#
# ✅ TRACKED: Local development sync files (for updates to templates)
#    - .claude/ (except /moai:release command)
#    - .moai/config/ (local substituted values)
#    - .moai/scripts/statusline.py (synced from template)
#    - CLAUDE.md (local substituted values)
#    - .mcp.json (local config - review before committing credentials!)
# ============================================================================

