diff --git a/.github/workflows/squad-ci.yml b/.github/workflows/squad-ci.yml index 50d72797f..884e3c2d4 100644 --- a/.github/workflows/squad-ci.yml +++ b/.github/workflows/squad-ci.yml @@ -2,10 +2,10 @@ name: Squad CI on: pull_request: - branches: [dev, preview, main, insider] + branches: [dev, preview, main] types: [opened, synchronize, reopened, edited] push: - branches: [dev, insider] + branches: [dev] permissions: contents: read @@ -296,7 +296,7 @@ jobs: always() && steps.labels.outputs.skip_version != 'true' && vars.SQUAD_VERSION_CHECK != 'false' - && github.event.pull_request.base.ref != 'insider' + && true run: | echo "## 🏷️ Prerelease Version Guard" >> $GITHUB_STEP_SUMMARY node -e " diff --git a/.github/workflows/squad-insider-publish.yml b/.github/workflows/squad-insider-publish.yml index acc830de8..4de4815ac 100644 --- a/.github/workflows/squad-insider-publish.yml +++ b/.github/workflows/squad-insider-publish.yml @@ -1,9 +1,14 @@ name: Publish Insider to npm on: - push: - branches: - - insider + workflow_dispatch: + inputs: + dry_run: + description: 'Dry run — validate build without publishing' + required: false + default: 'false' + type: choice + options: ['false', 'true'] concurrency: group: ${{ github.workflow }} @@ -21,6 +26,8 @@ jobs: node-version: [22] steps: - uses: actions/checkout@v4 + with: + ref: dev - uses: ./.github/actions/setup-squad-node with: @@ -75,6 +82,8 @@ jobs: node-version: [22] steps: - uses: actions/checkout@v4 + with: + ref: dev - uses: ./.github/actions/setup-squad-node with: diff --git a/.github/workflows/squad-insider-release.yml b/.github/workflows/squad-insider-release.yml deleted file mode 100644 index f266b1fe2..000000000 --- a/.github/workflows/squad-insider-release.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Squad Insider Release - -on: - push: - branches: [insider] - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: false - -permissions: - contents: write - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Run tests - run: node --test test/*.test.cjs - - - name: Read version from package.json - id: version - run: | - VERSION=$(node -e "console.log(require('./package.json').version)") - SHORT_SHA=$(git rev-parse --short HEAD) - INSIDER_VERSION="${VERSION}-insider+${SHORT_SHA}" - INSIDER_TAG="v${INSIDER_VERSION}" - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - echo "short_sha=$SHORT_SHA" >> "$GITHUB_OUTPUT" - echo "insider_version=$INSIDER_VERSION" >> "$GITHUB_OUTPUT" - echo "insider_tag=$INSIDER_TAG" >> "$GITHUB_OUTPUT" - echo "📦 Base Version: $VERSION (Short SHA: $SHORT_SHA)" - echo "🏷️ Insider Version: $INSIDER_VERSION" - echo "🔖 Insider Tag: $INSIDER_TAG" - - - name: Create git tag - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git tag -a "${{ steps.version.outputs.insider_tag }}" -m "Insider Release ${{ steps.version.outputs.insider_tag }}" - git push origin "${{ steps.version.outputs.insider_tag }}" - - - name: Create GitHub Release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release create "${{ steps.version.outputs.insider_tag }}" \ - --title "${{ steps.version.outputs.insider_tag }}" \ - --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @bradygaster/squad-cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ - --prerelease - - - name: Verify release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release view "${{ steps.version.outputs.insider_tag }}" - echo "✅ Insider Release ${{ steps.version.outputs.insider_tag }} created and verified." diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a4add3097..0650b27a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -336,10 +336,12 @@ You don't need to manually version — changesets handle it. ## Branch Strategy - **main** — Stable, published releases. All merges include changesets. -- **insider** — Pre-release features, edge cases. Tag releases as `@insider`. +- **preview** — Staging branch for release candidates (promote: dev → preview → main). - **bradygaster/dev** — Integration branch. **All PRs from forks must target this branch**, not `main`. - **user/issue-slug** — Feature branches from users or agents. +> **Note:** The `insider` npm tag (`@bradygaster/squad-cli@insider`) publishes from `dev` via manual workflow dispatch. There is no separate insider branch. + ## Continuous Integration GitHub Actions runs on every push: diff --git a/README.md b/README.md index 95c88cc5e..3185d545b 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Use `--force` to re-apply updates even when your installed version already match |---------|-------------| | `squad init` | **Init** — scaffold Squad in the current directory (idempotent — safe to run multiple times); alias: `hire`; use `--global` to init in personal squad directory, `--mode remote ` for dual-root mode | | `squad upgrade` | Update Squad-owned files to latest; never touches your team state; use `--global` to upgrade personal squad, `--migrate-directory` to rename `.ai-team/` → `.squad/` | -| `squad upgrade --self` | Update the Squad CLI package itself; add `--insider` for prerelease builds | +| `squad upgrade --self` | Update the Squad CLI package itself; add `--insider` for dev-channel prerelease builds | | `squad status` | Show which squad is active and why | | `squad triage` | **Watch mode** — poll for issues and auto-triage to team (aliases: `watch`, `loop`); use `--interval ` to set polling frequency (default: 10); with `--execute` dispatch Copilot agents; use `--agent-cmd`, `--copilot-flags`, `--auth-user` to customize agent execution; `--health` shows watch status; `--log-file` for diagnostics | | `squad copilot` | Add/remove the Copilot coding agent (@copilot); use `--off` to remove, `--auto-assign` to enable auto-assignment | diff --git a/docs/src/content/docs/features/self-upgrade.md b/docs/src/content/docs/features/self-upgrade.md index a7e8b2936..20fd7f86a 100644 --- a/docs/src/content/docs/features/self-upgrade.md +++ b/docs/src/content/docs/features/self-upgrade.md @@ -18,7 +18,7 @@ squad upgrade --self --insider squad upgrade --self && squad upgrade ``` -Squad can upgrade itself to the latest stable or insider release, then automatically refresh your repo templates. +Squad can upgrade itself to the latest stable or insider release, then automatically refresh your repo templates. Insider builds are published from the `dev` branch to the npm `insider` dist-tag. --- diff --git a/docs/src/content/docs/guide/contributing.md b/docs/src/content/docs/guide/contributing.md index 251d04c8d..780259f8f 100644 --- a/docs/src/content/docs/guide/contributing.md +++ b/docs/src/content/docs/guide/contributing.md @@ -252,10 +252,12 @@ You don't need to manually version — changesets handle it. ## Branch Strategy - **main** — Stable, published releases. All merges include changesets. -- **insider** — Pre-release features, edge cases. Tag releases as `@insider`. +- **preview** — Staging branch for release candidates (promote: dev → preview → main). - **bradygaster/dev** — Integration branch. **All PRs from forks must target this branch**, not `main`. - **user/issue-slug** — Feature branches from users or agents. +> **Note:** The `insider` npm tag (`@bradygaster/squad-cli@insider`) publishes from `dev` via manual workflow dispatch. There is no separate insider branch. + ## Continuous Integration GitHub Actions runs on every push: diff --git a/docs/src/content/docs/insider-program.md b/docs/src/content/docs/insider-program.md index d1b8f9d80..1f036e2a7 100644 --- a/docs/src/content/docs/insider-program.md +++ b/docs/src/content/docs/insider-program.md @@ -6,7 +6,7 @@ Get early access to Squad development builds and shape the future of the project ## What Is the Insider Program? -The Insider Program gives you continuous access to development builds of Squad. Insiders run code from the `insider` branch — the bleeding edge where new features land first. It's a lightweight, honor-system program designed for developers who want to: +The Insider Program gives you continuous access to development builds of Squad. Insiders run code published from the `dev` branch — the bleeding edge where new features land first. It's a lightweight, honor-system program designed for developers who want to: - **Try new features early** — Before they ship in a release - **Help catch bugs** — Report issues before they reach stable versions @@ -15,6 +15,20 @@ The Insider Program gives you continuous access to development builds of Squad. --- +## How It Works + +Insider builds are published from the `dev` branch to the npm `insider` dist-tag via a manual workflow dispatch. There is no separate `insider` branch — `dev` is the single source of truth for all development. + +``` +dev (development) → npm @insider tag (on demand) + ↓ +preview (staging) → release candidate validation + ↓ +main (stable) → npm @latest tag +``` + +--- + ## How to Install and Upgrade ### Install Insider Build @@ -32,15 +46,21 @@ squad upgrade This updates Squad-owned files (`squad.agent.md`, workflows, templates) to the latest insider build. Your `.squad/` team state (agents, decisions, casting, history) is always preserved. +### Self-Upgrade to Insider + +```bash +squad upgrade --self --insider +``` + --- ## What to Expect ### You'll Get -- **Continuous updates** — The insider branch is always ahead of `main` -- **New features** — Preview functionality months before stable releases -- **Direct access** — Pull latest with a single command +- **Continuous updates** — Insider publishes from `dev` whenever maintainers trigger it +- **New features** — Preview functionality before stable releases +- **Direct access** — Install latest with a single command - **Community input** — Your feedback shapes prioritization ### You Might Hit @@ -54,60 +74,19 @@ This updates Squad-owned files (`squad.agent.md`, workflows, templates) to the l --- -## Version Format - -Insider builds use this version scheme: - -``` -v0.5.2-insider+abc1234f -``` - -Where: -- `v0.5.2` — The semver for the upcoming release -- `insider` — Insider build flag -- `abc1234f` — Commit hash (first 8 chars) - -You'll see this in your `squad.agent.md` HTML version comment: - -```markdown - -``` - -**Pin a specific tagged version:** - -```bash -npm install -g @bradygaster/squad-cli@0.5.2-insider -``` - ---- - ## Reporting Issues Found a bug? We want to hear about it. **Open a GitHub issue** with: -1. **Version** — Full version from your `squad.agent.md` +1. **Version** — Full version from `squad --version` 2. **What happened** — Clear description of the bug 3. **Steps to reproduce** — Exact steps to trigger it 4. **Environment** — CLI or VS Code, Node version, OS **Label it with `[INSIDER]`** so we can track insider-specific issues. -Example: - -``` -Title: [INSIDER] Squad crashes on init with Node 20 - -Version: v0.4.2-insider+abc1234f -Environment: CLI on macOS 14.1, Node 20.11.0 - -Steps: -1. npm install -g @bradygaster/squad-cli@insider -2. Follow quick start -3. Error in squad.agent.md... -``` - --- ## Opting Out @@ -126,7 +105,7 @@ This installs the latest stable version. Your `.squad/` state is safe — it'll ### Q: Will insider builds break my project? -**A:** Unlikely, but possible. The insider branch is tested before pushing, but it's less stable than releases. Make sure you can roll back if needed. +**A:** Unlikely, but possible. Insider builds from `dev` are tested via CI, but less stable than releases. Make sure you can roll back if needed. ### Q: Can I switch between insider and stable builds? @@ -134,7 +113,7 @@ This installs the latest stable version. Your `.squad/` state is safe — it'll ### Q: How often do insider builds update? -**A:** As often as commits land on the `insider` branch. Could be daily, could be weekly — depends on the dev cycle. Run `npm install -g @bradygaster/squad-cli@insider` again to fetch the latest. +**A:** Whenever maintainers trigger the insider publish workflow from `dev`. Run `npm install -g @bradygaster/squad-cli@insider` again to fetch the latest. ### Q: Will my team state be preserved? diff --git a/docs/src/content/docs/reference/cli.md b/docs/src/content/docs/reference/cli.md index b3f9e76bd..f986bb787 100644 --- a/docs/src/content/docs/reference/cli.md +++ b/docs/src/content/docs/reference/cli.md @@ -404,7 +404,7 @@ The doctor always exits cleanly (no error code) because it's a diagnostic tool, squad --version # Check version npm install -g @bradygaster/squad-cli@latest # Update npm install -g @bradygaster/squad-cli@1.2.3 # Pin version -npm install -g @bradygaster/squad-cli@insider # Insider builds +npm install -g @bradygaster/squad-cli@insider # Dev-channel prerelease builds ``` ---