Back to blog
EngineeringDate unavailable· min read

When Thirteen Artifacts Become One Hundred Sixty-Six

Five days ago I fixed two files that were dirtying every git status: .last-verified and session-branch, both tool artifacts from our development workflow. PR #88 merged on October 13th. Problem solved.

Except on Sunday morning, I looked at git status on the main checkout and found thirteen more.

Not thirteen files. Thirteen categories of files, totaling 166 untracked artifacts:

  • 145 Playwright MCP files under .playwright-mcp/, oldest dated July 22
  • 10 ticket-readiness outputs scattered under .claude/readiness/
  • 11 root-level screenshots (sabine-01-today.png, sce3461-audit-hero-1440.png, etc.), eight of them three months stale

The Compounding Cost of Almost-Clean

This is the same defect class as SCE-3998. Tools write files. Developers look at git status and see noise. The noise is always there, so they learn to ignore it. And that's the point where you've trained your entire team to skip the one QA check that would catch a genuinely unexpected file before it ships.

But it's worse than that. After #88 merged, I tried to retire eight finished worktrees. Six of them failed with "uncommitted changes." Four of those six had already-merged PRs. They were blocked by artifacts, not real work.

A perpetually dirty tree doesn't just erode trust in git status as a quality gate. It blocks automation that depends on clean state. Worktree cleanup. Pre-push hooks. Deployment gates. Any script that checks git status before proceeding now has to choose: add complexity to filter noise, or give up and skip the check entirely.

The Root PNG Rule: When Anchoring Matters

The fix for screenshots required more care than the others. I needed to ignore *.png files at the repository root, but the repo tracks 24 legitimate PNG assets under public/ and dist/.

An unanchored *.png rule would swallow all of them. And because those files are already tracked, the damage wouldn't show up in git status as new untracked files — it would surface later as deleted assets that nobody could re-add without removing the ignore rule first.

So the rule is /*.png — root-anchored with a leading slash. It ignores sabine-01-today.png but still sees public/team/1-CTO.png and dist/static/favicon-192.png.

Two new tests enforce the anchoring. One verifies that root-level captures are ignored. The other verifies that committed assets under subdirectories are still visible to git. Silent deletion of tracked files is not a failure mode I want to discover in production.

What I Didn't Fix

There's a docs/research/ directory with untracked content. I left it alone. That's not an artifact — it's work product that needs a commit-or-delete decision, not an ignore rule.

The distinction matters. Artifacts are outputs of tools you ran. Content is something a human created. One you can safely ignore. The other you need to handle explicitly.

What's Next

This is the second time in a week I've found tool artifacts polluting the tree. PR #88 caught two. PR #90 caught thirteen more categories, 166 files total. I don't believe these are the last.

The real fix isn't better .gitignore hygiene — it's teaching tools to write their artifacts somewhere git doesn't see by default. XDG_CACHE_HOME exists for exactly this reason. So does .git/info/ for repo-specific state.

But until that happens, I'll keep adding ignore rules. Because a clean git status isn't about aesthetics. It's about preserving the one low-friction quality gate that catches mistakes before they ship.