OpenCode Fleet is a coordinator workspace for multi-repo OpenCode execution.
The intended user experience is simple: start opencode in this folder, describe the cross-repo change in plain language, and let the coordinator drive the impacted repositories in the right order.
This repo now includes a self-contained two-service showcase in subfolders:
customer-serviceis a Spring Boot producer that exposesGET /customers/{customerId}on port8081order-serviceis a Spring Boot consumer that exposesGET /orders/{orderId}/summaryon port8082and callscustomer-service
That gives you three OpenCode entry points to try:
opencodein this root coordinator workspaceopencodeincustomer-service/opencodeinorder-service/
- Keeps one
opencode serveinstance per repository - Tracks workflow session IDs per repo in
.fleet-state.json - Fans out impact-analysis prompts across all repos
- Sends repo-specific implementation prompts only where needed
- Keeps rollout notes in
change-tracker.md - Syncs saved repo-session results back into
change-tracker.md
- Install coordinator dependencies.
npm install- Copy the sample registry. The example already points at the bundled showcase repos.
cp repos.example.json repos.json- Start both Spring Boot apps.
./start-showcase.sh- In another terminal, start one
opencode servebackend per demo repo.
./start-opencode-servers.sh- Start
opencodein this coordinator workspace and describe the cross-repo change in natural language.
opencodeIf you prefer to run the pieces manually instead of using the helper scripts:
./customer-service/gradlew -p ./customer-service bootRun
./order-service/gradlew -p ./order-service bootRun(cd customer-service && opencode serve --port 4001)
(cd order-service && opencode serve --port 4002)Coordinate a change across the bundled demo services.
customer-service runs on OpenCode port 4001 and order-service runs on 4002.
Add loyaltyStatus to the customer response, propagate it into the order summary response, keep the rollout backward compatible, and update tests.
A good rollout order is:
- update
customer-serviceto expose the new field - update
order-serviceto consume it safely
That is exactly the kind of cross-repo change this workspace is for.
src/fleet.ts- internal orchestration engine used by the coordinatorrepos.example.json- public-safe template for the bundled repo registryrepos.json- local repo/server registry copied from the example file.fleet-state.json- generated workflow/session statechange-tracker.md- human checklist for cross-repo workcustomer-service/- demo producer repo with its ownAGENTS.mdandopencode.jsonorder-service/- demo consumer repo with its ownAGENTS.mdandopencode.jsonshared-rules/- OpenCode coordination rules for this workspacestart-showcase.sh- starts both Spring Boot demo appsstart-opencode-servers.sh- starts both repo-local OpenCode backends
The fleet commands are still available for debugging, automation, or troubleshooting, but they are implementation details of the coordinator experience rather than the primary user workflow.
list- list configured reposstatus [workflow]- show health for every repo and optional saved session IDs for a workflowimpact <workflow> <prompt>- create or reuse one session per repo and request structured impact analysisprompt <repo> <workflow> <prompt>- continue one repo's workflow session with a free-form promptsync <workflow>- refreshchange-tracker.mdand print a consolidated summary from the saved repo sessions
The coordinator should stay orchestration-only for bundled service changes. Use the repo-local backends for implementation and verification, then run:
npm run fleet:sync -- feature-1-customer-segment- Commit
repos.example.json, notrepos.json .fleet-state.json,node_modules/, Gradle build output, anddist/stay local and are ignored
