Files
NetMesh/.github/ai/README.md
zhaolei 3c72efcb7f
Some checks failed
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / resolve bundled et-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / build-linux-x64 (push) Has been cancelled
build-packages / build-linux-arm64 (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / update Nix release metadata (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled
test / lint-and-test (push) Has been cancelled
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
build-et-binaries / build-linux-x64 (push) Has been cancelled
build-et-binaries / build-linux-arm64 (push) Has been cancelled
build-et-binaries / build-macos-universal (push) Has been cancelled
build-et-binaries / build-windows-x64 (push) Has been cancelled
build-et-binaries / release (push) Has been cancelled
[Init] Initial commit - NetMesh terminal manager
2026-09-13 18:24:01 +08:00

60 lines
2.5 KiB
Markdown

# AI automation
GitHub Actions orchestration that uses **Claude Code** with an Ollama Cloud
Anthropic-compatible backend for issue triage and implementation of
high-confidence bugs / small features. Isolated research uses the Brave Search
API. Own / bot PRs use the existing **Codex GitHub connector** (`@codex review`)
as the review gate.
Default mode is `full`. Set repo variable `AI_AUTOMATION_MODE=triage_only` to
classify issues without implement or the Codex fix loop.
Third-party / fork PRs are **not** reviewed by this agent. Their initial Codex
review is assumed to be auto-configured on the repo; this workflow only
re-comments `@codex review` after the author pushes more commits
(`pull_request` synchronize).
## Required secrets
| Secret | Purpose |
|---|---|
| `ANTHROPIC_AUTH_TOKEN` | Ollama Cloud API key, sent as `Authorization: Bearer` |
| `BRAVE_API_KEY` | Brave Search API key for the isolated research pass |
Optional:
- `TRIAGE_GITHUB_TOKEN` — bot PAT (netcatty-bot) for opening PRs, labels, triage replies.
- `CODEX_REQUEST_GITHUB_TOKEN` — maintainer PAT used only for `@codex review`.
- `SLACK_WEBHOOK_URL` — status pings.
Do not put keys in the repository. Set them with `gh secret set`.
## Variables
| Variable | Default | Purpose |
|---|---|---|
| `AI_AUTOMATION_MODE` | `full` | `full` or `triage_only` |
| `AI_MODEL` | `glm-5.3-flash:cloud` | Ollama Cloud model id for Claude Code |
| `AI_ANTHROPIC_BASE_URL` | `https://ollama.com` | Anthropic-compatible API host |
| `AI_CODEX_FIX_MAX_ROUNDS` | `40` | Max fix ↔ `@codex review` loops on own/bot PRs |
| `AI_TRIAGE_DAILY_LIMIT` | `10` | Daily auto triage for non-collaborators |
| `AI_FOLLOWUP_DAILY_LIMIT` | `20` | Daily automatic follow-up runs per admitted issue |
## Manual retry
Actions → **AI automation** → Run workflow → provide an issue or PR number.
## Safety
- External / fork PRs: only re-trigger Codex; no agent review and no commits.
- Automation never publishes changes under `.github/` or automation scripts.
- Issue text is sanitized before prompts.
- Agent steps run without a GitHub token. Provider keys are staged to a file and
injected only into the Claude Code launcher.
- Isolated research runs in an empty temp workspace and can only call the
Brave `web-search` / `web-fetch` helpers. Classify/implement deny those tools.
- Research output must include real HTTPS sources from the helper log.
Existing HTML comment markers that still say `cursor-*` are still recognized so
in-flight issues and PRs are not reprocessed. New comments write `ai-*` markers.