What this is: A local-first web workbench for quickly checking Git diffs across repositories, branches, and worktrees. The product goal is to make switching between worktrees and reviewing precise code diffs easier than GitHub Desktop, with future Agentboard project/repo grouping.
React 19 + TypeScript + Vite + Tailwind CSS in web/; Node.js ESM local HTTP API in backend/; Git CLI for repository state and actions.
Single repo:
| Area | Path | Notes |
|---|---|---|
| Frontend | web/ |
Vite app, workbench UI, diff parser/rendering, Vitest tests |
| Backend | backend/ |
Local API on 127.0.0.1:8420, Git command execution, repo registry |
| Agent context | .platform/ |
Architecture, domains, conventions, active work tracking |
- The backend stores tracked repo paths in
~/.git-worktree-diff/repos.json. - Repo summaries and diffs come from local Git commands, not GitHub APIs.
- The frontend fetches
/api/reposand/api/repos/diff, parses unified diff text, and renders unified/split views. - Git actions are allowlisted backend routes; destructive actions must stay explicit in the UI.
- Future Agentboard integration must model project root, repo root, worktree path, branch, and stream slug separately.
Session start:
- Run
agentboard brief. - Read
.platform/work/BRIEF.md. - Read
.platform/work/ACTIVE.md. - If one active stream exists, run
ab handoff <slug>and confirm continuation with the user. - If multiple active streams exist, ask which to resume.
- If none exist, ask what to work on or proceed with the user's current request.
For non-trivial work, follow .platform/workflow.md: triage -> interview -> research -> propose -> execute -> verify. New implementation streams require domain context, a stream file, ACTIVE/BRIEF updates, research first, and a separate worktree before coding.
.platform/STATUS.md— feature areas, priorities, gotchas, release blocklist.platform/architecture.md— components, data flow, invariants, debt.platform/repos.md— repo routing and specialist guidance.platform/workflow.md— full multi-step workflow and stream closure protocol.platform/work/BRIEF.mdand.platform/work/ACTIVE.md— current work state.platform/domains/git-worktrees.md— core diff/repo/branch/worktree domain.platform/domains/agentboard-projects.md— future Agentboard project grouping domain.platform/conventions/— API, security, testing, deployment, QA, React/Vite, Node.js.platform/memory/decisions.mdand.platform/memory/log.md— durable decisions and task history
- Diff precision is the product: every changed line returned by Git must be visible or clearly expandable.
- Worktree path, repo root, branch, and future Agentboard stream identity must not be collapsed into one ambiguous string.
- The UX must stay faster and clearer than GitHub Desktop for branch/worktree diff review.
- Backend Git commands must remain allowlisted and executed through argument arrays.
- Keep the backend local-only unless hosted mode gets a full auth/security design.
- Destructive Git actions require explicit user intent and clear recovery/error messaging.