Batch-API-native coding agent: plan realtime, execute on 24h-SLA batch APIs, optimize like a query engine.
Project description
lazycode
Your backlog, done by morning. A coding agent that plans with a realtime model and executes on provider batch APIs (50% off, 24h SLA), structured like a database query engine: logical plan → optimizer → physical plan → staged wave execution.
Not a pair programmer — the night shift. Point it at backlog burn-down (test coverage, migrations, lint eradication, mass refactors), close your laptop, review branches in the morning.
Status: pre-alpha, milestone M0 complete. Full design: docs/DESIGN.md · Landing page: rajagurunath.github.io/lazycode.
Quickstart
git clone <this repo> && cd lazycode
uv sync
cd /path/to/your-repo # any git repo with at least one commit
export ANTHROPIC_API_KEY=sk-ant-...
uv run lazycode run "add type hints to package X" --yes
# ┌─ Plan (logical) ────────────────────────────────────┐
# │ ... │
# └────────────────────────────────────────────────────┘
# ... waves run, a branch + report.md land in .lazycode/ ...
uv run lazycode status <job-id> # per-node detail
uv run lazycode explain <job-id> # logical + physical plan trees
uv run lazycode review <job-id> # branches, verification, assumption ledger
uv run lazycode resume <job-id> # after a crash / kill -9 / restart
--verify overrides the [verify].command from lazycode.toml; --model/--max-waves override defaults; no daemon is required (run/resume host the orchestrator in-process — see docs/DESIGN.md §2 for the daemon-mode alternative). Repo-local config lives in lazycode.toml (checked in), provider keys live in ~/.config/lazycode/config.toml (never checked in) — see Appendix B2.
Want to try it without an API key first? Point lazycode.toml at the mock provider seam ([defaults] provider = "mock", [providers.mock] fixture = "...") — the same mechanism tests/e2e/ and bench/ use for deterministic, zero-network runs.
M0 status
What works today, end to end, verified by the test suite:
lazycode run "<goal>" --yes— realtime plan → CLI approval → wave loop → git branch +report.md/report.json, all via the Anthropic batch + realtime adapters (or the mock seam for testing).lazycode status/explain/review— read-only, work whether or not a job/daemon is live.lazycode resume <job-id>— reopens the store and drives an interrupted job to completion; crash-safe:kill -9mid-wave thenresumedoes not double-submit the batch or double-apply the diff (event-sourced replay + the applied-diff ledger, DESIGN.md §7.1/§9). Covered bytests/e2e/test_crash_resume.py.lazycode daemon— foreground-only single-writer daemon;runhands jobs to it over HTTP when it's up (--backgroundis not implemented in M0 — run it under launchd/systemd/tmux instead).- Multi-file fan-out — independent
Generatenodes land in one wave (tests/e2e/test_happy_path.py); optimizer is R1/R2 only (local pushdown + context pruning), no model tiering or speculation yet. - Benchmark harness (
bench/) — three fixture-repo tasks, lazycode-vs-Claude-Code-CLI token comparison,<50%verdict (Appendix B7).
What doesn't work yet (by design — later milestones, Appendix B11):
- No repair loop — a failed contract or verify run goes straight to
NEEDS_HUMAN, not a retry (M1). - No cost estimate in the pre-flight prompt (plan tree + y/N only), no
explain analyze, no cost/slider-driven optimizer beyond R1/R2 (M2). - No hedging or deadline-aware fallback to realtime (M2), no speculation/vectorization (M4).
- No web UI, no desktop/Slack notifications (log line only), no
watchTUI (M3). - Single provider (Anthropic) + realtime planner only — no OpenAI/Gemini/pseudo-batch adapters yet (M4).
--backgrounddaemon mode,merge/cancelcommands, and GitHub Actions best-effort runner are all unimplemented (M1/M2).- Memo-key sharing across duplicate nodes (by design): two distinct nodes that render byte-identical prompts share one R10 memo entry — the second is served from cache and, its identical diff being already in the applied-diff ledger, is marked DONE without a second apply. Since the rendered prompt embeds the node's spec, harvested files, and contract globs, identical prompts always mean identical requested work at M0's
temperature=0.0/sample_idx=0; deliberate N-best sampling of one prompt gets distinctsample_idxvalues in M4 (DESIGN.md §5.2 R7/R10).
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 lazycode_agent-0.0.1.tar.gz.
File metadata
- Download URL: lazycode_agent-0.0.1.tar.gz
- Upload date:
- Size: 220.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cdb9420357bfde4a9b4e65b7354a1f49a150b54c89d01e0af22170bc04b0400
|
|
| MD5 |
98ba3dbb26e7bc5dc69c97164a9da1a2
|
|
| BLAKE2b-256 |
e33343ff5aa4b31c8cddd2176ce3e520fe332de914a5fc15dfe3acd09853f60a
|
File details
Details for the file lazycode_agent-0.0.1-py3-none-any.whl.
File metadata
- Download URL: lazycode_agent-0.0.1-py3-none-any.whl
- Upload date:
- Size: 127.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b71bec00cb08c4a1be50aebca2d9508cf31f1cfc8778dc1693d2015a9efbb20a
|
|
| MD5 |
f7596a532d09fd778c090db971fd7a1d
|
|
| BLAKE2b-256 |
8414dc752be0c0e3553f2e331995a2883492d8028e39e7d89034538d95e0575c
|