Audience: AI agents operating on this repository.
Authoritative reference:TEMPLATE_STANDARDS.md
Template factory — no build, lint, test, or package manager. Every template is a standalone .gitignore file.
| Framework | Modular | |
|---|---|---|
| Start | frameworks/<name>.gitignore |
languages/<name>.gitignore |
| Security | Built-in (first section) | Must add common/security.gitignore |
| Extras | IDEs, OS only | common/*, tools/*, ides/*, os/* |
- Framework + Language = NEVER — frameworks already contain language patterns.
- Language without Security = NEVER — add
common/security.gitignore. - Combine with
sort -u= ALWAYS —cat a b c | sort -u > .gitignore.
Language? → languages/<name>.gitignore (no security section)
Framework? → frameworks/<name>.gitignore (security section FIRST)
Tool/CI? → tools/<name>.gitignore
IDE? → ides/<name>.gitignore
OS? → os/<name>.gitignore
Platform? → platforms/<name>.gitignore
Naming, section ordering, header/metadata format → TEMPLATE_STANDARDS.md.
Section ordering gotcha: some existing templates (e.g. languages/rust.gitignore) have non-standard sections — new templates must follow the canonical order.
- Pick core — Framework OR language, never both.
- Add security —
common/security.gitignorefor language templates. - Layer extras — Tools, IDEs, OS as needed.
- Deduplicate — pipe through
sort -u. - Validate —
git status --ignoredin a test repo.
# Dedup check (must produce no output)
sort template.gitignore | uniq -d
# Smoke test (adapt touch files to template patterns)
mkdir /tmp/gitignore-test && cd /tmp/gitignore-test && git init
cp /path/to/template.gitignore .gitignore
touch .env .env.local credentials.json secret.key
git status --ignored # All four should appear under "Ignored files"Full procedure → TEMPLATE_STANDARDS.md §Quality Gates.
git ls-files <path> # Already tracked? Ignores don't apply.
git check-ignore -v <path> # Which rule ignores this file?
git rm --cached <path> # Untrack so ignore takes effect.