contribute
Guide for contributing to Trellis documentation and marketplace. Covers adding spec templates, marketplace skills, documentation pages, and submitting PRs…
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.
$ npx -y skills add mindfold-ai/trellis --skill trellis-break-loop --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/trellis-break-loopContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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."
When debug is complete, use this for deep analysis to break the "fix bug -> forget -> repeat" cycle.
---
Analyze the bug you just fixed from these 5 dimensions:
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 |
If you tried multiple fixes before succeeding, analyze each failure:
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?" |
What broader problems does this bug reveal?
Solidify insights into the system:
---
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]
---
> **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.
When multiple root causes are plausible and evidence is incomplete, update your beliefs proportionally to new evidence rather than clinging to initial assumptions.
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.
Document what you found — be specific about reliability:
For each hypothesis, ask: **How likely is this evidence if this hypothesis were true?**
Direction of update matters more than calculation:
Don't gather more of the same. Find evidence that **differs strongly** between top hypotheses.
> If H1 and H3 are close: "What would I see if H1 is true but not if H3 is true?" Then check for that.
| Confidence | Action | |------------|--------| | 90%+ | Proceed with fix, monitor | | 70-90% | Proceed, add fallback check | | 50-70% | Test hypothesis before committing | | <50% | Need more evidence, don't guess |
Never express binary certainty when evidence is incomplete. Use "most likely", "plausible but unlikely", "worth investigating".
| Fallacy | Example | Correction | |---------|---------|------------| | **Base rate neglect** | "Test failed → code is broken" | How often do tests fail for other reasons? | | **Confirmation bias** | "Must be a race condition, let me find race evidence" | Actively seek evide
Repo: mindfold-ai/trellis
Guide for contributing to Trellis documentation and marketplace. Covers adding spec templates, marketplace skills, documentation pages, and submitting PRs…
Systematic first principles thinking for any problem domain. Use when the user says "analyze from first principles", "第一性原理", "从根本分析", "从零开始思考", "think from…
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos.…
Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\",…
Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: \"How…
Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples:…