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
tools/ # shared helper utilities (git/path/runtime helpers)
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
Internal Tools Package
PhoenixGitHub includes reusable runtime helpers under src/phoenixgithub/tools/:
git_utils.py: default-branch detection, changed-path parsing, uncovered-path coverage checks.path_utils.py: image URL detection, image extension inference, image URL extraction from issue/comment text.
These helpers are used by github_client.py to keep the core client focused on orchestration/API behavior.
Maintainer Documentation
INTERNAL_README.md: architecture and operations runbook.RELEASING.md: release and publishing process.docs/README.md: documentation index.
Metadata
Release files for phoenixgithub 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| phoenixgithub-0.1.4.tar.gz | 35.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| phoenixgithub-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 76.7 kB
Release files / phoenixgithub-0.1.4.tar.gz
| Download URL | phoenixgithub-0.1.4.tar.gz |
|---|---|
| Size | 35.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d0ec1c7a0030a52277763490d415ece103ebaa23e70cd5a6314969ca0835910
|
|
BLAKE2b-256 checksum How to use checksums |
f250356b2a58aefe686a5573731d8f913a365f9f769fcfa3582396b1a4cadcdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.
Transparency logRelease files / phoenixgithub-0.1.4-py3-none-any.whl
| Download URL | phoenixgithub-0.1.4-py3-none-any.whl |
|---|---|
| Size | 41.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7b7c4dcfdc879001b0d8bbe91712e278716e4a17ba6e21dc234977a35f4bab1
|
|
BLAKE2b-256 checksum How to use checksums |
a29a4f29e0004587ea1e68ef2660c48050f4cc848be1a4c17390569407d5c983
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.
Transparency log