# --- JuriCode-JP project-specific ---

# 応募準備・内部メモ(Tokyo Award等)はpublic repoから除外
awards/

# 内部業務文書(税務・アドバイザー紹介依頼・コードレビュー詳細など機密)
business/

# ローカルキャッシュ(e-Gov APIダウンロード等)
tools/**/cache/
tools/**/downloads/
tools/**/_local/

# 一時ファイル・テスト副産物
*.tmp
pytest-cache-files-*/
test-write-permission.tmp

# --- Python ---
__pycache__/
*.py[cod]
*$py.class
*.egg-info/
.eggs/
dist/
# `dist/` above is the setuptools build-output pattern, but it also matched
# `tools/dist/` -- the publication tooling (leak scanner + uploader). Those files
# gate an irreversible public upload and were living OUTSIDE version control:
# `git add tools/dist` silently did nothing (found 2026-07-15). Re-include the
# directory so the source is tracked...
!tools/dist/
# ...but keep the build artifacts a real package build would drop here OUT of git
# (only the source .py under tools/dist/ belongs in the repo).
tools/dist/*.whl
tools/dist/*.tar.gz
tools/dist/*.egg-info/

# build/ は原則すべて derived (再生成できる) ので ignore する。
# ただし NTA / 国税不服審判所から取得してパースしたストアだけは例外で追跡する
# (下の否定パターン)。git の仕様上、親ディレクトリを ignore すると中身の否定が
# 効かないので、`build/` を丸ごと除外せず 1 段ずつ開けている。
#
# Why 追跡するか: これらは e-Gov のように「いつでも取り直せる」ものではない。
# 取得 + パース + 条文リンク付けに数か月かかっており、消すと復旧に同じだけかかる。
# 実際 2026-07-14 に `rm -rf build/chunks` で全消ししかけた (退避が偶然残っていて
# 復元できた)。**「gitignored = 消してよい」ではない**という事実を、コメントでは
# なくリポジトリの構成そのものに持たせる。
#
# ライセンス (docs/licensing.md): 通達 = 著作権法13条2号 (告示・訓令・通達は権利の
# 目的とならない) / タックスアンサー = cc-by-jp-nta / 裁決 = PDL1.0。
# いずれも出典明示で再配布可。
build/*
!build/chunks/
build/chunks/*
!build/chunks/*.tsutatsu.chunks.jsonl
!build/chunks/*-tsutatsu/
!build/chunks/*-taxanswer/
!build/chunks/kfs-*/
build/chunks/*-tsutatsu/*
build/chunks/*-taxanswer/*
build/chunks/kfs-*/*
!build/chunks/*-tsutatsu/*.tsutatsu.chunks.jsonl
!build/chunks/*-taxanswer/*.taxanswer.chunks.jsonl
!build/chunks/kfs-*/*.saiketsu.jsonl

.venv/
venv/
env/
.env
.pytest_cache/
.mypy_cache/
.ruff_cache/

# --- Node (補助スクリプトを置いた場合) ---
node_modules/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# --- OS ---
.DS_Store
Thumbs.db
desktop.ini

# --- Editor / IDE ---
.vscode/
.idea/
*.swp
*.swo
*~

# --- Obsidian ---
.obsidian/
.trash/

# --- Local secrets ---
*.env
*.env.local
.secrets/
credentials.json

# cache/ 直下は原則すべて derived (外部からいつでも取り直せる) ので ignore する。
# ただし cache/laws/ (法令 XML) だけは例外で追跡する。git の仕様上、親ディレクトリを
# ignore すると中身の否定が効かないので、cache/ を丸ごと除外せず 1 段ずつ開けている。
# (cache/revisions/ は 1GB 超あり、絶対に git に入れてはならない。)
#
# Why 追跡するか: cache/laws/ は「いつでも取り直せる」。にもかかわらず追跡するのは、
# 取り直すと中身が変わるからである。配布元は改正を反映するので、再取得は「別のコーパス」
# になる。本文忠実性の照合はこのバイト列を基準に行うため、基準がゲートの下で動くと
# 照合が何も証明しなくなる。commit して固定すれば、基準が版管理され、変更すれば diff に残る。
#
# ライセンス: 出典元のコンテンツは PDL1.0 (公共データ利用規約 第1.0版) で、出典明示のもと
# 複製・再配布・改変・商用利用が可能。本ステップは XML をバイト単位で無改変のまま commit
# するため必要なのは出典明示のみ。法令本文自体は著作権法13条により別途パブリックドメイン。
# 出典: e-Gov法令検索 (https://laws.e-gov.go.jp)
/cache/*
!/cache/laws/

# ablation / eval 出力ディレクトリ (FU-512 等の一時計測結果)
/fu512/
