workspace-lifecycle skill inspects your repository, proposes changes, and separates permission to edit from permission to execute.| Phase | Put this work here | Do not put this work here |
cloud/provision | Create or adopt resources owned by the durable workspace | Dependency installation in the current checkout |
machine/prepare | Prepare tools needed on this machine | Workspace-specific generated files |
workspace/materialize | Install checkout dependencies and rebuild local configuration | Creating a second cloud stack on each arrival |
workspace/dematerialize | Flush local state and release local leases before leaving | Deleting remote databases, buckets, or deployments |
cloud/destroy | Delete recorded workspace-owned resources after explicit retirement authorization | Cleanup on selection, close, or move |
.gitspace/services.json and run them through GitSpace service controls. Lifecycle scripts should finish, not leave unmanaged background processes.| State | What to expect after close or move |
| Git commits and branch; staged and unstaged tracked changes | Saved by a completed checkpoint |
| Non-ignored untracked files | Saved by a completed checkpoint |
| Agent conversation and GitSpace artifacts | Saved with supported workspace state |
| Profile, values, approvals, script snapshots, bindings, provision identity, run records and logs | Kept in the cloud lifecycle ledger, outside the checkout |
Ignored .env, node_modules, caches, build output | Not checkpointed; recreate during materialization |
| Machine packages and arbitrary home-directory files | Not workspace state; prepare again where needed |
| Remote resources | Remain until you explicitly authorize their destruction |
pre, setup, select, and remove hooks need an explicit migration. They are not aliases for the new phases and must not silently execute.setup into cloud/provision.machine/prepare.pre, setup, or select into ordered workspace/materialize scripts.workspace/dematerialize.remove into cloud/destroy. Never map it to dematerialization: that would delete resources on every move.