Skip to main content

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:ready or ai: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:

  1. Transitions the issue to ai:in-progress.
  2. Prepares a working branch (phoenix/issue-<number>).
  3. Builds a plan from issue details and existing code.
  4. Applies code changes through the coder agent.
  5. Runs validation and test checks.
  6. Commits and pushes results.
  7. Creates (or reuses) a pull request.
  8. Transitions the issue to:
    • ai:review on success
    • ai:failed on 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 in owner/repo format.
  • LLM_PROVIDER: model provider (for example anthropic).
  • 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 to ai: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_V2
  • LANGCHAIN_API_KEY
  • LANGCHAIN_PROJECT (commonly phoenix-${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

  1. Create or select an issue in your target repo.
  2. Add label ai:ready.
  3. Run phoenixgithub watch.
  4. Wait for label transition to ai:review.
  5. Review and merge the created PR.
  6. Mark the issue done (or automate done labeling with your workflow).

Troubleshooting

  • Issue not picked up: verify ai:ready or ai:revise is present.
  • Auth errors: verify PAT scopes and LLM credentials.
  • Stuck local dispatch state: run phoenixgithub reset-issue <number>.
  • Workspace inconsistencies: clean WORKSPACE_DIR and restart watcher.
  • No tests collected: consider ALLOW_NO_TESTS=true for 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

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

phoenixgithub-0.1.2.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phoenixgithub-0.1.2-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file phoenixgithub-0.1.2.tar.gz.

File metadata

  • Download URL: phoenixgithub-0.1.2.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for phoenixgithub-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7e642a0872d9e50a6fc8b41df3dbb862c77b7ad135314ef33fb3aab322c7429d
MD5 f6517886f587e9884f51073eddbde9c3
BLAKE2b-256 ebaa73e8369deb3e34f1609d436282eef4e284c9f1459ce24d531a9a00604ac1

See more details on using hashes here.

Provenance

The following attestation bundles were made for phoenixgithub-0.1.2.tar.gz:

Publisher: publish-pypi.yml on kkipngenokoech/phoenixgithub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phoenixgithub-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: phoenixgithub-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for phoenixgithub-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4ca4cbd5cd16e8b0e9b6e7d7187f3efecc1fd09e7b47d54632513ae2370e9497
MD5 9504dca2ef9c7edb37b6aba5e8be5197
BLAKE2b-256 e60c1b27b0762b5c2327a47f782ebf6b5d22b24d12eb1f1223f28e050c7fdc83

See more details on using hashes here.

Provenance

The following attestation bundles were made for phoenixgithub-0.1.2-py3-none-any.whl:

Publisher: publish-pypi.yml on kkipngenokoech/phoenixgithub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page