Skip to content

Improve dev init: confirm install or detect migration#35

Merged
jonathonbyrdziak merged 1 commit intomasterfrom
fix/init-dev-flow-clarity
Mar 20, 2026
Merged

Improve dev init: confirm install or detect migration#35
jonathonbyrdziak merged 1 commit intomasterfrom
fix/init-dev-flow-clarity

Conversation

@jonathonbyrdziak
Copy link
Copy Markdown
Contributor

Summary

Depends on #34. After choosing "Development", the flow is now:

No protocol.json:

New Project
Protocol is not installed in this directory.

Install Protocol in /path/to/project ? [Y/n]

Then routes to new project (no git) or existing repo (has git) automatically.

Has protocol.json with old schema:

Migration Required
Project: my-project
Schema version: v0 → v1

Migrate to the latest version? [Y/n]

Has protocol.json, up to date: shows the settings/update menu as before.

Test plan

  • protocol init → dev → in dir without protocol.json → should confirm install with directory path
  • Say no → exits cleanly
  • Say yes in git repo → existing repo flow (no Docker question)
  • Say yes in empty dir → new project flow
  • protocol init → dev → in dir with old protocol.json → should show migration prompt with versions
  • protocol init → dev → in dir with current protocol.json → should show update menu

🤖 Generated with Claude Code

When choosing development environment:

- No protocol.json: asks "Install Protocol in <directory>?" with a
  clear confirmation before proceeding. Then routes to new project
  or existing repo based on whether git is initialized.

- Has protocol.json with old schema: alerts the user with version
  numbers and asks if they want to migrate, instead of dumping them
  into a menu.

- Has protocol.json, up to date: shows the update/settings menu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jonathonbyrdziak jonathonbyrdziak merged commit aad3564 into master Mar 20, 2026
6 of 8 checks passed
@jonathonbyrdziak jonathonbyrdziak deleted the fix/init-dev-flow-clarity branch March 20, 2026 19:56
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