# Whitelist .gitignore — ignore everything by default; share only knowledge.
# A stray file (secrets, raw material, exported data, project code) can NEVER leak
# to the remote: making something shared requires an explicit edit here.

# 1) Ignore everything at the root.
/*

# 2) Re-allow the knowledge zones + tooling (their nested files are then tracked).
!/.gitignore
!/AGENTS.md
!/CONTEXT.md
!/now.md
!/kb
!/knowledge.config.json
!/quotes.json
!/viewer.html
!/departments/
!/projects/
!/people/
!/concepts/
!/skills/
!/meetings/
!/tasks/
!/journal/
!/_templates/
!/_ci/
!/assets/
!/scripts/
!/wiki/
!/raw/
!/memory/
!/eval/

# 3) raw/ holds source material that may contain secrets — keep the folder,
#    ignore its contents. /kb-ingest distils raw material into articles; the
#    raw source itself stays local.
/raw/*
!/raw/.gitkeep

# 4) Generated files — rebuilt locally on every sync, never committed
#    (this is what keeps merges conflict-free between people).
/INDEX.md
/INDEX-facets.md
/GAPS.md
/BOARD.md
/kb-data.js
/INSIGHTS.md
/graph.json
/LESSONS.md
# Personal query log stays local; the memory/*.md outcome docs are shared (compound the team's lessons).
/memory/querylog.jsonl
# Per-zone indexes are generated too (hierarchical index for large bases),
# including paginated pages <zone>/INDEX.pN.md for very large zones.
/*/INDEX*.md

# 4b) _pending/ is deliberately absent from the whitelist above. It holds raw session spools
#     (verbatim prompts, paths) written by the SessionEnd capture hook — local working material
#     awaiting distillation, not knowledge. Do not re-allow it: that would push raw transcripts
#     of one person's sessions to everyone with the remote.

# 5) OS / tooling junk.
.DS_Store
node_modules/
