src/
├── cli.ts # CLI entry point
├── index.ts # Library exports
├── commands/ # CLI command handlers (75+ commands)
├── core/ # Git implementation
│ ├── repository.ts # Main Repository class
│ ├── object.ts # Git objects (blob, tree, commit, tag)
│ ├── object-store.ts # Object persistence
│ ├── index.ts # Staging area
│ ├── refs.ts # References (branches, tags)
│ ├── protocol/ # Git protocols (Smart HTTP, SSH)
│ └── storage/ # Storage backends
├── server/ # Server infrastructure
│ ├── routes/ # HTTP endpoints
│ ├── ssh/ # SSH server
│ ├── middleware/ # Auth, rate limiting
│ └── sandbox/ # Code execution sandboxes
├── api/ # tRPC API layer
│ └── trpc/ # tRPC routers
├── db/ # Database schema
│ ├── schema.ts # Drizzle schema
│ └── auth-schema.ts # Authentication tables
├── ai/ # AI features
│ ├── agent.ts # AI coding agent
│ ├── tools/ # Agent tools
│ └── workflows/ # Multi-step workflows
├── events/ # Event-driven architecture
│ ├── bus.ts # Event bus
│ └── handlers/ # Event handlers
├── ui/ # Terminal and web UI
├── search/ # Semantic code search
├── primitives/ # Core abstractions
└── ci/ # CI/CD execution