Skip to content

Audit .squad/ entries in .gitignore — are we ignoring too much or too little? #1830

Description

@bradygaster

Summary

.gitignore hides several .squad/ paths repo-wide. We should review the list deliberately and decide what belongs in version control — this issue is for the audit, not a pre-decided fix.

No changes have been made to .gitignore. Filing this so we review it together.

Current .squad/ entries in .gitignore

Line Pattern Added Commit Stated reason
13 .squad/orchestration-log/ 2026-02-21 c36e8ecc "ignore generated logs" (PRD 22, #171)
14 .squad/orchestration-log/dispatchguard/ 2026-07-27 c4cd76de "belt-and-suspenders" for dispatchguard subdir
15 .squad/log/ 2026-02-21 c36e8ecc "ignore generated logs"
16 .squad/decisions/inbox/ 2026-03-06 d5e190c4 reaction to CI failure #228
17 .squad/sessions/ 2026-03-06 d5e190c4 reaction to CI failure #228
18 .squad/config.json 2026-03-05 e62d18f8 contains machine-local absolute teamRoot
30 .squad/.first-run transient marker
31 .squad/.watch-pids transient PID file
32 .squad/.cache/ cache
37 .squad/.scratch/ scratch

Lines 53–54 already carry an explicit warning that .squad/casting/* is authoritative identity and must not be added to the ignore list.

Why this is worth reviewing

1. The promote workflow may already make some entries redundant.

.github/workflows/squad-promote.yml has stripped all of .squad/ at the dev→preview merge since d4058715 (2026-02-20) — one day before the first .gitignore entry landed:

# Strip forbidden paths from merge commit
git rm -rf --cached --ignore-unmatch \
  .ai-team/ \
  .squad/ \
  .ai-team-templates/ \
  team-docs/ \
  "docs/proposals/" || true

It also re-verifies on preview and fails the promote if anything slipped through.

2. Issue #228's guard was scoped to main, but the fix was repo-wide.

The #228 CI error text reads: ".squad/orchestration-log/, .squad/log/, .squad/decisions/inbox/, .squad/sessions/ are noisy runtime state — they belong on dev branches only" and "Other .squad/ files (charters, history, decisions, skills, templates) ARE allowed on main."

The remediation applied was a .gitignore entry, which applies to every branch — including dev, where that state is meant to live. Worth confirming whether that was intended.

3. There is observable fallout.

  • Scribe's logging has never worked in a clean clone — .squad/log/ and .squad/orchestration-log/ are gitignored repo-wide #1823 — Scribe's logging has never worked in a clean clone.
  • An untracked .squad/archive/2026-08-20-decisions-archive.md (7,513 bytes, 6 decision entries) was found on one machine only. Spot-checking three entries — "Copilot git safety rules", "Dispatch Enforcement — Stop Coordinator From Doing Domain Work Inline", "Workflow templates linted via explicit actionlint file paths" — none appear in tracked .squad/decisions.md.
  • .squad/agents/sims/history.md was likewise untracked.
  • .squad/decisions.md is currently 51,819 bytes, past the 51,200-byte archival hard gate, so the next Scribe run will archive again into the same destination.

This matches the failure mode described in the Scribe archival safety rules — moving content into an untracked destination is a deletion, not an archive (see #1774, #1783, #1760).

Questions to settle

  1. Which of these are genuinely transient vs. team memory we want preserved on dev?
  2. Is the promote workflow's strip sufficient protection for main/preview on its own?
  3. Should config.json stay ignored, or should the machine-local absolute teamRoot move out of a committed file so the rest of the config can be shared?
  4. Does .squad/sessions/ contain anything worth keeping?
  5. Should Scribe be required to verify an archival destination is tracked (git ls-files --error-unmatch) before moving content into it?

Related

Note on a separate change already made

While investigating, .squad/ and .github/agents/squad.agent.md were removed from C:\src\squad\.git\info\exclude (backed up to exclude.bak-20260822). That is local, uncommitted git metadata — not .gitignore — and it is what surfaced the orphaned archive above. Revert from the backup if unwanted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions