Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
327 changes: 326 additions & 1 deletion .squad/agents/eecom/history.md

Large diffs are not rendered by default.

205 changes: 204 additions & 1 deletion .squad/agents/fido/history.md

Large diffs are not rendered by default.

178 changes: 177 additions & 1 deletion .squad/agents/flight/history.md

Large diffs are not rendered by default.

281 changes: 280 additions & 1 deletion .squad/agents/pao/history.md

Large diffs are not rendered by default.

200 changes: 199 additions & 1 deletion .squad/agents/procedures/history.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .squad/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,8 @@ Triaged 14 untriaged issues (3 docs, 6 community features, 3 bugs, 2 questions).
**By:** Booster (CI/CD)
**What:** Templates under `packages/squad-cli/templates/workflows/` and `packages/squad-sdk/templates/workflows/` are now linted by actionlint via explicit file path arguments in the new `squad-workflow-lint.yml` CI job. SC2086 findings fixed across all `>> $GITHUB_OUTPUT` / `>> $GITHUB_STEP_SUMMARY` redirects in `.squad-templates/workflows/`, `templates/workflows/`, `.github/workflows/squad-heartbeat.yml`, `squad-repo-health.yml`, and `squad-ci.yml`. Actionlint pinned to tag `v1.7.12`; shellcheck 0.10.0 installed explicitly.
**Why:** Downstream repos running actionlint in their CI saw SC2086 errors in files generated by `squad upgrade` because Squad's own CI did not lint templates. The fix must live in Squad's templates — `squad upgrade` overwrites any downstream patches on every run. PR #1557.
## Deferred

- #357, #336, #335, #334, #333, #332, #316 (A2A) — stays shelved per existing decision
- #581 (ADO PRD) — P2, blocked until #341 (SDK-first parity) ships

Expand Down
4 changes: 4 additions & 0 deletions .squad/decisions/inbox/booster-ci-deletion-guard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### 2026-03-26: CI deletion guard and source tree canary
**By:** Booster (CI/CD)
**What:** Added two safety checks to squad-ci.yml: (1) source tree canary verifying critical files exist, (2) large deletion guard failing PRs that delete >50 files without 'large-deletion-approved' label. Branch protection on dev requested (may need manual setup).
**Why:** Incident #631 — @copilot deleted 361 files on dev with no CI gate catching it.
35 changes: 35 additions & 0 deletions .squad/decisions/inbox/booster-release-skill-v094.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Decision: Release Process Skill Update — v0.9.4 Learnings

**Author:** Booster (CI/CD Engineer)
**Date:** 2026-04-25
**Status:** Implemented
**Requested by:** Brady

## Summary

Updated both release-process skill files with critical learnings from the v0.9.4 release session. The v0.9.4 release was delayed by three distinct issues, each fixed by a separate PR.

## Changes Made

### Files Updated
1. `.squad/skills/release-process/SKILL.md` (team-level skill)
2. `.copilot/skills/release-process/SKILL.md` (copilot-level skill)
3. `.squad/agents/booster/history.md` (learnings log)

### New Knowledge Added

| Issue | Root Cause | Fix PR | Skill Section |
|-------|-----------|--------|---------------|
| Root package.json version drift | squad-release.yml reads from root, not sub-packages | #1043 | Known Gotchas + v0.9.4 Incident Learnings |
| CHANGELOG missing `## [$VERSION]` | Workflow validates version entry exists | #1042 | Known Gotchas + Release Checklist |
| Lockfile integrity check rejects workspace packages | Check didn't filter for registry-only packages | #1044 | Known Gotchas + Common Failure Modes |
| GITHUB_TOKEN can't trigger downstream workflows | GitHub security feature prevents event propagation | N/A (design) | GITHUB_TOKEN section + Manual Publish |
| Prebuild bump breaks workspace linking | bump-build.mjs mutates versions breaking exact match | N/A (known) | Local Development section |

### Cross-References
- Added bidirectional cross-references between team-level and copilot-level skill files
- Added PR references (#1042, #1043, #1044) as source evidence throughout

## Rationale

These are high-impact, recurring failure modes. Documenting them in the skill files ensures every agent (human or AI) working on releases has the knowledge to avoid repeating the v0.9.4 delays. The GITHUB_TOKEN limitation in particular is non-obvious and would catch any future release.
100 changes: 100 additions & 0 deletions .squad/decisions/inbox/data-restore-dev-main-ancestry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
author: Data
date: 2026-08-13
status: decided
references:
- "PR #1699"
- "PR #1698 (v0.12.0 dev -> main promotion, unblocked by this)"
- "PR #1415 (tools: ['*'] fix, verified already on dev)"
---

# Decision: restore shared ancestry between dev and main via merge, dev-wins conflict policy

## Context

`dev` and `main` had unrelated git histories. `dev`'s root commit (`4c5772c5`, a
dependabot bump dated 2026-07-13) shares no ancestor with `main`'s root
(`f4830e48`, 1722 commits). `dev` itself has 196 commits. `git merge-base
upstream/dev upstream/main` returned nothing and `git merge-tree` refused
outright. This made the v0.12.0 promotion PR (#1698, `dev` -> `main`) flatly
unmergeable, with no way to review a normal diff. The v0.11.0 promotion
(2026-06-29) predates the July 13 reset, which is why it worked and why
#1698 was the first to hit this wall.

## Decision

Merge `upstream/main` into `dev` with `--allow-unrelated-histories`, resolving
every one of the 275 conflicts in `dev`'s favor, on a new branch
`squad/restore-main-ancestry`, landed via PR #1699 into `dev`.

Rejected alternative: rebasing `dev` onto `main`. `dev` carries a
`non_fast_forward` ruleset that blocks the force-push a rebase requires, and a
rebase would rewrite all 196 commits on `dev`, invalidating every PR currently
open against it. A merge is additive only and needs no force-push.

## Why dev-wins conflict resolution is safe

All 275 conflicts were `add/add` (identical path on both branches, no common
base to 3-way merge from). Resolved every one with `git checkout --ours` (dev's
content). This is safe because the only `main`-only code fix that mattered,
#1415 (`tools: ['*']` in `.github/agents/squad.agent.md`), was verified already
present on `dev` before starting the merge, so dev-wins loses zero code.
Verified the resolution was a true no-op against dev's pre-merge tree: diffing
all 275 resolved files plus the 48 removed changesets plus the 6 auto-merged
files against dev's HEAD showed only 18 real changes total, exactly the
files deliberately kept (see below). Confirmed unchanged post-merge:
`package.json` / `packages/squad-cli/package.json` / `packages/squad-sdk/package.json`
(all `0.12.0`), `CHANGELOG.md` (`## [0.12.0] - 2026-08-12` intact),
`test/gh-aw-quality.test.ts` (#1697 fix intact), `workflows/squad.md` and
`workflows/squad-implement-worker.md` (#1682 feature intact).

## What was restored (kept from main, lost in the July 13 reset)

7 docs pages:
- docs/src/content/blog/015-wave-2-the-repl-moment.md
- docs/src/content/blog/032-v010-stabilisation-insider.md
- docs/src/content/blog/033-swe-bench-lite-results.md
- docs/src/content/docs/features/remote-control.md
- docs/src/content/docs/get-started/choosing-your-path.md
- docs/src/content/docs/guide/personal-squad.md
- docs/src/content/docs/guide/shell.md

5 decision records:
- .squad/decisions/inbox/booster-ci-deletion-guard.md
- .squad/decisions/inbox/booster-release-skill-v094.md
- .squad/decisions/inbox/flight-versioning-policy.md
- .squad/decisions/inbox/procedures-fix-coordinator-inline-dispatch-gate.md
- .squad/decisions/inbox/retro-copilot-git-safety.md

Plus 6 files that auto-merged cleanly via a genuine 3-way merge (not a
conflict), appending older history from main onto dev's existing content with
no loss on either side: `.squad/agents/{eecom,fido,flight,pao,procedures}/history.md`
and `.squad/decisions.md`.

## What was dropped

48 `.changeset/*.md` files that arrived from `main`. These are spent: their
content is already consumed into `CHANGELOG.md`'s `[0.12.0]` entry, and
re-adding them risked tripping the Changeset Drift check. `.changeset/` after
this merge contains exactly what `dev` had before: `README.md`,
`config.json`, `max-reasoning-effort.md`.

## Validation

Static/diff verification was thorough (see above). Dynamic validation
(`npm run build`, `npx vitest run`) could **not** be executed in this sandbox:
the corporate npm proxy does not mirror `eslint-plugin-n@18.3.0` (its cache
tops out at 18.2.2) and there is no direct route to the public npm registry
from this environment. Confirmed unrelated to the merge:
`package-lock.json`'s staged content is byte-identical to dev's pre-merge
HEAD, and this exact dependency/version was already in dev's lockfile before
any of this work. CI (which has full registry access) is the source of truth
for build/test validation on PR #1699.

## Outcome

`git merge-base <this-branch> upstream/main` now succeeds, confirming `dev`
has a real common ancestor with `main` again. This unblocks PR #1698 and
prevents the same failure on future promotions, provided the new release-process
skill gate (verify `git merge-base dev main` before starting release-prep) is
followed going forward.
32 changes: 32 additions & 0 deletions .squad/decisions/inbox/flight-versioning-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Decision: Versioning Policy — No Prerelease Versions on dev/main

**By:** Flight (Lead)
**Date:** 2026-03-29
**Requested by:** Dina
**Status:** DECIDED
**Confidence:** Medium (confirmed by PR #640 incident, PR #116 prerelease leak, CI gate implementation)

## Decision

1. **All packages use strict semver** (`MAJOR.MINOR.PATCH`). No prerelease suffixes on `dev` or `main`.
2. **Prerelease versions are ephemeral.** `bump-build.mjs` creates `-build.N` for local testing only — never committed.
3. **SDK and CLI versions must stay in sync.** Divergence silently breaks npm workspace resolution.
4. **Surgeon owns version bumps.** Other agents must not modify `version` fields in `package.json` unless fixing a prerelease leak.
5. **CI enforcement via `prerelease-version-guard`** blocks PRs with prerelease versions. `skip-version-check` label is Surgeon-only.

## Why

The repo had no documented versioning policy. This caused two incidents:

- **PR #640:** Prerelease version `0.9.1-build.4` silently broke workspace resolution. The semver range `>=0.9.0` does not match prerelease versions, causing npm to install a stale registry package instead of the local workspace link. Four PRs (#637–#640) patched symptoms before the root cause was found.
- **PR #116:** Surgeon set versions to `0.9.1-build.1` instead of `0.9.1` on a release branch because there was no guidance on what constitutes a clean release version.

## Skill Reference

Full policy documented in `.squad/skills/versioning-policy/SKILL.md`.

## Impact

- All agents must follow the versioning policy when touching `package.json`
- Surgeon charter should reference this skill for release procedures
- CI pipeline enforces the policy via automated gate
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Decision: Restore always-on coordinator inline-dispatch gate (v0.10.0 regression)

- **Author:** Procedures (Prompt Engineer)
- **Date:** 2026-06-24
- **Requested by:** Tamir Dresher
- **Branch:** squad/fix-coordinator-inline-dispatch-gate (worktree)
- **Status:** Proposed — applied in working tree, awaiting Lead (Flight) review; NOT committed.

## Context

Matthew Wan reported the main Squad coordinator "does a lot of work on its own instead of using his roster of agents." Worked in v0.9.4, broke in v0.10.0. Dina Berry worked around it by hand-editing the coordinator charter.

## Root cause

Commit `afe78188` (#1035, "context overflow sentinel + coordinator size reduction") cut the coordinator template and moved the concrete inline-dispatch gate and dispatch mechanics out of the always-on prompt into lazy-loaded reference files (`client-compatibility-reference.md`, `spawn-reference.md`). The leftover inline guidance ("inline work is last-resort fallback only") was too soft to hold the line, so the coordinator began executing domain work itself.

## Decision

Re-establish a strong, **always-on** dispatch gate without breaking the legitimate Direct/Lightweight response modes or the size-reduction spirit. Three minimal edits (~14 lines) to the canonical template `.squad-templates/squad.agent.md`, propagated to all 5 synced copies via `npm run sync-templates`:

1. **Inline-dispatch gate** (Client Compatibility): inline permitted ONLY in Direct Mode, or when NEITHER `task` NOR `runSubagent` exists; otherwise MUST dispatch.
2. **STOP gate** (How to Spawn an Agent): about to emit a domain artifact with no spawn call this turn → STOP and dispatch (exceptions: Direct Mode / no spawn tool).
3. **VS Code `runSubagent` micro-playbook** re-inlined (~5 lines) so how-to-dispatch is always-on.

## The 5 synced copies (canonical first)

1. `.squad-templates/squad.agent.md` (canonical — edited here)
2. `templates/squad.agent.md.template`
3. `.github/agents/squad.agent.md`
4. `packages/squad-cli/templates/squad.agent.md.template`
5. `packages/squad-sdk/templates/squad.agent.md.template`

## Validation

- New regression/parity test `test/coordinator-inline-dispatch-gate.test.ts` (deterministic, subprocess-free): RED before (8/8 fail), GREEN after (8/8 pass).
- Full `npm run test`: 18 failed files vs 31 baseline (fewer); all failures are pre-existing flaky subprocess/timeout e2e tests (3 of 4 "new vs baseline" pass in isolation; the 4th is `squad doctor` at 40x10 exiting null = timeout, unrelated to template content). No new deterministic failures.
- `npm run lint` (tsc noEmit both packages): clean.

## Changeset

Required. The `changelog-gate` regex governs `.squad-templates/`, `templates/`, and `packages/squad-(sdk|cli)/templates/` — not just `src/`. Added `.changeset/fix-coordinator-inline-dispatch-gate.md` (patch, squad-cli + squad-sdk).

## Rollout

Existing installs require `squad upgrade` to pick up the regenerated coordinator agent.
4 changes: 4 additions & 0 deletions .squad/decisions/inbox/retro-copilot-git-safety.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### 2026-03-26: Copilot git safety rules
**By:** RETRO (Security)
**What:** Added mandatory Git Safety section to copilot-instructions.md: prohibits staging the entire working tree with a bare-dot `git add` (i.e. `git add` followed by just `.`), requires feature branches and PRs, adds pre-push checklist, defines red-flag stop conditions.
**Why:** Incident #631 — @copilot used destructive staging on an incomplete working tree, deleting 361 files.
13 changes: 13 additions & 0 deletions .squad/skills/release-process/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ Squad publishes two npm packages: `@bradygaster/squad-sdk` and `@bradygaster/squ

## Rules (Non-Negotiable)

### 0. Verify `dev` and `main` Share Ancestry BEFORE Starting Any Release-Prep Work

> Source: 2026-08-13 orphaned-history incident, PR #1699. `dev`'s history was silently reset on 2026-07-13 (a dependabot bump became a brand-new root commit with zero shared history with `main`). Nothing in normal release-prep work (version bump, CHANGELOG entry, changeset consolidation, CI) surfaces this — `dev` builds and tests green the whole time because none of it touches `main`'s history. The break is invisible until the very last step: opening the `dev` → `main` promotion PR, which GitHub then reports as flatly unmergeable, with `git merge-tree` refusing outright and no reviewable diff.

**Before touching version numbers or the CHANGELOG, run:**

```bash
git merge-base upstream/dev upstream/main
```

If this returns a commit SHA (exit 0), proceed normally. **If it returns nothing (exit 1), STOP.** The promotion PR will be unmergeable no matter how clean `dev`'s own release content is — fix ancestry first via a separate `chore: restore shared ancestry` PR (merge `main` into `dev` with `--allow-unrelated-histories`; do not rebase if `dev` has a `non_fast_forward` ruleset, since rebase requires a force-push and rewrites every commit under every open PR). See `.squad/decisions/inbox/data-restore-dev-main-ancestry.md` for the full worked example and the diff-based verification technique used to prove a dev-wins conflict resolution was safe.

### 1. Coordinator Does NOT Publish

The coordinator routes work and manages agents. It does NOT run `npm publish`, trigger release workflows, or make release decisions. Brady owns the release trigger. If an agent or the coordinator is asked to publish, escalate to Brady.
Expand Down Expand Up @@ -132,6 +144,7 @@ Set this environment variable in all CI build steps to prevent the build script
| GITHUB_TOKEN can't trigger downstream workflows (v0.9.4) | squad-npm-publish.yml never fires | Manual `gh workflow run` or use PAT/GitHub App token (see below) |
| Lockfile integrity check rejects workspace packages (v0.9.4) | False failures in squad-npm-publish.yml | Only validate packages resolved from npm registry (`startsWith('https://')`) (PR #1044) |
| `prebuild` version bump breaks workspace linking (v0.9.4) | Local builds fail after bump-build.mjs runs | `git checkout -- package.json packages/*/package.json` then fresh install |
| `dev` and `main` silently drift to unrelated histories (2026-08-13) | `dev` → `main` promotion PR is flatly unmergeable, no reviewable diff | Run `git merge-base upstream/dev upstream/main` BEFORE starting release-prep; see Rule 0 above |

## v0.9.4 Incident Learnings

Expand Down
8 changes: 8 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"Artsdalen",
"Aspire",
"astro",
"astropy",
"Automator",
"Baer",
"benchmarkfn",
Expand Down Expand Up @@ -117,6 +118,7 @@
"monorepo",
"MSAL",
"MSMQ",
"mwaskom",
"myaccount",
"mycompany",
"myorg",
Expand All @@ -142,6 +144,8 @@
"PRD",
"Pruthviraj",
"Pydantic",
"pydata",
"pylint",
"pypi",
"pyproject",
"pytest",
Expand Down Expand Up @@ -180,7 +184,10 @@
"Sturtevant",
"subagent",
"subagents",
"swebench",
"swnger",
"Sympy",
"sympy",
"Tamir",
"tamirdresher",
"telemetry",
Expand Down Expand Up @@ -221,6 +228,7 @@
"Worf",
"worktree",
"worktrees",
"xarray",
"ZUAER"
],
"dictionaries": [
Expand Down
Loading