# ============================================
# MoAI-ADK Package Distribution .gitignore
# Version: 0.32.3
# ============================================

# ===========================================
# Build Artifacts & Distribution
# ===========================================
build/
dist/
*.egg-info/
*.egg
*.eggs
develop-eggs/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
.installed.cfg
MANIFEST
*.pyd

# ===========================================
# Python Cache & Bytecode
# ===========================================
__pycache__/
*.pyc
*.pyo
*.pot
*.po
.mypy_cache/
.ruff_cache/
.pytest_cache/

# ===========================================
# Virtual Environments
# ===========================================
venv/
.venv/
env/
.env/

# ===========================================
# Test Coverage
# ===========================================
.coverage
coverage.json
htmlcov/
htmlcov_spec/

# ===========================================
# IDE & Editors
# ===========================================
.vscode/
.idea/
.idea_modules/
*.swp
*.swo
*.sw?
*~
.#*
*.sublime-workspace
*.sublime-project
.project
.pydevproject
.settings/
*.suo
*.ntvs*
*.njsproj
*.sln
.cursor/

# ===========================================
# OS Files
# ===========================================
.DS_Store
.AppleDouble
.LSOverride
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
._*
Thumbs.db
ehthumbs.db
[Dd]esktop.ini
[Ss]ystem32/
.directory

# ===========================================
# Logs & Temporary Files
# ===========================================
*.log
*.log.*
logs/
*.tmp
*.temp
*.bak
*.backup
*.db
*.sqlite
*.sqlite3
*.dbm
*.rdb

# ===========================================
# Backups (All backup directories)
# ===========================================
/backups/
.moai-backups/
*.backup/
*-backup/
*_backup_*/
hooks_backup_*/
docs_backup_*/

# Documentation build output (Nextra)
docs/

# ===========================================
# Secrets and Credentials (CRITICAL)
# ===========================================
.env
.env.*
!.env.example
.env.local
.env.*.local
.env.production.local
.env.development.local
.env.glm
secrets/
credentials/

# Certificate files
*.pem
*.pfx
*.p12
*.jks

# Private keys (specific patterns to avoid false positives)
# FIXED: Issue #237 - Replaced overly broad *.key pattern
*-key.*
*_key.*
*.key.*
*-secret-key.*
*-api-key.*
api-key-*
secret-key-*
private-key*
*-secret.*
*_secret.*
*.secret.*
secret-*.*

# Cloud provider credentials
.aws/credentials
.aws/config
.gcloud/
google-credentials.json
firebase-key.json

# API Keys and Tokens (file patterns only)
# Note: Actual key patterns are checked by pre-commit hooks
*_api_key.txt
*_api_key.json
*.credentials
*.tokens

# Test credentials
test_*_credentials.json
test_*_keys.json
mock_api_response_*.json

# ===========================================
# Claude Code Configuration
# ===========================================
.claude/local/
.claude/settings.local.json
.claude/settings.local.*.json
.claude/.venv/
.claude/.pytest_cache/
.claude/.env.local*

# Skill-specific credentials
.claude/skills/*/.env*
.claude/skills/*/secrets/
.claude/skills/*/*/*secret*
.claude/skills/*/*/*key*
.claude/skills/*/*/*token*

# ===========================================
# .moai/ Directory Management (ROOT ONLY)
# Template .moai (src/moai_adk/templates/.moai/) is fully tracked
# ===========================================

# Exclude all .moai/* by default
/.moai/*

# Include tracked directories
!/.moai/config/
!/.moai/config/**
!/.moai/scripts/
!/.moai/scripts/**
!/.moai/specs/
!/.moai/specs/**

# Exclude local-only directories (explicitly)
/.moai/cache/
/.moai/logs/
/.moai/docs/
/.moai/reports/
/.moai/analytics/
/.moai/archive/
/.moai/archived-skills/
/.moai/backups/
/.moai/error_logs/
/.moai/indexes/
/.moai/learning/
/.moai/optimization/
/.moai/release/
/.moai/research/
/.moai/templates/
/.moai/rollbacks/
/.moai/work/
/.moai/temp/
/.moai/memory/
/.moai/memory/**
# Exclude local development scripts
/.moai/scripts/phase*.py
/.moai/scripts/phase*.sh
/.moai/scripts/sync-*.sh
/.moai/scripts/sync-*.py
/.moai/scripts/*sync*.sh
/.moai/scripts/__pycache__/

# ===========================================
# Node.js (for docs/Nextra)
# ===========================================
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
*.tsbuildinfo
.tscache/

# ===========================================
# Build Tools & Frameworks
# ===========================================
.turbo/
.next/
out/
.nuxt/
dist-ssr/
*.local

# ===========================================
# Deployment & CI/CD
# ===========================================
.vercel/
.netlify/
.firebase/
.github/workflows/*.yml.bak
.gitlab-ci.yml.bak

# ===========================================
# Package Manager
# ===========================================
uv.lock
.uv_cache/
.uv-cache/

# ===========================================
# Miscellaneous
# ===========================================
.playwright-mcp
.venv_issue43_py313
theme.config.tsx

# Keep local development guide tracked
!CLAUDE.local.md
