# ============================================================================
# Multi-stack .gitignore for dev-framework projects
# ============================================================================

# -- Environment & Secrets --
.env
.env.local
.env.*.local
*.pem
*.key

# -- Security-sensitive docs (kept in ~/Documents/dev-framework-private/) --
*THREAT-MODEL*
*.secret
credentials.json

# -- Private/IP content (per global convention: drafts, scratch, hackathon ground-truth) --
/private/

# -- Benchmark run artifacts --
/results/*.jsonl

# -- Aider session artifacts (generated by empirical probe runs) --
.aider.chat.history.md
.aider.input.history
.aider.tags.cache.v*/

# -- Hook runtime state (read by branch-check.py / branch-tracker.py) --
/.claude/expected-branch.txt

# -- Python --
__pycache__/
*.py[cod]
*$py.class
*.so
venv/
.venv/
env/
.Python
build/
develop-eggs/
dist/
eggs/
*.egg-info/
.eggs/
*.egg
.pytest_cache/
htmlcov/
.coverage
.mypy_cache/
.ruff_cache/

# -- Node.js --
node_modules/
.next/
out/
.nuxt/
.output/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.turbo/

# -- Go --
/vendor/
*.exe
*.exe~
*.dll
*.dylib

# -- Rust --
/target/
Cargo.lock

# -- IDE --
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store
Thumbs.db

# -- Docker --
docker-compose.override.yml

# -- Threat Models (private — security posture, not policy) --
*THREAT-MODEL*
*threat-model*

# -- Prompt Snapshots --
prompt_snapshots/

# -- Claude State --
.claude/state/*
!.claude/state/.gitkeep
.claude/settings.local.json
.claude-port
.git-env

# -- Framework Metrics & Generated Dashboards (local-only) --
.context/metrics/
.context/insights.html
.context/dashboard.html
.context/.narrative-cache/

# Detached-worker runtime receipts and child worktrees.  A receipt is local
# operational evidence; the candidate itself remains in its Git worktree.
/.shipteam/workers/

# -- QA Reports --
.qa-reports/

# -- Build & Coverage --
coverage/
*.lcov
.nyc_output/

# -- Logs --
*.log
logs/

# -- OS --
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
.aider*

# deep-r skill cache (regenerable session scratch)
.claude/skills/st-deep-r/cache/

# Atomic-write temp files from scripts/clear-version-description.sh. These are
# unlinked on any failure, so one only survives if the unlink ITSELF failed.
# They are ignored because the auto-version-bump workflow's commit step runs
# `git add -A` — without this, an orphan would ride into a bot commit on main.
/.claude-md-clear.*
/.claude-md-trim.*

# -- Codex host emission (generated by `shipteam init --host codex|both`) --
# This repo's canonical host is Claude: CLAUDE.md and .claude/ are the tracked
# sources. The Codex equivalents are GENERATED from them (src/shipteam/cli.py --
# _write_codex_project_hooks, _scaffold_agent_skills, and the AGENTS.md render),
# so tracking them here would create a second copy of every agent, skill and
# instruction file, free to drift from the first. That is the exact failure the
# wheel-parity gates exist to catch (ADR-071); it should not be re-introduced by
# hand at the repo root.
#
# Un-ignored, these are a live hazard rather than clutter: auto-version-bump.yml
# commits with `git add -A`, so an untracked emission left in a maintainer's tree
# can ride into a bot commit on main -- the same reasoning as /.claude-md-clear.*
# above.
#
# Root-anchored on purpose. In a CONSUMER project .agents/skills/ is a shared
# namespace that may hold hand-authored skills worth tracking (cli.py leaves any
# directory without a .generated-by-fw-script marker alone); this rule is about
# this repo's own root, not that case.
#
# NO TRAILING SLASH, deliberately. A `dir/` pattern only matches once git can see
# that the path IS a directory, so on a checkout where the emission has not been
# generated -- every CI runner -- the rule silently does not apply. The slashed
# form passed locally and failed in CI for exactly that reason. These patterns
# must hold on a tree where the paths do not exist yet, because that is the tree
# `git add -A` runs against. `test_no_emission_pattern_is_directory_only` pins it.
/.agents
/.codex
/AGENTS.md
