Skip to content

feat(phase34): Git worktrees and branch sandboxing with /branch command and subagent - #72

Merged
De-pitcher merged 5 commits into
mainfrom
feat/phase34-git-worktrees-sandboxing
Sep 7, 2026
Merged

De-pitcher merged 5 commits into
mainfrom
feat/phase34-git-worktrees-sandboxing

Conversation

@De-pitcher

Copy link
Copy Markdown
Owner

Phase 34 Summary: Git Worktrees & Branch Sandboxing

🎯 Key Capabilities Added

  1. WorktreeManager (\�gentcli.worktree.manager):
    • Isolated Git worktree creation under .agentcli/worktrees/\ with base ref branching.
    • Live worktree discovery, status checking (dirty detection, modified files listing), unified diff computation (\compute_diff), merge (\squash\ or
      o-ff), safe removal, and orphan pruning.
    • Windows file handle safety and clean metadata persistence in .worktrees.json.
  2. Worktree SubAgent (\�gentcli.subagents.worktree):
    • Registered as \SubAgentType.WORKTREE\ (\worktree) in \ToolRegistry\ and \TOOL_DEFINITIONS.
    • Supports autonomous actions: \create, \list, \status, \diff, \merge, \discard, \prune.
  3. Session Grounding:
    • Attached \session.worktree_manager = WorktreeManager()\ and workspace sandbox tracking in \�gentcli.session.
  4. Slash Command & TUI Integration:
    • /branch [list | create | status | diff | merge | discard | prune]\ with aliases /worktree\ and /wt.
    • Autocompletion in \SlashAndFileCompleter\ and action handling in Textual TUI dashboard.

🛡️ Quality Gates & Verification

  • Unit & Integration Tests: 13/13 Phase 34 tests passed, 103/103 core suite passed.
  • Ruff Linting: 0 errors.
  • Mypy Type Checking: 0 errors across 124 source files.

@De-pitcher
De-pitcher merged commit 5576cc6 into main Sep 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant