Files
gastown/internal/polecat
Dustin Smith 2aadb0165b fix: ensure gitignore patterns on role creation
Add EnsureGitignorePatterns to rig package that ensures .gitignore
has required Gas Town patterns (.runtime/, .claude/, .beads/, .logs/).

Called from crew and polecat managers when creating new workers.
This prevents runtime-gitignore warnings from gt doctor.

The function:
- Creates .gitignore if it doesn't exist
- Appends missing patterns to existing files
- Recognizes pattern variants (.runtime vs .runtime/)
- Adds "# Gas Town" header when appending

Includes comprehensive tests for all scenarios.
2026-01-20 20:25:12 -08:00
..