trellis-break-loop
できること
このスキルは、直したばかりのバグを振り返り、その原因と再発防止の方法を記録します。同じ種類のバグを繰り返し直しているエンジニア向けです。
使う場面
- ✓バグを直したばかりで、同じ種類のバグが戻らないようにしたいとき。
- ✓正しい修正に至るまでに、いくつかの修正が失敗したとき。
- ✓バグからの教訓を、プロジェクトのガイドラインに保存したいとき。
スキルのリンク
https://github.com/mindfold-ai/Trellis/blob/main/.agents/skills/trellis-break-loop/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“タイムスタンプのバグを直したところです。なぜ起きたかを分析して、再発しないように教訓を保存してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、バグを、仕様の欠如や暗黙の前提などのカテゴリーに分類し、以前の修正が失敗した理由を見直し、予防の手順を提案します。その後、教訓をプロジェクトの仕様ファイルに記録します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Break the Loop - Deep Bug Analysis
When debug is complete, use this for deep analysis to break the "fix bug -> forget -> repeat" cycle.
Analysis Framework
Analyze the bug you just fixed from these 5 dimensions:
1. Root Cause Category
Which category does this bug belong to?
| Category | Characteristics | Example |
|---|---|---|
| A. Missing Spec | No documentation on how to do it | New feature without checklist |
| B. Cross-Layer Contract | Interface between layers unclear | API returns different format than expected |
| C. Change Propagation Failure | Changed one place, missed others | Changed function signature, missed call sites |
| D. Test Coverage Gap | Unit test passes, integration fails | Works alone, breaks when combined |
| E. Implicit Assumption | Code relies on undocumented assumption | Timestamp seconds vs milliseconds |
2. Why Fixes Failed (if applicable)
If you tried multiple fixes before succeeding, analyze each failure:
- Surface Fix: Fixed symptom, not root cause
- Incomplete Scope: Found root cause, didn't cover all cases
- Tool Limitation: grep missed it, type check wasn't strict
- Mental Model: Kept looking in same layer, didn't think cross-layer
3. Prevention Mechanisms
What mechanisms would prevent this from happening again?
| Type | Description | Example |
|---|---|---|
| Documentation | Write it down so people know | Update thinking guide |
| Architecture | Make the error impossible structurally | Type-safe wrappers |
| Compile-time | Strict type checking, no escape hatches | Signature change causes compile error |
| Runtime | Monitoring, alerts, scans | Detect orphan entities |
| Test Coverage | E2E tests, integration tests | Verify full flow |
| Code Review | Checklist, PR template | "Did you check X?" |
4. Systematic Expansion
What broader problems does this bug reveal?
- Similar Issues: Where else might this problem exist?
- Design Flaw: Is there a fundamental architecture issue?
- Process Flaw: Is there a development process improvement?
- Knowledge Gap: Is the team missing some understanding?
5. Knowledge Capture
Solidify insights into the system:
- Update
.trellis/spec/guides/thinking guides - Update relevant
.trellis/spec/docs - Create issue record (if applicable)
- Create feature ticket for root fix
- Update check guidelines if needed
Output Format
Please output analysis in this format:
## Bug Analysis: [Short Description]
### 1. Root Cause Category
- **Category**: [A/B/C/D/E] - [Category Name]
- **Specific Cause**: [Detailed description]
### 2. Why Fixes Failed (if applicable)
1. [First attempt]: [Why it failed]
2. [Second attempt]: [Why it failed]
...
### 3. Prevention Mechanisms
| Priority | Mechanism | Specific Action | Status |
|----------|-----------|-----------------|--------|
| P0 | ... | ... | TODO/DONE |
### 4. Systematic Expansion
- **Similar Issues**: [List places with similar problems]
- **Design Improvement**: [Architecture-level suggestions]
- **Process Improvement**: [Development process suggestions]
### 5. Knowledge Capture
- [ ] [Documents to update / tickets to create]
Core Philosophy
The value of debugging is not in fixing the bug, but in making this class of bugs never happen again.
Three levels of insight:
- Tactical: How to fix THIS bug
- Strategic: How to prevent THIS CLASS of bugs
- Philosophical: How to expand thinking patterns
30 minutes of analysis saves 30 hours of future debugging.
Thinking Framework: Bayesian Reasoning
When multiple root causes are plausible and evidence is incomplete, update your beliefs proportionally to new evidence rather than clinging to initial assumptions.
Step 1: Establish Priors
Before investigating, state what you believe and why:
| Hypothesis | Prior | Reasoning |
|---|---|---|
| H1: [cause A] | 40% | Most common for this pattern |
| H2: [cause B] | 30% | Plausible given environment |
| H3: [other] | 30% | Catch-all |
Priors must sum to 100%. If you can't assign probabilities, investigate first.
Step 2: Observe Evidence
Document what you found — be specific about reliability:
- What exactly did you observe?
- How reliable? (test output > log message > user report > hunch)
- Could multiple hypotheses explain this?
Step 3: Updat
よくある質問
どんな種類の原因に分類しますか?
例えば、仕様の欠如、層どうしの不明確な契約、1か所での見落とし、テストの穴、暗黙の前提などです。
教訓はどこに保存されますか?
関連するプロジェクトの仕様ファイルに保存され、将来のセッションがそれを使えるようになります。
なぜ以前の修正が失敗した理由を見るのですか?
症状だけを扱った修正は、本当の原因がどこで見過ごされたかを示すからです。
詳細
作者による元の説明
Deep bug analysis to break the fix-forget-repeat cycle. Analyzes root cause category, why fixes failed, prevention mechanisms, and captures knowledge into specs. Use after fixing a bug to prevent the same class of bugs.
repo: mindfold-ai/Trellis
人気
- GitHubのスター
- 15k
- ランキング
- #11026
- ライセンス
- AGPL-3.0
- 更新日
- 2026/9/29
コメント
- …
このリポジトリの他のスキル
first-principles-thinking
15k計画や設計を基本的な真理に分解し、そこから積み上げて検討することで、慣習や習慣に頼らずに、それが本当に最良の方法かを確かめるよう、エージェントを手助けします。
python-design
15k明確なモジュール、単純なインターフェース、隠れた複雑さの少ないPythonのコマンドラインスクリプトを、エージェントが書きレビューするのを手助けします。
trellis-before-dev
15k書き始める前に、プロジェクトのコーディングのガイドラインとタスクのメモを読み、エージェントがチームの慣例に従うよう手助けします。
trellis-brainstorm
15k新しい機能や不明確なタスクを、一度に一つの有益な質問をし、コードを確認し、狭いスコープに合意することで、明確にする手助けをします。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。