oh-my-opencode 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/command/get-unpublished-changes.md +148 -0
- package/.agents/command/omomomo.md +37 -0
- package/.agents/command/publish.md +376 -0
- package/.agents/command/remove-deadcode.md +221 -0
- package/.agents/command/security-research.md +16 -0
- package/.agents/skills/get-unpublished-changes/SKILL.md +24 -0
- package/.agents/skills/github-triage/SKILL.md +587 -0
- package/.agents/skills/github-triage/scripts/gh_fetch.py +398 -0
- package/.agents/skills/hyperplan/SKILL.md +450 -0
- package/.agents/skills/omomomo/SKILL.md +36 -0
- package/.agents/skills/pre-publish-review/SKILL.md +407 -0
- package/.agents/skills/publish/SKILL.md +428 -0
- package/.agents/skills/remove-deadcode/SKILL.md +216 -0
- package/.agents/skills/security-research/SKILL.md +204 -0
- package/.agents/skills/work-with-pr/SKILL.md +360 -0
- package/.agents/skills/work-with-pr-workspace/evals/evals.json +76 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/benchmark.json +138 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/benchmark.md +42 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/eval_metadata.json +57 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/grading.json +15 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/code-changes.md +454 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/execution-plan.md +136 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/pr-description.md +47 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/verification-strategy.md +163 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/grading.json +15 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/code-changes.md +615 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/execution-plan.md +99 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/pr-description.md +50 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/verification-strategy.md +111 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/eval_metadata.json +37 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/grading.json +11 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/code-changes.md +205 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/execution-plan.md +78 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/pr-description.md +42 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/verification-strategy.md +87 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/grading.json +11 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/code-changes.md +334 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/execution-plan.md +86 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/pr-description.md +23 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/verification-strategy.md +119 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/eval_metadata.json +32 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/grading.json +10 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/code-changes.md +221 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/execution-plan.md +104 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/pr-description.md +41 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/verification-strategy.md +84 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/grading.json +10 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/code-changes.md +342 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/execution-plan.md +131 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/pr-description.md +39 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/verification-strategy.md +128 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/eval_metadata.json +32 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/grading.json +10 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/code-changes.md +143 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/execution-plan.md +82 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/pr-description.md +51 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/verification-strategy.md +69 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/grading.json +10 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/code-changes.md +252 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/execution-plan.md +83 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/pr-description.md +33 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/verification-strategy.md +101 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/eval_metadata.json +32 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/grading.json +10 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/code-changes.md +387 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/execution-plan.md +112 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/pr-description.md +51 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/verification-strategy.md +75 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/grading.json +10 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/code-changes.md +529 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/execution-plan.md +127 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/pr-description.md +42 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/verification-strategy.md +120 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/timing.json +1 -0
- package/.agents/skills/work-with-pr-workspace/iteration-1/review.html +1326 -0
- package/.opencode/command/get-unpublished-changes.md +148 -0
- package/.opencode/command/omomomo.md +37 -0
- package/.opencode/command/publish.md +376 -0
- package/.opencode/command/remove-deadcode.md +221 -0
- package/.opencode/command/security-research.md +16 -0
- package/.opencode/skills/github-triage/SKILL.md +587 -0
- package/.opencode/skills/github-triage/scripts/gh_fetch.py +398 -0
- package/.opencode/skills/hyperplan/SKILL.md +450 -0
- package/.opencode/skills/pre-publish-review/SKILL.md +407 -0
- package/.opencode/skills/work-with-pr/SKILL.md +360 -0
- package/.opencode/skills/work-with-pr-workspace/evals/evals.json +76 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/benchmark.json +138 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/benchmark.md +42 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/eval_metadata.json +57 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/grading.json +15 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/code-changes.md +454 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/execution-plan.md +136 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/pr-description.md +47 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/verification-strategy.md +163 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/grading.json +15 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/code-changes.md +615 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/execution-plan.md +99 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/pr-description.md +50 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/verification-strategy.md +111 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/eval_metadata.json +37 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/grading.json +11 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/code-changes.md +205 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/execution-plan.md +78 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/pr-description.md +42 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/verification-strategy.md +87 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/grading.json +11 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/code-changes.md +334 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/execution-plan.md +86 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/pr-description.md +23 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/verification-strategy.md +119 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/eval_metadata.json +32 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/grading.json +10 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/code-changes.md +221 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/execution-plan.md +104 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/pr-description.md +41 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/verification-strategy.md +84 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/grading.json +10 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/code-changes.md +342 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/execution-plan.md +131 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/pr-description.md +39 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/verification-strategy.md +128 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/eval_metadata.json +32 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/grading.json +10 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/code-changes.md +143 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/execution-plan.md +82 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/pr-description.md +51 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/verification-strategy.md +69 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/grading.json +10 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/code-changes.md +252 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/execution-plan.md +83 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/pr-description.md +33 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/verification-strategy.md +101 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/eval_metadata.json +32 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/grading.json +10 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/code-changes.md +387 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/execution-plan.md +112 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/pr-description.md +51 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/verification-strategy.md +75 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/grading.json +10 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/code-changes.md +529 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/execution-plan.md +127 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/pr-description.md +42 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/verification-strategy.md +120 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/timing.json +1 -0
- package/.opencode/skills/work-with-pr-workspace/iteration-1/review.html +1326 -0
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/README.zh-cn.md +1 -1
- package/dist/agents/atlas/agent.d.ts +6 -6
- package/dist/agents/prometheus/gemini.d.ts +0 -11
- package/dist/agents/prometheus/gpt.d.ts +0 -10
- package/dist/agents/prometheus/system-prompt.d.ts +2 -20
- package/dist/agents/types.d.ts +1 -16
- package/dist/cli/index.js +50 -17
- package/dist/config/schema/agent-names.d.ts +3 -3
- package/dist/config/schema/agent-overrides.d.ts +208 -208
- package/dist/config/schema/categories.d.ts +28 -28
- package/dist/config/schema/fallback-models.d.ts +20 -20
- package/dist/config/schema/oh-my-opencode-config.d.ts +208 -208
- package/dist/features/background-agent/parent-wake-notifier.d.ts +8 -1
- package/dist/help/schema/acp.d.ts +95 -0
- package/dist/help/schema/doctor.d.ts +147 -0
- package/dist/help/schema/sandbox.d.ts +74 -0
- package/dist/help/schema/status.d.ts +139 -0
- package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/hyperplan/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/search/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/team/default.d.ts +2 -7
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -9
- package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -16
- package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +1 -10
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -5
- package/dist/hooks/ralph-loop/no-progress-turn-detector.d.ts +7 -0
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +1 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/hooks/runtime-fallback/error-classifier.d.ts +1 -0
- package/dist/index.js +51910 -50310
- package/dist/shared/prompt-async-gate/pending-tool-turn.d.ts +1 -0
- package/dist/shared/prompt-async-gate/types.d.ts +4 -3
- package/package.json +19 -13
- package/dist/agents/atlas/default-prompt-sections.d.ts +0 -6
- package/dist/agents/atlas/default.d.ts +0 -2
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +0 -6
- package/dist/agents/atlas/gemini.d.ts +0 -2
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +0 -6
- package/dist/agents/atlas/gpt.d.ts +0 -2
- package/dist/agents/atlas/kimi-prompt-sections.d.ts +0 -6
- package/dist/agents/atlas/kimi.d.ts +0 -2
- package/dist/agents/atlas/opus-4-7-prompt-sections.d.ts +0 -6
- package/dist/agents/atlas/opus-4-7.d.ts +0 -2
- package/dist/agents/atlas/shared-prompt.d.ts +0 -9
- package/dist/agents/prometheus/behavioral-summary.d.ts +0 -6
- package/dist/agents/prometheus/high-accuracy-mode.d.ts +0 -6
- package/dist/agents/prometheus/identity-constraints.d.ts +0 -7
- package/dist/agents/prometheus/interview-mode.d.ts +0 -7
- package/dist/agents/prometheus/plan-generation.d.ts +0 -7
- package/dist/agents/prometheus/plan-template.d.ts +0 -7
- package/dist/agents/prometheus/spec-driven-mode.d.ts +0 -7
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-triage
|
|
3
|
+
description: "Read-only GitHub triage for issues AND PRs. 1 item = 1 background task (category: quick). Analyzes all open items and writes evidence-backed reports to /tmp/{datetime}/. Every claim requires a GitHub permalink as proof. NEVER takes any action on GitHub - no comments, no merges, no closes, no labels. Reports only. Triggers: 'triage', 'triage issues', 'triage PRs', 'github triage'."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitHub Triage - Read-Only Analyzer
|
|
7
|
+
|
|
8
|
+
<role>
|
|
9
|
+
Read-only GitHub triage orchestrator. Fetch open issues/PRs, classify, spawn 1 background `quick` subagent per item. Each subagent analyzes and writes a report file. ZERO GitHub mutations.
|
|
10
|
+
</role>
|
|
11
|
+
|
|
12
|
+
## Architecture
|
|
13
|
+
|
|
14
|
+
**1 ISSUE/PR = 1 `task_create` = 1 `quick` SUBAGENT (background). NO EXCEPTIONS.**
|
|
15
|
+
|
|
16
|
+
| Rule | Value |
|
|
17
|
+
|------|-------|
|
|
18
|
+
| Category | `quick` |
|
|
19
|
+
| Execution | `run_in_background=true` |
|
|
20
|
+
| Parallelism | ALL items simultaneously |
|
|
21
|
+
| Tracking | `task_create` per item |
|
|
22
|
+
| Output | `/tmp/{YYYYMMDD-HHmmss}/issue-{N}.md` or `pr-{N}.md` |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Zero-Action Policy (ABSOLUTE)
|
|
27
|
+
|
|
28
|
+
<zero_action>
|
|
29
|
+
Subagents MUST NEVER run ANY command that writes or mutates GitHub state.
|
|
30
|
+
|
|
31
|
+
**FORBIDDEN** (non-exhaustive):
|
|
32
|
+
`gh issue comment`, `gh issue close`, `gh issue edit`, `gh pr comment`, `gh pr merge`, `gh pr review`, `gh pr edit`, `gh api -X POST`, `gh api -X PUT`, `gh api -X PATCH`, `gh api -X DELETE`
|
|
33
|
+
|
|
34
|
+
**ALLOWED**:
|
|
35
|
+
- `gh issue view`, `gh pr view`, `gh api` (GET only) - read GitHub data
|
|
36
|
+
- `Grep`, `Read`, `Glob` - read codebase
|
|
37
|
+
- `Write` - write report files to `/tmp/` ONLY
|
|
38
|
+
- `git log`, `git show`, `git blame` - read git history (for finding fix commits)
|
|
39
|
+
|
|
40
|
+
**ANY GitHub mutation = CRITICAL violation.**
|
|
41
|
+
</zero_action>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Evidence Rule (MANDATORY)
|
|
46
|
+
|
|
47
|
+
<evidence>
|
|
48
|
+
**Every factual claim in a report MUST include a GitHub permalink as proof.**
|
|
49
|
+
|
|
50
|
+
A permalink is a URL pointing to a specific line/range in a specific commit, e.g.:
|
|
51
|
+
`https://github.com/{owner}/{repo}/blob/{commit_sha}/{path}#L{start}-L{end}`
|
|
52
|
+
|
|
53
|
+
### How to generate permalinks
|
|
54
|
+
|
|
55
|
+
1. Find the relevant file and line(s) via Grep/Read.
|
|
56
|
+
2. Get the current commit SHA: `git rev-parse HEAD`
|
|
57
|
+
3. Construct: `https://github.com/{REPO}/blob/{SHA}/{filepath}#L{line}` (or `#L{start}-L{end}` for ranges)
|
|
58
|
+
|
|
59
|
+
### Rules
|
|
60
|
+
|
|
61
|
+
- **No permalink = no claim.** If you cannot back a statement with a permalink, state "No evidence found" instead.
|
|
62
|
+
- Claims without permalinks are explicitly marked `[UNVERIFIED]` and carry zero weight.
|
|
63
|
+
- Permalinks to `main`/`master`/`dev` branches are NOT acceptable - use commit SHAs only.
|
|
64
|
+
- For bug analysis: permalink to the problematic code. For fix verification: permalink to the fixing commit diff.
|
|
65
|
+
</evidence>
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Phase 0: Setup
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
|
|
73
|
+
REPORT_DIR="/tmp/$(date +%Y%m%d-%H%M%S)"
|
|
74
|
+
mkdir -p "$REPORT_DIR"
|
|
75
|
+
COMMIT_SHA=$(git rev-parse HEAD)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Pass `REPO`, `REPORT_DIR`, and `COMMIT_SHA` to every subagent.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Phase 1: Fetch All Open Items (CORRECTED)
|
|
85
|
+
|
|
86
|
+
**IMPORTANT:** `body` and `comments` fields may contain control characters that break jq parsing. Fetch basic metadata first, then fetch full details per-item in subagents.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Step 1: Fetch basic metadata (without body/comments to avoid JSON parsing issues)
|
|
90
|
+
ISSUES_LIST=$(gh issue list --repo $REPO --state open --limit 500 \
|
|
91
|
+
--json number,title,labels,author,createdAt)
|
|
92
|
+
ISSUE_COUNT=$(echo "$ISSUES_LIST" | jq length)
|
|
93
|
+
|
|
94
|
+
# Paginate if needed
|
|
95
|
+
if [ "$ISSUE_COUNT" -eq 500 ]; then
|
|
96
|
+
LAST_DATE=$(echo "$ISSUES_LIST" | jq -r '.[-1].createdAt')
|
|
97
|
+
while true; do
|
|
98
|
+
PAGE=$(gh issue list --repo $REPO --state open --limit 500 \
|
|
99
|
+
--search "created:<$LAST_DATE" \
|
|
100
|
+
--json number,title,labels,author,createdAt)
|
|
101
|
+
PAGE_COUNT=$(echo "$PAGE" | jq length)
|
|
102
|
+
[ "$PAGE_COUNT" -eq 0 ] && break
|
|
103
|
+
ISSUES_LIST=$(echo "$ISSUES_LIST" "$PAGE" | jq -s '.[0] + .[1] | unique_by(.number)')
|
|
104
|
+
ISSUE_COUNT=$(echo "$ISSUES_LIST" | jq length)
|
|
105
|
+
[ "$PAGE_COUNT" -lt 500 ] && break
|
|
106
|
+
LAST_DATE=$(echo "$PAGE" | jq -r '.[-1].createdAt')
|
|
107
|
+
done
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
# Same for PRs
|
|
111
|
+
PRS_LIST=$(gh pr list --repo $REPO --state open --limit 500 \
|
|
112
|
+
--json number,title,labels,author,headRefName,baseRefName,isDraft,createdAt)
|
|
113
|
+
PR_COUNT=$(echo "$PRS_LIST" | jq length)
|
|
114
|
+
|
|
115
|
+
if [ "$PR_COUNT" -eq 500 ]; then
|
|
116
|
+
LAST_DATE=$(echo "$PRS_LIST" | jq -r '.[-1].createdAt')
|
|
117
|
+
while true; do
|
|
118
|
+
PAGE=$(gh pr list --repo $REPO --state open --limit 500 \
|
|
119
|
+
--search "created:<$LAST_DATE" \
|
|
120
|
+
--json number,title,labels,author,headRefName,baseRefName,isDraft,createdAt)
|
|
121
|
+
PAGE_COUNT=$(echo "$PAGE" | jq length)
|
|
122
|
+
[ "$PAGE_COUNT" -eq 0 ] && break
|
|
123
|
+
PRS_LIST=$(echo "$PRS_LIST" "$PAGE" | jq -s '.[0] + .[1] | unique_by(.number)')
|
|
124
|
+
PR_COUNT=$(echo "$PRS_LIST" | jq length)
|
|
125
|
+
[ "$PAGE_COUNT" -lt 500 ] && break
|
|
126
|
+
LAST_DATE=$(echo "$PAGE" | jq -r '.[-1].createdAt')
|
|
127
|
+
done
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
echo "Total issues: $ISSUE_COUNT, Total PRs: $PR_COUNT"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**LARGE REPOSITORY HANDLING:**
|
|
134
|
+
If total items exceeds 50, you MUST process ALL items. Use the pagination code above to fetch every single open issue and PR.
|
|
135
|
+
**DO NOT** sample or limit to 50 items - process the entire backlog.
|
|
136
|
+
|
|
137
|
+
Example: If there are 500 open issues, spawn 500 subagents. If there are 1000 open PRs, spawn 1000 subagents.
|
|
138
|
+
|
|
139
|
+
**Note:** Background task system will queue excess tasks automatically.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Phase 2: Classify
|
|
145
|
+
|
|
146
|
+
| Type | Detection |
|
|
147
|
+
|------|-----------|
|
|
148
|
+
| `ISSUE_QUESTION` | `[Question]`, `[Discussion]`, `?`, "how to" / "why does" / "is it possible" |
|
|
149
|
+
| `ISSUE_BUG` | `[Bug]`, `Bug:`, error messages, stack traces, unexpected behavior |
|
|
150
|
+
| `ISSUE_FEATURE` | `[Feature]`, `[RFE]`, `[Enhancement]`, `Feature Request`, `Proposal` |
|
|
151
|
+
| `ISSUE_OTHER` | Anything else |
|
|
152
|
+
| `PR_BUGFIX` | Title starts with `fix`, branch contains `fix/`/`bugfix/`, label `bug` |
|
|
153
|
+
| `PR_OTHER` | Everything else |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Phase 3: Spawn Subagents (Individual Tool Calls)
|
|
158
|
+
|
|
159
|
+
**CRITICAL: Create tasks ONE BY ONE using individual `task_create` tool calls. NEVER batch or script.**
|
|
160
|
+
|
|
161
|
+
For each item, execute these steps sequentially:
|
|
162
|
+
|
|
163
|
+
### Step 3.1: Create Task Record
|
|
164
|
+
```typescript
|
|
165
|
+
task_create(
|
|
166
|
+
subject="Triage: #{number} {title}",
|
|
167
|
+
description="GitHub {issue|PR} triage analysis - {type}",
|
|
168
|
+
metadata={"type": "{ISSUE_QUESTION|ISSUE_BUG|ISSUE_FEATURE|ISSUE_OTHER|PR_BUGFIX|PR_OTHER}", "number": {number}}
|
|
169
|
+
)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Step 3.2: Spawn Analysis Subagent (Background)
|
|
173
|
+
```typescript
|
|
174
|
+
task(
|
|
175
|
+
category="quick",
|
|
176
|
+
run_in_background=true,
|
|
177
|
+
load_skills=[],
|
|
178
|
+
prompt=SUBAGENT_PROMPT
|
|
179
|
+
)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**ABSOLUTE RULES for Subagents:**
|
|
183
|
+
- **ONLY ANALYZE** - Never take action on GitHub (no comments, merges, closes)
|
|
184
|
+
- **READ-ONLY** - Use tools only for reading code/GitHub data
|
|
185
|
+
- **WRITE REPORT ONLY** - Output goes to `{REPORT_DIR}/{issue|pr}-{number}.md` via Write tool
|
|
186
|
+
- **EVIDENCE REQUIRED** - Every claim must have GitHub permalink as proof
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
For each item:
|
|
190
|
+
1. task_create(subject="Triage: #{number} {title}")
|
|
191
|
+
2. task(category="quick", run_in_background=true, load_skills=[], prompt=SUBAGENT_PROMPT)
|
|
192
|
+
3. Store mapping: item_number -> { task_id, background_task_id }
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Subagent Prompts
|
|
198
|
+
|
|
199
|
+
### Common Preamble (include in ALL subagent prompts)
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
CONTEXT:
|
|
203
|
+
- Repository: {REPO}
|
|
204
|
+
- Report directory: {REPORT_DIR}
|
|
205
|
+
- Current commit SHA: {COMMIT_SHA}
|
|
206
|
+
|
|
207
|
+
PERMALINK FORMAT:
|
|
208
|
+
Every factual claim MUST include a permalink: https://github.com/{REPO}/blob/{COMMIT_SHA}/{filepath}#L{start}-L{end}
|
|
209
|
+
No permalink = no claim. Mark unverifiable claims as [UNVERIFIED].
|
|
210
|
+
To get current SHA if needed: git rev-parse HEAD
|
|
211
|
+
|
|
212
|
+
ABSOLUTE RULES (violating ANY = critical failure):
|
|
213
|
+
- NEVER run gh issue comment, gh issue close, gh issue edit
|
|
214
|
+
- NEVER run gh pr comment, gh pr merge, gh pr review, gh pr edit
|
|
215
|
+
- NEVER run any gh command with -X POST, -X PUT, -X PATCH, -X DELETE
|
|
216
|
+
- NEVER run git checkout, git fetch, git pull, git switch, git worktree
|
|
217
|
+
- Your ONLY writable output: {REPORT_DIR}/{issue|pr}-{number}.md via the Write tool
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
### ISSUE_QUESTION
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
You are analyzing issue #{number} for {REPO}.
|
|
227
|
+
|
|
228
|
+
ITEM:
|
|
229
|
+
- Issue #{number}: {title}
|
|
230
|
+
- Author: {author}
|
|
231
|
+
- Body: {body}
|
|
232
|
+
- Comments: {comments_summary}
|
|
233
|
+
|
|
234
|
+
TASK:
|
|
235
|
+
1. Understand the question.
|
|
236
|
+
2. Search the codebase (Grep, Read) for the answer.
|
|
237
|
+
3. For every finding, construct a permalink: https://github.com/{REPO}/blob/{COMMIT_SHA}/{path}#L{N}
|
|
238
|
+
4. Write report to {REPORT_DIR}/issue-{number}.md
|
|
239
|
+
|
|
240
|
+
REPORT FORMAT (write this as the file content):
|
|
241
|
+
|
|
242
|
+
# Issue #{number}: {title}
|
|
243
|
+
**Type:** Question | **Author:** {author} | **Created:** {createdAt}
|
|
244
|
+
|
|
245
|
+
## Question
|
|
246
|
+
[1-2 sentence summary]
|
|
247
|
+
|
|
248
|
+
## Findings
|
|
249
|
+
[Each finding with permalink proof. Example:]
|
|
250
|
+
- The config is parsed in [`src/config/loader.ts#L42-L58`](https://github.com/{REPO}/blob/{SHA}/src/config/loader.ts#L42-L58)
|
|
251
|
+
|
|
252
|
+
## Suggested Answer
|
|
253
|
+
[Draft answer with code references and permalinks]
|
|
254
|
+
|
|
255
|
+
## Confidence: [HIGH | MEDIUM | LOW]
|
|
256
|
+
[Reason. If LOW: what's missing]
|
|
257
|
+
|
|
258
|
+
## Recommended Action
|
|
259
|
+
[What maintainer should do]
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
REMEMBER: No permalink = no claim. Every code reference needs a permalink.
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
### ISSUE_BUG
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
You are analyzing bug report #{number} for {REPO}.
|
|
271
|
+
|
|
272
|
+
ITEM:
|
|
273
|
+
- Issue #{number}: {title}
|
|
274
|
+
- Author: {author}
|
|
275
|
+
- Body: {body}
|
|
276
|
+
- Comments: {comments_summary}
|
|
277
|
+
|
|
278
|
+
TASK:
|
|
279
|
+
1. Understand: expected behavior, actual behavior, reproduction steps.
|
|
280
|
+
2. Search the codebase for relevant code. Trace the logic.
|
|
281
|
+
3. Determine verdict: CONFIRMED_BUG, NOT_A_BUG, ALREADY_FIXED, or UNCLEAR.
|
|
282
|
+
4. For ALREADY_FIXED: find the fixing commit using git log/git blame. Include the commit SHA and what changed.
|
|
283
|
+
5. For every finding, construct a permalink.
|
|
284
|
+
6. Write report to {REPORT_DIR}/issue-{number}.md
|
|
285
|
+
|
|
286
|
+
FINDING "ALREADY_FIXED" COMMITS:
|
|
287
|
+
- Use `git log --all --oneline -- {file}` to find recent changes to relevant files
|
|
288
|
+
- Use `git log --all --grep="fix" --grep="{keyword}" --all-match --oneline` to search commit messages
|
|
289
|
+
- Use `git blame {file}` to find who last changed the relevant lines
|
|
290
|
+
- Use `git show {commit_sha}` to verify the fix
|
|
291
|
+
- Construct commit permalink: https://github.com/{REPO}/commit/{fix_commit_sha}
|
|
292
|
+
|
|
293
|
+
REPORT FORMAT (write this as the file content):
|
|
294
|
+
|
|
295
|
+
# Issue #{number}: {title}
|
|
296
|
+
**Type:** Bug Report | **Author:** {author} | **Created:** {createdAt}
|
|
297
|
+
|
|
298
|
+
## Bug Summary
|
|
299
|
+
**Expected:** [what user expects]
|
|
300
|
+
**Actual:** [what actually happens]
|
|
301
|
+
**Reproduction:** [steps if provided]
|
|
302
|
+
|
|
303
|
+
## Verdict: [CONFIRMED_BUG | NOT_A_BUG | ALREADY_FIXED | UNCLEAR]
|
|
304
|
+
|
|
305
|
+
## Analysis
|
|
306
|
+
|
|
307
|
+
### Evidence
|
|
308
|
+
[Each piece of evidence with permalink. No permalink = mark [UNVERIFIED]]
|
|
309
|
+
|
|
310
|
+
### Root Cause (if CONFIRMED_BUG)
|
|
311
|
+
[Which file, which function, what goes wrong]
|
|
312
|
+
- Problematic code: [`{path}#L{N}`](permalink)
|
|
313
|
+
|
|
314
|
+
### Why Not A Bug (if NOT_A_BUG)
|
|
315
|
+
[Rigorous proof with permalinks that current behavior is correct]
|
|
316
|
+
|
|
317
|
+
### Fix Details (if ALREADY_FIXED)
|
|
318
|
+
- **Fixed in commit:** [`{short_sha}`](https://github.com/{REPO}/commit/{full_sha})
|
|
319
|
+
- **Fixed date:** {date}
|
|
320
|
+
- **What changed:** [description with diff permalink]
|
|
321
|
+
- **Fixed by:** {author}
|
|
322
|
+
|
|
323
|
+
### Blockers (if UNCLEAR)
|
|
324
|
+
[What prevents determination, what to investigate next]
|
|
325
|
+
|
|
326
|
+
## Severity: [LOW | MEDIUM | HIGH | CRITICAL]
|
|
327
|
+
|
|
328
|
+
## Affected Files
|
|
329
|
+
[List with permalinks]
|
|
330
|
+
|
|
331
|
+
## Suggested Fix (if CONFIRMED_BUG)
|
|
332
|
+
[Specific approach: "In {file}#L{N}, change X to Y because Z"]
|
|
333
|
+
|
|
334
|
+
## Recommended Action
|
|
335
|
+
[What maintainer should do]
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
CRITICAL: Claims without permalinks are worthless. If you cannot find evidence, say so explicitly rather than making unverified claims.
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
### ISSUE_FEATURE
|
|
344
|
+
|
|
345
|
+
```
|
|
346
|
+
You are analyzing feature request #{number} for {REPO}.
|
|
347
|
+
|
|
348
|
+
ITEM:
|
|
349
|
+
- Issue #{number}: {title}
|
|
350
|
+
- Author: {author}
|
|
351
|
+
- Body: {body}
|
|
352
|
+
- Comments: {comments_summary}
|
|
353
|
+
|
|
354
|
+
TASK:
|
|
355
|
+
1. Understand the request.
|
|
356
|
+
2. Search codebase for existing (partial/full) implementations.
|
|
357
|
+
3. Assess feasibility.
|
|
358
|
+
4. Write report to {REPORT_DIR}/issue-{number}.md
|
|
359
|
+
|
|
360
|
+
REPORT FORMAT (write this as the file content):
|
|
361
|
+
|
|
362
|
+
# Issue #{number}: {title}
|
|
363
|
+
**Type:** Feature Request | **Author:** {author} | **Created:** {createdAt}
|
|
364
|
+
|
|
365
|
+
## Request Summary
|
|
366
|
+
[What the user wants]
|
|
367
|
+
|
|
368
|
+
## Existing Implementation: [YES_FULLY | YES_PARTIALLY | NO]
|
|
369
|
+
[If exists: where, with permalinks to the implementation]
|
|
370
|
+
|
|
371
|
+
## Feasibility: [EASY | MODERATE | HARD | ARCHITECTURAL_CHANGE]
|
|
372
|
+
|
|
373
|
+
## Relevant Files
|
|
374
|
+
[With permalinks]
|
|
375
|
+
|
|
376
|
+
## Implementation Notes
|
|
377
|
+
[Approach, pitfalls, dependencies]
|
|
378
|
+
|
|
379
|
+
## Recommended Action
|
|
380
|
+
[What maintainer should do]
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
### ISSUE_OTHER
|
|
386
|
+
|
|
387
|
+
```
|
|
388
|
+
You are analyzing issue #{number} for {REPO}.
|
|
389
|
+
|
|
390
|
+
ITEM:
|
|
391
|
+
- Issue #{number}: {title}
|
|
392
|
+
- Author: {author}
|
|
393
|
+
- Body: {body}
|
|
394
|
+
- Comments: {comments_summary}
|
|
395
|
+
|
|
396
|
+
TASK: Assess and write report to {REPORT_DIR}/issue-{number}.md
|
|
397
|
+
|
|
398
|
+
REPORT FORMAT (write this as the file content):
|
|
399
|
+
|
|
400
|
+
# Issue #{number}: {title}
|
|
401
|
+
**Type:** [QUESTION | BUG | FEATURE | DISCUSSION | META | STALE]
|
|
402
|
+
**Author:** {author} | **Created:** {createdAt}
|
|
403
|
+
|
|
404
|
+
## Summary
|
|
405
|
+
[1-2 sentences]
|
|
406
|
+
|
|
407
|
+
## Needs Attention: [YES | NO]
|
|
408
|
+
## Suggested Label: [if any]
|
|
409
|
+
## Recommended Action: [what maintainer should do]
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
### PR_BUGFIX
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
You are reviewing PR #{number} for {REPO}.
|
|
418
|
+
|
|
419
|
+
ITEM:
|
|
420
|
+
- PR #{number}: {title}
|
|
421
|
+
- Author: {author}
|
|
422
|
+
- Base: {baseRefName} <- Head: {headRefName}
|
|
423
|
+
- Draft: {isDraft} | Mergeable: {mergeable}
|
|
424
|
+
- Review: {reviewDecision} | CI: {statusCheckRollup_summary}
|
|
425
|
+
- Body: {body}
|
|
426
|
+
|
|
427
|
+
TASK:
|
|
428
|
+
1. Fetch PR details (READ-ONLY): gh pr view {number} --repo {REPO} --json files,reviews,comments,statusCheckRollup,reviewDecision
|
|
429
|
+
2. Read diff: gh api repos/{REPO}/pulls/{number}/files
|
|
430
|
+
3. Search codebase to verify fix correctness.
|
|
431
|
+
4. Write report to {REPORT_DIR}/pr-{number}.md
|
|
432
|
+
|
|
433
|
+
REPORT FORMAT (write this as the file content):
|
|
434
|
+
|
|
435
|
+
# PR #{number}: {title}
|
|
436
|
+
**Type:** Bugfix | **Author:** {author}
|
|
437
|
+
**Base:** {baseRefName} <- {headRefName} | **Draft:** {isDraft}
|
|
438
|
+
|
|
439
|
+
## Fix Summary
|
|
440
|
+
[What bug, how fixed - with permalinks to changed code]
|
|
441
|
+
|
|
442
|
+
## Code Review
|
|
443
|
+
|
|
444
|
+
### Correctness
|
|
445
|
+
[Is fix correct? Root cause addressed? Evidence with permalinks]
|
|
446
|
+
|
|
447
|
+
### Side Effects
|
|
448
|
+
[Risky changes, breaking changes - with permalinks if any]
|
|
449
|
+
|
|
450
|
+
### Code Quality
|
|
451
|
+
[Style, patterns, test coverage]
|
|
452
|
+
|
|
453
|
+
## Merge Readiness
|
|
454
|
+
|
|
455
|
+
| Check | Status |
|
|
456
|
+
|-------|--------|
|
|
457
|
+
| CI | [PASS / FAIL / PENDING] |
|
|
458
|
+
| Review | [APPROVED / CHANGES_REQUESTED / PENDING / NONE] |
|
|
459
|
+
| Mergeable | [YES / NO / CONFLICTED] |
|
|
460
|
+
| Draft | [YES / NO] |
|
|
461
|
+
| Correctness | [VERIFIED / CONCERNS / UNCLEAR] |
|
|
462
|
+
| Risk | [NONE / LOW / MEDIUM / HIGH] |
|
|
463
|
+
|
|
464
|
+
## Files Changed
|
|
465
|
+
[List with brief descriptions]
|
|
466
|
+
|
|
467
|
+
## Recommended Action: [MERGE | REQUEST_CHANGES | NEEDS_REVIEW | WAIT]
|
|
468
|
+
[Reasoning with evidence]
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
NEVER merge. NEVER comment. NEVER review. Write to file ONLY.
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
### PR_OTHER
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
You are reviewing PR #{number} for {REPO}.
|
|
480
|
+
|
|
481
|
+
ITEM:
|
|
482
|
+
- PR #{number}: {title}
|
|
483
|
+
- Author: {author}
|
|
484
|
+
- Base: {baseRefName} <- Head: {headRefName}
|
|
485
|
+
- Draft: {isDraft} | Mergeable: {mergeable}
|
|
486
|
+
- Review: {reviewDecision} | CI: {statusCheckRollup_summary}
|
|
487
|
+
- Body: {body}
|
|
488
|
+
|
|
489
|
+
TASK:
|
|
490
|
+
1. Fetch PR details (READ-ONLY): gh pr view {number} --repo {REPO} --json files,reviews,comments,statusCheckRollup,reviewDecision
|
|
491
|
+
2. Read diff: gh api repos/{REPO}/pulls/{number}/files
|
|
492
|
+
3. Write report to {REPORT_DIR}/pr-{number}.md
|
|
493
|
+
|
|
494
|
+
REPORT FORMAT (write this as the file content):
|
|
495
|
+
|
|
496
|
+
# PR #{number}: {title}
|
|
497
|
+
**Type:** [FEATURE | REFACTOR | DOCS | CHORE | TEST | OTHER]
|
|
498
|
+
**Author:** {author}
|
|
499
|
+
**Base:** {baseRefName} <- {headRefName} | **Draft:** {isDraft}
|
|
500
|
+
|
|
501
|
+
## Summary
|
|
502
|
+
[2-3 sentences with permalinks to key changes]
|
|
503
|
+
|
|
504
|
+
## Status
|
|
505
|
+
|
|
506
|
+
| Check | Status |
|
|
507
|
+
|-------|--------|
|
|
508
|
+
| CI | [PASS / FAIL / PENDING] |
|
|
509
|
+
| Review | [APPROVED / CHANGES_REQUESTED / PENDING / NONE] |
|
|
510
|
+
| Mergeable | [YES / NO / CONFLICTED] |
|
|
511
|
+
| Risk | [LOW / MEDIUM / HIGH] |
|
|
512
|
+
| Alignment | [YES / NO / UNCLEAR] |
|
|
513
|
+
|
|
514
|
+
## Files Changed
|
|
515
|
+
[Count and key files]
|
|
516
|
+
|
|
517
|
+
## Blockers
|
|
518
|
+
[If any]
|
|
519
|
+
|
|
520
|
+
## Recommended Action: [MERGE | REQUEST_CHANGES | NEEDS_REVIEW | CLOSE | WAIT]
|
|
521
|
+
[Reasoning]
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
NEVER merge. NEVER comment. NEVER review. Write to file ONLY.
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Phase 4: Collect & Update
|
|
530
|
+
|
|
531
|
+
Poll `background_output()` per task. As each completes:
|
|
532
|
+
1. Parse report.
|
|
533
|
+
2. `task_update(id=task_id, status="completed", description=REPORT_SUMMARY)`
|
|
534
|
+
3. Stream to user immediately.
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
## Phase 5: Final Summary
|
|
539
|
+
|
|
540
|
+
Write to `{REPORT_DIR}/SUMMARY.md` AND display to user:
|
|
541
|
+
|
|
542
|
+
```markdown
|
|
543
|
+
# GitHub Triage Report - {REPO}
|
|
544
|
+
|
|
545
|
+
**Date:** {date} | **Commit:** {COMMIT_SHA}
|
|
546
|
+
**Items Processed:** {total}
|
|
547
|
+
**Report Directory:** {REPORT_DIR}
|
|
548
|
+
|
|
549
|
+
## Issues ({issue_count})
|
|
550
|
+
| Category | Count |
|
|
551
|
+
|----------|-------|
|
|
552
|
+
| Bug Confirmed | {n} |
|
|
553
|
+
| Bug Already Fixed | {n} |
|
|
554
|
+
| Not A Bug | {n} |
|
|
555
|
+
| Needs Investigation | {n} |
|
|
556
|
+
| Question Analyzed | {n} |
|
|
557
|
+
| Feature Assessed | {n} |
|
|
558
|
+
| Other | {n} |
|
|
559
|
+
|
|
560
|
+
## PRs ({pr_count})
|
|
561
|
+
| Category | Count |
|
|
562
|
+
|----------|-------|
|
|
563
|
+
| Bugfix Reviewed | {n} |
|
|
564
|
+
| Other PR Reviewed | {n} |
|
|
565
|
+
|
|
566
|
+
## Items Requiring Attention
|
|
567
|
+
[Each item: number, title, verdict, 1-line summary, link to report file]
|
|
568
|
+
|
|
569
|
+
## Report Files
|
|
570
|
+
[All generated files with paths]
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## Anti-Patterns
|
|
576
|
+
|
|
577
|
+
| Violation | Severity |
|
|
578
|
+
|-----------|----------|
|
|
579
|
+
| ANY GitHub mutation (comment/close/merge/review/label/edit) | **CRITICAL** |
|
|
580
|
+
| Claim without permalink | **CRITICAL** |
|
|
581
|
+
| Using category other than `quick` | CRITICAL |
|
|
582
|
+
| Batching multiple items into one task | CRITICAL |
|
|
583
|
+
| `run_in_background=false` | CRITICAL |
|
|
584
|
+
| `git checkout` on PR branch | CRITICAL |
|
|
585
|
+
| Guessing without codebase evidence | HIGH |
|
|
586
|
+
| Not writing report to `{REPORT_DIR}` | HIGH |
|
|
587
|
+
| Using branch name instead of commit SHA in permalink | HIGH |
|