|
| 1 | +# Sandforge Implementation Roadmap |
| 2 | + |
| 3 | +This roadmap tracks the progress of the Sandforge Agent Sandbox based on [ARCHITECTURE.md](ARCHITECTURE.md). |
| 4 | + |
| 5 | +## Phase 1: Foundation & Policy (Security First) |
| 6 | +*Goal: Establish the core interfaces and the "Deny by Default" security layer.* |
| 7 | + |
| 8 | +- [x] **1.1 Project Scaffolding**: Go workspace, directory structure, and `go.mod`. |
| 9 | +- [x] **1.2 Core API Contracts**: Define `SandboxSpec`, `ExecRequest`, and `SandboxBackend` interfaces. |
| 10 | +- [ ] **1.3 Policy Engine**: |
| 11 | + - [x] Filesystem path validation (whitelist logic) [#1](https://github.com/yanurag-dev/sandforge/issues/1). |
| 12 | + - [ ] Network mode enforcement (Offline/Fetch/Full) [#2](https://github.com/yanurag-dev/sandforge/issues/2). |
| 13 | + - [ ] Resource limit validation (CPU/Memory/Disk) [#2](https://github.com/yanurag-dev/sandforge/issues/2). |
| 14 | + - [ ] Command family filtering [#3](https://github.com/yanurag-dev/sandforge/issues/3). |
| 15 | +- [ ] **1.4 Testing**: Unit tests for policy enforcement. |
| 16 | + |
| 17 | +## Phase 2: Orchestration & Mocking |
| 18 | +*Goal: Build the state machine that manages sandbox lifecycles.* |
| 19 | + |
| 20 | +- [ ] **2.1 Sandbox Supervisor**: |
| 21 | + - [ ] Implementation of the Lifecycle State Machine (Requested -> Provisioning -> Ready -> ...). |
| 22 | + - [ ] Concurrent session management. |
| 23 | +- [ ] **2.2 Mock Backend Driver**: |
| 24 | + - [ ] An in-memory/process-based driver for testing the supervisor without a VM. |
| 25 | +- [ ] **2.3 Artifact Manager**: Basic logic to handle "CopyOut" for logs and files. |
| 26 | + |
| 27 | +## Phase 3: macOS Execution Plane (macos-vz) |
| 28 | +*Goal: Boot a real Linux VM on macOS using the Apple Virtualization Framework.* |
| 29 | + |
| 30 | +- [ ] **3.1 Worker Image Preparation**: Create a minimal Linux kernel + initrd/disk image. |
| 31 | +- [ ] **3.2 VZ Driver Implementation**: |
| 32 | + - [ ] VM configuration (vCPU, Memory). |
| 33 | + - [ ] Virtio-fs or Virtio-9p for workspace mounting. |
| 34 | + - [ ] Virtio-serial or VSOCK for command transport. |
| 35 | +- [ ] **3.3 Networking**: Implement `offline` and `fetch` (NAT) modes using VZ. |
| 36 | + |
| 37 | +## Phase 4: Linux Execution Plane (linux-kvm) |
| 38 | +*Goal: Parity for Linux hosts.* |
| 39 | + |
| 40 | +- [ ] **4.1 KVM/QEMU Driver**: |
| 41 | + - [ ] Implementation of the `SandboxBackend` using KVM. |
| 42 | + - [ ] Shared filesystem setup (Virtio-fs). |
| 43 | +- [ ] **4.2 (Optional) Firecracker**: MicroVM support for ultra-fast boot. |
| 44 | + |
| 45 | +## Phase 5: Task Runtime (Inside the Worker) |
| 46 | +*Goal: The boundary between the VM and the Agent's code.* |
| 47 | + |
| 48 | +- [ ] **5.1 Rootless Container Setup**: Pre-installing and configuring a container runtime (e.g., Podman/Docker) in the worker image. |
| 49 | +- [ ] **5.2 Task Runner Agent**: A small Go binary inside the VM that receives commands via VSOCK and runs them in a container. |
| 50 | +- [ ] **5.3 Cleanup Logic**: Ensuring the task container is destroyed immediately after execution. |
| 51 | + |
| 52 | +## Phase 6: Control Plane & Adapters |
| 53 | +*Goal: The external interface for Coding Agents.* |
| 54 | + |
| 55 | +- [ ] **6.1 Control Plane API**: REST/gRPC server to manage tasks and sessions. |
| 56 | +- [ ] **6.2 Agent Adapters**: |
| 57 | + - [ ] Generic Tool-Calling Adapter. |
| 58 | + - [ ] (Optional) Specific adapters for Claude/Codex. |
| 59 | +- [ ] **6.3 Secret Manager**: Injection of scoped secrets into the task environment. |
| 60 | + |
| 61 | +## Phase 7: CLI & Experience |
| 62 | +*Goal: Making it usable.* |
| 63 | + |
| 64 | +- [ ] **7.1 Sandforge CLI**: Commands like `sandforge run --dir . "npm test"`. |
| 65 | +- [ ] **7.2 Logging & Streaming**: Real-time stdout/stderr streaming from the sandbox to the terminal. |
| 66 | +- [ ] **7.3 Audit Logs**: Persisting execution history for review. |
| 67 | + |
| 68 | +--- |
| 69 | +## Progress Legend |
| 70 | +- [ ] To Do |
| 71 | +- [x] Done |
0 commit comments