# =============================================================================
# AidaIDE .gitignore
# =============================================================================

# -----------------------------------------------------------------------------
# Secrets (NEVER commit)
# -----------------------------------------------------------------------------
*.local.txt
*.local
LAUNCH_SECRETS_*
.env
.env.*
!.env.example

# -----------------------------------------------------------------------------
# Dev-only marker file
# -----------------------------------------------------------------------------
# .aidaide-dev enables AIDAIDE_DEV_BYPASS in aidaide/licensing/client.py.
# It MUST NOT be tracked or shipped in releases. Devs create it locally with:
#     touch .aidaide-dev
# build_release.py post_build also refuses to ship if it leaks into dist/.
.aidaide-dev

# -----------------------------------------------------------------------------
# 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/
ENV/
env/
.venv/
.env/

# -----------------------------------------------------------------------------
# IDE and Editors
# -----------------------------------------------------------------------------
.idea/
.vscode/
*.swp
*.swo
*~
.project
.pydevproject
.settings/
*.sublime-project
*.sublime-workspace

# -----------------------------------------------------------------------------
# OS Generated
# -----------------------------------------------------------------------------
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
desktop.ini

# -----------------------------------------------------------------------------
# AidaIDE Specific
# -----------------------------------------------------------------------------
# Project context index (local-only, contains codebase structure — NEVER commit)
.aidaide/

# User data and credentials (NEVER commit these!)
.env
mnt/user-data/
*.vault
*.key
credentials.json
secrets.json

# Internal docs (plans, audits, reports — not for distribution)
docs_internal/

# Security scan reports
wegotsomeflaws*.json

# Config backups
*.backup
config.json.bak

# Log files
*.log
logs/

# Temporary files
*.tmp
*.temp
temp/
tmp/

# Session data
sessions/
.sessions/

# Plugin development
plugins/*/node_modules/
plugins/*/.env

# -----------------------------------------------------------------------------
# Testing
# -----------------------------------------------------------------------------
.coverage
htmlcov/
.pytest_cache/
.tox/
nosetests.xml
coverage.xml
*.cover

# -----------------------------------------------------------------------------
# Documentation builds
# -----------------------------------------------------------------------------
docs/_build/
site/

# -----------------------------------------------------------------------------
# Jupyter Notebooks
# -----------------------------------------------------------------------------
.ipynb_checkpoints/

# -----------------------------------------------------------------------------
# Distribution / Packaging
# -----------------------------------------------------------------------------
*.manifest
*.spec
pip-log.txt
pip-delete-this-directory.txt

# -----------------------------------------------------------------------------
# Screenshots and images (optional - uncomment if needed)
# -----------------------------------------------------------------------------
# *.png
# *.jpg
# *.gif
# screenshots/

# -----------------------------------------------------------------------------
# Pre-publish scrub additions
# -----------------------------------------------------------------------------
# Private/quarantine workspace — never commit
_private/
.tmp.driveupload/

# Runtime logs, debug dumps, crash traces
*.log
*.log.*
vault_debug*
web_debug*
startup*.log
startup*.txt
aidaide_live.log
aidaide_output.log
aidaide_syslog.log
stderr.log
stdout.log
syslog_output.log
errormsg.txt

# Runtime databases (recreated on first run)
audit_trail.db
*.sqlite
*.sqlite3

# Scanner / index output
afterphase*.json
codebase_skeleton.json
import_graph.json
latest?scan*.json
sastreport.json

# Browser/curl artifacts
cookies.txt

# Backups and editor swap files
*.bak
*.orig
*.rej
.*.swp
.*.swo

# Internal reports (don't ship)
FINAL_*.txt
EXECUTION_REPORT.txt
COPILOT_*_REPORT.txt
QUICK_REFERENCE.txt
RAG_SYSTEM_FILES.txt
WIDGETS_FILE_MANIFEST.txt
CHANGES.txt
HIERARCHY_BUILDER_BUGS.md

# PyInstaller build artifacts (already covered by build/ and dist/ above,
# but re-state for clarity)
build/
dist/
*.spec.bak


# -----------------------------------------------------------------------------
# Added 2026-04-25 — Official-AidaIDE pre-push cleanup
# -----------------------------------------------------------------------------
# Inno Setup installer output (large .exe artifacts, 1.4GB+)
installer/output/

# Claude Code session worktrees (per-session ephemeral state, ~1.7GB)
.claude/worktrees/
.claude/scheduled_tasks.lock

# Accidentally-named stray directory
Init → _get_theme_colors() → ThemeProvider/

# Internal handoff / session reports (don't ship, created mid-session by Claude)
HANDOFF_*.md
MORNING_HANDOFF_*.md
AidaIDE_running_processes_and_resources.md

# -----------------------------------------------------------------------------
# Added 2026-05-21 — Code-leak prevention follow-up
# -----------------------------------------------------------------------------
# Internal audit, debugger, and per-tab pass reports generated by Claude.
# These are NEVER for end-user shipping and must not enter the repo or build.
CODE_LEAK_AUDIT_*.md
*_DEBUGGER_*.md
*_TAB_DEBUGGER_*.md
SECURITY_ALERT_*.md
ROTATION_*.md
LAUNCH_PLAN_*.md
NEW_SECRETS_*.md
OTA_KEYS_*.md
AUDIT_*.md
audit_*.txt
DEBUG_REPORT_*.md
debugger_audit_*.md

# Stray credential / token files (defence in depth — names also blocked in spec)
*_token
*_secret
*_credential
*_apikey
*_api_key
fleet_api_token
settings.local.json
launch.json

# Certificate / key material (never commit, never ship)
*.pem
*.key
*.p12
*.pfx
*.crt
*.cer

# Per-user runtime state generated at first run (NEVER seed in a build)
personas.json
agents.json
agent_history.json
project_context.json
browser_bookmarks.json
browser_favorites.json
browser_history.json
device_groups.json
disabled_plugins.json
layout_config.json
plugin_settings.json

# =============================================================================
# Added 2026-09-13 - stop the working folder showing up as ~6,900 "changes"
# These are runtime scratch, local copies and generated output. None of it is
# source. Ignoring them does NOT untrack anything already committed.
# =============================================================================

# AidaIDE's own snapshot / staging folders (the IDE writes these at runtime)
.aida_snap*/
.aida_stage*/

# Node modules anywhere (the old rule only covered plugins/*/node_modules)
node_modules/

# Linter / type-checker caches
.ruff_cache/
.mypy_cache/

# Google Drive sync scratch
.tmp.drivedownload/

# Quarantine, disposal and handoff scratch folders
_to_delete/
_to_delete_review_tmp/
_preflight_test_junk/
_pub_private_shelf/
_SCHEDULER_HANDOFF/

# Local working copies and mount points - not source
# (AidaIDE-Web-clean is a separate clone with its own .git inside)
AidaIDE-Web-clean/
mnt/
Claude outputs/

# Build logs and one-off backups
BUILD_LOG_*.txt
*.bak-*
*.gdoc

# -----------------------------------------------------------------------------
# OPTIONAL - uncomment if you don't want the generated decks/PDFs in git.
# You currently track 4 .pptx and 1 .pdf; those stay tracked either way.
# -----------------------------------------------------------------------------
# *.pptx
# *.pdf


# =============================================================================
# Pass 2 - 2026-09-13. The remaining ~560.
#
# WHY: AidaIDE's own rule is "never Edit/Write a .py file, always read-modify-
# write", and every one of those safe edits leaves a timestamped copy behind.
# Those copies are ~90% of what was still showing. They are duplicates of files
# already committed - git has the real history, so the .bak files add nothing.
# =============================================================================

# ---- Backup / snapshot copies left by the safe-edit workflow ----------------
*.bak
*.bak.*
*.bak-*
*.bak_*
*-bak
*-bak-*
*.orig
*.rej

# ---- Scratch, docs and marketing folders git has never tracked --------------
deck_build_scripts/
affiliate_creatives/
agency_out/
Growth_Weekly/
package_manifests/
postbox/
social/
workmaps/
MobileScreenshots/
TikTok_Content/
ci-phase0/
ci-xvfb/
AI_Builder_UI_Plans/
AI_Hierarchy_Handbook/
AidaIDE_Org_Guide/
CodeIntel_Ideas/
Device_UX_Ideas/
Fleet_Connection_Plans/
Help_Ideas/
LCOT_Ideas/
Network_Ideas/
RemoteDesktop_Ideas/
Security_Ideas/
Settings_Ideas/
TeamTool_Ideas/
Terminal_Ideas/

# ---- See the note in chat before keeping these two: they may be real code ---
grok_bridge/
scripts/

# ---- Generated decks, exports and build logs at the repo root ---------------
/*.pptx
/*.pdf
/*.png
/*.gdoc
/*.patch
BUILD_LOG_*.txt

# ---- The helper files I added while sorting this out ------------------------
/CHECK_GIT.bat
/check_git.ps1
/MAKE_REPORT.bat
/make_report.ps1
/PROPOSED_gitignore_additions.txt
/GIT_REPORT.txt
/.gitignore.bak

# =============================================================================
# Pass 3 - branding/. This one matters more than the rest.
#
# branding/ holds the demo videos and voiceovers: a 29 MB .mp4, an 18 MB .wav,
# nine TikTok cuts at 10-19 MB each. Git history is permanent - once a binary
# is committed it is in the repo forever, and GitHub rejects pushes over 100 MB.
# Committing that pile would have made the repo painful to clone for good.
# No video or audio file is tracked today, so nothing is lost by ignoring them.
# =============================================================================

*.mp4
*.mov
*.mkv
*.webm
*.wav
*.mp3
*.m4a
*.jpg
*.jpeg

# Rendered video build output (frames, clips, voiceover takes, QA stills)
branding/demo_video_build/
branding/tiktok/

# Android app is its own repo now (see AIDAIDE-ANDROID.md).
/AidaIDE-Android/
