# Dependencies
node_modules/
pnpm-lock.yaml
bun.lock
deno.lock

# Logs
logs/
*.log
npm-debug.log*
*.tmp
*.bak
.cache/

# Installation logs and backups (Story 1.9 - Error Handling & Rollback)
.visian-install.log
.visian-install.log.*
.visian-backup/
.visian-core.backup*/                # Backup directories (any timestamp)

# Build output
build/*.txt
web-bundles/

# Environment variables
.env
.env.local
.env.*.local
.env.production
.env.development
.env.test

# System files
.DS_Store
Thumbs.db
nul                           # Windows temporary file

# Private keys and certificates
*.key
*.pem
*.p12
*.pfx
*.crt
*.cer
*.p7b
*.p7c

# Secrets and credentials directories
secrets/
credentials/

# Private local commands (not for repository)
.claude/commands/mmosMapper/
.claude/commands/hybridOps/

# Private local squads (not for repository)
squads/
keys/
*.secret
*.credentials

# Binary installers and development artifacts
*.msi                         # Windows installer packages
*.exe                         # Executable binaries
*.bat                         # Development batch scripts (sync-agents.bat, etc.)
*.sh                          # Development shell scripts
sync-*.bat                    # Agent sync scripts
sync-*.sh                     # Agent sync scripts

# Development tools and configs
# Note: .husky/, .prettierrc, .prettierignore are TRACKED for pre-commit hooks (Story 3.1)

# IDE and editor configs
.windsurf/
!.windsurf/rules/
!.windsurf/rules/agents/
.cursor/rules/                # Cursor IDE personal rules and configurations
!.cursor/rules/agents/

# AI assistant files
CLAUDE.md
.claude
!.claude/commands/
!.claude/commands/VISIAN/
!.claude/commands/VISIAN/agents/
!.claude/CLAUDE.md
!.claude/rules/
.gemini
!.gemini/
!.gemini/rules/
!.gemini/rules/VISIAN/
!.gemini/rules/VISIAN/agents/
!.gemini/rules/VISIAN/agents/*.md

# AI Session Artifacts (Story 6.1.2.6 - Decision Logging)
# Auto-generated decision logs from yolo mode executions
.ai/
*.decision-log.md

# Project-specific
# Note:  is SOURCE CODE for framework-development mode
# It should NOT be ignored in the main repository
.visian-core.backup*/                # Only ignore backup directories
test-project-install/*
sample-project/*

# Expansion Projects (separate from core VISIAN-AI-AGENCY-OS)
# These folders are from other projects and should NOT be in this repository
.visian/                        # VISIAN expansion project files
.visian/project-status.yaml     # Project status cache (Story 6.1.2.4 - auto-generated)
.cursor/                      # Cursor IDE project files
visian-memory-layer-mvp/        # Separate memory layer project
memory/                       # Memory squad
performance/                  # Performance squad
scripts/                      # Project-specific scripts (not part of core)
security/                     # Security squad
telemetry/                    # Telemetry squad
tests/                        # Test files for expansion projects

# VISIAN Development Artifacts (generated during workflow execution)
# These files are created by agents during development and should NOT be in version control
# NOTE: docs/prd/ is TRACKED - it contains important product documentation
qa/                           # Test artifacts and quality assurance files
epic-retrospective.md         # Epic retrospective documents
*.stats.md                    # Statistics and analysis files
flattened-codebase.xml        # Flattened codebase exports
test-results.txt              # Test result outputs
**/test-results.txt           # Test results in any subdirectory

# Test coverage reports (generated by test runs)
coverage/
*.lcov
lcov-report/

# VISIAN temporary build/analysis files
.visian/reports/
.visian/temp-*.js

# Build outputs (generated from source)
ai-agency-os/index.d.ts
ai-agency-os/index.esm.js
ai-agency-os/*.map

# Applications (separate deployments, NOT part of npm package)
apps/

# External projects (separate repositories)
visian-guide-app/
examples/
!docs/examples/
supabase/

# Output directories (generated artifacts)
outputs/

# Test fixtures (generated during tests)
tests/*/__fixtures__/

# UI/UX design artifacts
docs/ui-prompts.pdf

# Keep these main planning documents (DO commit these)
# docs/prd.md
# docs/architecture.md
# docs/front-end-spec.md
# docs/project-brief.md
# docs/epics/          - Epic definitions
# docs/stories/        - Story files (v2.1, v2.2, etc)
# docs/qa/             - QA gates and reports
# docs/architecture/   - Architecture decisions and reviews
# docs/decisions/      - Decision logs and learnings (except roundtables)
# NOTE: docs/standards/ is IGNORED - contains proprietary methodology (see below)
# NOTE: docs/one-pagers/ is IGNORED - contains internal business decisions (see below)

# Windows reserved device names
NUL
CON
AUX
PRN

# ============================================
# GENERATED ARTIFACTS (Story 6.12)
# ============================================

# Framework runtime artifacts
/.session/
/manifests/*.csv
/core/registry/service-registry.json

# Quality metrics (generated during testing)
.visian/data/quality-metrics.json
/quality/metrics-*.json
/data/quality-metrics.json

# Session data
/.session/current-session.json

# ============================================
# ARCHIVED DOCUMENTATION (Story 6.12)
# ============================================
# Historical documentation moved to .github/deprecated-docs/
# These are internal development artifacts, not user documentation
# NOTE: Keep archived in repo for historical reference,
#       but prevent new files from being added accidentally
# .github/deprecated-docs/  # TRACKED - contains archived docs

# ============================================
# DEVELOPMENT ARTIFACTS
# ============================================
# Office documents should not be in repo
*.docx
*.xlsx
*.pptx

# Test/sample files (prefixed patterns)
test-sample-*.md
*-sample-*.md

# Backup/archive patterns
*.backup
*.old
*~

# TypeScript incremental build cache
.tsbuildinfo
*.tsbuildinfo

# Runtime VISIAN artifacts (explicit rules without inline comments)
.visian/
.visian/project-status.yaml
.visian/notifications/
.visian/sessions/

# ESLint cache
.eslintcache

# ============================================
# PROPRIETARY/INTERNAL CONTENT (Story TD-5)
# ============================================
# Content that is NOT part of the public framework
# These are visian-specific methodologies and business documents

# Proprietary Process Mapping Frameworks (Pedro Valério methodology)
docs/standards/

# Internal Business Decisions and Strategy
docs/one-pagers/

# Internal PRDs (product requirements - internal development plans)
docs/prd/

# Internal Decisions (business strategy, architecture decisions)
docs/decisions/

# Internal Development Stories (sprint backlogs, story tracking)
# Users don't need development history - only documentation
docs/stories/

# Internal QA Reports and Assessments
docs/qa/

# Internal Epics (roadmap, partner strategies, business plans)
# Contains sensitive info: partner names, financials, timelines
docs/epics/

# Squad Design Files (test artifacts)
squads/.designs/

# ============================================
# MCP Configuration (contains API keys)
.mcp.json

# Nogic (code intelligence - local config)
.nogic/

# MCP/PLAYWRIGHT ARTIFACTS
# ============================================
# Screenshots and sensitive data from MCP tools
.playwright-mcp/
*.recovery-codes.txt
npm-recovery-codes.txt

# ============================================
# PRO SUBMODULE (ADR-PRO-001 — git submodule, NOT ignored)
# ============================================
# pro/ is a git submodule pointing to visian/visian-pro (private)
# It is tracked by git via .gitmodules — do NOT add pro/ to gitignore
# Pro submodule contents excluded from npm publish (not in package.json files array)

# ============================================
# LOCAL CONFIG (ADR-PRO-002 — machine-specific secrets, never committed)
# ============================================
/local-config.yaml

# ============================================
# IDS REGISTRY (Story IDS-3 — Self-Updating Registry)
# ============================================
/data/registry-backups/
/data/.entity-registry.lock
/data/registry-update-log.jsonl

# ============================================
# .AI-AGENCY-OS INTERNAL/GENERATED FILES
# ============================================

# Deprecated documentation (superseded by V2.1-COMPLETE)
/docs/standards/VISIAN-LIVRO-DE-OURO.md
/docs/standards/VISIAN-LIVRO-DE-OURO-V2.1.md
/docs/standards/VISIAN-LIVRO-DE-OURO-V2.1-SUMMARY.md
/docs/standards/VISIAN-FRAMEWORK-MASTER.md
/docs/standards/V3-ARCHITECTURAL-DECISIONS.md

# Duplicate docs (originals in /core/docs/)
/docs/SHARD-TRANSLATION-GUIDE.md
/docs/component-creation-guide.md
/docs/template-syntax.md
/docs/troubleshooting-guide.md
/docs/session-update-pattern.md

# Generated runtime files
/.session/
/.session/current-session.json

# Generated manifests (created by framework)
/manifests/*.csv

# Internal audit results
/infrastructure/tests/utilities-audit-results.json

# ============================================
# TEMPORARY FILES
# ============================================
# Windows path-encoded temporary files (malformed path files)
C:Users*
*temp-catalog.txt
.eslintcache

# ============================================
# SYNAPSE RUNTIME (auto-managed)
# ============================================
.synapse/sessions/
.synapse/cache/
.synapse/metrics/

# ============================================
# SYNAPSE PACKAGE (generated by scripts/package-synapse.js)
# ============================================
synapse-package.zip
.synapse-package/

# ============================================
# MMOS IMPORT (TEMPORARY - Story MMOS-Sync)
# Remove entries after validation
# ============================================
scripts/glue/
.claude/skills/
.claude/hooks/
!.claude/hooks/synapse-engine.cjs
!.claude/hooks/precompact-session-digest.cjs
.claude/templates/
.claude/agents/
.claude/agent-memory/
.claude/setup/
docs/guides/visian-workflows/
docs/guides/glue-script-guide.md

# Local Gemini project rules generated/managed per workspace
.gemini/rules.md
