# Sange v3 .gitignore.
#
# Layered for the polyglot codebase (Python core + Laravel/PHP web UI + Docker
# infrastructure + agency-workbook design metadata). See `.sange/gitignore/profiles/`
# (T-G-015 emits these) for the per-project gitignore profile system.

# ---------------------------------------------------------------------
# Python
# ---------------------------------------------------------------------
__pycache__/
*.py[cod]
*$py.class
*.so
.Python

# Virtual envs
.venv/
venv/
env/
ENV/
.python-version
.tool-versions

# Build / dist
build/
dist/
*.egg-info/
*.egg
wheels/
pip-wheel-metadata/

# Test + lint caches
.pytest_cache/
.ruff_cache/
.mypy_cache/
.tox/
.nox/
htmlcov/
.coverage
.coverage.*
coverage.xml
*.cover
.hypothesis/

# Type stubs we may generate during build
*.pyi.stubs/

# ---------------------------------------------------------------------
# Laravel / PHP (web/)
# ---------------------------------------------------------------------
web/vendor/
web/node_modules/
web/public/build/
web/public/hot
web/public/storage
web/storage/*.key
web/storage/logs/*
!web/storage/logs/.gitkeep
web/storage/framework/cache/data/
web/storage/framework/sessions/
web/storage/framework/testing/
web/storage/framework/views/
web/bootstrap/cache/*.php
!web/bootstrap/cache/.gitkeep
web/.env
web/.env.backup
web/.env.production
web/.env.local
web/.phpunit.cache/
web/.phpunit.result.cache
web/auth.json

# ---------------------------------------------------------------------
# Node / JS toolchain (used by web/ assets)
# ---------------------------------------------------------------------
node_modules/
.npm/
.yarn/
.pnp.*
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json.backup

# ---------------------------------------------------------------------
# Docker / container artifacts
# ---------------------------------------------------------------------
.dockerignore.local
*.local.yml
docker-compose.override.yml
docker-compose.*.local.yml

# ---------------------------------------------------------------------
# Sange-specific (see §6.4 + §10 of .design/sange-architecture-prompt.md)
# ---------------------------------------------------------------------
# Auto-generated Makefile shim — never tracked. The shim is regenerated by
# `sange init` from the modular .sange/makefiles/<category>/*.mk fragments.
# `sange doctor` fails loudly if this file is found tracked in git.
/Makefile

# Per-repo encrypted secrets (per §6.4 + §6.10). The contents are encrypted but
# the directory itself stays untracked to remove any path-disclosure surface.
.sange/secrets/
.sange/.recovery
.sange/.state

# Per-repo audit, telemetry, and lifecycle artifacts default to gitignored.
# Teams that want shared review queues opt-in via `track_commits = true` in
# .sange/config.toml — see §6.8.6.
.sange/audit/
.sange/telemetry/
.sange/purge/
.sange/bundles/artifacts/

# Counter file is durable but unique per checkout; not shared.
.sange/commits/.counter

# Sange's own local-dev test repos (created by tests/integration/).
tests/_tmp/
tests/fixtures/_generated/

# ---------------------------------------------------------------------
# Editor + OS noise (host-side, never the published tree)
# ---------------------------------------------------------------------
# JetBrains
.idea/
*.iml
*.iws
out/

# VSCode (workspace-level; per-user settings stay)
.vscode/
.history/
*.vsix

# Vim / Emacs
*.swp
*.swo
*~
\#*\#
.\#*

# Claude Code per-user local settings (the file `.claude/settings.json` is the
# repo-shared form and CAN be tracked; `.claude/settings.local.json` is the
# per-user override that must NOT be tracked).
.claude/settings.local.json
.claude/local-settings.json
CLAUDE.local.md

# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
.Spotlight-V100
.Trashes

# Windows
Thumbs.db
Desktop.ini
$RECYCLE.BIN/
*.lnk

# Linux
.fuse_hidden*
.directory
.Trash-*
.nfs*

# ---------------------------------------------------------------------
# Design + held v1/v2 trees
# ---------------------------------------------------------------------
# The .design/ folder IS tracked — it is the agency workbook (ADR-027).
# Do NOT add `.design/` here. The snapshots/ sub-tree is also tracked because
# phase-boundary snapshots are part of the audit record (ADR-031).
#
# `sange-v1/` and `sange-v2/` remain on disk until v0.1.0 beta per R-017 in
# .design/plans/risk-register.md. They are **not tracked** in this repo's git
# history because:
#   (a) sange-v1 contains its own .git directory, which git would otherwise
#       record as a gitlink/submodule reference (single commit hash, no
#       content), defeating the preservation goal.
#   (b) The v1 audit findings are already ingested into:
#         * `.design/sange-architecture.md` §5 (full audit narrative)
#         * `.design/sange-architecture-prompt.md` §4.0 (verified facts)
#         * `tools/generators/commit_templates.py::V1_LEGACY_MESSAGES` (the
#           102-entry array, verbatim — a regression test asserts the tuple
#           still byte-matches `sange-v1/configs/config.sh:25-128`).
#   (c) Once v0.1.0 ships beta + `sange-v1/`/`sange-v2/` are deleted from
#       disk, the audit content survives in (a)/(b). The original codebase
#       is preserved at the existing `github.com/simtabi/sange` git remote
#       (the pre-v3 history).
sange-v1/
sange-v2/

# ---------------------------------------------------------------------
# Local-only conveniences
# ---------------------------------------------------------------------
.env
.env.*
!.env.example
*.pem
*.key
*.p12
*.pfx
id_rsa
id_rsa.pub
id_ed25519
id_ed25519.pub
credentials.json
secrets.json
