# compiled output
/dist
apps/*/dist
/node_modules

# pnpm's content-addressable store — should live in the global store
# (~/Library/pnpm/store). A local copy here is an orphan from a stray
# `pnpm install --store-dir .pnpm-store`; never commit it. The nested pattern
# covers stores leaked into workspace packages (e.g. apps/web/.pnpm-store via
# the dev container bind-mount).
/.pnpm-store/
**/.pnpm-store/
apps/web/.pnpm-store/

# selfhosted dev VM state (scripts/selfhosted/*.sh)
.kodus-dev/
# direnv config (optional, written by 'yarn selfhosted:setup')
.envrc

# TypeScript compiled files (should NOT be in src/ or packages/)
# These should only exist in dist/ directories
*.d.ts
# ...except hand-written type augmentations, which are source, not build output.
!apps/web/src/types/*.d.ts
*.js.map

# Ignore compiled .js files in src/ and packages/ (they should be in dist/)
# But exclude dist/ directories (those are OK - managed by each package)
src/**/*.js
packages/**/*.js
!src/**/dist/**/*.js
!packages/**/dist/**/*.js

# But keep source .js files (config files, scripts, fixtures, etc.)
!*.config.js
!**/*.config.js
!scripts/**/*.js
!**/scripts/**/*.js
!**/__fixtures__/**/*.js
# Explicit exceptions for root-level source .js files (for clarity)
!tsconfig-paths-bootstrap.js

.env
.env.qa
.env.prod
# billing env for runo (scripts/env/pull-billing-env.sh): holds a Stripe key
.env.billing
.env.local
.env.reconciled
.env.bak.*
.env.err.*
.env.work.*

# E2B sandbox secrets
e2b-sandbox/config.json
_*
!apps/web/src/**/_*
!libs/common/email/templates/_*
# Shared test fixtures live in `__test-utils__` dirs — the `_*` rule above would
# ignore them (dir starts with `_`), which silently breaks CI (the files exist
# only on dev disks). Keep them tracked.
!**/__test-utils__/
!**/__test-utils__/**
!scripts/selfhosted/_common.sh
!test/__mocks__/
# Provider-module conformance fixtures are committed artifacts (Phase 3 / D-05):
# recorded doGenerate results the offline gate replays. `_*` above would ignore
# the `__fixtures__` dir, so un-ignore it (its JSON files don't start with `_`).
!libs/llm/providers/__fixtures__/
!libs/llm/providers/__fixtures__/**
# Per-provider recorded fixtures (openai/__fixtures__, anthropic/__fixtures__,
# …) — same committed-artifact rule; the shared pattern above does not reach the
# nested dirs, so un-ignore them explicitly (otherwise `_*` swallows them and CI
# can't load the offline conformance specs).
!libs/llm/providers/**/__fixtures__/
!libs/llm/providers/**/__fixtures__/**
# The BYOK config matrix replays every distinct config shape stored in
# production (anonymized: no org ids, no credentials). Same committed-artifact
# rule — without this the corpus exists only on the author's disk and the
# production-shape invariants quietly assert over an empty array in CI.
!libs/llm/testing/__fixtures__/
!libs/llm/testing/__fixtures__/**
!**/__tests__/
!scripts/selfhosted/_*.sh

# Playwright failure / debug dumps
# Local working copy of the durable e2e history log. The log of record lives
# on the `e2e-history` orphan branch; this is just what history-backfill.sh
# and `run report` read locally.
tests/e2e/history/

tests/e2e/playwright/failure-*.html
tests/e2e/playwright/failure-*.png
tests/e2e/playwright/stripe-*.png
# Mintlify _snippets/ folder (docs/_snippets, mcp-manager/src/.../*) — those
# are real source, not scratch files matched by _*.
!docs/_snippets/
!docs/_snippets/**

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

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
.specify/

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# Sentry Config File
.sentryclirc

# yarn novo
.yarnrc.yml
.yarn

.cosine
.bmad
.vscode/settings.json
.vscode/launch.json
dev.env
**/workflow-bundle.js
/kmeans_frames

/temp

.kodus-graph-cache.json
.kody/sessions/*
.kody/logs/*

environment.ts
src/ee/configs/environment/environment.ts
certs
.windsurf
.sdk

.yalc
yalc.lock
.env.test
.env.local.tmp
docker-compose.prod-local.yml
# packages
# .packages
.test.json

# Temporary JSON files
MIGRATION-GRPC-TO-HTTP.md
scripts/duplicate-prs

# Custom
test.json
specs
.cursor/rules/bmad/
.specify
.opencode
.build_cache
.opencode
.cursor
# Ignore .claude/ contents by default (settings.local.json etc), but
# allow versioned project-scoped agent runbooks (commands + skills) so
# any dev / LLM agent gets the same trigger surface and steps.
.claude/*
!.claude/commands/
!.claude/commands/**
!.claude/skills/
!.claude/skills/**
.codex
.agents
skills-lock.json

# Eval results
evals/promptfoo/results/
evals/promptfoo-safeguard/results/
scripts/benchmark/results/
scripts/benchmark/node_modules/
scripts/benchmark/*-trace-metrics.json
evals/investigation/evals/

# ESLint Cache
.eslintcache

.worktrees
.entire

scripts/pr-creator/accounts.json
scripts/pr-creator/prs.json
scripts/pr-creator/prs-azure.json
scripts/pr-creator/package-lock.json
scripts/pr-creator/node_modules
tests/e2e/playwright/package-lock.json
tests/e2e/playwright/node_modules
.spectral-report.json
docs/openapi.postman_environment.json
docs/openapi.newman.json
docs/openapi.newman.responses.2xx.json
docs/openapi.newman.responses.4xx-5xx.json

# Web (Next.js)
apps/web/.next/

# TypeScript incremental cache
*.tsbuildinfo
apps/web/out/
apps/web/build/
apps/web/coverage/
apps/web/node_modules/
apps/web/.pnp
apps/web/.pnp.js
apps/web/.vercel
apps/web/.env
apps/web/.env*.local
apps/web/next-env.d.ts
apps/web/.idea
apps/web/.project
apps/web/.classpath
apps/web/.c9/
apps/web/*.launch
apps/web/.settings/
apps/web/*.sublime-workspace
apps/web/.vscode
worktrees
scripts/benchmark/runs/*

# Analytics parity harness output (regenerated per run)
parity-report.json
/.env-preview/

# GSD planning workspace (local-only)
.planning/

.secrets/

# Lscreenshots from the SSO E2E demo, etc). Always regenerated.
.tmp/

# Playwright MCP session snapshots (DOM dumps, console logs, screenshots)
.playwright-mcp/

# IDE - Zed
.zed/

opus-diagnosis-ptbr/
scripts/benchmark/node_modules/

# Benchmark recall experiments — analysis outputs + session tooling (regenerated, not product code)
docs-internal/agent-execucao/
scripts/benchmark/process-run.sh
scripts/benchmark/funnel-extract.js
scripts/benchmark/funnel-report.py
scripts/benchmark/langfuse-enrich.py
scripts/benchmark/execucao-detalhada.py
scripts/benchmark/golden-context.py
scripts/benchmark/golden-context.py.bak
evals/kody-rules/prod-rules.json
.grok/settings.json

.tessl
.claude/skills/tlc-spec-driven

# runo: validation evidence downloaded per-run (see .kodus/workspace.yaml)
.kodus/evidence/
runo
test1.json

# Stryker mutation testing (run artifacts, never committed)
reports/mutation/
.stryker-tmp/

# The FILLED copy of the BYOK live-tier credentials. The `.example.json` next to
# it is the template and IS tracked; this one holds real vendor keys and must
# never be committed — it exists so the JSON can be validated locally before it
# is pasted into the GitHub secret.

# Local yalc-linked packages and dev credentials: kodus-common/kodus-flow come
# from the registry, and test.json holds a production credential.
packages/kodus-common/
packages/kodus-flow/
packages/test.json

# Research run outputs (#1821): kept locally, out of the repo.
evals/enrichment/results/
evals/severity/results/

# Research data kept locally, out of the repo (#1821).
evals/dedup/gold-v3/trabalho/
evals/dedup/holdout-20/
evals/shared/secondary-models.js
evals/dedup/dedup-runner.js
evals/enrichment/dataset/candidates.json
evals/enrichment/dataset/references-self/
evals/enrichment/dataset/references-candidates/
evals/severity/dataset/*
!evals/severity/dataset/items.json
!evals/severity/dataset/anchors.json
evals/benchmark-sets/
.kodus/workspace.bench.yaml
