Summary
Add a loom reset command that discards all local changes in a workspace, fetches from origin, and rebases all workspace branches onto origin/main. This provides a clean way to start fresh without tearing down and recreating the workspace.
Motivation
When working in a workspace, branches can drift from origin/main over time, or you may want to abandon the current direction and start over. Currently, the only way to get a clean slate is to loom down the workspace and recreate it with loom new. A dedicated reset command would be faster and preserve the workspace structure.
This is especially useful when:
- An agent has made changes you want to fully discard
origin/main has moved significantly and you want all worktrees rebased
- You want to restart work on a feature from a clean state without recreating the workspace
Commands affected
Modules affected
Proposed behavior
- No argument: resets the workspace detected from the current directory
- With
<name>: resets the named workspace
For each repository worktree in the workspace, the command should:
- Discard all uncommitted changes (staged and unstaged)
- Fetch
origin
- Hard-reset / rebase the worktree branch onto
origin/main (or the configured default branch)
Before executing, the command should show a confirmation prompt warning that all local work will be lost — e.g.:
⚠ This will discard ALL uncommitted changes and reset branches to origin/main.
Workspace: my-feature
Repos: repo-a, repo-b, repo-c
Continue? [y/N]
A --force flag could skip the confirmation for scripting use cases.
If progress indication is available (see #50), it should be used here as well.
Acceptance criteria
Summary
Add a
loom resetcommand that discards all local changes in a workspace, fetches from origin, and rebases all workspace branches ontoorigin/main. This provides a clean way to start fresh without tearing down and recreating the workspace.Motivation
When working in a workspace, branches can drift from
origin/mainover time, or you may want to abandon the current direction and start over. Currently, the only way to get a clean slate is toloom downthe workspace and recreate it withloom new. A dedicated reset command would be faster and preserve the workspace structure.This is especially useful when:
origin/mainhas moved significantly and you want all worktrees rebasedCommands affected
loom initloom newloom addloom removeloom downloom listloom statusloom execloom shellloom saveloom openloom registryModules affected
cliworkspacegitProposed behavior
<name>: resets the named workspaceFor each repository worktree in the workspace, the command should:
originorigin/main(or the configured default branch)Before executing, the command should show a confirmation prompt warning that all local work will be lost — e.g.:
A
--forceflag could skip the confirmation for scripting use cases.If progress indication is available (see #50), it should be used here as well.
Acceptance criteria
loom resetresets the workspace detected from the current directoryloom reset <name>resets a named workspaceoriginis fetched for each repositoryorigin/main(or the repo's default branch)--forceskips the confirmation prompt