diag-write
Diag Write
Turn a finished diagnosis into a vault entry that outlives the session. The vault is ~/ops — self-describing: template.md (note skeleton), labels.md (frontmatter schema + label table + new-label protocol), index.md (cluster index). This skill adds only the process; the vault holds the rules.
Step 1 — Gather the diagnosis
From the diagnosis run (or the user's account), collect: the symptom as the user stated it, the environment (nodes, cluster, component versions), the feedback-loop command with its red and green outputs, the ranked hypotheses and which one survived, the fix, and how it was verified. Every line the entry cites comes from this material.
Step 2 — Find or create the entry
Check for an existing entry on this issue — symptom keywords and component names, via rg or a listing scan, whatever reliably covers the vault:
rg -il '<keywords>' ~/ops/*.md
A hit that covers this issue means an earlier entry exists: update it in place — fill empty sections, refine labels and index — never fork a second trail. (Extraction and migration routes converge here: many sessions, or a session plus a legacy note, on one issue yield one entry.)
Otherwise create ~/ops/<title>.md from ~/ops/template.md (delete the template comments; they are the per-section filling guide — follow them while filling). Title = the symptom in one Chinese line, no prefix. Body in Chinese: terse prose around a full trail — 排查过程 is the experience being persisted, and it reads like the investigation unfolded: each observation with its evidence pasted as-is (command output, node annotations, log lines, screenshots — trim noise, never substance), the mechanism that observation earned (quote the actual source functions when the trail reaches code; a mermaid sketch when the call chain matters), every probe and the hypothesis it killed, and the repro harness in full when it took real work to build. source: diagnosis.