@hyperdrive.bot/gut

One folder to
rule them all.

GUT is a super-repo workspace manager built for the AI-first era. One directory, every repo, every app, every team member. Single brain, single management — powered by battle-tested Unix folders and git.

$ npm install -g @hyperdrive.bot/gut
gut — terminal demo

The problem with how we work

Modern companies have dozens of repos — frontends, backends, CLIs, shared libraries, client projects, infrastructure. They're scattered across GitHub, GitLab, or Bitbucket with no single view of the whole picture.

!

Git submodules are painful

Git submodules pin repos to specific commits, create merge conflicts, confuse new team members, and break CI pipelines. Git subtrees are no better — they flatten history and make extraction impossible. Neither was built for a world where one developer touches five repos in a single morning.

!

Monorepos have a ceiling

Monorepo tools (Nx, Turborepo, Lerna) assume everything lives in one git history with one CI pipeline. But real companies have private client repos, third-party codebases, and varying access levels. Not everything belongs in the same git log.

!

AI agents need a single workspace

In the vibe-coding / AI code generation era, agents need context. If your API is in one repo, your frontend in another, and your shared types in a third, every AI tool you use sees a fragment. They can't reason about cross-cutting changes, can't refactor across boundaries, can't run a pipeline that touches multiple systems.

One folder, every repo, full freedom

The super-repo is a single directory on your machine that contains every repository your team touches — organized by purpose, not by tool.

~/workspace/ ← your super-repo packages/ web-apps/ dashboard/ React app (its own git repo) marketing-site/ Next.js app (its own git repo) admin-panel/ Vue app (its own git repo) serverless/ api/ Backend API (its own git repo) webhooks/ Webhook handlers (its own git repo) cli/ internal-tools/ CLI for ops (its own git repo) shared/ types/ Shared TypeScript types ui-kit/ Component library entities/ clients/ acme-corp/ Client-specific config & docs widgets-inc/ Another client initiatives/ seo-revamp/ Strategic initiative cost-optimization/ Cross-team effort .gut/ ← GUT workspace manifest config.json entity registry focus.json current working set worktrees.json isolated workspaces
1

Each repo stays independent

Every directory inside is a standalone git repository with its own remote, branches, CI, and access controls. GUT doesn't merge them, pin them, or flatten them. It just knows they exist and where they live.

Access is external. If a team member has access to the GitLab/GitHub repo, gut entity clone works. If they don't, they simply don't clone that entity — everything else keeps working. No lock files, no permission entanglement.
2

Organize by purpose, not by tool

The folder structure is a semantic map of your organization — not a package manager's opinion. Web apps, APIs, CLIs, client projects, internal initiatives, infrastructure — each in its own category, each instantly discoverable.

This is the Unix philosophy applied to code organization: simple directories, obvious names, and tools that compose.

3

Markdown is your source code now

In the AI-first era, .md files aren't documentation — they're the instructions that produce your software. A PRD written in markdown becomes epics, stories, and deployed code. An architecture doc becomes the constraints an agent follows. A rule file prevents the same production bug from ever happening again.

Your agent personas, workflow definitions, decision logs, and operational runbooks are all markdown — all living in the same filesystem as the code they govern. Markdown is the source code of your company.

# These .md files aren't docs — they're executable
docs/PRD-new-feature.md        →  AI agent reads it, produces code
docs/architecture/system.md    →  Agent follows constraints
agents/pirlo.md                →  Defines a dev agent's behavior
rules/api-debugging.md         →  Prevents known mistakes
workflows/deploy-pipeline.md   →  Orchestrates multi-agent work
memory/project-context.md      →  Persists knowledge across sessions

The super-repo isn't just code repos. It's the entire operational intelligence of your organization — decisions, patterns, agent workforce, and the code they produce — in one place, versioned by git, searchable by any tool.

4

One workspace for humans and AI agents

When your entire codebase and your entire knowledge base live in one directory, AI agents see everything. They can trace an API change through the backend, into the shared types, and up to the frontend. They can read the PRD that motivated it, the architecture doc that constrained it, and the rule that prevents the mistake you made last time.

This is the real unlock: single brain, single project, single management. The super-repo isn't just a folder — it's the shared context that makes AI-driven development actually work.

5

Better than the alternatives

Compared to the usual approaches:

# Git submodules — pinned commits, merge conflicts, broken CI
# Git subtrees  — flattened history, no clean extraction
# Monorepo tools — one git log, one CI, access = all-or-nothing
# Polyrepo       — scattered context, no unified view

# GUT super-repo — independent repos, unified workspace, selective access
# Each repo has its own git. GUT coordinates across them.
# Clone what you need, ignore what you don't.
# One folder to rule them all.

Setup your workspace

Initialize GUT in any directory that contains multiple repositories. GUT auto-discovers entities and builds a registry.

1

Initialize the workspace

Navigate to your workspace root (the directory containing your repos) and run:

gut init

GUT scans packages/, apps/, libs/, services/, and tools/ for directories with .git. Each git repository found is registered as an entity.

2

Or use quick-setup for common layouts

gut quick-setup --profile monorepo --clone-missing

Profiles: monorepo, microservices, fullstack, library. The --clone-missing flag fetches repos not yet on disk.

3

Verify your entities

gut entity list -v
# NAME           TYPE       PATH                          REPO
# api            module     packages/serverless/api        git@gitlab.com:.../api.git
# sign           delivery   packages/web-apps/sign         git@gitlab.com:.../sign.git
# api-contracts  module     packages/shared/api-contracts  git@gitlab.com:.../api-contracts.git
# ...

How GUT thinks

Three concepts power everything: entities are your repos, focus selects what you're working on, and all git operations act on focused entities.

entity list
focus
checkout
code
commit
push
E

Entities

An entity is any git repository GUT knows about. Each has a name, type, path, and optional remote URL. Types include module, delivery, service, client, and more.

gut entity add my-service service     # register manually
gut entity clone my-service              # clone from registered remote
gut entity clone-all --parallel          # clone everything at once
F

Focus

Focus tells GUT which entities to operate on. All batch commands (checkout, commit, push, sync) only affect focused entities. You can focus on one or many.

gut focus api sign api-contracts  # focus on 3 entities
gut focus api --mode delivery      # with work mode context
gut unfocus                             # clear focus
gut back                                # go back to previous focus
gut recent                              # show focus history
Tip: Focus is persisted in .gut/focus.json — it survives terminal restarts. Use gut context to see what's focused right now.
G

Git Operations

Every standard git operation runs across all focused entities. One command, multiple repos.

gut checkout -b feature/new-api   # create branch in all focused
gut status                              # git status across all focused
gut add -A                              # stage all changes
gut commit -m "feat: add endpoint"   # commit in all focused
gut push -u                             # push all focused with upstream
gut sync                                # fetch + pull + push all focused

A typical day with GUT

Here's how a real development session looks when working across multiple repos.

1

Start your work session

# Focus on what you're working on today
gut focus api sign --mode delivery

# Sync with remote before starting
gut sync --rebase
2

Create your feature branch

# Creates the branch in BOTH api and sign repos
gut checkout -b feature/bulk-send-v2 --from master
3

Code, commit, repeat

# Check what changed across repos
gut status

# Stage and commit
gut add -A
gut commit -m "feat: add bulk send v2 endpoint"

# Push to remote
gut push -u
4

Switch context when needed

# Urgent bug in a different repo? Switch focus.
gut focus notifications
gut checkout -b fix/slack-token

# Fix it, commit, push...

# Go back to what you were doing
gut back
# Focus restored to: api, sign (feature/bulk-send-v2)

Isolated workspaces for pipelines

Create mirrored git worktrees across multiple repos with a single command. Perfect for running AI agent pipelines without conflicting with your main checkout.

1

Create a worktree

# Focus on the repos the pipeline will touch
gut focus api sign api-contracts

# Create worktrees for all focused entities
gut worktree create workflow/deploy-batch --install
# Worktree ready:
#   Path:   /tmp/gut-worktrees/workflow-deploy-batch
#   Branch: workflow/deploy-batch
#   Entities: api, sign, api-contracts

The --install flag runs pnpm install in the worktree so dependencies are ready.

2

Mirror layout preserves all paths

The worktree mirrors your workspace structure. Tools that reference packages/serverless/api/ work without changes.

/tmp/gut-worktrees/workflow-deploy-batch/ Main checkout ← super-repo worktree packages/ serverless/ api/ ← api entity worktree (branch: workflow/deploy-batch) web-apps/ sign/ ← sign entity worktree (branch: workflow/deploy-batch) shared/ api-contracts/ ← api-contracts entity worktree .claude/ from super-repo worktree CLAUDE.md from super-repo worktree
3

Run your pipeline in the worktree

# Use --cwd to point any tool at the worktree
bmad-workflow workflow docs/PRD-example.md \
  --cwd /tmp/gut-worktrees/workflow-deploy-batch
Tip: Your main checkout stays clean. You can keep coding while the pipeline runs in the worktree.
4

Inspect, commit, and clean up

# Check worktree status across entities
gut worktree status workflow/deploy-batch
# Entity        Branch                  Status   Changes
# api           workflow/deploy-batch   dirty    3 changes
# sign          workflow/deploy-batch   clean    clean
# api-contracts workflow/deploy-batch   dirty    1 changes

# List all active worktrees
gut worktree list

# Remove when done
gut worktree remove workflow/deploy-batch
Note: remove blocks if there are uncommitted changes. Use --force to override.

AI agents + worktrees = parallel autonomy

The super-repo gives AI agents full context. Worktrees give them isolation. Together, you can run multiple autonomous pipelines across your entire codebase without conflicts.

1

One agent, one PRD, one worktree

Write a PRD in markdown. An AI agent reads it, generates epics and stories, implements the code, deploys, and runs tests — all inside an isolated worktree. Your main checkout stays untouched.

# Write the PRD
docs/PRD-new-billing-api.md

# Focus on the repos the agent will touch
gut focus api shared-types dashboard

# Create an isolated workspace
gut worktree create workflow/billing-api --install

# Launch the agent pipeline in the worktree
claude -p --cwd /tmp/gut-worktrees/workflow-billing-api \
  "Implement the PRD at docs/PRD-new-billing-api.md"
2

Multiple agents, running in parallel

Need two features built simultaneously? Create two worktrees. Each agent works in its own sandbox — even if they touch the same repos.

# Agent 1: billing feature → api + dashboard
gut focus api dashboard
gut worktree create workflow/billing

# Agent 2: notifications feature → api + mobile-app
gut focus api mobile-app
gut worktree create workflow/notifications

# Both share the api repo — but on different branches
gut worktree list
# workflow/billing        → api (workflow/billing), dashboard (workflow/billing)
# workflow/notifications  → api (workflow/notifications), mobile-app (workflow/notifications)

# Launch both agents simultaneously
pipeline-tool run docs/PRD-billing.md --cwd /tmp/gut-worktrees/workflow-billing &
pipeline-tool run docs/PRD-notifications.md --cwd /tmp/gut-worktrees/workflow-notifications &
Overlapping entities are safe. Git worktrees allow the same repo to be checked out on different branches simultaneously. Agent 1 and Agent 2 can both modify the api repo without conflicts — each on its own branch.
3

Review, merge, clean up

When agents finish, inspect what they built, merge the branches, and clean up the worktrees.

# See what each agent produced
gut worktree status workflow/billing
gut worktree status workflow/notifications

# Review the changes in each entity
cd /tmp/gut-worktrees/workflow-billing/packages/api
git log --oneline master..workflow/billing

# Merge when satisfied
git checkout master
git merge workflow/billing

# Clean up
gut worktree remove workflow/billing
gut worktree remove workflow/notifications
4

Working inside worktrees

A worktree is just a regular directory. Open it in your editor, use the terminal, run git — everything works like a normal checkout.

# Open the worktree in Cursor / VS Code
cursor /tmp/gut-worktrees/workflow-billing
code /tmp/gut-worktrees/workflow-billing

# Or cd into it from the terminal
cd /tmp/gut-worktrees/workflow-billing

# Browse what the agent changed in each entity
cd packages/serverless/api
git diff                                # see all changes
git log --oneline master..HEAD        # see agent's commits

cd ../../web-apps/dashboard
git diff                                # changes in another entity

To commit and push the agent's work across all entities:

# Option A: one entity at a time (full control)
cd /tmp/gut-worktrees/workflow-billing/packages/serverless/api
git add -A
git commit -m "feat: billing API endpoints"
git push -u origin workflow/billing

cd ../../web-apps/dashboard
git add -A
git commit -m "feat: billing dashboard UI"
git push -u origin workflow/billing

# Option B: quick loop over all dirty entities
for dir in packages/serverless/api packages/web-apps/dashboard packages/shared/types; do
  cd /tmp/gut-worktrees/workflow-billing/$dir
  git add -A && git commit -m "feat: billing changes" && git push -u origin workflow/billing
done
Quick status check: Use gut worktree status workflow/billing from the main checkout to see which entities are dirty without cd-ing into the worktree.
5

Why this matters

Without the super-repo, an AI agent sees one repo at a time. It can't trace an API change into the frontend, can't update shared types, can't run cross-repo tests. It works in a silo.

With GUT:

# The agent sees everything it needs
/tmp/gut-worktrees/workflow-billing/
  packages/serverless/api/        ← backend changes here
  packages/shared/types/          ← update types here
  packages/web-apps/dashboard/    ← frontend changes here
  docs/PRD-billing.md             ← the instructions
  docs/architecture/billing.md    ← the constraints
  rules/api-patterns.md           ← the guardrails

# One workspace. Full context. Complete autonomy.
# And your main checkout? Untouched.

Understand your workspace

GUT tracks dependencies, relationships, and patterns across entities.

?

Dependency analysis

gut deps sign           # what does sign depend on?
gut used-by api         # what depends on api?
gut affected core       # what breaks if core changes?
gut related sign        # entities related to sign
gut graph               # visual relationship graph
!

Workspace insights

gut insights           # workspace-wide analytics
gut patterns           # learned development patterns
gut audit              # access and change audit

All commands at a glance

Complete reference for every GUT command, organized by function.

Focus & Navigation
  • focus Set focus on entities
  • unfocus Clear current focus
  • back Return to previous focus
  • context Show current focus context
  • contexts List all contexts
  • recent Show focus history
  • stack Manage focus stack
Git Operations
  • checkout Switch/create branches
  • status Show status across repos
  • add Stage changes
  • commit Commit in all focused
  • push Push to remotes
  • pull Pull from remotes
  • sync Fetch + pull + push
Entity Management
  • entity add Register an entity
  • entity clone Clone from remote
  • entity clone-all Clone all entities
  • entity list List all entities
  • entity remove Remove from registry
Worktrees
  • worktree create Create mirrored worktree
  • worktree list List active worktrees
  • worktree status Per-entity worktree status
  • worktree remove Remove worktree
Analysis
  • deps Show dependencies
  • used-by Reverse dependencies
  • affected Impact analysis
  • related Find related entities
  • graph Visualize relationships
  • insights Workspace analytics
  • patterns Learned dev patterns
  • audit Change audit
Utilities
  • init Initialize workspace
  • quick-setup Automated setup
  • repos List remote repositories
  • extract Extract folder to new repo
  • ticket * Ticket management