# 009 Storage foundation ## Context - v1 storage slice needs workspace, chat and file flows before durable DB - trusted caller passes `user_id`, and one workspace belongs to one user - chat content must live outside sandbox lifecycle and survive sandbox restart ## Decision - metadata repositories are in-memory for the first storage slice - `Workspace`, `Chat` and `ChatFile` are first-class domain entities - filesystem access stays behind storage ports in outer layers - sandbox later integrates through chat metadata and storage ports, not raw path math in usecases ## Consequences - metadata is lost on restart in this phase - storage usecases and HTTP API can be built before durable persistence - later durable metadata can replace in-memory adapters behind the same ports