Conversation
Phase 6.1 T8 of the Multi-Project model. CLI gains a global \`--project <id>\` flag (also GROUNDS_PROJECT env var); when set, every forge call carries it as \`?projectId=...\` so multi-project users can target a specific project from the terminal. Empty value falls back to forge's default-project resolution (the user's auto-created Personal project), so single-project users see no behaviour change. - internal/api/client.go: Client gains a ProjectID field + WithProject clone helper. doRequest threads the id through scopedPath() which appends the query string (idempotent, URL-escapes, doesn't double- append if path already carries projectId). - ClusterDelete builds its request inline; updated to also call scopedPath. - cmd/grounds/commands/root.go: cobra persistent flag declared at the root so all subcommands inherit it. - cmd/grounds/commands/cluster + push: read --project / GROUNDS_PROJECT before constructing the API client and stamp it onto Client.ProjectID. Tests cover the path-mutation table cases + the wire-level propagation through doRequest + the WithProject clone semantics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
T8 of the Multi-Project model. CLI gains a global `--project ` flag (and `GROUNDS_PROJECT` env var fallback) that threads `projectId` into every forge call. Empty value falls back to forge's default-project resolution, so single-project users see no behaviour change.
Changes
Tests
Spec
`grounds-platform/docs/specs/2026-04-26-multi-project-model.md` §10 T8
Test plan
🤖 Generated with Claude Code