Repository navigation
v0.73.0
Getting started
- Sign up free at studio.poly.ai
- Install:
uv tool install polyai-adk - Set up:
poly setup(signs you in, saves an API key, installs shell completion and AI coding-agent skills)
Already installed? Run poly update to get this release and the latest skills.
v0.73.0 (2026-10-23)
This release is published under the Apache-2.0 License.
Features
Summary
Adds --keep-files, --create and --from to poly branch switch, so a project's tracked Agent Studio branch can be moved to match a git branch without overwriting the files git just checked out.
Motivation
When a project lives in a git repo and each git branch maps to an Agent Studio branch of the same name, the two drift apart: the tracked branch lives in the gitignored _gen/.agent_studio_config, so git switch doesn't move it. No CLI command could line them up without side effects:
poly branch switch <name>pulls the branch's state into the project files. It refuses while there are local changes, and--forcediscards them, so aftergit switchit either refuses or overwrites what git checked out. -poly branch create <name>keeps local files, but fails once the branch exists.
Scripts worked around this by calling ADK internals. Now one command does it:
bash poly branch switch "$(git branch --show-current)" --create --from main --keep-files
Changes
poly branch switch --keep-filestracks the target branch and refreshes the remote state without writing any project files, sopoly statusandpoly pushcompare the working copy against that branch. It skips the uncommitted-changes check and can't be combined with--forceor--format. -poly branch switch --create/-ccreates the branch if it doesn't exist, with the same sourcing rules aspoly branch create: from the current branch, or from--from BRANCH. An existing branch is just switched to. ---fromwithout--createis rejected. ---jsonoutput gains"created", and validation errors (missing branch, uncommitted changes, conflicting flags) are now reported as{"success": false, "error": ...}with exit code 1, instead of as plain text. - The logic and validation live inAgentStudioProject.switch_branch, which takes newkeep_files,createandsource_branch_namearguments. Its return type is unchanged. - Updated thepoly branchCLI reference, the
branches guide and thepoly-adk-branchingskill.
Test strategy
- Added/updated unit tests - [ ] Manual CLI testing (
poly <command>) - [ ] Tested against a live Agent Studio project - [ ] N/A (docs, config, or trivial change)
New SwitchBranchTest cases in project_test.py cover: refusing with local changes, keep_files switching without pulling, a missing branch with and without create, creating from the current branch and from --from, create on an existing branch, and the conflicting-flag errors. New BranchSwitchTest cases in cli_test.py cover argument parsing and forwarding, "created" in --json output, and --json error output. Not yet tried by hand against a live project.
Checklist
-
ruff check .andruff format --check .pass - [x]pytestpasses - [x] No breaking changes to thepolyCLI interface (or migration path documented) - [x] PR title follows conventional commits, and its type matches the change (feat:for anything user-visible; see CONTRIBUTING.md) - [x] User-facing changes are reflected indocs/docs/,src/poly/docs/(resource shapes) andskills/
🤖 Generated with Claude Code
Co-authored-by: Claude Opus 5.5 (1M context) noreply@anthropic.com
Detailed Changes: v0.72.0...v0.73.0