$ show liza-mas/liza
Liza is a disciplined multi-agent orchestration system for AI-assisted software development. It manages a pipeline of roles (orchestrator, coder, reviewer, architect) that collaborate via a behavioral contract enforced by deterministic Go code. The system provides a CLI (Cobra) and a Bubbletea TUI, with a YAML-based state file (blackboard) for persistence, Git worktree isolation per task, and a state-machine task lifecycle (planning → implementation → review → merge). It integrates with multiple LLM providers (Claude, Codex, Gemini, etc.) via their CLIs or the Agent Context Protocol (ACP). The architecture follows a clean layered design: `cmd/liza/` contains CLI commands, `internal/commands/` are thin adapters, `internal/ops/` holds core business logic (claiming, submitting, reviewing, merging, recovering), `internal/models/` defines domain types, and `internal/db/` manages the blackboard. The system is heavily test-covered with unit, integration, and lifecycle replay tests. It also includes optional codebase indexing via SCIP, Stacklit, and Semble for improved context. Key features include generation-fenced agent authority, circuit breaker anomaly detection, sprint metrics, checkpoint summaries, automated dependency repair, and pre-commit hooks. The repository is well-documented with extensive ADRs, architecture diagrams, and skill definitions. While the codebase is large and has some platform-specific code (Windows support), it demonstrates high craftsmanship in its use of idempotent lifecycle receipts, file-locking primitives, and error classification.
The LLM identified 3 files worth highlighting for reuse:
Provides shared and exclusive file-based mutexes with timeout, context cancellation, owner metadata, and classified error types (timeout, permission, disk, stale). Used across the codebase for state file access and task worktree locking. The abstraction is clean and could be extracted as a standalone library for any Go project needing cross-process file locking.
Defines a comprehensive typed error hierarchy (PreconditionError, OperationalError, CLIInputError, NotFoundError, etc.) with safe message exposure via SafeDetails() and automatic CLI exit code assignment. Used throughout the codebase for structured error propagation. This pattern is reusable in any Go project requiring controlled error disclosure and classification.
Implements a thread-safe, file-backed state store with in-memory LRU caching, deep clone isolation, and atomic writes via fsync+rename. Provides ReadCached(), Modify(), and lifecycleMutation() primitives. The pattern of combining a cache with a file-based backing store is reusable for any application needing simple persistent state with concurrent access.