# =========================
# Python / Django
# =========================

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
*.egg
MANIFEST

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff
instance/
.webassets-cache

# Scrapy stuff
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# Celery
celerybeat-schedule
celerybeat.pid

# Environments
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Ruff
.ruff_cache/

# =========================
# Node.js / Vue.js
# =========================

# Dependencies
node_modules/
jspm_packages/

# Build outputs
frontend/dist/
src/twicc/static/frontend/
src/twicc/static/artifact-broker/
src/twicc/static/artifact-shell/
src/twicc/staticfiles/

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage
coverage/
*.lcov
.nyc_output

# TypeScript cache
*.tsbuildinfo

# Optional npm cache
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Vite
*.local
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# =========================
# Environment / Secrets
# =========================

.env
.env.local
.env.*.local
.env.development
.env.test
.env.production
*.pem

# =========================
# IDE / Editors
# =========================

# JetBrains (PyCharm, WebStorm, etc.)
.idea/

# VS Code
.vscode/
*.code-workspace

# Vim
*.sw[op]
*~

# Emacs
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp

# Sublime Text
*.sublime-workspace
*.sublime-project

# =========================
# OS generated files
# =========================

.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# =========================
# Project specific
# =========================

# Data directory (database, search index, SDK logs) — used in worktrees
db/
search-index/

# Session artifacts and scratch space — data-dir subdirectories that surface
# at the worktree root when the data dir is the worktree itself. Anchored to
# the root (like /.worktrees/ below) so they only match there, never a source
# directory that happens to share the name. No trailing slash: in worktree mode
# devctl symlinks these to the main data dir, and git treats a symlink as a file
# — a dir-only pattern (trailing /) would NOT ignore the link.
/artifacts
/scratch

# SQLite database (legacy location, kept for safety)
data.sqlite
data.sqlite-wal
data.sqlite-shm
*.sqlite3
*.sqlite3-wal
*.sqlite3-shm

# JSONL data files (if generated locally)
*.jsonl

# SDK debug logs
logs/

# Development process controller runtime data
.devctl/

# CLI drop-request runtime files (live in <data_dir>):
#   - twicc.heartbeat: touched every 5s by the live server, read by the CLI
#     to fail-fast when the server is down (see src/twicc/heartbeat.py).
#   - drop-requests/: drop-files written by the TwiCC CLI commands and
#     status files written back by DropRequestsWatcher
#     (see src/twicc/drop_requests_watcher.py).
twicc.heartbeat
drop-requests/

# Hybrid CLI mode runtime files (live in <data_dir>; anchored to the repo
# root so the src/twicc/providers/claude_code/agent/hybrid/ package — and
# any other source dir named "hybrid" — is NOT matched):
#   - /hybrid/: per-session runtime dir (addendum file, attachments)
#   - /hybrid-hooks/: drop directory for hybrid CLI hook event files
#     (see src/twicc/providers/claude_code/agent/hybrid/).
/hybrid/
/hybrid-hooks/

# Git worktrees — anchored to repo root only. An un-anchored `.worktrees/`
# would match any segment of the path, including the worktree's own root
# (`.../.worktrees/<name>/`), which trips up hatchling's sdist exclusion
# logic: hatchling drops every gitignore pattern when it detects the project
# root itself is gitignored.
/.worktrees/

# TwiCC config files (synced settings, stored in data dir — appear in worktrees)
settings.json
terminal-config.json
message-snippets.json
workspaces.json
layouts.json
seen-tips.json
# RPC API token store (SHA-256 digests; lives in the data dir, appears in worktrees).
api-tokens.json
# Per-provider agent settings presets (one file per provider, see
# BaseProviderHelpers.get_settings_presets_path).
*-settings-presets.json

# Single-instance lock (flock anchor) + sidecar info file written by main(),
# both live in <data_dir>.
twicc.lock
twicc.info.json

# Advisory flock anchors (atomic_json.py) for read-modify-write config files —
# empty 0-byte sidecars created next to the data-dir JSON files (and so appear
# in worktrees). Created once, never deleted; their presence is not a held lock.
*.json.lock

# Agent local files
CLAUDE.local.md
AGENTS.local.md
/.claude/
.superpowers/
.codex
