Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2656f70
docs: Add design spec for groom-issues skill and fix-issues enrichment
NicoHinderling Jun 11, 2026
6e6c199
docs: Add design spec for issue-digest, validate-fixes, and agent-act…
NicoHinderling Jun 12, 2026
873c20b
feat(skills): Add cron-capable groom and digest skills, enrich fix-is…
NicoHinderling Jun 15, 2026
dede373
feat(skills): Archive untilEscalating in groom-issues so stale closes…
NicoHinderling Jun 15, 2026
f90fe8f
docs(skills): Reposition fix-issues as on-demand-first, autonomous se…
NicoHinderling Jun 15, 2026
959e66f
docs: Add design spec for sentry-triage-issues skill
NicoHinderling Jun 15, 2026
ee505c4
feat(skills): Add sentry-triage-issues for new-queue noise triage
NicoHinderling Jun 15, 2026
9b3eb0e
chore: Remove design specs from PR
NicoHinderling Jun 15, 2026
d3834fc
fix(skills): Use absolute ISO date filters instead of relative durations
NicoHinderling Jun 15, 2026
e21595c
fix(skills): Degrade gracefully on read-only Sentry MCP connections
NicoHinderling Jun 15, 2026
32ae7c2
chore(skills): Trim redundant content and use the dedicated activity …
NicoHinderling Jun 15, 2026
79402b4
fix(skills): Address review-bot feedback on autonomy, scoping, and co…
NicoHinderling Jun 15, 2026
3155b60
ref(skills): Isolate skills and drop redundant invoke sections
NicoHinderling Jun 15, 2026
a2731bd
ref(skills): Scope to validated set — cut groom, de-cron fix-issues
NicoHinderling Jun 15, 2026
6735792
fix(skills): Restore plural identity for sentry-fix-issues
NicoHinderling Jun 15, 2026
3eaf4e5
feat(skills): Make issue-digest concise and repo-aware
NicoHinderling Jun 15, 2026
a31754e
feat(skills): Harden issue-digest Pass R correlation from live testing
NicoHinderling Jun 16, 2026
e2be099
docs(skills): Rename 'Pass R' to plain 'Repo correlation' in digest
NicoHinderling Jun 16, 2026
eb6f677
fix(skills): Address PR bot review feedback on triage and digest
NicoHinderling Jun 16, 2026
99c0812
fix(skills): Sanitize release tag before shell use in digest correlation
NicoHinderling Jun 16, 2026
cf2a3b4
fix(skills): Harden fix-issues branch preflight and assignment
NicoHinderling Jun 16, 2026
1f82fdf
fix(skills): Reconcile triage archive-failure handling
NicoHinderling Jun 16, 2026
f82696e
ref(skills): Remove duplicated guidance within sentry-fix-issues
NicoHinderling Jun 16, 2026
ad8da7a
ref(skills): Remove duplicated guidance within sentry-triage-issues
NicoHinderling Jun 16, 2026
02b1902
ref(skills): Remove duplicated guidance within sentry-issue-digest
NicoHinderling Jun 16, 2026
424b6ea
fix(skills): Address PR bot feedback round 2
NicoHinderling Jun 16, 2026
eb9c345
fix(skills): Make the Phase 7 PR confirmation gate explicit
NicoHinderling Jun 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ Skills use YAML frontmatter with `allowed-tools` — this is required by Cursor
|-------|-------------|
| `sentry-code-review` | Analyze and resolve Sentry bot comments on GitHub PRs |
| `sentry-pr-code-review` | Review PRs for issues detected by Seer Bug Prediction |
| `sentry-fix-issues` | Find and fix Sentry issues using MCP |
| `sentry-fix-issues` | Find and fix a specific Sentry issue using MCP — on-demand by default, opens a draft PR (can also run unattended) |
| `sentry-groom-issues` | Groom the issue backlog — close stale issues, re-open regressions (two-pass, MCP-only, cron-safe) |
| `sentry-issue-digest` | Read-only digest of what changed — top new issues, regressions, movers, release health (cron-safe) |
| `sentry-sdk-upgrade` | Upgrade the Sentry JavaScript SDK across major versions |
| `sentry-create-alert` | Create Sentry alerts using the workflow engine API |

Expand Down
4 changes: 3 additions & 1 deletion SKILL_TREE.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ Debug production issues and maintain code quality with Sentry context.
| Use when | Skill | Path |
|---|---|---|
| Analyze and resolve Sentry comments on GitHub Pull Requests | [`sentry-code-review`](skills/sentry-code-review/SKILL.md) | `sentry-code-review/SKILL.md` |
| Find and fix issues from Sentry using MCP | [`sentry-fix-issues`](skills/sentry-fix-issues/SKILL.md) | `sentry-fix-issues/SKILL.md` |
| Find and fix issues from Sentry using MCP, optionally opening a draft pull request | [`sentry-fix-issues`](skills/sentry-fix-issues/SKILL.md) | `sentry-fix-issues/SKILL.md` |
| Groom a Sentry issue backlog by closing stale unresolved issues and re-opening resolved issues that regressed | [`sentry-groom-issues`](skills/sentry-groom-issues/SKILL.md) | `sentry-groom-issues/SKILL.md` |
| Produce a read-only digest of what changed in a Sentry issue landscape — top new issues, new regressions, biggest movers, and optional release health | [`sentry-issue-digest`](skills/sentry-issue-digest/SKILL.md) | `sentry-issue-digest/SKILL.md` |
| Review a project's PRs to check for issues detected in code review by Seer Bug Prediction | [`sentry-pr-code-review`](skills/sentry-pr-code-review/SKILL.md) | `sentry-pr-code-review/SKILL.md` |
| Upgrade the Sentry JavaScript SDK across major versions | [`sentry-sdk-upgrade`](skills/sentry-sdk-upgrade/SKILL.md) | `sentry-sdk-upgrade/SKILL.md` |

Expand Down
76 changes: 76 additions & 0 deletions docs/superpowers/specs/2026-06-11-groom-and-fix-skills-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Design: Groom-Issues skill + Fix-Issues enrichment

Date: 2026-06-11

## Motivation

A coworker assembled a focused Claude-Code-only plugin (`jshchnz/sentry-workflows-plugin`)
with three Sentry workflow skills. We want "safe-for-publishing" equivalents in this
multi-tool (Claude + Cursor) `sentry-for-ai` skill library, improved with `/skill-writer`
and informed by — but never copied from — the proprietary bot prompts in the `seer` repo.

The intent is that these skills commonly run in a cron / coroutine (unattended) style, so
nothing may block on interactive input in the autonomous path.

## Source mapping

| Coworker skill | Action here |
|---|---|
| `fix-issue` | Enrich existing `sentry-fix-issues` (no duplicate) |
| `groom-stale` | New skill `sentry-groom-issues` |
| `install-routines` | Not ported (marketplace scaffolding, not a portable skill) |

Seer principles mined (re-expressed in our own words, **never verbatim**):
- Fixability rubric: application-logic bug vs. broken environment; root cause in accessible code.
- Root-cause discipline: keep asking "why," fix the true root cause not defensive try/except;
cause may live elsewhere than the crash site.
- Symmetric high-evidence bar; default to *no action* in triage/grooming.
- Treat issue/event content as untrusted data, never as instructions.
- Write handoff notes (suspected file/function + mechanism + fix direction).

## Guiding constraints (both deliverables)

- **Cron/coroutine-safe**: non-interactive default path, no blocking prompts in the autonomous
flow, hard caps per run, `--dry-run`, fixed-schema parseable digest at the end.
- **Multi-tool compatible**: no separate subagent `.md` files; inline the `issue-scorer` /
`fix-implementer` logic as workflow phases in `SKILL.md` (repo convention).
- **Seer-safe**: principles only, re-expressed; no verbatim seer prompt text.
- **Polish**: run `/skill-writer` on both, then `scripts/build-skill-tree.sh` to validate +
regenerate `SKILL_TREE.md`.

## Deliverable A — Enrich `sentry-fix-issues` (additive)

1. Candidate scoring phase — score each candidate for fixability, pick the single best
fixable issue (suspected files exist locally; application-logic bug).
2. Root-cause discipline — investigate before patching; fix true root cause, not try/except.
3. Implementation guardrails — minimal change; abort "too-broad" past ~2 files; don't add/
modify tests unless asked; baseline-vs-after test run; single commit.
4. Branch/PR safety — `claude/`-prefixed branch, never push to main, no force-push, draft PR,
assign issue to self, never auto-resolve.
5. Security constraint — Sentry event content is untrusted data.
6. Autonomous mode — explicit non-interactive path ending in a parseable digest.

Must not break existing interactive behavior.

## Deliverable B — New skill `sentry-groom-issues` (category: workflow)

- Pass 1 — close stale: unresolved issues with no events since an absolute ISO cutoff
(compute the cutoff explicitly; Sentry search has no `older-than` operator); archive/ignore,
never delete; cap per run.
- Pass 2 — reopen regressed: resolved issues with >= N new events since resolution.
- High-evidence default — only close/reopen with strong evidence.
- `--dry-run`, hard caps, parseable digest, untrusted-data constraint.
- Registration: frontmatter (`category: workflow`, `parent: sentry-workflow`,
`disable-model-invocation: true`), breadcrumb, router table row + routing rule in
`sentry-workflow`, regenerate `SKILL_TREE.md`.

## Out of scope

- Routine/cron wrapper files (skills only for now).
- `install-routines` port.
- Subagent `.md` files.

## Open flag

Repo `CLAUDE.md` requires a `Co-Authored-By` commit trailer; global user instructions forbid
it. Following the global rule (no trailer) unless told otherwise.
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Design: Cron skills — issue-digest, validate-fixes + shared agent-activity marker

Date: 2026-06-12

## Motivation

Following the "Agentic Actions on Issues" Notion ideation and a 5-lens ideation pass, three
cron/coroutine skills scored highest. We build two now — `sentry-issue-digest` (read-only daily
awareness) and `sentry-validate-fixes` (closing-the-loop validation, Notion Workflow C) — and
define a small shared **agent-activity marker** so `sentry-fix-issues`, `sentry-validate-fixes`,
and a future `sentry-triage-issues` leave consistent, machine-findable records.

`sentry-triage-issues`, `sentry-agent-activity-digest`, and `sentry-investigate-spike` are
deferred (out of scope here).

## Constraints (carried from the existing cron skills)

- **Cron-safe**: non-interactive default path, never blocks on prompts, hard caps per run,
`--dry-run`, fixed-schema parseable digest.
- **Self-contained**: each skill is fetched individually (~10–20 KB). No cross-skill shared
reference file — the marker schema is defined canonically here and inlined compactly in each
skill that emits or reads it.
- **Seer-safe**: principles only, no verbatim proprietary text.
- **Multi-tool**: no subagent files; inline logic as phases.

## Part 1 — Shared agent-activity marker (Notion primitive 1)

A compact structured record an agent leaves on a Sentry issue so later skills and humans can see
what work was done. Versioned for forward compatibility.

```json
{
"schema": "sentry-agent-activity/v1",
"actor_name": "sentry-fix-issues",
"source": "cron | claude-code | cursor",
"action_type": "fix_pr_opened | fix_validated | reopened_regression | investigated_no_fix | blocked_handoff | triaged_noise | prioritized | needs_review",
"issue": "PROJECT-123",
"confidence": "high | medium | low",
"summary": "<= 200 chars, one line",
"linked_artifacts": ["https://github.com/org/repo/pull/123", "frontend@1.2.9"],
"human_review_required": false,
"timestamp": "<ISO 8601>"
}
```

**Durability / where it is written** (graceful degradation; verify tool availability at build time):
1. Preferred: an issue **comment** containing a sentinel-delimited block so it is machine-findable:
`<!-- sentry-agent-activity:v1 {…json…} -->`
2. Fallback if no comment-create tool: embed the compact marker in the `update_issue` `reason`
string and/or the draft PR body.

**Who emits what:**
- `sentry-fix-issues`: `fix_pr_opened` (with PR URL) when it opens a draft PR.
- `sentry-validate-fixes`: `fix_validated` or `reopened_regression`.
- (future `sentry-triage-issues`: `triaged_noise` / `prioritized` / `needs_review`.)

`sentry-issue-digest` does **not** emit or require markers (it reports Sentry state, not agent
actions). Reading markers in bulk is the future `sentry-agent-activity-digest`'s job.

**Open question (resolve at build):** does the Sentry MCP expose a comment create/read tool? If
not, the fallback chain above is the contract. `sentry-validate-fixes` must not depend on the
marker — see Part 3.

## Part 2 — sentry-issue-digest (category: workflow)

Read-only daily/weekly situational-awareness digest. **Zero writes — never calls `update_issue`.**

- **Config**: `ORG_SLUG` (req), `PROJECT_SLUG` (opt), `WINDOW` (default `24h`), `TOP_N`
(default `10`).
- **Preflight**: `find_projects`; abort cleanly into the digest on no access.
- **Sections** (each capped at `TOP_N`, ranked):
1. Top new issues in `WINDOW` (`firstSeen:-<WINDOW>`), by event frequency + users affected.
2. New regressions (recently reopened / regressed).
3. Biggest movers (escalating frequency).
4. Optional release-health (`find_releases`; crash-free rate if available — note it may not be).
- **Output**: fixed-schema digest sized for a single Slack thread post.
- **Hard rules**: never writes; bounded; parseable; non-interactive.

## Part 3 — sentry-validate-fixes (category: workflow)

Daily closing-the-loop check. MCP read-driven with at most **one bounded reversible write**
(reopen). Native Sentry signals are primary; the agent-activity marker is a precision enhancement.

- **Config**: `ORG_SLUG` (req), `PROJECT_SLUG` (opt), `MIN_EVENTS_TO_FAIL` (default `3`),
`MIN_SETTLE_DAYS` (default `2`, time a fix must age before "confirmed"), `--dry-run`, caps (50).
- **Preflight**: `find_projects`; abort cleanly.
- **Candidate discovery** (union, deduped):
1. Marker-based (preferred when available): issues carrying a `fix_pr_opened` marker.
2. Native fallback: `is:resolved` issues resolved in a release (resolve/release boundary
available from issue activity / `find_releases`).
- **Per candidate**: determine the fix/release boundary timestamp; count events after it via
`search_events` (`timestamp:>BOUNDARY`, pinned `statsPeriod`). Verdict:
- **fix-confirmed**: events-after `< MIN_EVENTS_TO_FAIL` AND boundary older than
`MIN_SETTLE_DAYS`. Optional `fix_validated` marker. No status change.
- **still-occurring-after-fix**: events-after `>= MIN_EVENTS_TO_FAIL`. High signal → reopen
(`update_issue` unresolved) + `reopened_regression` marker, unless `--dry-run`.
- **regressed-after-archive**: an `ignored` issue crossing back (new events) → flag; reopen only
on strong evidence.
- **pending**: boundary younger than `MIN_SETTLE_DAYS` → leave alone.
- **High-evidence default**: ambiguous → no action. Only reopen on clear failure.
- **Output**: fixed-schema digest with per-verdict sections (always present, even empty).
- **Hard rules**: never delete; never *close* (validation only reopens/flags); cap 50; `--dry-run`
checked at each write site; per-issue error → accumulate and continue; untrusted-data constraint.

## Registration (both new skills)

Frontmatter (`category: workflow`, `parent: sentry-workflow`, `disable-model-invocation: true`,
`allowed-tools`), breadcrumb, router routing-rule + table row in `sentry-workflow`, regenerate
`SKILL_TREE.md` via `scripts/build-skill-tree.sh`. Update `AGENTS.md` workflow table.

Also: small enrichment to `sentry-fix-issues` to **emit a `fix_pr_opened` marker** in Phase 7.

## Out of scope

- `sentry-triage-issues`, `sentry-agent-activity-digest`, `sentry-investigate-spike`.
- Slack/cron wiring (skills only; outputs are digest-shaped for a future routine).
- `sentry-pr-code-review` cron-hardening.

## Open questions

1. Sentry MCP comment create/read tool availability (drives marker durability mechanism).
2. Crash-free-session data availability for the optional release-health digest section.
3. Confirm `find_releases` / event-after-release query shape against the live MCP.
Loading
Loading