Autonomous agent for discovering, analyzing, and fixing open GitHub issues — with a 5-layer guardrail system.
Every action goes through guardrails. Before any operation:
guardrails.json configFor guardrail details, see references/guardrails-guide.md.
audit/ directoryTrigger: User provides a GitHub repository (owner/repo).
Steps:
```bash
python3 scripts/guardrails.py repo
```
If blocked, tell the user and stop.
```bash
python3 scripts/recommend.py
```
This automatically fetches open issues, filters out PRs, scores them by severity/impact/effort/freshness, and presents a formatted recommendation.
Always use recommend.py — never manually format issue output. The script ensures consistent presentation every time.
For raw JSON (e.g., for further processing):
```bash
python3 scripts/recommend.py
```
⏹️ STOP. Wait for user to select an issue.
Trigger: User selects an issue.
Steps:
```bash
python3 scripts/guardrails.py issue_lock
```
notify):```bash
python3 scripts/sandbox.py run git clone https://github.com/
```
auto):```bash
python3 scripts/sandbox.py run git checkout -b fix-issue-
```
```bash
python3 scripts/guardrails.py path
```
```
## Proposed Fix
```
⏹️ STOP. Wait for user to approve the plan before implementing.
approve):python3 scripts/guardrails.py diff python3 scripts/audit.py log_action write_code successAfter implementing:
notify):```bash
python3 scripts/sandbox.py run npm test # or pytest, cargo test, etc.
```
autoRollbackOnTestFail is true:⚠️ NEVER create PR automatically. Always ask first.
Do NOT dump full diffs in chat. For any non-trivial project, push the branch
and let the user review on GitHub where they get syntax highlighting, file-by-file
navigation, and inline comments.
approve):```bash
python3 scripts/sandbox.py run git add .
python3 scripts/sandbox.py run git commit -m "Fix #
```
```
## Changes
```
approve):```bash
python3 scripts/sandbox.py run git push -u origin fix-issue-
python3 scripts/sandbox.py run gh pr create --draft --title "..." --body "..."
```
Note: PRs are always created as draft by default.
The PR body should include a detailed description of all changes, test results,
and link to the issue (Closes #N).
```bash
python3 scripts/guardrails.py issue_unlock
```
| Script | Purpose | Run Without Reading |
|---|---|---|
| -------- | --------- | --------------------- |
scripts/recommend.py | Primary entry point — fetch, score, and present issues | ✅ |
scripts/fetch_issues.py | Raw issue fetcher (used internally by recommend.py) | ✅ |
scripts/analyze_issue.py | Deep analysis of single issue | ✅ |
scripts/create_pr.py | PR creation wrapper | ✅ |
scripts/guardrails.py | Guardrail enforcement engine | ✅ |
scripts/sandbox.py | Safe command execution wrapper | ✅ |
scripts/audit.py | Action logger | ✅ |
共 1 个版本