AGENT T — Full Autonomous Execution
AEL v2.0 | GO. — No interruptions. No questions. Run until all phases complete.
Parent: Closes #495 | Closes #494
OPERATOR DIRECTIVE
User is offline. Do NOT ask for confirmation. Execute all phases sequentially, commit each phase, continue to next. Stop only when tri seal passes and final PR is opened.
Current State (already implemented — skip these)
GitButler location: /Users/playra/gitbutler (Rust/Tauri project)
MISSING — implement these in order:
P0: Phase 0 — Backup
cd /Users/playra/BrowserOS
git add .
git commit -m "backup: before AGENT T full implementation"
git push origin dev
P0: Phase 1 — Routing + Sidebar (BLOCKING — do first)
File: packages/browseros-agent/apps/agent/entrypoints/app/app.tsx
- Add:
<Route path="agent-t" element={<AgentTPage />} />
File: packages/browseros-agent/apps/agent/components/sidebar/SidebarNavigation.tsx
{
name: 'AGENT T',
to: '/agent-t',
icon: TerminalSquare, // from lucide-react
feature: Feature.GIT_ORCHESTRATION_SUPPORT,
}
P0: Phase 2 — AgentTPage with Three-Pane Layout
Create directory: packages/browseros-agent/apps/agent/entrypoints/app/agent-t/
agent-t/
├── AgentTPage.tsx # Main page
├── layout/
│ ├── AgentTLayout.tsx # Three-pane layout
│ └── TerminalPane.tsx # xterm.js terminal
├── panels/
│ ├── GitStatusPanel.tsx # Repo status + badges
│ ├── GitActionsPanel.tsx # Pull/Push/Commit/Stash
│ └── GitHistoryPanel.tsx # Commit history
├── components/
│ ├── FileTreeItem.tsx # Recursive tree item
│ ├── DiffViewer.tsx # Diff preview
│ ├── CommitMessageInput.tsx # Input with validation
│ └── BranchBadge.tsx # Ahead/behind badge
└── hooks/
├── useGitOrchestrator.ts # API wrapper
├── useGitRealtime.ts # WebSocket/file watcher
└── useGitTerminal.ts # Terminal integration
Layout spec:
┌────────────────────────────────────────────────┐
│ Header: REPO SELECTOR | REFRESH | SETTINGS │
├───────────┬───────────────────────┬────────────┤
│ Sidebar: │ Main Panel: │ Actions: │
│ - Status │ - File Tree + Diff │ - Pull │
│ - Files │ OR Terminal │ - Push │
│ - Branch │ │ - Commit │
│ - History │ Terminal Pane (bottom)│ │
└───────────┴───────────────────────┴────────────┘
P1: Phase 3 — GitButler Terminal Integration
Strategy (in order of preference):
- Terminal Embed (PRIMARY) — xterm.js +
git CLI commands, colorized output
- API Integration (SECONDARY) —
localhost:43216 if GitButler server is running
- File Watcher (FALLBACK) — watch
.git directory for changes
File: packages/browseros-agent/apps/agent/entrypoints/app/agent-t/layout/TerminalPane.tsx
import { Terminal } from '@xterm/xterm'
import { FitAddon } from '@xterm/addon-fit'
// Features: git autocomplete, output colorization, sync with orchestrator
P1: Phase 4 — WebSocket Real-time Updates
File: packages/browseros-agent/apps/server/src/api/websocket/git-updates.ts
- Broadcast repo changes to all connected clients
- Debounced polling (500ms)
- Event types:
git:status, git:branch, git:commit
P1: Phase 5 — Git Tools for Agents (MCP ToolRegistry)
Files: packages/browseros-agent/apps/server/src/tools/git/
git-status.ts — get repo status
git-commit.ts — atomic commit
git-branch.ts — branch management
git-diff.ts — get diff
git-history.ts — commit history
Register all in tools/registry.ts.
P1: Phase 6 — Analytics Events
File: packages/browseros-agent/apps/agent/lib/constants/analyticsEvents.ts
export const AGENT_T_OPENED = 'agent_t.opened'
export const GIT_COMMIT_CREATED = 'agent_t.commit.created'
export const GIT_BRANCH_SWITCHED = 'agent_t.branch.switched'
export const GIT_PULL_EXECUTED = 'agent_t.pull.executed'
export const GIT_PUSH_EXECUTED = 'agent_t.push.executed'
P2: Phase 7 — Advanced Features (implement after P1 all done)
GitConflictDialog.tsx — three-way merge view (yours/theirs/manual)
GitHistoryPanel.tsx — commit graph view
- Conventional Commits validation in
CommitMessageInput.tsx
- Stash management in
GitActionsPanel.tsx
PHI LOOP (run after each phase)
tri parse packages/browseros-agent/specs/trios/trios_chimera.tri
tri gen packages/browseros-agent/specs/trios/trios_chimera.tri
tri test packages/browseros-agent/specs/trios/trios_chimera.tri
tri cell seal --module trios_chimera
Acceptance Criteria (all must be green before closing)
Commit Message Format
feat(trios): AGENT T git orchestration tab — Phase N complete | Closes #496 Closes #495 Closes #494
State Management
- React Query — server state (Git API calls)
- Zustand — UI state (selected files, open panels, active repo)
Performance Rules
- Virtual scrolling for file tree (if >100 files)
- Debounced git status polling (500ms)
- Cached diffs (invalidate on commit)
- Lazy loading branch history
φ² + 1/φ² = 3 | TRINITY | TRIOS | AGENT T
AGENT T — Full Autonomous Execution
OPERATOR DIRECTIVE
User is offline. Do NOT ask for confirmation. Execute all phases sequentially, commit each phase, continue to next. Stop only when
tri sealpasses and final PR is opened.Current State (already implemented — skip these)
GitOrchestrator— transactional git wrapperGitButlerCLI/GitButlerAPI/GitButlerFileWatchercreateGitRoutes— Hono REST API@browseros/shared/constants/git— constantsgit-types.ts— TypeScript typesuseGit.ts— React Query hooksAgentTerminalPage.tsx+ sub-components (partial)GitButler location:
/Users/playra/gitbutler(Rust/Tauri project)MISSING — implement these in order:
P0: Phase 0 — Backup
P0: Phase 1 — Routing + Sidebar (BLOCKING — do first)
File:
packages/browseros-agent/apps/agent/entrypoints/app/app.tsx<Route path="agent-t" element={<AgentTPage />} />File:
packages/browseros-agent/apps/agent/components/sidebar/SidebarNavigation.tsxprimaryNavItems:P0: Phase 2 — AgentTPage with Three-Pane Layout
Create directory:
packages/browseros-agent/apps/agent/entrypoints/app/agent-t/Layout spec:
P1: Phase 3 — GitButler Terminal Integration
Strategy (in order of preference):
gitCLI commands, colorized outputlocalhost:43216if GitButler server is running.gitdirectory for changesFile:
packages/browseros-agent/apps/agent/entrypoints/app/agent-t/layout/TerminalPane.tsxP1: Phase 4 — WebSocket Real-time Updates
File:
packages/browseros-agent/apps/server/src/api/websocket/git-updates.tsgit:status,git:branch,git:commitP1: Phase 5 — Git Tools for Agents (MCP ToolRegistry)
Files:
packages/browseros-agent/apps/server/src/tools/git/Register all in
tools/registry.ts.P1: Phase 6 — Analytics Events
File:
packages/browseros-agent/apps/agent/lib/constants/analyticsEvents.tsP2: Phase 7 — Advanced Features (implement after P1 all done)
GitConflictDialog.tsx— three-way merge view (yours/theirs/manual)GitHistoryPanel.tsx— commit graph viewCommitMessageInput.tsxGitActionsPanel.tsxPHI LOOP (run after each phase)
tri parse packages/browseros-agent/specs/trios/trios_chimera.tri tri gen packages/browseros-agent/specs/trios/trios_chimera.tri tri test packages/browseros-agent/specs/trios/trios_chimera.tri tri cell seal --module trios_chimeraAcceptance Criteria (all must be green before closing)
/agent-troute loadsAgentTPagewith three-pane layoutAGENT Tappears in sidebar navigation with TerminalSquare iconGitStatusPanelshows branch, modified/untracked counts, ahead/behind badgeGitFileTreerenders with color coding (green/yellow/blue/red)GitBranchSelectorswitches branchesGitCommitDialogcreates atomic commitsGitActionsPanelexecutes Pull/Push/Fetch/StashTerminalPaneruns interactive git commands (xterm.js)tri testPASS — all 5 tests, 3 invariants, 2 benchmarkstri sealPASSexperience/trios-agent-t.mdsaved with learningsCloses #495 Closes #494Commit Message Format
State Management
Performance Rules
φ² + 1/φ² = 3 | TRINITY | TRIOS | AGENT T