---
name: issue-triage
description: >-
  Decide what happens to an incoming piece of work before anyone writes code: implement it now, write a spec first, close it as a duplicate, ask the reporter for the specific missing facts, or decline it. Use when a new issue, bug report, feature request, Slack message, or failed monitor check arrives, when asked to "triage", "label", or "sort" issues, or before starting any task whose size and clarity nobody has judged yet.
license: MIT
compatibility: >
  Works in any harness. Reading and labeling GitHub issues needs an authenticated gh CLI; without it, triage a pasted report and print the decision. Uses run-ledger and agent-memory when the repo has .factory/.
metadata:
  author: software-factory
  version: "1.1"
allowed-tools: Bash(gh issue *) Bash(gh search *) Bash(gh label *) Bash(node:*) Bash(git:*)
title: issue-triage
canonical_url: https://skilld.dev/gh/aditya-deokar/software-factory/issue-triage
last_updated: 2026-10-30T17:45:51.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install aditya-deokar/software-factory/issue-triage`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/issue-triage`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/aditya-deokar/software-factory/issue-triage) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/issue-triage`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/issue-triage --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/issue-triage --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Issue triage

Triage is the cheapest place in the factory to prevent waste. A vague issue
sent straight to implementation comes back as the wrong PR. An easy issue
sent through a spec costs a day it did not need. A duplicate solved twice
costs both. Read enough to classify, then stop. Triage does not fix.

Default tier: `fast` (see `model-routing`). Triage is pattern matching, and it
runs on every issue.

## Output: exactly one decision

| Decision | When | What you do |
|---|---|---|
| `implement` | Small, unambiguous, and you can name the acceptance check in one sentence | Label `factory:implement`, go to Aim (`ambition-engine`), then Isolate |
| `spec` | Ambiguous, cross-cutting, product-visible, a migration, or more than one reasonable design | Label `factory:spec`, set the aim (`ambition-engine`), then hand to `spec-writing` |
| `duplicate` | Same root cause as an open or recently closed issue | Link it, label `factory:duplicate`, close with a pointer |
| `needs-info` | You cannot reproduce or classify it without facts only the reporter has | Ask for those exact facts, label `factory:needs-info` |
| `decline` | Out of scope, working as intended, or not worth the cost | Say why in one or two sentences, label `factory:decline` |

If two decisions seem to fit, pick the more conservative: `spec` over
`implement`, `needs-info` over guessing.

Triage judges the work as reported. The aim beat that follows may raise the
target, and when the rung it picks outgrows `implement`, it re-routes the
task to `spec`. Triage does not try to guess the ambitious version itself.

## Procedure

1. **Read the whole report,** including comments, linked logs, and
   screenshots. The deciding fact is often in comment four.
2. **Check memory and history before judging.** Search `agent-memory`
   (`memory.mjs search <key terms>`) for a known root cause, then search
   issues, including closed ones:
   ```bash
   gh search issues --repo <owner>/<repo> "<distinctive error text>" --state all --limit 10
   gh issue list --state closed --search "<key terms> in:title,body" --limit 10
   ```
   Use the error message, stack frame, or component name, not the reporter's
   wording. Two people describe the same bug differently. They paste the
   same error.
3. **Try to reproduce, but only if it is cheap.** One command, one page
   load, or one test. If reproduction needs setup the issue does not
   describe, that is a `needs-info` signal, not a reason to spend an hour.
4. **Classify** with the table above and the size rules from `run-ledger`
   (`small`, `medium`, `large`). Anything `large` is `spec`.
5. **Act on the issue** (below) and record the run.

## Asking for information

A generic "can you share more details?" costs a round trip and usually
returns nothing useful. Ask for the specific facts that would decide it, and
say why each one matters:

```markdown
Thanks for the report. Two things would let us reproduce this:

1. The exact command you ran and its full output. The error in the title
   comes from two different code paths, and the output shows which.
2. Your OS and Node version (`node --version`). Windows fails this step
   differently.
```

Ask at most three questions. If you need more than three, the issue needs a
conversation, and a human should have it.

## Acting on GitHub

Create the labels once if they are missing:

```bash
for l in implement spec duplicate needs-info decline regression skill-loop; do
  gh label create "factory:$l" --color BFD4F2 2>/dev/null || true
done
```

Then apply the decision:

```bash
gh issue edit <n> --add-label factory:implement
gh issue comment <n> --body "Triage: implement. <one-sentence reason>. Acceptance check: <what proves it fixed>."
gh issue close <n> --reason "not planned" --comment "Duplicate of #<m>: <one line on why they are the same>."
```

The comment always gives the reason in one sentence. A label with no reason
cannot be challenged, and a wrong triage that cannot be challenged sticks.

## Recording it

If the repo has `.factory/`:

```bash
node "$LEDGER" start --class triage --size small --source github:issue/<n> --title "triage #<n>"
node "$LEDGER" beat current triage --set decision=duplicate --set duplicate_of=github:issue/<m>
node "$LEDGER" finish current --outcome closed
```

When the decision is `implement` and you are also doing the work, start one
run with the real class (`bugfix`, `feature`) instead, record the triage beat
on it, and carry on. `$LEDGER` is resolved as shown in `run-ledger`.

If memory helped (a known root cause, a known duplicate), mark it used:
`memory.mjs use <name>`. That count decides what graduates into a skill.

## Do not do these

- **Do not start fixing during triage.** If it is easy, say `implement` and
  then do it as its own task, through the normal beats.
- **Do not decline to avoid work.** Declining needs a reason the reporter
  would accept, even if they disagree with it.
- **Do not close a duplicate without the link.** "Duplicate" with no pointer
  reads as dismissal.
- **Do not triage your own monitor's regression as `decline`.** A regression
  from a merged factory PR is always `implement` or `spec`.
