Always-on AI agent that picks up GitHub issues, implements them, and creates PRs for human review.
Project description
PhoenixGitHub
PhoenixGitHub is an always-on AI engineering agent for GitHub repositories.
It watches labeled issues, plans and implements changes, validates the result, and opens a pull request for human review.
Project Description
PhoenixGitHub turns issue labels into a lightweight development workflow:
- Pick up work from
ai:readyorai:revise. - Run a structured pipeline: plan -> code -> test -> PR.
- Keep issue state synchronized with labels (
ai:in-progress,ai:review,ai:failed,ai:done). - Provide guided retry loops when a run fails.
- Support interactive first-time setup with
phoenixgithub init.
This is designed for teams who want AI automation in normal GitHub workflows, without replacing human approval on merges.
Installation
pip install phoenixgithub
Quick Start
1) Initialize configuration
phoenixgithub init
The setup wizard writes .env in your current directory and prompts for required credentials with hidden input for secrets.
2) Verify configuration
phoenixgithub status
3) Start the watcher
phoenixgithub watch
4) Trigger an issue run
In your GitHub repo, add label ai:ready to an issue. PhoenixGitHub will pick it up automatically.
End-to-End Flow
When an issue enters ai:ready or ai:revise, PhoenixGitHub:
- Transitions the issue to
ai:in-progress. - Prepares a working branch (
phoenix/issue-<number>). - Builds a plan from issue details and existing code.
- Applies code changes through the coder agent.
- Runs validation and test checks.
- Commits and pushes results.
- Creates (or reuses) a pull request.
- Transitions the issue to:
ai:reviewon successai:failedon failure
Label State Machine
ai:ready / ai:revise -> ai:in-progress -> ai:review -> ai:done
-> ai:failed -> ai:revise (optional auto-revise)
AI state labels are enforced as mutually exclusive.
CLI Reference
| Command | Purpose |
|---|---|
phoenixgithub init |
Interactive setup wizard that creates .env |
phoenixgithub watch |
Run the daemon and process labeled issues continuously |
phoenixgithub run-issue <number> |
One-shot run for a single issue |
phoenixgithub status |
Show watcher state and recent runs |
phoenixgithub reset-issue <number> |
Clear local dispatch lock for an issue |
Key Features
- Issue-driven automation: labels control the entire workflow.
- Deterministic orchestration: clear step boundaries (plan, implement, test, PR).
- Failure feedback loop: failure analyst comments with suggested fixes.
- Revise mode: targeted retries using
ai:revise. - Validation profiles:
auto,python,frontend,generic. - Safety rails: path protections, label exclusivity, no-progress cycle limits.
Configuration
Most users should use phoenixgithub init. Manual setup is also supported using .env.example.
Core Variables
GITHUB_TOKEN: GitHub PAT used for issue/PR/label operations.GITHUB_REPO: repository inowner/repoformat.LLM_PROVIDER: model provider (for exampleanthropic).LLM_MODEL: model ID accepted by your endpoint.LLM_API_KEY: provider or gateway API key.POLL_INTERVAL: watcher poll interval in seconds.MAX_CONCURRENT_RUNS: watcher dispatch pressure.
Agent Behavior Variables
TEST_COMMAND: command used by tester.AUTO_REVISE_ON_TEST_FAILURE: auto-relable toai:revise.AUTO_REVISE_MAX_CYCLES: max auto-revise attempts.NO_PROGRESS_ROOT_CAUSE_REPEAT_LIMIT: stop repeated root causes sooner.REVISE_INCREMENTAL: reuse branch/worktree on revise runs.ALLOW_NO_TESTS: treat pytest exit 5 as pass if enabled.VALIDATION_PROFILE:auto,python,frontend,generic.
Tracing Variables
LANGCHAIN_TRACING_V2LANGCHAIN_API_KEYLANGCHAIN_PROJECT(commonlyphoenix-${GITHUB_REPO})
GitHub Token Permissions
Your token should allow issue, PR, and content operations. For fine-grained PATs, recommended permissions are:
- Repository contents: read/write
- Issues: read/write
- Pull requests: read/write
- Workflows: read/write (if installing workflow helpers)
- Metadata: read-only
Example Usage Pattern
- Create or select an issue in your target repo.
- Add label
ai:ready. - Run
phoenixgithub watch. - Wait for label transition to
ai:review. - Review and merge the created PR.
- Mark the issue done (or automate done labeling with your workflow).
Troubleshooting
- Issue not picked up: verify
ai:readyorai:reviseis present. - Auth errors: verify PAT scopes and LLM credentials.
- Stuck local dispatch state: run
phoenixgithub reset-issue <number>. - Workspace inconsistencies: clean
WORKSPACE_DIRand restart watcher. - No tests collected: consider
ALLOW_NO_TESTS=truefor non-test repos.
Safety and Guardrails
- Path traversal prevention blocks writes outside repository root.
- AI labels are mutually exclusive during state transitions.
- New folder guardrail requires meaningful
README.md. - Failure analyst provides structured root-cause feedback.
- Revise loops are bounded by configurable cycle limits.
Project Structure
src/phoenixgithub/
cli.py # CLI commands
config.py # configuration model from environment
github_client.py # GitHub API and git operations
orchestrator.py # plan/implement/test/pr pipeline
watcher.py # polling and dispatch
state.py # local run and watcher state
agents/ # planner/coder/tester/pr/failure analyst
scripts/
pre_release.py # local release checks
create_labels.py # create/ensure AI labels in target repo
install_merge_done_workflow.py # install merge->ai:done workflow
reset_repo_state.py # clear local run/clone state for current repo
.github/workflows/
publish-pypi.yml # GitHub Release -> PyPI publish (OIDC)
docs/
README.md # docs index
INTERNAL_README.md # internal architecture and operations guide
RELEASING.md # release runbook
Maintainer Documentation
INTERNAL_README.md: architecture and operations runbook.RELEASING.md: release and publishing process.docs/README.md: documentation index.
Project details
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 phoenixgithub-0.1.3.tar.gz.
File metadata
- Download URL: phoenixgithub-0.1.3.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c158f0199469b49930a80602feb2fe0b5f97cf38a637bf684986b76b8d211f9
|
|
| MD5 |
97bbff500b1b33077f9562544355c48f
|
|
| BLAKE2b-256 |
5c13f31a6a4d697983ca1137b3341e2f2e0a113fff807c79b24eaf7b8295009f
|
Provenance
The following attestation bundles were made for phoenixgithub-0.1.3.tar.gz:
Publisher:
publish-pypi.yml on kkipngenokoech/phoenixgithub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phoenixgithub-0.1.3.tar.gz -
Subject digest:
6c158f0199469b49930a80602feb2fe0b5f97cf38a637bf684986b76b8d211f9 - Sigstore transparency entry: 1006434939
- Sigstore integration time:
-
Permalink:
kkipngenokoech/phoenixgithub@3d54b90a294c25ab64defc280769c3a531beca02 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/kkipngenokoech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@3d54b90a294c25ab64defc280769c3a531beca02 -
Trigger Event:
release
-
Statement type:
File details
Details for the file phoenixgithub-0.1.3-py3-none-any.whl.
File metadata
- Download URL: phoenixgithub-0.1.3-py3-none-any.whl
- Upload date:
- Size: 39.7 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 |
aad2ba31e61e1b78acb846a1821515ea2b84439753f438729f4effc70365eb35
|
|
| MD5 |
56d10d391eaa5860709d59557f43f667
|
|
| BLAKE2b-256 |
31c5648c40fd246454648e9f5580ddd5e380ef0902b47acd20059e0f2a8001e2
|
Provenance
The following attestation bundles were made for phoenixgithub-0.1.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on kkipngenokoech/phoenixgithub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phoenixgithub-0.1.3-py3-none-any.whl -
Subject digest:
aad2ba31e61e1b78acb846a1821515ea2b84439753f438729f4effc70365eb35 - Sigstore transparency entry: 1006434940
- Sigstore integration time:
-
Permalink:
kkipngenokoech/phoenixgithub@3d54b90a294c25ab64defc280769c3a531beca02 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/kkipngenokoech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@3d54b90a294c25ab64defc280769c3a531beca02 -
Trigger Event:
release
-
Statement type: