Skip to content

Isolate Squad product assets from team state - #2015

Merged
bradygaster merged 12 commits into
devfrom
bradygaster-team-efficiency-audit
Sep 10, 2026
Merged

bradygaster merged 12 commits into
devfrom
bradygaster-team-efficiency-audit

Conversation

@bradygaster

@bradygaster bradygaster commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

What

Establishes a hard boundary between Squad product assets and this repository's live .squad/ team state. Deleting or re-casting the working team no longer changes package templates, build inputs, required changelog policy, or test outcomes.

Why

The repository is preparing for a full team re-cast. Live team names, skills, routing data, and historical examples had become implicit product inputs, which made re-casting risky and allowed stale team-derived files to remain in published template trees.

How

  • Makes .squad-templates/skills/ the complete product-owned canonical skill set and synchronizes exact file sets into root, CLI, and SDK mirrors.
  • Removes template synchronization from prebuild; the mutating maintenance command now requires explicit --sync opt-in.
  • Replaces tests that read this repository's live roster, routing, decisions, skills, and runbooks with synthetic fixtures or product-owned sources.
  • Excludes live .squad/ state from Docker build context and product changeset policy.
  • Runs heartbeat triage from the product-owned script and expands its parser for canonical, legacy, and preset routing formats.
  • Hardens issue routing with token-boundary matching, acronym support, ambiguity fallback, exact member resolution, Primary routing headers, and Lead-then-Architect fallback.
  • Removes the obsolete root squad.config.ts cast snapshot and stale destination-only skill artifacts.
  • Replaces repository-specific identities and ownership attribution in reusable assets with roles or placeholders.
  • Removes executable blanket-staging guidance from shipped skills and tightens the security scanner so scoped paths and explicit prohibitions are not reported as unsafe commands.

⚠️ Quick Check

  • If SDK/CLI source files changed: completed the applicable Changeset step below (npx changeset add / .changeset/*.md, direct CHANGELOG.md entry for maintainers, or skip-changelog label for no user-facing changes)

PR Readiness Checklist

The PR readiness bot will validate these automatically after push.
Check each item before requesting review. See CONTRIBUTING.md for full details.

Branch & Commit

  • Branch created from dev (not main)
  • Branch is up to date with dev (git fetch upstream && git rebase upstream/dev)
  • Verified diff contains only intended changes (git diff --cached --stat)
  • PR is not in draft mode (mark ready when checks pass)
  • Commit history is clean (squash fixups before review)

Build & Test

  • npm run build passes
  • npm test passes (all tests green)
  • npm run lint passes (type check clean)
  • npm run lint:eslint passes
  • For migration PRs (>20 files): include test output summary in PR description

The complete CI suite passes, including tests, policy gates, SDK exports, sample builds, strict gh-aw compilation, workflow/template linting, architectural review, file-leakage checks, and security review. Dependency-free validation also confirms all 54 canonical skill files and their exact mirror file sets, canonical/legacy/preset routing formats, explicit sync-command guards, Docker exclusion, zero net .squad/ changes, and a clean full-PR security scan.

Changeset

  • Changeset added via npx changeset add (if packages/squad-sdk/src/ or packages/squad-cli/src/ changed)
  • Or direct CHANGELOG.md entry (maintainers only - write-protected for external contributors)
  • Or skip-changelog label applied (if no user-facing changes)

The changeset covers the CLI and SDK template, routing, and build-isolation updates.

Docs

  • README section updated (if new feature/module) - N/A
  • Docs feature page (if new user-facing capability) - N/A

Exports

  • package.json subpath exports updated (if new module) - N/A

Breaking Changes

None.

Waivers

None.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 9, 2026 20:20
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Impact Analysis — PR #2015

Risk tier: 🔴 CRITICAL

📊 Summary

Metric Count
Files changed 224
Files added 105
Files modified 116
Files deleted 3
Modules touched 7
Critical files 1

🎯 Risk Factors

  • 224 files changed (>50 → CRITICAL)
  • 7 modules touched (5-8 → HIGH)
  • 3 file(s) deleted
  • Critical files touched: package.json

📦 Modules Affected

ci-workflows (8 files)
  • .github/PR_REQUIREMENTS.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/agents/squad.agent.md
  • .github/dependabot.yml
  • .github/instructions/squad-routing-guard.instructions.md
  • .github/workflows/squad-ci.yml
  • .github/workflows/squad-heartbeat.yml
  • .github/workflows/squad-triage.yml
root (67 files)
  • .changeset/identity-neutral-squad-templates.md
  • .dockerignore
  • package.json
  • squad.config.ts
  • templates/machine-capabilities.md
  • templates/model-selection-reference.md
  • templates/notes-protocol.md
  • templates/ralph-triage.js
  • templates/skills/agent-collaboration/SKILL.md
  • templates/skills/agent-conduct/SKILL.md
  • templates/skills/architectural-proposals/SKILL.md
  • templates/skills/ci-validation-gates/SKILL.md
  • templates/skills/cli-wiring/SKILL.md
  • templates/skills/client-compatibility/SKILL.md
  • templates/skills/coordinator-init-mode/SKILL.md
  • templates/skills/coordinator-response-mode/SKILL.md
  • templates/skills/coordinator-source-of-truth/SKILL.md
  • templates/skills/cross-machine-coordination/SKILL.md
  • templates/skills/cross-squad-communication/SKILL.md
  • templates/skills/cross-squad/SKILL.md
  • templates/skills/distributed-mesh/SKILL.md
  • templates/skills/distributed-mesh/mesh.json.example
  • templates/skills/distributed-mesh/sync-mesh.ps1
  • templates/skills/distributed-mesh/sync-mesh.sh
  • templates/skills/docs-standards/SKILL.md
  • templates/skills/e2e-template-testing/SKILL.md
  • templates/skills/economy-mode/SKILL.md
  • templates/skills/error-recovery/SKILL.md
  • templates/skills/external-comms/SKILL.md
  • templates/skills/fact-checking/SKILL.md
  • templates/skills/gh-auth-isolation/SKILL.md
  • templates/skills/gh-aw-enlistment/SKILL.md
  • templates/skills/git-workflow/SKILL.md
  • templates/skills/github-multi-account/SKILL.md
  • templates/skills/history-hygiene/SKILL.md
  • templates/skills/humanizer/SKILL.md
  • templates/skills/init-mode/SKILL.md
  • templates/skills/iterative-retrieval/SKILL.md
  • templates/skills/model-selection/SKILL.md
  • templates/skills/notification-routing/SKILL.md
  • templates/skills/personal-squad/SKILL.md
  • templates/skills/pr-review-response/SKILL.md
  • templates/skills/pr-screenshots/SKILL.md
  • templates/skills/project-conventions/SKILL.md
  • templates/skills/ralph-two-pass-scan/SKILL.md
  • templates/skills/reflect/SKILL.md
  • templates/skills/release-process/SKILL.md
  • templates/skills/reskill/SKILL.md
  • templates/skills/retro-enforcement/SKILL.md
  • templates/skills/reviewer-protocol/SKILL.md
  • templates/skills/rework-rate/SKILL.md
  • templates/skills/secret-handling/SKILL.md
  • templates/skills/session-recovery/SKILL.md
  • templates/skills/squad-commands/SKILL.md
  • templates/skills/squad-help/SKILL.md
  • templates/skills/squad-version-check/SKILL.md
  • templates/skills/squad/SKILL.md
  • templates/skills/test-discipline/SKILL.md
  • templates/skills/tiered-memory/SKILL.md
  • templates/skills/versioning-policy/SKILL.md
  • templates/skills/windows-compatibility/SKILL.md
  • templates/spawn-reference.md
  • templates/squad.agent.md.template
  • templates/workflows/squad-triage.yml
  • workflows/shared/squad-planning-ontology.md
  • workflows/squad-deps-worker.md
  • workflows/squad.md
scripts (4 files)
  • scripts/security-review.mjs
  • scripts/size-regression-guard.mjs
  • scripts/sync-skill-templates.mjs
  • scripts/sync-templates.mjs
squad-cli (38 files)
  • packages/squad-cli/src/cli/shell/components/Separator.tsx
  • packages/squad-cli/src/cli/shell/components/ThinkingIndicator.tsx
  • packages/squad-cli/src/cli/shell/useAnimation.ts
  • packages/squad-cli/templates/machine-capabilities.md
  • packages/squad-cli/templates/model-selection-reference.md
  • packages/squad-cli/templates/notes-protocol.md
  • packages/squad-cli/templates/ralph-triage.js
  • packages/squad-cli/templates/skills/agent-conduct/SKILL.md
  • packages/squad-cli/templates/skills/architectural-proposals/SKILL.md
  • packages/squad-cli/templates/skills/ci-validation-gates/SKILL.md
  • packages/squad-cli/templates/skills/client-compatibility/SKILL.md
  • packages/squad-cli/templates/skills/coordinator-response-mode/SKILL.md
  • packages/squad-cli/templates/skills/cross-machine-coordination/SKILL.md
  • packages/squad-cli/templates/skills/cross-squad-communication/SKILL.md
  • packages/squad-cli/templates/skills/distributed-mesh/sync-mesh.ps1
  • packages/squad-cli/templates/skills/distributed-mesh/sync-mesh.sh
  • packages/squad-cli/templates/skills/docs-standards/SKILL.md
  • packages/squad-cli/templates/skills/e2e-template-testing/SKILL.md
  • packages/squad-cli/templates/skills/external-comms/SKILL.md
  • packages/squad-cli/templates/skills/gh-aw-enlistment/SKILL.md
  • packages/squad-cli/templates/skills/git-workflow/SKILL.md
  • packages/squad-cli/templates/skills/history-hygiene/SKILL.md
  • packages/squad-cli/templates/skills/humanizer/SKILL.md
  • packages/squad-cli/templates/skills/init-mode/SKILL.md
  • packages/squad-cli/templates/skills/notification-routing/SKILL.md
  • packages/squad-cli/templates/skills/project-conventions/SKILL.md
  • packages/squad-cli/templates/skills/reskill/SKILL.md
  • packages/squad-cli/templates/skills/retro-enforcement/SKILL.md
  • packages/squad-cli/templates/skills/reviewer-protocol/SKILL.md
  • packages/squad-cli/templates/skills/secret-handling/SKILL.md
  • packages/squad-cli/templates/skills/squad-version-check/SKILL.md
  • packages/squad-cli/templates/skills/test-discipline/SKILL.md
  • packages/squad-cli/templates/skills/tiered-memory/SKILL.md
  • packages/squad-cli/templates/skills/versioning-policy/SKILL.md
  • packages/squad-cli/templates/skills/windows-compatibility/SKILL.md
  • packages/squad-cli/templates/spawn-reference.md
  • packages/squad-cli/templates/squad.agent.md.template
  • packages/squad-cli/templates/workflows/squad-triage.yml
squad-sdk (35 files)
  • packages/squad-sdk/src/config/init.ts
  • packages/squad-sdk/src/ralph/triage.ts
  • packages/squad-sdk/templates/machine-capabilities.md
  • packages/squad-sdk/templates/model-selection-reference.md
  • packages/squad-sdk/templates/notes-protocol.md
  • packages/squad-sdk/templates/ralph-triage.js
  • packages/squad-sdk/templates/skills/agent-conduct/SKILL.md
  • packages/squad-sdk/templates/skills/architectural-proposals/SKILL.md
  • packages/squad-sdk/templates/skills/ci-validation-gates/SKILL.md
  • packages/squad-sdk/templates/skills/client-compatibility/SKILL.md
  • packages/squad-sdk/templates/skills/coordinator-response-mode/SKILL.md
  • packages/squad-sdk/templates/skills/cross-machine-coordination/SKILL.md
  • packages/squad-sdk/templates/skills/cross-squad-communication/SKILL.md
  • packages/squad-sdk/templates/skills/distributed-mesh/sync-mesh.ps1
  • packages/squad-sdk/templates/skills/distributed-mesh/sync-mesh.sh
  • packages/squad-sdk/templates/skills/docs-standards/SKILL.md
  • packages/squad-sdk/templates/skills/e2e-template-testing/SKILL.md
  • packages/squad-sdk/templates/skills/external-comms/SKILL.md
  • packages/squad-sdk/templates/skills/gh-aw-enlistment/SKILL.md
  • packages/squad-sdk/templates/skills/git-workflow/SKILL.md
  • packages/squad-sdk/templates/skills/history-hygiene/SKILL.md
  • packages/squad-sdk/templates/skills/humanizer/SKILL.md
  • packages/squad-sdk/templates/skills/notification-routing/SKILL.md
  • packages/squad-sdk/templates/skills/reskill/SKILL.md
  • packages/squad-sdk/templates/skills/retro-enforcement/SKILL.md
  • packages/squad-sdk/templates/skills/reviewer-protocol/SKILL.md
  • packages/squad-sdk/templates/skills/secret-handling/SKILL.md
  • packages/squad-sdk/templates/skills/squad-version-check/SKILL.md
  • packages/squad-sdk/templates/skills/test-discipline/SKILL.md
  • packages/squad-sdk/templates/skills/tiered-memory/SKILL.md
  • packages/squad-sdk/templates/skills/versioning-policy/SKILL.md
  • packages/squad-sdk/templates/skills/windows-compatibility/SKILL.md
  • packages/squad-sdk/templates/spawn-reference.md
  • packages/squad-sdk/templates/squad.agent.md.template
  • packages/squad-sdk/templates/workflows/squad-triage.yml
templates (59 files)
  • .squad-templates/machine-capabilities.md
  • .squad-templates/model-selection-reference.md
  • .squad-templates/notes-protocol.md
  • .squad-templates/ralph-triage.js
  • .squad-templates/skills/agent-collaboration/SKILL.md
  • .squad-templates/skills/agent-conduct/SKILL.md
  • .squad-templates/skills/architectural-proposals/SKILL.md
  • .squad-templates/skills/ci-validation-gates/SKILL.md
  • .squad-templates/skills/cli-wiring/SKILL.md
  • .squad-templates/skills/client-compatibility/SKILL.md
  • .squad-templates/skills/coordinator-init-mode/SKILL.md
  • .squad-templates/skills/coordinator-response-mode/SKILL.md
  • .squad-templates/skills/coordinator-source-of-truth/SKILL.md
  • .squad-templates/skills/cross-machine-coordination/SKILL.md
  • .squad-templates/skills/cross-squad-communication/SKILL.md
  • .squad-templates/skills/cross-squad/SKILL.md
  • .squad-templates/skills/distributed-mesh/SKILL.md
  • .squad-templates/skills/distributed-mesh/mesh.json.example
  • .squad-templates/skills/distributed-mesh/sync-mesh.ps1
  • .squad-templates/skills/distributed-mesh/sync-mesh.sh
  • .squad-templates/skills/docs-standards/SKILL.md
  • .squad-templates/skills/e2e-template-testing/SKILL.md
  • .squad-templates/skills/economy-mode/SKILL.md
  • .squad-templates/skills/error-recovery/SKILL.md
  • .squad-templates/skills/external-comms/SKILL.md
  • .squad-templates/skills/fact-checking/SKILL.md
  • .squad-templates/skills/gh-auth-isolation/SKILL.md
  • .squad-templates/skills/gh-aw-enlistment/SKILL.md
  • .squad-templates/skills/git-workflow/SKILL.md
  • .squad-templates/skills/github-multi-account/SKILL.md
  • .squad-templates/skills/history-hygiene/SKILL.md
  • .squad-templates/skills/humanizer/SKILL.md
  • .squad-templates/skills/init-mode/SKILL.md
  • .squad-templates/skills/iterative-retrieval/SKILL.md
  • .squad-templates/skills/model-selection/SKILL.md
  • .squad-templates/skills/notification-routing/SKILL.md
  • .squad-templates/skills/personal-squad/SKILL.md
  • .squad-templates/skills/pr-review-response/SKILL.md
  • .squad-templates/skills/pr-screenshots/SKILL.md
  • .squad-templates/skills/project-conventions/SKILL.md
  • .squad-templates/skills/ralph-two-pass-scan/SKILL.md
  • .squad-templates/skills/reflect/SKILL.md
  • .squad-templates/skills/release-process/SKILL.md
  • .squad-templates/skills/reskill/SKILL.md
  • .squad-templates/skills/retro-enforcement/SKILL.md
  • .squad-templates/skills/reviewer-protocol/SKILL.md
  • .squad-templates/skills/secret-handling/SKILL.md
  • .squad-templates/skills/session-recovery/SKILL.md
  • .squad-templates/skills/squad-commands/SKILL.md
  • .squad-templates/skills/squad-help/SKILL.md
  • .squad-templates/skills/squad-version-check/SKILL.md
  • .squad-templates/skills/squad/SKILL.md
  • .squad-templates/skills/test-discipline/SKILL.md
  • .squad-templates/skills/tiered-memory/SKILL.md
  • .squad-templates/skills/versioning-policy/SKILL.md
  • .squad-templates/skills/windows-compatibility/SKILL.md
  • .squad-templates/spawn-reference.md
  • .squad-templates/squad.agent.md
  • .squad-templates/workflows/squad-triage.yml
tests (13 files)
  • test/catalog-refresh.test.ts
  • test/ci/changelog-gate.test.ts
  • test/cross-squad.test.ts
  • test/e2e-runbook-hygiene.test.ts
  • test/gh-aw-enlistment-skill.test.ts
  • test/gh-aw-plan-lifecycle.test.ts
  • test/gh-aw-research-online.test.ts
  • test/ralph-triage.test.ts
  • test/recast-identity-neutrality.test.ts
  • test/scripts/security-review.test.ts
  • test/squad-agent-roster.test.ts
  • test/state/archival.test.ts
  • test/template-sync.test.ts

⚠️ Critical Files

  • package.json

This report is generated automatically for every PR. See #733 for details.

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

⚠️ Architectural review: 1 warning(s).

Severity Category Finding Files
🟡 warning sweeping-refactor This PR touches 224 files (221 modified/added, 3 deleted). Large PRs are harder to review — consider splitting if possible. —

Automated architectural review — informational only.

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 3fcdac7

PR Scope: 📦🔧 Mixed (product + infrastructure)

⚠️ 2 item(s) to address before review

Status Check Details
❌ Single commit 12 commits — consider squashing before review
✅ 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 Changeset file found
✅ Scope clean No .squad/ or docs/proposals/ files
✅ No merge conflicts No merge conflicts
✅ Copilot threads resolved 1 active Copilot thread(s) resolved (4 outdated skipped)
✅ CI passing All checks passing

Files Changed (224 files, +17020 −1662)

File +/−
.changeset/identity-neutral-squad-templates.md +10 −0
.dockerignore +1 −1
.github/PR_REQUIREMENTS.md +15 −11
.github/PULL_REQUEST_TEMPLATE.md +1 −1
.github/agents/squad.agent.md +10 −10
.github/dependabot.yml +7 −7
.github/instructions/squad-routing-guard.instructions.md +20 −21
.github/workflows/squad-ci.yml +7 −2
.github/workflows/squad-heartbeat.yml +3 −3
.github/workflows/squad-triage.yml +129 −51
.squad-templates/machine-capabilities.md +1 −1
.squad-templates/model-selection-reference.md +4 −4
.squad-templates/notes-protocol.md +4 −7
.squad-templates/ralph-triage.js +83 −97
.squad-templates/skills/agent-collaboration/SKILL.md +42 −0
.squad-templates/skills/agent-conduct/SKILL.md +24 −0
.squad-templates/skills/architectural-proposals/SKILL.md +151 −0
.squad-templates/skills/ci-validation-gates/SKILL.md +84 −0
.squad-templates/skills/cli-wiring/SKILL.md +47 −0
.squad-templates/skills/client-compatibility/SKILL.md +89 −0
.squad-templates/skills/coordinator-init-mode/SKILL.md +99 −0
.squad-templates/skills/coordinator-response-mode/SKILL.md +97 −0
.squad-templates/skills/coordinator-source-of-truth/SKILL.md +45 −0
.squad-templates/skills/cross-machine-coordination/SKILL.md +442 −0
.squad-templates/skills/cross-squad-communication/SKILL.md +399 −0
.squad-templates/skills/cross-squad/SKILL.md +174 −0
.squad-templates/skills/distributed-mesh/SKILL.md +287 −0
.squad-templates/skills/distributed-mesh/mesh.json.example +30 −0
.squad-templates/skills/distributed-mesh/sync-mesh.ps1 +111 −0
.squad-templates/skills/distributed-mesh/sync-mesh.sh +104 −0
.squad-templates/skills/docs-standards/SKILL.md +71 −0
.squad-templates/skills/e2e-template-testing/SKILL.md +6 −5
.squad-templates/skills/economy-mode/SKILL.md +115 −0
.squad-templates/skills/error-recovery/SKILL.md +99 −0
.squad-templates/skills/external-comms/SKILL.md +329 −0
.squad-templates/skills/fact-checking/SKILL.md +61 −0
.squad-templates/skills/gh-auth-isolation/SKILL.md +183 −0
.squad-templates/skills/gh-aw-enlistment/SKILL.md +346 −0
.squad-templates/skills/git-workflow/SKILL.md +207 −0
.squad-templates/skills/github-multi-account/SKILL.md +95 −0
.squad-templates/skills/history-hygiene/SKILL.md +36 −0
.squad-templates/skills/humanizer/SKILL.md +105 −0
.squad-templates/skills/init-mode/SKILL.md +104 −0
.squad-templates/skills/iterative-retrieval/SKILL.md +165 −0
.squad-templates/skills/model-selection/SKILL.md +125 −0
.squad-templates/skills/notification-routing/SKILL.md +105 −0
.squad-templates/skills/personal-squad/SKILL.md +66 −0
.squad-templates/skills/pr-review-response/SKILL.md +268 −0
.squad-templates/skills/pr-screenshots/SKILL.md +149 −0
.squad-templates/skills/project-conventions/SKILL.md +56 −0
... +174 more files

Total: +17020 −1662


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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved routing, generated-source, protocol, changeset, and regression-coverage issues block approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 High severity · 4 Medium severity

New issues introduced by this change (5)
Severity Finding
High severity .squad-templates/​workflows/​squad-triage.yml — The PR changes governed template/scaffolding paths, but the description marks the changeset step…
Medium severity packages/​squad-sdk/​templates/​skills/​external-comms/​SKILL.md — The shipped skill changes rename the review commands to comms, but…
Medium severity packages/​squad-sdk/​templates/​skills/​versioning-policy/​SKILL.md — These package files are generated mirrors, but scripts/sync-skill-templates.mjs copies…
Medium severity test/​recast-identity-neutrality.test.ts — The template scan omits the i flag used by the policy scan, so a lower-cased or differently cased…
Medium severity test/​recast-identity-neutrality.test.ts — This regression test only checks that helper names exist and three old source fragments are absent;…
What changed in this PR

This pull request decouples Squad governance, triage, and shipped templates from cast-specific names by using current team and routing metadata.

Changes:

  • Adds routing-table-driven triage with Lead fallback.
  • Generalizes governance, spawn, and skill templates.
  • Removes the obsolete Dependabot label and adds identity-neutrality tests.
File Summary
test/​recast-identity-neutrality.test.ts Adds identity-neutrality and routing regression tests.
templates/​workflows/​squad-triage.yml Updates reusable triage workflow routing.
templates/​spawn-reference.md Generalizes spawn examples.
templates/​skills/​e2e-template-testing/​SKILL.md Generalizes E2E guidance.
packages/​squad-sdk/​templates/​workflows/​squad-triage.yml Updates the SDK triage template.
packages/​squad-sdk/​templates/​spawn-reference.md Generalizes SDK spawn examples.
packages/​squad-sdk/​templates/​skills/​versioning-policy/​SKILL.md Generalizes SDK versioning guidance.
packages/​squad-sdk/​templates/​skills/​retro-enforcement/​SKILL.md Generalizes SDK retrospective guidance.
packages/​squad-sdk/​templates/​skills/​humanizer/​SKILL.md Generalizes SDK humanizer guidance.
packages/​squad-sdk/​templates/​skills/​external-comms/​SKILL.md Generalizes SDK communications guidance.
packages/​squad-sdk/​templates/​skills/​e2e-template-testing/​SKILL.md Generalizes SDK E2E guidance.
packages/​squad-sdk/​templates/​skills/​docs-standards/​SKILL.md Generalizes SDK documentation guidance.
packages/​squad-sdk/​templates/​skills/​agent-conduct/​SKILL.md Generalizes SDK agent conduct guidance.
packages/​squad-cli/​templates/​workflows/​squad-triage.yml Updates the CLI triage template.
packages/​squad-cli/​templates/​spawn-reference.md Generalizes CLI spawn examples.
packages/​squad-cli/​templates/​skills/​versioning-policy/​SKILL.md Generalizes CLI versioning guidance.
packages/​squad-cli/​templates/​skills/​retro-enforcement/​SKILL.md Generalizes CLI retrospective guidance.
packages/​squad-cli/​templates/​skills/​humanizer/​SKILL.md Generalizes CLI humanizer guidance.
packages/​squad-cli/​templates/​skills/​external-comms/​SKILL.md Generalizes CLI communications guidance.
packages/​squad-cli/​templates/​skills/​e2e-template-testing/​SKILL.md Generalizes CLI E2E guidance.
packages/​squad-cli/​templates/​skills/​docs-standards/​SKILL.md Generalizes CLI documentation guidance.
packages/​squad-cli/​templates/​skills/​agent-conduct/​SKILL.md Generalizes CLI agent conduct guidance.
.squad-templates/​workflows/​squad-triage.yml Updates the canonical triage workflow.
.squad-templates/​spawn-reference.md Generalizes canonical spawn examples.
.squad-templates/​skills/​e2e-template-testing/​SKILL.md Generalizes canonical E2E guidance.
.github/​workflows/​squad-triage.yml Updates active repository triage.
.github/​PULL_REQUEST_TEMPLATE.md Makes waiver guidance role-based.
.github/​PR_REQUIREMENTS.md Makes review ownership role-based.
.github/​instructions/​squad-routing-guard.instructions.md Makes routing guidance metadata-driven.
.github/​dependabot.yml Removes the obsolete Dependabot label.
Suppressed comments (9)

.github/workflows/squad-triage.yml:142

  • The active workflow has the same table-shape assumption: a valid routing.md row without a final | is parsed with missing columns, so routing silently falls back to Lead. Keep this copy in sync with the canonical parser while accepting optional trailing pipes.
            function tableCells(line) {
              return line.split('|').slice(1, -1).map(cell => cell.trim());
            }

.github/workflows/squad-triage.yml:169

  • The active workflow repeats the same substring-based destination lookup, so overlapping member names in a recast can produce multiple rules and an arbitrary assignment. Use exact normalized destination tokens rather than includes here as well as in the canonical template.
                  const destinations = members.filter(member =>
                    routeCell.toLowerCase().includes(member.name.toLowerCase())
                  );

.github/workflows/squad-triage.yml:247

  • The new route path still relies on lead, which is selected above by matching lead, architect, or coordinator in the role text. After a re-cast, an Architect/Coordinator listed before the actual Lead would receive unmatched issues and be shown as the triage authority; resolve the fallback from the exact Lead role (or an explicit role owner) instead of this broad heuristic.
              if (scoredRoutes.length > 0) {
                const best = scoredRoutes[0];
                assignedMember = best.rule.member;
                triageReason = `Matched routing rule "${best.rule.workType}"`;

.squad-templates/workflows/squad-triage.yml:109

  • tableCells only works when every Markdown row has a trailing |. A valid two-column routing.md written without that optional final pipe leaves routeIndex at -1, so no routing rules are loaded and every issue falls back to Lead. Normalize an optional trailing empty cell instead; the SDK parser already accepts both table forms.
            function tableCells(line) {
              return line.split('|').slice(1, -1).map(cell => cell.trim());
            }

.squad-templates/workflows/squad-triage.yml:136

  • Destination matching uses substring search, so a recast with names such as Ann and Anna makes a route to Anna match both members and can assign the issue to the wrong one. Parse the route cell's delimited destinations and compare normalized names exactly (while stripping the display emoji).
                  const destinations = members.filter(member =>
                    routeCell.toLowerCase().includes(member.name.toLowerCase())
                  );

packages/squad-cli/templates/skills/external-comms/SKILL.md:6

  • These edits are being made only in package mirrors, but external-comms, humanizer, and versioning-policy are generated from .squad/skills by scripts/sync-skill-templates.mjs, which copies into both package trees. The canonical sources still contain PAO/Surgeon text, so the next sync or release regeneration will overwrite this neutral version and reintroduce the cast-specific names; update the canonical sources first and regenerate both mirrors.
description: "Workflow for scanning, drafting, and presenting community responses with a human review gate"
domain: "community, communication, workflow"
confidence: "low"
source: "manual (external communications workflow)"

packages/squad-cli/templates/skills/external-comms/SKILL.md:144

  • The renamed comms approve/comms resume tokens are part of the documented review protocol, but .squad/comms/tests/tone-validation-spec.md:57,61,153 still defines and validates pao approve/pao resume. Consumers and repository checks therefore disagree about the command API; update the canonical skill and validation spec together, or retain the established tokens.
- `comms approve 1 3` — approve drafts 1 and 3
- `comms edit 2` — edit draft 2
- `comms skip` — skip all

packages/squad-sdk/templates/skills/external-comms/SKILL.md:6

  • This is the second generated mirror of external-comms, but the canonical .squad/skills/external-comms/SKILL.md still contains the old PAO text. scripts/sync-skill-templates.mjs will copy that stale source over both package trees on the next sync, undoing this change; update the canonical source and regenerate the mirrors.
description: "Workflow for scanning, drafting, and presenting community responses with a human review gate"
domain: "community, communication, workflow"
confidence: "low"
source: "manual (external communications workflow)"

packages/squad-sdk/templates/skills/humanizer/SKILL.md:6

  • These skill files are generated mirrors: scripts/sync-skill-templates.mjs copies .squad/skills/humanizer/SKILL.md into both package template trees. That canonical source still contains the PAO/RFC text, so running the sync will overwrite this neutralized copy; update the canonical skill and regenerate the mirrors instead.
source: "manual (external communications workflow)"

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/recast-identity-neutrality.test.ts Resolved
Comment thread test/recast-identity-neutrality.test.ts Resolved
bradygaster and others added 2 commits September 9, 2026 13:28
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bradygaster

Copy link
Copy Markdown
Collaborator Author

@copilot want to make sure you see no concerns with this and that we're moving in a direction in which our CI and our rules aren't reliant - at all - on the structure of the squad being used to work on Squad.

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@copilot want to make sure you see no concerns with this and that we're moving in a direction in which our CI and our rules aren't reliant - at all - on the structure of the squad being used to work o...

The direction is right, but I can’t say there are no concerns yet. The current routing scorer drops meaningful short terms such as CI and can misroute broad token matches (API failure routes to Docs). Also, the neutrality guard itself hard-codes the current cast denylist, while shipped templates still contain fixed agent identities/namespaces (for example notes-protocol.md). CI is green on cac49ce, but these gaps mean it does not yet prove complete structural independence.

bradygaster and others added 2 commits September 9, 2026 15:21
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🔒 Security Review

🔒 Security review: 27 error(s).

Severity Category Finding Location
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. .squad-templates/skills/cross-machine-coordination/SKILL.md:51
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. .squad-templates/skills/cross-machine-coordination/SKILL.md:255
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. .squad-templates/skills/gh-aw-enlistment/SKILL.md:235
🔴 error unsafe-git Unsafe git operation: git add -A — this can stage unintended files or force-push shared branches. .squad-templates/skills/gh-aw-enlistment/SKILL.md:235
🔴 error unsafe-git Unsafe git operation: git commit -a — this can stage unintended files or force-push shared branches. .squad-templates/skills/gh-aw-enlistment/SKILL.md:235
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. .squad-templates/skills/gh-aw-enlistment/SKILL.md:330
🔴 error unsafe-git Unsafe git operation: git commit -a — this can stage unintended files or force-push shared branches. .squad-templates/skills/gh-aw-enlistment/SKILL.md:330
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. .squad-templates/skills/secret-handling/SKILL.md:161
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. .squad-templates/skills/windows-compatibility/SKILL.md:59
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. scripts/security-review.mjs:197
🔴 error unsafe-git Unsafe git operation: git add -A — this can stage unintended files or force-push shared branches. scripts/security-review.mjs:198
🔴 error unsafe-git Unsafe git operation: git commit -a — this can stage unintended files or force-push shared branches. scripts/security-review.mjs:199
🔴 error unsafe-git Unsafe git operation: git push --force — this can stage unintended files or force-push shared branches. scripts/security-review.mjs:200
🔴 error unsafe-git Unsafe git operation: git push --force — this can stage unintended files or force-push shared branches. scripts/security-review.mjs:201
🔴 error unsafe-git Unsafe git operation: git push --force-with-lease — this can stage unintended files or force-push shared branches. scripts/security-review.mjs:201
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. templates/skills/cross-machine-coordination/SKILL.md:51
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. templates/skills/cross-machine-coordination/SKILL.md:255
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. templates/skills/gh-aw-enlistment/SKILL.md:235
🔴 error unsafe-git Unsafe git operation: git add -A — this can stage unintended files or force-push shared branches. templates/skills/gh-aw-enlistment/SKILL.md:235
🔴 error unsafe-git Unsafe git operation: git commit -a — this can stage unintended files or force-push shared branches. templates/skills/gh-aw-enlistment/SKILL.md:235
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. templates/skills/gh-aw-enlistment/SKILL.md:330
🔴 error unsafe-git Unsafe git operation: git commit -a — this can stage unintended files or force-push shared branches. templates/skills/gh-aw-enlistment/SKILL.md:330
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. templates/skills/secret-handling/SKILL.md:161
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. templates/skills/windows-compatibility/SKILL.md:59
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. test/scripts/security-review.test.ts:85
🔴 error unsafe-git Unsafe git operation: git add . — this can stage unintended files or force-push shared branches. test/scripts/security-review.test.ts:97
🔴 error unsafe-git Unsafe git operation: git commit -a — this can stage unintended files or force-push shared branches. test/scripts/security-review.test.ts:97

Automated security review — informational only.

@bradygaster bradygaster changed the title Decouple Squad automation from cast-specific names Isolate Squad product assets from team state Sep 9, 2026
bradygaster and others added 2 commits September 9, 2026 15:31
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bradygaster

Copy link
Copy Markdown
Collaborator Author

Security follow-up:

  • Confirmed one actionable finding: the shipped git-workflow skill used git add -A, which could stage unrelated sensitive files. It now requires explicit paths and staged-diff inspection in the canonical source and all package mirrors.
  • Proactively removed the same blanket-staging pattern from the disposable E2E repository setup.
  • Corrected the detector so git add .squad/... is not misclassified as git add ., and explicit warnings such as "never use git add -A" are not reported as executable guidance.
  • Removed the executable unsafe command from the enlistment anti-pattern example.

The updated scanner reports zero findings across origin/dev...HEAD, and the refreshed CI suite is green.

@bradygaster

Copy link
Copy Markdown
Collaborator Author

@copilot can I get one more review on the update, and on this as a step in the direction of the product being decoupled from the squad.

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@copilot can I get one more review on the update, and on this as a step in the direction of the product being decoupled from the squad.

The product/team-state boundary is now materially stronger: canonical skills, sync inputs, build behavior, routing fixtures, Docker context, and changeset policy are decoupled from live .squad/ state, and CI is green on 1d4ca99. I still see two issues before approval: scripts/security-review.mjs:208 skips the whole line when words like avoid appear anywhere, so executable commands such as git add -A # avoid orphaned files evade detection; and .squad/e2e/README.md:41 still claims CI enforcement by the deleted test/e2e-runbook-hygiene.test.ts. The first is blocking; the second should either restore the guard outside product tests or retire the stale claim.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bradygaster

Copy link
Copy Markdown
Collaborator Author

Follow-up on the latest Copilot review:

  • Scanner bypass: fixed. Prohibition detection now examines only text before the matched command, so git add -A # avoid orphaned files is still reported. A regression fixture covers that exact bypass, alongside scoped-path and explicit-prohibition cases.
  • .squad/e2e/README.md: intentionally not changed in this product-boundary PR. That file is live team/dogfood state scheduled to be removed by the re-cast. Restoring its deleted CI guard would recreate the dependency this PR is removing, while editing it here would make the product-isolation PR modify live .squad/** state. The stale claim should disappear with the re-cast rather than become a product test again.

bradygaster and others added 2 commits September 9, 2026 16:04
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@tamirdresher tamirdresher left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like the direction here. I found three things I'd fix before merging.

Comment thread templates/ralph-triage.js Resolved
Comment thread scripts/security-review.mjs Resolved
Comment thread scripts/security-review.mjs Resolved
bradygaster and others added 2 commits September 9, 2026 23:47
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bradygaster
bradygaster merged commit 9cf5842 into dev Sep 10, 2026
19 checks passed
tamirdresher added a commit to tamirdresher/squad that referenced this pull request Oct 2, 2026
…All artifact

- test/e2e-runbook-hygiene.test.ts: deliberately deleted from dev in PR github#2015
  (Isolate Squad product assets from team state) because it read live .squad
  state. It survived only on main (added at v0.13.0, no promotion since), so
  the dev-vs-main merge resurrected it. Removing it to match dev's documented,
  traceable intent — not a blanket ours/theirs choice.
- test/template-sync.test.ts: the 3-way merge auto-combined non-overlapping
  hunks from dev (simplified describe block, no beforeAll) and main (legacy
  describe-scoped beforeAll retained for historical defence-in-depth) into
  semantically broken code referencing an unimported beforeAll. Replaced with
  dev's complete, authoritative file content (byte-identical to origin/dev).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bradygaster
bradygaster deleted the bradygaster-team-efficiency-audit branch October 3, 2026 00:11
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.

4 participants