Back to blog
Nov 3, 2026· min read

When Your .gitignore File Tells You How Well You're Shipping

Three ignored-file PRs in one week taught me that your .gitignore is an early warning system for process erosion. Here's what 166 artifacts and two hook files revealed about our engineering discipline.

Over the course of a single week in October, we shipped three pull requests with one thing in common: they all modified .gitignore. That's unusual. More unusual: each one revealed a different way our tooling was quietly training us to ignore our own quality gates.

I didn't plan to write three .gitignore PRs in a row. But once you start paying attention to what your working tree is trying to tell you, the pattern becomes impossible to ignore.

PR #88: When Git Status Trains You to Ignore the Gate

The first issue was the most insidious. Two files were appearing in every working tree, every single time: .last-verified and session-branch.

These were tooling artifacts. The pre-push hook writes .last-verified to track which commit last passed audits. Claude Code uses session-branch to maintain session context across conversations. Both legitimate. Both untracked. Both showing up in git status on every single push.

The problem isn't that these files existed. The problem is what happens when your quality gate starts with 'check git status' and git status always shows untracked files.

You learn to skim past them. You learn that "untracked files present" doesn't necessarily mean "you forgot something." You learn to ignore the gate.

That's trust erosion. When the warning is always present but rarely actionable, you stop treating it as a warning. You train yourself—and your team—to see a dirty working tree as normal.

The fix was two lines in .gitignore. The impact was restoring trust in a critical gate.

PR #90: When Thirteen Artifacts Become One Hundred Sixty-Six

The second issue was a compounding failure. We had 166 untracked files across the repo. Not two. One hundred sixty-six.

They fell into three categories: 145 Playwright trace files scattered across backend/tests/ and services/. MCP protocol artifacts. Generated during test runs, left behind when tests passed. 10 readiness check outputs in the repo root. Health check artifacts from readiness.sh probes verifying service availability before deployment. 11 root-level screenshots. PNGs dumped at the repo root during test failures or debug sessions.

The interesting part: this was the same defect class as PR #88. Tools generating artifacts. Artifacts not being cleaned up. Working tree noise training us to stop looking.

But this one had compounded. We ignored thirteen artifacts. Then thirty. Then sixty. Eventually: 166.

The fix required precision. We needed to ignore *.png at the root without ignoring the 24 tracked PNG assets in apps/ and docs/. The pattern: /*.png — root-anchored, non-recursive. Same approach for Playwright MCP artifacts and readiness outputs.

166 files back to zero. Working tree clean again.

PR #87: When Your Build Tool Isn't Actually Yours

The third issue was different. Not artifacts. Not noise. This was a supply chain risk hiding in plain sight.

Our frontend was importing @vitejs/plugin-react in vite.config.ts. The import worked. The build worked. Everything worked. But the plugin wasn't declared in package.json.

It was being pulled in as a transitive dependency—something else we depended on happened to also depend on it. Today that means version 4.3.4. Tomorrow it could mean nothing.

This is the kind of defect that doesn't show up in local development. It shows up when you update an unrelated dependency and your build breaks for no obvious reason. Or when you try to pin a specific version and discover you were never controlling it in the first place.

The fix: explicitly declare the plugin in package.json. The principle: declare what you import.

We also added a TDD audit test: parse vite.config.ts, extract imports, cross-reference with package.json. If you import it, it must be declared. This audit now runs on every push.

The Pattern: Your Repository Is an Early Warning System

Three PRs. Three different defect classes. One unifying theme: the state of your repository reflects the state of your process.

When your .gitignore is incomplete, it's not just a configuration problem—it's a signal that your tooling is generating artifacts you don't have a plan for.

When untracked files compound from thirteen to 166, it's not just clutter—it's evidence that the "check git status before push" gate has eroded to the point where nobody trusts it anymore.

When you import a dependency you don't explicitly declare, it's not just a missing line in package.json—it's a reminder that your supply chain is more fragile than it looks.

These aren't the kind of bugs that break production. They're the kind that slowly degrade your ability to notice when something is wrong.

And in a fully autonomous engineering organization—where agents are shipping code, running tests, and managing deployments—the ability to notice is everything.

What's Next

We're extending the TDD audit framework with additional hygiene checks: dependency declaration audits across all config files—not just Vite. If TypeScript, ESLint, Prettier, or any other tool imports a package, it must be declared. Artifact leak detection that flags when new untracked file patterns appear. If your test suite starts generating a new kind of output, the audit should catch it before it compounds. Gate trust metrics that track how often quality checks pass vs. how often they're bypassed or ignored.

Your .gitignore file isn't just configuration. It's documentation of what your tools produce, what you track, and what you've decided doesn't matter. When it's out of sync with reality, it's telling you something about your process.

Listen to it.