auto-bug
Skill9 starsChanged 3 months agoMITView on GitHub
bug の自律修正ループ。bug-investigate → bug-propose → bug-fix → テスト → basic-review → deep-review → PR → ai-merged-unreviewed ラベル → task→sprint 自律マージ までを1コマンドで完結。Inner Loop の親スキル。
- Commits and pushes
In this repository57 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-engineerSkill
- agent-browserSkill
- animation-principlesSkill
- architecture-expertSkill
- art-directionSkill
- auto-buildSkill
- auto-designSkill
- auto-taskSkill
- basic-reviewSkill
- biz-researcherSkill
- bug-fixSkill
- bug-investigateSkill
- bug-newSkill
- bug-proposeSkill
- build-context-siteSkill
- creative-coderSkill
- deep-reviewSkill
- design-assembleSkill
- design-componentsSkill
- design-critiqueSkill
- design-htmlSkill
- design-mockSkill
- design-ssotSkill
- design-uiSkill
- developer-specialistSkill
- docs-reverseSkill
- experience-planSkill
- frontend-implementationSkill
- image-prepSkill
- judgment-harnessSkill
- keyboard-shortcutsSkill
- manual-genSkill
- manual-guideSkill
- official-source-firstSkill
- pairSkill
- persona-designerSkill
- project-design-languageSkill
- project-initSkill
- proposition-reviewerSkill
- proto-loopSkill
- proto-mediumSkill
- pr-respondSkill
- repo-tourSkill
- security-expertSkill
- sensory-designSkill
- session-endSkill
- session-startSkill
- setupSkill
- task-detailSkill
- task-listSkill
- task-runSkill
- template-feedbackSkill
- template-inboxSkill
- testingSkill
- ui-designerSkill
- usability-psychologistSkill
The file
Files
[ループ] 自律バグ修正 /auto-bug
Loop Engineering の Inner Loop 親スキル(bug 専用)。既存スキル(bug-investigate / bug-propose / bug-fix / basic-review / deep-review)を連鎖呼び出しして 1 bug を自律で完了まで運ぶ。
設計根拠:
meta/adr-lite.mdの ADR-008 / ADR-009 / ADR-010関連:
/auto-taskは task 実行中に bug 検知すると bug-* 連鎖を内部発動する(こちらは bug 単独処理の入口)
入力: $ARGUMENTS
- Issue番号(例:
#123または123) - 省略時: ラベル
bugがついた Issue から選択
🎯 目的
- bug の 調査〜修正〜マージまで自律で走らせる
- 修正案が複数ある場合は 提案 → 効果検証 → 採用 の流れで進める
- 効果なしならロールバックして次案へ
- 中断時は
history/loop-state.mdに記録
前提(必ず確認)
- 対象 Issue に
bugラベルが付いているか、または bug-new で起票済みであること feature_fix/*ブランチで動く(.claude/rules/git.md参照)- 課金が発生しうる操作は事前にユーザー確認(
/auto-taskと同じ方針)
実行手順
0. ループ状態ファイルの初期化
history/loop-state.md を以下で開始:
## YYYY-MM-DD HH:MM /auto-bug #<issue-number>
- branch: <現在ブランチ>
- status: in_progress
- steps:
- [ ] bug-investigate
- [ ] bug-propose
- [ ] bug-fix (恒久対応・効果検証)
- [ ] local-checks (lint/typecheck/test)
- [ ] basic-review
- [ ] deep-review
- [ ] pr-create
- [ ] label-attach
- [ ] auto-merge
- last_action: ループ開始各ステップ完了時に [x] 更新と last_action 書き換え。
1. 調査(bug-investigate)
bug-investigateの手順に従って原因を絞り込む- 仮説と再現手順を Issue コメントに追記
2. 修正案列挙(bug-propose)
bug-proposeの手順で修正策を列挙し、Issue コメントに追記- 恒久対応のみ(暫定対応はスキップまたは恒久案に置換)
3. 修正実行+効果検証(bug-fix)
bug-fixの手順で修正案の上から順に実施- 各修正後にローカル lint / typecheck / test で効果検証
- 効果なし: 修正前へロールバック → 次案へ
- 効果あり: 確定してステップ4へ
- 全案を試して直らない場合:
history/loop-state.mdにstatus: blocked_by_bugを記録- 試行内容と新たな仮説をユーザーへ報告して終了
4. ローカル検証(最終確認)
npm run lint
npm run typecheck
npm testすべて通ることを確認。失敗したらステップ3に戻る(最大3周)。
5. basic-review 反復
/auto-task のステップ4と同じ手順(致命指摘0まで、最大5周)。
6. deep-review 反復
/auto-task のステップ5と同じ手順(全指摘0まで、最大3周)。
7. PR 作成
gh pr createで 適切なブランチ → sprint/* の PR を作成- スプリント統合後に見つかった bug →
feature_fix/* → sprint/* - task 実装中に派生した bug →
task/* → sprint/* - 判断基準は
.claude/rules/git.md参照
- スプリント統合後に見つかった bug →
- 本文には:
- Closes #
<issue-number> - 採用した修正案(複数試した場合は経緯)
- 試した順序と効果の有無
- ローカル検証結果
- Closes #
- target ブランチは適切な sprint ブランチ
8. ラベル付与・自律マージ
/auto-task のステップ7-8と同じ:
ai-merged-unreviewedラベルを付与feature_fix/* → sprint/*をgh pr merge --squash --delete-branch- sprint → main は絶対に自律マージしない
課金前停止ポイント
/auto-task と同じ(新規パッケージ・リモートデプロイ・有料外部 API・有料 CI)。
中断・再開
/auto-task と同じ仕組み。history/loop-state.md の last_action から再開判定。
やってはいけない
bugIssue として起票されていない問題に対していきなり/auto-bugを起動- その場合は先に
bug-newで起票
- その場合は先に
- 修正案を試さずにいきなり「直らない」と諦める
- 効果検証なしで複数案を同時にコミット
- ロールバックせず無関係な修正を積み上げる
- sprint → main の自律マージ
/auto-task との関係
/auto-taskは task 実装中に bug を検知したら bug-* スキル連鎖を内部発動する(コマンドとしての/auto-bugは呼ばない)/auto-bugは bug が分かっている状態で人間が単独起動する入口- どちらも同じ既存スキル群(bug-investigate / bug-propose / bug-fix / review 系)を呼ぶ → 動作はほぼ同じ
自己評価
- 成功自信度: (1-10)
- 一言理由: {何案目で直ったか、ロールバックの回数、レビュー反復回数を踏まえて記載}
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
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.

