Skip to content

TRIOS AGENT T: Autonomous Implementation — GO, no stops until done #496

Description

@gHashTag

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)

  • GitOrchestrator — transactional git wrapper
  • GitButlerCLI / GitButlerAPI / GitButlerFileWatcher
  • createGitRoutes — Hono REST API
  • @browseros/shared/constants/git — constants
  • git-types.ts — TypeScript types
  • useGit.ts — React Query hooks
  • AgentTerminalPage.tsx + sub-components (partial)

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

  • Add to primaryNavItems:
{
  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):

  1. Terminal Embed (PRIMARY) — xterm.js + git CLI commands, colorized output
  2. API Integration (SECONDARY) — localhost:43216 if GitButler server is running
  3. 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)

  • /agent-t route loads AgentTPage with three-pane layout
  • AGENT T appears in sidebar navigation with TerminalSquare icon
  • GitStatusPanel shows branch, modified/untracked counts, ahead/behind badge
  • GitFileTree renders with color coding (green/yellow/blue/red)
  • GitBranchSelector switches branches
  • GitCommitDialog creates atomic commits
  • GitActionsPanel executes Pull/Push/Fetch/Stash
  • TerminalPane runs interactive git commands (xterm.js)
  • WebSocket broadcasts repo changes in real-time
  • All 5 git MCP tools registered and callable by agents
  • tri test PASS — all 5 tests, 3 invariants, 2 benchmarks
  • tri seal PASS
  • L1–L7 compliance verified
  • experience/trios-agent-t.md saved with learnings
  • PR opened with Closes #495 Closes #494

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions