# Dependencies
node_modules/

# RFC-0042 Phase 1 — reviewer subagent transcripts
# Per RFC-0042 OQ-1: local-disk default, 90-day retention. Transcripts may
# contain PR diff content; the Merkle leaf index (.ai-sdlc/transcript-leaves.jsonl)
# is the durable committed artifact, not the raw transcripts.
.ai-sdlc/transcripts/

# Build output
dist/
*.tsbuildinfo
.next/

# AISDLC-75: the ai-sdlc-plugin MCP server is loaded by the plugin manifest at
# `mcp-server/dist/bin.js`. Marketplace clones do NOT run `pnpm install`, so
# this bundled artifact MUST ship in the source tree. The bundle is produced
# by `pnpm --filter @ai-sdlc/plugin-mcp-server build` (esbuild --packages=bundle)
# and gated by `scripts/verify-bundle.mjs` in CI.
!ai-sdlc-plugin/mcp-server/dist/
ai-sdlc-plugin/mcp-server/dist/*
!ai-sdlc-plugin/mcp-server/dist/bin.js

# Coverage
coverage/
.nyc_output/

# Environment
.env
.env.*
!.env.example

# IDE
.idea/
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Logs
*.log
npm-debug.log*
pnpm-debug.log*

# AI-SDLC runtime artifacts
.ai-sdlc/audit.jsonl
.ai-sdlc/state.db
.ai-sdlc/state.db-shm
.ai-sdlc/state.db-wal
.ai-sdlc/state/
.ai-sdlc/sweep-landed-cache.json
.ai-sdlc/memory/
# AISDLC-320: RFC-0024 Refit Phase 1 — draft captures are operator-local (OQ-1).
# Explicit submit (`cli-capture submit`) promotes to team-shared backlog/captures/.
.ai-sdlc/captures-drafts/
# AISDLC-133: per-task reviewer verdict files written by /ai-sdlc execute
# Step 10 and consumed by `.husky/pre-push` (scripts/check-attestation-sign.sh)
# to auto-sign the DSSE attestation. Ephemeral, per-worktree — never
# committed; the signed envelope at .ai-sdlc/attestations/<sha>.dsse.json is
# the durable artifact.
.ai-sdlc/verdicts/
# AISDLC-725: per-task local review-round state (reviewed commit, findings); never committed.
.ai-sdlc/review-state/
# AISDLC-462: per-task session files for execute-parallel coordination.
# Runtime-only, per-machine — never committed. Gitkeep preserves the
# sessions/ directory structure so the wrapper can write files immediately.
# AISDLC-383.1 / RFC-0042 Phase 1: full conversation transcripts captured by
# reviewer subagents. Gitignored per RFC-0042 §Design Layer 1 — operator
# retains locally for 90 days by default (OQ-1). Remote storage opt-in via
# `.ai-sdlc/config.yaml transcript_storage_url` (OQ-5).
# See docs/operations/transcript-management.md for retention + GC runbook.
.ai-sdlc/transcripts/
# AISDLC-568: SubagentStart hook markers used for verdictClass detection
# (independent vs. self-authored transcript leaves). Ephemeral, per-machine,
# consumed (deleted) by `cli-attestation emit-leaf` on a match — never
# committed. See pipeline-cli/src/attestation/verdict-class.ts.
.ai-sdlc/subagent-sessions/
# AISDLC-155: per-worktree active-task sentinel (AISDLC-81). The sentinel
# lives INSIDE each worktree at `<worktree>/.active-task` and is read by the
# PreToolUse hook to resolve which task's `permittedExternalPaths` apply for
# cross-repo writes. Ephemeral, per-worktree — never committed. Was tracked
# by accident in earlier commits and kept causing merge conflicts on every
# rebase as parallel worktrees each tried to write their own task ID.
.active-task
.enterprise.yaml

# AISDLC-559: parent-repo lock file for the worktree-aware backlog task ID
# allocator (`next_task_id` MCP tool + `task_create`'s cross-source collision
# check). Lives under the PARENT repo's `.ai-sdlc/locks/` — never inside a
# worktree — so every sibling worktree racing for the same ID sees it. This
# is the one sanctioned exception to "the parent working tree is read-only";
# it is ephemeral (created + removed within a single tool call) and must
# never be committed.
.ai-sdlc/locks/

# AISDLC-122: pipeline-cli writes the DoR calibration log to
# `artifacts/_dor/calibration.jsonl` by default. The log captures issue
# titles + body previews + LLM-derived `finding` / `clarificationQuestion`
# strings that may quote pasted secrets. Combined with the dogfood
# pipeline's `git add -A` practice (per `feedback_stash_completely_before_pipelines.md`),
# an unscrubbed paste of an API key in an issue body could be committed
# to git history through this log. Three layers of defense:
#   1. Ignore the directory entirely (this rule).
#   2. Lower BODY_INLINE_LIMIT in pipeline-cli/src/dor/calibration-log.ts
#      (80 chars), so most bodies become a SHA reference.
#   3. Regex redaction in pipeline-cli/src/dor/secret-redact.ts.
artifacts/

# Package manager
.pnpm-store/

# Python
__pycache__/
*.py[cod]
*.egg-info/
*.egg
*.whl
.venv/
.mypy_cache/
.pytest_cache/
.ruff_cache/
build/
*.pyz
orchestrator/.gitignore
.worktrees/

# AISDLC-681: pre-push coverage gate lock (machine-local runtime state in the main checkout)
.ai-sdlc/runtime/

# AISDLC-811: machine-local runtime state in the parent checkout. Ignored so Step 0.5
# (non-backlog untracked files) never refuses a fresh execute over the live dispatch
# board or harness-side config. Nothing under .ai-sdlc/dispatch is tracked.
# NOT .ai-sdlc/reviews/: those ledgers are committed; doctor --fix deletes untracked copies.
.ai-sdlc/dispatch/
.agents/
.codex/
# Codex-side copy of CLAUDE.md; no reader in ai-sdlc-plugin/agents or orchestrator (AISDLC-811)
AGENTS.md

# AISDLC-773 / RFC-0053: protected-scope knowledge (client and data-room material)
# never enters the repository or a PR body.
.ai-sdlc/knowledge-protected/

# AISDLC-877: cached PR list for cli-kpi
.ai-sdlc/kpi/

# AISDLC-1024: pinned pipeline-cli scratch worktrees (hotfix lane)
.ai-sdlc/pipeline-builds/

# AISDLC-869: Claude Code memory dream output (.claude/memory.dream-<ts>.*) is machine-local;
# untracked, it made Step 0.5 abort every execute on a non-backlog untracked file.
.claude/memory.dream-*

# AISDLC-581: session-start registry-version TTL cache
ai-sdlc-plugin/.stale-runtime-cache.json

# AISDLC-775 / RFC-0053: derived retrieval index and per-session load ledgers
.ai-sdlc/context-index.db
.ai-sdlc/context-index.db-wal
.ai-sdlc/context-index.db-shm
.ai-sdlc/context/sessions/

# AISDLC-1111: sha of the last workspace build in this worktree
.ai-sdlc/.last-build-sha

# SessionEnd hook (.claude/hooks/archive-transcript.sh) copies Claude Code session
# transcripts here. Plaintext, may hold secrets: machine-local, never committed.
.claude/transcripts/

# DEC-0370: agent memory notes are private; untracked and ignored (daily backup: cli-hierarchy up).
# Reverses the tracking half of AISDLC-1136.
.claude/memory/
# AISDLC-1136: per-machine Claude Code settings
.claude/settings.local.json
# AISDLC-1136: project MCP config points at per-machine sibling checkouts; copy .mcp.json.example
.mcp.json

# AISDLC-778 / RFC-0053: evaluator-only quarantine (mined and synthetic questions)
.ai-sdlc/context/eval-quarantine/

# AISDLC-1166: machine-local usage ledgers written by the pipeline must not block Step 0.5
.ai-sdlc/usage/
