From 6473408f76c10d63c169207ec7a36d505f28f1d2 Mon Sep 17 00:00:00 2001 From: Copilot Date: Wed, 14 Oct 2026 16:43:58 +0300 Subject: [PATCH] chore(release): drain accumulated changesets and sync CHANGELOG.md through v1.0.1 Drain all 76 pending .changeset/*.md fragments on dev into CHANGELOG.md: - Sync the [1.0.1] release entry from main (#2165, #2167) - Expand [1.0.0] and [0.13.1] with pre-release changesets that shipped in those releases - Populate [Unreleased] with post-1.0.1 changesets landed on dev - Remove consumed .changeset/*.md fragment files so scripts/check-changeset-drift.mjs --mode=fail exits 0 Closes #2180 Refs #1273 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5cf0811c-a02a-41a7-ab00-904b6900db7b --- .changeset/1493-upgrade-workflow-backup.md | 5 -- .changeset/1494-templates-readme.md | 5 -- .changeset/1555-fs-storage-rootdir.md | 5 -- .changeset/1605-squad-health.md | 6 -- .../1608-team-capability-advertisement.md | 10 --- .changeset/1641-pid-tracker-identity-check.md | 5 -- .changeset/1716-structured-usage-ledger.md | 6 -- .changeset/1718-context-utilization.md | 6 -- .changeset/1947-create-if-absent.md | 13 --- .../1973-gh-aw-enlistment-credentials.md | 6 -- .changeset/2056-doctor-remote-state-dir.md | 5 -- .changeset/2079-team-roster-table-scope.md | 5 -- .changeset/2106-windows-durable-casting.md | 5 -- .changeset/2107-linked-team-root-forms.md | 10 --- .changeset/2155-heartbeat-fork-pr-labels.md | 10 --- .changeset/activation-reconciliation.md | 32 ------- .../agent-command-prompt-placeholder.md | 5 -- .changeset/agent-identity-provenance.md | 25 ------ .changeset/agentic-research-naming.md | 8 -- .changeset/align-gh-aw-compiler.md | 14 ---- .changeset/assignment-safety-attribution.md | 6 -- .changeset/automate-release-distribution.md | 6 -- .changeset/automatic-squad-bootstrap.md | 8 -- .changeset/bright-gh-aw-central-ops.md | 6 -- .changeset/built-in-audit-trail-append.md | 6 -- .changeset/calm-casts-preserve-support.md | 6 -- .changeset/casting-runtime-state.md | 6 -- .changeset/cli-health-persistent-routing.md | 5 -- .changeset/coordinator-scope-persistence.md | 6 -- .changeset/dedicated-review-app.md | 12 --- .changeset/doctor-worktree-eol-check.md | 5 -- .changeset/exact-gh-aw-enlistment-version.md | 8 -- ...fail-closed-gh-aw-resource-verification.md | 8 -- .changeset/fix-1490-watch-external-state.md | 7 -- .changeset/fix-1526-ado-legacy-url-decode.md | 5 -- .changeset/fix-bootstrap-payload-transport.md | 7 -- .changeset/fix-bootstrap-triage-continuity.md | 8 -- .../fix-reinit-stale-version-greeting.md | 6 -- .changeset/fix-router-author-binding.md | 6 -- .changeset/fix-squad-command-relay-defects.md | 10 --- .changeset/formalize-charter-profile.md | 5 -- .changeset/gh-aw-compiled-expression.md | 8 -- .changeset/gh-aw-enlistment-skill.md | 6 -- .changeset/gh-aw-ga-review-hardening.md | 83 ------------------- .changeset/gh-aw-issues-prerequisite.md | 6 -- .changeset/gh-aw-native-review-warning.md | 6 -- .changeset/gh-aw-runtime-resource-closure.md | 8 -- .changeset/harden-bootstrap-provenance.md | 8 -- .../identity-neutral-squad-templates.md | 10 --- .changeset/legacy-assignment-provenance.md | 10 --- .changeset/legacy-casting-upgrade.md | 6 -- .changeset/lucky-model-routing.md | 6 -- .changeset/lucky-moons-shake.md | 19 ----- .changeset/max-reasoning-effort.md | 5 -- .changeset/native-cast-review-contracts.md | 9 -- .../native-review-bootstrap-provenance.md | 9 -- .changeset/orphan-append-cas.md | 5 -- .changeset/portable-mcp-preserve-newlines.md | 6 -- .changeset/preserve-gh-aw-builtins.md | 12 --- .changeset/preserve-mcp-json-env.md | 9 -- .changeset/prevent-command-replay.md | 6 -- .changeset/recast-label-slugs.md | 6 -- .changeset/reject-legacy-revision-tokens.md | 5 -- .changeset/remove-mutable-gh-aw-router.md | 6 -- .changeset/reskill-template-skills.md | 8 -- .changeset/scheduler-quoted-task-ref.md | 32 ------- .changeset/scribe-archival-integrity.md | 51 ------------ .changeset/secure-gh-aw-canary.md | 6 -- .changeset/secure-native-gh-aw-package.md | 8 -- .changeset/squad-retro-auto-implement.md | 20 ----- .changeset/squad-retrospective-workflow.md | 7 -- .changeset/strict-casting-durability.md | 6 -- .changeset/strict-casting-readers.md | 5 -- .changeset/tidy-ralph-guidance.md | 6 -- .../verified-gh-aw-ownership-staging.md | 6 -- .changeset/watch-stop-signal.md | 5 -- CHANGELOG.md | 64 ++++++++++++++ 77 files changed, 64 insertions(+), 742 deletions(-) delete mode 100644 .changeset/1493-upgrade-workflow-backup.md delete mode 100644 .changeset/1494-templates-readme.md delete mode 100644 .changeset/1555-fs-storage-rootdir.md delete mode 100644 .changeset/1605-squad-health.md delete mode 100644 .changeset/1608-team-capability-advertisement.md delete mode 100644 .changeset/1641-pid-tracker-identity-check.md delete mode 100644 .changeset/1716-structured-usage-ledger.md delete mode 100644 .changeset/1718-context-utilization.md delete mode 100644 .changeset/1947-create-if-absent.md delete mode 100644 .changeset/1973-gh-aw-enlistment-credentials.md delete mode 100644 .changeset/2056-doctor-remote-state-dir.md delete mode 100644 .changeset/2079-team-roster-table-scope.md delete mode 100644 .changeset/2106-windows-durable-casting.md delete mode 100644 .changeset/2107-linked-team-root-forms.md delete mode 100644 .changeset/2155-heartbeat-fork-pr-labels.md delete mode 100644 .changeset/activation-reconciliation.md delete mode 100644 .changeset/agent-command-prompt-placeholder.md delete mode 100644 .changeset/agent-identity-provenance.md delete mode 100644 .changeset/agentic-research-naming.md delete mode 100644 .changeset/align-gh-aw-compiler.md delete mode 100644 .changeset/assignment-safety-attribution.md delete mode 100644 .changeset/automate-release-distribution.md delete mode 100644 .changeset/automatic-squad-bootstrap.md delete mode 100644 .changeset/bright-gh-aw-central-ops.md delete mode 100644 .changeset/built-in-audit-trail-append.md delete mode 100644 .changeset/calm-casts-preserve-support.md delete mode 100644 .changeset/casting-runtime-state.md delete mode 100644 .changeset/cli-health-persistent-routing.md delete mode 100644 .changeset/coordinator-scope-persistence.md delete mode 100644 .changeset/dedicated-review-app.md delete mode 100644 .changeset/doctor-worktree-eol-check.md delete mode 100644 .changeset/exact-gh-aw-enlistment-version.md delete mode 100644 .changeset/fail-closed-gh-aw-resource-verification.md delete mode 100644 .changeset/fix-1490-watch-external-state.md delete mode 100644 .changeset/fix-1526-ado-legacy-url-decode.md delete mode 100644 .changeset/fix-bootstrap-payload-transport.md delete mode 100644 .changeset/fix-bootstrap-triage-continuity.md delete mode 100644 .changeset/fix-reinit-stale-version-greeting.md delete mode 100644 .changeset/fix-router-author-binding.md delete mode 100644 .changeset/fix-squad-command-relay-defects.md delete mode 100644 .changeset/formalize-charter-profile.md delete mode 100644 .changeset/gh-aw-compiled-expression.md delete mode 100644 .changeset/gh-aw-enlistment-skill.md delete mode 100644 .changeset/gh-aw-ga-review-hardening.md delete mode 100644 .changeset/gh-aw-issues-prerequisite.md delete mode 100644 .changeset/gh-aw-native-review-warning.md delete mode 100644 .changeset/gh-aw-runtime-resource-closure.md delete mode 100644 .changeset/harden-bootstrap-provenance.md delete mode 100644 .changeset/identity-neutral-squad-templates.md delete mode 100644 .changeset/legacy-assignment-provenance.md delete mode 100644 .changeset/legacy-casting-upgrade.md delete mode 100644 .changeset/lucky-model-routing.md delete mode 100644 .changeset/lucky-moons-shake.md delete mode 100644 .changeset/max-reasoning-effort.md delete mode 100644 .changeset/native-cast-review-contracts.md delete mode 100644 .changeset/native-review-bootstrap-provenance.md delete mode 100644 .changeset/orphan-append-cas.md delete mode 100644 .changeset/portable-mcp-preserve-newlines.md delete mode 100644 .changeset/preserve-gh-aw-builtins.md delete mode 100644 .changeset/preserve-mcp-json-env.md delete mode 100644 .changeset/prevent-command-replay.md delete mode 100644 .changeset/recast-label-slugs.md delete mode 100644 .changeset/reject-legacy-revision-tokens.md delete mode 100644 .changeset/remove-mutable-gh-aw-router.md delete mode 100644 .changeset/reskill-template-skills.md delete mode 100644 .changeset/scheduler-quoted-task-ref.md delete mode 100644 .changeset/scribe-archival-integrity.md delete mode 100644 .changeset/secure-gh-aw-canary.md delete mode 100644 .changeset/secure-native-gh-aw-package.md delete mode 100644 .changeset/squad-retro-auto-implement.md delete mode 100644 .changeset/squad-retrospective-workflow.md delete mode 100644 .changeset/strict-casting-durability.md delete mode 100644 .changeset/strict-casting-readers.md delete mode 100644 .changeset/tidy-ralph-guidance.md delete mode 100644 .changeset/verified-gh-aw-ownership-staging.md delete mode 100644 .changeset/watch-stop-signal.md diff --git a/.changeset/1493-upgrade-workflow-backup.md b/.changeset/1493-upgrade-workflow-backup.md deleted file mode 100644 index 0054c6fc0..000000000 --- a/.changeset/1493-upgrade-workflow-backup.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-cli": patch ---- - -Back up locally modified workflow files before `squad upgrade` refreshes them. diff --git a/.changeset/1494-templates-readme.md b/.changeset/1494-templates-readme.md deleted file mode 100644 index 7cb20dc23..000000000 --- a/.changeset/1494-templates-readme.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-cli": patch ---- - -Add `.squad/templates/README.md` to init output explaining which files are runtime inputs vs bootstrap templates, and register the source template in the manifest. Closes #1494. diff --git a/.changeset/1555-fs-storage-rootdir.md b/.changeset/1555-fs-storage-rootdir.md deleted file mode 100644 index cfb5b49ad..000000000 --- a/.changeset/1555-fs-storage-rootdir.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -`resolveSquadState()` now constructs the local-backend `FSStorageProvider` with `rootDir` set to `paths.teamDir`, so its path-traversal guard actually validates state writes instead of no-op'ing on an unset rootDir. Also fixed `resolveSquadPaths()` treating a `config.teamRoot` of `"."` (the sentinel `squad externalize` writes) as remote mode, which pointed `teamDir` one level above `.squad/` — it now correctly falls through to local mode. Together these were breaking `squad_decide`/`squad_state_*` MCP tools on externalized projects with a "Path traversal blocked" error. diff --git a/.changeset/1605-squad-health.md b/.changeset/1605-squad-health.md deleted file mode 100644 index 2f70f7eb8..000000000 --- a/.changeset/1605-squad-health.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": minor -"@bradygaster/squad-sdk": patch ---- - -Add `squad health` readiness diagnostics and fail-fast shared workflow integration. diff --git a/.changeset/1608-team-capability-advertisement.md b/.changeset/1608-team-capability-advertisement.md deleted file mode 100644 index 65742af92..000000000 --- a/.changeset/1608-team-capability-advertisement.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Advertise the squad's real capabilities in `.github/agents/squad.agent.md` so an outer Agentic Workflows coordinator can route to it. - -A new generated `Team Capabilities` block lists the actual cast — available specialists with their roles and charter-grounded focus, supported task types, domain-to-agent routing hints, and honest capability boundaries (what the squad *cannot* do is stated explicitly, derived from the absence of evidence rather than from a wish list). The block is rewritten whenever cast composition changes: on `squad init`, on `squad upgrade`, and on casting, so recast and retired members never leave stale names behind. - -Generation is deterministic and reuses the existing roster/routing parsers and charter metadata reader rather than introducing a second routing model. All metadata is treated as untrusted data: values are sanitized against markdown table breakage, HTML/comment injection, canary and marker forgery, invisible and bidi characters, and common prompt-injection phrasings before they are embedded. diff --git a/.changeset/1641-pid-tracker-identity-check.md b/.changeset/1641-pid-tracker-identity-check.md deleted file mode 100644 index 9d09640ee..000000000 --- a/.changeset/1641-pid-tracker-identity-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-cli": patch ---- - -Watch's PID tracker now cross-checks a live process's actual OS start time against the tracked spawnedAt before killing it, instead of trusting a bare PID match. Prevents killing an unrelated process that happens to have been assigned a previously-tracked PID (e.g. after a crash + reboot). diff --git a/.changeset/1716-structured-usage-ledger.md b/.changeset/1716-structured-usage-ledger.md deleted file mode 100644 index fe046bb22..000000000 --- a/.changeset/1716-structured-usage-ledger.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch -"@bradygaster/squad-cli": patch ---- - -Persist runtime turn starts and usage events to a backend-aware JSONL ledger, report telemetry coverage, and make `squad cost` use structured data before falling back to self-reported orchestration logs. diff --git a/.changeset/1718-context-utilization.md b/.changeset/1718-context-utilization.md deleted file mode 100644 index d85f7bee7..000000000 --- a/.changeset/1718-context-utilization.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Track context-window utilization from runtime and estimated token data, publish typed events and OpenTelemetry metrics, warn interactive-shell users at a configurable threshold, and report estimated utilization from `squad watch`. diff --git a/.changeset/1947-create-if-absent.md b/.changeset/1947-create-if-absent.md deleted file mode 100644 index 922235d31..000000000 --- a/.changeset/1947-create-if-absent.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@bradygaster/squad-sdk": minor -"@bradygaster/squad-cli": minor ---- - -Add atomic repository-scoped `createIfAbsent` operation to all state backends (local, git-notes, orphan-branch, two-layer), `StorageProvider` (FSStorageProvider, InMemoryStorageProvider, SQLiteStorageProvider), `StateBackendStorageAdapter`, and `ToolRegistry`/state-mcp MCP surface (`squad_state_create_if_absent`). - -- Exactly one concurrent creator succeeds; all others receive `StateKeyConflictError` -- Existing content is never overwritten -- Two-layer backend is fail-closed for disagreement/failure between layers -- New typed errors: `StateKeyConflictError`, `StateBackendUncertaintyError` (exported from `@bradygaster/squad-sdk`) -- Local backend uses O_CREAT|O_EXCL (filesystem exclusive creation); git-native backends use CAS loops -- MCP tool `squad_state_create_if_absent` appears in `tools/list` with `conflict`/`uncertainty` failure types diff --git a/.changeset/1973-gh-aw-enlistment-credentials.md b/.changeset/1973-gh-aw-enlistment-credentials.md deleted file mode 100644 index 0ea4b6351..000000000 --- a/.changeset/1973-gh-aw-enlistment-credentials.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Correct the `gh-aw-enlistment` skill's first-install guidance: `SQUAD_GITHUB_APP_PRIVATE_KEY` and `SQUAD_GITHUB_TOKEN` are names `gh aw add` reports as *referenced* for approval, not prerequisites. Neither secret needs to exist, and single-repo activation runs on the built-in `github.token`. The scaffolded skill previously listed them as a bare setup-time item, which led readers to conclude a PAT was required to enlist a repository. diff --git a/.changeset/2056-doctor-remote-state-dir.md b/.changeset/2056-doctor-remote-state-dir.md deleted file mode 100644 index b51d87519..000000000 --- a/.changeset/2056-doctor-remote-state-dir.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-cli": patch ---- - -`squad doctor` now validates team state files (`team.md`, `routing.md`, `agents/`, `casting/registry.json`, `decisions.md`) against the resolved team root in remote (linked) mode instead of the local `.squad/` stub, which only holds `config.json`. Previously this caused false "file not found" failures for correctly configured `squad link` setups even though `squad status` and `squad cast` resolved the team fine. Fixes #2056. diff --git a/.changeset/2079-team-roster-table-scope.md b/.changeset/2079-team-roster-table-scope.md deleted file mode 100644 index bb471411a..000000000 --- a/.changeset/2079-team-roster-table-scope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -Limit team markdown table parsing to supported roster sections, preserving the legacy Team Roster heading while excluding auxiliary tables. diff --git a/.changeset/2106-windows-durable-casting.md b/.changeset/2106-windows-durable-casting.md deleted file mode 100644 index 2b99df228..000000000 --- a/.changeset/2106-windows-durable-casting.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -Fix `squad init` and team casting failing on Windows with `EPERM: operation not permitted, fsync`. The durable casting registry fsynced directory handles after each rename, which Windows rejects; directory flushes are now skipped on `win32`, where the file-level fsync is the only flush available. Also fixed the casting writer lock crashing with `EPERM ... rename` instead of waiting when another process already holds it on Windows, which reports a rename onto an existing directory as `EPERM` rather than POSIX `ENOTEMPTY`/`EEXIST`. Lock timeouts now name the last publish error, and releasing the lock retries briefly when Windows transiently rejects the directory rename (e.g. antivirus holding a freshly written file), instead of leaving a recovery guard that blocks later casting writers. If Windows still blocks deleting the released lock copy, release succeeds and a later release sweeps the leftover out of `.squad/casting/`. diff --git a/.changeset/2107-linked-team-root-forms.md b/.changeset/2107-linked-team-root-forms.md deleted file mode 100644 index 770a00388..000000000 --- a/.changeset/2107-linked-team-root-forms.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@bradygaster/squad-sdk": minor -"@bradygaster/squad-cli": patch ---- - -Linked teams now work with either `teamRoot` form: the team repository (what `squad link` writes) or the team's `.squad/` directory (what the docs show). `resolveSquadPaths()` adds `teamSquadDir`, the team's squad directory for both forms, and `resolveSquadState()` roots local-backend storage there. `squad loop`/`watch`, `squad cast`, and the state MCP server read team state from `teamSquadDir`, so `squad loop` no longer reports "No squad found" for the docs form, and `squad_decide` no longer writes decisions outside `.squad/` for the `squad link` form. Closes #2107. - -`teamSquadDir` is a required field on the exported `ResolvedSquadPaths` type, so code that constructs that type must now set it. `@bradygaster/squad-sdk/tools` also exports `MUTABLE_STATE_PATHS` and `isMutableStateKey()`, the list of state paths that the state tools can write. - -If you linked a team with `squad link`: state that the state MCP server wrote to the team repo root (`decisions.md`, `decisions/inbox/`, `casting/policy.json`, `agents/*/history.md`, `log/`, `orchestration-log/`, `sessions/`, `.scratch/`, `identity/`) now belongs in `/.squad/`. Squad does not move it. Run `squad doctor` to find leftovers. It lists the `.md` and `.json` files to move to the same relative path under `/.squad/` (for example `/identity/now.md` to `/.squad/identity/now.md`), and the files that already exist there, which you must merge by hand without overwriting the newer state. Do not replace the existing `/.squad/` directories. Skills that `squad_skill` wrote went to `.github/skills/` in the folder that contains the team repo; move any you want to keep to `/.github/skills/`. Doctor does not check that folder. diff --git a/.changeset/2155-heartbeat-fork-pr-labels.md b/.changeset/2155-heartbeat-fork-pr-labels.md deleted file mode 100644 index c67c00ece..000000000 --- a/.changeset/2155-heartbeat-fork-pr-labels.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Fix `squad-heartbeat.yml`'s "Repair orphaned squad labels" step 403ing when a fork PR closes. - -`GITHUB_TOKEN` is forced read-only for `pull_request`-triggered workflow runs originating from a fork, regardless of the workflow's declared `permissions:` block, so `issues.addLabels` was rejected with `403 Resource not accessible by integration`. The trigger is switched to `pull_request_target` across all 5 synced copies (`.github/workflows/`, `templates/workflows/`, `packages/squad-cli/templates/workflows/`, `packages/squad-sdk/templates/workflows/`, `.squad-templates/workflows/`), which runs with base-repo token permissions regardless of fork origin. - -This is safe because the `actions/checkout` step never overrides `ref:` (always checks out the base ref, never the fork head), and no step reads or executes anything from the triggering PR's content. diff --git a/.changeset/activation-reconciliation.md b/.changeset/activation-reconciliation.md deleted file mode 100644 index bfe3d6255..000000000 --- a/.changeset/activation-reconciliation.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -Validate real numeric task and epic issue references and add an explicit activation -reader for independently verified current-state-authorized reconciliations. -Preserve valid legacy activation records while rejecting ambiguous, malformed, -or unverified replacements without rewriting historical acceptance. -Require exactly one matching verifier evidence record and bind any selected -phase scope to its canonical, independently verified phase IDs. -Require activation-source phases to exactly match verifier evidence, rejecting -internally inconsistent caller-supplied evidence without changing verifier trust. -Reject malformed legacy phase scopes with non-positive, unsafe, nonnumeric, or -duplicate phase IDs consistently with the packaged activation checker. -Allow a verifier-supplied full frozen-plan assignment context to validate complete -epic identity sets across phase subsets; retain strict exact-row validation when -that independent context is absent. -Normalize verifier and producer display names consistently with trim/lowercase -while retaining exact stable agent identity checks. -Reject task issues that collide with the origin or any epic issue, and prevent -non-origin epics from reusing the origin issue. -Support explicit verifier-authorized pending-source reconciliation with matching -capture metadata, frozen plan and registry digests, and phase scope. Pending -reservations and their prior references never authorize activation on their own. -Select complete transitive phase histories only when every reconciliation has an -independent verifier proof and exact source links form one fully consumed chain -with consistent frozen snapshots, expanding phases, and preserved prior mappings. -Ignore unrelated discussion in scoped pairs and complete histories while retaining -rejection of extra activation or pending candidates and ambiguous chains. -Require a nonempty, strictly shorter positional phase prefix across ancestors; -reject whole-plan phase expansion and explicitly selected phases absent from the -frozen plan without requiring consecutive phase IDs. diff --git a/.changeset/agent-command-prompt-placeholder.md b/.changeset/agent-command-prompt-placeholder.md deleted file mode 100644 index 92db65971..000000000 --- a/.changeset/agent-command-prompt-placeholder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bradygaster/squad-cli': patch ---- - -Allow custom watch and loop agent commands to place the generated prompt with one standalone `{prompt}` token while preserving the existing `-p ` fallback. diff --git a/.changeset/agent-identity-provenance.md b/.changeset/agent-identity-provenance.md deleted file mode 100644 index e0780c062..000000000 --- a/.changeset/agent-identity-provenance.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -"@bradygaster/squad-sdk": minor -"@bradygaster/squad-cli": minor ---- - -Publish and validate a versioned producer-owned agent identity provenance -contract with stable IDs, rename preservation, retirement tombstones, and -optional repository avatar references. Activation artifacts now carry a -versioned repository-scoped work-to-agent binding linked to the exact registry -revision, with explicit fail-closed omission, cross-row reconciliation, and -stale-data semantics. Preset and CLI Cast registry updates now share an -ABA-safe directory lock, and registry/history publication uses a durable -manifest-backed roll-forward transaction plus a consistency-aware pair reader. -Interrupted post-journal commits never roll back, while abandoned same-host -locks recover only after the owner PID is definitively dead. Init and upgrade -now create or migrate the same durable pair under that shared protocol, all -production exporters and health readers reject split generations, legacy pairs -migrate without an ABA window, and CLI Cast validates every casting input -before its first filesystem mutation. Preset rollback now uses byte-identical -compare-and-swap guards so concurrent external file and tree changes survive, -and uncertain journal removal or directory fsync is reported as commit-in-doubt -instead of success. These protocols provide process-crash consistency on -filesystems with local atomic rename; power-loss durability additionally -depends on successful file and parent directory fsync and the underlying -platform and filesystem semantics. diff --git a/.changeset/agentic-research-naming.md b/.changeset/agentic-research-naming.md deleted file mode 100644 index 86685fbe7..000000000 --- a/.changeset/agentic-research-naming.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Update bundled enlistment guidance for repository-scoped Agentic Research -bootstrap proposal titles, including compatible legacy-title recognition and -the required package-update-before-rename order. diff --git a/.changeset/align-gh-aw-compiler.md b/.changeset/align-gh-aw-compiler.md deleted file mode 100644 index dff2d7ae3..000000000 --- a/.changeset/align-gh-aw-compiler.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Align native Squad workflow installation and bundled enlistment guidance with -the exact gh-aw v0.91.5 compiler, preserving strict package ownership and -integrity verification. Support an explicit schedule seed for integrations. -Review the compiler-required Bootstrap conclusion read permissions before -installing the upgrade in a consumer repository. - -Verify a separately compiled full-lock digest when an adopter explicitly sets -24-hour failure-report retention, while retaining the 168-hour standalone -default. Bind activation App tokens to the full current repository identity. diff --git a/.changeset/assignment-safety-attribution.md b/.changeset/assignment-safety-attribution.md deleted file mode 100644 index a90d9ca73..000000000 --- a/.changeset/assignment-safety-attribution.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Make issue-assign the sole Copilot assignment workflow, fail visibly on missing tokens or unconfirmed API responses, dispatch automated auto-assign handoffs explicitly, and disclose deterministic keyword triage provenance without attributing it to Lead-agent analysis. diff --git a/.changeset/automate-release-distribution.md b/.changeset/automate-release-distribution.md deleted file mode 100644 index 364a9d580..000000000 --- a/.changeset/automate-release-distribution.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@bradygaster/squad-cli': patch -'@bradygaster/squad-sdk': patch ---- - -Automate insider, preview, and stable distribution through npm, standalone archives, Homebrew, and WinGet, and update the packaged release guidance. diff --git a/.changeset/automatic-squad-bootstrap.md b/.changeset/automatic-squad-bootstrap.md deleted file mode 100644 index c8a0dba5a..000000000 --- a/.changeset/automatic-squad-bootstrap.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": minor -"@bradygaster/squad-sdk": minor ---- - -Install a dedicated seventh Agentic Workflow that automatically creates one -validated draft Cast pull request and one linked research-proposals issue after -the workflow installation lands on the repository's default branch. diff --git a/.changeset/bright-gh-aw-central-ops.md b/.changeset/bright-gh-aw-central-ops.md deleted file mode 100644 index 2c558f44e..000000000 --- a/.changeset/bright-gh-aw-central-ops.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Require gh-aw v0.89.22 across the Squad workflow package, enlistment guidance, integrity contract, CI, and hosted E2E controller for central agentic ops compatibility. Validate isolated bootstrap candidates against the trusted checkout's Git history and create the candidate payload parent before writing so materialization can create the Cast PR and research issue. diff --git a/.changeset/built-in-audit-trail-append.md b/.changeset/built-in-audit-trail-append.md deleted file mode 100644 index 54f22accd..000000000 --- a/.changeset/built-in-audit-trail-append.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch -"@bradygaster/squad-cli": patch ---- - -Allow state tools to append evidence to the exact Rai and Fact Checker audit-trail keys while rejecting writes and deletes. Reconcile built-in scaffold charters with the append-only evidence contract. diff --git a/.changeset/calm-casts-preserve-support.md b/.changeset/calm-casts-preserve-support.md deleted file mode 100644 index 52381f250..000000000 --- a/.changeset/calm-casts-preserve-support.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Keep built-in support identities and their canonical charters out of the routable cast roster, preserve the disabled Coding Agent section, and stop recreating retired per-agent history files during casts. diff --git a/.changeset/casting-runtime-state.md b/.changeset/casting-runtime-state.md deleted file mode 100644 index 59383688d..000000000 --- a/.changeset/casting-runtime-state.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@bradygaster/squad-cli': patch -'@bradygaster/squad-sdk': patch ---- - -Allow the casting policy, registry, and history to be persisted through runtime state tools. diff --git a/.changeset/cli-health-persistent-routing.md b/.changeset/cli-health-persistent-routing.md deleted file mode 100644 index a36843720..000000000 --- a/.changeset/cli-health-persistent-routing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-cli": patch ---- - -Accept casting registry persistent names as valid CLI health routing references. diff --git a/.changeset/coordinator-scope-persistence.md b/.changeset/coordinator-scope-persistence.md deleted file mode 100644 index 3b673e1d0..000000000 --- a/.changeset/coordinator-scope-persistence.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Require coordinators to preserve user-approved scope and prevent directive or reflection capture from falling back to local Markdown proposals. diff --git a/.changeset/dedicated-review-app.md b/.changeset/dedicated-review-app.md deleted file mode 100644 index 7e4d48814..000000000 --- a/.changeset/dedicated-review-app.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Use the base-controlled deterministic relay's native `Squad Review / review` -job as the authoritative review result only when it validates the exact trusted -automatic workflow run. Authoritative merge enforcement requires a source-bound -required-workflow or equivalent ruleset; where that is unavailable, the context -is advisory and an independent human approving review remains required. This -path needs no separately provisioned reviewer App, token, private key, secret, -environment, or custom Checks API publisher. diff --git a/.changeset/doctor-worktree-eol-check.md b/.changeset/doctor-worktree-eol-check.md deleted file mode 100644 index f3c6e3aad..000000000 --- a/.changeset/doctor-worktree-eol-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bradygaster/squad-cli': patch ---- - -`squad doctor` now checks that every file pinned to `eol=lf` by `.gitattributes` is actually LF **on disk**, not just in the index. `.gitattributes` governs checkout, so adding an `eol=lf` rule never repairs a working tree that already exists — the affected files stay CRLF indefinitely, and a CRLF shebang makes a vitest suite load zero tests while still looking green. The check names the stale files and points at `npm run fix:crlf`, a new repair script that rewrites them from the index and refuses to overwrite any file with uncommitted changes. Closes #1793. diff --git a/.changeset/exact-gh-aw-enlistment-version.md b/.changeset/exact-gh-aw-enlistment-version.md deleted file mode 100644 index a2450cd22..000000000 --- a/.changeset/exact-gh-aw-enlistment-version.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Make public Squad gh-aw enlistment prove exact compiler version `v0.89.22`, -cleanly reinstall the pinned extension on mismatch, and stop before generating -repository artifacts when the supported version cannot be verified. diff --git a/.changeset/fail-closed-gh-aw-resource-verification.md b/.changeset/fail-closed-gh-aw-resource-verification.md deleted file mode 100644 index fe1ae8aa5..000000000 --- a/.changeset/fail-closed-gh-aw-resource-verification.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Verify installed workflow resources against their trusted installer source binding, -revision, ownership provenance, and canonical digest while preserving exact-byte -verification for shared runtime and skill resources. diff --git a/.changeset/fix-1490-watch-external-state.md b/.changeset/fix-1490-watch-external-state.md deleted file mode 100644 index 41ae40835..000000000 --- a/.changeset/fix-1490-watch-external-state.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@bradygaster/squad-cli": patch ---- - -Fix #1490: `squad watch` and `squad loop` resolved externalized state for their startup reads only — every capability was then handed `teamRoot` and built `.squad/` paths from it directly, so after `squad externalize` the local `.squad/` is a marker-only stub and decision-hygiene, cleanup, retro, subsquad discovery, the `capabilities/` loader, and the ralph-instructions.md check all silently saw an empty directory. - -Added `stateRoot` to `WatchContext`, populated from `effectiveSquadDir().stateDir` in both `runWatch` and `runLoop`, and routed every capability's state reads/writes through it instead of joining `.squad/` onto `teamRoot`. `loadExternalCapabilities()` and `buildAgentPrompt()` gained an optional override parameter rather than changing their existing (well-tested) `{teamRoot}/.squad/...` default, so every prior caller and test keeps working unchanged. `notes-promote.ts` needed no change — it only reads the always-local `config.json` for backend-type detection; the two-layer backend's actual state is git-notes/orphan-branch, not filesystem, so externalization doesn't touch it. diff --git a/.changeset/fix-1526-ado-legacy-url-decode.md b/.changeset/fix-1526-ado-legacy-url-decode.md deleted file mode 100644 index 03393bdc1..000000000 --- a/.changeset/fix-1526-ado-legacy-url-decode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -Fix #1526: `parseAzureDevOpsRemote()` didn't decode percent-encoded characters in the org/project/repo segments it pulled out of a git remote URL. A legacy `visualstudio.com` remote with a space in the project name (`.../Pref%20Proj/_git/...`) came out as `Pref%20Proj`, and every `az` CLI call built from that (`az repos pr list --project Pref%20Proj ...`) failed since `az` doesn't decode its own arguments. Added a `decodeSegment()` helper and applied it to all three URL formats (`dev.azure.com`, SSH, and legacy `visualstudio.com`), not just the one from the repro, since the same bug affects any of them. diff --git a/.changeset/fix-bootstrap-payload-transport.md b/.changeset/fix-bootstrap-payload-transport.md deleted file mode 100644 index 2c7df7380..000000000 --- a/.changeset/fix-bootstrap-payload-transport.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Transport automatic bootstrap Cast and research payloads through bounded, -integrity-checked chunks so large validated payloads reach the typed writer. diff --git a/.changeset/fix-bootstrap-triage-continuity.md b/.changeset/fix-bootstrap-triage-continuity.md deleted file mode 100644 index 3d30caac5..000000000 --- a/.changeset/fix-bootstrap-triage-continuity.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Keep automatic bootstrap limited to the Cast PR and linked proposals issue; -publish research only on explicit `/squad research` before triage. Recognize -the deterministic bootstrap Cast branch during team-required command gating. diff --git a/.changeset/fix-reinit-stale-version-greeting.md b/.changeset/fix-reinit-stale-version-greeting.md deleted file mode 100644 index 9ba1f5550..000000000 --- a/.changeset/fix-reinit-stale-version-greeting.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Fix `squad init` re-run on an existing project leaving the `squad.agent.md` first-response greeting (`` `Squad v...` ``) stamped with a stale version even though the HTML comment marker and Identity `Version:` line were correctly refreshed. The greeting regex previously only matched the unresolved `{version}` placeholder, so once a real version had been stamped once, later re-stamps could no longer update it. Both `stampVersion` (squad-cli) and `stampVersionInContent` (squad-sdk) now also match an already-resolved valid SemVer literal, while leaving unrelated backticked `Squad v...` text untouched, making all three version locations safely and idempotently updatable on every re-init or upgrade. diff --git a/.changeset/fix-router-author-binding.md b/.changeset/fix-router-author-binding.md deleted file mode 100644 index e311e5382..000000000 --- a/.changeset/fix-router-author-binding.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Bind mutating `/squad` command authorization to both the event actor and the author of the classified issue or comment text, preventing privileged edits from dispatching commands authored by an unprivileged user. diff --git a/.changeset/fix-squad-command-relay-defects.md b/.changeset/fix-squad-command-relay-defects.md deleted file mode 100644 index 94a649bf5..000000000 --- a/.changeset/fix-squad-command-relay-defects.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Fixed three command-routing defects where a `/squad` command relayed by `squad-command-router.md` via `workflow_dispatch` (instead of arriving as a direct issue comment) could be silently dropped or mis-authorized: - -- The lifecycle-repair fallback in the shared `squad.md` coordinator only recognized exact, `/squad`-prefixed issue-comment bodies. A command normalized and relayed by the router (e.g. the bare `activate` dispatch input for a `/squad activate` comment) no longer matched, so terminal activation states went unrepaired. Repair gating and the effective command are now derived the same way for both the `issue_comment` and `workflow_dispatch` event paths. -- `squad-command-router.md` was missing `roles: all`, so gh-aw's default write-role activation gate blocked the router from even running for non-write actors — including modes the router intentionally allows anyone to invoke (e.g. `status`). The router now declares `roles: all` and continues to enforce its own in-script, per-command authorization for mutating modes. -- The router's relayed dispatch dropped the originating issue/comment context, so an embedded `/squad approve-improvement` command could never supply a real `approval_comment_id` and was rejected outright. The router now forwards an `aw_context` pointer (item type/number and originating comment id) through the dispatch, and the improvement-approval gate validates permission against that comment's own live author — never the dispatch actor — so approval binding is unchanged, not weakened. diff --git a/.changeset/formalize-charter-profile.md b/.changeset/formalize-charter-profile.md deleted file mode 100644 index 0e0de8705..000000000 --- a/.changeset/formalize-charter-profile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bradygaster/squad-sdk': minor ---- - -Add the draft `squad-charter/v0.1` artifact profile, explicit conformance profile selection, validation-before-runtime compilation, typed diagnostics and operation-exact capability metadata, canonical and lossless extension-preserving serialization, a schema-defined language-neutral conformance manifest with complete diagnostic coverage, and implementation-independent specification documents. diff --git a/.changeset/gh-aw-compiled-expression.md b/.changeset/gh-aw-compiled-expression.md deleted file mode 100644 index 709d203a9..000000000 --- a/.changeset/gh-aw-compiled-expression.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Keep the installed Squad agentic workflow valid at GitHub runtime by avoiding -JSON-escaped operators inside compiled expressions, and add an emitted-lock -verification gate to the enlistment guidance. diff --git a/.changeset/gh-aw-enlistment-skill.md b/.changeset/gh-aw-enlistment-skill.md deleted file mode 100644 index de2363637..000000000 --- a/.changeset/gh-aw-enlistment-skill.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Add the `gh-aw-enlistment` skill: an operationalized, safety-gated guide for enlisting a repository into Squad via GitHub Agentic Workflows (`gh aw`). It walks the supported install → strict-compile → validate → bootstrap-PR path, enforces an explicit safe-update allowlist (only the documented Squad secrets and `squad-init` action), keeps the default workflow token read-only, stages only documented surfaces, and never auto-merges. diff --git a/.changeset/gh-aw-ga-review-hardening.md b/.changeset/gh-aw-ga-review-hardening.md deleted file mode 100644 index b8920c0e3..000000000 --- a/.changeset/gh-aw-ga-review-hardening.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Hardened the Squad GH-AW (GitHub Agentic Workflows) source contract against nine confirmed GA-review findings: - -- **`squad-improvement-gate.mjs`**: closed a test-coverage gap for rejecting a content-only modification of an already-tracked executable (`100755`) Markdown improvement target (the production `ALLOWED_FILE_MODE` guard was already correct; added realistic Git-mode regression/mutation tests). -- **`squad_approval_relay` contract**: made the `squad.md` → `squad-improvement-worker.md`/gate producer/receiver contract for the approval relay payload unambiguous as a JSON string end-to-end, preserving the distinct `squad_approval_relay` input name (gh-aw overwrites `aw_context`). Added compiled assertion/mutation coverage. -- **`squad-review-guard.mjs`**: confirmed and regression-tested that unauthorized/malformed override markers are rejected by authorized-admin-human filtering *before* cardinality/record parsing, so a malformed authorized record still fails closed and an unauthorized marker can never be counted. -- **`squad-planning-ontology.md`**: normalized the result-line template from `Result: ✅ PASS` to the exact `RESULT: PASS` string required by downstream parsers. -- **`squad-install-verifier.mjs`**: confirmed `verifyInstalledBytes()` normalizes only the one documented injected `source:` ownership-binding line before hashing, and fails closed on any other tamper; existing mutation-test table already covers this. -- **Numeric identity canonicalization**: numeric issue/comment IDs arriving via `issue_comment` are canonicalized to safe-integer strings before comparison against `workflow_dispatch` string inputs, with invalid forms rejected; covered by direct and relayed regression/mutation tests. -- **`squad-command-router.md`**: blocked replay of bot-authored standalone `/squad` issue/comment text while preserving trusted `workflow_dispatch` continuation and documented bot command behavior, covering both `created` and `edited` events. -- **`can_approve_pull_request_reviews`**: proved from gh-aw source that this is a single combined toggle gating both `GITHUB_TOKEN` PR creation *and* PR-review approval — it cannot be split via job-level `permissions:`. Per least-privilege policy (no weakened independent-human review gate), flipped to `false` across all public/enlistment/setup copies and added a fallback-to-issue mechanism (with a manual compare-URL link) to `squad-bootstrap.md` for when the push succeeds but the PR cannot be opened. -- **Mutable installation channel**: eliminated resolution of a mutable `commits/dev` ref for GA installs; setup now requires an explicit, pre-validated 40-character `SQUAD_SHA`, synchronized across public/enlistment docs and skill mirrors, while exact-SHA fixture testing remains unaffected. - -Also redesigned the `can_approve_pull_request_reviews: false` bootstrap-PR fallback (surfaced by hosted-agent auto-review as a dead end: a plain compare-URL issue could never satisfy the bot-authorship-gated review contract) into a trusted signed-provenance-record path: the bootstrap run stamps a machine-readable provenance line (repo/run/base branch/head branch/head SHA/compare URL) into the fallback issue, and `squad-review-guard.mjs` validates a human-opened Cast PR against that record end-to-end — including bootstrap-run success — before granting the same base-controlled roles as the bot-authored path, with forged/unrelated/malformed records still failing closed. - -No stable release is published by this change. Real (non-mocked) `gh aw compile --strict` against the canonical `workflows/*.md` sources continues to produce exactly the two documented warnings (`pull_request_target` advisory on `squad-review.md`, bot-trigger advisory on `squad.md`). - -### Follow-up: bootstrap-PR-fallback trust hardening (auto-review on commit `9b45d116`) - -- **`squad-bootstrap-validator.mjs`** (`findExistingBootstrapPrFallbackIssue`): a fallback-issue dedupe/ambiguity check previously counted any open issue matching only the plain, unsigned marker substring — any repo participant able to open an issue could post a decoy to suppress the real fallback issue or manufacture an "ambiguous" error. Candidates are now filtered to bot-authored, correctly titled, valid-provenance issues *before* counting/matching. Added forgery-regression tests proving a decoy issue can neither suppress real fallback-issue creation nor manufacture ambiguity. -- **`squad-review-guard.mjs`** (`validateBootstrapPrFallbackAttribution`): the fallback trust path bound a provenance record's `run_id` only to a historical successful run on the same *base-branch name*, unlike the bot-authored path, which also requires `run.head_sha === pr.base.sha`. Added the equivalent binding so a fallback issue can no longer cite an unrelated historical run on the same branch. -- **`scripts/gh-aw-hosted-e2e.mjs`** (`selectBootstrapFallback`): the hosted E2E only matched a plain-text branch marker and a compare-URL substring, not the full signed provenance record production actually requires — a hosted run could report success for a fallback issue production would reject. Added an independently-written `parseBootstrapPrFallbackProvenance` (not imported from the module under test) and rewired `selectBootstrapFallback` to exact-match the full record against an independently-rebuilt expectation, removing the now-redundant plain-text substring check. -- **`squad-command-router.md`**: added direct test coverage (populating `user.type`/`payload.sender.type`, previously never exercised by any fixture) proving the existing bot-authorship block is reachable and enforced for both `created` and `edited` events, with mutation-kill tests for both the author-type and sender-type halves of the check. - -Also updated `docs/src/content/docs/guide/gh-aw.md`, `.github/agents.md`, `README.md` (removed a stale, contradictory `@dev`-tracking note left over from before the explicit-`SQUAD_SHA` policy), and all five synchronized copies of `skills/gh-aw-enlistment/SKILL.md` to describe the fallback-issue-first Cast PR flow instead of an unconditionally automatic one. - -A second hosted-review pass on this same commit flagged two remaining stale passages the first doc pass missed: the `skills/gh-aw-enlistment/SKILL.md` anti-pattern list still said "automatic Cast PR" unconditionally, and the `docs/src/content/docs/guide/gh-aw.md` activation-canary/automatic-bootstrap checklist rows still described only the unconditional-automatic case (including when the linked research-proposals issue is created). Both are now corrected to cover the manual-fallback path and its provenance requirement. - - -### Follow-up: fresh Copilot review on commit `3bf5c01f` (7 findings) - -- **Medium — edited-fallback-issue dedupe bug** (`squad-bootstrap-validator.mjs`, `findExistingBootstrapPrFallbackIssue`): dedupe matching accepted a fallback issue whose body had been edited after creation, even though `validateBootstrapPrFallbackAttribution` would reject that same edited issue at review time — a human editing the bot-authored issue (even to fix a typo) silently stalled the manual-recovery path with no new usable issue ever created. Candidates are now also required to have `created_at`/`updated_at` present and equal, mirroring the reviewer's unedited-issue requirement exactly. Added regression coverage for the edited-issue case and the missing-timestamp case. -- **E2E selector lifecycle gap** (`scripts/gh-aw-hosted-e2e.mjs`, `selectBootstrapFallback`): the hosted E2E's independent selector didn't mirror the open-state or unedited-timestamp checks the production validator enforces, so a hosted run could report success against a closed or edited fallback issue that production would reject. Added the same `state === 'open'` and unedited-timestamp checks, plus regression tests for both rejections. -- **Authorization accepted non-Bot, non-User account types** (`squad-review-guard.mjs`, `validateBootstrapPrFallbackAttribution`): the fallback-path PR-author check only excluded accounts literally typed `Bot`, so an `Organization`- or `Mannequin`-typed account (neither a human `User` nor an auditable `Bot`) could pass authorship. Tightened to require `pr.user?.type === 'User'`. The adjacent dispatch-router condition (which only decides *which* validator function to call, not whether it passes) was deliberately left unchanged, since the actual enforcement now lives entirely inside the called function and changing the router risks misrouting legitimately bot-authored ordinary PRs to the wrong validator. Added a regression test using an `Organization`-typed author. -- **Uncached collaborator-permission lookups** (`squad-review-guard.mjs`, `assertClearingReview`): the override-authorization loop issued one `collaborators/{login}/permission` API call per tagged comment, so a thread with many comments from the same admin (including decoys with a non-matching `head_sha`) multiplied API calls with no behavioral benefit. Added a per-login cache for the duration of a single evaluation. Added a regression test asserting exactly one permission call for two same-login comments. -- **Missing numeric-normalization/malformed-input test coverage** (`squad-improvement-gate.mjs`, `sameNumericId`): the top-level `SQUAD_IMPROVE_ISSUE_NUMBER`/`SQUAD_IMPROVE_APPROVAL_COMMENT_ID` env-string inputs already had malformed-input coverage, but the nested JSON-context fields (`origin.item_number`/`relay.item_number`) that also flow through `sameNumericId` did not. Production (`NUMERIC_ID = /^[1-9][0-9]*$/` plus a safe-integer bound) was already correct; this was a test-only gap. Added native-number cross-type-normalization proofs and `it.each` malformed/overflow-rejection tables for both the direct and relay-forwarded paths. -- **Missing exact-`RESULT:`-template test coverage** (`squad-planning-ontology.md`): production's "### 3.6 Validation Result" section already documents the exact `RESULT: ` marker required by downstream parsers (no stale `Result: ✅ PASS` text remained); this was a test-only gap. Added a regression test pinning the exact template text and rejecting the stale form. -- **Fallback workflow lacked guidance after opening the compare PR** (`squad-bootstrap-validator.mjs`, `buildBootstrapPrFallbackIssueBody`): no GitHub event re-triggers `squad-bootstrap` the moment a human opens the fallback compare-URL PR — the next automatic run only fires on a push to squad-related paths on the default branch (i.e. at merge time) — so the linked research-proposals issue did not exist until merge. **Classification**: adding an automatic `pull_request`/`pull_request_target` trigger was considered and proven unacceptable by actual gh-aw/GitHub semantics — `gh aw compile --strict` hard-fails a `pull_request_target` trigger without an explicit safe-checkout override, and even with `checkout: false` (the same pattern already used by `squad-review.md`) it adds a second occurrence of the `pull_request_target` advisory warning, which would break the documented "exactly two compile warnings" contract. A manual `workflow_dispatch` re-run while the PR is still open is already fully sufficient by design (`classifyBootstrapState` recognizes an open, unmerged, matching PR and proceeds straight to `create_issue` — no merge required), so the actual gap was a missing instruction, not a missing trigger. The bot-authored fallback issue body now explicitly tells the human to manually re-run the workflow if they want the research issue before merging, and `skills/gh-aw-enlistment/SKILL.md` (canonical + 4 synced copies) now documents the same timing precisely. Added a regression test pinning the new instruction text and its position in the issue body; confirmed via a scratch `gh aw compile --strict` run that no new trigger or warning was introduced. - -### Follow-up: fresh Copilot review on commit `1a9c4081` (3 findings, bootstrap-fallback dedupe/attribution) - -- **Stale fallback-issue silently reused after the default branch advanced** (`squad-bootstrap-validator.mjs`, `findExistingBootstrapPrFallbackIssue`): the provenance record bound a fallback issue to a `run_id`/`head_sha` pair but never to the *base* commit the run executed against, so once the default branch moved forward, an old fallback issue (and its now-outdated compare link) kept matching and being reused forever instead of a fresh, correctly-based issue being filed. **Fix**: added a `base_sha` field to the provenance schema, populated from `context.sha` at the `squad-bootstrap.md` call site. **Proof this needs no new API call**: `squad-bootstrap.md` only reaches this code path behind its own top-level `if: github.ref_name == github.event.repository.default_branch` gate, so `context.sha` is guaranteed to already equal the default branch's exact current commit for every valid invocation — no extra lookup is required. Stale records (an open, correctly-titled, otherwise-valid issue whose embedded `base_sha` no longer matches) are now excluded from dedupe matching, causing a fresh issue to be filed rather than reusing a stale one. **Deliberate non-bump of `schema`**: the provenance `schema` version field is intentionally left at `1` despite this breaking field addition, because an old-format record (missing `base_sha`) now fails `parseBootstrapPrFallbackProvenance` entirely and is treated as unmatched — a safe fail-closed outcome (a fresh issue gets created) rather than a silent compatibility shim. Added regression coverage in `scripts/gh-aw-hosted-e2e.mjs` (`selectBootstrapFallback`'s independently-rebuilt expectation) and `test/gh-aw-bootstrap-workflow.test.ts`'s `findExistingBootstrapPrFallbackIssue` unit tests: a stale-`base_sha` issue returns unmatched (not ambiguous), and malformed/missing `expectedProvenance` arguments throw rather than silently matching anything. -- **Fallback review path never validated the Cast PR title** (`squad-review-guard.mjs`, `validateBootstrapPrFallbackAttribution`): the bot-authored (non-fallback) review path has always required the PR title to be the canonical `[squad] Cast your Squad`, but the human-opened fallback path never checked the title at all — any PR body carrying a forged-but-otherwise-valid provenance record would be granted the same trust regardless of title. Added the equivalent canonical-title check to the fallback path, closing the asymmetry. This also exposed a latent test-fixture bug: `test/gh-aw-review-guard.test.ts`'s `makeBootstrapPrFallback` happy-path default had been using a non-canonical placeholder title (`'Manually opened Cast PR'`) that only ever "worked" because production didn't check it yet — fixed to the canonical title (which the compare-URL link pre-fills in practice), with a new dedicated test asserting a non-canonical title is rejected even when a matching fallback issue exists. -- **Success notification assumed both a Cast PR and a research issue always exist** (`squad-bootstrap.md`): the run-success message was worded to always reference both, but the fallback path (PR-creation denied) only ever produces the fallback issue — no Cast PR exists until a human opens one. Reworded the message to be conditionally accurate for both the ordinary and fallback outcomes. - -Also updated `docs/src/content/docs/guide/gh-aw.md` (~bootstrap-fallback provenance section) to document the new `base_sha` binding, the canonical-title requirement on the fallback path, and the staleness-exclusion/fresh-issue-refiling behavior. Regenerated `workflows/package/squad-bootstrap.md` and `workflows/squad-workflows.manifest.json` via `npm run gh-aw:integrity:write` to keep the installed mirror and embedded digests in sync with the source edits. - -### Follow-up: fresh Copilot review on commit `e024db94` (2 findings) - -- **High — workflow_dispatch run could mint an unusable fallback issue** (`workflows/squad-bootstrap.md`): `squad-review-guard.mjs`'s `validateBootstrapPrFallbackAttribution` only ever authorizes a fallback provenance record whose referenced bootstrap run has `event === 'push'` (mirroring the bot-authored path's own push-only trust model), but the fallback-issue-creation step had no equivalent guard. A manually triggered `workflow_dispatch` run reaching that step would mint a fallback issue that `validateBootstrapPrFallbackAttribution` could *never* authorize — and because `findExistingBootstrapPrFallbackIssue`'s dedupe matching does not consider the triggering event, every subsequent run (including future push-triggered ones) would keep reusing that permanently dead-end issue instead of creating a usable one. **Fix**: fail closed with a clear instruction (re-run via a push, e.g. by merging the pending installation changes) instead of opening an unauthorizable issue. Added two regression tests (`test/gh-aw-bootstrap-workflow.test.ts`) proving a `workflow_dispatch` run throws before opening the issue and a `push` run is unaffected. -- **Medium — hosted E2E's fallback outcome falsely reported terminal success** (`scripts/gh-aw-hosted-e2e.mjs`): the `fallback` branch of the hosted E2E's outcome handling returned `status: 'passed'` the moment bootstrap opened the fallback issue, without ever exercising the Cast-PR-fallback review/attribution path end-to-end — so the hosted E2E could report full success for an exact scenario (`can_approve_pull_request_reviews=false`, the GA-mandated policy) where the human-review boundary was never actually verified. **Classification and design correction**: the obvious-looking fix — have the E2E open the Cast PR itself via its existing installation/probe PAT — was considered and rejected: doing so would substitute automation for the human-in-the-loop step that `can_approve_pull_request_reviews=false` exists to require, defeating the exact security contract under test (this mirrors finding #8's conclusion that creation and approval authority cannot be separated). **Fix (superseded by the architectural correction below)**: an initial design made `fallback` explicitly non-terminal (`status: 'awaiting_manual_pr'`) via a read-only `resume-fallback` Actions job/dispatch trigger that polled the target repo for a human-opened Cast PR using a cross-repository PAT (`secrets.SQUAD_GH_AW_E2E_TOKEN`). That design was rejected before merge (see below) because it kept a repository-held credential "in the loop" for a step meant to be entirely human-driven, even though every code path it exercised was provably GET-only. - -### Architectural correction: no credential may back the human-review continuation step, not even read-only - -A second review pass on the `resume-fallback` job design above rejected it outright: **no PAT, GitHub App token, or repository/environment secret may ever be used to observe or validate the manually opened Cast PR, even read-only** — a workflow-held credential capable of reading that PR's state undermines the `can_approve_pull_request_reviews=false` trust boundary, which exists specifically so a human must do this step outside of any credential CI controls. - -**Fix**: the `resume-fallback` Actions job, its `squad-gh-aw-hosted-e2e-resume` dispatch trigger, and the second `repository_dispatch` event type were removed entirely from `.github/workflows/squad-gh-aw-hosted-e2e.yml` (it is now byte-identical to its pre-`resume-fallback` baseline — no job, no secret, no action-gating). `hosted()`'s `fallback` branch no longer calls `bootstrapOutputs()`/`selectManualFallbackCastPr()`/`waitForBaseControlledReviewCanary()` inline or makes any further GitHub API call at all: it now parses the fallback issue's *own already-fetched* provenance body (via the existing pure function `parseBootstrapPrFallbackProvenance`) to terminate immediately and non-terminally at `status: 'awaiting_manual_pr'`, writing complete evidence (exact target, fallback issue URL, head/base branch/SHA, compare URL, and a `next_step` instruction) with zero additional network calls. The target repository's own installed Squad Review workflow — using that repository's own `GITHUB_TOKEN`/gh-aw authority, not ours — validates the human-opened PR locally; no cross-repository read by the hosted-E2E controller is needed for that. - -`resumeFallback()` is retained, unchanged in its internal (GET-only, proven by transitive call-graph test) logic, but is now framed exclusively as a **local, operator-run-only CLI command**: never wired to any Actions job or `repository_dispatch` trigger, and relying only on whatever `gh auth login` session the operator has configured on their own workstation (never a repository secret). An operator who wants to check on a prior `awaiting_manual_pr` run downloads that run's evidence artifact themselves (`gh run download ... --name squad-gh-aw-hosted-e2e-`) and runs `node scripts/gh-aw-hosted-e2e.mjs resume-fallback` locally, authenticated as themselves. - -Added/updated regression coverage: the workflow-topology test now asserts a single `hosted-e2e` job/single dispatch type and the explicit absence of any `resume-fallback` job; a new test asserts `hosted()`'s fallback branch writes complete evidence with none of the removed function calls present in its source; the dispatcher-wiring test now also asserts `resumeFallback`'s doc comment explicitly states it is operator-run-only, never CI-wired, and never backed by a repository secret, and that the workflow file contains no reference to it at all. The existing transitive read-only call-graph proof for `resumeFallback()` and its reachable functions is unchanged and still passes. - -### Follow-up: fresh Copilot review on commit `140ce8eb` (7 findings) - -- **`scripts/gh-aw-hosted-e2e.mjs`, `hosted()`**: the `awaiting_manual_pr` evidence's `next_step` instruction told the human-operator reader to "run `resume-fallback`" without any of its three required flags. Rewritten to a complete, copy-pasteable two-step recipe: `gh run download -n ` followed by `node scripts/gh-aw-hosted-e2e.mjs resume-fallback --target --evidence-in --evidence `, using the actual interpolated values available at that point. Added a regression test asserting all three required flags and the correct `gh run download` artifact-naming convention are present in the emitted instruction. -- **`squad-review-guard.mjs`, `validateBootstrapPrFallbackAttribution`**: `pr.base.sha` is GitHub's *live* current tip of the base ref — it advances with every ordinary commit landing on the default branch. The fallback path previously both looked up the fallback issue by, and strictly equality-matched, this live value against the immutable `provenance.base_sha` recorded by the base-controlled run that filed the issue — so the manual-recovery path became permanently unrecoverable the moment any further commit landed on the default branch after the issue was filed but before a human opened the Cast PR. **Fix**: made `findExistingBootstrapPrFallbackIssue`'s `baseSha` parameter optional (the review-path lookup no longer requires it; the push-triggered dedupe caller in `squad-bootstrap.md` still passes it, unchanged and still strict); replaced the strict live-SHA equality with a live GitHub Compare API ancestry check (`GET repos/{repo}/compare/{provenance.base_sha}...{pr.base.sha}`) that only accepts `status: 'identical'` or `'ahead'` — i.e., proving the pinned base commit is still an ancestor of (or equal to) the live base tip, meaning the default branch has only fast-forwarded since, never been rewound or force-pushed past it; and repinned the base-controlled run-binding check from the live `pr.base.sha` to the immutable `provenance.base_sha`. **Strengthened per a follow-up request**: a passing `status` alone does not prove the API actually resolved *this* comparison against *this* provenance commit (e.g., a malformed route or a mocked/tampered response could report a plausible status while comparing the wrong refs), so the check now also binds the compare response's own resolved `base_commit.sha` and `merge_base_commit.sha` fields back to `provenance.base_sha`; any error from the compare call (404/403/rate-limit/etc.) propagates and fails the job closed with no local/offline ancestry assumption. Added regression/mutation tests for: default-branch fast-forward (accepted), diverged/behind (rejected), compare-API error (fails closed), and four new binding-mutation tests (missing `base_commit`, missing `merge_base_commit`, mismatched `base_commit.sha`, mismatched `merge_base_commit.sha` — each rejected even though `status` alone would have passed). -- **`skills/gh-aw-enlistment/SKILL.md`** (canonical + its 4 synchronized mirrors: `templates/`, `packages/squad-cli/templates/`, `packages/squad-sdk/templates/`, `workflows/skills/`): the automated bootstrap job's own PR-creation-denied fallback explanation incorrectly said it "pushes the `chore/squad-gh-aw-bootstrap` branch" — but that branch is actually the unrelated, human-run *initial* install branch from skill step 2. The real automated Cast-fallback branch, confirmed from `workflows/shared/squad-bootstrap-validator.mjs`'s `BOOTSTRAP_BRANCH` constant and the actual `github.rest.pulls.create({head: ...})` call site in `workflows/squad-bootstrap.md`, is `squad/bootstrap-cast`. Fixed the canonical paragraph to name the correct branch and clarify it is distinct from the human's own install branch; regenerated all 4 mirrors via `node scripts/sync-templates.mjs --sync` (not hand-edited) and the `workflows/squad-workflows.manifest.json`/embedded `squad-bootstrap.md` digests via `npm run gh-aw:integrity:write`. Added a regression test that reads the real `BOOTSTRAP_BRANCH` constant from source and asserts the canonical SKILL.md's fallback paragraph names it correctly, with a mutation guard against the paragraph reverting to the old wrong branch name. - -No stable release is published by this change; `npm run gh-aw:integrity:check` passes clean after regeneration; full `test/gh-aw*.test.ts` suite (1949 tests, 28 files) passes; `npm run lint` (tsc --noEmit, both packages) is clean; `npm run build` completes cleanly. Two pre-existing, unrelated test files (`test/cli/copilot.test.ts`, `test/acceptance/acceptance.test.ts`, plus one case in `test/cli/cast.test.ts`) fail identically on the pre-session tree (verified via `git stash`) and are unaffected by this change. - -### Follow-up: fresh Copilot review on commit `bb805b2c` (2 new findings, 3 previously missed in code unchanged since last review) - -- **`squad-bootstrap-validator.mjs`, `findExistingBootstrapPrFallbackIssue` — Medium: "Avoid ambiguous matches from stale fallback records"**: a genuine regression introduced by this session's own prior fix above (making `baseSha` optional for the review-path caller). Root cause: the push-triggered rerun always supplies its own live `baseSha` for dedupe; when the default branch advances between reruns, the old record's `base_sha` no longer matches, so the push path files a *fresh* fallback issue without ever closing the *old*, now-stale one. The review-path caller (which intentionally omits `baseSha`, matching only on `repository`/`baseBranch`/`headSha`) then saw both the stale and fresh issue as valid matches and threw "Ambiguous" even though exactly one was actually recoverable — permanently stalling manual recovery the moment base drift plus a stale leftover issue coincided. **Fix**: when `baseSha` is omitted, matches are no longer unconditionally treated as ambiguous. They are deterministically resolved to the single most-recently-created match — but *only* when the coexisting matches disagree on their recorded `base_sha` (the one shape base-drift succession actually produces); multiple matches that share the *identical* `base_sha` (a genuine, unexplained duplicate — e.g. a racing concurrent rerun) still fail closed with the original ambiguity error, regardless of whether the caller supplied `baseSha`. This is safe because `validateBootstrapPrFallbackAttribution` independently re-proves the *selected* record's `base_sha` is still a live ancestor via the Compare API ancestry/binding check added in the prior round — selecting by recency can never admit a record that check would otherwise reject. Added regression tests: two genuine base-drift matches (different `base_sha`, different `created_at`) resolve to the newest regardless of array order; a true same-`base_sha` duplicate still throws whether or not `baseSha` is supplied; the pre-existing push-path strict-ambiguity test (same `baseSha`, two matches) is unaffected. -- **`squad-bootstrap-validator.mjs`, `buildBootstrapPrFallbackIssueBody` and the canonical `skills/gh-aw-enlistment/SKILL.md` (+ its 4 synchronized mirrors) — Low: "Canonical guidance claims unavailable post-merge automation"**: verified via direct inspection of `squad-bootstrap.md`'s push trigger `paths:` that it only watches Squad workflow-source paths (`.github/workflows/squad*.md`, `.github/workflows/shared/**`, manifest/runtime files) — none of which overlap with what a Cast PR (automatic or manual-fallback) ever touches (`.squad/**`, `.github/agents/squad.agent.md`, `meet-the-squad.md`). Merging a Cast PR therefore **never** retriggers `squad-bootstrap` via push, contradicting prior text (in both the embedded fallback-issue body and the canonical SKILL.md) claiming the linked research-proposals issue "is created automatically by the push-triggered run right after merge." **Fix**: corrected both locations to state plainly that no automatic trigger ever fires (neither at PR-open time nor at merge time) and that a manual `workflow_dispatch` rerun is always required — while also correctly noting (confirmed via `classifyBootstrapState()`'s PR-state-agnostic filtering) that a manual rerun genuinely does detect the Cast PR whether it is still open or already merged. Added a regression test asserting the fixed body text and a mutation guard against the disproven "automatically ... after merge" phrasing reappearing. -- **`scripts/gh-aw-hosted-e2e.mjs`, `selectManualFallbackCastPr` — Medium: "Filter fallback selection to open pull requests"**: the candidate filter matched on head/base branch, title, author type, and timing, but never checked `pr.state`, even though the underlying `listPullRequests` adapter queries `state=all`. An unrelated closed or merged human PR that happened to match every other field could incorrectly qualify as the manual fallback Cast PR. **Fix**: added `pr.state === 'open'` as the first filter condition. Added a regression test proving closed and merged look-alikes are excluded individually, a genuinely open PR is still found, and mixing a closed decoy with the real open PR resolves to the open one alone (not a false ambiguity). -- **`docs/src/content/docs/guide/gh-aw.md` — Low: "Review lookup ambiguously matches stale open issues"**: the "exactly one such... fallback issue exists for the branch" guarantee bullet no longer matched the corrected multi-match-tolerant behavior above. Rewrote it to accurately describe the new "select most-recently-created among coexisting valid matches (when they disagree on `base_sha`); still fail closed on a genuine same-`base_sha` duplicate" semantics and why it remains safe (the caller's own independent ancestry/ownership re-check). -- **`scripts/gh-aw-hosted-e2e.mjs`, fallback-selection filter (review-flagged previously-missed finding, code unchanged since the last review round)**: re-confirmed as the same `pr.state === 'open'` gap above — both cited line numbers fell within the single `selectManualFallbackCastPr` filter-predicate block; addressed by the one fix, not two separate locations. (The unrelated `selectBootstrapOutputs` call site using the same `CAST_PR_TITLE` filter was not flagged and was left unchanged, as it is out of scope for this specific finding.) - -Regenerated `workflows/squad-workflows.manifest.json`, `workflows/package/squad-bootstrap.md`, and `workflows/squad-bootstrap.md`'s embedded digest via `npm run gh-aw:integrity:write` (verified clean afterward via `npm run gh-aw:integrity:check`); re-synchronized the 4 SKILL.md mirrors via `node scripts/sync-templates.mjs --sync` (confirmed byte-identical to canonical via direct diff). Full `test/gh-aw*.test.ts` suite (1951 tests, 28 files) passes; `npm run lint` is clean; `npm run build` completes cleanly (version-bump side effects from `prebuild` reverted afterward, as with every prior round). A real (non-mocked) scratch `gh aw compile --strict` run against the canonical `workflows/*.md` sources continues to produce exactly the same two documented warnings (`pull_request_target` advisory on `squad-review.md`, bot-trigger advisory on `squad.md`); all 8 workflows compile successfully. diff --git a/.changeset/gh-aw-issues-prerequisite.md b/.changeset/gh-aw-issues-prerequisite.md deleted file mode 100644 index eb855047a..000000000 --- a/.changeset/gh-aw-issues-prerequisite.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Require GitHub Issues to be enabled before installing Squad Agentic Workflows, and fail closed when the authenticated user cannot update the repository setting. diff --git a/.changeset/gh-aw-native-review-warning.md b/.changeset/gh-aw-native-review-warning.md deleted file mode 100644 index 9a4507abd..000000000 --- a/.changeset/gh-aw-native-review-warning.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Correct the enlistment skill's strict compile gate for gh-aw v0.89.21 to accept only the exact native review advisory and bot-trigger warning. Preserve all reviewer controls, human approval, and hard stops for errors or any unexpected warning. diff --git a/.changeset/gh-aw-runtime-resource-closure.md b/.changeset/gh-aw-runtime-resource-closure.md deleted file mode 100644 index 803c663cc..000000000 --- a/.changeset/gh-aw-runtime-resource-closure.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Install every shared runtime guard required by the Squad agentic workflows, -authorize lifecycle repair from live repository permission, and keep the -advisory reviewer free of workflow-dispatch authority. diff --git a/.changeset/harden-bootstrap-provenance.md b/.changeset/harden-bootstrap-provenance.md deleted file mode 100644 index 098a96dd6..000000000 --- a/.changeset/harden-bootstrap-provenance.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Harden Squad Bootstrap provenance by requiring the exact default branch ref and -allowing trusted install commits to remain valid only while they are identical -to or ancestors of the live default branch tip. diff --git a/.changeset/identity-neutral-squad-templates.md b/.changeset/identity-neutral-squad-templates.md deleted file mode 100644 index c319ac322..000000000 --- a/.changeset/identity-neutral-squad-templates.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Make shipped Squad templates, build inputs, CI policy, and issue-routing -automation independent of the repository's current team state so teams can be -re-cast without changing package artifacts or required checks. Product-owned -skills now have one exact canonical set, while live-team tests and stale -cast-specific configuration are removed. diff --git a/.changeset/legacy-assignment-provenance.md b/.changeset/legacy-assignment-provenance.md deleted file mode 100644 index 804edf0eb..000000000 --- a/.changeset/legacy-assignment-provenance.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -Support historical assigned_at casting timestamps with conflict detection and -preserved original dates. Provide actionable fail-closed recovery diagnostics -for missing universe evidence without inventing historical state. Convert -historical entries/assignments using unambiguous authoritative folder/charter -identities and explicit assignment membership, preserving timestamps and -byte-exact originals while rejecting missing or conflicting identity evidence. diff --git a/.changeset/legacy-casting-upgrade.md b/.changeset/legacy-casting-upgrade.md deleted file mode 100644 index 8cb474991..000000000 --- a/.changeset/legacy-casting-upgrade.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch -"@bradygaster/squad-cli": patch ---- - -Automatically migrate supported unversioned casting state before upgrading managed files, including already-current upgrades. Preserve identities and timestamps, archive original registry/history bytes without overwriting, and fail closed on unsupported or inconsistent state. Dry runs validate without mutating casting state. diff --git a/.changeset/lucky-model-routing.md b/.changeset/lucky-model-routing.md deleted file mode 100644 index a577c2418..000000000 --- a/.changeset/lucky-model-routing.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@bradygaster/squad-sdk': patch -'@bradygaster/squad-cli': patch ---- - -Update model catalog tiers and fallback routing for GPT-5.6 Sol, GPT-5.6 Terra, GPT-5.6 Luna, and Gemini 3.1 Pro. Terra is now the default standard model for code and prompt tasks, with Luna as its economy-mode fallback. \ No newline at end of file diff --git a/.changeset/lucky-moons-shake.md b/.changeset/lucky-moons-shake.md deleted file mode 100644 index c74818770..000000000 --- a/.changeset/lucky-moons-shake.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'@bradygaster/squad-sdk': patch ---- - -Refuse consult mode when git's `info/exclude` resolves outside the project - -`setupConsultMode` hides `.squad/` by appending to git's `info/exclude`, but resolved that -path with `git rev-parse --git-path info/exclude`, which answers for whichever repository -*encloses* the directory. From a linked worktree, or from a directory that is not itself a -repository root, the write landed on another checkout's exclude file — hiding `.squad/` -across the main checkout and every sibling worktree. Because `info/exclude` is untracked -and per-clone, nothing in the repo could undo it. - -`setupConsultMode` now verifies the exclude belongs to a repository rooted at -`projectRoot` and refuses otherwise, pointing the caller at the main checkout. A new -`isExcludeOwnedBy()` export performs that containment check. - -Writing to a worktree-local exclude is not an alternative: git keeps no per-worktree -`info/exclude`, and a file placed at `.git/worktrees//info/exclude` is never read. diff --git a/.changeset/max-reasoning-effort.md b/.changeset/max-reasoning-effort.md deleted file mode 100644 index 842673e4c..000000000 --- a/.changeset/max-reasoning-effort.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bradygaster/squad-sdk': patch ---- - -Add `"max"` as a valid `SquadReasoningEffort` level to match the Copilot SDK 1.0.9 addition of `ReasoningEffort = "max"`. Unblocks Dependabot PR #1671. diff --git a/.changeset/native-cast-review-contracts.md b/.changeset/native-cast-review-contracts.md deleted file mode 100644 index 8cc713a68..000000000 --- a/.changeset/native-cast-review-contracts.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Bind native review runs whose API metadata identifies the PR head through exact -PR base/head linkage while preserving base-controlled workflow provenance. -Validate required Coordinator and Coding Agent sections and the disabled -auto-assignment marker before publishing a generated Cast. diff --git a/.changeset/native-review-bootstrap-provenance.md b/.changeset/native-review-bootstrap-provenance.md deleted file mode 100644 index 7957a8c2b..000000000 --- a/.changeset/native-review-bootstrap-provenance.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Give the native review safe-output guard read access to same-repository workflow -run evidence needed for signed Bootstrap provenance. Correct Cast generation -guidance for Scribe's decision-only role and native specialist assignment. -Document reviewed fresh generation rather than amending a signed Cast head. diff --git a/.changeset/orphan-append-cas.md b/.changeset/orphan-append-cas.md deleted file mode 100644 index caf3d3623..000000000 --- a/.changeset/orphan-append-cas.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -Make orphan-backed state appends compare-and-swap against the exact ref snapshot used to build each appended value, preserving concurrent audit entries. diff --git a/.changeset/portable-mcp-preserve-newlines.md b/.changeset/portable-mcp-preserve-newlines.md deleted file mode 100644 index a409489e3..000000000 --- a/.changeset/portable-mcp-preserve-newlines.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Keep standalone squad_state MCP commands portable in shared project configuration while retaining machine-local launch resolution. Preserve existing destination newline style when upgrading managed text files and refreshing coordinator capabilities, avoiding newline-only rewrites. diff --git a/.changeset/preserve-gh-aw-builtins.md b/.changeset/preserve-gh-aw-builtins.md deleted file mode 100644 index 8288efad0..000000000 --- a/.changeset/preserve-gh-aw-builtins.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Standardize the Rai built-in agent on the canonical lowercase directory/template ID `rai` (matching `scribe`, `ralph`, and `fact-checker`) instead of the mixed-case `Rai`, which broke on case-sensitive filesystems (Linux CI) and silently duplicated the agent on case-insensitive ones (macOS/Windows). - -`squad upgrade` now detects a legacy case-sensitive `.squad/agents/Rai/` directory and migrates it in place to `.squad/agents/rai/`, preserving the existing charter/history content. If both `Rai/` and `rai/` already exist (a partial upgrade on a case-sensitive filesystem), the canonical `rai/` is kept untouched and only the stale `Rai/` copy is removed — no user customization is ever clobbered, and repeat upgrade runs are idempotent. - -The shipped Rai charter template's manifest source/destination were also renamed from `Rai-charter.md` to lowercase `rai-charter.md`, matching the file already shipped under `templates/`. - -The `workflows/squad.md` gh-aw coordinator prompt and its paired `squad-cast-validator.mjs` validator now let the generated coordinator name the four permanent built-in support agents (Scribe, Ralph, Rai, Fact Checker) and state their fixed lifecycle duties in a dedicated `## Built-in Support Agents` section, while still forbidding any reference to unrelated standalone lifecycle/log/decision state or paths. diff --git a/.changeset/preserve-mcp-json-env.md b/.changeset/preserve-mcp-json-env.md deleted file mode 100644 index 72d71d4b2..000000000 --- a/.changeset/preserve-mcp-json-env.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@bradygaster/squad-cli': patch ---- - -Preserve user-supplied `env` on the `squad_state` entry in `.mcp.json` - -`squad init` and `squad upgrade` rebuilt the `squad_state` entry from scratch on every run, hardcoding `env: {}`. Users behind a corporate npm proxy — who must set `npm_config_registry` there for the MCP server to launch at all — lost that setting every time they ran either command, and the idempotency check could never short-circuit for them, so the file was rewritten on every invocation. - -`env` is now carried forward verbatim. `command` and `args` remain Squad-managed so the version pin still refreshes. diff --git a/.changeset/prevent-command-replay.md b/.changeset/prevent-command-replay.md deleted file mode 100644 index 116df88b0..000000000 --- a/.changeset/prevent-command-replay.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Prevent edited issue and comment events from replaying unchanged embedded `/squad` commands, require dual-principal repository authorization for `/squad revoke-improvement`, and ignore unauthorized revocation comments during live approval revalidation. diff --git a/.changeset/recast-label-slugs.md b/.changeset/recast-label-slugs.md deleted file mode 100644 index 91b7b0438..000000000 --- a/.changeset/recast-label-slugs.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Keep generated issue-assignment workflows and activation binding checks consistent for multi-word member names, fail closed on colliding member-label slugs, and strengthen product/team isolation validation. diff --git a/.changeset/reject-legacy-revision-tokens.md b/.changeset/reject-legacy-revision-tokens.md deleted file mode 100644 index 0bdb2d7ff..000000000 --- a/.changeset/reject-legacy-revision-tokens.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -Reject revision-bearing snapshot keys when validating canonical legacy Cast genesis history. diff --git a/.changeset/remove-mutable-gh-aw-router.md b/.changeset/remove-mutable-gh-aw-router.md deleted file mode 100644 index 0b0800362..000000000 --- a/.changeset/remove-mutable-gh-aw-router.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Remove gh-aw's generated mutable `agentic-workflows` router during Squad enlistment and fail installation verification when that unowned skill remains. diff --git a/.changeset/reskill-template-skills.md b/.changeset/reskill-template-skills.md deleted file mode 100644 index c5abf7ff3..000000000 --- a/.changeset/reskill-template-skills.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Refresh the shipped Squad reskill and template skill scaffolding across the CLI and SDK packages, -including history-hygiene, Windows path safety, CI validation, release boundaries, and the -operational contracts needed by recast teams. diff --git a/.changeset/scheduler-quoted-task-ref.md b/.changeset/scheduler-quoted-task-ref.md deleted file mode 100644 index 728744020..000000000 --- a/.changeset/scheduler-quoted-task-ref.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -'@bradygaster/squad-sdk': minor ---- - -Fix scheduler script tasks failing on the default Windows Node install path - -`LocalPollingProvider` split `task.ref` on whitespace with no quote handling, -so a command path containing a space was truncated at the first space. On -Windows that breaks the *default* install location — `C:\Program Files\nodejs\node.exe` -became `C:\Program`, and the task failed with `ENOENT`. This affected any user -who did not install Node somewhere unusual, not an exotic edge case. - -Script task refs are now parsed with quote awareness, and an unquoted command -path is resolved by widening across spaces (longest match first) the same way -Windows `CreateProcess` does. A ref whose first token already resolves is used -unchanged, so existing configurations — including bare PATH commands like -`node` — keep their exact previous behaviour. Quote characters appearing -mid-token, as in `node -e console.log('hi')`, are still passed through to the -child verbatim rather than being stripped. - -`TaskConfig.argv?: string[]` is added as the unambiguous form: when present, -`ref` is used verbatim as the executable and is never parsed. Prefer it for any -command path containing spaces. - -Spawn failures are also no longer silent. `execFile` reports them with a -*string* code (`ENOENT`, `EACCES`) and no stdout or stderr, which previously -fell through every branch and produced `code: undefined, stderr: ''`. `TaskResult` -gains `spawnError?: string` for that code, and the error message now names the -ref that could not be spawned. - -`shell: false` is retained, so the injection-safety property of the existing -implementation is unchanged. diff --git a/.changeset/scribe-archival-integrity.md b/.changeset/scribe-archival-integrity.md deleted file mode 100644 index 366c03c2e..000000000 --- a/.changeset/scribe-archival-integrity.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -'@bradygaster/squad-sdk': minor -'@bradygaster/squad-cli': minor ---- - -Make archival incapable of destroying state (#1774, #1783, #1760) - -Archival is a two-half operation — append to a destination, trim from a source. -Three production defects came from those halves coming apart, each one silently -deleting team history while reporting success. - -New `state/io/archival` module in the SDK enforces the five rules in code rather -than only in prompt text: - -- `resolveTrackedDestination()` / `isTrackedInGit()` — refuse to archive into a - destination that is not git-tracked, or redirect to a tracked fallback. Under a - git-excluded `.squad/`, already-tracked files still commit while brand-new files - silently never do, which turns archival into deletion (#1783). -- `archiveEntries()` — append, verify by literal heading containment **and** entry - count, and only then trim. A failed append leaves the source completely intact - (#1774). -- `formatArchivalReport()` — reports entry counts and refuses to render an - unbalanced result. File size is not a valid integrity signal, since a merge and - an archive in the same pass move size in opposite directions. -- `prepareInboxBodyForMerge()` / `demoteHeadings()` — fence-aware heading demotion - so inbox `##` sections land at `####` beneath an `###` entry instead of breaking - document hierarchy (#1760). `#` lines inside fenced code blocks are never - rewritten. - -Scribe's charter, spawn template, and the `decision-hygiene` watch capability -prompt now carry the same rules. - -**`squad nap` no longer destroys decision history.** `archiveDecisions()` in the -CLI is a second, *shipped and user-invocable* archival path (`squad nap`, REPL -`/nap`) that had all three defects independently of the agent path, and it is now -wired to the SDK module: - -- It appended to `.squad/decisions-archive.md` with no tracked-destination check. - With `.squad/` git-excluded and no archive file yet, every archived record was - written somewhere that could never be committed while the trim of the tracked - `decisions.md` committed normally — a total loss of the archived records. -- It trimmed the source unconditionally, even on the branch where the append was - skipped, and never verified that the append landed. -- It split records on `/^###\s/` with no fence tracking, so a `###` line inside a - fenced code sample was treated as a record boundary and severed the record. - -Archival now refuses to run when the destination is untracked *and* git-ignored, -verifies the appended entry count before removing anything from the source, and -reuses the SDK's fence-aware scanner for record boundaries. Because this changes -the behavior of a user-invocable command rather than only prompt text, the CLI -takes a minor bump. diff --git a/.changeset/secure-gh-aw-canary.md b/.changeset/secure-gh-aw-canary.md deleted file mode 100644 index 04bec1f39..000000000 --- a/.changeset/secure-gh-aw-canary.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Harden Squad workflow bootstrap, command routing, review relays, and installed workflow guidance for deterministic hosted canaries. diff --git a/.changeset/secure-native-gh-aw-package.md b/.changeset/secure-native-gh-aw-package.md deleted file mode 100644 index b6cc0f85c..000000000 --- a/.changeset/secure-native-gh-aw-package.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Install Squad's seven agentic workflows, fifteen runtime resources, and -enlistment skill from one isolated native package, with fail-closed manifest, -ownership, path, and hosted bootstrap verification. diff --git a/.changeset/squad-retro-auto-implement.md b/.changeset/squad-retro-auto-implement.md deleted file mode 100644 index 91cd82a93..000000000 --- a/.changeset/squad-retro-auto-implement.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Extend the standard gh-aw stack to six workflows. Retrospective action issues -can opt into bounded ordinary-fix dispatch and independent retry reconciliation. -The improvement worker requires an exact human approval comment, content -revision and file scope; its final gate validates the actual patch. Both paths -produce draft PRs with verified provenance, suppress all-state duplicates, and -leave review and merge to humans. Report/proposal-only remains the default. - -Duplicate suppression now also recognizes GitHub's native issue<->pull request -link (the "Development" sidebar), not just a closing-keyword reference or the -worker's own branch naming. A human-linked pull request -- open, merged, or -closed unmerged, with no body text at all -- permanently excludes its issue -from further auto-dispatch, at the receiver duplicate gate for both worker -paths and at the retrospective's own reconciliation check before it dispatches. -An incomplete or failed native lookup fails closed, the same as an incomplete -REST pull-request scan. diff --git a/.changeset/squad-retrospective-workflow.md b/.changeset/squad-retrospective-workflow.md deleted file mode 100644 index 35ae97574..000000000 --- a/.changeset/squad-retrospective-workflow.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Ship the shared Squad retrospective workflow and include it in the CLI and SDK -gh-aw enlistment templates. diff --git a/.changeset/strict-casting-durability.md b/.changeset/strict-casting-durability.md deleted file mode 100644 index ce46df10e..000000000 --- a/.changeset/strict-casting-durability.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@bradygaster/squad-cli': patch -'@bradygaster/squad-sdk': patch ---- - -Reject ambiguous legacy casting generations, validate complete registry/history commits before mutation, and surface structured preset rollback recovery state. diff --git a/.changeset/strict-casting-readers.md b/.changeset/strict-casting-readers.md deleted file mode 100644 index 9af323329..000000000 --- a/.changeset/strict-casting-readers.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bradygaster/squad-sdk": patch ---- - -Reject incomplete or malformed casting history before synchronizing team capabilities. diff --git a/.changeset/tidy-ralph-guidance.md b/.changeset/tidy-ralph-guidance.md deleted file mode 100644 index ff3378dbf..000000000 --- a/.changeset/tidy-ralph-guidance.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Clarify Ralph's monitor-only role and reserve pull request merging for humans in the distributed reference templates. diff --git a/.changeset/verified-gh-aw-ownership-staging.md b/.changeset/verified-gh-aw-ownership-staging.md deleted file mode 100644 index 020f4f441..000000000 --- a/.changeset/verified-gh-aw-ownership-staging.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@bradygaster/squad-cli": patch -"@bradygaster/squad-sdk": patch ---- - -Preserve manifest-allowlisted gh-aw ownership metadata through broad consumer ignore rules by force-staging only the exact required ownership file. Verify every required artifact's staged type and bytes before commit or push, using bounded index queries that exclude unrelated consumer files. diff --git a/.changeset/watch-stop-signal.md b/.changeset/watch-stop-signal.md deleted file mode 100644 index 569b37823..000000000 --- a/.changeset/watch-stop-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bradygaster/squad-cli': patch ---- - -Implement the two documented `squad watch` stop signals, which were previously parsed but never read. `--sentinel-file ` now stops the run gracefully once that file is deleted, and creating `.squad/ralph-stop` stops the run gracefully as documented in the README. Both are checked at the top of each round and reuse the existing graceful shutdown path, so a watch run can now be stopped from outside the process without sending a signal. Closes #1711. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c75533f8..374b7a1dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,20 +4,84 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added + +- Add the draft `squad-charter/v0.1` artifact profile, explicit conformance profile selection, validation-before-runtime compilation, typed diagnostics, operation-exact capability metadata, canonical and lossless extension-preserving serialization, a schema-defined language-neutral conformance manifest, and implementation-independent specification documents (#2069, #2074). +- Add atomic repository-scoped `createIfAbsent` operation across all state backends (`local`, `git-notes`, `orphan-branch`, `two-layer`), `StorageProvider` implementations, `StateBackendStorageAdapter`, and the `squad_state_create_if_absent` MCP tool with `StateKeyConflictError` and `StateBackendUncertaintyError` (#1947). +- Persist runtime turn starts and usage events to a backend-aware JSONL ledger, report telemetry coverage, and make `squad cost` prefer structured telemetry before falling back to self-reported orchestration logs (#1716, #2063). +- Track context-window utilization from runtime and estimated token data, publish typed events and OpenTelemetry metrics, warn interactive-shell users at a configurable threshold, and report estimated utilization from `squad watch` (#1718, #2064). + +### Changed + +- Align native Squad workflow installation and bundled enlistment guidance with the exact `gh-aw` `v0.91.5` compiler, preserving strict package ownership and integrity verification, supporting an explicit schedule seed, verifying 24-hour failure-report retention digests, and binding activation App tokens to the full current repository identity (#2195). +- Make `issue-assign` the sole Copilot assignment workflow, fail visibly on missing tokens or unconfirmed API responses, dispatch automated auto-assign handoffs explicitly, and disclose deterministic keyword triage provenance (#2156). +- Clarify Ralph's monitor-only role and reserve pull request merging for humans in the distributed reference templates (#2156). +- Limit team markdown table parsing to supported roster sections, preserving the legacy `Team Roster` heading while excluding auxiliary tables (#2079, #2156). +- Update bundled enlistment guidance for repository-scoped Agentic Research bootstrap proposal titles, including compatible legacy-title recognition and the required package-update-before-rename order. + +### Fixed + +- Automatically migrate supported unversioned casting state before upgrading managed files (including already-current upgrades), support historical `assigned_at` casting timestamps with conflict detection and preserved original dates, archive original registry/history bytes without overwriting, and fail closed on unsupported or inconsistent state (#2190). +- Keep standalone `squad_state` MCP commands portable in shared project configuration while retaining machine-local launch resolution, and preserve existing destination newline style when upgrading managed text files and refreshing coordinator capabilities (#2190). +- Validate real numeric task and epic issue references and add an explicit activation reader for independently verified current-state-authorized reconciliations, preserving valid legacy activation records while rejecting ambiguous, malformed, or unverified replacements. +- Bind native review runs whose API metadata identifies the PR head through exact PR base/head linkage while preserving base-controlled workflow provenance, and validate required Coordinator and Coding Agent sections and the disabled auto-assignment marker before publishing a generated Cast. +- Give the native review safe-output guard read access to same-repository workflow run evidence needed for signed Bootstrap provenance, and correct Cast generation guidance for Scribe's decision-only role and native specialist assignment. +- Keep automatic bootstrap limited to the Cast PR and linked proposals issue, publish research only on explicit `/squad research` before triage, and recognize the deterministic bootstrap Cast branch during team-required command gating (#2194). +- Fix `squad init` re-run on an existing project leaving the `squad.agent.md` first-response greeting stamped with a stale version (`stampVersion` in `squad-cli` and `stampVersionInContent` in `squad-sdk` now update resolved SemVer literals idempotently) (#1995). +- Allow state tools to append evidence to the exact Rai and Fact Checker audit-trail keys while rejecting writes and deletes, reconcile built-in scaffold charters with the append-only evidence contract, and make orphan-backed state appends compare-and-swap against the exact ref snapshot (#2159). +- Fix `squad-heartbeat.yml`'s "Repair orphaned squad labels" step returning `403` when a fork PR closes by switching the trigger to `pull_request_target` across all 5 synced workflow copies (#2155). +- Support both `teamRoot` forms for linked teams (the team repository written by `squad link` and the team's `.squad/` directory shown in docs) via `teamSquadDir` on `ResolvedSquadPaths`, and export `MUTABLE_STATE_PATHS` and `isMutableStateKey()` from `@bradygaster/squad-sdk/tools` (#2107, #2119). +- Fix `squad init` and team casting failing on Windows with `EPERM: operation not permitted, fsync` and handle Windows directory rename `EPERM` lock contention in the durable casting registry (#2106, #2114). +- Validate `squad doctor` team state files (`team.md`, `routing.md`, `agents/`, `casting/registry.json`, `decisions.md`) against the resolved team root in remote (linked) mode instead of the local `.squad/` stub (#2056, #2057). + +## [1.0.1] - 2026-10-03 + +### Fixed + +- `squad health` now accepts casting registry persistent names as valid routing references alongside registry IDs, avoiding false unknown-agent failures (#2165). +- The immutable activation action now binds to an approved installer that fails closed on checksum-download failure, invalid checksum entries, or archive tampering, with offline pinned-installer regression coverage (#2167). + +### Changed + +- Root, SDK, and CLI npm versions advance together to 1.0.1 to satisfy the existing release and npm publication workflows. The CLI SDK dependency floor is now `>=1.0.1`; SDK source is unchanged from v1.0.0. +- Agentic Workflow activation installs the latest stable standalone GitHub Release by default, independently of immutable workflow/action source pins, and no longer rewrites a CLI version pin after publication (#2167). +- Consumed only the CLI health persistent-routing patch changeset. Historical changesets are unchanged; this release does not promote unrelated `dev` changes or republish `Squad.Agents.AI` NuGet 1.0.0. + ## [1.0.0] - 2026-10-02 Squad CLI and SDK (the `@bradygaster/squad-cli` and `@bradygaster/squad-sdk` npm packages) graduate to 1.0.0. This is a stabilization release: there are no breaking API or command changes from 0.13.1. It marks the npm packages as stable per the project's independent per-package versioning policy (distinct from the already-stable `Squad.Agents.AI` NuGet package, which reached 1.0.0 separately in #2143). +### Added + +- Add the `gh-aw-enlistment` skill: an operationalized, safety-gated guide for enlisting a repository into Squad via GitHub Agentic Workflows (`gh aw`) (#1946). +- Install Squad's seven agentic workflows (including `squad-bootstrap` and `squad-retro`), fifteen runtime resources, and enlistment skill from one isolated native package, with fail-closed manifest, ownership, path, and hosted bootstrap verification (#2005). +- Publish and validate a versioned producer-owned agent identity provenance contract with stable IDs, rename preservation, retirement tombstones, durable manifest-backed roll-forward transactions, and repository-scoped work-to-agent activation bindings. +- Automate insider, preview, and stable distribution through npm, standalone archives, Homebrew, and WinGet (#1593). +- Add `.squad/templates/README.md` to `squad init` output explaining which files are runtime inputs vs bootstrap templates (#1494, #1949). + ### Changed - Removed the blanket "Experimental — Squad is alpha software" disclaimer banner from 87 documentation pages under `docs/src/content/docs/**`. Genuine preview-channel and feature-specific warnings (SDK-first mode, GitLab Issues Mode, the plugin security MVP gate, and preview/insider release channels) are unchanged and still documented. - `@bradygaster/squad-cli`'s declared dependency floor on `@bradygaster/squad-sdk` is now `>=1.0.0` (previously `>=0.11.0`), reflecting the SDK's own stabilization. +- Require `gh-aw` `v0.89.22` across the Squad workflow package, enlistment guidance, integrity contract, CI, and hosted E2E controller, proving the exact compiler version during enlistment (#2118). +- Make shipped Squad templates, build inputs, CI policy, and issue-routing automation independent of the repository's current team state, and refresh shipped reskill and template skill scaffolding (#2015, #2025, #2029, #2030). +- Require coordinators to preserve user-approved scope and prevent directive or reflection capture from falling back to local Markdown proposals (#2110). +- Use the base-controlled deterministic relay's native `Squad Review / review` job as the authoritative review result only when it validates the exact trusted automatic workflow run (#2109). + +### Fixed + +- Harden the Squad GH-AW source contract across command routing, approval relay (`squad_approval_relay`), review guard (`squad-review-guard.mjs`), install verification (`squad-install-verifier.mjs`), and bootstrap-PR-fallback signed provenance attribution (#2116, #2120, #2136, #2141, #2145, #2147, #2148, #2149). +- Transport automatic bootstrap Cast and research payloads through bounded, integrity-checked chunks (#2043), keep compiled workflow expressions valid at GitHub runtime (#2037), and close installed runtime resources. +- Require GitHub Issues to be enabled before installing Squad Agentic Workflows, and correct first-install credentials guidance in `gh-aw-enlistment` (#1973). +- Standardize the Rai built-in agent on the canonical lowercase directory/template ID `rai` and migrate legacy `.squad/agents/Rai/` directories during `squad upgrade` (#1990). +- Reject ambiguous legacy casting generations, revision-bearing snapshot keys in legacy Cast genesis history, and incomplete or malformed casting history before synchronizing team capabilities. ## [0.13.1] - 2026-08-26 ### Fixed - Allow runtime state tools to persist the casting policy, registry, and history keys required by the coordinator (`casting/policy.json`, `casting/registry.json`, and `casting/history.json`), while continuing to reject unrelated casting paths (#1876, #1898). +- Preserve user-supplied `env` on the `squad_state` entry in `.mcp.json` across `squad init` and `squad upgrade` runs (#1894). ## [0.13.0] - 2026-08-25