The AI Staff Engineer every repository deserves. Project #3 in a larger local-first AI ecosystem built on the Personal LLM core.
This repo is the engineering-manager layer: it understands a repository, reports on its
health, triages its issues, and drafts a pull-request plan. It deliberately does not write
the code. On the free/local model the ecosystem uses, analysis and planning are reliable while
code generation is not - so implementation is handed to the /github-pr Claude Code skill,
which does the real PR work (write the fix, run tests, open the PR after your approval).
Its pattern is proven: the manager layer triaged a real issue, the implementer skill wrote the fix, and the resulting PR (#2, a hardening pass with the full 32-test suite) was reviewed and merged.
analyze- summarize a local repo: languages, dependency manifests, layout.triage- pull open issues via the GitHub CLI and rank the best first-issue candidates.report- a markdown engineering report (health checklist + a deterministic benchmark scorecard + languages + optional triage + a short model-written assessment).plan- draft a PR implementation plan for one issue: the handoff artifact for/github-pr.
Triage/report/plan reuse the authenticated gh CLI for GitHub data and the free Personal LLM
router (Gemini free tier or local Ollama) only for the prose. No new API keys.
Clone this repo and the core side by side, then install both:
git clone https://github.com/syzayd/personal-llm
git clone https://github.com/syzayd/github-pr-agent
cd github-pr-agent
py -3.12 -m venv venv
& "venv\Scripts\python" -m pip install -r requirements.txt
# Personal LLM core (for the prose commentary). Its runtime deps live in its requirements.txt.
& "venv\Scripts\python" -m pip install -r ..\personal-llm\requirements.txt
& "venv\Scripts\python" -m pip install -e ..\personal-llm
& "venv\Scripts\python" -m pip install -e .
# The `gh` CLI must be installed and authenticated for triage/plan:
gh auth status# Analyze any local repo
& "venv\Scripts\python" -m autocto.interfaces.cli analyze ..\second-brain
# Triage issues on any GitHub repo (best first-issue candidates first)
& "venv\Scripts\python" -m autocto.interfaces.cli triage syzayd/second-brain --label "good first issue"
# Full engineering report (local analysis + remote triage)
& "venv\Scripts\python" -m autocto.interfaces.cli report ..\second-brain --repo syzayd/second-brain --out data\report.md
# Draft a PR plan for one issue, then hand it to /github-pr to implement
& "venv\Scripts\python" -m autocto.interfaces.cli plan syzayd/second-brain 12 --path ..\second-brain --out data\pr-plan.mdAutoCTO produces the plan; the /github-pr skill executes it. You can run either alone:
/github-pr can find and fix an issue on its own, and AutoCTO can report/triage without ever
opening a PR. Together, AutoCTO scopes the work and the skill does it.
& "venv\Scripts\python" -m pytest tests/ -q43 tests (1 additional test skips gracefully if the sibling personal_llm core isn't
installed alongside this repo). The logic modules (repo, issues, report, plan,
github) take injected callables and fake data - no gh, network, or model needed - so
the suite runs fully offline (CI runs it keyless on every push). Only the CLI touches
gh and Personal LLM, and it imports them lazily. Hardened invariants: every gh
failure becomes a readable GhError (exit 1, no traceback), the LLM degrades to a stub
if the core is missing, and repo scanning is deterministic.
Demo GIF coming soon. Until then, analyze on any local repo runs offline with zero setup
beyond the Quickstart.
Small, focused PRs welcome - see CONTRIBUTING.md for the ground
rules (the short version: tests stay offline and keyless, inject fakes, gh and
personal_llm imports stay lazy in the CLI only). Bug and feature issue templates are
under .github/ISSUE_TEMPLATE/.
MIT.