Repository navigation
feat(skills): add prevent-recurrence to turn recurring mistakes into failing checks - #259
Merged
Merged
Conversation
…failing checks Adapted from pstack's `correct`: gather occurrences from git history, PR review comments, the PR bodies' Encodable findings, agent memory, and workaround notes; keep only classes seen at least twice; fix each at the highest level on the existing encodable scale; and prove every new check fails on a real past occurrence. The rule-to-enforcer table and the per-line expiry exceptions are left out. Red/green on this repo, same task, sonnet, isolated worktree: - without the skill: three rule files and a CLAUDE.md edit, no check, nothing shown failing, single occurrences counted, and a memory-gated change applied - with it: a profile-render test and a .chezmoiremove check, each red on the commits where the mistake happened (8754c10, 53ff735) and green on HEAD workflow.md's correction bullet now suggests the skill when memory already holds the same pattern, since an explicit-only skill is not visible otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
pstack の
correctを手元向けに直し、prevent-recurrenceスキルとして追加します。繰り返している誤りを種類ごとに洗い出し、その種類を型・lint/CI・テストなど強制できる最も高い段で防ぎます。新しいチェックについては、過去の実際の誤りで赤くなることを確かめるところまでを手順にします。#255〜#257 で、レビュアーが指摘に
encodableタグを付けるようにしました。このスキルは、溜まったタグをはじめとする記録を、実際のチェックに変える側です。変更内容
home/dot_claude/skills/prevent-recurrence/SKILL.md(新規): 明示的に呼んだときだけ動く(disable-model-invocation: true)encodableの尺度(architecture > type > lint > test > hook > rule)をそのまま使う。選んだ段より上を使えない理由を 1 行ずつ書くworkflow.md: ユーザーに直されたときに、同じパターンがすでにメモリにあれば/prevent-recurrenceを提案する、と既存の 1 行に足した。明示呼び出し専用のスキルは、呼ばれるまで読み込まれないためpstack から取り込まなかったもの: ルールと強制手段の対応表(手で同期する一覧になるため)と、行ごとの期限付き例外。
検証
このリポジトリで、同じ課題(「繰り返している誤りを見つけて、再発を防いで」)を、スキルなしとスキルありの 2 回、別エージェント(sonnet、使い捨ての worktree)に実行させました。
8754c10、53ff735)で赤、HEAD で緑赤と緑の結果は、エージェントの報告だけでなく、私の手でも再現しました。Green が作った 2 つのチェックは、別の PR で出します。
just fmt-checkは exit 0 です。🤖 Generated with Claude Code