winter-super-cli 2026.6.26 → 2026.6.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -5
- package/README.md +66 -0
- package/package.json +5 -1
- package/resources/local/gsap-skills/.claude-plugin/marketplace.json +20 -0
- package/resources/local/gsap-skills/.claude-plugin/plugin.json +6 -0
- package/resources/local/gsap-skills/.cursor-plugin/marketplace.json +13 -0
- package/resources/local/gsap-skills/.cursor-plugin/plugin.json +22 -0
- package/resources/local/gsap-skills/.github/copilot-instructions.md +17 -0
- package/resources/local/gsap-skills/.github/instructions/react.instructions.md +15 -0
- package/resources/local/gsap-skills/.github/instructions/scrolltrigger.instructions.md +18 -0
- package/resources/local/gsap-skills/AGENTS.md +27 -0
- package/resources/local/gsap-skills/CLAUDE.md +1 -0
- package/resources/local/gsap-skills/GEMINI.md +1 -0
- package/resources/local/gsap-skills/LICENSE +21 -0
- package/resources/local/gsap-skills/README.md +163 -0
- package/resources/local/gsap-skills/assets/gsap-green.svg +7 -0
- package/resources/local/gsap-skills/assets/gsap-icon-inverted.svg +15 -0
- package/resources/local/gsap-skills/assets/gsap-icon-square.svg +1 -0
- package/resources/local/gsap-skills/assets/gsap-white.svg +7 -0
- package/resources/local/gsap-skills/examples/README.md +29 -0
- package/resources/local/gsap-skills/examples/nuxt/app/app.vue +3 -0
- package/resources/local/gsap-skills/examples/nuxt/app/composables/useGSAP.ts +91 -0
- package/resources/local/gsap-skills/examples/nuxt/app/pages/index.vue +55 -0
- package/resources/local/gsap-skills/examples/nuxt/nuxt.config.ts +4 -0
- package/resources/local/gsap-skills/examples/nuxt/package.json +18 -0
- package/resources/local/gsap-skills/examples/react/App.jsx +46 -0
- package/resources/local/gsap-skills/examples/react/index.html +12 -0
- package/resources/local/gsap-skills/examples/react/main.jsx +9 -0
- package/resources/local/gsap-skills/examples/react/package.json +21 -0
- package/resources/local/gsap-skills/examples/react/vite.config.js +7 -0
- package/resources/local/gsap-skills/examples/vanilla/index.html +33 -0
- package/resources/local/gsap-skills/examples/vanilla/main.js +36 -0
- package/resources/local/gsap-skills/examples/vue/app.vue +47 -0
- package/resources/local/gsap-skills/examples/vue/index.html +15 -0
- package/resources/local/gsap-skills/examples/vue/main.js +9 -0
- package/resources/local/gsap-skills/examples/vue/package.json +19 -0
- package/resources/local/gsap-skills/examples/vue/vite.config.js +7 -0
- package/resources/local/gsap-skills/skills/gsap-core/SKILL.md +254 -0
- package/resources/local/gsap-skills/skills/gsap-frameworks/SKILL.md +266 -0
- package/resources/local/gsap-skills/skills/gsap-performance/SKILL.md +79 -0
- package/resources/local/gsap-skills/skills/gsap-plugins/SKILL.md +433 -0
- package/resources/local/gsap-skills/skills/gsap-react/SKILL.md +136 -0
- package/resources/local/gsap-skills/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/resources/local/gsap-skills/skills/gsap-timeline/SKILL.md +107 -0
- package/resources/local/gsap-skills/skills/gsap-utils/SKILL.md +284 -0
- package/resources/local/gsap-skills/skills/llms.txt +39 -0
- package/resources/local/hermes-agent-core/AGENTS.md +1132 -0
- package/resources/local/hermes-agent-core/LICENSE +21 -0
- package/resources/local/hermes-agent-core/README.md +215 -0
- package/resources/local/hermes-agent-core/docs/2026-05-07-s6-overlay-dynamic-subagent-gateways.md +434 -0
- package/resources/local/hermes-agent-core/hermes-already-has-routines.md +160 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/claude-code/SKILL.md +745 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/codex/SKILL.md +130 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/hermes-agent/SKILL.md +1021 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/kanban-codex-lane/SKILL.md +277 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/kanban-codex-lane/templates/pmb-codex-lane-prompt.md +57 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/opencode/SKILL.md +219 -0
- package/resources/local/hermes-agent-core/skills/github/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/github/codebase-inspection/SKILL.md +116 -0
- package/resources/local/hermes-agent-core/skills/github/github-auth/SKILL.md +247 -0
- package/resources/local/hermes-agent-core/skills/github/github-auth/scripts/gh-env.sh +66 -0
- package/resources/local/hermes-agent-core/skills/github/github-code-review/SKILL.md +481 -0
- package/resources/local/hermes-agent-core/skills/github/github-code-review/references/review-output-template.md +74 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/SKILL.md +370 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/templates/bug-report.md +35 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/templates/feature-request.md +31 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/SKILL.md +367 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/references/conventional-commits.md +71 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/resources/local/hermes-agent-core/skills/github/github-repo-management/SKILL.md +516 -0
- package/resources/local/hermes-agent-core/skills/github/github-repo-management/references/github-api-cheatsheet.md +161 -0
- package/resources/local/hermes-agent-core/skills/mcp/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/mcp/native-mcp/SKILL.md +357 -0
- package/resources/local/hermes-agent-core/skills/software-development/debugging-hermes-tui-commands/SKILL.md +152 -0
- package/resources/local/hermes-agent-core/skills/software-development/hermes-agent-skill-authoring/SKILL.md +165 -0
- package/resources/local/hermes-agent-core/skills/software-development/hermes-s6-container-supervision/SKILL.md +176 -0
- package/resources/local/hermes-agent-core/skills/software-development/node-inspect-debugger/SKILL.md +319 -0
- package/resources/local/hermes-agent-core/skills/software-development/plan/SKILL.md +58 -0
- package/resources/local/hermes-agent-core/skills/software-development/python-debugpy/SKILL.md +375 -0
- package/resources/local/hermes-agent-core/skills/software-development/requesting-code-review/SKILL.md +280 -0
- package/resources/local/hermes-agent-core/skills/software-development/spike/SKILL.md +197 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/SKILL.md +352 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/resources/local/hermes-agent-core/skills/software-development/systematic-debugging/SKILL.md +367 -0
- package/resources/local/hermes-agent-core/skills/software-development/test-driven-development/SKILL.md +343 -0
- package/resources/local/hermes-agent-core/skills/software-development/writing-plans/SKILL.md +297 -0
- package/resources/local/manifest.json +12 -0
- package/rule.md +2 -0
- package/scripts/audit-pack.js +5 -0
- package/scripts/smoke-browser.js +53 -0
- package/scripts/smoke-package.js +38 -4
- package/skill.md +36 -4
- package/skills/gsap.md +26 -0
- package/skills/hermes-agent.md +17 -0
- package/src/agent/agent-definitions.js +4 -4
- package/src/agent/runtime.js +206 -5
- package/src/agent/subagent-child.js +44 -0
- package/src/ai/capability-scorecard.js +193 -14
- package/src/ai/hermes-core.js +77 -0
- package/src/ai/model-capabilities.js +42 -2
- package/src/ai/prompts/system-prompt.js +16 -2
- package/src/ai/small-model-amplifier.js +35 -7
- package/src/ai/workflow-selector.js +22 -1
- package/src/cli/commands.js +21 -1
- package/src/cli/config.js +42 -4
- package/src/cli/context-loader.js +253 -9
- package/src/cli/conversation-format.js +5 -0
- package/src/cli/input-controller.js +79 -10
- package/src/cli/prompt-builder.js +45 -8
- package/src/cli/repl-commands.js +123 -2
- package/src/cli/repl.js +183 -87
- package/src/cli/slash-commands.js +3 -1
- package/src/cli/tui.js +133 -37
- package/src/mcp/client.js +46 -5
- package/src/tools/agent.js +316 -25
- package/src/tools/executor.js +314 -11
- package/src/tools/permission.js +20 -17
- package/winter.d.ts +112 -10
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Gates Taxonomy
|
|
2
|
+
|
|
3
|
+
Canonical gate types for validation checkpoints across any workflow that spawns subagents, runs review loops, or has human-approval pauses. Every validation checkpoint maps to one of these four types — naming them explicitly makes the workflow legible and prevents "what happens when this check fails?" confusion.
|
|
4
|
+
|
|
5
|
+
Adapted from the GSD (Get Shit Done) project's gates reference — MIT © 2025 Lex Christopherson ([gsd-build/get-shit-done](https://github.com/gsd-build/get-shit-done)).
|
|
6
|
+
|
|
7
|
+
## The four gate types
|
|
8
|
+
|
|
9
|
+
### 1. Pre-flight gate
|
|
10
|
+
|
|
11
|
+
**Purpose:** Validates preconditions before starting an operation.
|
|
12
|
+
|
|
13
|
+
**Behavior:** Blocks entry if conditions unmet. No partial work created — bail before anything changes.
|
|
14
|
+
|
|
15
|
+
**Recovery:** Fix the missing precondition, then retry.
|
|
16
|
+
|
|
17
|
+
**Examples:**
|
|
18
|
+
- Implementation phase checks that the plan file exists before it starts writing code.
|
|
19
|
+
- Delegated subagent checks that required env vars are set before making API calls.
|
|
20
|
+
- Commit checks that tests passed before pushing.
|
|
21
|
+
|
|
22
|
+
### 2. Revision gate
|
|
23
|
+
|
|
24
|
+
**Purpose:** Evaluates output quality and routes to revision if insufficient.
|
|
25
|
+
|
|
26
|
+
**Behavior:** Loops back to the producer with specific feedback. Bounded by an iteration cap (typically 3).
|
|
27
|
+
|
|
28
|
+
**Recovery:** Producer addresses feedback; checker re-evaluates. The loop escalates early if issue count does not decrease between consecutive iterations (stall detection). After max iterations, escalates to the user unconditionally — never loop forever.
|
|
29
|
+
|
|
30
|
+
**Examples:**
|
|
31
|
+
- Plan reviewer reads a draft plan, returns specific issues, planner revises, reviewer re-reads (max 3 cycles).
|
|
32
|
+
- Code reviewer checks subagent-produced code against must-haves; dispatches fixes back to the implementer if any must-have failed.
|
|
33
|
+
- Test coverage checker validates new tests exercise the new paths; if not, sends back to author.
|
|
34
|
+
|
|
35
|
+
### 3. Escalation gate
|
|
36
|
+
|
|
37
|
+
**Purpose:** Surfaces unresolvable issues to the human for a decision.
|
|
38
|
+
|
|
39
|
+
**Behavior:** Pauses workflow, presents options, waits for human input. Never guesses, never picks a default.
|
|
40
|
+
|
|
41
|
+
**Recovery:** Human chooses action; workflow resumes on the selected path.
|
|
42
|
+
|
|
43
|
+
**Examples:**
|
|
44
|
+
- Revision loop exhausted after 3 iterations.
|
|
45
|
+
- Merge conflict during automated worktree cleanup.
|
|
46
|
+
- Ambiguous requirement — two reasonable interpretations and the choice changes the approach.
|
|
47
|
+
- Subagent reports "the plan says X but the codebase actually does Y" — human decides which is right.
|
|
48
|
+
|
|
49
|
+
### 4. Abort gate
|
|
50
|
+
|
|
51
|
+
**Purpose:** Terminates the operation to prevent damage or waste.
|
|
52
|
+
|
|
53
|
+
**Behavior:** Stops immediately, preserves state (checkpoint current progress), reports the specific reason.
|
|
54
|
+
|
|
55
|
+
**Recovery:** Human investigates root cause, fixes, restarts from checkpoint.
|
|
56
|
+
|
|
57
|
+
**Examples:**
|
|
58
|
+
- Context window critically low during execution (POOR tier, >70%) — abort cleanly rather than produce truncated output.
|
|
59
|
+
- Critical dependency unavailable mid-run (network down, API key revoked).
|
|
60
|
+
- Unrecoverable filesystem state (disk full, permissions lost).
|
|
61
|
+
- Safety invariant violated (agent attempted an irreversible destructive action outside approved scope).
|
|
62
|
+
|
|
63
|
+
## How to use this in a skill
|
|
64
|
+
|
|
65
|
+
When you write an orchestration skill that has validation checkpoints, **name each checkpoint by its gate type explicitly** and answer three questions:
|
|
66
|
+
|
|
67
|
+
1. **What condition triggers this gate?** (e.g., "plan file missing", "issue count didn't decrease", "context >70%")
|
|
68
|
+
2. **What happens when it fails?** (block / loop back / ask human / abort)
|
|
69
|
+
3. **Who resumes, and from where?** (fix precondition + retry, revise + re-check, human decision, restart from checkpoint)
|
|
70
|
+
|
|
71
|
+
Answering these three up front means your skill never hits "what do we do now?" at runtime.
|
|
72
|
+
|
|
73
|
+
## Example — a review loop with all four gate types
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
[Pre-flight] plan.md exists and is non-empty? → no: bail, ask user to write a plan first
|
|
77
|
+
↓ yes
|
|
78
|
+
[Execute] subagent implements task
|
|
79
|
+
↓
|
|
80
|
+
[Revision] reviewer checks against must-haves → fail: loop back to subagent (max 3)
|
|
81
|
+
↓ pass
|
|
82
|
+
[Pre-flight] tests pass? → no: bail, report failing tests
|
|
83
|
+
↓ yes
|
|
84
|
+
[Commit]
|
|
85
|
+
↓
|
|
86
|
+
(on revision loop exhaustion)
|
|
87
|
+
[Escalation] "3 review cycles failed to converge on issue X — pick: force-merge, rewrite task, abandon"
|
|
88
|
+
↓ user picks
|
|
89
|
+
(on any tier-POOR context pressure during loop)
|
|
90
|
+
[Abort] "context at 73%, checkpointing and stopping"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The vocabulary is small on purpose. Every gate in every workflow should fit one of these four. If you find yourself inventing a fifth, it's probably a revision gate with extra branching, or an escalation gate in disguise.
|
package/resources/local/hermes-agent-core/skills/software-development/systematic-debugging/SKILL.md
ADDED
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: systematic-debugging
|
|
3
|
+
description: "4-phase root cause debugging: understand bugs before fixing."
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
author: Hermes Agent (adapted from obra/superpowers)
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [debugging, troubleshooting, problem-solving, root-cause, investigation]
|
|
11
|
+
related_skills: [test-driven-development, writing-plans, subagent-driven-development]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Systematic Debugging
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
|
|
19
|
+
|
|
20
|
+
**Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
|
|
21
|
+
|
|
22
|
+
**Violating the letter of this process is violating the spirit of debugging.**
|
|
23
|
+
|
|
24
|
+
## The Iron Law
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If you haven't completed Phase 1, you cannot propose fixes.
|
|
31
|
+
|
|
32
|
+
## When to Use
|
|
33
|
+
|
|
34
|
+
Use for ANY technical issue:
|
|
35
|
+
- Test failures
|
|
36
|
+
- Bugs in production
|
|
37
|
+
- Unexpected behavior
|
|
38
|
+
- Performance problems
|
|
39
|
+
- Build failures
|
|
40
|
+
- Integration issues
|
|
41
|
+
|
|
42
|
+
**Use this ESPECIALLY when:**
|
|
43
|
+
- Under time pressure (emergencies make guessing tempting)
|
|
44
|
+
- "Just one quick fix" seems obvious
|
|
45
|
+
- You've already tried multiple fixes
|
|
46
|
+
- Previous fix didn't work
|
|
47
|
+
- You don't fully understand the issue
|
|
48
|
+
|
|
49
|
+
**Don't skip when:**
|
|
50
|
+
- Issue seems simple (simple bugs have root causes too)
|
|
51
|
+
- You're in a hurry (rushing guarantees rework)
|
|
52
|
+
- Someone wants it fixed NOW (systematic is faster than thrashing)
|
|
53
|
+
|
|
54
|
+
## The Four Phases
|
|
55
|
+
|
|
56
|
+
You MUST complete each phase before proceeding to the next.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Phase 1: Root Cause Investigation
|
|
61
|
+
|
|
62
|
+
**BEFORE attempting ANY fix:**
|
|
63
|
+
|
|
64
|
+
### 1. Read Error Messages Carefully
|
|
65
|
+
|
|
66
|
+
- Don't skip past errors or warnings
|
|
67
|
+
- They often contain the exact solution
|
|
68
|
+
- Read stack traces completely
|
|
69
|
+
- Note line numbers, file paths, error codes
|
|
70
|
+
|
|
71
|
+
**Action:** Use `read_file` on the relevant source files. Use `search_files` to find the error string in the codebase.
|
|
72
|
+
|
|
73
|
+
### 2. Reproduce Consistently
|
|
74
|
+
|
|
75
|
+
- Can you trigger it reliably?
|
|
76
|
+
- What are the exact steps?
|
|
77
|
+
- Does it happen every time?
|
|
78
|
+
- If not reproducible → gather more data, don't guess
|
|
79
|
+
|
|
80
|
+
**Action:** Use the `terminal` tool to run the failing test or trigger the bug:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Run specific failing test
|
|
84
|
+
pytest tests/test_module.py::test_name -v
|
|
85
|
+
|
|
86
|
+
# Run with verbose output
|
|
87
|
+
pytest tests/test_module.py -v --tb=long
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 3. Check Recent Changes
|
|
91
|
+
|
|
92
|
+
- What changed that could cause this?
|
|
93
|
+
- Git diff, recent commits
|
|
94
|
+
- New dependencies, config changes
|
|
95
|
+
|
|
96
|
+
**Action:**
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Recent commits
|
|
100
|
+
git log --oneline -10
|
|
101
|
+
|
|
102
|
+
# Uncommitted changes
|
|
103
|
+
git diff
|
|
104
|
+
|
|
105
|
+
# Changes in specific file
|
|
106
|
+
git log -p --follow src/problematic_file.py | head -100
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 4. Gather Evidence in Multi-Component Systems
|
|
110
|
+
|
|
111
|
+
**WHEN system has multiple components (API → service → database, CI → build → deploy):**
|
|
112
|
+
|
|
113
|
+
**BEFORE proposing fixes, add diagnostic instrumentation:**
|
|
114
|
+
|
|
115
|
+
For EACH component boundary:
|
|
116
|
+
- Log what data enters the component
|
|
117
|
+
- Log what data exits the component
|
|
118
|
+
- Verify environment/config propagation
|
|
119
|
+
- Check state at each layer
|
|
120
|
+
|
|
121
|
+
Run once to gather evidence showing WHERE it breaks.
|
|
122
|
+
THEN analyze evidence to identify the failing component.
|
|
123
|
+
THEN investigate that specific component.
|
|
124
|
+
|
|
125
|
+
### 5. Trace Data Flow
|
|
126
|
+
|
|
127
|
+
**WHEN error is deep in the call stack:**
|
|
128
|
+
|
|
129
|
+
- Where does the bad value originate?
|
|
130
|
+
- What called this function with the bad value?
|
|
131
|
+
- Keep tracing upstream until you find the source
|
|
132
|
+
- Fix at the source, not at the symptom
|
|
133
|
+
|
|
134
|
+
**Action:** Use `search_files` to trace references:
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
# Find where the function is called
|
|
138
|
+
search_files("function_name(", path="src/", file_glob="*.py")
|
|
139
|
+
|
|
140
|
+
# Find where the variable is set
|
|
141
|
+
search_files("variable_name\\s*=", path="src/", file_glob="*.py")
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Phase 1 Completion Checklist
|
|
145
|
+
|
|
146
|
+
- [ ] Error messages fully read and understood
|
|
147
|
+
- [ ] Issue reproduced consistently
|
|
148
|
+
- [ ] Recent changes identified and reviewed
|
|
149
|
+
- [ ] Evidence gathered (logs, state, data flow)
|
|
150
|
+
- [ ] Problem isolated to specific component/code
|
|
151
|
+
- [ ] Root cause hypothesis formed
|
|
152
|
+
|
|
153
|
+
**STOP:** Do not proceed to Phase 2 until you understand WHY it's happening.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Phase 2: Pattern Analysis
|
|
158
|
+
|
|
159
|
+
**Find the pattern before fixing:**
|
|
160
|
+
|
|
161
|
+
### 1. Find Working Examples
|
|
162
|
+
|
|
163
|
+
- Locate similar working code in the same codebase
|
|
164
|
+
- What works that's similar to what's broken?
|
|
165
|
+
|
|
166
|
+
**Action:** Use `search_files` to find comparable patterns:
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
search_files("similar_pattern", path="src/", file_glob="*.py")
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 2. Compare Against References
|
|
173
|
+
|
|
174
|
+
- If implementing a pattern, read the reference implementation COMPLETELY
|
|
175
|
+
- Don't skim — read every line
|
|
176
|
+
- Understand the pattern fully before applying
|
|
177
|
+
|
|
178
|
+
### 3. Identify Differences
|
|
179
|
+
|
|
180
|
+
- What's different between working and broken?
|
|
181
|
+
- List every difference, however small
|
|
182
|
+
- Don't assume "that can't matter"
|
|
183
|
+
|
|
184
|
+
### 4. Understand Dependencies
|
|
185
|
+
|
|
186
|
+
- What other components does this need?
|
|
187
|
+
- What settings, config, environment?
|
|
188
|
+
- What assumptions does it make?
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Phase 3: Hypothesis and Testing
|
|
193
|
+
|
|
194
|
+
**Scientific method:**
|
|
195
|
+
|
|
196
|
+
### 1. Form a Single Hypothesis
|
|
197
|
+
|
|
198
|
+
- State clearly: "I think X is the root cause because Y"
|
|
199
|
+
- Write it down
|
|
200
|
+
- Be specific, not vague
|
|
201
|
+
|
|
202
|
+
### 2. Test Minimally
|
|
203
|
+
|
|
204
|
+
- Make the SMALLEST possible change to test the hypothesis
|
|
205
|
+
- One variable at a time
|
|
206
|
+
- Don't fix multiple things at once
|
|
207
|
+
|
|
208
|
+
### 3. Verify Before Continuing
|
|
209
|
+
|
|
210
|
+
- Did it work? → Phase 4
|
|
211
|
+
- Didn't work? → Form NEW hypothesis
|
|
212
|
+
- DON'T add more fixes on top
|
|
213
|
+
|
|
214
|
+
### 4. When You Don't Know
|
|
215
|
+
|
|
216
|
+
- Say "I don't understand X"
|
|
217
|
+
- Don't pretend to know
|
|
218
|
+
- Ask the user for help
|
|
219
|
+
- Research more
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Phase 4: Implementation
|
|
224
|
+
|
|
225
|
+
**Fix the root cause, not the symptom:**
|
|
226
|
+
|
|
227
|
+
### 1. Create Failing Test Case
|
|
228
|
+
|
|
229
|
+
- Simplest possible reproduction
|
|
230
|
+
- Automated test if possible
|
|
231
|
+
- MUST have before fixing
|
|
232
|
+
- Use the `test-driven-development` skill
|
|
233
|
+
|
|
234
|
+
### 2. Implement Single Fix
|
|
235
|
+
|
|
236
|
+
- Address the root cause identified
|
|
237
|
+
- ONE change at a time
|
|
238
|
+
- No "while I'm here" improvements
|
|
239
|
+
- No bundled refactoring
|
|
240
|
+
|
|
241
|
+
### 3. Verify Fix
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# Run the specific regression test
|
|
245
|
+
pytest tests/test_module.py::test_regression -v
|
|
246
|
+
|
|
247
|
+
# Run full suite — no regressions
|
|
248
|
+
pytest tests/ -q
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### 4. If Fix Doesn't Work — The Rule of Three
|
|
252
|
+
|
|
253
|
+
- **STOP.**
|
|
254
|
+
- Count: How many fixes have you tried?
|
|
255
|
+
- If < 3: Return to Phase 1, re-analyze with new information
|
|
256
|
+
- **If ≥ 3: STOP and question the architecture (step 5 below)**
|
|
257
|
+
- DON'T attempt Fix #4 without architectural discussion
|
|
258
|
+
|
|
259
|
+
### 5. If 3+ Fixes Failed: Question Architecture
|
|
260
|
+
|
|
261
|
+
**Pattern indicating an architectural problem:**
|
|
262
|
+
- Each fix reveals new shared state/coupling in a different place
|
|
263
|
+
- Fixes require "massive refactoring" to implement
|
|
264
|
+
- Each fix creates new symptoms elsewhere
|
|
265
|
+
|
|
266
|
+
**STOP and question fundamentals:**
|
|
267
|
+
- Is this pattern fundamentally sound?
|
|
268
|
+
- Are we "sticking with it through sheer inertia"?
|
|
269
|
+
- Should we refactor the architecture vs. continue fixing symptoms?
|
|
270
|
+
|
|
271
|
+
**Discuss with the user before attempting more fixes.**
|
|
272
|
+
|
|
273
|
+
This is NOT a failed hypothesis — this is a wrong architecture.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Red Flags — STOP and Follow Process
|
|
278
|
+
|
|
279
|
+
If you catch yourself thinking:
|
|
280
|
+
- "Quick fix for now, investigate later"
|
|
281
|
+
- "Just try changing X and see if it works"
|
|
282
|
+
- "Add multiple changes, run tests"
|
|
283
|
+
- "Skip the test, I'll manually verify"
|
|
284
|
+
- "It's probably X, let me fix that"
|
|
285
|
+
- "I don't fully understand but this might work"
|
|
286
|
+
- "Pattern says X but I'll adapt it differently"
|
|
287
|
+
- "Here are the main problems: [lists fixes without investigation]"
|
|
288
|
+
- Proposing solutions before tracing data flow
|
|
289
|
+
- **"One more fix attempt" (when already tried 2+)**
|
|
290
|
+
- **Each fix reveals a new problem in a different place**
|
|
291
|
+
|
|
292
|
+
**ALL of these mean: STOP. Return to Phase 1.**
|
|
293
|
+
|
|
294
|
+
**If 3+ fixes failed:** Question the architecture (Phase 4 step 5).
|
|
295
|
+
|
|
296
|
+
## Common Rationalizations
|
|
297
|
+
|
|
298
|
+
| Excuse | Reality |
|
|
299
|
+
|--------|---------|
|
|
300
|
+
| "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
|
|
301
|
+
| "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing. |
|
|
302
|
+
| "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
|
|
303
|
+
| "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
|
|
304
|
+
| "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
|
|
305
|
+
| "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
|
|
306
|
+
| "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
|
|
307
|
+
| "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question the pattern, don't fix again. |
|
|
308
|
+
|
|
309
|
+
## Quick Reference
|
|
310
|
+
|
|
311
|
+
| Phase | Key Activities | Success Criteria |
|
|
312
|
+
|-------|---------------|------------------|
|
|
313
|
+
| **1. Root Cause** | Read errors, reproduce, check changes, gather evidence, trace data flow | Understand WHAT and WHY |
|
|
314
|
+
| **2. Pattern** | Find working examples, compare, identify differences | Know what's different |
|
|
315
|
+
| **3. Hypothesis** | Form theory, test minimally, one variable at a time | Confirmed or new hypothesis |
|
|
316
|
+
| **4. Implementation** | Create regression test, fix root cause, verify | Bug resolved, all tests pass |
|
|
317
|
+
|
|
318
|
+
## Hermes Agent Integration
|
|
319
|
+
|
|
320
|
+
### Investigation Tools
|
|
321
|
+
|
|
322
|
+
Use these Hermes tools during Phase 1:
|
|
323
|
+
|
|
324
|
+
- **`search_files`** — Find error strings, trace function calls, locate patterns
|
|
325
|
+
- **`read_file`** — Read source code with line numbers for precise analysis
|
|
326
|
+
- **`terminal`** — Run tests, check git history, reproduce bugs
|
|
327
|
+
- **`web_search`/`web_extract`** — Research error messages, library docs
|
|
328
|
+
|
|
329
|
+
### With delegate_task
|
|
330
|
+
|
|
331
|
+
For complex multi-component debugging, dispatch investigation subagents:
|
|
332
|
+
|
|
333
|
+
```python
|
|
334
|
+
delegate_task(
|
|
335
|
+
goal="Investigate why [specific test/behavior] fails",
|
|
336
|
+
context="""
|
|
337
|
+
Follow systematic-debugging skill:
|
|
338
|
+
1. Read the error message carefully
|
|
339
|
+
2. Reproduce the issue
|
|
340
|
+
3. Trace the data flow to find root cause
|
|
341
|
+
4. Report findings — do NOT fix yet
|
|
342
|
+
|
|
343
|
+
Error: [paste full error]
|
|
344
|
+
File: [path to failing code]
|
|
345
|
+
Test command: [exact command]
|
|
346
|
+
""",
|
|
347
|
+
toolsets=['terminal', 'file']
|
|
348
|
+
)
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### With test-driven-development
|
|
352
|
+
|
|
353
|
+
When fixing bugs:
|
|
354
|
+
1. Write a test that reproduces the bug (RED)
|
|
355
|
+
2. Debug systematically to find root cause
|
|
356
|
+
3. Fix the root cause (GREEN)
|
|
357
|
+
4. The test proves the fix and prevents regression
|
|
358
|
+
|
|
359
|
+
## Real-World Impact
|
|
360
|
+
|
|
361
|
+
From debugging sessions:
|
|
362
|
+
- Systematic approach: 15-30 minutes to fix
|
|
363
|
+
- Random fixes approach: 2-3 hours of thrashing
|
|
364
|
+
- First-time fix rate: 95% vs 40%
|
|
365
|
+
- New bugs introduced: Near zero vs common
|
|
366
|
+
|
|
367
|
+
**No shortcuts. No guessing. Systematic always wins.**
|