factory-triage

Investigate GitHub or Linear issues, diagnose root causes, and publish structured triage handoffs.

27.6k|2.7k|Updated Aug 6, 2024
One-click install
npx skills add https://github.com/mastra-ai/mastra --skill factory-triage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: factory-triage
Source: https://github.com/mastra-ai/mastra/tree/main/mastracode/factory/factory-skills/factory-triage
Command: npx skills add https://github.com/mastra-ai/mastra --skill factory-triage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually triaging incoming issues requires tracing code history, understanding architecture, and diagnosing root causes, which is slow and inconsistent across maintainers. This Skill automates the full investigation of a GitHub or Linear issue and produces a standardized triage verdict with severity, effort, and impact classifications.

Core Features & Use Cases

  • End-to-end issue investigation: Parses the issue reference, reads the full thread, searches related issues and PRs, and traces the symptom through the codebase using git history and blame.
  • Structured diagnosis and handoff: Produces a marker-prefixed comment with type, route, severity, confidence, effort, and impact, plus root-cause analysis, assumptions, open questions, and reproduction steps.
  • Label reconciliation and stage transition: Applies status, effort, impact, and @mastra/core labels on GitHub issues and requests the governed Factory work-item stage transition as the terminal step.
  • Use Case: A maintainer receives a vague bug report about agent memory in mastra-ai/mastra. The Skill traces the relevant code paths, reproduces the bug against the weather-agent repo, posts a triage comment classifying it as a high-severity regression, and advances the work item to Planning.

Quick Start

Triage the Factory work item for GitHub issue number 1234 and advance its stage.

Frequently Asked Questions about factory-triage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I triage a GitHub issue automatically?

Provide the issue number, URL, or Linear identifier as the argument. The Skill reads the full thread, searches related issues and PRs, traces the code history, then posts a structured triage comment and requests the appropriate stage transition.

How does automated issue triage determine root cause?

It searches the codebase for error messages and function names from the report, follows execution flow to the failure area, and uses git log and git blame to understand why the code exists. Competing hypotheses are resolved by evidence and recorded as assumptions.

Does this triage workflow support Linear issues?

Yes, Linear issues are fetched with linear_get_issue and investigated the same way as GitHub issues. GitHub-only steps like label mutations and marker comment publication are skipped for Linear.

What labels does GitHub issue triage apply?

It adds status: auto-triaged, removes status: needs triage, adds status: needs approval when the route requires maintainer approval, and sets exactly one effort and one impact label. Confirmed core bugs in mastra-ai/mastra also get the @mastra/core label.

Why does gh output break jq pipelines during triage?

gh output often contains ANSI color codes that break jq parsing. Use gh's built-in --jq flag instead of piping to jq, or prefix commands with NO_COLOR=1 to disable color output.

When does triage not advance an issue to planning?

Feature requests and non-bug classifications use Route: Await approval and stay in Intake or Triage until a maintainer acts. Items already in Planning or later stages are treated as refreshes with no stage transition requested.