Agent Skillsmindfold-ai/Trellis › trellis-break-loop

trellis-break-loop

GitHub

用于修复bug后的深度复盘,从根因、失败原因、预防机制等维度分析,防止同类问题重复发生。

.omp/skills/trellis-break-loop/SKILL.md mindfold-ai/Trellis

触发场景

完成bug修复后 需要预防同类bug再次出现

安装

npx skills add mindfold-ai/Trellis --skill trellis-break-loop -g -y
更多选项

非标准路径

npx skills add https://github.com/mindfold-ai/Trellis/tree/main/.omp/skills/trellis-break-loop -g -y

不安装直接使用

npx skills use mindfold-ai/Trellis@trellis-break-loop

指定 Agent (Claude Code)

npx skills add mindfold-ai/Trellis --skill trellis-break-loop -a claude-code -g -y

安装 repo 全部 skill

npx skills add mindfold-ai/Trellis --all -g -y

预览 repo 内 skill

npx skills add mindfold-ai/Trellis --list

SKILL.md

Frontmatter
{
    "name": "trellis-break-loop",
    "description": "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."
}

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:

  1. Tactical: How to fix THIS bug
  2. Strategic: How to prevent THIS CLASS of bugs
  3. Philosophical: How to expand thinking patterns

30 minutes of analysis saves 30 hours of future debugging.


After Analysis: Immediate Actions

IMPORTANT: After completing the analysis above, you MUST immediately:

  1. Update spec/guides - Don't just list TODOs, actually update the relevant files:

    • If it's a cross-platform issue → update cross-platform-thinking-guide.md
    • If it's a cross-layer issue → update cross-layer-thinking-guide.md
    • If it's a code reuse issue → update code-reuse-thinking-guide.md
    • If it's domain-specific → update backend/*.md or frontend/*.md
  2. Sync templates - After updating .trellis/spec/, sync to src/templates/markdown/spec/

  3. Commit the spec updates - This is the primary output, not just the analysis text

The analysis is worthless if it stays in chat. The value is in the updated specs.

版本历史

  • 0e0f1f6 当前 2026-08-20 08:10

同 Skill 集合

.agents/skills/python-design/SKILL.md
.agents/skills/trellis-before-dev/SKILL.md
.agents/skills/trellis-brainstorm/SKILL.md
.agents/skills/trellis-break-loop/SKILL.md
.agents/skills/trellis-channel/SKILL.md
.agents/skills/trellis-check/SKILL.md
.agents/skills/trellis-continue/SKILL.md
.agents/skills/trellis-finish-work/SKILL.md
.agents/skills/trellis-spec-bootstrap/SKILL.md
.agents/skills/trellis-start/SKILL.md
.agents/skills/trellis-update-spec/SKILL.md
.claude/skills/gitnexus/gitnexus-cli/SKILL.md
.claude/skills/gitnexus/gitnexus-debugging/SKILL.md
.claude/skills/gitnexus/gitnexus-exploring/SKILL.md
.claude/skills/gitnexus/gitnexus-guide/SKILL.md
.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md
.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md
.claude/skills/python-design/SKILL.md
.claude/skills/trellis-before-dev/SKILL.md
.claude/skills/trellis-brainstorm/SKILL.md
.claude/skills/trellis-break-loop/SKILL.md
.claude/skills/trellis-channel/SKILL.md
.claude/skills/trellis-check/SKILL.md
.claude/skills/trellis-spec-bootstrap/SKILL.md
.claude/skills/trellis-update-spec/SKILL.md
.codex/skills/create-manifest/SKILL.md
.cursor/skills/trellis-before-dev/SKILL.md
.cursor/skills/trellis-brainstorm/SKILL.md
.cursor/skills/trellis-break-loop/SKILL.md
.cursor/skills/trellis-channel/SKILL.md
.cursor/skills/trellis-check/SKILL.md
.cursor/skills/trellis-spec-bootstrap/SKILL.md
.cursor/skills/trellis-update-spec/SKILL.md
.omp/skills/trellis-before-dev/SKILL.md
.omp/skills/trellis-brainstorm/SKILL.md
.omp/skills/trellis-check/SKILL.md
.omp/skills/trellis-spec-bootstrap/SKILL.md
.omp/skills/trellis-update-spec/SKILL.md
.opencode/skills/trellis-before-dev/SKILL.md
.opencode/skills/trellis-brainstorm/SKILL.md
.opencode/skills/trellis-break-loop/SKILL.md
.opencode/skills/trellis-channel/SKILL.md
.opencode/skills/trellis-check/SKILL.md
.opencode/skills/trellis-spec-bootstrap/SKILL.md
.opencode/skills/trellis-update-spec/SKILL.md
.pi/skills/trellis-before-dev/SKILL.md
.pi/skills/trellis-brainstorm/SKILL.md
.pi/skills/trellis-break-loop/SKILL.md
.pi/skills/trellis-channel/SKILL.md

元信息

文件数
0
版本
88f4834
Hash
35afb53f
收录时间
2026-08-20 08:10

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 20:14
浙ICP备14020137号-1 $访客地图$