# Ryu (SCI) Project .gitignore

# =============================================================================
# Python
# =============================================================================
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
# ANCHORED (#365). These were `lib/` and `lib64/` — no leading slash, so git
# matched a directory called `lib` at ANY depth and silently swallowed
# apps/kongen-web/lib/ and apps/flow-local/src/lib/, both of which are Next.js /
# Vite SOURCE trees. Files already tracked were unaffected, which is exactly why
# nobody noticed; NEW files were not. `git add apps/kongen-web/lib/x.ts` refused
# and `git add -A` skipped it SILENTLY, so a branch could push a page importing a
# file that is not in the repository. #312 needed `git add -f` twice for this.
# Root-anchored is safe: a Python `lib/` only appears inside a virtualenv or a
# build dir, and .venv/ venv/ ENV/ env/ build/ are all ignored in their own right.
/lib/
/lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual environments
.venv/
venv/
ENV/
env/

# =============================================================================
# IDE and Editors
# =============================================================================
.idea/
.vscode/
*.swp
*.swo
*~
.project
.pydevproject
.settings/
*.sublime-project
*.sublime-workspace

# =============================================================================
# OS Generated
# =============================================================================
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
desktop.ini

# =============================================================================
# Secrets and Credentials
# =============================================================================
.env
.env.*
!.env.example
*.pem
*.key
*.crt
api.keys
credentials.json
secrets.yaml
*.secret
.mcpregistry*

# =============================================================================
# Data and Logs
# =============================================================================
*.log
*.log.*
logs/
*.csv
# #390 exception: committed test fixtures. These two CSVs ARE the observation —
# real cycle-report measurements pulled read-only off the box, which
# tests/research/zenryu/test_stability_sweep_real_epoch_390.py replays to prove
# the stability checks fail on historical data rather than on a reconstruction.
# Without this negation the blanket *.csv rule drops them SILENTLY and that test
# fails for everyone but the author.
!tests/research/zenryu/fixtures/*.csv
# 502 exception: gmail-estate archive manifests. These CSVs ARE the verification
# instrument -- per-object size + MD5 + CRC32C read off the SOURCE buckets BEFORE
# any copy exists, which is the only thing that can later prove the copy is good.
# They are deliberately stored outside the archive bucket, so the repo is where
# they live. The blanket *.csv rule dropped the first one SILENTLY -- it did not
# appear even as untracked -- and an archive whose manifest never landed verifies
# green against nothing.
!infra/estate/*.csv

# =============================================================================
# Scratch output -- the designated place for anything a script or an agent
# EMITS rather than something the repo ASSERTS.
#
# Convention: write run output, probe transcripts, intermediate dumps and
# throwaway analysis to out/ . It is ignored wholesale, so nothing has to be
# remembered and nothing lands in `git status` demanding a decision.
#
# THE LINE THAT MATTERS, because it is the one that gets it wrong:
#   * OUTPUT is evidence of a run. It goes in out/ and may be deleted.
#   * An ARTEFACT the repo relies on -- a manifest that later proves a copy is
#     good, a fixture a test replays, a measurement a claim rests on -- is NOT
#     output. It is committed, and it needs an explicit negation above.
# Two such negations already exist (the #390 fixtures and the #502 manifests),
# and BOTH were added after the blanket rule had silently swallowed the file.
# If you are about to put something in out/ that another run has to read back,
# it belongs in the tree instead.
#
# Terminal transcripts Fiz runs by hand go to /Users/fiz/kongen-out/ , which is
# outside the repo entirely and is not affected by this.
# NOTE the shape: `out/*` and NOT `out/`. Ignoring the DIRECTORY makes git skip
# descending into it, so the negation below never fires and the folder cannot be
# committed at all. Ignoring its CONTENTS leaves the negation reachable. Caught
# here by trying it rather than by reading it -- `git add` refused, quietly.
out/*
!out/.gitkeep

*.parquet
*.pkl
*.pickle
data/raw/
data/processed/

# =============================================================================
# Database
# =============================================================================
*.db
*.sqlite
*.sqlite3

# =============================================================================
# Docker Volumes (local data)
# =============================================================================
*_data/
*_postgres_data/
*_neo4j_data/
*_redis_data/

# =============================================================================
# Experiment Raw Data (keep reports, exclude raw data)
# =============================================================================
organisms/capital/experiments/*/results/
organisms/capital/experiments/*/data/
organisms/capital/experiments/*/logs/
!organisms/capital/experiments/*.md
!organisms/capital/experiments/*.yaml
!organisms/capital/experiments/*/comprehensive_report.md

# =============================================================================
# Build and Distribution
# =============================================================================
*.manifest
*.spec

# =============================================================================
# Jupyter Notebooks
# =============================================================================
.ipynb_checkpoints/
*.ipynb_checkpoints

# =============================================================================
# Coverage and Testing
# =============================================================================
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# =============================================================================
# Type Checking
# =============================================================================
.mypy_cache/
.dmypy.json
dmypy.json

# =============================================================================
# Large Files (organism-specific)
# =============================================================================
organisms/capital/organism.log*
organisms/capital/organism.pid
organisms/capital/*.cypher
organisms/capital/poetry.lock

# =============================================================================
# Temporary Files
# =============================================================================
tmp/
temp/
*.tmp
*.temp
*.bak
*.backup

# =============================================================================
# Mount Points
# =============================================================================
mnt/

# =============================================================================
# Run artifacts & datasets (phase3-reorg: not source — GCS/local only)
# =============================================================================
experiments/
results/
data/
assets/

# ...but the frontend apps have *source* directories that happen to be named
# `data/` and `assets/`. Without these negations, new modules added under
# e.g. apps/garden-web/src/data/ are silently ignored: `git add` reports
# nothing, the commit looks complete, and the build breaks on a fresh clone
# (found while landing #346, where organismInfo.ts was already tracked and so
# still showed as modified while its new sibling modules were invisible).
!apps/*/src/data/
!apps/*/src/data/**
!apps/*/src/assets/
!apps/*/src/assets/**

# =============================================================================
# Terraform state & provider binaries (state holds plaintext secrets)
# =============================================================================
*.tfstate
*.tfstate.*
.terraform/

# =============================================================================
# Scripts that may contain sensitive info
# =============================================================================
organisms/capital/run_*.py
organisms/capital/check_*.py
organisms/capital/test_*.py
organisms/capital/debug_*.py
organisms/capital/verify_*.py
organisms/capital/warmup.py
organisms/capital/wipe_*.py
organisms/capital/reset_*.py
organisms/capital/flatten_*.py
organisms/capital/analyze_*.py
organisms/capital/update_*.py
organisms/capital/repro*.py
docs/handover/yoryu/yoryu.txt

node_modules/

# Local build / IDE / tooling artifacts (2026-08-15 main-tree cleanup)
.next/
.windsurf/
.agents/
.claude/worktrees/
skills-lock.json
# third-party installed skills (kept local; project skills e.g. kongen-doc-pdf are committed)
.claude/skills/stripe-best-practices
.claude/skills/stripe-projects
.claude/skills/upgrade-stripe
.claude/skills/glab-*
.claude/skills/gitlab-cli-skills
# Kongen product checkouts — canonical source is the GitHub distribution repos
# (kongen-labs/*); these are local working copies with 0 tracked files in THIS repo
# (downloaded mcp-publisher binaries, node_modules, TS build cache, server.json, etc.).
kongen-dashboard/
kongen-mcp/
kongen-sdk/

# H85 Gate 0 spike cache (raw corpora / assembled arrays — not committed)
tools/research/injection_gate0/_cache/

# 223 migration bundle build output (workstation-local, never committed)
graph-migrate-bundle/
