liteagents 2.4.0
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 +441 -0
- package/LICENSE +21 -0
- package/README.md +179 -0
- package/cli.js +230 -0
- package/docs/.gitkeep +1 -0
- package/docs/CONTRIBUTING.md +739 -0
- package/docs/DUAL_PUBLISH_SUMMARY.md +177 -0
- package/docs/ERROR_HANDLING_IMPLEMENTATION.md +327 -0
- package/docs/GITHUB_PACKAGES.md +181 -0
- package/docs/GITHUB_SETUP.md +158 -0
- package/docs/INSTALLATION_DEMO.md +691 -0
- package/docs/INSTALLATION_LOCATIONS.md +299 -0
- package/docs/INSTALLER_GUIDE.md +1586 -0
- package/docs/INTEGRATION_ISSUES_9.1.md +341 -0
- package/docs/KNOWLEDGE_BASE.md +727 -0
- package/docs/MIGRATION.md +384 -0
- package/docs/PACKAGE_BASELINE.md +557 -0
- package/docs/PACKAGE_VALIDATION_REPORT.md +427 -0
- package/docs/PASS_INTEGRATION.md +307 -0
- package/docs/PASS_QUICK_START.md +150 -0
- package/docs/PRIVACY.md +203 -0
- package/docs/PUBLISHING.md +494 -0
- package/docs/QUICK-START.md +318 -0
- package/docs/RELEASE_NOTES_1.2.0.md +323 -0
- package/docs/SECURITY.md +317 -0
- package/docs/SILENT_MODE_GUIDE.md +526 -0
- package/docs/SKILLS_CONVERSION.md +154 -0
- package/docs/TESTING.md +582 -0
- package/docs/TEST_COVERAGE.md +347 -0
- package/docs/TROUBLESHOOTING.md +788 -0
- package/docs/UPDATED_VARIANT_CONFIGURATION.md +274 -0
- package/docs/VARIANT_CONFIGURATION.md +440 -0
- package/installer/cli.js +761 -0
- package/installer/installation-engine.js +1536 -0
- package/installer/package-manager.js +640 -0
- package/installer/path-manager.js +427 -0
- package/installer/report-template.js +298 -0
- package/installer/verification-system.js +274 -0
- package/package.json +83 -0
- package/packages/ampcode/AGENT.md +58 -0
- package/packages/ampcode/README.md +17 -0
- package/packages/ampcode/agents/1-create-prd.md +175 -0
- package/packages/ampcode/agents/2-generate-tasks.md +190 -0
- package/packages/ampcode/agents/3-process-task-list.md +225 -0
- package/packages/ampcode/agents/code-developer.md +198 -0
- package/packages/ampcode/agents/context-builder.md +142 -0
- package/packages/ampcode/agents/feature-planner.md +199 -0
- package/packages/ampcode/agents/market-researcher.md +89 -0
- package/packages/ampcode/agents/orchestrator.md +116 -0
- package/packages/ampcode/agents/quality-assurance.md +115 -0
- package/packages/ampcode/agents/system-architect.md +135 -0
- package/packages/ampcode/agents/ui-designer.md +184 -0
- package/packages/ampcode/commands/brainstorming.md +56 -0
- package/packages/ampcode/commands/code-review.md +107 -0
- package/packages/ampcode/commands/condition-based-waiting/example.ts +158 -0
- package/packages/ampcode/commands/condition-based-waiting.md +122 -0
- package/packages/ampcode/commands/debug.md +20 -0
- package/packages/ampcode/commands/docs-builder/templates.md +572 -0
- package/packages/ampcode/commands/docs-builder.md +106 -0
- package/packages/ampcode/commands/explain.md +18 -0
- package/packages/ampcode/commands/git-commit.md +14 -0
- package/packages/ampcode/commands/optimize.md +20 -0
- package/packages/ampcode/commands/refactor.md +21 -0
- package/packages/ampcode/commands/review.md +18 -0
- package/packages/ampcode/commands/root-cause-tracing/find-polluter.sh +63 -0
- package/packages/ampcode/commands/root-cause-tracing.md +176 -0
- package/packages/ampcode/commands/security.md +21 -0
- package/packages/ampcode/commands/ship.md +18 -0
- package/packages/ampcode/commands/skill-creator/scripts/init_skill.py +303 -0
- package/packages/ampcode/commands/skill-creator/scripts/package_skill.py +110 -0
- package/packages/ampcode/commands/skill-creator/scripts/quick_validate.py +65 -0
- package/packages/ampcode/commands/skill-creator.md +211 -0
- package/packages/ampcode/commands/stash.md +45 -0
- package/packages/ampcode/commands/systematic-debugging.md +297 -0
- package/packages/ampcode/commands/test-driven-development.md +390 -0
- package/packages/ampcode/commands/test-generate.md +18 -0
- package/packages/ampcode/commands/testing-anti-patterns.md +304 -0
- package/packages/ampcode/commands/verification-before-completion.md +152 -0
- package/packages/ampcode/settings.json +13 -0
- package/packages/ampcode/variants.json +8 -0
- package/packages/claude/CLAUDE.md +58 -0
- package/packages/claude/README.md +23 -0
- package/packages/claude/agents/1-create-prd.md +175 -0
- package/packages/claude/agents/2-generate-tasks.md +190 -0
- package/packages/claude/agents/3-process-task-list.md +225 -0
- package/packages/claude/agents/code-developer.md +198 -0
- package/packages/claude/agents/context-builder.md +142 -0
- package/packages/claude/agents/feature-planner.md +199 -0
- package/packages/claude/agents/market-researcher.md +89 -0
- package/packages/claude/agents/orchestrator.md +117 -0
- package/packages/claude/agents/quality-assurance.md +115 -0
- package/packages/claude/agents/system-architect.md +135 -0
- package/packages/claude/agents/ui-designer.md +184 -0
- package/packages/claude/commands/debug.md +20 -0
- package/packages/claude/commands/explain.md +18 -0
- package/packages/claude/commands/git-commit.md +14 -0
- package/packages/claude/commands/optimize.md +20 -0
- package/packages/claude/commands/refactor.md +21 -0
- package/packages/claude/commands/review.md +18 -0
- package/packages/claude/commands/security.md +21 -0
- package/packages/claude/commands/ship.md +18 -0
- package/packages/claude/commands/stash.md +45 -0
- package/packages/claude/commands/test-generate.md +18 -0
- package/packages/claude/skills/brainstorming/SKILL.md +56 -0
- package/packages/claude/skills/code-review/SKILL.md +107 -0
- package/packages/claude/skills/code-review/code-reviewer.md +146 -0
- package/packages/claude/skills/condition-based-waiting/SKILL.md +122 -0
- package/packages/claude/skills/condition-based-waiting/example.ts +158 -0
- package/packages/claude/skills/docs-builder/SKILL.md +106 -0
- package/packages/claude/skills/docs-builder/references/templates.md +572 -0
- package/packages/claude/skills/root-cause-tracing/SKILL.md +176 -0
- package/packages/claude/skills/root-cause-tracing/find-polluter.sh +63 -0
- package/packages/claude/skills/skill-creator/LICENSE.txt +202 -0
- package/packages/claude/skills/skill-creator/SKILL.md +211 -0
- package/packages/claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/packages/claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/packages/claude/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/packages/claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/packages/claude/skills/systematic-debugging/SKILL.md +296 -0
- package/packages/claude/skills/systematic-debugging/test-academic.md +14 -0
- package/packages/claude/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/packages/claude/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/packages/claude/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/packages/claude/skills/test-driven-development/SKILL.md +392 -0
- package/packages/claude/skills/testing-anti-patterns/SKILL.md +304 -0
- package/packages/claude/skills/verification-before-completion/SKILL.md +152 -0
- package/packages/claude/variants.json +9 -0
- package/packages/droid/AGENTS.md +52 -0
- package/packages/droid/README.md +17 -0
- package/packages/droid/change_settings.json +61 -0
- package/packages/droid/commands/brainstorming.md +56 -0
- package/packages/droid/commands/code-review.md +107 -0
- package/packages/droid/commands/condition-based-waiting/example.ts +158 -0
- package/packages/droid/commands/condition-based-waiting.md +122 -0
- package/packages/droid/commands/debug.md +20 -0
- package/packages/droid/commands/docs-builder/templates.md +572 -0
- package/packages/droid/commands/docs-builder.md +106 -0
- package/packages/droid/commands/explain.md +18 -0
- package/packages/droid/commands/git-commit.md +14 -0
- package/packages/droid/commands/optimize.md +20 -0
- package/packages/droid/commands/refactor.md +21 -0
- package/packages/droid/commands/review.md +18 -0
- package/packages/droid/commands/root-cause-tracing/find-polluter.sh +63 -0
- package/packages/droid/commands/root-cause-tracing.md +176 -0
- package/packages/droid/commands/security.md +21 -0
- package/packages/droid/commands/ship.md +18 -0
- package/packages/droid/commands/skill-creator/scripts/init_skill.py +303 -0
- package/packages/droid/commands/skill-creator/scripts/package_skill.py +110 -0
- package/packages/droid/commands/skill-creator/scripts/quick_validate.py +65 -0
- package/packages/droid/commands/skill-creator.md +211 -0
- package/packages/droid/commands/stash.md +45 -0
- package/packages/droid/commands/systematic-debugging.md +297 -0
- package/packages/droid/commands/test-driven-development.md +390 -0
- package/packages/droid/commands/test-generate.md +18 -0
- package/packages/droid/commands/testing-anti-patterns.md +304 -0
- package/packages/droid/commands/verification-before-completion.md +152 -0
- package/packages/droid/droids/1-create-prd.md +170 -0
- package/packages/droid/droids/2-generate-tasks.md +190 -0
- package/packages/droid/droids/3-process-task-list.md +225 -0
- package/packages/droid/droids/code-developer.md +198 -0
- package/packages/droid/droids/context-builder.md +142 -0
- package/packages/droid/droids/feature-planner.md +199 -0
- package/packages/droid/droids/market-researcher.md +89 -0
- package/packages/droid/droids/orchestrator.md +116 -0
- package/packages/droid/droids/quality-assurance.md +115 -0
- package/packages/droid/droids/system-architect.md +135 -0
- package/packages/droid/droids/ui-designer.md +184 -0
- package/packages/droid/variants.json +8 -0
- package/packages/opencode/AGENTS.md +52 -0
- package/packages/opencode/README.md +17 -0
- package/packages/opencode/agent/1-create-prd.md +179 -0
- package/packages/opencode/agent/2-generate-tasks.md +194 -0
- package/packages/opencode/agent/3-process-task-list.md +229 -0
- package/packages/opencode/agent/code-developer.md +202 -0
- package/packages/opencode/agent/context-builder.md +146 -0
- package/packages/opencode/agent/feature-planner.md +203 -0
- package/packages/opencode/agent/market-researcher.md +93 -0
- package/packages/opencode/agent/orchestrator.md +120 -0
- package/packages/opencode/agent/quality-assurance.md +119 -0
- package/packages/opencode/agent/system-architect.md +139 -0
- package/packages/opencode/agent/ui-designer.md +188 -0
- package/packages/opencode/command/brainstorming.md +56 -0
- package/packages/opencode/command/code-review.md +107 -0
- package/packages/opencode/command/condition-based-waiting/example.ts +158 -0
- package/packages/opencode/command/condition-based-waiting.md +122 -0
- package/packages/opencode/command/debug.md +20 -0
- package/packages/opencode/command/docs-builder/templates.md +572 -0
- package/packages/opencode/command/docs-builder.md +106 -0
- package/packages/opencode/command/explain.md +18 -0
- package/packages/opencode/command/git-commit.md +14 -0
- package/packages/opencode/command/optimize.md +20 -0
- package/packages/opencode/command/refactor.md +21 -0
- package/packages/opencode/command/review.md +18 -0
- package/packages/opencode/command/root-cause-tracing/find-polluter.sh +63 -0
- package/packages/opencode/command/root-cause-tracing.md +176 -0
- package/packages/opencode/command/security.md +21 -0
- package/packages/opencode/command/ship.md +18 -0
- package/packages/opencode/command/skill-creator/scripts/init_skill.py +303 -0
- package/packages/opencode/command/skill-creator/scripts/package_skill.py +110 -0
- package/packages/opencode/command/skill-creator/scripts/quick_validate.py +65 -0
- package/packages/opencode/command/skill-creator.md +211 -0
- package/packages/opencode/command/stash.md +45 -0
- package/packages/opencode/command/systematic-debugging.md +297 -0
- package/packages/opencode/command/test-driven-development.md +390 -0
- package/packages/opencode/command/test-generate.md +18 -0
- package/packages/opencode/command/testing-anti-patterns.md +304 -0
- package/packages/opencode/command/verification-before-completion.md +152 -0
- package/packages/opencode/opencode.jsonc +201 -0
- package/packages/opencode/variants.json +8 -0
- package/packages/subagentic-manual.md +349 -0
- package/postinstall.js +21 -0
- package/tools/ampcode/manifest-template.json +14 -0
- package/tools/claude/manifest-template.json +14 -0
- package/tools/droid/manifest-template.json +14 -0
- package/tools/opencode/manifest-template.json +14 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stash
|
|
3
|
+
description: Stash session context [name]
|
|
4
|
+
usage: /stash ["optional-name"]
|
|
5
|
+
argument-hint: [optional stash name]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Save session context for compaction recovery or handoffs.
|
|
9
|
+
|
|
10
|
+
**Guardrails**
|
|
11
|
+
- Favor straightforward, minimal implementations first and add complexity only when requested or clearly required.
|
|
12
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
13
|
+
|
|
14
|
+
**What it does**
|
|
15
|
+
1. Captures current conversation context and key decisions
|
|
16
|
+
2. Records active work in progress
|
|
17
|
+
3. Stores important findings and insights
|
|
18
|
+
4. Creates stash file in `.factory/stash/`
|
|
19
|
+
5. Enables context restoration after compaction
|
|
20
|
+
|
|
21
|
+
**When to use**
|
|
22
|
+
- Before long-running tasks that may trigger compaction
|
|
23
|
+
- When handing off work to another agent or session
|
|
24
|
+
- After completing major investigation or analysis
|
|
25
|
+
- Before taking a break from complex multi-step work
|
|
26
|
+
|
|
27
|
+
**Commands**
|
|
28
|
+
```bash
|
|
29
|
+
# Stash with auto-generated name
|
|
30
|
+
/stash
|
|
31
|
+
|
|
32
|
+
# Stash with custom name
|
|
33
|
+
/stash "feature-auth-investigation"
|
|
34
|
+
|
|
35
|
+
# List available stashes
|
|
36
|
+
ls .factory/stash/
|
|
37
|
+
|
|
38
|
+
# Restore from stash
|
|
39
|
+
cat .factory/stash/<name>.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Reference**
|
|
43
|
+
- Stashes stored in `.factory/stash/` (project-local)
|
|
44
|
+
- Automatically includes: timestamp, active plan, recent decisions
|
|
45
|
+
- Maximum context retention with minimal token usage
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: systematic-debugging
|
|
3
|
+
description: Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes - four-phase framework (root cause investigation, pattern analysis, hypothesis testing, implementation) that ensures understanding before attempting solutions
|
|
4
|
+
usage: /systematic-debugging <bug-or-error-description>
|
|
5
|
+
auto_trigger: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Systematic Debugging
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
|
|
13
|
+
|
|
14
|
+
**Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
|
|
15
|
+
|
|
16
|
+
**Violating the letter of this process is violating the spirit of debugging.**
|
|
17
|
+
|
|
18
|
+
## The Iron Law
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If you haven't completed Phase 1, you cannot propose fixes.
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
Use for ANY technical issue:
|
|
29
|
+
- Test failures
|
|
30
|
+
- Bugs in production
|
|
31
|
+
- Unexpected behavior
|
|
32
|
+
- Performance problems
|
|
33
|
+
- Build failures
|
|
34
|
+
- Integration issues
|
|
35
|
+
|
|
36
|
+
**Use this ESPECIALLY when:**
|
|
37
|
+
- Under time pressure (emergencies make guessing tempting)
|
|
38
|
+
- "Just one quick fix" seems obvious
|
|
39
|
+
- You've already tried multiple fixes
|
|
40
|
+
- Previous fix didn't work
|
|
41
|
+
- You don't fully understand the issue
|
|
42
|
+
|
|
43
|
+
**Don't skip when:**
|
|
44
|
+
- Issue seems simple (simple bugs have root causes too)
|
|
45
|
+
- You're in a hurry (rushing guarantees rework)
|
|
46
|
+
- Manager wants it fixed NOW (systematic is faster than thrashing)
|
|
47
|
+
|
|
48
|
+
## The Four Phases
|
|
49
|
+
|
|
50
|
+
You MUST complete each phase before proceeding to the next.
|
|
51
|
+
|
|
52
|
+
### Phase 1: Root Cause Investigation
|
|
53
|
+
|
|
54
|
+
**BEFORE attempting ANY fix:**
|
|
55
|
+
|
|
56
|
+
1. **Read Error Messages Carefully**
|
|
57
|
+
- Don't skip past errors or warnings
|
|
58
|
+
- They often contain the exact solution
|
|
59
|
+
- Read stack traces completely
|
|
60
|
+
- Note line numbers, file paths, error codes
|
|
61
|
+
|
|
62
|
+
2. **Reproduce Consistently**
|
|
63
|
+
- Can you trigger it reliably?
|
|
64
|
+
- What are the exact steps?
|
|
65
|
+
- Does it happen every time?
|
|
66
|
+
- If not reproducible → gather more data, don't guess
|
|
67
|
+
|
|
68
|
+
3. **Check Recent Changes**
|
|
69
|
+
- What changed that could cause this?
|
|
70
|
+
- Git diff, recent commits
|
|
71
|
+
- New dependencies, config changes
|
|
72
|
+
- Environmental differences
|
|
73
|
+
|
|
74
|
+
4. **Gather Evidence in Multi-Component Systems**
|
|
75
|
+
|
|
76
|
+
**WHEN system has multiple components (CI → build → signing, API → service → database):**
|
|
77
|
+
|
|
78
|
+
**BEFORE proposing fixes, add diagnostic instrumentation:**
|
|
79
|
+
```
|
|
80
|
+
For EACH component boundary:
|
|
81
|
+
- Log what data enters component
|
|
82
|
+
- Log what data exits component
|
|
83
|
+
- Verify environment/config propagation
|
|
84
|
+
- Check state at each layer
|
|
85
|
+
|
|
86
|
+
Run once to gather evidence showing WHERE it breaks
|
|
87
|
+
THEN analyze evidence to identify failing component
|
|
88
|
+
THEN investigate that specific component
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Example (multi-layer system):**
|
|
92
|
+
```bash
|
|
93
|
+
# Layer 1: Workflow
|
|
94
|
+
echo "=== Secrets available in workflow: ==="
|
|
95
|
+
echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}"
|
|
96
|
+
|
|
97
|
+
# Layer 2: Build script
|
|
98
|
+
echo "=== Env vars in build script: ==="
|
|
99
|
+
env | grep IDENTITY || echo "IDENTITY not in environment"
|
|
100
|
+
|
|
101
|
+
# Layer 3: Signing script
|
|
102
|
+
echo "=== Keychain state: ==="
|
|
103
|
+
security list-keychains
|
|
104
|
+
security find-identity -v
|
|
105
|
+
|
|
106
|
+
# Layer 4: Actual signing
|
|
107
|
+
codesign --sign "$IDENTITY" --verbose=4 "$APP"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**This reveals:** Which layer fails (secrets → workflow ✓, workflow → build ✗)
|
|
111
|
+
|
|
112
|
+
5. **Trace Data Flow**
|
|
113
|
+
|
|
114
|
+
**WHEN error is deep in call stack:**
|
|
115
|
+
|
|
116
|
+
**REQUIRED SUB-SKILL:** Use root-cause-tracing for backward tracing technique
|
|
117
|
+
|
|
118
|
+
**Quick version:**
|
|
119
|
+
- Where does bad value originate?
|
|
120
|
+
- What called this with bad value?
|
|
121
|
+
- Keep tracing up until you find the source
|
|
122
|
+
- Fix at source, not at symptom
|
|
123
|
+
|
|
124
|
+
### Phase 2: Pattern Analysis
|
|
125
|
+
|
|
126
|
+
**Find the pattern before fixing:**
|
|
127
|
+
|
|
128
|
+
1. **Find Working Examples**
|
|
129
|
+
- Locate similar working code in same codebase
|
|
130
|
+
- What works that's similar to what's broken?
|
|
131
|
+
|
|
132
|
+
2. **Compare Against References**
|
|
133
|
+
- If implementing pattern, read reference implementation COMPLETELY
|
|
134
|
+
- Don't skim - read every line
|
|
135
|
+
- Understand the pattern fully before applying
|
|
136
|
+
|
|
137
|
+
3. **Identify Differences**
|
|
138
|
+
- What's different between working and broken?
|
|
139
|
+
- List every difference, however small
|
|
140
|
+
- Don't assume "that can't matter"
|
|
141
|
+
|
|
142
|
+
4. **Understand Dependencies**
|
|
143
|
+
- What other components does this need?
|
|
144
|
+
- What settings, config, environment?
|
|
145
|
+
- What assumptions does it make?
|
|
146
|
+
|
|
147
|
+
### Phase 3: Hypothesis and Testing
|
|
148
|
+
|
|
149
|
+
**Scientific method:**
|
|
150
|
+
|
|
151
|
+
1. **Form Single Hypothesis**
|
|
152
|
+
- State clearly: "I think X is the root cause because Y"
|
|
153
|
+
- Write it down
|
|
154
|
+
- Be specific, not vague
|
|
155
|
+
|
|
156
|
+
2. **Test Minimally**
|
|
157
|
+
- Make the SMALLEST possible change to test hypothesis
|
|
158
|
+
- One variable at a time
|
|
159
|
+
- Don't fix multiple things at once
|
|
160
|
+
|
|
161
|
+
3. **Verify Before Continuing**
|
|
162
|
+
- Did it work? Yes → Phase 4
|
|
163
|
+
- Didn't work? Form NEW hypothesis
|
|
164
|
+
- DON'T add more fixes on top
|
|
165
|
+
|
|
166
|
+
4. **When You Don't Know**
|
|
167
|
+
- Say "I don't understand X"
|
|
168
|
+
- Don't pretend to know
|
|
169
|
+
- Ask for help
|
|
170
|
+
- Research more
|
|
171
|
+
|
|
172
|
+
### Phase 4: Implementation
|
|
173
|
+
|
|
174
|
+
**Fix the root cause, not the symptom:**
|
|
175
|
+
|
|
176
|
+
1. **Create Failing Test Case**
|
|
177
|
+
- Simplest possible reproduction
|
|
178
|
+
- Automated test if possible
|
|
179
|
+
- One-off test script if no framework
|
|
180
|
+
- MUST have before fixing
|
|
181
|
+
- **REQUIRED SUB-SKILL:** Use test-driven-development for writing proper failing tests
|
|
182
|
+
|
|
183
|
+
2. **Implement Single Fix**
|
|
184
|
+
- Address the root cause identified
|
|
185
|
+
- ONE change at a time
|
|
186
|
+
- No "while I'm here" improvements
|
|
187
|
+
- No bundled refactoring
|
|
188
|
+
|
|
189
|
+
3. **Verify Fix**
|
|
190
|
+
- Test passes now?
|
|
191
|
+
- No other tests broken?
|
|
192
|
+
- Issue actually resolved?
|
|
193
|
+
|
|
194
|
+
4. **If Fix Doesn't Work**
|
|
195
|
+
- STOP
|
|
196
|
+
- Count: How many fixes have you tried?
|
|
197
|
+
- If < 3: Return to Phase 1, re-analyze with new information
|
|
198
|
+
- **If ≥ 3: STOP and question the architecture (step 5 below)**
|
|
199
|
+
- DON'T attempt Fix #4 without architectural discussion
|
|
200
|
+
|
|
201
|
+
5. **If 3+ Fixes Failed: Question Architecture**
|
|
202
|
+
|
|
203
|
+
**Pattern indicating architectural problem:**
|
|
204
|
+
- Each fix reveals new shared state/coupling/problem in different place
|
|
205
|
+
- Fixes require "massive refactoring" to implement
|
|
206
|
+
- Each fix creates new symptoms elsewhere
|
|
207
|
+
|
|
208
|
+
**STOP and question fundamentals:**
|
|
209
|
+
- Is this pattern fundamentally sound?
|
|
210
|
+
- Are we "sticking with it through sheer inertia"?
|
|
211
|
+
- Should we refactor architecture vs. continue fixing symptoms?
|
|
212
|
+
|
|
213
|
+
**Discuss with your human partner before attempting more fixes**
|
|
214
|
+
|
|
215
|
+
This is NOT a failed hypothesis - this is a wrong architecture.
|
|
216
|
+
|
|
217
|
+
## Red Flags - STOP and Follow Process
|
|
218
|
+
|
|
219
|
+
If you catch yourself thinking:
|
|
220
|
+
- "Quick fix for now, investigate later"
|
|
221
|
+
- "Just try changing X and see if it works"
|
|
222
|
+
- "Add multiple changes, run tests"
|
|
223
|
+
- "Skip the test, I'll manually verify"
|
|
224
|
+
- "It's probably X, let me fix that"
|
|
225
|
+
- "I don't fully understand but this might work"
|
|
226
|
+
- "Pattern says X but I'll adapt it differently"
|
|
227
|
+
- "Here are the main problems: [lists fixes without investigation]"
|
|
228
|
+
- Proposing solutions before tracing data flow
|
|
229
|
+
- **"One more fix attempt" (when already tried 2+)**
|
|
230
|
+
- **Each fix reveals new problem in different place**
|
|
231
|
+
|
|
232
|
+
**ALL of these mean: STOP. Return to Phase 1.**
|
|
233
|
+
|
|
234
|
+
**If 3+ fixes failed:** Question the architecture (see Phase 4.5)
|
|
235
|
+
|
|
236
|
+
## your human partner's Signals You're Doing It Wrong
|
|
237
|
+
|
|
238
|
+
**Watch for these redirections:**
|
|
239
|
+
- "Is that not happening?" - You assumed without verifying
|
|
240
|
+
- "Will it show us...?" - You should have added evidence gathering
|
|
241
|
+
- "Stop guessing" - You're proposing fixes without understanding
|
|
242
|
+
- "Ultrathink this" - Question fundamentals, not just symptoms
|
|
243
|
+
- "We're stuck?" (frustrated) - Your approach isn't working
|
|
244
|
+
|
|
245
|
+
**When you see these:** STOP. Return to Phase 1.
|
|
246
|
+
|
|
247
|
+
## Common Rationalizations
|
|
248
|
+
|
|
249
|
+
| Excuse | Reality |
|
|
250
|
+
|--------|---------|
|
|
251
|
+
| "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
|
|
252
|
+
| "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing. |
|
|
253
|
+
| "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
|
|
254
|
+
| "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
|
|
255
|
+
| "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
|
|
256
|
+
| "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
|
|
257
|
+
| "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
|
|
258
|
+
| "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question pattern, don't fix again. |
|
|
259
|
+
|
|
260
|
+
## Quick Reference
|
|
261
|
+
|
|
262
|
+
| Phase | Key Activities | Success Criteria |
|
|
263
|
+
|-------|---------------|------------------|
|
|
264
|
+
| **1. Root Cause** | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY |
|
|
265
|
+
| **2. Pattern** | Find working examples, compare | Identify differences |
|
|
266
|
+
| **3. Hypothesis** | Form theory, test minimally | Confirmed or new hypothesis |
|
|
267
|
+
| **4. Implementation** | Create test, fix, verify | Bug resolved, tests pass |
|
|
268
|
+
|
|
269
|
+
## When Process Reveals "No Root Cause"
|
|
270
|
+
|
|
271
|
+
If systematic investigation reveals issue is truly environmental, timing-dependent, or external:
|
|
272
|
+
|
|
273
|
+
1. You've completed the process
|
|
274
|
+
2. Document what you investigated
|
|
275
|
+
3. Implement appropriate handling (retry, timeout, error message)
|
|
276
|
+
4. Add monitoring/logging for future investigation
|
|
277
|
+
|
|
278
|
+
**But:** 95% of "no root cause" cases are incomplete investigation.
|
|
279
|
+
|
|
280
|
+
## Integration with Other Skills
|
|
281
|
+
|
|
282
|
+
**This skill requires using:**
|
|
283
|
+
- **root-cause-tracing** - REQUIRED when error is deep in call stack (see Phase 1, Step 5)
|
|
284
|
+
- **test-driven-development** - REQUIRED for creating failing test case (see Phase 4, Step 1)
|
|
285
|
+
|
|
286
|
+
**Complementary skills:**
|
|
287
|
+
- **defense-in-depth** - Add validation at multiple layers after finding root cause
|
|
288
|
+
- **condition-based-waiting** - Replace arbitrary timeouts identified in Phase 2
|
|
289
|
+
- **verification-before-completion** - Verify fix worked before claiming success
|
|
290
|
+
|
|
291
|
+
## Real-World Impact
|
|
292
|
+
|
|
293
|
+
From debugging sessions:
|
|
294
|
+
- Systematic approach: 15-30 minutes to fix
|
|
295
|
+
- Random fixes approach: 2-3 hours of thrashing
|
|
296
|
+
- First-time fix rate: 95% vs 40%
|
|
297
|
+
- New bugs introduced: Near zero vs common
|