.venv/
__pycache__/
*.pyc
node_modules/
.next/
dist/
build/
.env
.env.local
*.log
.claude/logs/
.claude/slots/
.DS_Store
Thumbs.db
.mypy_cache/
.pytest_cache/
.coverage
/shadow_ai_grc.db
shadow-sec-ai.db
/_r*_probe_*.db
tmp_perf_probe*.py
mutants/

# Lint/build artifacts
lint_output.txt
frontend/lint_output.txt

# Backup files
*.bak

# Rust build artifacts
endpoint-agent/target/

# Unrelated external project (has its own git repo)
hunyuan-video/

# Session strays — user files / generated tmp, never tracked
*.pdf
fn-patches/
.audit_tmp/
.tmp_claude/

# User-submitted runtime data (PII-shaped, never tracked)
src/tpra/vendors/_user_submitted/

# Personal session memory
memory/

# Disabled hook backups (kept locally as reference)
.claude/hooks.disabled/

# SDK build/runtime artifacts
sdk/typescript/node_modules/
sdk/typescript/dist/
sdk/python/.coverage
sdk/python/.venv/

# Design handoff artifacts (one-off, archived locally)
Claudedesign/
*.egg-info/
.claude/worktrees/
.p1_passport_baseline.json
DALEEQ-handoff.zip

# Wave 0 T4 — Playwright screenshots and temp artifacts
tmp/

# P-GOLDEN B2 — FULL external academic corpora (InjecAgent + JailbreakBench).
# Samples stay committed (corpus/external/*_sample.jsonl); the FULL converted
# sets are local-only (large, regenerate via vendor_external --full-from-raw).
src/backend/benchmark/corpus/external/full/

# P-GOLDEN B2 layer-2 — LOCAL ONNX classifier weights for TWO independent models:
#   1. protectai/deberta-v3-base-prompt-injection-v2 (Apache-2.0) — ~739MB model.onnx
#      lives at the classifier/ root (src/backend/models/classifier/).
#   2. madhurjindal/Jailbreak-Detector via traromal/Jailbreak-Detector-ONNX
#      (MIT per HF model card; unconfirmed from vendored files) — ~263MB model.onnx
#      lives in the jailbreak/ subdir (src/backend/models/classifier/jailbreak/).
# Both are GITIGNORED and NEVER committed. The single rule below covers both.
# Download locally via services/ml_classifier.download_model(). The detector
# degrades gracefully when absent (deterministic regex layer is the always-on path).
src/backend/models/classifier/

# Dev SQLite DBs and backups (W9.5/W9.6 cleanup)
daleeq_dev.db
daleeq_dev.db.*
daleeq_dev.db-*
test.db
*.bak-*
/shadow_ai_grc.db
shadow_ai_grc.db-*
zehniq_dev.db
zehniq_dev.db-*
# The internal marketing-ops console's OWN database (marketing-ops/ is local
# team tooling, never deployed). It is standalone: it does NOT read any of the
# product databases above, it creates this file itself on first start, and it
# holds real prospects' email addresses — which is the reason it must never be
# committed. The `-wal`/`-shm` siblings are SQLite's journal files.
/marketing-ops/data/*.db
/marketing-ops/data/*.db-wal
/marketing-ops/data/*.db-shm
.scratch-artifacts/
.tmp_work/
.tmp_debug/

# Frontend build cache (regenerable)
frontend/.cache/

# graphify knowledge graph (regenerable, large)
graphify-out/
.env.bak*
# Rotation-age ledger written by scripts/rotate-secrets.sh:265
# (`printf '%s=%s\n' "$key" "$ts" >> "$ROTATION_FILE"`, ROTATION_FILE=".env.rotation"
# at :12). Rows are `KEY=ISO8601-TIMESTAMP` — the NAME of a secret and WHEN it was
# last rotated, never the secret's value — so this is hygiene, not a leak. It is
# per-machine state about one operator's local rotation history and means nothing
# in anyone else's checkout. Ignored anyway because the file did not exist when the
# rule was written, and the first `--rotate` run would otherwise drop an untracked
# file into `git status` for whoever ran it, which is how debris gets `git add -A`'d.
# No leading slash on purpose: :622 recomputes it as
# `$(dirname "$ENV_FILE")/.env.rotation`, so with `--env-file config/.env` the
# ledger lands beside that file rather than at the repo root — an anchored rule
# would miss it. The transient `.env.rotation.bak` that `sed -i.bak` (:262) creates
# and `rm -f` (:263) deletes is already covered by `*.bak` (:29) if a run dies
# between those two lines.
.env.rotation

# Rendered temp audit artifacts (scratch, regenerable)
docs/audits/.artifact-tmp/

# Ask-Daleeq 50-question live-eval RAW capture (2026-08-05). The write-up
# `docs/audits/2026-08-05-ASK-DALEEQ-50-QUESTION-EVAL.md` IS committed; this is
# the unreviewed raw harness output behind it. Kept local for three reasons:
# `run_eval.py` hardcodes the dev API key and an absolute /Users path, and
# `results.json` carries two live-format `confirm_token` values from a dev run.
# Nothing committed hard-depends on it — the two tests that read the corpus
# (`test_ask_daleeq_model_baseline_v2.py:361`,
# `test_ask_daleeq_synthesis_observability.py`) skip cleanly when it is absent
# (verified: 42 passed, 1 skipped with the directory moved away), and every other
# reference is a source COMMENT citing provenance. `replay_ask_eval_v1_vs_v2.py`
# is a human-run CLI reporter, not a pytest case, so it is allowed to need it.
docs/audits/.ask-eval-scratch/

# VULN-059: private keys / certs / keystores — NEVER commit secret material
*.pem
*.key
*.p12
*.pfx
*.crt
id_rsa
id_rsa.*

# Scratch/scratchpad working dirs — historically carried live Venice keys in
# striker drivers (redteam C-finding 2026-07-08); NEVER commit
scratchpad/

# Scratch striker/discovery drivers — carry live Venice key, NEVER commit (redteam C-finding 2026-07-08)
tests/redteam/_stage1_grounded_discovery.py
tests/redteam/_stage1_frames.json
tests/redteam/_stage2_grounded_exec.py
tests/redteam/_stage2_venice_exec.py
tests/redteam/_stage2_grounded_results.json
tests/redteam/_stage2_venice_results.json
tests/redteam/_stage2_venice_run.log
tests/redteam/_stage2_run.log
tests/redteam/_bench_*.py
tests/redteam/_bench_*.json
tests/redteam/_bench_*.log
tests/redteam/_qwen_selfdiscovered_frame.json

# Scratch attack-session repro drivers (2026-07-19 discovery-engine window) — never commit
tests/redteam/_repro_*.py
tests/redteam/_fcm_*_attack.py
# `tests/redteam/_lane_*_adversarial.py` WAS here. DELETED 2026-08-10: it was
# swallowing real security suites, not scratch. It hid
# `_lane_d_authless_watch_adversarial.py` (8 tests: authless-SSE cross-tenant leak,
# projection leak, enumeration oracle, per-IP watcher cap) and
# `_lane_a_strike_fabrication_adversarial.py` (8 tests: strike-fabrication) —
# 16 tests, zero in version control, never collected. Both are now
# `tests/redteam/test_lane_*.py`. After that promotion the glob matched ZERO files:
# it protected nothing and stood ready to swallow the next one. A dead ignore rule
# over a naming family that keeps producing real suites is a loaded gun.
#
# `_lane_*_attack.py` is NOT a glob any more, for the same reason — the `_lane_`
# family has now produced four real suites. These two are the ONLY members, both
# genuinely disposable: standalone script drivers with module-level asserts and
# `sys.exit(1)` (no `def test_`), run as `python <file>`, NOT pytest suites. Listed
# literally so a future `_lane_*` file cannot match a pattern nobody wrote for it.
tests/redteam/_lane_a_prose_fabrication_attack.py
tests/redteam/_lane_e_persona_unproven_seed_attack.py
tests/redteam/_killchain_probe.py
tests/redteam/_killchain_rescore.py
tests/redteam/_recon_discovery_qwen*.py
tests/redteam/_qwen_*_TEMP.py
tests/redteam/_attack_*_isolation.py
tests/redteam/_gap*_repro.py
tests/redteam/_runstate_*_repro.py
tests/redteam/_frameworks_fakegreen_repro.py
tests/redteam/_report_surface_cluster_fakegreen.py
tests/redteam/_t*_real_arena_emission_analyzer.py
tests/redteam/_striker_bench_*.py
tests/redteam/_[0-9]*_repro.py

# Scratch model-zoo + engine drivers (2026-07-19 oracle-hardening window) — never commit
tests/redteam/_gemma_*_TEMP.py
tests/redteam/_zoo_*_TEMP.py
tests/redteam/_attacklib_*_TEMP.py
tests/redteam/adversarial/_batch_*.py
# `tests/backend/_lane_*.py` and `tests/backend/_p0_*.py` WERE here. DELETED
# 2026-08-10 — same class as the `_lane_*_adversarial` deletion above, and the
# reason the `_lane_c1_reaper` suite survived only by ACCIDENT: a gitignore pattern
# containing a slash is anchored, and `*` never crosses `/`, so
# `tests/backend/_lane_*.py` matched only files sitting DIRECTLY in tests/backend/.
# `_lane_c1_reaper_adversarial.py` lived one directory deeper
# (tests/backend/routers/) and was tracked purely because of that. The two files
# directly in tests/backend/ were not so lucky:
#   _lane_d_arena_breach_count_adversarial.py  4 tests (arena-breach fake-count)
#   _lane_b_pool_recycle_dialect_guard.py      4 tests (security-CLAIM lane)
# `_p0_*` had already hidden two P0 consent-gate suites (42 + 13 tests). All are
# now `test_*`; both globs matched ZERO files afterwards. Deleted rather than kept.
tests/backend/_repro_*.py

# Scratch FE adversarial/fakegreen repro tests — _-prefix keeps them out of the default run (never commit)
frontend/src/**/_*.test.tsx

# TO-9 Stage 2 — regenerable synthetic security-work-product output (a live
# worker writes here; commit the ml_data code + dir structure, never the rows)
src/backend/ml_data/synthetic/*.jsonl

# DLP-#3 red-team tri-plane harness — Cargo build output (861MB) and the scratch
# JSON batches the Python driver hands to the node/rust harnesses. The harness
# SOURCE (Cargo.toml + src/main.rs) is committed; its build products never are.
tests/redteam/dlp3_attack/rust_harness/target/
tests/redteam/dlp3_attack/_*.json

# ---------------------------------------------------------------------------
# Debris classes that escaped the two backup rules above
# ---------------------------------------------------------------------------
# `*.bak` (:28) needs the name to END in `.bak`, and `*.bak-*` (:88) needs a
# DASH after it. A tool that appends an epoch with a DOT — `Makefile.bak.1784438124`,
# `pre-tool-use.sh.bak.1784434563` — matches neither, so every timestamped backup
# this repo has ever made has been sitting in `git status` untracked. Also `.orig`,
# which no rule covered at all.
*.bak.*
*.orig

# Runtime SQLite debris. `placeholder.db` is a 1.3MB SQLite with 60 tables that
# no code in the tree references. `_prove_demo_scratch.db-{shm,wal}` are ORPHANED
# journals — the parent `.db` they belong to does not exist, so they are the
# residue of a killed process and can never be replayed.
placeholder.db
_prove_demo_scratch.db*
# Same class, found by the 2026-08-04 wave audit: 3.7MB of `.c1.db-{shm,wal}` and
# `.kb.db-{shm,wal}` whose parent `.db` files do not exist and which no code in the
# tree references. Untracked, so `git add -A` would have committed them.
.c1.db*
.kb.db*

# Generated at RUNTIME by tests/uat/conftest.py:65-72, which writes an absolute
# path from whatever machine ran the suite. Committing it would bake one laptop's
# filesystem into the repo.
_uat_alembic.ini

# Absolute-path SYMLINK -> sdk/typescript/node_modules (verified with readlink).
# Git would happily commit the link and it would dangle on every other machine.
tests/redteam/verifier_door5/node_modules

# MACHINE-GENERATED corpus fan-out (684 files). Written every Monday 02:00 by
# `corpus_generate_fanout`, which is a deterministic template mutation of the
# seed corpus with content-addressed filenames — same seeds in, same bytes out.
# Nothing here is hand-authored, so committing it would add 684 files of churn
# per week to review for zero information. Regenerate instead of restoring.
src/redteam/scenarios/derived/

# MACHINE-GENERATED probes in an OTHERWISE-TRACKED directory. READ BEFORE
# EDITING: `src/redteam/scenarios/field/` holds 190 TRACKED probes
# (`field-regression-f1` .. `f191`, f9 absent) that MUST STAY TRACKED, alongside
# an unbounded number that `field_probe.py` mints at runtime. Both sets are
# written by the same generator and are byte-identical in shape; they differ
# only by number.
#
# DO NOT try to tell the two sets apart BY CONTENT — measured 2026-08-10, no
# content marker separates them. `tags: [arena_generated, regression]` is on the
# generated ones AND on 188 of the 190 tracked. The old "regressions-of-
# regressions" marker this comment used to cite ("field-regression-f170 fired")
# is now on 0 of 190 tracked and 0 of the generated set; that f421-f796 clone
# generation is gone from disk entirely. The ONLY durable discriminator is
# PROVENANCE, which is what the id encodes: an id outside the committed
# f1..f191 set was minted at runtime by `field_probe.py` from a live DB
# `finding.id` on one developer's machine (e.g. field-regression-f1933.yaml:2
# `Regression probe from finding 1933`, payload `REGRESSION-finding-1933-F1933`).
# Those ids are meaningless in anyone else's checkout.
#
# 2026-08-10 — THE RANGE PATTERN DIED EXACTLY AS ITS OWN COMMENT PREDICTED.
# The previous rule was a three-digit numeric range, `f[4-7][0-9][0-9]`
# (f400-f799), and warned: "IF THE GENERATOR EVER EMITS f800+ THIS PATTERN
# STOPS COVERING IT." It did. 13 four-digit probes (f1933..f1947) landed
# untracked-but-unignored. Widening to four digits only moves the cliff to
# f10000, so the rule below matches the GENERATOR'S ID FORMAT instead of a
# digit count:
#
#   src/redteam/corpus/field_probe.py:91   PROBE_ID_PREFIX = "field-regression-"
#   src/redteam/corpus/field_probe.py:176-178
#       def _probe_id(finding_id: int) -> str:
#           return f"{PROBE_ID_PREFIX}f{finding_id}"
#   src/redteam/corpus/field_probe.py:563   probe_id = _probe_id(int(finding.id))
#   src/redteam/corpus/field_probe.py:565   out_path = out_dir / f"{probe_id}.yaml"
#
# `finding.id` is an unbounded DB autoincrement, interpolated with plain `{}` —
# never zero-padded, never width-capped. So the emitted shape is exactly
# `field-regression-f<decimal digits>.yaml` at ANY width, which is what
# `f[0-9]*` matches. There is no digit count left to outgrow.
#
# The `!` lines then RE-INCLUDE the committed set. Enumerating a numeric range
# is only safe on a set that CANNOT GROW: f1..f191 is 190 committed files, and
# the generator cannot add to that range because it refuses to overwrite an
# existing probe (field_probe.py:568 `if out_path.exists(): return out_path`).
# The UNBOUNDED side is now shape-matched and the FROZEN side is enumerated.
# That inversion IS the fix — do not put the growing set back on a range.
# ONE HOLE, deliberately left open: f9 is the single id in 1..191 with no file,
# so a fresh dev DB (autoincrement restarts at 1) could mint f9 and it would
# show up untracked rather than ignored. Visible, not silent — that is the safe
# failure direction, and `!...f[0-9].yaml` is what keeps the other nine tracked.
#
# Adding a NEW probe above f191 on purpose? It will be ignored by design. Add a
# `!` line for it here in the same commit, then re-run the tracked-but-ignored
# check, which must print nothing:
#   git ls-files -i -c --exclude-standard
# Verified 2026-08-10: 13 generated files ignored, 190 tracked files ignored = 0.
src/redteam/scenarios/field/field-regression-f[0-9]*.yaml
!src/redteam/scenarios/field/field-regression-f[0-9].yaml
!src/redteam/scenarios/field/field-regression-f[0-9][0-9].yaml
!src/redteam/scenarios/field/field-regression-f1[0-8][0-9].yaml
!src/redteam/scenarios/field/field-regression-f19[01].yaml

# Scratch audit reports written during a single working session and superseded by
# the committed docs under docs/. Dot-prefixed + `.tmp.md` by convention so they
# are obviously transient; they carry no reviewed conclusions.
docs/.gate-a-audit.tmp.md
docs/.gate-b-audit.tmp.md
docs/.scheduled-job-spend-audit.tmp.md
# Same class, 2026-08-04 wave: 12 more scratch audit/STRIDEW/worklist files.
# Superseded by the ADRs under docs/adr/ and the tests they produced. Glob rather
# than another hand-maintained list, scoped to the dot-prefixed .tmp.md convention.
docs/.*.tmp.md

# ---------------------------------------------------------------------------
# Re-include TRACKED artifacts shadowed by the broad patterns above (B2-3:
# git ls-files -i -c --exclude-standard). These are committed evidence / fixtures
# that must stay tracked and visible; un-shadowing them untracks nothing. Files
# that SHOULD be untracked (build artefacts / backups / scratch probes) are left
# shadowed above and flagged separately for a human `git rm --cached` call.
# ---------------------------------------------------------------------------

# *.log (:10) shadows committed pilot evidence + fixtures — re-include those
# specific tracked paths; stray logs everywhere else stay ignored.
!tests/redteam/reports/cexec-eval/*.log
!tests/scanner/fixtures/captured_logs/*.log
!docs/ux-diary/live-evidence/arena-r1-vs-planner-rounds.log

# frontend/src/**/_*.test.tsx (:159) shadows ONE tracked adversarial test —
# re-include that single tracked file so its changes aren't silently hidden; the
# broad scratch-test pattern still ignores all other _*.test.tsx repros.
!frontend/src/components/assure/_lane_c2_stale_gate_adversarial.test.tsx

# ===========================================================================
# STRUCTURAL RULE — KEEP THIS LAST. Nothing pytest collects may be gitignored.
# ===========================================================================
# The line above is a hand-written one-off negation for ONE file. It exists
# because someone already hit this class of accident and patched around the
# instance instead of the rule. Seven more instances surfaced on 2026-08-10
# alone: four `_lane_*` suites (24 tests) and two P0 consent-gate suites
# (42 + 13 tests), every one of them ignored, untracked and never collected.
#
# This is the rule, not another exception. `pytest.ini:28` says
# `python_files = test_*.py`, and `pytest.ini:27` says `testpaths = tests`.
# So a file under tests/ is collected by `make test` and by CI IF AND ONLY IF
# its basename matches `test_*.py`. The negation below therefore says exactly:
# ANYTHING PYTEST COLLECTS IS VISIBLE TO GIT. Not "these named files" — the
# whole class, present and future. Git resolves the LAST matching pattern, so
# this overrides every rule above it, including ones not written yet.
#
# What a future author CANNOT do by accident any more: write a security suite,
# give it a `_`-prefixed scratch-looking name that some glob happens to match,
# and lose it. To lose a suite now you must give it a name pytest will not
# collect — and `tests/test_no_hidden_test_suites.py` fails the build on exactly
# that, by AST-scanning ignored files for `def test_` / `class Test`.
# The two halves are deliberate: git can only see paths, so git enforces
# "collectable => visible"; only a test can read file CONTENT, so the test
# enforces "has test bodies => collectable".
#
# Genuinely disposable scratch is UNAFFECTED and still ignored: every scratch
# driver in this repo is `_`-prefixed (`_bench_*`, `_repro_*`, `_*_TEMP.py`,
# `_stage[12]_*`, `_killchain_*`, ...), and `_foo.py` does not match
# `test_*.py`. That convention is what makes this safe — and it is the SAME
# convention authors were relying on when they assumed `_` only meant "not
# collected by default". It never only meant that. Now it does.
#
# DO NOT append ignore rules below this line — git takes the last match, so a
# rule added underneath would silently re-open the hole. Add them above, and
# they will be correctly overridden for anything pytest collects. (The meta
# test probes `git check-ignore` directly, so it fails wherever you put it.)
#
# Not re-included, deliberately: git cannot re-include a file whose PARENT
# DIRECTORY is excluded, so `tests/redteam/dlp3_attack/rust_harness/target/`
# (:185) and `tests/redteam/verifier_door5/node_modules` (:218) stay excluded.
# Both are vendored build output, neither contains a single `test_*.py`
# (verified 2026-08-10), and the meta test skips them for that reason.
!tests/**/test_*.py
