#
# Files and directories excluded from the packaged, ready-to-download releases of this
# site template. The format of this file is documented at
# https://git-scm.com/docs/gitattributes.
#
# NOTE: `export-ignore` only affects the packaged tarball. Everything below stays fully
# available to anyone who clones the repository from git — which is deliberate, see
# README.md, "How Ágora is built".
#

# --- Starter kit defaults -------------------------------------------------------------
# A list of words that are legitimate, but not recognized by the spell checker used in CI.
/.cspell-project-words.txt export-ignore

# CI configuration and tests; useful for development, but irrelevant to end users.
/.github export-ignore
/.gitlab-ci.yml export-ignore
/tests export-ignore

# --- Development tooling --------------------------------------------------------------
# Linter configuration for this repository; not part of the delivered template.
/.eslintrc.json export-ignore

# --- Release noise (T-1916, 2026-09-21) ------------------------------------------------
# Two files that are git's and not the product's. Both were shipping to end users and to a
# marketplace reviewer, and neither does anything once the package is extracted into
# `recipes/agora_transparency/`:
#
#   .mailmap  canonicalises author names for `git shortlog`. There is no git history in a
#             tarball, so it is inert by construction.
#   .gitignore ignores /web/, /vendor/, /.ddev/ and friends RELATIVE TO ITS OWN DIRECTORY.
#             None of those paths exists inside an installed recipe, so the file is not
#             merely useless there - it is a set of rules about a layout the reader does
#             not have.
#
# Measured, not assumed - and each figure is written WITH THE COMMAND THAT PRINTS IT,
# because the pair below went stale by exactly one file and nothing could see it:
#
#   entries in the tarball
#     git archive --worktree-attributes HEAD | tar -t | wc -l
#     -> 377 with these two lines, 379 without
#
#   files at the packaged root
#     git archive --worktree-attributes HEAD | tar -t | grep -cvE '/'
#     -> 12 with these two lines, 14 without
#
# Both sides were measured on 2026-09-25 by commenting the two lines out, re-running
# each command, and putting them back - not by adding 2 to the number already here.
# Run them; do not carry these figures. They read `374` and `nine` from 2026-09-21
# until `LICENCE-MANIFEST.md` landed at the packaged root, and G8 stayed GREEN across
# that drift, correctly: G8 DERIVES its count from the tarball and asserts `> 0`, and
# holds `.gitignore` and `.mailmap` by NAME on its "must NOT travel" list. It never
# reads these two numbers, so the effect of these lines is guarded and only the prose
# above them can rot. Removing a line here still turns the gate red rather than
# quietly restoring the noise. They read `375` and `10` from 2026-09-23 until
# `SECURITY.md` joined the packaged root on 2026-09-25, in the commit that moved them.
# They read `376` and `11` from then until `ACCESSIBILITY.md` joined it later the
# same day, again in the commit that moved them.
#
# ⚠️ This does NOT reach the `Drupal CMS` CI job, and that is a property worth knowing
# rather than a gap: that job installs this package through a Composer PATH REPOSITORY,
# which mirrors the working tree and to which `export-ignore` does not apply at all.
/.gitignore export-ignore
/.mailmap export-ignore

# --- Process layer (D-015.2) ----------------------------------------------------------
# How this template is built: the project's working rules and its signed decision record.
# Public in the repository, but not part of a release the end user installs.
/CLAUDE.md export-ignore
/.claude export-ignore
/specs export-ignore

# --- The live demo's deployment package (T-0740) ---------------------------------------
# Host operations for the demo at agora-demo.andresmoreno.dev: Docker Compose files, shell
# scripts and a plan. Versioned so the demo can be rebuilt and audited, never part of the
# template a site installs. Proved by: git archive HEAD | tar -t | grep -c '^demo/'  -> 0
/demo export-ignore

# --- Deliberately NOT export-ignored (D-015.1) ----------------------------------------
# AGENTS.md is product, not process: it ships with the template and guides AI assistants
# working on a site built WITH Ágora. Do not add it to this file.

# --- Line endings (checkout attribute, not export-ignore) ------------------------------
# `core.autocrlf=true` is set at system scope by the Git for Windows installer, so a
# fresh clone checks these shell scripts out as CRLF on any default Windows machine,
# breaking their shebang. `eol` governs checkout in every clone, unlike `export-ignore`
# above, which only shapes the packaged tarball. Scoped to shell scripts, never a
# blanket `* text=auto`.
# ONE LINE ENDING EVERYWHERE, ADDED 2026-08-25, AND IT IS A DEFECT FIX RATHER THAN A
# PREFERENCE. The line below used to be scoped to tests/bin and *.sh only, on the
# reasoning that a CRLF shebang does not execute. That was right and insufficient.
#
# What T-802's container measured: git's BLOBS are LF (1 genuine CRLF blob out of 179),
# but with core.autocrlf=true a Windows checkout materialises 50 of them as CRLF - and
# MSYS grep CANNOT SEE those carriage returns. a grep for a carriage return in `recipe.yml` returns 0 while
# `od -c` shows the carriage return. So end-anchored checks PASS ON THIS HOST BY ACCIDENT:
# run the same
# runners in a Linux container against the same working tree and two of them fail, because
# GNU grep 3.11 sees what MSYS grep hides.
#
# CI and end users were never affected - they read the LF blobs. The host was the liar,
# and it was lying in the direction that says everything is fine.
#
# `text=auto eol=lf` makes every working tree LF, on Windows and macOS alike, so the host,
# the container, CI and the packaged tarball all read the same bytes. [andres] confirmed
# on 2026-08-25 that he will work from macOS too, which turns this from tidiness into a
# requirement: a project whose checks depend on the shell cannot afford three dialects of
# the same file.
* text=auto eol=lf

# Kept explicit even though the line above now covers them: a CRLF shebang does not
# execute, and that failure is silent on the runner and invisible here.
tests/bin/** text eol=lf
*.sh text eol=lf
