agentleFS
mhmtsrfglumhmtsrfglu/superwiki/skills/sw-triage/SKILL.md

sw-triage

Skill4 starsChanged 57 days agoMITView on GitHub

Use when the user reports a bug, failure, error, regression, incident or unexpected behavior in a Superwiki project and wants to know whether it happened before, what was learned, or what the likely causes are, or invokes sw-triage or sw:triage.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run commands from the project root.

    line 10

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

sw-triage

Answers "have we seen this before, and what does the brain say about it?" before anyone starts debugging. It searches the vault with a script, reads only the best matches, and reports. It does not fix anything and does not change files unless the user accepts an offer at the end.

Run commands from the project root.

Steps

  1. State the problem in one line: the symptom, where it shows, since when. If the user gave no symptom, ask for it. If "since when" is missing, go on and say in the report that recent changes cannot be matched to the problem's start.
  2. Search the brain, two or three times with different words: the error text or code, the component or feature name, the symptom in plain words. Search in the language the vault is written in (look at the lines of docs/index.md), whatever language the user wrote in; translate their words.

    node docs/.sw/sw.mjs search <three to six distinctive words>

    Each result has the page's type and summary and the first matching line; matching log entries follow, with their first line. A page is listed when any word matches, best match first, so the tail of the list is often noise.

  3. Look at what changed recently: tail -40 docs/log.md and node docs/.sw/sw.mjs ready (the "in progress" part). Work finished or under way in the same area just before the problem appeared is a suspect.
  4. Read at most four files, plans included, in this order of preference: lesson pages, decision pages, tasks that touched the same area (done or in progress), then the rest. Read a task's plan only if steps 2 and 3 point at that task as the cause.
  5. Report in the user's language, under these headings. Give the source of each claim: a page as [[page]], a log entry as "log, <date>".
    • Seen before: earlier occurrences, what the cause was, how it was fixed. If no page records this problem, say plainly that the brain has no record of it; do not stretch a weak match. If a recorded fix exists and the problem is back, say so: it is a regression.
    • Lessons that apply: rules or warnings from lesson and decision pages that bear on this problem.
    • Likely causes: ranked, each with the evidence for it and one concrete check that would confirm or rule it out. Where the brain records no cause, these are hypotheses drawn from what the pages say about the area: label them as hypotheses.
    • Recent changes in the area: tasks and log entries from step 3.
    • Gaps: what the brain does not cover and would have helped.
  6. Offer, and act only on a yes to that offer:
    • a task for the fix. Say which area you would file it under and let the user correct it; then the id comes from node docs/.sw/sw.mjs next-id <AREA>, the file from docs/.sw/templates/task.md, with the related pages under "Sources" and the confirming check as the first "Done when" item;
    • running the top check now, if it is one you can run from this session (a command, a test, reading code). Otherwise say who can run it and what to look for.

After the problem is solved

When the cause is known and fixed (in this session or a later one), offer to save a lesson: docs/wiki/<slug>.md with type: lesson, a one-line summary: that names the symptom, and the sections Symptom, Cause, Fix, How to notice it earlier; linked from the task that fixed it and listed in index.md. This page is what the next triage finds.

Common mistakes

  • Reading code or reproducing the bug before searching. Triage is the lookup; debugging comes after, with the report in hand.
  • Opening every search result. Summaries and matching lines decide which four are worth reading.
  • Presenting a guess as history. "Seen before" is only for what a page actually records.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.