ss-log-mistake
GitHub用于记录开发缺陷并推动自动化修复。当发现重复错误时,将其加入错误账本,分析原因,并评估是否可通过 lint、hook 或测试实现机械化拦截,从而防止同类问题再次发生。
触发场景
安装
npx skills add Serial-Studio/Serial-Studio --skill ss-log-mistake -g -y
SKILL.md
Frontmatter
{
"name": "ss-log-mistake",
"description": "Append a row to Serial Studio's mistakes ledger (doc\/claude\/common-mistakes.md) for a defect just caught, and decide whether the class can be made mechanical. Use when asked to \"log this mistake\", \"add this to common-mistakes\", \"make sure this doesn't happen again\", or right after the maintainer corrects a repeated error. A row closes with `Codified:` naming the lint rule, anchor, hook, or test that now catches it, or `not yet`.",
"argument-hint": "[what went wrong]"
}
Serial Studio — /ss-log-mistake
Writing a mistake down is not the fix. The fix is the check that makes the class harder to
repeat; the row exists to say which check that is, or to admit there is none yet. Adapted from
the /log-mistake command and defect ledger in PrimeFoldTools/andon (MIT).
Procedure
-
Name the class before the row. One chat sentence: the symptom, why it was silent, and which family it belongs to. Claim exceeded evidence (said done, had not checked). Decision outran reality (acted on a stale map: an old handoff, a cached agent result, memory instead of the tree). Rule was a convention, not enforcement (a comment said "keep in lockstep"). Pressure replaced evidence (retracted a right answer when challenged). Naming the family is what lets you spot the next member before it lands (
doc/claude/j-space.md, verbalize-to-load). -
Check it is not already there. Grep
doc/claude/common-mistakes.mdand CLAUDE.md for the symbol, path, or phrase. The ledger never restates a CLAUDE.md rule: if the mistake is a plain rule violation, the row records only the silent-breakage mechanism the rule does not explain, and points at the rule. If a row already covers the class, sharpen that row instead of adding a near-duplicate. -
Pick the section by subsystem. Workflow and collaboration mistakes go under "Process & Trust"; the section list is the table of contents at the top of the file.
-
Write the row in the existing two-column shape.
- Mistake: the concrete wrong action, phrased so a reviewer would recognize it in a diff or a chat reply. Not "was careless": name the call, the file, the claim.
- Fix: the correct action, then the one-clause why it is silent (what the compiler, the
linter, or the reviewer cannot see). Dates and commit hashes when the row records a real
incident. End with
Codified:(step 5).
-
Ask the mechanical question, per tier. Could the class be caught by:
- a
scripts/code-verify.pyrule (a structural pattern in C++/QML/Python), - a
scripts/claim-verify.pyanchor inscripts/doc-anchors.json(a value quoted in two places that must agree), - a hook in
.claude/hooks/(a per-turn or per-tool-call behavior), scripts/layer-verify.pyorscripts/registry-verify.py(a dependency edge, a command or icon registration),- a ctest or pytest (a runtime property)?
If one fits, say which in chat and offer to build it as its own pass; the row lands now with
Codified: not yetand is updated when the check ships. Bundling the countermeasure into the same diff as whatever was being fixed is scope creep (trust contract, "stay in your lane"). If no tier fits, say why in one clause and leavenot yet: an honestnot yetis the queue the next hook comes from.scripts/ledger-verify.py --check(sanitize and CI) refuses a tree whose open-row count grew, so anot yetrow lands only by closing another row with a real check, or by--acceptafter the maintainer's deliberate decision. - a
-
Handoff. Quote the finished row in chat. Nothing else in the file changes.
Don't
- Add a row for a one-off typo or a mistake the linter already reports; the ledger is for silent breakage.
- Write "remember to" in the Fix column. If the fix is a reminder, it belongs in step 5 as a candidate hook, not in the row.
- Mark
Codified:with a check that does not exist in the tree yet.
版本历史
-
3cbdc24
当前 2026-11-03 11:14
新增 commit-shape gate 和 mistakes-ledger ratchet 机制,通过脚本限制提交范围并校验错误账本行数变化,同时引入 spec premise check 以强化前提验证。
- 44c9452 2026-09-22 22:28


