# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
# CLI reference is generated fresh at build time from the live command tree
# (docs/conf.py builder-inited); never committed, so it cannot drift.
docs/cli/
# Glossary is generated fresh at build time from the approved Terminology
# Handbook concepts (docs/conf.py builder-inited); never committed.
docs/_generated/
# cli-tree.json help projection is generated fresh at build time from the live
# command tree (docs/conf.py builder-inited); the widget fetches it same-origin
# from _static. Never committed, so it cannot drift.
docs/_static/cli-tree.json
# download-latest.json is pulled from the latest GitHub release into _static by
# the docs deploy (dev/deploy/docs_static_site.py) right before the site build;
# it is a per-release runtime payload, never committed, so it cannot drift.
docs/_static/download-latest.json
# The compiled Pagefind search index is uncommitted and regenerated with the
# documentation site under docs/_build/, which is ignored above.
# Gettext POT message templates for docs localization (`just docs-gettext`),
# extracted fresh from the user-scope pages on every run. The per-language .po
# catalogues under docs/locales/<lang>/ ARE committed; only these templates are
# a regenerated build product.
docs/locales/pot/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
#   For a library or package, you might want to ignore these files since the code is
#   intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# UV
#   Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
#   This is especially recommended for binary packages to ensure reproducibility, and is more
#   commonly ignored for libraries.
#uv.lock

# poetry
#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
#   This is especially recommended for binary packages to ensure reproducibility, and is more
#   commonly ignored for libraries.
#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
#poetry.toml

# pdm
#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#   pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
#   https://pdm-project.org/en/latest/usage/project/#working-with-version-control
#pdm.lock
#pdm.toml
.pdm-python
.pdm-build/

# pixi
#   Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
#pixi.lock
#   Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
#   in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
# env/ is the canonical container for .env files; ignore everything
# inside it except the tracked example template.
env/*
!env/.env.example
venv/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can
#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
#  and can be added to the global gitignore or merged into this file.  For a more nuclear
#  option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
#  Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
#  that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
#  and can be added to the global gitignore or merged into this file. However, if you prefer,
#  you could uncomment the following to ignore the entire vscode folder
# .vscode/

# Ruff stuff:
.ruff_cache/

# Complexity / type-checker caches used by the audit pipeline
.complexipy_cache/
.ty_cache/
.pyrefly_cache/

# `just audit-all` (dev.audit.advisory) persisted run output: the full,
# uncapped dashboard result (summary.json, summary.md) plus the raw semgrep
# JSON payload. Regenerated every run; never committed.
dev/audit/.runs/

# PyPI configuration file
.pypirc

# Cursor
#  Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
#  exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
#  refer to https://docs.cursor.com/context/ignore-files
.cursorignore
.cursorindexingignore

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/

# Playwright
playwright-report/
test-results/

# AEAT Manual practico raw PDFs (#25): binaries are materialised by
# `aeat manual fetch` and verified against the committed manifest.json.
# Keep raw PDFs ignored unless a registry source catalogue or committed
# manual-corpus guard explicitly enrolls the official payload as evidence.
src/cadrumo/_data/corpus/manuals/**/source.pdf
!src/cadrumo/_data/corpus/manuals/iva/2020/source.pdf
!src/cadrumo/_data/corpus/manuals/iva/2021/source.pdf
!src/cadrumo/_data/corpus/manuals/iva/2022/source.pdf
!src/cadrumo/_data/corpus/manuals/iva/2023/source.pdf
!src/cadrumo/_data/corpus/manuals/iva/2024/source.pdf
!src/cadrumo/_data/corpus/manuals/iva/2025/source.pdf
!src/cadrumo/_data/corpus/manuals/renta/2020/part1/source.pdf
!src/cadrumo/_data/corpus/manuals/renta/2021/part1/source.pdf
!src/cadrumo/_data/corpus/manuals/renta/2022/part1/source.pdf
!src/cadrumo/_data/corpus/manuals/renta/2023/part1/source.pdf
!src/cadrumo/_data/corpus/manuals/renta/2024/part1/source.pdf
!src/cadrumo/_data/corpus/manuals/renta/2024/part2-deducciones-autonomicas/source.pdf
!src/cadrumo/_data/corpus/manuals/renta/2025/part1/source.pdf
!src/cadrumo/_data/corpus/manuals/renta/2025/part2-deducciones-autonomicas/source.pdf
src/cadrumo/_data/corpus/manuals/**/source.html/

# IDE
.idea/
.vscode/

# Note: `.vaultspec/rules/rules/aeat-project-mandates.md` is the project's
# custom mandate rule; it is force-added to git (`git add -f`) despite the
# vaultspec-managed ignore above, so every workstation + agent reads the
# same mandates after running `uv run vaultspec-core install`.

# vaultspec-core writes 0-byte `.lock` sentinels next to every file it
# manages (.gitignore.lock, .mcp.json.lock, .pre-commit-config.yaml.lock,
# .vaultspec/providers{.json,}.lock). It also regenerates
# .pre-commit-config.yaml on every install even though the project uses
# prek (which reads prek.toml exclusively). Upstream install forgets to
# gitignore all of these. Ignore here until fixed upstream. uv.lock is
# unaffected — no leading dot.
/.*.lock
/.vaultspec/*.lock
/.codex/*.lock
/.agents/*.lock
/.pre-commit-config.yaml
# Ad-hoc persona testimonial runs. Scratch findings from one-off CLI
# exercises; durable outcomes belong in the vaultspec pipeline (research,
# adr, plan, exec, audit), never here.
/.agents/testimonials/
# Terminology measurement OUTPUT. Regenerated by a coverage / rung-2 run and
# read by no runtime consumer, so it is a temp artefact of the harness that
# produced it. The committed measurement INPUTS beside it (held-out-queries,
# the precompiled matrix) are tracked; these reports are not.
/dev/docs/terminology/evaluation/coverage-report.json
/dev/docs/terminology/evaluation/rung2-report.json

# Scratch / ad-hoc workspace / temp
scratch/*
.scratch-*/
.campaign-runs/
.vault-scratch/
.dedup-scan/
# Temporary files and directories at any depth.  Keep this deliberately
# name-based rather than using *temp*, which would also hide durable sources
# such as template files.
**/[Tt][Mm][Pp]/
**/[Tt][Ee][Mm][Pp]/
**/.[Tt][Mm][Pp]/
**/[Tt][Mm][Pp][-_]*/
**/[Tt][Ee][Mm][Pp][-_]*/
**/.[Tt][Mm][Pp][-_]*/
**/.[Tt][Mm][Pp][-_]*
**/*.[Tt][Mm][Pp]
**/*.[Tt][Ee][Mm][Pp]
cache/

# Root-level ad-hoc agent run directories (the retired .runtime-sNN-*
# convention; ruling R5 mandates scratch/ as the sole scratch location).
# Ignored so a future one-off cannot land tracked; existing dirs are
# cleaned up under S22.
.runtime-*/


# Root-level safety net for common ad-hoc output patterns that tend to
# appear when agents shortcut past the scratch/ convention. Narrow,
# leading-slash patterns so nothing nested gets hidden.
/out.*
/*_issues.json
/*_issues.txt
/issues_*.json
/issues_*.txt
/open_issues.json
/parsed_issues.txt

# Playwright MCP session capture output
.playwright-mcp/

# One-off session prompts and trademark-search screenshots are local research
# captures, not repository sources.
/ORIGINAL_REQUEST.md
/euipo-*.png
/oepm-*.png

# Scratch / research artefacts under .tmp/ (xlsx downloads, raw JSON,
# agent workspaces). Same role as scratch/ — ephemeral, never in git.
/.tmp/
/.tmp_*/
/.tmp-*/

# Debug evidence captures from failing gates and packaging runs. These hold
# raw tool output, so they routinely carry operator home paths and host names
# (the privacy gate's untracked scan catches them there). The repository is
# public: an accidental `git add -A` would publish that, and after the commit
# removal is a history rewrite rather than an edit. Ephemeral, never in git.
/dbg/

# Top-level scratch outputs (one-shot agent runs, encoded blobs,
# tmp text dumps, accidental absolute-path filenames). Never durable.
/tmp_*.txt
/*.b64
/write_*.py
/C\:*
/*_keys.txt
/translate_*.py
/scratch_*.py
# Agent scratch the patterns above missed: commit-message temps, capture
# dumps, trace/check helpers, ad-hoc runners, underscore-prefixed temp files,
# and generated-doc backups. Root-level only; never durable.
/*.tmp
/.msg
/_*.py
/_*.ps1
/_*.txt
/trace_*.py
/check_*.py
/check_*.ps1
/test_fix.py
/run_test.sh
/run_tests.sh
/dom_*.txt
/fails.txt
/apex.txt
/campaign_run.txt
/api.bak/
# Root-level git-diff/patch dumps from an ad-hoc revert/apply-cached run
# (e.g. revert.patch). Never a durable repo artifact.
/*.patch
# One-off root-level "add_*" fixer scripts (e.g. add_frontmatter.py),
# symmetrical with the existing write_*.py / translate_*.py / scratch_*.py
# one-shot-script patterns above.
/add_*.py
# Root-level scratch text dumps that don't fit the tmp_*.txt shape above
# (e.g. scratch_pathspec.txt from a staged-pathspec probe).
/scratch_*.txt
# Root-level scratch markdown drafts staged for a vault document
# (e.g. scratch_adr_body.md fed to `vault edit --body-file`). The vault
# document is the durable artefact; the draft is not.
/scratch_*.md
# Root-level captured command/gate output dumps (e.g. test_docs_output.txt
# from an ad-hoc docs-gate run). Never a durable repo artifact.
/*_output.txt
# Any other loose root-level .txt drop (sl.txt, ret.txt, and whatever the next
# agent names its scratch listing). The repo root carries no durable .txt, so
# ad-hoc names do not each need their own rule. Already-tracked files are
# unaffected by this.
/*.txt
# Root-level Playwright/browser accessibility-tree snapshot dumps
# (e.g. rail-snap.md). Never a durable repo artifact.
/*-snap.md
# Root-level screenshot dumps from a docs or CSS review (casilla-dark.png and
# friends). Durable docs images live under docs/_static/; a loose one at the
# root is the review artefact, not the asset.
/*.png
# Locale merge workspace: <lang>.mine.yml / <lang>.head.yml / <lang>.patch
# staged while reconciling a catalogue conflict. The catalogues under
# src/cadrumo/locales/ are the durable artefact; these are the scratch copies
# the merge was worked out in.
/locale_patch_scratch/
# Underscore-prefixed one-shot agent run workspaces (persona reruns, m303/m390
# capture dirs) — carry secrets/*.key/*.kdf/*.db; ephemeral, never in git.
/_scratch*/
# The same hazard at the REPO ROOT, where a local run materialises the real
# thing: secrets/ holds the master key, its KDF parameters and lock, and
# cadrumo-storage/ holds the encrypted buckets with their per-bucket DEKs.
# This is live key material and taxpayer financial data. The _scratch*/ rule
# above covered only the sandbox copies; these paths had no rule at all.
/secrets/
/cadrumo-storage/
# Absolute-path filenames whose colon was UTF-8-encoded past the /C\:* pattern
# (accidental Windows temp path captured as a repo-root filename).
/C*AppData*
/*scratchpadvault_check*

# >>> vaultspec-managed (do not edit this block) >>>
.vault/.obsidian/
.vault/.trash/
.vault/data/
.vault/logs/
.vaultspec/*.lock
.vaultspec/_snapshots/
.vaultspec/mcp-ownership.json
.vaultspec/providers.json
/.agents/mcp_config.json.lock
/.codex/config.toml.lock
/.gitignore.lock
/.mcp.json.lock
# <<< vaultspec-managed <<<

# Claude Code machine-local (not team-shared)
.claude/settings.local.json
.claude/scheduled_tasks.lock

# Runtime markers & nested provider locks (machine-local, never team-shared)
.qdrant-initialized
.agents/mcp_config.json.lock

/.playwright-cli/

# Operator-run probe and continuation scratch. These are working artefacts, not
# source: three were committed by bulk sweeps and shipped ~780 KB in every clone.
/aeat-bp-continue*.json
/m100xsd_probe_out.xml
/*_probe_out.xml

# Transient lockfile serialising `python -m dev.locales` catalogue writers. It
# lives beside the catalogues because that is what the writers contend over,
# and is reclaimed on the next attempt if its holder died.
/src/cadrumo/locales/.catalogue-write.lock

# Transient mutexes and journals written beside the AEAT registry sources while
# a rebind or publication transaction runs. They record in-flight state, never
# work, and are reclaimed on the next attempt if their holder died.
/src/cadrumo/_data/registry/aeat/.*.lock
/src/cadrumo/_data/registry/aeat/.*.lock.lock

# Rendered generator scratch output never enters the tree.
dev/registry/scratch*/

# Generated export publication transactions: locks, journals, rollback
# siblings. Never tracked -- they are live-process state, not content.
**/.generated-export-transaction-*
**/.generated-export-backup-*

# TUI visual inventory review artefacts (`python -m dev.tui render`): PNG/SVG
# renders of every TUI surface, written per run for human visual review.
# Regenerated on demand and never durable. Matched by the /.tmp-*/ rule above
# as well; named explicitly so a reader greps the directory and finds why.
/.tmp-tui-visual-inventory/
