How johash-dev/branch-sync works
Branch Sync Workbench is a local web-and-CLI tool for adapting changes between separately structured source and target repositories. Users bind a pair, scan changes, review assessed porting decisions, create and approve a scoped plan, implement in a target worktree, validate and independently review it, then record integration evidence. The server coordinates provider-backed jobs and the engine owns Git operations, workflow state, and persistence. README documents these capabilities; several internal links below are limited to the sampled imports and excerpts.
Main entry points: app.ts HTTP API · workflow.ts Sync workflow · providers.ts Agent providers · setup.ts Pair setup
Components 18
User experience
- Web workflows
packages/web/src/GapPage.tsx - API client
packages/web/src/api.ts - CLI commands
packages/server/src/cli.ts
Server coordination
- HTTP API
packages/server/src/app.ts - Job tracking
packages/server/src/jobs.ts - Change analysis
packages/server/src/analysis.ts - Pair setup
packages/server/src/setup.ts
Sync engine
- Sync workflow
packages/engine/src/workflow.ts - Git operations
packages/engine/src/git.ts - Domain schemas
packages/engine/src/schema.ts
Providers and records
- Agent providers
packages/server/src/providers.ts - Agent response parsing
packages/server/src/agent-json.ts - Cursor authentication
packages/server/src/cursor-auth.ts - Shared pair records
data/pairs - Run and workflow records
packages/engine/src/store.ts
Other components
- Workbench user
- Source and target repos
- Coding-agent tools
Connections 22
- Workbench user → Web workflows: uses
README.md - Workbench user → CLI commands: runs commands
README.md - Web workflows → API client: requests data
packages/web/src/GapPage.tsx - API client → HTTP API: calls API
packages/web/src/api.ts - CLI commands → HTTP API: uses running server
README.md - HTTP API → Pair setup: registers setup
packages/server/src/app.ts - HTTP API → Job tracking: tracks jobs
packages/server/src/app.ts - HTTP API → Change analysis: invokes analysis
packages/server/src/app.ts - Change analysis → Agent response parsing: parses replies
packages/server/src/analysis.ts - HTTP API → Agent providers: runs agent
packages/server/src/app.ts - Agent providers → Cursor authentication: resolves Cursor
packages/server/src/providers.ts - Agent providers → Agent response parsing: extracts JSON
packages/server/src/providers.ts - Agent providers → Coding-agent tools: invokes tool
README.md - HTTP API → Sync workflow: coordinates sync
- Sync workflow → Git operations: calls Git
packages/engine/src/workflow.ts - Sync workflow → Run and workflow records: persists workflow
packages/engine/src/workflow.ts - Sync workflow → Source and target repos: scans and edits
README.md - Pair setup → Shared pair records: uses pair configs
README.md - Pair setup → Run and workflow records: saves bindings
README.md - Run and workflow records → Shared pair records: reads shared records
packages/engine/src/store.ts - Sync workflow → Domain schemas: validates records
packages/engine/src/workflow.ts - Workbench user → Source and target repos: selects checkouts
README.md