Skip to content

Git Integration

Git is not a bolt-on in matic — it is the persistence layer, the collaboration protocol, and the audit trail. Every org's operational state lives in a git repository where branches, commits, and pull requests enforce the boundaries between agent workspaces, shared surfaces, and human-approved changes. This section covers the abstractions matic builds on top of git to make multi-agent coordination safe, auditable, and reproducible.

Client and Operations

The git client abstraction that wraps low-level git commands, normalizes errors into matic-native types, and provides the interface all other packages call instead of invoking git directly.

Workspace Constraint

The hard architectural boundary that restricts agents to their own workspace directories and forces all shared-surface changes through pull requests — enforced at both the filesystem and git layers.

Worktree Management

How matic creates, tracks, and removes git worktrees as the exclusive mechanism for agent contributions to project repositories — one worktree per agent-repo-task tuple.

Branch Conventions

Deterministic naming rules for branches and worktrees that keep multi-agent repositories navigable and prevent collisions across concurrent tasks.

Commit Discipline

Scope validation, message conventions, and the guardrail enforcement that ensures every commit stays within the agent's authorized workspace boundary.

Diff Utilities

Diff operations purpose-built for audit trails, human review, evolution tracking, and run-to-run comparison across workspaces and org history.

PR Adapters

Platform-specific adapters (GitHub, GitLab, local simulation) that handle pull request creation, review, merge, and status checks — the gateway for all changes to shared surfaces.