This repository contains a zero-dependency Python implementation of the PRD in AUTONOMOUS_SOFTWARE_EVOLUTION_SYSTEM_PRD.md.
The current v1 focuses on the control plane and safety model:
- repository snapshotting
- evidence-backed task generation
- bounded task selection with scoring and cooldowns
- branch locking and base-branch revalidation
- deterministic review guardrails
- baseline-aware validation
- run history and artifact storage outside the product repository
- optional external coder and pull request integrations
By default, the system is conservative. If no coder is configured, it analyzes the repository, selects a task, and then skips safely without mutating the repo.
autonomous_dev/
agents/
orchestrator/
repo/
ai/
product_context.md
tests/
Important files:
autonomous_dev/orchestrator/main.py: cycle orchestration and CLIautonomous_dev/repo/repo_snapshot.py: repository snapshot engineautonomous_dev/agents/planner_agent.py: candidate scoring and task brief generationautonomous_dev/agents/reviewer_agent.py: diff guardrail enforcementautonomous_dev/agents/tester_agent.py: baseline-aware validation
uvgitinstalled and available onPATH- a clean repository working tree before running a cycle
- at least one commit on the base branch
The orchestrator refuses to run if the repository is dirty or has no commits.
Install the project environment:
UV_CACHE_DIR=/tmp/uv-cache uv syncRun the test suite:
UV_CACHE_DIR=/tmp/uv-cache uv run python -m unittest discover -s tests -qThe orchestrator expects this committed file inside the target repository:
ai/product_context.md
Show the built-in help:
UV_CACHE_DIR=/tmp/uv-cache uv run python -m autonomous_dev.orchestrator.main --helpRun an analysis-only cycle that skips safely before implementation:
UV_CACHE_DIR=/tmp/uv-cache uv run python -m autonomous_dev.orchestrator.main \
--repo . \
--base-branch main \
--editable-path autonomous_dev/ \
--editable-path tests/ \
--editable-path ai/Run a full cycle with commits enabled:
UV_CACHE_DIR=/tmp/uv-cache uv run python -m autonomous_dev.orchestrator.main \
--repo . \
--base-branch main \
--editable-path autonomous_dev/ \
--editable-path tests/ \
--editable-path ai/ \
--coder-command "/absolute/path/to/scripts/generic_coder_wrapper.py" \
--commitRun a full cycle with commit and pull request hooks:
UV_CACHE_DIR=/tmp/uv-cache uv run python -m autonomous_dev.orchestrator.main \
--repo . \
--base-branch main \
--editable-path autonomous_dev/ \
--editable-path tests/ \
--editable-path ai/ \
--coder-command "/absolute/path/to/scripts/generic_coder_wrapper.py" \
--pr-command "/path/to/pr-wrapper" \
--commit \
--open-prThe built-in coder and PR integrations are intentionally generic. You provide wrapper scripts or executables, and the orchestrator passes context through environment variables.
This repository includes a generic coder wrapper at scripts/generic_coder_wrapper.py. By default it:
- reads the selected
task_brief.json - builds a bounded implementation prompt
- invokes the local
codex execCLI in the target repository
That wrapper is repo-agnostic. You can use the same file against any repository that has the required ai/ context files.
External coder command environment:
AUTONOMOUS_DEV_REPO_PATHAUTONOMOUS_DEV_TASK_BRIEF_PATHAUTONOMOUS_DEV_RUN_PATHAUTONOMOUS_DEV_BASE_REFAUTONOMOUS_DEV_BRANCH_NAME
External PR command environment:
AUTONOMOUS_DEV_REPO_PATHAUTONOMOUS_DEV_TASK_BRIEF_PATHAUTONOMOUS_DEV_BRANCH_NAMEAUTONOMOUS_DEV_BASE_BRANCH
The coder command is expected to modify the repository in place. The PR command is expected to create a pull request through whatever mechanism you choose, for example gh, an internal tool, or a custom API wrapper.
Example using the included generic wrapper against another repository:
UV_CACHE_DIR=/tmp/uv-cache uv run python -m autonomous_dev.orchestrator.main \
--repo /absolute/path/to/target-repo \
--base-branch main \
--editable-path app/ \
--editable-path src/ \
--editable-path tests/ \
--editable-path ai/ \
--coder-command "/Users/walterheck/Source/helixiora/internal/simple/scripts/generic_coder_wrapper.py" \
--commitIf you want the wrapper to delegate to a different tool instead of Codex, switch it to command mode and provide a custom delegate:
AUTONOMOUS_DEV_DELEGATE_CMD="python /path/to/your_delegate.py" \
/Users/walterheck/Source/helixiora/internal/simple/scripts/generic_coder_wrapper.py --backend commandIf your local uv cache directory is writable, you can omit UV_CACHE_DIR=/tmp/uv-cache. It is included above because this environment does not allow writing to the default Homebrew cache location.
Runtime state is stored inside this orchestrator repository by default under:
.autonomous_dev_runs/<target-repo-slug>/
Each run for a given target repository under that directory gets its own workspace with artifacts such as:
repo_summary.jsonmodule_index.jsondependency_graph.jsonanalysis_report.jsoncandidate_tasks.jsontask_brief.jsonimplementation_result.jsonreview_result.jsonvalidation_result.jsoncycle_outcome.json
Per-repository history is stored as JSON Lines in the runtime root.
The current implementation enforces these main policies:
- only one active cycle per repository and base branch
- temporary improvement branch creation by default
- no dependency manifest changes
- no edits under forbidden paths such as
deployment/,terraform/, or.github/workflows/ - only allowlisted editable paths may be changed
- behavior-changing Python diffs require test changes
- diff size limits for files changed and lines changed
- validation compares the candidate against the base branch baseline when available
- the analysis and planning layers are deterministic heuristics, not live model calls
- there is no built-in pull request provider; PR creation is delegated to an external command
- there is no built-in scheduler daemon; periodic execution is expected to come from cron, systemd, GitHub Actions, or another runner
- validation defaults to
compileallandunittestdiscovery unless you extend the tester agent - the repository under analysis must already contain committed AI context files
If you want to use this against a real repository, the practical next step is to write two tiny wrappers:
- a coder wrapper that reads
task_brief.jsonand calls your preferred coding tool - a PR wrapper that creates a pull request for an approved committed branch