Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
925dbe7
Scribe: Merge PAO docs audit decision, session logs
Copilot Mar 22, 2026
5b055da
Scribe: Log Booster version sync session
Copilot Mar 22, 2026
802ae9e
Post-spawn orchestration: Docs audit fires 2-5 resolved
Copilot Mar 22, 2026
bf597cb
feat(watch): circuit breaker integration for rate limit protection (#…
Mar 23, 2026
dafc495
feat(capabilities): dual-mode deployment support (agent-per-node + sq…
Mar 23, 2026
d8cf117
fix: handle EACCES in ensureGitattributes on Linux
Mar 23, 2026
3f4870b
Merge branch 'dev' of https://github.com/bradygaster/squad into dev
Copilot Mar 23, 2026
7078939
feat(docs): add version badge to footer
Copilot Mar 23, 2026
77ffcfa
docs: add before/after screenshots for version badge PR
Copilot Mar 23, 2026
14fb150
docs: retake screenshots from correct docs URL with proper CSS
Copilot Mar 23, 2026
866ca24
chore: remove pr-assets screenshots from repo
Copilot Mar 23, 2026
e6cb475
fix(docs): remove hardcoded version fallback in CI
Copilot Mar 23, 2026
8919a24
Merge branch 'dev' of https://github.com/bradygaster/squad into dev
Copilot Mar 23, 2026
17f5b4c
chore: add kedacore to cspell dictionary
Copilot Mar 23, 2026
a05661c
docs: update Chinese README translation
Copilot Mar 23, 2026
df68744
Merge pull request #571 from diberry/squad/docs-version-badge
bradygaster Mar 23, 2026
2995b93
Merge pull request #555 from tamirdresher/tamirdresher/520-dual-mode-…
bradygaster Mar 23, 2026
76974e8
Merge pull request #552 from tamirdresher/tamirdresher/515-rate-limit…
bradygaster Mar 23, 2026
535f391
docs: add v0.9.0 missing feature docs
Copilot Mar 23, 2026
3548e35
fix(docs): capability-routing references machine-capabilities.json
Copilot Mar 23, 2026
8291a15
feat(skills): add cross-machine-coordination skill
tamirdresher Mar 22, 2026
0e5b2d2
Merge pull request #568 from diberry/squad/v090-missing-feature-docs
bradygaster Mar 23, 2026
4cc0e22
Merge pull request #572 from bradygaster/squad/507-chinese-readme
bradygaster Mar 23, 2026
112c42d
Merge pull request #513 from tamirdresher/feat/cross-machine-coordina…
bradygaster Mar 23, 2026
7851e2a
docs: add link to Tamir's Squad Skills Workshop
Copilot Mar 23, 2026
b397e5c
docs: add case-insensitive path comparison to windows-compatibility s…
Copilot Mar 23, 2026
0209a6b
docs: add link to Tamir's Squad Skills Workshop (#573)
bradygaster Mar 23, 2026
5754367
docs: add case-insensitive path comparison to windows-compatibility s…
bradygaster Mar 23, 2026
561b1a3
fix(shell): robust agent name extraction with multi-pattern fallback …
bradygaster Mar 24, 2026
7f8a3a7
fix(init): scaffold casting files + silence no-remote errors (#579)
bradygaster Mar 24, 2026
dcf9fd4
fix: personal squad init via --global discovers ~/.config/squad/ (#576)
bradygaster Mar 24, 2026
2f5e89e
ci+docs: release hardening — playbook rewrite + publish-policy lint (…
bradygaster Mar 24, 2026
85cf103
fix(doctor): actionable warnings + squad.agent.md check (#565, #533)
bradygaster Mar 24, 2026
b6357af
Merge branch 'dev' of https://github.com/bradygaster/squad into dev
Copilot Mar 24, 2026
0b8b6f9
test(sdk): StorageProvider contract tests — RED phase (#481)
Copilot Mar 23, 2026
0a131ba
feat(sdk): FSStorageProvider implementation — GREEN phase (#481)
Copilot Mar 23, 2026
a304988
test: add failing tests for path traversal, symlink, and deleteDir
Copilot Mar 23, 2026
cdc6140
feat: add rootDir confinement, symlink protection, and deleteDir
Copilot Mar 23, 2026
b59a5ce
fix: harden symlink check for write-path ENOENT fallback
Copilot Mar 23, 2026
62569fa
docs: GNC history + decision record for symlink ENOENT fix
Copilot Mar 23, 2026
cbac296
fix: normalize rootDir via realpathSync and document TOCTOU
Copilot Mar 23, 2026
8a0bede
fix: case-insensitive path comparison for Windows and macOS
Copilot Mar 23, 2026
4dcd664
test: add concurrent write tests for StorageProvider
Copilot Mar 23, 2026
4f0780e
feat: add StorageError type to sanitize filesystem error paths
Copilot Mar 23, 2026
9902599
docs: add TOCTOU warning to StorageProvider exists() methods
Copilot Mar 23, 2026
956a294
refactor(casting): migrate index.ts to StorageProvider
Copilot Mar 23, 2026
8a69127
docs: add StorageProvider Phase 2 migration tracker
Copilot Mar 23, 2026
3c89133
refactor(skills): migrate skill-loader.ts to StorageProvider
Copilot Mar 23, 2026
f0e11a4
refactor(skills): migrate skill-script-loader.ts to StorageProvider
Copilot Mar 23, 2026
3d60134
refactor(skills): migrate skill-source.ts to StorageProvider
Copilot Mar 23, 2026
9c2737f
refactor(build): migrate bundle.ts to StorageProvider
Copilot Mar 23, 2026
0d93945
refactor(build): migrate release.ts to StorageProvider
Copilot Mar 23, 2026
df3ef2a
refactor(marketplace): migrate packaging.ts to StorageProvider
Copilot Mar 23, 2026
81c6aa7
refactor(remote): migrate bridge.ts to StorageProvider
Copilot Mar 23, 2026
d423287
refactor: migrate resolution.ts to StorageProvider
Copilot Mar 23, 2026
02e2103
refactor(agents): migrate index.ts to StorageProvider
Copilot Mar 23, 2026
a112c09
refactor(agents): migrate lifecycle.ts to StorageProvider
Copilot Mar 24, 2026
a66860e
refactor(agents): migrate personal.ts to StorageProvider
Copilot Mar 24, 2026
9e117d9
refactor(agents): migrate onboarding.ts to StorageProvider
Copilot Mar 24, 2026
d00ac7a
refactor(sharing): migrate consult.ts to StorageProvider
Copilot Mar 24, 2026
5ed4c2a
refactor(sharing): migrate export.ts to StorageProvider
Copilot Mar 24, 2026
135fa11
refactor(sharing): migrate import.ts to StorageProvider
Copilot Mar 24, 2026
ab36c90
refactor(tools): migrate index.ts to StorageProvider
Copilot Mar 24, 2026
7e10b0b
refactor(platform): migrate comms-file-log.ts to StorageProvider
Copilot Mar 24, 2026
99a35fa
refactor(platform): migrate comms.ts to StorageProvider
Copilot Mar 24, 2026
86765cb
refactor(platform): migrate index.ts to StorageProvider
Copilot Mar 24, 2026
40ae151
refactor(ralph): migrate index.ts to StorageProvider
Copilot Mar 24, 2026
b35fed7
refactor(ralph): migrate rate-limiting.ts to StorageProvider
Copilot Mar 24, 2026
7f5a0b3
refactor(streams): migrate resolver.ts to StorageProvider
Copilot Mar 24, 2026
b9f08fe
refactor(upstream): migrate resolver.ts to StorageProvider
Copilot Mar 24, 2026
8167b03
refactor: migrate multi-squad.ts to StorageProvider
Copilot Mar 24, 2026
d906509
refactor(agents): migrate history-shadow.ts to StorageProvider
Copilot Mar 24, 2026
45ccd6a
refactor(runtime): migrate config.ts to StorageProvider
Copilot Mar 24, 2026
cec9417
refactor(runtime): migrate scheduler.ts to StorageProvider
Copilot Mar 24, 2026
c57e8ce
refactor(runtime): migrate cross-squad.ts to StorageProvider
Copilot Mar 24, 2026
b7b7820
refactor(runtime): migrate squad-observer.ts to StorageProvider
Copilot Mar 24, 2026
cba7457
fix: revert sync functions incorrectly made async during migration
Copilot Mar 24, 2026
68e505c
fix: restore error behavior for observer and compiler after migration
Copilot Mar 24, 2026
d045af2
docs: update tracker with runtime migrations and fix commits
Copilot Mar 24, 2026
8551eb0
chore(squad): log Phase 2 review — 3 approvals
Copilot Mar 24, 2026
b04a44b
feat(storage): Phase 3 prep — InMemoryStorageProvider, listSync, lint…
Copilot Mar 24, 2026
4c6eed4
test(storage): add InMemoryStorageProvider tests, listSync tests, DI …
Copilot Mar 24, 2026
3f4ee55
refactor(storage): replace readdirSync with storage.listSync()
Copilot Mar 24, 2026
4aa2709
refactor(config): migrate models.ts and legacy-fallback.ts to Storage…
Copilot Mar 24, 2026
b095447
refactor(config): migrate agent-source.ts to StorageProvider
Copilot Mar 24, 2026
9ee1c96
refactor(config): migrate init.ts to StorageProvider (partial)
Copilot Mar 24, 2026
3eb6111
docs: correct tracker — config files were never migrated upstream
Copilot Mar 24, 2026
a8d88f2
test(storage): add contract test factory for StorageProvider implemen…
Copilot Mar 24, 2026
8ad4c4e
test(storage): wire SQLiteStorageProvider into contract tests
Copilot Mar 24, 2026
0a6e48b
test(storage): add SQLite-specific tests (persistence, init, path nor…
Copilot Mar 24, 2026
1d3140f
fix(storage): escape LIKE wildcards and use atomic persist in SQLiteS…
Copilot Mar 24, 2026
65b8f6a
test(storage): add LIKE wildcard regression tests for % and _ in paths
Copilot Mar 24, 2026
f356b1e
chore(.squad): merge decision inbox and orchestration logs
Copilot Mar 24, 2026
5f67542
feat(state): consolidate Phase 2 SquadState facade onto sa-phase1-int…
Copilot Mar 24, 2026
b36ff13
fix(sdk): add state module to public API barrel with explicit exports
Copilot Mar 24, 2026
f1992d7
test(state): add 40 gap-coverage tests for Phase 2 facade
Copilot Mar 24, 2026
99c2d79
chore(scribe): Phase 2 review orchestration complete
Copilot Mar 24, 2026
5078f08
fix: resolve rebase conflicts — migrate upstream fs calls to StorageP…
Copilot Mar 24, 2026
8811777
feat(state): add ConfigCollection facade (Closes diberry/squad#7)
Copilot Mar 24, 2026
dfaf6fc
test(state): add adversarial markdown tests for history parsing (Clos…
Copilot Mar 24, 2026
b71abf6
fix(state): wrap parser exceptions with ParseError at facade boundary…
Copilot Mar 24, 2026
e595cf8
fix(state): extract moduleOwnership and projectContext from parsers
Copilot Mar 24, 2026
09edafc
refactor(cli): migrate spawn.ts and coordinator.ts to SquadState read…
Copilot Mar 24, 2026
5746a3d
refactor(cli): migrate lifecycle.ts to StorageProvider reads (#5)
Copilot Mar 24, 2026
c05b47e
refactor(cli): migrate cli-entry.ts status/cost to StorageProvider re…
Copilot Mar 24, 2026
d706a54
refactor(cli): migrate cast.ts to StorageProvider reads (#5)
Copilot Mar 24, 2026
a375bbc
refactor(cli): migrate import.ts to StorageProvider reads (#5)
Copilot Mar 24, 2026
1741d38
refactor(cli): migrate export.ts to StorageProvider reads (#5)
Copilot Mar 24, 2026
bfbc60f
refactor(cli): migrate build.ts to StorageProvider reads (#5)
Copilot Mar 24, 2026
55d73fb
chore: remove .squad state changes from storage provider branch
Copilot Mar 24, 2026
3e4c360
chore: revert non-StorageProvider file changes from branch
Copilot Mar 24, 2026
0c0992f
chore: revert all non-StorageProvider changes relative to PR base (di…
Copilot Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 214 additions & 40 deletions PUBLISH-README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,231 @@
# Publish Instructions for v0.8.22
# Release Playbook

## Quick Publish (Recommended)
This living playbook documents how to publish Squad releases to npm. Follow the recommended CI path whenever possible; use manual publish only as an emergency fallback.

```powershell
.\publish-0.8.22.ps1 -OTP <code-from-authenticator-app>
## Overview

Squad publishes two npm packages:
- `@bradygaster/squad-sdk` — the core SDK
- `@bradygaster/squad-cli` — the CLI tool (depends on the SDK)

**Package order matters:** always publish the SDK first, then the CLI. The CLI declares a version range dependency on the SDK, and npm registry needs time to propagate the SDK before the CLI can reference it safely.

Two publish channels exist:
- **Stable:** triggered by GitHub Release (recommended path)
- **Insider:** triggered by push to `insider` branch (for testing pre-release builds)

## Pre-Flight Checklist

Complete this before any publish attempt:

- [ ] All tests pass: `npm test` (expect 3,900+ tests)
- [ ] No `file:` references in any `packages/*/package.json`
- Check: `grep -r "file:" packages/*/package.json` should return nothing
- [ ] All `package.json` versions use valid semver (no `-preview` suffix for release)
- Release versions: `1.2.3`
- Pre-release versions: `1.2.3-preview.1`
- [ ] SDK dependency in `packages/squad-cli/package.json` is a version range, not `file:../squad-sdk`
- Example valid: `"@bradygaster/squad-sdk": "^0.9.2"`
- [ ] Build succeeds clean: `npm run build` (no TypeScript errors)
- [ ] Package validation passes:
```bash
npm -w packages/squad-sdk pack --dry-run
npm -w packages/squad-cli pack --dry-run
```
- [ ] Git tag matches version: `git tag` shows `v<VERSION>`
- [ ] `CHANGELOG.md` updated for this version
- [ ] GitHub Release draft created with notes

## Publish via CI (Recommended Path)

**This is the standard path for all releases.**

### Steps

1. In the GitHub UI, go to **Releases** → **Draft**
2. Finalize the release notes and click **Publish Release**
3. This triggers `squad-npm-publish.yml` automatically

### What the workflow does

The workflow runs four jobs in sequence:

1. **Preflight** — validates no `file:` dependencies exist
2. **Smoke test** — runs `npm pack --dry-run` and CLI integration tests
3. **Publish SDK** — publishes `@bradygaster/squad-sdk` with provenance attestation
4. **Publish CLI** — waits for SDK to succeed, then publishes `@bradygaster/squad-cli`

Each publish step:
- Verifies version matches the release tag
- Uses `npm -w packages/<pkg> publish --access public --provenance`
- Retries registry verification up to 5 times (15-second intervals) to account for propagation delay

### Monitor the workflow

Go to **Actions** → **Squad npm Publish** → select the latest run. All jobs must pass. If any job fails, see "Troubleshooting" below.

## Publish via workflow_dispatch (Manual Trigger)

**Use this when you need to republish without creating a new GitHub Release.**

### Steps

1. Go to **Actions** → **Squad npm Publish**
2. Click **Run workflow**
3. Enter the version string (e.g., `0.9.2`)
4. Click **Run workflow**

Same workflow runs as above. Use this to retry after a transient npm registry issue.

## Insider Channel

**For pre-release testing only.**

Pushes to the `insider` branch auto-trigger `squad-insider-publish.yml`, which:
- Publishes both SDK and CLI with `--tag insider`
- Skips the preflight job (insider builds may have experimental dependencies)
- Uses tag `insider` instead of `latest`

Install insider builds with:
```bash
npm install -g @bradygaster/squad-cli@insider
```

Users see the latest `latest` tag by default; they opt in to `insider` explicitly.

## Workspace Publish Policy

**NEVER use `npm publish` from the repo root.**

Using `npm publish` without workspace scope publishes the root `package.json` instead of the intended package. This breaks everything.

**ALWAYS use:**
```bash
npm -w packages/squad-sdk publish --access public
npm -w packages/squad-cli publish --access public
```

The CI workflows enforce this automatically via a lint rule. If you add any publish step to a workflow, it will be caught at CI gate.

For more details on this policy, see `.github/workflows/squad-ci.yml` → `publish-policy` job.

## Manual Local Publish (Emergency Fallback)

**Use this only when CI is broken and you must publish NOW.**

Prerequisites:
- `npm login` completed (or `NPM_TOKEN` environment variable set with a token from npmjs.com)
- Build succeeds locally: `npm run build`
- Pre-flight checklist passes

### Steps

1. Install dependencies and build:
```bash
npm ci && npm run build
```

2. Run the pre-flight checklist manually (above)

3. Publish SDK:
```bash
cd packages/squad-sdk
npm publish --access public --otp=<CODE>
cd ../..
```
Replace `<CODE>` with your 2FA code from the authenticator app.

4. Verify SDK is live (wait up to 60 seconds for registry propagation):
```bash
npm view @bradygaster/squad-sdk@<VERSION> version
```

5. Publish CLI:
```bash
cd packages/squad-cli
npm publish --access public --otp=<CODE>
cd ../..
```

6. Verify CLI is live:
```bash
npm view @bradygaster/squad-cli@<VERSION> version
```

### Critical rule

**Always publish SDK before CLI.** The CLI declares a dependency on the SDK, and npm needs the SDK version to exist in the registry.

### If SDK succeeds but CLI fails

Do NOT unpublish the SDK. Fix the CLI issue and republish the CLI. Both versions are already incremented; re-running the publish is safe.

## 422 Race Condition & npm Errors

During the v0.9.1 release, npm returned a 422 error ("Version already exists") even though the version hadn't been published yet. This was caused by `file:` dependencies confusing the version check.

### Error: 422 "Version already exists"

**First, verify whether the package is actually published:**
```bash
npm view @bradygaster/squad-<pkg>@<VERSION> version
```

This script will:
1. ✅ Publish squad-sdk@0.8.22 to npm
2. ✅ Publish squad-cli@0.8.22 to npm
3. ✅ Verify both packages are live
4. ✅ Bump all package.json to 0.8.23-preview.1
5. ✅ Commit and push to dev
- **If npm returns the version:** The publish succeeded. The 422 was a race condition. Move on.
- **If npm returns "404 Not Found":** The publish failed. Bump the version, fix the root issue, and re-publish.

### Error: 403 "Forbidden"

## Manual Publish (If you prefer)
Your `NPM_TOKEN` is expired or missing. Regenerate it at npmjs.com → **Access Tokens** → **Generate New Token** (Automation, no expiration).

```powershell
# Get OTP from your authenticator app, then:
### Error: ETARGET "No matching version"

# 1. Publish SDK
cd packages\squad-sdk
npm publish --access public --otp=<CODE>
cd ..\..
You published the SDK, but the CLI can't find the SDK version in the registry yet. **Wait 60 seconds** and retry. The CI workflow automatically retries 5 times with 15-second intervals.

# 2. Publish CLI
cd packages\squad-cli
npm publish --access public --otp=<CODE>
cd ..\..
### npm registry propagation

# 3. Verify both live
npm view @bradygaster/squad-sdk version # should show 0.8.22
npm view @bradygaster/squad-cli version # should show 0.8.22
npm takes 15–60 seconds to propagate a new package version to all edge caches. The CI workflow accounts for this with retry logic. If manual publishing, retry the CLI publish after waiting.

# 4. Bump to next preview version
# (Run publish-0.8.22.ps1 -OTP dummy -SkipBump to skip the actual publish
# but do the version bump, OR manually edit 3 package.json files)
## Post-Publish Verification

After publish completes (via CI or manual), verify both packages are live:

```bash
npm view @bradygaster/squad-sdk@<VERSION> version
npm view @bradygaster/squad-cli@<VERSION> version
npx @bradygaster/squad-cli@<VERSION> --version
```

## What's Ready
The third command does a fresh install and tests the CLI from npm. This confirms the build, packaging, and CLI entrypoint are all working.

Check GitHub Releases and confirm the release is marked as **Latest**.

## Version Bump After Publish

After a stable release, bump the repository versions for continued development:

1. Update all `package.json` files to the next preview version:
- `package.json` (root)
- `packages/squad-sdk/package.json`
- `packages/squad-cli/package.json`
- Format: `<MAJOR>.<MINOR>.<PATCH+1>-preview.1`

2. Commit to the dev branch (NOT main):
```bash
git add package.json packages/squad-sdk/package.json packages/squad-cli/package.json
git commit -m "chore: bump to next preview version"
git push origin dev
```

- ✅ Version 0.8.22 in all package.json files
- ✅ Build verified clean (3,768 tests pass)
- ✅ Git tag v0.8.22 created and pushed
- ✅ GitHub Release created
- ⏸️ Waiting on: 2FA code for npm publish
Example: if you just released `0.9.2`, bump to `0.9.3-preview.1`.

## After Publish
## Legacy Publish Scripts (Deprecated)

Both packages will be live at:
- https://www.npmjs.com/package/@bradygaster/squad-sdk/v/0.8.22
- https://www.npmjs.com/package/@bradygaster/squad-cli/v/0.8.22
The repo contains version-specific publish scripts:
- `publish-0.8.21.ps1`
- `publish-0.8.22.ps1`
- `publish-0.9.1.ps1`

Repository will be bumped to v0.8.23-preview.1 for continued development.
These are **deprecated.** They are version-specific and no longer maintained.

---
*Prepared by: Rabin (Distribution)*
**Do NOT create new version-specific publish scripts.** The CI workflows are the standard path. Existing scripts may be deleted in a future cleanup.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Squad

[English](README.md) | [中文](README.zh.md)

**AI agent teams for any project.** One command. A team that grows with your code.

[![Status](https://img.shields.io/badge/status-alpha-blueviolet)](#status)
Expand Down
Loading
Loading