@sentry/junior-github 0.123.0 → 0.124.1
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/dist/index.js +9 -7
- package/package.json +2 -2
- package/skills/github-issues/SKILL.md +4 -2
- package/skills/github-issues/references/issue-bug.md +1 -1
- package/skills/github-issues/references/issue-examples.md +8 -13
- package/skills/github-issues/references/issue-feature.md +4 -5
- package/skills/github-issues/references/issue-quality-checklist.md +2 -1
- package/skills/github-issues/references/issue-task.md +2 -2
package/dist/index.js
CHANGED
|
@@ -119,18 +119,18 @@ function sentryConversationUrl(conversationId) {
|
|
|
119
119
|
function githubConversationFooter(conversationId, dashboardUrl) {
|
|
120
120
|
const id = nonEmptyString(conversationId, "conversationId");
|
|
121
121
|
const normalizedDashboardUrl = dashboardUrl?.trim();
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const sentryUrl = sentryConversationUrl(id);
|
|
123
|
+
const sessionLinks = normalizedDashboardUrl ? `[View Junior Session](${normalizedDashboardUrl})${sentryUrl ? ` [Sentry](${sentryUrl})` : ""}` : sentryUrl ? `[View Junior Session in Sentry](${sentryUrl})` : void 0;
|
|
124
|
+
if (!sessionLinks) {
|
|
124
125
|
return void 0;
|
|
125
126
|
}
|
|
126
|
-
const label = normalizedDashboardUrl ? "View Junior Session" : "View Junior Session in Sentry";
|
|
127
127
|
const conversationMarker = `<!-- ${GITHUB_CONVERSATION_ID_MARKER}${encodeURIComponent(id)} -->`;
|
|
128
128
|
return `${GITHUB_SESSION_FOOTER_START}
|
|
129
129
|
${conversationMarker}
|
|
130
130
|
|
|
131
131
|
--
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
${sessionLinks}
|
|
134
134
|
|
|
135
135
|
${GITHUB_SESSION_FOOTER_END}`;
|
|
136
136
|
}
|
|
@@ -382,7 +382,7 @@ function isDefinitiveGitHubIssueCreateRejection(error) {
|
|
|
382
382
|
}
|
|
383
383
|
return [400, 401, 404, 410, 422].includes(error.status);
|
|
384
384
|
}
|
|
385
|
-
function createGitHubIssueRequest(conversationId, input, actor) {
|
|
385
|
+
function createGitHubIssueRequest(conversationId, input, actor, dashboardUrl) {
|
|
386
386
|
const repo = parseRepo(input.repo);
|
|
387
387
|
const labels = input.labels?.map(
|
|
388
388
|
(label) => nonEmptyString2(label, "labels entry")
|
|
@@ -391,7 +391,8 @@ function createGitHubIssueRequest(conversationId, input, actor) {
|
|
|
391
391
|
title: nonEmptyString2(input.title, "title"),
|
|
392
392
|
body: appendGitHubFooter(
|
|
393
393
|
appendGitHubRequesterAttribution(input.body ?? "", actor),
|
|
394
|
-
conversationId
|
|
394
|
+
conversationId,
|
|
395
|
+
dashboardUrl
|
|
395
396
|
),
|
|
396
397
|
...labels?.length ? { labels } : {}
|
|
397
398
|
};
|
|
@@ -488,7 +489,8 @@ function createGitHubIssueTool(ctx) {
|
|
|
488
489
|
const request = createGitHubIssueRequest(
|
|
489
490
|
conversationId,
|
|
490
491
|
parsedInput,
|
|
491
|
-
ctx.actor
|
|
492
|
+
ctx.actor,
|
|
493
|
+
ctx.slack?.conversationLink?.url
|
|
492
494
|
);
|
|
493
495
|
const pendingState = {
|
|
494
496
|
status: "pending",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.124.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@sinclair/typebox": "^0.34.49",
|
|
32
32
|
"drizzle-orm": "^0.45.2",
|
|
33
33
|
"zod": "^4.4.3",
|
|
34
|
-
"@sentry/junior-plugin-api": "0.
|
|
34
|
+
"@sentry/junior-plugin-api": "0.124.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^25.9.1",
|
|
@@ -57,7 +57,8 @@ Follow [references/research-rules.md](references/research-rules.md) for cross-ty
|
|
|
57
57
|
- Prefer flat bullet lists over headed sections for simple issues. Remove empty sections.
|
|
58
58
|
- Generalize session framing — strip channel references, slash commands, Slack thread IDs, user @mentions, and transcript fragments; replace with the underlying technical problem.
|
|
59
59
|
- Compress source material. Research notes, hypotheses, or transcripts become a short summary + scoped bullets — never paste raw investigation into the body.
|
|
60
|
-
- Do not add desired outcome, expected behavior,
|
|
60
|
+
- Do not add desired outcome, expected behavior, acceptance criteria, fixes, implementation steps, approaches, or options unless the user explicitly asks to preserve a specific proposal.
|
|
61
|
+
- Never infer a solution from research. If a user-provided proposal must be preserved, attribute it as a proposal and keep it separate from verified diagnosis.
|
|
61
62
|
- Preserve material source references inline.
|
|
62
63
|
|
|
63
64
|
**Source attribution:**
|
|
@@ -74,6 +75,7 @@ Before running the `gh` create/edit command, check each gate. If any fails, revi
|
|
|
74
75
|
- Title length ≤ 60 characters.
|
|
75
76
|
- No session framing remains (channel refs, slash commands, @mentions, Slack thread IDs).
|
|
76
77
|
- Body structure matches complexity — no empty sections, no restated title, no raw research dump.
|
|
78
|
+
- No invented or unattributed solution, implementation step, approach, or option appears in the title or body.
|
|
77
79
|
|
|
78
80
|
Run [references/issue-quality-checklist.md](references/issue-quality-checklist.md) for holistic soft-signal review when the draft warrants it.
|
|
79
81
|
|
|
@@ -93,5 +95,5 @@ Run [references/issue-quality-checklist.md](references/issue-quality-checklist.m
|
|
|
93
95
|
|
|
94
96
|
- Require explicit confirmation only for close/reopen or destructive broad rewrites.
|
|
95
97
|
- Do not overwrite issue fields unless explicitly requested. Prefer partial updates over full body replacement.
|
|
96
|
-
-
|
|
98
|
+
- Keep ticket handoffs diagnosis-first. Root-cause evidence can establish what is wrong; it does not justify inventing what should be built or changed.
|
|
97
99
|
- If repository or installation access is missing, stop and return a concrete remediation message.
|
|
@@ -30,7 +30,7 @@ Research informs what goes in the issue, not how structured it looks.
|
|
|
30
30
|
3. Separate verified facts from unknowns — label each explicitly.
|
|
31
31
|
4. Form root-cause hypotheses linked to evidence, with confidence (`high`, `medium`, `low`).
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Do not add fix suggestions. If the user explicitly asks to preserve a specific proposal from the source context, attribute it as proposed and keep it separate from verified facts and root-cause hypotheses.
|
|
34
34
|
|
|
35
35
|
## Context generalization
|
|
36
36
|
|
|
@@ -35,12 +35,10 @@ Good structure — problem-specific sections:
|
|
|
35
35
|
> 2. First message acquires the lock
|
|
36
36
|
> 3. Second message sets its dedup key, fails lock acquisition
|
|
37
37
|
>
|
|
38
|
-
> ##
|
|
38
|
+
> ## Unknowns
|
|
39
39
|
>
|
|
40
|
-
>
|
|
41
|
-
>
|
|
42
|
-
> - **Option A**: Acquire lock before setting dedup key
|
|
43
|
-
> - **Option B**: Clear dedup key on lock failure
|
|
40
|
+
> - Whether lock contention is the only path that consumes the dedup slot without processing
|
|
41
|
+
> - Whether the behavior reproduces across all message entry points
|
|
44
42
|
>
|
|
45
43
|
> ## Workaround
|
|
46
44
|
>
|
|
@@ -71,7 +69,7 @@ Bad framing:
|
|
|
71
69
|
|
|
72
70
|
> It would be nice to have better config reloading.
|
|
73
71
|
|
|
74
|
-
Good framing — current state, gap,
|
|
72
|
+
Good framing — current state, gap, and impact:
|
|
75
73
|
|
|
76
74
|
> ## Current behavior
|
|
77
75
|
>
|
|
@@ -81,12 +79,9 @@ Good framing — current state, gap, options:
|
|
|
81
79
|
>
|
|
82
80
|
> Config changes during incidents require redeploying, adding 2-3 minutes to mitigation.
|
|
83
81
|
>
|
|
84
|
-
> ##
|
|
82
|
+
> ## Impact
|
|
85
83
|
>
|
|
86
|
-
>
|
|
87
|
-
> | --------------------------- | ---------------------------------- |
|
|
88
|
-
> | File watch + hot reload | Simple, but no atomicity guarantee |
|
|
89
|
-
> | Config service with polling | Consistent, but adds a dependency |
|
|
84
|
+
> During incidents, each config change adds 2-3 minutes of mitigation delay and requires an operator to coordinate the restart.
|
|
90
85
|
|
|
91
86
|
## Principles
|
|
92
87
|
|
|
@@ -94,7 +89,6 @@ Good framing — current state, gap, options:
|
|
|
94
89
|
- Include code snippets when they clarify the pattern
|
|
95
90
|
- Quantify scope precisely ("8 of 9", not "many")
|
|
96
91
|
- Cross-reference related issues and PRs
|
|
97
|
-
- Show concrete options with tradeoffs, not vague "should be fixed"
|
|
98
92
|
- Use tables for structured comparisons
|
|
99
93
|
|
|
100
94
|
## Anti-patterns
|
|
@@ -102,7 +96,8 @@ Good framing — current state, gap, options:
|
|
|
102
96
|
- Over-structured issues: using ## Summary, ## Impact, ## Root Cause headings for a 3-line bug
|
|
103
97
|
- Adding "Expected behavior" or "Desired outcome" when the thread didn't state one
|
|
104
98
|
- Restating the title as the first sentence of the body
|
|
105
|
-
-
|
|
99
|
+
- Invented fixes, implementation steps, approaches, or options, even when the root cause is verified
|
|
100
|
+
- Unattributed proposals mixed into verified diagnosis
|
|
106
101
|
- Speculative detail mixed into verified facts
|
|
107
102
|
- Dumping a list of URLs without inline context
|
|
108
103
|
- Session-specific content (slash commands, channel references, raw transcript framing, or unrelated user chatter)
|
|
@@ -4,11 +4,11 @@ Load when issue type is `feature`. Cross-type rules (title length, delegated foo
|
|
|
4
4
|
|
|
5
5
|
## Primary goal
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Describe an intentional improvement through verified current-state analysis, the gap, and its impact without prescribing implementation.
|
|
8
8
|
|
|
9
9
|
## Shape
|
|
10
10
|
|
|
11
|
-
A flat bullet list is fine for simple features. Use headed sections only when
|
|
11
|
+
A flat bullet list is fine for simple features. Use headed sections only when the current-state evidence and impact need detailed framing.
|
|
12
12
|
|
|
13
13
|
**Summary** — up to 3 sentences describing the improvement. Short imperative title (e.g. "Support SAML SSO for enterprise orgs").
|
|
14
14
|
|
|
@@ -16,15 +16,14 @@ A flat bullet list is fine for simple features. Use headed sections only when tr
|
|
|
16
16
|
|
|
17
17
|
- **Current behavior** — how the system works today
|
|
18
18
|
- **Gap** — why current behavior is insufficient, with concrete impact
|
|
19
|
-
- **Options** — viable approaches with tradeoffs (include only when the thread discusses alternatives)
|
|
20
19
|
|
|
21
|
-
For simple features, skip sections and use flat bullets describing the gap and
|
|
20
|
+
For simple features, skip sections and use flat bullets describing the current behavior, gap, and impact.
|
|
22
21
|
|
|
23
22
|
## Research guidance
|
|
24
23
|
|
|
25
24
|
1. Analyze current behavior and why it's insufficient.
|
|
26
25
|
2. Gather prior art when available — include links and what each proves. If none found, omit rather than stating "none found."
|
|
27
|
-
3.
|
|
26
|
+
3. Do not generate approaches or options. Preserve a specific proposal only when the user explicitly asks, attribute it, and keep it separate from the gap analysis.
|
|
28
27
|
|
|
29
28
|
## Context generalization
|
|
30
29
|
|
|
@@ -15,7 +15,8 @@ Soft-signal review beyond the hard gates in `SKILL.md` § Verify draft. Use when
|
|
|
15
15
|
## Anti-patterns to avoid
|
|
16
16
|
|
|
17
17
|
- Overlong, sprawling bodies with no clear sections.
|
|
18
|
-
-
|
|
18
|
+
- Invented fixes, implementation steps, approaches, or options, regardless of diagnostic confidence.
|
|
19
|
+
- User-provided proposals presented without attribution or mixed into verified diagnosis.
|
|
19
20
|
- Speculative detail mixed into verified sections.
|
|
20
21
|
|
|
21
22
|
## External guidance
|
|
@@ -17,12 +17,12 @@ A task can be just a title + 2-3 bullets. Use headed sections only when scope is
|
|
|
17
17
|
- **Background** — why this task exists, with code snippets if relevant
|
|
18
18
|
- **Scope** — what's included and excluded, quantify when possible
|
|
19
19
|
|
|
20
|
-
For simple tasks, skip sections and use flat bullets for
|
|
20
|
+
For simple tasks, skip sections and use flat bullets for background and scope.
|
|
21
21
|
|
|
22
22
|
## Research guidance
|
|
23
23
|
|
|
24
24
|
- Minimal research by default. Prefer first-party repository context when available.
|
|
25
|
-
-
|
|
25
|
+
- Do not generate implementation steps or approaches. Preserve a specific user-provided plan only when explicitly requested, attribute it, and keep it separate from verified scope.
|
|
26
26
|
- Include dependencies or risks only when material.
|
|
27
27
|
|
|
28
28
|
## Context generalization
|