2026-03-18 11:18:53 -07:00
# Gemini Workspaces: High-Performance Remote Development 🚀
2026-03-15 09:54:27 -07:00
2026-03-18 11:18:53 -07:00
Welcome to the Gemini Workspaces platform! This guide will help you set up your
remote development environment, which allows you to offload heavy tasks (reviews, fixes,
preflight) to a dedicated, high-performance GCP worker.
2026-03-15 09:54:27 -07:00
## Prerequisites
2026-03-16 15:42:23 -07:00
1. **Google Cloud Access ** : You will need a Google Cloud Project with billing enabled. You can use a shared team project or, **ideally, your own personal GCP project ** for maximum isolation.
2026-03-16 15:40:59 -07:00
2. **GCloud CLI ** : Authenticated locally (`gcloud auth login` ).
3. **GitHub CLI ** : Authenticated locally (`gh auth login` ).
2026-03-18 11:18:53 -07:00
4. **Corporate Identity ** : Run `gcert` (or your internal equivalent) recently to ensure SSH certificates are valid.
2026-03-15 12:13:11 -07:00
2026-03-18 11:18:53 -07:00
## Architecture: Persistent Cloud Workstations 🏗️
2026-03-15 12:13:11 -07:00
2026-03-18 11:18:53 -07:00
The system uses a **Workspace Provider ** architecture to abstract the underlying infrastructure:
2026-03-15 12:13:11 -07:00
2026-03-16 15:40:59 -07:00
1. **GCE VM (Host) ** : A high-performance machine running **Container-Optimized OS (COS) ** .
2. **maintainer-worker (Container) ** : A persistent Docker container acting as your remote workstation.
2026-03-18 11:18:53 -07:00
3. **Resilient Connectivity ** : A verified corporate routing path using `nic0` and `.internal.gcpnode.com` for direct, high-speed access.
2026-03-15 12:13:11 -07:00
2026-03-16 15:40:59 -07:00
---
2026-03-15 09:54:27 -07:00
## Setup Workflow
2026-03-18 11:18:53 -07:00
### 1. The Turn-Key Setup
2026-03-15 09:54:27 -07:00
2026-03-18 11:18:53 -07:00
The entire environment can be initialized with a single command:
2026-03-15 09:54:27 -07:00
``` bash
2026-03-18 11:18:53 -07:00
npm run workspace:setup
2026-03-15 09:54:27 -07:00
```
2026-03-18 11:18:53 -07:00
This interactive script will:
- **Phase 1: Configuration**: Auto-detect your repository origins, ask for your GCP project, and guide you through creating a secure GitHub token.
- **Phase 2: Infrastructure**: Automatically provision the "Magic" corporate network (VPC, Subnets, Firewalls) and the high-performance VM.
- **Phase 3: Initialization**: Synchronize your credentials and clone your repository into a persistent remote volume.
2026-03-16 15:40:59 -07:00
---
2026-03-15 09:54:27 -07:00
## Daily Workflow
2026-03-18 11:18:53 -07:00
### Running a Workspace Job
2026-03-15 09:54:27 -07:00
2026-03-16 15:40:59 -07:00
To perform a deep behavioral review or an agentic fix on your remote worker:
2026-03-15 09:54:27 -07:00
``` bash
2026-03-16 15:40:59 -07:00
# For a review
2026-03-18 11:18:53 -07:00
npm run workspace <PR_NUMBER> review
2026-03-16 15:40:59 -07:00
# For an automated fix
2026-03-18 11:18:53 -07:00
npm run workspace <PR_NUMBER> fix
2026-03-15 09:54:27 -07:00
```
2026-03-18 11:18:53 -07:00
* **Isolation ** : Each job runs in a dedicated **Git Worktree ** .
* **Persistence ** : Jobs run inside a `tmux` session. You can disconnect and reconnect without losing progress.
2026-03-15 09:54:27 -07:00
2026-03-16 15:40:59 -07:00
### Monitoring "Mission Control"
2026-03-15 09:54:27 -07:00
2026-03-16 15:40:59 -07:00
View the real-time state of your worker and all in-flight jobs:
2026-03-15 09:54:27 -07:00
``` bash
2026-03-18 11:18:53 -07:00
npm run workspace:status
2026-03-15 09:54:27 -07:00
```
### Stopping Your Worker
2026-03-16 15:40:59 -07:00
To save costs, shut down your worker when finished. The orchestrator will automatically wake it up when you start a new task.
2026-03-15 09:54:27 -07:00
``` bash
2026-03-18 11:18:53 -07:00
npm run workspace:fleet stop
2026-03-15 09:54:27 -07:00
```
2026-03-16 15:40:59 -07:00
---
## Resilience & Troubleshooting
### "SSH Connection Failed"
1. **Check Identity ** : Run `gcert` to refresh your SSH credentials.
2026-03-18 11:18:53 -07:00
2. **Direct Path ** : Ensure you are on the corporate network or VPN if required for `nic0` routing.
2026-03-15 09:54:27 -07:00
2026-03-16 15:40:59 -07:00
### "Worker Not Found"
2026-03-18 11:18:53 -07:00
The `setup` script will automatically offer to provision a worker if it can't find one. Simply follow the prompts.