Skip to content

fix: eliminate PR contamination from broad git staging (#777)#783

Merged
tamirdresher merged 1 commit intodevfrom
squad/777-fix-pr-contamination
Apr 4, 2026
Merged

fix: eliminate PR contamination from broad git staging (#777)#783
tamirdresher merged 1 commit intodevfrom
squad/777-fix-pr-contamination

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Apr 3, 2026

Summary

Eliminates all broad \git add\ patterns that cause PR file contamination when multiple agents work concurrently.

Changes

Fix File What changed
1 .squad-templates/issue-lifecycle.md\ Replace \git add .\ with explicit file staging
2 .squad-templates/scribe-charter.md\ Scope \git add .squad/\ to specific Scribe files
2 .squad-templates/squad.agent.md\ Same scoping in Scribe spawn template
3 .copilot/skills/git-workflow/SKILL.md\ Replace \git add -A\ with explicit staging
4 .copilot/skills/windows-compatibility/SKILL.md\ Replace \git add .squad/\ with explicit paths
5 \scripts/sync-templates.mjs\ Gate behind --sync\ flag or \SQUAD_SYNC_TEMPLATES=1\ env var
bonus .github/agents/squad.agent.md\ Fix live agent copy (same as Fix 2)

Pattern

All broad staging commands (\git add ., \git add -A, \git add .squad/) replaced with explicit file lists targeting only files the agent actually modified.

Closes #777

Copilot AI review requested due to automatic review settings April 3, 2026 15:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🛫 PR Readiness Check

⚠️ 2 item(s) to address before review

Status Check Details
Single commit 1 commit — clean history
Not in draft Ready for review
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present No source files changed — changeset not required
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved All 6 Copilot thread(s) resolved
CI passing 5 check(s) still running

This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to eliminate pull request “contamination” by removing broad git add patterns from Squad templates/skills and by preventing unintended template mirroring from running implicitly.

Changes:

  • Replaces broad staging commands (git add ., git add -A, git add .squad/) with more targeted staging guidance in templates and Copilot skills.
  • Updates Scribe-related templates to discourage staging the entire .squad/ directory.
  • Adds an “explicit invocation” guard to scripts/sync-templates.mjs (requires --sync or SQUAD_SYNC_TEMPLATES=1).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/sync-templates.mjs Adds a guard intended to prevent accidental template sync runs.
.squad-templates/issue-lifecycle.md Replaces git add . guidance with explicit-file staging guidance.
.squad-templates/scribe-charter.md Replaces git add .squad/ with a narrower (but still glob-based) staging command.
.squad-templates/squad.agent.md Updates the Scribe commit step to avoid git add .squad/ (still uses glob examples).
.github/agents/squad.agent.md Mirrors the same Scribe commit-step guidance for the live agent file.
.copilot/skills/git-workflow/SKILL.md Replaces git add -A with explicit-file staging guidance.
.copilot/skills/windows-compatibility/SKILL.md Introduces a new skill doc with Windows-safe patterns and updated staging guidance.

@diberry diberry force-pushed the squad/777-fix-pr-contamination branch 2 times, most recently from 4d5b0d1 to 543798e Compare April 3, 2026 16:59
- Replace `git add .` with explicit file staging in issue-lifecycle template
- Scope Scribe's `git add .squad/` to only files Scribe modifies
- Fix git-workflow and windows-compatibility skills
- Gate template sync behind explicit flag
- Fix live .github/agents/squad.agent.md copy

Closes #777

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/777-fix-pr-contamination branch from 543798e to e9487c6 Compare April 3, 2026 20:48
Copy link
Copy Markdown
Collaborator

@tamirdresher tamirdresher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Critical fix for agent coordination — replaces all broad git add with explicit staging across 18 files. Good Windows compat guidance.

@tamirdresher tamirdresher merged commit 3967e42 into dev Apr 4, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR file contamination: Squad adds/removes unrelated files from PRs

3 participants