Skip to content

fix: stamp CLI version in squad.agent.md during init/upgrade (#321)#409

Merged
bradygaster merged 1 commit intodevfrom
squad/321-stamp-version-in-agent-md
Mar 15, 2026
Merged

fix: stamp CLI version in squad.agent.md during init/upgrade (#321)#409
bradygaster merged 1 commit intodevfrom
squad/321-stamp-version-in-agent-md

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

Summary

Both squad init and squad upgrade now update the <!-- version: X.Y.Z --> comment in .github/agents/squad.agent.md to match the installed CLI version. The Identity Version line and Squad v{version} greeting placeholder are also stamped.

Working as GNC (Node.js Runtime)

Closes #321

Changes

  • packages/squad-sdk/src/config/init.ts: stampVersionInContent() now replaces all 3 version locations (HTML comment, Identity Version line, {version} placeholder) — previously only the HTML comment
  • packages/squad-cli/src/cli/core/init.ts: Calls stampVersion() after SDK creates the file (belt-and-suspenders)
  • packages/squad-cli/src/cli/core/upgrade.ts: Removed duplicate local stampVersion(), readInstalledVersion(), and getCLIVersion() — now uses shared utilities from version.ts
  • packages/squad-cli/src/cli/core/version.ts: Updated regex to handle pre-release versions with dot suffix (e.g., 0.8.0-alpha.1)
  • test/cli/init.test.ts: Added test verifying HTML comment, Version line, and placeholder are stamped with current CLI version
  • test/cli/upgrade.test.ts: Added assertions for Identity Version line and placeholder stamping after upgrade

Testing

  • All 22 init+upgrade tests pass
  • Full test suite: 150/152 passed (2 pre-existing infra failures: Docker/Astro not available)

Both squad init and squad upgrade now update the version comment
in .github/agents/squad.agent.md to match the installed CLI version.

Changes:
- SDK stampVersionInContent() now replaces all 3 version locations
  (HTML comment, Identity Version line, {version} placeholder)
- CLI init.ts calls stampVersion() after SDK creates the file
- CLI upgrade.ts uses shared version utilities from version.ts
- version.ts regex updated to handle pre-release with dot suffix

Previously the SDK only stamped the HTML comment, and the init
command had no post-creation stamping, leaving stale version identity.

Closes #321

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster force-pushed the squad/321-stamp-version-in-agent-md branch from 754e5ec to 07d6662 Compare March 15, 2026 14:18
@bradygaster bradygaster merged commit 370a430 into dev Mar 15, 2026
1 check passed
@bradygaster bradygaster deleted the squad/321-stamp-version-in-agent-md branch March 15, 2026 14:22
tamirdresher pushed a commit to tamirdresher/squad that referenced this pull request Mar 16, 2026
… (#475)

Add tab-cycling support to InputPrompt. Pressing tab on @partial or /partial
cycles through matching agent names or slash commands. Resets on any other
keystroke. Agent names passed from App.tsx via agentNames prop.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant