# Whitelist-mode .gitignore for refs/
#
# Rule: everything at the top level is ignored except entries explicitly
# un-ignored with `!` below. GitHub owner directories (emerged from reorg.sh
# discovery) are NOT listed here — reorg.sh adds them dynamically to its
# in-memory allowlist at runtime. Everything else at top-level is treated
# as "work product" and relocated out of refs/ on --apply.
#
# To keep a new top-level file in refs/, add a `!/filename` line below.

/*

# ── Our tooling ─────────────────────────────────
!/reorg.sh
!/test-reorg.sh
!/status.sh
!/update.sh

# ── Agent rule doc (Codex/Cursor/Claude convention) ─────────────
!/AGENTS.md
!/README.md

# ── Generated indexes ───────────────────────────
!/index.md
!/index.html

# ── Python MCP server (FastMCP) ─────────────────
!/refs_mcp/
!/refs.spec
!/tests/
!/.github/
!/pyproject.toml
!/uv.lock
!/justfile

# ── Local git hooks (lefthook) ──────────────────
# lefthook.yml is the shared config; -local overrides are per-developer
# and stay out of git.
!/lefthook.yml
/lefthook-local.yml

# ── npm publish tree (GitHub Packages) ──────────
# Wrapper + three platform packages staged at publish-npm time.
# CI fills the platform bin/ subdirs from PyInstaller artifacts; only
# the package.json files and bin/refs.js launcher live in the repo.
!/npm/
# Re-ignore staged binaries that the publish-npm CI job materializes.
# Keeping them out of git means the working tree never carries built
# artifacts and a stray local `npm pack` doesn't ship a stale binary.
/npm/refs-*/bin/refs
/npm/refs-*/bin/refs.exe

# Re-ignore build/test artifacts inside the allowlisted dirs above.
# Top-level ``.venv/``, ``build/``, ``dist/`` are already caught by the
# ``/*`` rule — listed only inside allowlisted paths here.
**/__pycache__/
*.pyc
refs_mcp/bench/results/

# ── Standard repo furniture ─────────────────────
!/.gitignore
!/.git/
!/.gitattributes
!/.editorconfig
!/README.md
