You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a workflow author, I want deterministic local Git components to switch branches, stage selected changes, and commit staged content inside a retained Repository or Worktree.
Contract
The provider-neutral component set is:
Git.Switch for changing or creating the current branch;
Git.Add for staging explicit paths; and
Git.Commit for committing exactly the current index.
Git.Checkout may be supplied as a compatible Git-shaped operation where its semantics are explicit, but Git.Switch is the primary branch operation. Git.Commit accepts message as a prop and children as an expandable message; retaining both supports convenient bindings and pre-commit expansion.
Each component is one expansion, one effect, and one Workspace transaction. A commit does not bundle arbitrary child mutations into its transaction: children finish first, then the commit expansion commits the staged index.
Agents remain read-only. They do not supply a privileged authorized-path set; changes reach Git through ordinary durable File and Git.Add effects.
Acceptance
Every operation uses the contextual Repository or Worktree and has no path prop.
Git.Switch changes the named branch deterministically and rejects incompatible retained state.
Git.Add stages only its explicit path inputs and reports the resulting index/tree identity.
Git.Commit commits only staged content and fails clearly when nothing is staged.
Child content and a message prop both produce the intended commit message with documented precedence or conflict behavior.
Replay cannot create a duplicate branch transition, staging result, or commit.
Interruption after commit creation reconciles the existing commit under the same effect identity.
Results identify branch, commit, parent, and tree.
Story
As a workflow author, I want deterministic local Git components to switch branches, stage selected changes, and commit staged content inside a retained Repository or Worktree.
Contract
The provider-neutral component set is:
Git.Switchfor changing or creating the current branch;Git.Addfor staging explicit paths; andGit.Commitfor committing exactly the current index.Git.Checkoutmay be supplied as a compatible Git-shaped operation where its semantics are explicit, butGit.Switchis the primary branch operation.Git.Commitacceptsmessageas a prop and children as an expandable message; retaining both supports convenient bindings and pre-commit expansion.Each component is one expansion, one effect, and one Workspace transaction. A commit does not bundle arbitrary child mutations into its transaction: children finish first, then the commit expansion commits the staged index.
Agents remain read-only. They do not supply a privileged authorized-path set; changes reach Git through ordinary durable File and
Git.Addeffects.Acceptance
Git.Switchchanges the named branch deterministically and rejects incompatible retained state.Git.Addstages only its explicit path inputs and reports the resulting index/tree identity.Git.Commitcommits only staged content and fails clearly when nothing is staged.messageprop both produce the intended commit message with documented precedence or conflict behavior.Dependencies