@desplega.ai/agent-swarm 1.56.3 → 1.56.5
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/openapi.json +1 -1
- package/package.json +1 -1
- package/plugin/commands/close-issue.md +11 -63
- package/plugin/commands/create-pr.md +15 -77
- package/plugin/commands/implement-issue.md +26 -102
- package/plugin/commands/investigate-sentry-issue.md +21 -84
- package/plugin/commands/respond-github.md +9 -70
- package/plugin/commands/review-pr.md +46 -201
- package/plugin/commands/start-leader.md +36 -54
- package/plugin/commands/swarm-chat.md +18 -57
- package/plugin/commands/todos.md +6 -37
- package/plugin/commands/work-on-task.md +18 -56
- package/plugin/pi-skills/close-issue/SKILL.md +11 -63
- package/plugin/pi-skills/create-pr/SKILL.md +15 -77
- package/plugin/pi-skills/implement-issue/SKILL.md +26 -102
- package/plugin/pi-skills/investigate-sentry-issue/SKILL.md +21 -84
- package/plugin/pi-skills/respond-github/SKILL.md +9 -70
- package/plugin/pi-skills/review-pr/SKILL.md +46 -201
- package/plugin/pi-skills/start-leader/SKILL.md +31 -49
- package/plugin/pi-skills/swarm-chat/SKILL.md +18 -57
- package/plugin/pi-skills/todos/SKILL.md +6 -37
- package/plugin/pi-skills/work-on-task/SKILL.md +18 -50
- package/src/be/db.ts +36 -0
- package/src/github/handlers.ts +95 -5
- package/src/heartbeat/heartbeat.ts +48 -3
- package/src/heartbeat/templates.ts +4 -2
- package/src/prompts/session-templates.ts +49 -210
- package/src/tests/github-event-filter.test.ts +83 -1
- package/src/tests/prompt-template-session.test.ts +11 -16
- package/src/tests/update-profile-auth.test.ts +3 -3
- package/src/tools/update-profile.ts +4 -2
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Agent Swarm API",
|
|
5
|
-
"version": "1.56.
|
|
5
|
+
"version": "1.56.4",
|
|
6
6
|
"description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
package/package.json
CHANGED
|
@@ -13,78 +13,26 @@ Close a GitHub or GitLab issue with an appropriate closing comment summarizing t
|
|
|
13
13
|
|
|
14
14
|
## Arguments
|
|
15
15
|
|
|
16
|
-
- `issue-number-or-url`: Either an issue number (e.g., `123`) or a full issue URL
|
|
16
|
+
- `issue-number-or-url`: Either an issue number (e.g., `123`) or a full issue URL
|
|
17
17
|
|
|
18
18
|
## Workflow
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
REPO_PATH=/workspace/personal/<repo-name>
|
|
30
|
-
|
|
31
|
-
if [ ! -d "$REPO_PATH" ]; then
|
|
32
|
-
gh repo clone <owner>/<repo> "$REPO_PATH"
|
|
33
|
-
fi
|
|
34
|
-
|
|
35
|
-
cd "$REPO_PATH"
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### 3. Get Issue Details
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
gh issue view <issue-number> --json title,body,author,labels,comments
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 4. Understand the Context
|
|
45
|
-
|
|
46
|
-
Review:
|
|
47
|
-
- What was the original issue about?
|
|
48
|
-
- What work was done to resolve it?
|
|
49
|
-
- Were there any related PRs or commits?
|
|
50
|
-
|
|
51
|
-
Check for related PRs:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
gh pr list --search "fixes #<issue-number>" --json number,title,state
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 5. Generate Closing Comment
|
|
58
|
-
|
|
59
|
-
Write a closing comment that includes:
|
|
60
|
-
- Brief summary of what was done
|
|
61
|
-
- Reference to any PRs that addressed the issue
|
|
62
|
-
- Any follow-up items or notes
|
|
63
|
-
|
|
64
|
-
### 6. Post Comment and Close
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
# Add the closing comment
|
|
68
|
-
gh issue comment <issue-number> --body "Your closing comment"
|
|
69
|
-
|
|
70
|
-
# Close the issue
|
|
71
|
-
gh issue close <issue-number>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Or combine with a reason:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
gh issue close <issue-number> --comment "Your closing comment" --reason completed
|
|
78
|
-
```
|
|
20
|
+
1. **Parse the input** — if given a URL, extract owner, repo, and issue number. If just a number, use the current repo context.
|
|
21
|
+
2. **Ensure repo is cloned** to `/workspace/personal/<repo-name>` (clone with `gh repo clone` if needed).
|
|
22
|
+
3. **Get issue details** — read the issue title, body, comments, and check for related PRs.
|
|
23
|
+
4. **Generate closing comment** — summarize what was done, reference related PRs/commits, note any follow-ups.
|
|
24
|
+
5. **Post comment and close:**
|
|
25
|
+
```bash
|
|
26
|
+
gh issue close <issue-number> --comment "Your closing comment" --reason completed
|
|
27
|
+
```
|
|
79
28
|
|
|
80
29
|
## Closing Reasons
|
|
81
30
|
|
|
82
|
-
- `completed`
|
|
83
|
-
- `not_planned`
|
|
31
|
+
- `completed` — The issue was resolved
|
|
32
|
+
- `not_planned` — Won't fix / out of scope / duplicate
|
|
84
33
|
|
|
85
34
|
## Tips
|
|
86
35
|
|
|
87
36
|
- Always explain why the issue is being closed
|
|
88
37
|
- Reference specific PRs or commits when applicable
|
|
89
38
|
- If closing as "not planned", explain the reasoning
|
|
90
|
-
- Be respectful - someone took time to report the issue
|
|
@@ -5,15 +5,15 @@ argument-hint: [base-branch]
|
|
|
5
5
|
|
|
6
6
|
# Create Pull Request / Merge Request
|
|
7
7
|
|
|
8
|
-
Create a
|
|
8
|
+
Create a PR (GitHub) or MR (GitLab) from the current branch with an auto-generated title and description.
|
|
9
9
|
|
|
10
|
-
**Provider detection:** Check the remote URL
|
|
11
|
-
- If
|
|
12
|
-
- If
|
|
10
|
+
**Provider detection:** Check the remote URL:
|
|
11
|
+
- If `github.com` → use `gh` CLI
|
|
12
|
+
- If `gitlab.com` or `gitlab.` → use `glab` CLI
|
|
13
13
|
|
|
14
14
|
## Arguments
|
|
15
15
|
|
|
16
|
-
- `base-branch` (optional):
|
|
16
|
+
- `base-branch` (optional): Branch to merge into (defaults to `main` or repo default)
|
|
17
17
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
@@ -21,79 +21,17 @@ You should be working in a repository cloned to `/workspace/personal/<repo-name>
|
|
|
21
21
|
|
|
22
22
|
## Workflow
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### 2. Check Branch Status
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# Get current branch
|
|
36
|
-
git branch --show-current
|
|
37
|
-
|
|
38
|
-
# Ensure we're not on main/master
|
|
39
|
-
# Ensure there are commits to push
|
|
40
|
-
git log origin/main..HEAD --oneline
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 3. Push the Branch
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
git push -u origin HEAD
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 4. Gather Context for PR Description
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# Get commit messages since diverging from base
|
|
53
|
-
git log origin/main..HEAD --pretty=format:"%s%n%b"
|
|
54
|
-
|
|
55
|
-
# Get changed files
|
|
56
|
-
git diff --stat origin/main..HEAD
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### 5. Generate PR Title and Description
|
|
60
|
-
|
|
61
|
-
Based on the commits and changes:
|
|
62
|
-
- **Title**: Concise summary of the changes (use conventional commit style if the repo uses it)
|
|
63
|
-
- **Description**:
|
|
64
|
-
- Summary of what changed and why
|
|
65
|
-
- List of notable changes
|
|
66
|
-
- Any testing done
|
|
67
|
-
- Related issues (if applicable)
|
|
68
|
-
|
|
69
|
-
### 6. Create the PR/MR
|
|
70
|
-
|
|
71
|
-
**For GitHub:**
|
|
72
|
-
```bash
|
|
73
|
-
gh pr create \
|
|
74
|
-
--title "Your generated title" \
|
|
75
|
-
--body "Your generated description" \
|
|
76
|
-
--base main
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**For GitLab:**
|
|
80
|
-
```bash
|
|
81
|
-
glab mr create \
|
|
82
|
-
--title "Your generated title" \
|
|
83
|
-
--description "Your generated description" \
|
|
84
|
-
--target-branch main
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### 7. Report the PR/MR URL
|
|
88
|
-
|
|
89
|
-
After creation, provide the URL to the user:
|
|
90
|
-
|
|
91
|
-
**GitHub:** `gh pr view --json url --jq '.url'`
|
|
92
|
-
**GitLab:** `glab mr view --web`
|
|
24
|
+
1. **Verify state** — confirm you're in a git repo, not on main/master, and have commits to push.
|
|
25
|
+
2. **Push the branch** — `git push -u origin HEAD`
|
|
26
|
+
3. **Gather context** — review commit messages and changed files since diverging from base.
|
|
27
|
+
4. **Generate title and description:**
|
|
28
|
+
- **Title**: Concise summary (conventional commit style if the repo uses it)
|
|
29
|
+
- **Description**: Summary of changes, notable items, testing done, related issues
|
|
30
|
+
5. **Create the PR/MR** using `gh pr create` or `glab mr create`.
|
|
31
|
+
6. **Report** the PR/MR URL.
|
|
93
32
|
|
|
94
33
|
## Tips
|
|
95
34
|
|
|
96
35
|
- Link related issues using `Fixes #123` or `Closes #123` in the description
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
- If the branch has many commits, consider summarizing the overall change rather than listing each commit
|
|
36
|
+
- Keep PRs focused — one logical change per PR
|
|
37
|
+
- If the branch has many commits, summarize the overall change rather than listing each commit
|
|
@@ -5,131 +5,55 @@ argument-hint: <issue-number-or-url>
|
|
|
5
5
|
|
|
6
6
|
# Implement Issue
|
|
7
7
|
|
|
8
|
-
Read a GitHub or GitLab issue, implement the requested changes, and create a
|
|
8
|
+
Read a GitHub or GitLab issue, implement the requested changes, and create a PR/MR.
|
|
9
9
|
|
|
10
|
-
**Provider detection:** Check the URL or remote
|
|
10
|
+
**Provider detection:** Check the URL or remote:
|
|
11
11
|
- If GitHub → use `gh issue view` / `gh pr create`
|
|
12
12
|
- If GitLab → use `glab issue view` / `glab mr create`
|
|
13
13
|
|
|
14
14
|
## Arguments
|
|
15
15
|
|
|
16
|
-
- `issue-number-or-url`: Either an issue number (e.g., `123`) or a full URL
|
|
16
|
+
- `issue-number-or-url`: Either an issue number (e.g., `123`) or a full URL
|
|
17
17
|
|
|
18
18
|
## Workflow
|
|
19
19
|
|
|
20
|
-
### 1. Parse
|
|
20
|
+
### 1. Parse and Fetch
|
|
21
21
|
|
|
22
|
-
If given a URL, extract
|
|
22
|
+
If given a URL, extract owner, repo, and issue number. Fetch issue details (title, body, labels, comments). Understand what's being requested, acceptance criteria, and any technical constraints.
|
|
23
23
|
|
|
24
|
-
### 2.
|
|
24
|
+
### 2. Setup
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
- Ensure repo is cloned to `/workspace/personal/<repo-name>` (clone with `gh repo clone` if needed)
|
|
27
|
+
- Fetch origin, checkout main, pull latest
|
|
28
|
+
- Create a feature branch: `fix/issue-<number>-<short-description>`
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
- What is being requested?
|
|
32
|
-
- Are there acceptance criteria?
|
|
33
|
-
- Any technical details or constraints mentioned?
|
|
34
|
-
- Check comments for additional context or clarifications
|
|
30
|
+
### 3. Implement
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
REPO_PATH=/workspace/personal/<repo-name>
|
|
42
|
-
|
|
43
|
-
if [ ! -d "$REPO_PATH" ]; then
|
|
44
|
-
gh repo clone <owner>/<repo> "$REPO_PATH"
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
cd "$REPO_PATH"
|
|
48
|
-
git fetch origin
|
|
49
|
-
git checkout main
|
|
50
|
-
git pull origin main
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 4. Create a Feature Branch
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
# Use a descriptive branch name based on the issue
|
|
57
|
-
git checkout -b fix/issue-<number>-<short-description>
|
|
58
|
-
|
|
59
|
-
# Examples:
|
|
60
|
-
# git checkout -b fix/issue-123-add-dark-mode
|
|
61
|
-
# git checkout -b fix/issue-456-fix-login-redirect
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### 5. Implement the Changes
|
|
65
|
-
|
|
66
|
-
This is the core work. Based on the issue:
|
|
67
|
-
|
|
68
|
-
1. **Understand the codebase** - Explore relevant files, understand existing patterns
|
|
69
|
-
2. **Plan your approach** - Consider using `/desplega:create-plan` for complex changes
|
|
70
|
-
3. **Write the code** - Implement the requested functionality
|
|
71
|
-
4. **Test your changes** - Run existing tests, add new tests if appropriate
|
|
72
|
-
5. **Verify it works** - Manual verification where possible
|
|
32
|
+
1. **Understand the codebase** — explore relevant files and existing patterns
|
|
33
|
+
2. **Plan your approach** — consider using `/desplega:create-plan` for complex changes
|
|
34
|
+
3. **Write the code** — implement the requested functionality
|
|
35
|
+
4. **Test your changes** — run existing tests, add new tests if appropriate
|
|
36
|
+
5. **Verify it works** — manual verification where possible
|
|
73
37
|
|
|
74
38
|
Keep changes focused on what the issue requests. Avoid scope creep.
|
|
75
39
|
|
|
76
|
-
###
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# Stage your changes
|
|
80
|
-
git add -A
|
|
81
|
-
|
|
82
|
-
# Commit with a message referencing the issue
|
|
83
|
-
git commit -m "Fix #<issue-number>: <short description>
|
|
84
|
-
|
|
85
|
-
<longer description if needed>"
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Use conventional commit style if the repo uses it (e.g., `feat:`, `fix:`, `docs:`).
|
|
89
|
-
|
|
90
|
-
### 7. Push the Branch
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
git push -u origin HEAD
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### 8. Create the Pull Request
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
gh pr create \
|
|
100
|
-
--title "<descriptive title>" \
|
|
101
|
-
--body "## Summary
|
|
102
|
-
<Brief description of what this PR does>
|
|
103
|
-
|
|
104
|
-
## Changes
|
|
105
|
-
- <List key changes>
|
|
106
|
-
|
|
107
|
-
## Testing
|
|
108
|
-
- <How you tested the changes>
|
|
109
|
-
|
|
110
|
-
Fixes #<issue-number>"
|
|
111
|
-
```
|
|
40
|
+
### 4. Commit and Push
|
|
112
41
|
|
|
113
|
-
|
|
42
|
+
Commit with a message referencing the issue (e.g., `Fix #123: <description>`). Use conventional commit style if the repo uses it. Push with `git push -u origin HEAD`.
|
|
114
43
|
|
|
115
|
-
###
|
|
44
|
+
### 5. Create the PR
|
|
116
45
|
|
|
117
|
-
|
|
118
|
-
- PR URL
|
|
119
|
-
- Summary of changes made
|
|
120
|
-
- Any notes or caveats
|
|
46
|
+
Create the PR with a descriptive title and body including: summary of changes, key changes list, testing done, and `Fixes #<issue-number>` to auto-close the issue on merge.
|
|
121
47
|
|
|
122
|
-
|
|
48
|
+
### 6. Report Back
|
|
123
49
|
|
|
124
|
-
|
|
125
|
-
gh issue comment <issue-number> --body "I've created a PR to address this: <PR-URL>"
|
|
126
|
-
```
|
|
50
|
+
Provide the PR URL, summary of changes, and any caveats. Optionally comment on the original issue linking the PR.
|
|
127
51
|
|
|
128
52
|
## Tips
|
|
129
53
|
|
|
130
|
-
- Read the issue thoroughly before starting
|
|
131
|
-
- Check
|
|
132
|
-
-
|
|
133
|
-
- If the issue is too large,
|
|
134
|
-
- If
|
|
54
|
+
- Read the issue thoroughly before starting — misunderstanding wastes time
|
|
55
|
+
- Check for related issues or existing PRs
|
|
56
|
+
- One issue = one PR
|
|
57
|
+
- If the issue is too large, break it into smaller PRs
|
|
58
|
+
- If unclear, use `/respond-github` to ask for clarification
|
|
135
59
|
- Run linters and tests before creating the PR
|
|
@@ -9,130 +9,67 @@ Investigate a Sentry issue to understand the error, gather context, and prepare
|
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Verify authentication:
|
|
15
|
-
```bash
|
|
16
|
-
sentry-cli info
|
|
17
|
-
```
|
|
12
|
+
`SENTRY_AUTH_TOKEN` and `SENTRY_ORG` must be set. Verify with `sentry-cli info`.
|
|
18
13
|
|
|
19
14
|
## Arguments
|
|
20
15
|
|
|
21
|
-
- `sentry-issue-url-or-id`:
|
|
16
|
+
- `sentry-issue-url-or-id`: A Sentry issue URL or just the issue ID (e.g., `123456`)
|
|
22
17
|
|
|
23
18
|
## Workflow
|
|
24
19
|
|
|
25
|
-
### 1. Parse the
|
|
20
|
+
### 1. Parse the Input
|
|
26
21
|
|
|
27
|
-
If given a URL, extract the issue ID
|
|
28
|
-
```bash
|
|
29
|
-
# URL format: https://sentry.io/organizations/{org}/issues/{issue_id}/
|
|
30
|
-
# Extract issue_id from the URL path
|
|
31
|
-
```
|
|
22
|
+
If given a URL (`https://sentry.io/organizations/{org}/issues/{issue_id}/`), extract the issue ID.
|
|
32
23
|
|
|
33
24
|
### 2. Get Issue Overview
|
|
34
25
|
|
|
35
|
-
Use `sentry-cli` to list the issue:
|
|
36
26
|
```bash
|
|
37
27
|
sentry-cli issues list --id <issue-id>
|
|
38
28
|
```
|
|
39
29
|
|
|
40
|
-
### 3. Get Detailed
|
|
41
|
-
|
|
42
|
-
For more context, use the REST API:
|
|
43
|
-
```bash
|
|
44
|
-
curl -s "https://sentry.io/api/0/organizations/${SENTRY_ORG}/issues/<issue-id>/" \
|
|
45
|
-
-H "Authorization: Bearer ${SENTRY_AUTH_TOKEN}" | jq
|
|
46
|
-
```
|
|
30
|
+
### 3. Get Detailed Info via REST API
|
|
47
31
|
|
|
48
|
-
|
|
49
|
-
- Error title and metadata
|
|
50
|
-
- First/last seen timestamps
|
|
51
|
-
- Event count and user impact
|
|
52
|
-
- Assigned user and status
|
|
32
|
+
Use `https://sentry.io/api/0/organizations/${SENTRY_ORG}/issues/<issue-id>/` for metadata (first/last seen, event count, user impact, status).
|
|
53
33
|
|
|
54
34
|
### 4. Get Full Stacktrace
|
|
55
35
|
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
curl -s "https://sentry.io/api/0/organizations/${SENTRY_ORG}/issues/<issue-id>/events/recommended/" \
|
|
59
|
-
-H "Authorization: Bearer ${SENTRY_AUTH_TOKEN}" | jq
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Key fields in the response:
|
|
63
|
-
- `.entries[] | select(.type == "exception")` - The exception with stacktrace
|
|
64
|
-
- `.entries[] | select(.type == "breadcrumbs")` - Actions leading to the error
|
|
65
|
-
- `.tags` - Environment, browser, OS info
|
|
66
|
-
- `.context` - Custom context data
|
|
36
|
+
Use the recommended event endpoint: `.../issues/<issue-id>/events/recommended/`
|
|
67
37
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
jq '.entries[] | select(.type == "exception") | .data.values[].stacktrace.frames'
|
|
75
|
-
```
|
|
38
|
+
Key jq paths for the response:
|
|
39
|
+
- `.entries[] | select(.type == "exception")` — exception with stacktrace
|
|
40
|
+
- `.entries[] | select(.type == "exception") | .data.values[].stacktrace.frames` — stack frames
|
|
41
|
+
- `.entries[] | select(.type == "breadcrumbs")` — actions leading to the error
|
|
42
|
+
- `.tags` — environment, browser, OS info
|
|
43
|
+
- `.context` — custom context data
|
|
76
44
|
|
|
77
|
-
###
|
|
45
|
+
### 5. Analyze and Report
|
|
78
46
|
|
|
79
|
-
Based on the stacktrace and context:
|
|
80
47
|
1. Identify the failing file and line number
|
|
81
48
|
2. Understand the error type and message
|
|
82
49
|
3. Review breadcrumbs for the sequence of events
|
|
83
50
|
4. Check tags for environment-specific issues
|
|
84
51
|
|
|
85
|
-
###
|
|
52
|
+
### 6. Take Action (if appropriate)
|
|
86
53
|
|
|
87
|
-
**Resolve an issue:**
|
|
88
54
|
```bash
|
|
89
|
-
sentry-cli issues resolve <issue-id>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
**Mute an issue:**
|
|
93
|
-
```bash
|
|
94
|
-
sentry-cli issues mute <issue-id>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
**Unresolve an issue:**
|
|
98
|
-
```bash
|
|
99
|
-
sentry-cli issues unresolve <issue-id>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Common CLI Commands
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
# Verify authentication
|
|
106
|
-
sentry-cli info
|
|
107
|
-
|
|
108
|
-
# List unresolved issues
|
|
109
|
-
sentry-cli issues list --query "is:unresolved"
|
|
110
|
-
|
|
111
|
-
# List recent issues (last 2 days)
|
|
112
|
-
sentry-cli issues list --query "lastSeen:-2d"
|
|
113
|
-
|
|
114
|
-
# List issues matching a message
|
|
115
|
-
sentry-cli issues list --query "message:undefined"
|
|
116
|
-
|
|
117
|
-
# Bulk resolve issues
|
|
118
|
-
sentry-cli issues resolve <id1> <id2> <id3>
|
|
55
|
+
sentry-cli issues resolve <issue-id> # Resolve
|
|
56
|
+
sentry-cli issues mute <issue-id> # Mute
|
|
57
|
+
sentry-cli issues unresolve <issue-id> # Unresolve
|
|
119
58
|
```
|
|
120
59
|
|
|
121
60
|
## Search Query Syntax
|
|
122
61
|
|
|
123
|
-
Use these filters with
|
|
62
|
+
Use these filters with `sentry-cli issues list --query`:
|
|
124
63
|
|
|
125
64
|
| Filter | Example | Description |
|
|
126
65
|
|--------|---------|-------------|
|
|
127
|
-
| `is:` | `is:unresolved
|
|
66
|
+
| `is:` | `is:unresolved` | Issue status |
|
|
128
67
|
| `lastSeen:` | `lastSeen:-2d` | Seen within time range |
|
|
129
68
|
| `message:` | `message:undefined` | Match error message |
|
|
130
69
|
| `issue.category:` | `issue.category:error` | Error category |
|
|
131
70
|
|
|
132
71
|
## Tips
|
|
133
72
|
|
|
134
|
-
- Always get the recommended event first
|
|
135
|
-
- Use `jq` to filter large JSON responses
|
|
73
|
+
- Always get the recommended event first — it's curated for debugging
|
|
136
74
|
- Check breadcrumbs to understand user actions before the error
|
|
137
|
-
- Look at tags for environment info (browser, OS, etc.)
|
|
138
75
|
- If investigating from a Slack alert, the issue URL is in the alert message
|
|
@@ -7,92 +7,31 @@ argument-hint: <issue-or-pr-number-or-url>
|
|
|
7
7
|
|
|
8
8
|
Post a response to a GitHub issue/PR or GitLab issue/MR.
|
|
9
9
|
|
|
10
|
-
**Provider detection:** Check the URL or remote
|
|
10
|
+
**Provider detection:** Check the URL or remote:
|
|
11
11
|
- If GitHub → use `gh issue comment` / `gh pr comment`
|
|
12
12
|
- If GitLab → use `glab issue note` / `glab mr note`
|
|
13
13
|
|
|
14
14
|
## Arguments
|
|
15
15
|
|
|
16
|
-
- `issue-or-pr-number-or-url`: Either a number (e.g., `123`) or a full URL
|
|
16
|
+
- `issue-or-pr-number-or-url`: Either a number (e.g., `123`) or a full URL
|
|
17
17
|
|
|
18
18
|
## Workflow
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
1. **Parse the input** — if given a URL, extract owner, repo, type (issue/PR), and number. If just a number, determine type from current repo context.
|
|
21
|
+
2. **Ensure repo is cloned** to `/workspace/personal/<repo-name>` (clone with `gh repo clone` if needed).
|
|
22
|
+
3. **Get full context** — read the original description and all comments in the thread.
|
|
23
|
+
4. **Understand what's being asked** — if this is from `@agent-swarm`, focus on what was asked in that mention.
|
|
24
|
+
5. **Formulate and post your response** using `gh issue comment` / `gh pr comment` (or `glab` equivalents).
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
- Owner and repo
|
|
24
|
-
- Whether it's an issue or PR (from the URL path)
|
|
25
|
-
- The number
|
|
26
|
+
## Decision Framework
|
|
26
27
|
|
|
27
|
-
If given just a number, use the current repository context and check if it's an issue or PR.
|
|
28
|
-
|
|
29
|
-
### 2. Ensure Repository is Cloned Locally
|
|
30
|
-
|
|
31
|
-
Make sure the repository is available in your personal workspace:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
REPO_PATH=/workspace/personal/<repo-name>
|
|
35
|
-
|
|
36
|
-
if [ ! -d "$REPO_PATH" ]; then
|
|
37
|
-
gh repo clone <owner>/<repo> "$REPO_PATH"
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
cd "$REPO_PATH"
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 3. Get Full Context
|
|
44
|
-
|
|
45
|
-
For issues:
|
|
46
|
-
```bash
|
|
47
|
-
gh issue view <number> --json title,body,author,labels,comments,state
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
For PRs:
|
|
51
|
-
```bash
|
|
52
|
-
gh pr view <number> --json title,body,author,comments,state,reviews
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 4. Understand What's Being Asked
|
|
56
|
-
|
|
57
|
-
Read through:
|
|
58
|
-
- The original issue/PR description
|
|
59
|
-
- All comments in the thread
|
|
60
|
-
- Any specific questions or requests
|
|
61
|
-
|
|
62
|
-
If this is a task from agent-swarm with `@agent-swarm` mention, focus on what was asked in that mention.
|
|
63
|
-
|
|
64
|
-
### 5. Formulate Your Response
|
|
65
|
-
|
|
66
|
-
Consider:
|
|
67
28
|
- What specific question or request needs addressing?
|
|
68
29
|
- Do you need to provide code examples?
|
|
69
30
|
- Should you ask clarifying questions?
|
|
70
31
|
- Is this something you can resolve, or do you need human input?
|
|
71
32
|
|
|
72
|
-
### 6. Post the Response
|
|
73
|
-
|
|
74
|
-
For issues:
|
|
75
|
-
```bash
|
|
76
|
-
gh issue comment <number> --body "Your response"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
For PRs:
|
|
80
|
-
```bash
|
|
81
|
-
gh pr comment <number> --body "Your response"
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Response Guidelines
|
|
85
|
-
|
|
86
|
-
- Be helpful and constructive
|
|
87
|
-
- If you don't know something, say so
|
|
88
|
-
- Provide code examples when relevant
|
|
89
|
-
- Use markdown formatting for readability
|
|
90
|
-
- Keep responses focused and concise
|
|
91
|
-
- If you've completed work, link to the relevant PR or commit
|
|
92
|
-
|
|
93
33
|
## Tips
|
|
94
34
|
|
|
95
35
|
- Check if there's already a PR addressing an issue before responding
|
|
96
|
-
- If asked to implement something, consider whether to respond first or just do it
|
|
97
36
|
- For complex requests, acknowledge receipt and outline your plan
|
|
98
|
-
-
|
|
37
|
+
- If you've completed work, link to the relevant PR or commit
|