Skip to content

fix(sdk,cli): remove prerelease version suffixes#687

Closed
diberry wants to merge 14 commits intobradygaster:devfrom
diberry:squad/fix-prerelease-versions
Closed

fix(sdk,cli): remove prerelease version suffixes#687
diberry wants to merge 14 commits intobradygaster:devfrom
diberry:squad/fix-prerelease-versions

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Mar 29, 2026

What

Resets prerelease version strings to release versions in SDK and CLI package.json.

Why

The \dev\ branch has \


Fork PR: diberry#116

Merge Order

These 3 PRs form a dependency chain — merge in this order:

  1. PR: fix(sdk,cli): remove prerelease version suffixes (from fork PR feat: Extract cold-path sections from squad.agent.md (#98) #116) — fixes dev branch versions
  2. PR: feat(ci): add workspace integrity, prerelease guard, and export smoke gates (from fork PR chore: Remove .ai-team/ deprecation banner (#71) #115) — adds CI enforcement
  3. PR: docs(skill): add versioning policy (from fork PR chore: standardize timestamps to ISO 8601 UTC #117) — documents the rules

Copilot bot and others added 14 commits March 27, 2026 13:40
Fork-specific workflow skills for PR hygiene:
- fork-first-pipeline: review on fork before opening upstream PRs
- bleed-check: twice-daily cross-branch audit for stowaway files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds Step 5.5 REBASE with guidance on rebasing feature branches against origin/dev to avoid full-file rewrites on shared files. Includes Shared File Strategy for surgical additions and When Rebase Fails recovery steps. Updates anti-patterns table to flag 'Skip rebase before upstream'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…, conventions)

- Fork-first-pipeline: Added serial branch operations warning, force-add note for gitignored skills, stale comments check
- Bleed-check: Added high-risk shared files callout, convention gate checks, CI path debugging pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Dual Reviewer Gate: both Flight and FIDO must approve
- Convention Issues Are Blockers: /docs/ prefix, double blanks, table order, whitespace
- Review→Fix→Re-review Loop: both reviewers must re-review after fixes
- Reviewer Lockout: locked authors cannot self-fix after rejection
- Known PAO Quirks: watch for .squad/ files, /docs/ prefix, verification before push
- Review Comments: formal PR comment format and verdict options
- Tamir Reviewer Rule: only on upstream PRs with source material
- Commit Hygiene: one commit, amend fixups, force-push safely, verify before push

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a PR completes the full fork pipeline (Flight+FIDO approved, bleed check passed, squashed, rebased, moved to upstream targeting Brady's dev), the upstream PR should be undrafted immediately.

The upstream PR is the final presentation — draft PRs signal incomplete work, but at this stage all iteration is finished on the fork.

Add gh pr ready command to Step 7 (UPSTREAM) as the final action after opening the upstream PR.

Add anti-pattern entry for leaving upstream PRs in draft.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validates that the squad-main-guard.yml workflow was properly removed:
- v0.5.4 migration in index.js correctly targets and deletes the guard
- TEMPLATE_MANIFEST has no reference to squad-main-guard.yml
- SDK init and CLI init/upgrade never create the guard workflow
- No remaining workflow templates block .squad/ paths on push to main

10 tests covering guard removal, template manifest, init/upgrade safety,
and workflow template scanning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Updated fork-first-pipeline skill with PR bradygaster#640 retrospective learnings
- .squad/ decisions and state synced
- Merged inbox decisions into decisions.md and decisions-archive.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prevents .squad/ stowaways on feature branches.
Learned from 3 incidents on PR bradygaster#640.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- .github/PR_REQUIREMENTS.md: versioned canonical spec (from #106 PRD)
- .github/PULL_REQUEST_TEMPLATE.md: author-facing checklist

Addresses Challenger FATAL finding: spec must be versioned, not mutable issue.
Part of #106.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds .github/PR_REQUIREMENTS.md (versioned spec with 6 categories, CRUD-on-CLI/SDK user-facing definition, waiver process, exemptions) and .github/PULL_REQUEST_TEMPLATE.md (author-facing checklist). Part 1 of 2 for repo health -- #104 will automate enforcement.

Closes Phase 2 of #106

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Part 2 of 2 for repo health. Adds two automated CI enforcement gates to squad-ci.yml:

1. CHANGELOG gate -- requires CHANGELOG.md update when SDK/CLI source changes
2. Exports map check -- verifies package.json exports match barrel files

Both feature-flagged (vars.SQUAD_CHANGELOG_CHECK, vars.SQUAD_EXPORTS_CHECK) with skip labels. Includes test coverage for check-exports-map.mjs.

Refs #104

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes #103

Adds samples-build CI job that validates all 11 samples compile when SDK changes.
- Loops samples/ directories with npm install/build/test
- Feature-flagged via skip-samples-build label
- 15-minute timeout, --ignore-scripts, npm cache
- Accepted Copilot suggestions: cache-dependency-path, workspace root install

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resets 0.9.1-build.N versions to 0.9.1 in SDK and CLI package.json.
Prerelease suffixes cause npm to silently resolve stale registry
packages instead of local workspace links (semver prerelease behavior).

This unblocks the new prerelease-version-guard CI gate (PR #115).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 29, 2026 16:26
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 29, 2026

Superseded by new PR with clean branch from upstream/dev (no fork-specific commits).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR normalizes package versions to release SemVer (removing prerelease/build suffixes) and adds new CI + repository hygiene checks (exports map validation, CHANGELOG gating, samples build gate), along with supporting tests/scripts and related documentation/process updates.

Changes:

  • Reset workspace package versions to release versions (e.g., @bradygaster/squad-cli0.9.1) and update package-lock.json accordingly.
  • Add CI gates for CHANGELOG enforcement, SDK exports-map validation, and sample build/test validation (plus a script + tests to support the exports-map gate).
  • Add/adjust docs and process artifacts (new “Nap vs /compact” doc, PR template + requirements, skills/decisions updates).

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
packages/squad-cli/package.json Removes prerelease/build suffix from CLI version.
package-lock.json Lockfile updates reflecting workspace/version/dependency state (incl. typedoc-related entries).
.github/workflows/squad-ci.yml Adds CI gates (CHANGELOG gate, exports-map check, samples build gate).
scripts/check-exports-map.mjs New script to verify SDK barrel directories are present in package.json exports.
test/check-exports-map.test.ts Verifies the exports-map checker script runs and emits expected output.
test/guard-removal.test.ts Adds regression tests around guard workflow removal and ensuring it isn’t recreated.
docs/src/content/docs/features/context-hygiene.md Refines Nap description and adds a link to the new “Nap vs /compact” page.
docs/src/content/docs/concepts/nap-vs-compact.md New concept page comparing Nap vs /compact.
.github/PULL_REQUEST_TEMPLATE.md New PR template with testing/docs/exports checklists.
.github/PR_REQUIREMENTS.md New “PR Requirements” spec document.
.copilot/skills/bleed-check/SKILL.md New skill documentation for bleed-check audits.
.squad/skills/fork-first-pipeline/SKILL.md New skill documenting a fork-first PR pipeline.
.squad/decisions.md Reorganizes/updates decisions content and appends newer entries.
.squad/decisions-archive.md Archives older decisions entries moved from .squad/decisions.md.
.squad/decisions/inbox/retro-copilot-git-safety.md Removes inbox entry (content appears consolidated elsewhere).
.squad/decisions/inbox/booster-ci-deletion-guard.md Removes inbox entry (content appears consolidated elsewhere).

```

In the interactive shell, use `/compact` for the same effect.
> **Note:** For session-level conversation compression, use `/compact` in the Copilot CLI interactive shell. See [Nap vs /compact](/concepts/nap-vs-compact) for the difference between team state cleanup and session transcript compression.
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

Docs in this repo primarily use relative links between pages (e.g. ../features/...). This absolute link (/concepts/nap-vs-compact) is inconsistent and may break depending on the docs base path; prefer a relative link to the new concept page (e.g. ../concepts/nap-vs-compact).

Suggested change
> **Note:** For session-level conversation compression, use `/compact` in the Copilot CLI interactive shell. See [Nap vs /compact](/concepts/nap-vs-compact) for the difference between team state cleanup and session transcript compression.
> **Note:** For session-level conversation compression, use `/compact` in the Copilot CLI interactive shell. See [Nap vs /compact](../concepts/nap-vs-compact) for the difference between team state cleanup and session transcript compression.

Copilot uses AI. Check for mistakes.
Comment on lines +169 to +175
await runUpgrade(tmpDir).catch(() => {
// Upgrade may fail in test env (missing git, etc.) — that's OK
});

// Guard must still be absent
expect(existsSync(guardPath)).toBe(false);
});
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

This test swallows any runUpgrade error, which can mask regressions (e.g. upgrade failing before workflows/templates are applied). Since runInit is already called, prefer asserting upgrade succeeds (or assert only specific expected failure modes) so the test actually validates post-upgrade behavior.

Suggested change
await runUpgrade(tmpDir).catch(() => {
// Upgrade may fail in test env (missing git, etc.) — that's OK
});
// Guard must still be absent
expect(existsSync(guardPath)).toBe(false);
});
await runUpgrade(tmpDir);
// Guard must still be absent
expect(existsSync(guardPath)).toBe(false);
});
expect(existsSync(guardPath)).toBe(false);
});

Copilot uses AI. Check for mistakes.
<!-- Approach taken. Key design decisions and trade-offs. -->

### Testing
<!-- What was tested and how. "npm run preflight" output or CI green. -->
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

The template references npm run preflight, but there is no preflight script in the root package.json. Either add that script (e.g., build + test) or update the wording to the actual commands contributors should run.

Suggested change
<!-- What was tested and how. "npm run preflight" output or CI green. -->
<!-- What was tested and how. "npm run build && npm test" output or CI green. -->

Copilot uses AI. Check for mistakes.
**Note on `.squad/skills/` files**: The `.squad/skills/` directory may be gitignored in some configurations. If you need to commit skill files to the fork, use `git add -f` to force them through, even if they match `.gitignore` patterns.

### Step 7: UPSTREAM
Open PR on upstream repository against radygaster/squad:dev:
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

Typo in repo name: radygaster/squad should be bradygaster/squad.

Suggested change
Open PR on upstream repository against radygaster/squad:dev:
Open PR on upstream repository against bradygaster/squad:dev:

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +34
All open PRs by **diberry** targeting **bradygaster/squad**

Query:
\\\ash
gh pr list --author diberry --repo bradygaster/squad --base dev --state open
\\\
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

This skill uses malformed command fences like \\\�ash and \\\ blocks; they include a control character and won’t render as intended. Please convert these to standard fenced code blocks (triple backticks) like the other skills under .copilot/skills/.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +4
---
title: Nap vs /compact
description: How Squad nap and Copilot CLI /compact solve different memory problems at different layers.
---
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

This new page is linked from other docs, but it isn’t listed in docs/src/navigation.ts under the Concepts section. If navigation is intended to be curated via NAV_SECTIONS, add an entry for this page so it’s discoverable in the sidebar.

Copilot uses AI. Check for mistakes.

import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import {
mkdirSync, writeFileSync, readFileSync, rmSync,
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

writeFileSync is imported but never used in this test file. Please remove the unused import to keep the helper set minimal and avoid confusion.

Suggested change
mkdirSync, writeFileSync, readFileSync, rmSync,
mkdirSync, readFileSync, rmSync,

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +22
\\\
BRANCH → FORK PR → PREFLIGHT → REVIEW → FIX → BLEED CHECK → CLEAN → UPSTREAM → DONE
\\\

### Step 1: BRANCH
Create a feature branch locally:
\\\ash
git checkout -b squad/{issue-number}-{slug}
\\\
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

This file contains malformed command fences like \\\�ash / \\\ash and standalone \\\ separators, which include a control character and won’t render as code blocks. Replace these with normal fenced code blocks (triple backticks) consistent with other skills in this repo.

Copilot uses AI. Check for mistakes.
Comment on lines +94 to +98
// Run all migrations in a temp dir — none should create the guard
const tmpDir = makeTempDir();
try {
mkdirSync(join(tmpDir, '.github', 'workflows'), { recursive: true });
await runMigrations(tmpDir, '0.0.0', '99.0.0');
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

runMigrations() in cli/core/migrations operates on the squad directory (.squad/ or .ai-team/), but this test passes tmpDir (project root) and then asserts on tmpDir/.github/workflows/.... As written, the test doesn’t meaningfully validate migrations behavior; consider creating tmpDir/.squad and passing that path (or testing via runUpgrade, which wires migrations correctly).

Suggested change
// Run all migrations in a temp dir — none should create the guard
const tmpDir = makeTempDir();
try {
mkdirSync(join(tmpDir, '.github', 'workflows'), { recursive: true });
await runMigrations(tmpDir, '0.0.0', '99.0.0');
// Run all migrations in a temp project dir — none should create the guard
const tmpDir = makeTempDir();
try {
// Simulate a real project: project root with .github and a .squad team directory
mkdirSync(join(tmpDir, '.github', 'workflows'), { recursive: true });
const squadDir = join(tmpDir, '.squad');
mkdirSync(squadDir, { recursive: true });
await runMigrations(squadDir, '0.0.0', '99.0.0');

Copilot uses AI. Check for mistakes.
{
"name": "@bradygaster/squad-cli",
"version": "0.9.1-build.4",
"version": "0.9.1",
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

This PR is titled/descoped as a prerelease version-suffix reset, but it also introduces substantial CI/docs/tests/skills/decision changes. Consider splitting the version bump into its own PR (or expanding the PR description) so reviewers can evaluate unrelated behavior changes independently.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants