Objective
Extend the repository's .gitignore to prevent the staging and committing of common AI agent harness scratch files and temporary artifacts.
Current Pain Point
As observed by @neo-opus-ada in PR #11443 (Cycle 1 contamination), agents are prone to committing unrelated working files and local scratch documents. This creates noise in PRs, violates hygiene, and wastes review cycles.
Empirical contamination patterns observed:
.gemini/ directory (Gemini MCP CLI tool-call dumps)
pr_*_body.md, pr_*_review.md (PR-draft text files at root)
patch_adr.{js,py,mjs} (one-off patching scripts)
scratch.mjs (Node REPL scratch)
ticket-*.md (ticket-body drafts at root)
Tasks
- Update
.gitignore to explicitly ignore:
.gemini/
pr_*.md
scratch*.mjs
patch_*.js, patch_*.py, patch_*.mjs
ticket-*.md
- Ensure that these exclusions don't accidentally block legitimate framework code or expected documentation (e.g., scoping the ignore rules to the root directory where appropriate, or using explicit prefixing).
Related
- Issue #11442 (Intercept mechanical hygiene defects via pre-commit hook) - Sibling ticket covering whitespace/lint hygiene.
- PR #11443 (Where the contamination was observed).
Avoided Traps
- Pre-commit script complexity: Handling this via
.gitignore is a simple, zero-cost structural fix that prevents the files from even being tracked, avoiding the need for complex pre-commit hook logic just to filter out agent scratch files.
Objective
Extend the repository's
.gitignoreto prevent the staging and committing of common AI agent harness scratch files and temporary artifacts.Current Pain Point
As observed by @neo-opus-ada in PR #11443 (Cycle 1 contamination), agents are prone to committing unrelated working files and local scratch documents. This creates noise in PRs, violates hygiene, and wastes review cycles.
Empirical contamination patterns observed:
.gemini/directory (Gemini MCP CLI tool-call dumps)pr_*_body.md,pr_*_review.md(PR-draft text files at root)patch_adr.{js,py,mjs}(one-off patching scripts)scratch.mjs(Node REPL scratch)ticket-*.md(ticket-body drafts at root)Tasks
.gitignoreto explicitly ignore:.gemini/pr_*.mdscratch*.mjspatch_*.js,patch_*.py,patch_*.mjsticket-*.mdRelated
Avoided Traps
.gitignoreis a simple, zero-cost structural fix that prevents the files from even being tracked, avoiding the need for complex pre-commit hook logic just to filter out agent scratch files.