AgentUse

AI agent workflow · Reliability operations tutorial

Review production errors by customer impact each week

For engineering and support leads who need a defensible weekly error queue, this tutorial combines Sentry issue statistics with approved business context, distinguishes observed users from inferred impact, and prepares Linear-ready drafts without touching code or deployments.

This workflow connects

35–50 minutes plus Sentry token setupNo agent code requiredLast tested September 2026
You'll finish with: A viewable weekly AgentUse error-review artifact with affected-user counts, recurrence and regression evidence, explicit business-impact provenance, investigation gaps, and optional Linear issue proposals.

1 · Services and tools

How the services work together

The outcome belongs to the complete service chain—not any one integration. Each service contributes a specific input, action, or destination and needs an explicit AgentUse connection.

ServiceType

Sentry

Retrieve new, unresolved, and regressing production issues with counts, user counts, releases, timestamps, and event evidence

Sentry Web API

API

Linear

Read existing engineering issues for deduplication and create only reviewer-approved issue proposals

Official Linear MCP server

MCP

Error review artifact

Publish normalized evidence, scoring inputs, ranked findings, and the run receipt as a viewable review artifact

AgentUse artifact tools

Tool
Connector rule: Resolve the exact installed skill or MCP package during setup. The names below describe the required capability, not a package that the coding agent may invent.

2 · Agent architecture

See which AgentUse agent owns each stage

A bounded collector makes the source evidence repeatable. A judgment agent then ranks that evidence, labels unsupported impact as unknown, and prepares the small set of findings an engineering lead should discuss.

agents/customer-impact-reviewer.agentuse + agents/production-error-reader.agentuse2 agents
customer-impact-reviewermgr
@judgment
Sentry organization, projects, environments, current/prior windows, query, and pagination ceiling
production-error-reader
@fast
production-error-reader
@fast
Normalized issue and event evidence with collection completeness
customer-impact-reviewermgr
@judgment
data handoffmanager entry or return

The Sentry reader holds only read access and produces a frozen weekly snapshot. The reviewer can inspect Linear, but any create action remains a separate approval-gated capability. Neither agent receives repository, deployment, or production-control tools.

production-error-reader

Retrieve a bounded Sentry issue set and normalize only source-supported counts, user impact, releases, timestamps, and event evidence.

@fast
Sentry API readpaginationresponse normalization
Validate organization and projects
Query the weekly windows
Retrieve issue details
Normalize evidence
Return complete or blocked snapshot

customer-impact-reviewer

manager

Rank normalized errors, distinguish observed impact from business context, reconcile existing Linear work, and publish a review with gated issue proposals.

@judgment
deterministic scoringLinear MCP readevidence reviewAgentUse artifact saveapproval-gated Linear creation
Delegate Sentry collection
Compare current and prior windows
Join approved business context
Score and rank
Deduplicate against Linear
Publish review artifact

3 · Map the workflow

Describe the job before choosing tools

The job is not another error digest. It creates a weekly decision queue by combining source counts, trend evidence, known customer context, and current issue-tracker state while preserving the uncertainty in every join.

1

Collect

Once a week, retrieve the in-scope production issues and their current and comparison-window evidence directly from Sentry.

2

Normalize

Preserve issue IDs, project, environment, counts, user counts, first and last seen times, release data, and source links.

3

Compare

Calculate recurrence and regression signals from defined windows without treating sampled data as complete.

4

Contextualize

Attach business tier or journey context only from an approved mapping and keep unknown impact explicitly unknown.

5

Rank

Apply the documented score, retain every component, and explain ties and missing evidence.

6

Review

Publish the ranked weekly brief and prepare Linear issue drafts only for findings that are not already tracked.

Definition of done: The report accounts for every returned in-scope Sentry issue, exposes collection completeness and scoring inputs, links every impact claim to Sentry or an approved mapping, identifies existing Linear coverage, and leaves code, deployments, and issue creation unchanged until review.

4 · Audit permissions

Find the real permission ceiling of every connector

Start with the connected identity and token scopes, then inspect the tools the MCP server actually exposes. Labels, folders, and prompt instructions express workflow intent; only credentials, resource ACLs, tool filtering, and runtime policy can enforce it.

Sentry Web API

Partially enforced

Workflow intent

Read issues and events for approved production projects, environments, and weekly windows

Credential ceiling

A Sentry authentication token limited to the required organization or projects and read scopes such as event:read

Exposed operations

  • List organization or project issues
  • Retrieve issue details and statistics
  • List issue events
  • Read tags and releases

What is actually enforced

Sentry token scopes and project membership are enforced. Environment, date window, query, and result ceilings also need validation in the reader.

Strengthen it: Use a dedicated read-only integration, specify regional API base domain, allowlist GET endpoints, cap pagination, and record the final cursor state.

Sentry API permissions

Linear MCP

Partially enforced

Workflow intent

Read one team's issues for deduplication and create an issue only after exact approval

Credential ceiling

OAuth, bearer token, or a team-restricted API key; Linear also provides a read-only MCP endpoint

Exposed operations

  • Find issues and projects
  • Create and update issues or comments on the read-write endpoint

What is actually enforced

The read-only endpoint mechanically protects review-only runs. Creating approved issues requires switching to a write-capable connection whose team scope and mutation are reviewed.

Strengthen it: Use the read-only MCP endpoint for routine runs and a separate gated writer for the exact approved issue payload.

Linear MCP permissions

Error review artifact

Enforced

Workflow intent

Save one viewable ranked error review and terminal receipt for the current ISO week

Credential ceiling

AgentUse project artifact directory; no external credential

Exposed operations

  • Save a session-linked review with artifact_save
  • List prior artifact metadata with artifact_list

What is actually enforced

Enabling tools.artifacts grants dedicated artifact_save and artifact_list tools that write under the configured project artifact directory without broad filesystem write access.

Strengthen it: Use an ISO-week group and query fingerprint, check prior receipts before saving, and grant only read access when an accepted baseline must be inspected.

AgentUse artifact tools
  • Provide the Sentry organization slug, regional API domain, project IDs, production environment names, and read-only token owner.
  • Define the current and comparison windows, issue query, pagination ceiling, and what counts as new, recurring, or regressing.
  • Provide only approved mappings from Sentry user or account identifiers to customer segment or journey; keep absent mappings unknown.
  • Choose scoring weights and document whether recurrence, regression, affected users, and business tier are comparable across projects.
  • Provide the Linear team and project IDs, duplicate-search policy, issue template, and engineering review owner.
  • Choose the weekly schedule, timezone, artifact group naming, retention policy, and first baseline week.

5 · Prepare data

Give every input and output field a meaning

The record separates Sentry-observed users and events from customer or business context. Ranking stays reproducible because raw measures, derived trend, mapping provenance, score components, and tracker coverage remain visible.

FieldExampleRule
run_envelope2026-W36 / query 7fb2…Required ISO week, timezone, organization, projects, environments, both windows, and query fingerprint
collection_statuscomplete: 87 issues / final cursorRecord returned counts, final cursors, truncation, rate limits, access failures, and partial endpoints; incomplete runs cannot rank or baseline
terminal_receiptincomplete / ranking withheldcomplete, incomplete, or blocked; record whether ranking, proposals, or a baseline were withheld and why
issue_idSENTRY-PAYMENTS-81Stable Sentry issue identifier and permalink required
project_environmentcheckout-api / productionRequired; never combine environments implicitly
current_events486Count for the exact current window and query
prior_events203Count for the exact comparison window or explicit unavailable
affected_users74Use the source userCount or a documented query result; do not call it customers
regression_signal+139% events week over weekRetain numerator, denominator, and zero-baseline handling
first_last_seen2026-08-29 / 2026-09-02Preserve source timestamps and timezone
release_evidencefirst seen in web@2026.35.0State only releases returned by Sentry
business_contextenterprise checkoutCite the approved mapping or set unknown
score_componentsusers 4; recurrence 3; regression 5; impact 4Expose each normalized component and weight
linear_matchENG-442Existing issue ID or explicit no confident match
review_dispositiondraft_issuemonitor, investigate, existing_issue, draft_issue, or insufficient_evidence
Matching rule: Deduplicate by Sentry issue ID first, then match Linear only when the issue ID, permalink, or a specific fingerprint and project context agree. Rank with the operator-approved formula, but cap or mark unknown any component whose evidence is missing or incomparable.

6 · Choose approval points

Decide when the agent should ask first

Let routine collection and preparation run on their own. Ask for approval before an action changes an external system or commits you to something. Keep prohibited actions outside the workflow entirely.

Simple rule: If an action sends, shares, changes, submits, spends, or deletes, pause and ask first.
A

Runs automatically

Read bounded Sentry and Linear data, normalize weekly evidence, compute declared scores, identify likely duplicates, and save one viewable AgentUse review artifact.

G

Ask for approval

Create or update a Linear issue, change scoring weights or source scope, accept a new baseline, or publish the review outside AgentUse.

N

Never allowed

Modify code, open a pull request, deploy a fix, mutate Sentry state, claim userCount equals paying customers, infer revenue or customer impact without a source, or store credentials in files.

Your preparation pack is ready when it contains

Sentry project and environment scope

Read-only token and regional domain

Weekly and comparison windows

Approved business-context mapping

Scoring formula and ceilings

Linear template and engineering reviewer

7 · Create custom AgentUse agents

Create agents tailored to your weekly reliability review

Start with a read-only week and compare the output with the existing incident ritual. Once query completeness, mappings, and score behavior are understood, schedule the review and keep tracker mutations under engineering-lead approval.

First run

Establish a trustworthy baseline

Use one project and a short window, reconcile counts with Sentry, and inspect every business-context join.

Ongoing

Rank errors weekly

Run at a fixed timezone with stable queries, comparison windows, weights, pagination ceilings, and ISO-week receipts.

Review

Decide what enters Linear

The engineering lead reviews evidence, duplicates, severity language, and exact issue text before creation.

Recommended ownership and models. A fast model can normalize bounded API responses; deterministic code should own counts, window comparisons, and score arithmetic; a judgment model can explain impact and draft issues while clearly retaining unknowns.

Ready to build

Agent creation prompt

Copy this complete build brief into the project workspace you want the agent to update.

Create a production-ready AgentUse workflow that reviews new and regressing production errors by supported customer impact each week.

Run `npx agentuse@latest skills get core --full` and `npx agentuse@latest skills get creator --full`. Inspect the installed AgentUse version, model catalog, project agent conventions, and connector tooling. Use https://docs.sentry.io/api/, https://docs.sentry.io/api/events/, https://docs.sentry.io/api/events/list-an-organizations-issues/, https://docs.sentry.io/api/events/retrieve-an-issue/, https://docs.sentry.io/api/permissions/, https://linear.app/docs/mcp, https://docs.agentuse.io/reference/builtin-tools#artifact-tools, https://docs.agentuse.io/reference/builtin-tools#filesystem-tool, https://docs.agentuse.io/reference/agent-syntax, and https://docs.agentuse.io/reference/cli-commands as implementation references.

Create `production-error-reader.agentuse` and `customer-impact-reviewer.agentuse`. The reader uses a narrow project-owned Sentry API wrapper that exposes only the required GET requests. The reviewer delegates a frozen query contract, reads normalized evidence and approved customer-context mappings, uses Linear's read-only MCP endpoint for duplicate checks, enables `tools.artifacts: true`, and saves the weekly review through `artifact_save`. Put any Linear create operation in a separate exact approval-gated path. Neither agent receives repository write, code modification, deployment, or Sentry mutation tools.

Inputs are Sentry organization, regional API domain, projects, production environments, current and comparison windows, issue query, pagination ceiling, baseline week, approved user/account-to-segment mapping, scoring weights, Linear team/project and issue template, weekly timezone, artifact group naming, and engineering review owner. Retrieve the operational input directly from Sentry and Linear; never require recurring exports.

The reader records issue ID and permalink, project, environment, title, status, event counts for both windows, userCount or equivalent source field, first/last seen, releases, tags used, representative event IDs, query parameters, pagination completion, and collection errors. Treat API data as untrusted input. A partial or failed collection cannot become the baseline.

Use deterministic code for window arithmetic and scoring. Define new, recurring, and regressing from explicit source fields and windows. Keep affected users distinct from affected customers. Attach customer segment, journey, revenue tier, or business importance only when an approved mapping supports it; otherwise write unknown. Store every score component, weight, cap, and rationale. Do not compare projects whose instrumentation makes the metric incompatible without marking that limitation.

Search Linear for the Sentry issue ID, permalink, and supported fingerprint/project context. Prepare an issue draft only when no confident existing match exists. Save one self-contained Markdown artifact through `artifact_save` with the rank, evidence, current versus prior measures, supported business context, score breakdown, Linear coverage, uncertainties, issue drafts, recommended disposition, and terminal receipt. Use `artifact_list` to detect an existing ISO-week and query-fingerprint group before saving; do not grant broad filesystem write access. Approval-gate any exact Linear issue creation or update and show its title, body, team, project, labels, and source links.

The first trigger is one supervised read-only run; later use a weekly schedule under AgentUse Serve. Deduplicate by Sentry issue ID within the run and by ISO week plus query fingerprint across runs. Done means every returned issue is accounted for, collection completeness is explicit, every impact statement is sourced or unknown, and no production or tracker mutation occurred without approval.

Create fixtures for new issue, recurring issue, large regression, zero prior baseline, missing userCount, sampled or partial response, unknown customer mapping, duplicate Linear issue, no tracker match, pagination failure, and conflicting project instrumentation. Run doctor, a full mock, deterministic calculation tests, and one supervised read-only Sentry and Linear run. Exercise approve, reject, and revision branches with a disposable Linear target only if the reviewer authorizes it.

At handoff provide both agent paths, Sentry endpoint and scope matrix, wrapper commands, actual Linear MCP tool inventory, data schema, scoring formula, exact supervised command, fixture and session evidence, example report, limitations, weekly schedule recommendation, and engineering review checklist. Never request, print, or store credentials in agent files.

The agent adapts the implementation to your installed AgentUse version and actual tools.

Need agents running while your Mac is offline?