.agents/skills/break-loop/SKILL.md
Deep post-fix bug analysis across five dimensions: root cause categorization, fix failure analysis, prevention mechanisms, systematic expansion, and knowledge capture. Updates .trellis/spec/ guides with lessons learned to prevent recurring bugs. Use when a debugging session completes, after fixing a tricky bug, when the same class of bug keeps recurring, or when you want to capture debugging insights into project documentation.
npx skillsauth add basui01/agentflow break-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When debug is complete, use this skill 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 | TypeScript strict, no any | 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:
.trellis/spec/guides/ thinking guides.trellis/spec/backend/ or frontend/ docsPlease 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:
30 minutes of analysis saves 30 hours of future debugging.
IMPORTANT: After completing the analysis above, you MUST immediately:
Update spec/guides - Don't just list TODOs, actually update the relevant files:
cross-platform-thinking-guide.mdcross-layer-thinking-guide.mdcode-reuse-thinking-guide.mdbackend/*.md or frontend/*.mdSync templates - After updating .trellis/spec/, sync to src/templates/markdown/spec/
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.
development
Multi-agent pipeline orchestrator that plans and dispatches parallel development tasks to worktree agents. Reads project context, configures task directories with PRDs and jsonl context files, and launches isolated coding agents. Use when multiple independent features need parallel development, orchestrating worktree agents, or managing multi-agent coding pipelines.
development
Captures executable contracts and coding knowledge into .trellis/spec/ documents after implementation, debugging, or design decisions. Enforces code-spec depth for infra and cross-layer changes with mandatory sections for signatures, contracts, validation matrices, and test points. Use when a feature is implemented, a bug is fixed, a design decision is made, a new pattern is discovered, or cross-layer contracts change.
development
Initializes an AI development session by reading workflow guides, developer identity, git status, active tasks, and project guidelines from .trellis/. Classifies incoming tasks and routes to brainstorm, direct edit, or task workflow. Use when beginning a new coding session, resuming work, starting a new task, or re-establishing project context.
development
Records completed work progress to .trellis/workspace/ journal files after human testing and commit. Captures session summaries, commit hashes, and updates developer index files for future session context. Use when a coding session is complete, after the human has committed code, or to persist session knowledge for future AI sessions.