audit-state-machines について
audit-state-machinesは、コードベースにある明示的・暗黙的なステートマシンの不具合を調べるスキルです。figure-outに指定範囲の調査と状態や確認済みの不具合の記録を指示し、結果をチケット化する提案も行います。
主な機能
- 01明示的・暗黙的なステートマシンを監査
- 02指定範囲またはリポジトリ全体を調査
- 03状態と書き込み箇所を記録
- 04確認済み不具合を影響度順に整理
- 05調査結果のチケット化を提案
活用シーン
- 01コードベースのライフサイクル関連不具合を監査
- 02書き込み箇所が分散した状態機械を特定
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ doodledood/ manifest-dev --skill audit-state-machinesインストール後、Claude Code で/audit-state-machinesを入力して読み込まれたか確認します。
README(原文)English
プロジェクトの README よりこの README の日本語訳はまだありません。以下は英語の原文です。日本語の紹介はページ上部をご覧ください。
Audit a codebase for state-machine bugs. A state machine is a value whose changes follow a lifecycle — a status, or flags whose combinations act as states — and ../review-code/references/code-bugs.md → State machines says how to find one, rebuild it, check it and confirm what the check finds. figure-out runs the audit with its whole investigation discipline; this skill adds the brief below and the offer at the end.
Invoke the figure-out skill with the brief below, the arguments given, --autonomous and --no-docs. --no-docs keeps figure-out's project-document writes out of the audited project; forward --no-log when given. With no path or area, the scope is the whole repository. With no codebase in reach, say so and stop.
Brief:
Audit [the scope] for state machines, implicit and explicit, following
../review-code/references/code-bugs.md→ State machines. Every bug you find counts, whether or not anything changed recently: this is an audit, not a review of a change. Machines written as instructions count too, checked as that section says.
- List every machine in the scope searched: what it tracks, explicit or implicit, its states, and its writers by file and line. Say which parts of the scope you searched and which you did not, with why. On a large repository, record each machine in your log, when one is kept, as you finish it.
- Rank confirmed bugs by consequence. For each, give each site by file and line, the sequence that reaches the bad state, and the model that found it — its saved path, or its scratch path when no log is kept. For a bug in an implicit machine, the fix is to make the machine explicit: one owner of its transitions, and a test or a type that fails when anything else writes the state.
- After the bugs, ranked lower: each implicit machine with no bug but writers in several files, with the recommendation to make it explicit. A machine whose writers are all in one function gets no recommendation.
- For a machine whose model found nothing, say what the model covered; never call the machine correct.
- Write no file in the audited project. Models and scripts stay outside it.
When figure-out returns its read, give the person the read and offer to turn the confirmed bugs and the make-explicit recommendations into Tickets — self-contained work items in the project's tracker or files — recorded as debt, the issues found and not yet fixed. On their yes, invoke the ticket-up skill with those findings. With no person to answer, as when another workflow runs this skill, list the offer in the result and invoke ticket-up only where that caller's assignment authorizes writing Tickets.