Agent-native repo orchestration for multi-agent coordination in Git repositories
Project description
Lodestar
Agent-native repo orchestration for multi-agent coordination in Git repositories.
Lodestar is a Python CLI tool that enables multiple AI agents (or humans) to work together on tasks in a Git repository without stepping on each other's toes. It provides atomic task claiming with leases, dependency tracking, and inter-agent messaging—all without requiring a central coordinator or human scheduler.
Why Lodestar?
When multiple agents work in the same repository, chaos ensues: duplicate work, merge conflicts, and broken dependencies. Lodestar solves this by providing:
- Task claiming with leases: Agents atomically claim tasks with TTL-based expiration (no daemons required)
- Dependency-aware scheduling: Tasks automatically become available when their dependencies are verified
- Clean Git history: Task definitions live in
.lodestar/spec.yaml(committed), while execution state lives inruntime.sqlite(gitignored) - No central server: Everything runs locally using SQLite for race-free coordination
Key Features
- Multi-Agent Coordination: Multiple agents can work simultaneously without conflicts through atomic task claims
- Lease-Based Claims: Tasks are claimed with time-limited leases that auto-expire, preventing stuck locks
- Two-Plane State Model: Clean separation between task definitions (spec) and execution state (runtime)
- Dependency Tracking: DAG-based task scheduling with automatic readiness detection
- PRD Context Delivery: Tasks carry just-enough product intent from PRDs—frozen excerpts, section refs, and drift detection
- Self-Documenting CLI: Every command supports
--json,--schema, and--explainflags for programmatic access - Progressive Discovery: No-args commands suggest next actions to guide workflows
- Agent Messaging: Built-in inter-agent communication for handoffs and coordination
Installation
Using uv (recommended)
uv add lodestar-cli
Using pip
pip install lodestar-cli
Using pipx (for global install)
pipx install lodestar-cli
Verify the installation:
lodestar --version
Quick Start
Initialize a repository and complete your first task:
# Initialize Lodestar in your Git repository
lodestar init
# Check repository health
lodestar doctor
# Create a task
lodestar task create \
--id "TASK-001" \
--title "Set up project structure" \
--description "Create initial directory layout" \
--priority 1 \
--label feature
# Join as an agent
lodestar agent join
# Output: Registered as agent A1234ABCD
# Find available work
lodestar task next
# Claim a task (prevents other agents from taking it)
lodestar task claim TASK-001 --agent A1234ABCD
# Do your work...
# git add, git commit, etc.
# Mark task as done
lodestar task done TASK-001
# Verify completion (unblocks dependent tasks)
lodestar task verify TASK-001
# Delete a task (soft-delete, preserves in spec.yaml)
lodestar task delete TASK-002
# Check status
lodestar status
For development/testing, use uv run lodestar instead of lodestar to run from source.
Architecture Overview
Lodestar uses a two-plane state model that separates concerns:
| Plane | Purpose | Location | Git Status |
|---|---|---|---|
| Spec Plane | Task definitions, dependencies, acceptance criteria | .lodestar/spec.yaml |
Committed |
| Runtime Plane | Agent state, leases, heartbeats, messages | .lodestar/runtime.sqlite |
Gitignored |
This separation provides:
- Clean Git history: No noise from lease claims or heartbeats in version control
- Easy resets: Delete
runtime.sqliteto start fresh without losing task definitions - Reproducibility: Same spec produces same task graph on any machine
- Multi-machine support: Each machine has its own runtime state but shares the task definitions
How It Works
┌─────────────────────────────────────────────────────────────┐
│ Git Repository │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ .lodestar/spec.yaml (committed) │ │
│ │ - Task definitions │ │
│ │ - Dependencies (DAG) │ │
│ │ - Priorities & labels │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ .lodestar/runtime.sqlite (gitignored) │ │
│ │ - Registered agents │ │
│ │ - Active leases (task claims) │ │
│ │ - Task status (ready/done/verified) │ │
│ │ - Inter-agent messages │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Tasks flow through states: ready → done → verified. A task becomes claimable when it's ready and all its dependencies are verified. Tasks can also be soft-deleted (status set to deleted) to hide them from normal views while preserving history.
PRD Context Delivery
Tasks can carry product intent from a PRD, so executing agents don't need to re-read the full document:
# Get PRD context for a task
lodestar task context TASK-001
# Create a task with PRD context attached
lodestar task create \
--id "TASK-002" \
--title "Implement password reset" \
--prd-source PRD.md \
--prd-ref "#password-reset" \
--prd-excerpt "Reset tokens must expire after 15 minutes..."
When claiming a task, context is delivered automatically. If the PRD has changed since task creation, you'll get a drift warning.
Documentation
Full documentation is available in the docs/ directory:
- Getting Started - Installation and first steps
- Concepts - Architecture and core concepts
- CLI Reference - Complete command documentation
- Guides - How-to guides for common workflows
You can also browse the docs locally:
uv run mkdocs serve
Contributing
Contributions are welcome! This project uses Lodestar for its own task management (dogfooding).
Development Setup
# Clone the repository
git clone https://github.com/lodestar-cli/lodestar.git
cd lodestar
# Install dependencies
uv sync
# Run tests
uv run pytest
# Run linting
uv run ruff check src tests
uv run ruff format src tests
# Serve documentation locally
uv run mkdocs serve
Using Lodestar to Contribute
This repository uses Lodestar for task management. To contribute:
- Run
uv run lodestar statusto see available work - Find tasks with
uv run lodestar task next - Claim a task before working:
uv run lodestar task claim <id> --agent <your-agent-id> - Make your changes and commit
- Mark complete:
uv run lodestar task done <id> - Verify:
uv run lodestar task verify <id>
See CLAUDE.md for detailed development guidelines.
Testing Standards
Before committing, ensure all checks pass:
uv run ruff check src tests # Linting
uv run ruff format --check src tests # Format check
uv run pytest # Tests
uv run mkdocs build # Docs build
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
- PyPI: lodestar-cli
- Repository: github.com/lodestar-cli/lodestar
- Issues: github.com/lodestar-cli/lodestar/issues
- Documentation: docs/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lodestar_cli-0.1.1.tar.gz.
File metadata
- Download URL: lodestar_cli-0.1.1.tar.gz
- Upload date:
- Size: 156.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f9603b5e3b5d229445b59ab5f2a5211aecab732fe8c60da0474215d80c0f9cc
|
|
| MD5 |
60c0adea604a7ebe1d1ffaa523d2837d
|
|
| BLAKE2b-256 |
bd2b474e5c88a00863b0d544fb3afaed1f46abadf6cd07eabfec53e811f97eab
|
Provenance
The following attestation bundles were made for lodestar_cli-0.1.1.tar.gz:
Publisher:
publish.yml on ThomasRohde/lodestar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lodestar_cli-0.1.1.tar.gz -
Subject digest:
6f9603b5e3b5d229445b59ab5f2a5211aecab732fe8c60da0474215d80c0f9cc - Sigstore transparency entry: 780684937
- Sigstore integration time:
-
Permalink:
ThomasRohde/lodestar@ffb3c638e8e0a4484e42bf90f459a99947637d7e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ThomasRohde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ffb3c638e8e0a4484e42bf90f459a99947637d7e -
Trigger Event:
push
-
Statement type:
File details
Details for the file lodestar_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lodestar_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 60.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac9e8149b03c7d9139490639ebc45f00573f05063eb168deaa80e9ac6a9180bc
|
|
| MD5 |
1ffa045bcc9b9239b7e9f206291134e1
|
|
| BLAKE2b-256 |
bb90173f181e3d4d6fcb39e4977b201b0ca7cc392d51737182646295a46dca11
|
Provenance
The following attestation bundles were made for lodestar_cli-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on ThomasRohde/lodestar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lodestar_cli-0.1.1-py3-none-any.whl -
Subject digest:
ac9e8149b03c7d9139490639ebc45f00573f05063eb168deaa80e9ac6a9180bc - Sigstore transparency entry: 780684939
- Sigstore integration time:
-
Permalink:
ThomasRohde/lodestar@ffb3c638e8e0a4484e42bf90f459a99947637d7e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ThomasRohde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ffb3c638e8e0a4484e42bf90f459a99947637d7e -
Trigger Event:
push
-
Statement type: