# Virtual environment
.venv/

# Python
__pycache__/
*.pyc
*.egg-info/
dist/
build/
.pytest_cache/
.ruff_cache/
.coverage

# ChromaDB
.chroma/

# Secrets
.env
.devpulse_secret.md

# OS
.DS_Store
.vscode

# AIPass runtime state (local to each installation)
AIPASS_REGISTRY.json
AIPASS_ROOTS.json
.trinity/
.watchdog/
.ai_mail.local/
ai_mail.local/
.feedback.local/
DASHBOARD.local.json
STATUS.local.md
STATUS.md
dev.local.md
# Blanket: every *.local.md on this machine is a working file that stays home.
# Named files above are kept for documentation; this catches the next one that
# is not named here (e.g. TESTING_<plan>.local.md) before it ships publicly.
*.local.md
CLOSED_PLANS.local.json
.ai_central/
system_logs/
notepad.md

# Plans (managed by flow, local to each installation)
FPLAN-*.md
DPLAN-*.md
RPLAN-*.md
TDPLAN-*.md
PPLAN-*.md
APLAN-*.md
# Branch local directories
logs/
artifacts/
dropbox/
tools/
docs.local/
.archive/
.backup/
.backup_system/
.recovery/
.seed/
.spawn/

# Module runtime JSON (config/data/log per command)
**/*_json/

# Branch-specific runtime files
src/aipass/memory/config/fragmented_memory_config.json
src/aipass/memory/config/fragmented_memory_state.json
src/aipass/memory/config/memory_bank.config.json
src/aipass/memory/config/.plans_processed.json
src/aipass/trigger/trigger_data.json
src/aipass/trigger/trigger_data.lock
src/aipass/drone/drone_command_registry.json
src/aipass/flow/CLOSED_PLANS.local.json
src/aipass/seedgo/apps/standards/aipass/pack.json

# Claude Code local state
.claude/hooks/__pycache__/
.claude/hooks/.last_diagnostics_file
.diagnostics_state.json
.claude/hooks/probes/last_ping.jsonl
.claude/worktrees/

# Disabled files (AIPass convention: rename with (disabled) instead of delete)
*(disabled)

# Private integrations — driver layer (@api) and wrapper layer (all branches)
# Per DPLAN-0133. Contents gitignored; only scaffold README.md tracked.
src/aipass/*/apps/integrations/**
!src/aipass/*/apps/integrations/README.md

# Spawn template exceptions — a template must ship WHOLE (the 2026-08-17 CI red
# proved it: swallowed payload dirs mean fresh clones mint citizens with no
# birth certificate and no inbox). WILDCARDED across templates/*/ since the 2.0
# rename (aipass_framework + project_agent -> citizen, DPLAN-0319): the old
# name-specific negations stopped matching anything after the rename and 17
# payload files silently left the public repo. Name-specific lines are how a
# template ships incomplete — never add one.
!src/aipass/spawn/templates/*/.trinity/
!src/aipass/spawn/templates/*/.trinity/**
!src/aipass/spawn/templates/*/.ai_mail.local/
!src/aipass/spawn/templates/*/.ai_mail.local/**
!src/aipass/spawn/templates/*/.archive/
!src/aipass/spawn/templates/*/.archive/**
!src/aipass/spawn/templates/*/.spawn/
!src/aipass/spawn/templates/*/.spawn/**
!src/aipass/spawn/templates/*/.claude/
!src/aipass/spawn/templates/*/.claude/**
!src/aipass/spawn/templates/*/*_json/
!src/aipass/spawn/templates/*/*_json/**
!src/aipass/spawn/templates/*/logs/
!src/aipass/spawn/templates/*/logs/**
!src/aipass/spawn/templates/*/artifacts/
!src/aipass/spawn/templates/*/artifacts/**
!src/aipass/spawn/templates/*/dropbox/
!src/aipass/spawn/templates/*/dropbox/**
!src/aipass/spawn/templates/*/tools/
!src/aipass/spawn/templates/*/tools/**
!src/aipass/spawn/templates/*/docs.local/
!src/aipass/spawn/templates/*/docs.local/**
!src/aipass/spawn/templates/*/DASHBOARD.local.json

# .archive/ exceptions: NONE, ever (Patrick ruling 2026-08-18: .archive is the
# disposal zone, cleaned without warning — nothing that must survive or ship may
# live there; durable records belong in tracked homes). The ONLY ignored-dir
# exceptions in this file are spawn's framework templates above, which exist so
# the template ships complete. Two prior .archive parks (api tests capture-lane,
# memory fragments) were stripped under this ruling.

# DPLAN-0297 governance sample capture (2026-08-16, @devpulse-endorsed early
# action): durable JSON record of the 28-day surfacing sample from
# logs/engine.log + .log.1, taken before rotation ages the source lines out —
# the artifact IS the point, so it must survive in the repo, not just on one
# machine's disk. Collides with the blanket `artifacts/` ignore above;
# selective negation keeps the rest of memory/artifacts/ (runtime
# placeholders) ignored.
!src/aipass/memory/artifacts/
src/aipass/memory/artifacts/*
!src/aipass/memory/artifacts/dplan_0297_governance_sample_20260814.json

# Commons artifacts subsystem — real source code (craft/trade/capsule), NOT a
# runtime dir. Collides with the blanket `artifacts/` ignore (line 49); *.py-only
# negation keeps the logs/ + __pycache__/ subdirs ignored. Without this the
# tracked test_artifacts.py imports a module absent from CI -> ImportError.
!src/aipass/commons/apps/handlers/artifacts/
!src/aipass/commons/apps/handlers/artifacts/*.py

# hooks boot-shim installer — must ship so fresh clones can install the claude()
# shell function. Collides with the blanket tools/ ignore (line 51).
!src/aipass/hooks/tools/
src/aipass/hooks/tools/*
!src/aipass/hooks/tools/install_boot_shim.sh

# skills suspend grants — reviewable root-grant drafts + installer for the
# /suspend control verb (DPLAN-0270 P5). Must ship: Patrick reviews and
# installs from the repo. Collides with the blanket tools/ ignore (line 51).
!src/aipass/skills/tools/
src/aipass/skills/tools/*
!src/aipass/skills/tools/suspend/
!src/aipass/skills/tools/suspend/**

# User/sample projects — each is its own git repo (git init on create).
# Contents never belong to the AIPass repo; only the catalog README is tracked
# so the public repo can point at the standalone project repos.
projects/*
!projects/README.md

# CI artifacts
windows-pytest-results/

# Parked / one-off
HERALD.md
backup_data/
backups/
backup_system/
readme_history/
branch_audits/
claude_4_7_transition_notes.md
README_ORIGINAL_DISABLED.md
*.bak
test/
sandbox_test/

# SQLite WAL sidecars (runtime artifacts — commons.db ro-feed etc.)
*.db-wal
*.db-shm
