@relipa/ai-flow-kit 0.0.1
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/AIFLOW.md +432 -0
- package/CHANGELOG.md +78 -0
- package/CONTRIBUTING.md +351 -0
- package/IMPLEMENTATION_SUMMARY.md +348 -0
- package/QUICK_START.md +392 -0
- package/README.md +323 -0
- package/bin/aiflow.js +178 -0
- package/custom/mcp-presets/README.md +138 -0
- package/custom/mcp-presets/backlog.json +15 -0
- package/custom/mcp-presets/figma.json +15 -0
- package/custom/mcp-presets/google-sheets.json +14 -0
- package/custom/mcp-presets/jira.json +16 -0
- package/custom/prompts/bug-fix.md +149 -0
- package/custom/prompts/feature.md +190 -0
- package/custom/prompts/investigation.md +164 -0
- package/custom/rules/code-style.md +7 -0
- package/custom/rules/java/code-style.md +11 -0
- package/custom/rules/java/naming.md +17 -0
- package/custom/rules/java/review-checklist.md +36 -0
- package/custom/rules/javascript/code-style.md +12 -0
- package/custom/rules/javascript/naming.md +14 -0
- package/custom/rules/naming.md +9 -0
- package/custom/rules/php/code-style.md +10 -0
- package/custom/rules/php/naming.md +15 -0
- package/custom/rules/review-checklist.md +9 -0
- package/custom/skills/figma-to-component/SKILL.md +207 -0
- package/custom/skills/generate-spec/SKILL.md +97 -0
- package/custom/skills/impact-analysis/SKILL.md +94 -0
- package/custom/skills/investigate-bug/SKILL.md +93 -0
- package/custom/skills/report-customer/SKILL.md +95 -0
- package/custom/skills/review-plan/SKILL.md +158 -0
- package/custom/skills/validate-ticket/SKILL.md +240 -0
- package/custom/templates/laravel.md +90 -0
- package/custom/templates/nextjs.md +89 -0
- package/custom/templates/reactjs.md +567 -0
- package/custom/templates/spring-boot.md +598 -0
- package/custom/templates/vue-nuxt.md +89 -0
- package/docs/architecture.md +395 -0
- package/docs/cli-reference.md +438 -0
- package/docs/configuration.md +412 -0
- package/docs/getting-started.md +248 -0
- package/docs/troubleshooting.md +587 -0
- package/docs/workflows/bug-fix.md +126 -0
- package/docs/workflows/feature.md +123 -0
- package/docs/workflows/impact-analysis.md +13 -0
- package/docs/workflows/investigation.md +13 -0
- package/docs/workflows/refactor.md +13 -0
- package/index.js +27 -0
- package/package.json +70 -0
- package/scripts/config.js +317 -0
- package/scripts/context.js +117 -0
- package/scripts/detect.js +239 -0
- package/scripts/doctor.js +48 -0
- package/scripts/guide.js +282 -0
- package/scripts/hooks/session-start.js +140 -0
- package/scripts/init.js +453 -0
- package/scripts/memory.js +247 -0
- package/scripts/prompt.js +392 -0
- package/scripts/remove.js +170 -0
- package/scripts/update.js +111 -0
- package/scripts/use.js +570 -0
- package/scripts/validate.js +303 -0
- package/upstream/.claude-plugin/marketplace.json +20 -0
- package/upstream/.claude-plugin/plugin.json +20 -0
- package/upstream/.codex/INSTALL.md +67 -0
- package/upstream/.cursor-plugin/plugin.json +25 -0
- package/upstream/.gitattributes +18 -0
- package/upstream/.github/FUNDING.yml +3 -0
- package/upstream/.github/ISSUE_TEMPLATE/bug_report.md +52 -0
- package/upstream/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/upstream/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
- package/upstream/.github/ISSUE_TEMPLATE/platform_support.md +23 -0
- package/upstream/.github/PULL_REQUEST_TEMPLATE.md +87 -0
- package/upstream/.opencode/INSTALL.md +83 -0
- package/upstream/.opencode/plugins/superpowers.js +112 -0
- package/upstream/.version-bump.json +19 -0
- package/upstream/AGENTS.md +1 -0
- package/upstream/CHANGELOG.md +13 -0
- package/upstream/CLAUDE.md +85 -0
- package/upstream/CODE_OF_CONDUCT.md +128 -0
- package/upstream/GEMINI.md +2 -0
- package/upstream/LICENSE +21 -0
- package/upstream/README.md +190 -0
- package/upstream/RELEASE-NOTES.md +1096 -0
- package/upstream/agents/code-reviewer.md +48 -0
- package/upstream/commands/brainstorm.md +5 -0
- package/upstream/commands/execute-plan.md +5 -0
- package/upstream/commands/write-plan.md +5 -0
- package/upstream/docs/README.codex.md +126 -0
- package/upstream/docs/README.opencode.md +130 -0
- package/upstream/docs/plans/2025-11-22-opencode-support-design.md +294 -0
- package/upstream/docs/plans/2025-11-22-opencode-support-implementation.md +1095 -0
- package/upstream/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +711 -0
- package/upstream/docs/plans/2026-01-17-visual-brainstorming.md +571 -0
- package/upstream/docs/superpowers/plans/2026-01-22-document-review-system.md +301 -0
- package/upstream/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +523 -0
- package/upstream/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +479 -0
- package/upstream/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +564 -0
- package/upstream/docs/superpowers/specs/2026-01-22-document-review-system-design.md +136 -0
- package/upstream/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +162 -0
- package/upstream/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +118 -0
- package/upstream/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +244 -0
- package/upstream/docs/testing.md +303 -0
- package/upstream/docs/windows/polyglot-hooks.md +212 -0
- package/upstream/gemini-extension.json +6 -0
- package/upstream/hooks/hooks-cursor.json +10 -0
- package/upstream/hooks/hooks.json +16 -0
- package/upstream/hooks/run-hook.cmd +46 -0
- package/upstream/hooks/session-start +57 -0
- package/upstream/package.json +6 -0
- package/upstream/scripts/bump-version.sh +220 -0
- package/upstream/skills/brainstorming/SKILL.md +164 -0
- package/upstream/skills/brainstorming/scripts/frame-template.html +214 -0
- package/upstream/skills/brainstorming/scripts/helper.js +88 -0
- package/upstream/skills/brainstorming/scripts/server.cjs +354 -0
- package/upstream/skills/brainstorming/scripts/start-server.sh +148 -0
- package/upstream/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/upstream/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/upstream/skills/brainstorming/visual-companion.md +287 -0
- package/upstream/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/upstream/skills/executing-plans/SKILL.md +70 -0
- package/upstream/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/upstream/skills/receiving-code-review/SKILL.md +213 -0
- package/upstream/skills/requesting-code-review/SKILL.md +105 -0
- package/upstream/skills/requesting-code-review/code-reviewer.md +146 -0
- package/upstream/skills/subagent-driven-development/SKILL.md +277 -0
- package/upstream/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/upstream/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/upstream/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/upstream/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/upstream/skills/systematic-debugging/SKILL.md +296 -0
- package/upstream/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/upstream/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/upstream/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/upstream/skills/systematic-debugging/find-polluter.sh +63 -0
- package/upstream/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/upstream/skills/systematic-debugging/test-academic.md +14 -0
- package/upstream/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/upstream/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/upstream/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/upstream/skills/test-driven-development/SKILL.md +371 -0
- package/upstream/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/upstream/skills/using-git-worktrees/SKILL.md +218 -0
- package/upstream/skills/using-superpowers/SKILL.md +117 -0
- package/upstream/skills/using-superpowers/references/codex-tools.md +100 -0
- package/upstream/skills/using-superpowers/references/copilot-tools.md +52 -0
- package/upstream/skills/using-superpowers/references/gemini-tools.md +33 -0
- package/upstream/skills/verification-before-completion/SKILL.md +139 -0
- package/upstream/skills/writing-plans/SKILL.md +152 -0
- package/upstream/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/upstream/skills/writing-skills/SKILL.md +655 -0
- package/upstream/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/upstream/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/upstream/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/upstream/skills/writing-skills/persuasion-principles.md +187 -0
- package/upstream/skills/writing-skills/render-graphs.js +168 -0
- package/upstream/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/upstream/tests/brainstorm-server/package-lock.json +36 -0
- package/upstream/tests/brainstorm-server/package.json +10 -0
- package/upstream/tests/brainstorm-server/server.test.js +427 -0
- package/upstream/tests/brainstorm-server/windows-lifecycle.test.sh +351 -0
- package/upstream/tests/brainstorm-server/ws-protocol.test.js +392 -0
- package/upstream/tests/claude-code/README.md +158 -0
- package/upstream/tests/claude-code/analyze-token-usage.py +168 -0
- package/upstream/tests/claude-code/run-skill-tests.sh +187 -0
- package/upstream/tests/claude-code/test-document-review-system.sh +177 -0
- package/upstream/tests/claude-code/test-helpers.sh +202 -0
- package/upstream/tests/claude-code/test-subagent-driven-development-integration.sh +314 -0
- package/upstream/tests/claude-code/test-subagent-driven-development.sh +165 -0
- package/upstream/tests/explicit-skill-requests/prompts/action-oriented.txt +3 -0
- package/upstream/tests/explicit-skill-requests/prompts/after-planning-flow.txt +17 -0
- package/upstream/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +11 -0
- package/upstream/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +8 -0
- package/upstream/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +3 -0
- package/upstream/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +1 -0
- package/upstream/tests/explicit-skill-requests/prompts/skip-formalities.txt +3 -0
- package/upstream/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +1 -0
- package/upstream/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +1 -0
- package/upstream/tests/explicit-skill-requests/run-all.sh +70 -0
- package/upstream/tests/explicit-skill-requests/run-claude-describes-sdd.sh +100 -0
- package/upstream/tests/explicit-skill-requests/run-extended-multiturn-test.sh +113 -0
- package/upstream/tests/explicit-skill-requests/run-haiku-test.sh +144 -0
- package/upstream/tests/explicit-skill-requests/run-multiturn-test.sh +143 -0
- package/upstream/tests/explicit-skill-requests/run-test.sh +136 -0
- package/upstream/tests/opencode/run-tests.sh +163 -0
- package/upstream/tests/opencode/setup.sh +88 -0
- package/upstream/tests/opencode/test-plugin-loading.sh +82 -0
- package/upstream/tests/opencode/test-priority.sh +198 -0
- package/upstream/tests/opencode/test-tools.sh +104 -0
- package/upstream/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +8 -0
- package/upstream/tests/skill-triggering/prompts/executing-plans.txt +1 -0
- package/upstream/tests/skill-triggering/prompts/requesting-code-review.txt +3 -0
- package/upstream/tests/skill-triggering/prompts/systematic-debugging.txt +11 -0
- package/upstream/tests/skill-triggering/prompts/test-driven-development.txt +7 -0
- package/upstream/tests/skill-triggering/prompts/writing-plans.txt +10 -0
- package/upstream/tests/skill-triggering/run-all.sh +60 -0
- package/upstream/tests/skill-triggering/run-test.sh +88 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/design.md +81 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/plan.md +172 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/scaffold.sh +45 -0
- package/upstream/tests/subagent-driven-dev/run-test.sh +106 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/design.md +70 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/plan.md +222 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/scaffold.sh +46 -0
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
# Troubleshooting Guide
|
|
2
|
+
|
|
3
|
+
Solutions to common issues with AI Flow Kit.
|
|
4
|
+
|
|
5
|
+
## Installation & Setup
|
|
6
|
+
|
|
7
|
+
### "aiflow command not found"
|
|
8
|
+
|
|
9
|
+
**Global installation:**
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g ai-flow-kit
|
|
12
|
+
aiflow --version
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Local installation:**
|
|
16
|
+
```bash
|
|
17
|
+
cd your-project
|
|
18
|
+
npm install ai-flow-kit
|
|
19
|
+
npx aiflow --version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Windows cmd/PowerShell:**
|
|
23
|
+
```cmd
|
|
24
|
+
npm install -g ai-flow-kit
|
|
25
|
+
refreshenv
|
|
26
|
+
aiflow --version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### "Permission denied" on Mac/Linux
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Make script executable
|
|
33
|
+
chmod +x ~/.npm/_npx/*/bin/aiflow.js
|
|
34
|
+
|
|
35
|
+
# Or reinstall globally
|
|
36
|
+
npm uninstall -g ai-flow-kit
|
|
37
|
+
npm install -g ai-flow-kit
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Initialization
|
|
43
|
+
|
|
44
|
+
### "aiflow init" fails with error
|
|
45
|
+
|
|
46
|
+
**Check Node.js version:**
|
|
47
|
+
```bash
|
|
48
|
+
node --version # Should be 14 or higher
|
|
49
|
+
npm --version # Should be 6 or higher
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Clear npm cache:**
|
|
53
|
+
```bash
|
|
54
|
+
npm cache clean --force
|
|
55
|
+
npm install -g ai-flow-kit
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Check disk space:**
|
|
59
|
+
```bash
|
|
60
|
+
# On Mac/Linux
|
|
61
|
+
df -h
|
|
62
|
+
|
|
63
|
+
# On Windows
|
|
64
|
+
dir C:\
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Context Loading
|
|
70
|
+
|
|
71
|
+
### "Cannot load context from Jira"
|
|
72
|
+
|
|
73
|
+
**Verify credentials:**
|
|
74
|
+
```bash
|
|
75
|
+
echo $JIRA_API_TOKEN
|
|
76
|
+
echo $JIRA_EMAIL
|
|
77
|
+
echo $JIRA_DOMAIN
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If empty, set them:
|
|
81
|
+
|
|
82
|
+
**Mac/Linux:**
|
|
83
|
+
```bash
|
|
84
|
+
export JIRA_API_TOKEN=your-token
|
|
85
|
+
export JIRA_EMAIL=your-email
|
|
86
|
+
export JIRA_DOMAIN=your-domain
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Windows PowerShell:**
|
|
90
|
+
```powershell
|
|
91
|
+
$env:JIRA_API_TOKEN = "your-token"
|
|
92
|
+
$env:JIRA_EMAIL = "your-email"
|
|
93
|
+
$env:JIRA_DOMAIN = "your-domain"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Verify connection:**
|
|
97
|
+
```bash
|
|
98
|
+
aiflow doctor
|
|
99
|
+
# Should show: ✓ Jira adapter configured
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### "Cannot connect to Backlog"
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Check credentials
|
|
106
|
+
echo $BACKLOG_API_KEY
|
|
107
|
+
echo $BACKLOG_SPACE_KEY
|
|
108
|
+
|
|
109
|
+
# Verify API key is valid
|
|
110
|
+
# Visit: https://<space-key>.backlogtool.com/api/v2/users/me
|
|
111
|
+
# (Use API key as username, empty password)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### "Cannot load from Google Sheets"
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Verify Google Sheets service account
|
|
118
|
+
ls ~/.config/google-sheets-key.json
|
|
119
|
+
|
|
120
|
+
# Or set path
|
|
121
|
+
export GOOGLE_SHEETS_CREDS=/path/to/credentials.json
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Configuration
|
|
127
|
+
|
|
128
|
+
### ".aiflowrc.json" not being read
|
|
129
|
+
|
|
130
|
+
**Verify file exists:**
|
|
131
|
+
```bash
|
|
132
|
+
ls -la .aiflowrc.json
|
|
133
|
+
# Should show file in current directory
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Check file format:**
|
|
137
|
+
```bash
|
|
138
|
+
# Verify it's valid JSON
|
|
139
|
+
cat .aiflowrc.json | jq .
|
|
140
|
+
# Should not show errors
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Reload configuration:**
|
|
144
|
+
```bash
|
|
145
|
+
aiflow update
|
|
146
|
+
aiflow doctor
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### "Config option not working"
|
|
150
|
+
|
|
151
|
+
**Verify option name:**
|
|
152
|
+
```bash
|
|
153
|
+
# Check configuration guide
|
|
154
|
+
# for correct spelling and format
|
|
155
|
+
cat docs/configuration.md
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Check precedence:**
|
|
159
|
+
Options are overridden in this order:
|
|
160
|
+
1. Environment variables (highest)
|
|
161
|
+
2. CLI flags
|
|
162
|
+
3. `.aiflowrc.json`
|
|
163
|
+
4. Global config
|
|
164
|
+
5. Defaults (lowest)
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Context Management
|
|
169
|
+
|
|
170
|
+
### "Context file not found"
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Check context exists
|
|
174
|
+
ls .claude/context/
|
|
175
|
+
|
|
176
|
+
# If missing, reload context
|
|
177
|
+
aiflow use JIRA-123 # Reload from ticket
|
|
178
|
+
# or
|
|
179
|
+
aiflow use --file path/to/context.json
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### "Cannot save context"
|
|
183
|
+
|
|
184
|
+
**Check permissions:**
|
|
185
|
+
```bash
|
|
186
|
+
ls -ld .claude
|
|
187
|
+
# Should show: drwxr-xr-x
|
|
188
|
+
|
|
189
|
+
chmod -R 755 .claude
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Check disk space:**
|
|
193
|
+
```bash
|
|
194
|
+
df -h
|
|
195
|
+
# Should have > 100MB free
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Prompting
|
|
201
|
+
|
|
202
|
+
### "Generated prompt is incomplete"
|
|
203
|
+
|
|
204
|
+
**Check context loaded:**
|
|
205
|
+
```bash
|
|
206
|
+
aiflow context --show
|
|
207
|
+
# Should show title, description, criteria
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Try with more detail:**
|
|
211
|
+
```bash
|
|
212
|
+
aiflow prompt bug-fix --detail comprehensive
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Check framework template:**
|
|
216
|
+
```bash
|
|
217
|
+
ls CLAUDE.md
|
|
218
|
+
cat CLAUDE.md | head -20
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### "Prompt has formatting issues"
|
|
222
|
+
|
|
223
|
+
**Save to file instead:**
|
|
224
|
+
```bash
|
|
225
|
+
aiflow prompt bug-fix -o prompt.md
|
|
226
|
+
# Review file before copying
|
|
227
|
+
cat prompt.md
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Copy from file carefully:**
|
|
231
|
+
```bash
|
|
232
|
+
# Ensure all text is selected
|
|
233
|
+
# Including blank lines
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Task Detection
|
|
239
|
+
|
|
240
|
+
### "Task type not detected"
|
|
241
|
+
|
|
242
|
+
**Show detection confidence:**
|
|
243
|
+
```bash
|
|
244
|
+
aiflow detect "Your description" --verbose
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Manually specify type:**
|
|
248
|
+
```bash
|
|
249
|
+
aiflow prompt bug-fix # If you know it's a bug
|
|
250
|
+
aiflow prompt feature # If you know it's a feature
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Lower confidence threshold:**
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"detection": {
|
|
257
|
+
"confidence_threshold": 0.7
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### "Wrong task type detected"
|
|
263
|
+
|
|
264
|
+
**Improve description:**
|
|
265
|
+
```bash
|
|
266
|
+
# Bad: "Something is broken"
|
|
267
|
+
# Better: "Payment processing fails on checkout"
|
|
268
|
+
|
|
269
|
+
aiflow detect "Payment processing fails on checkout" --verbose
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Provide context ticket:**
|
|
273
|
+
```bash
|
|
274
|
+
aiflow use JIRA-123
|
|
275
|
+
# Better context helps detection
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Version Management
|
|
281
|
+
|
|
282
|
+
### "Cannot update to latest"
|
|
283
|
+
|
|
284
|
+
**Check internet connection:**
|
|
285
|
+
```bash
|
|
286
|
+
ping npm.js
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Clear npm cache:**
|
|
290
|
+
```bash
|
|
291
|
+
npm cache clean --force
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Force update:**
|
|
295
|
+
```bash
|
|
296
|
+
aiflow update --force
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### "Want to use older version"
|
|
300
|
+
|
|
301
|
+
**See available versions:**
|
|
302
|
+
```bash
|
|
303
|
+
ls .aiflow/versions/
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Switch to older version:**
|
|
307
|
+
```bash
|
|
308
|
+
aiflow use 0.9.0
|
|
309
|
+
aiflow doctor
|
|
310
|
+
# Verify it works
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### "Updated but changes not appearing"
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
# Update and clear cache
|
|
317
|
+
aiflow update
|
|
318
|
+
|
|
319
|
+
# Verify update
|
|
320
|
+
aiflow doctor
|
|
321
|
+
|
|
322
|
+
# Reload in Claude Code
|
|
323
|
+
# (Close and reopen)
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Skills & Rules
|
|
329
|
+
|
|
330
|
+
### "Custom skill not showing up"
|
|
331
|
+
|
|
332
|
+
**Verify file created:**
|
|
333
|
+
```bash
|
|
334
|
+
ls custom/skills/my-skill/SKILL.md
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**Check file format:**
|
|
338
|
+
```bash
|
|
339
|
+
# Should have frontmatter
|
|
340
|
+
head -5 custom/skills/my-skill/SKILL.md
|
|
341
|
+
# Should show: ---\nname: my-skill
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
**Reload skills:**
|
|
345
|
+
```bash
|
|
346
|
+
aiflow update
|
|
347
|
+
aiflow doctor
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### "Custom rule not applied"
|
|
351
|
+
|
|
352
|
+
**Verify rule file:**
|
|
353
|
+
```bash
|
|
354
|
+
ls custom/rules/my-rule.md
|
|
355
|
+
cat custom/rules/my-rule.md | head -10
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Check rule is in prompt:**
|
|
359
|
+
```bash
|
|
360
|
+
aiflow prompt bug-fix | grep -i "my-rule"
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
**Verify rule syntax:**
|
|
364
|
+
```bash
|
|
365
|
+
# Rules are markdown with examples
|
|
366
|
+
# Check for proper formatting
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Memory System
|
|
372
|
+
|
|
373
|
+
### "Memory not saving"
|
|
374
|
+
|
|
375
|
+
**Check directory exists:**
|
|
376
|
+
```bash
|
|
377
|
+
ls -la .aiflow/memory/
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Create if missing:**
|
|
381
|
+
```bash
|
|
382
|
+
mkdir -p .aiflow/memory
|
|
383
|
+
chmod 755 .aiflow/memory
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Try again:**
|
|
387
|
+
```bash
|
|
388
|
+
aiflow memory --save "test" "value"
|
|
389
|
+
aiflow memory --get "test"
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### "Memory not loading automatically"
|
|
393
|
+
|
|
394
|
+
**Check auto-load enabled:**
|
|
395
|
+
```json
|
|
396
|
+
{
|
|
397
|
+
"memory": {
|
|
398
|
+
"autoLoadRelevant": true
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Manually load relevant memory:**
|
|
404
|
+
```bash
|
|
405
|
+
aiflow memory --search "payment"
|
|
406
|
+
# Then manually reference in prompt
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Health Check
|
|
412
|
+
|
|
413
|
+
### "aiflow doctor shows errors"
|
|
414
|
+
|
|
415
|
+
**Run with fix:**
|
|
416
|
+
```bash
|
|
417
|
+
aiflow doctor --fix
|
|
418
|
+
# Automatically fix common issues
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Reinitialize:**
|
|
422
|
+
```bash
|
|
423
|
+
aiflow init
|
|
424
|
+
# Recreates missing files
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**Detailed check:**
|
|
428
|
+
```bash
|
|
429
|
+
aiflow doctor --verbose
|
|
430
|
+
# Shows detailed checks
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## Performance Issues
|
|
436
|
+
|
|
437
|
+
### "aiflow commands slow"
|
|
438
|
+
|
|
439
|
+
**Check disk I/O:**
|
|
440
|
+
```bash
|
|
441
|
+
# Try on different disk
|
|
442
|
+
# (SSD vs HDD makes difference)
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
**Check file size:**
|
|
446
|
+
```bash
|
|
447
|
+
du -sh .claude/
|
|
448
|
+
du -sh .aiflow/
|
|
449
|
+
# Should be < 100MB combined
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**Clear old contexts:**
|
|
453
|
+
```bash
|
|
454
|
+
aiflow context --clear
|
|
455
|
+
# Removes cached contexts
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### "Context loading slow"
|
|
459
|
+
|
|
460
|
+
**Check MCP timeout:**
|
|
461
|
+
```json
|
|
462
|
+
{
|
|
463
|
+
"mcp": {
|
|
464
|
+
"timeout": 30000
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Use manual context:**
|
|
470
|
+
```bash
|
|
471
|
+
aiflow use --manual
|
|
472
|
+
# Faster than MCP queries
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## Validation & Quality
|
|
478
|
+
|
|
479
|
+
### "Validation is too strict"
|
|
480
|
+
|
|
481
|
+
**Use less strict ruleset:**
|
|
482
|
+
```bash
|
|
483
|
+
aiflow validate output.php --ruleset default
|
|
484
|
+
# Instead of: --ruleset strict
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
**Disable specific rules:**
|
|
488
|
+
```json
|
|
489
|
+
{
|
|
490
|
+
"validationRules": {
|
|
491
|
+
"naming": false,
|
|
492
|
+
"codeStyle": true
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
### "Validation not catching issues"
|
|
498
|
+
|
|
499
|
+
**Use strict ruleset:**
|
|
500
|
+
```bash
|
|
501
|
+
aiflow validate output.php --ruleset strict
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
**Add custom rules:**
|
|
505
|
+
```bash
|
|
506
|
+
touch custom/rules/my-strict-rule.md
|
|
507
|
+
aiflow update
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
## Claude Code Integration
|
|
513
|
+
|
|
514
|
+
### "Claude doesn't detect skill"
|
|
515
|
+
|
|
516
|
+
**Verify skill is in `.claude/skills/`:**
|
|
517
|
+
```bash
|
|
518
|
+
ls .claude/skills/investigate-bug/
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
**Check CLAUDE.md includes context:**
|
|
522
|
+
```bash
|
|
523
|
+
cat CLAUDE.md | head -20
|
|
524
|
+
# Should reference skills
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
**Update Claude Code:**
|
|
528
|
+
- Close Claude Code
|
|
529
|
+
- `aiflow update`
|
|
530
|
+
- Reopen Claude Code
|
|
531
|
+
|
|
532
|
+
### "AI not following team rules"
|
|
533
|
+
|
|
534
|
+
**Verify rules in `.rules/`:**
|
|
535
|
+
```bash
|
|
536
|
+
ls .rules/
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
**Check CLAUDE.md loaded:**
|
|
540
|
+
```bash
|
|
541
|
+
cat CLAUDE.md | grep -i "rule"
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
**Refresh Claude Code:**
|
|
545
|
+
- Close and reopen
|
|
546
|
+
- Run `aiflow doctor` to verify setup
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
## Getting More Help
|
|
551
|
+
|
|
552
|
+
1. **Check logs:**
|
|
553
|
+
```bash
|
|
554
|
+
aiflow doctor --verbose
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
2. **Check documentation:**
|
|
558
|
+
```bash
|
|
559
|
+
cat docs/getting-started.md
|
|
560
|
+
cat docs/architecture.md
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
3. **Verify setup:**
|
|
564
|
+
```bash
|
|
565
|
+
aiflow doctor
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
4. **Ask for help:**
|
|
569
|
+
- Create an issue on GitHub
|
|
570
|
+
- Check existing issues/discussions
|
|
571
|
+
- Contact team lead
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## Quick Fixes Checklist
|
|
576
|
+
|
|
577
|
+
- [ ] `npm install -g ai-flow-kit` — Fresh install
|
|
578
|
+
- [ ] `aiflow update` — Update to latest
|
|
579
|
+
- [ ] `aiflow doctor` — Verify setup
|
|
580
|
+
- [ ] `aiflow doctor --fix` — Auto-fix issues
|
|
581
|
+
- [ ] `aiflow init --framework <name>` — Reinitialize
|
|
582
|
+
- [ ] Clear contexts: `aiflow context --clear`
|
|
583
|
+
- [ ] Restart Claude Code — Reload configuration
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
**Still stuck?** Check [Getting Started](./getting-started.md) or create an issue. 🆘
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Bug Fix Workflow
|
|
2
|
+
|
|
3
|
+
> See the full workflow at [AIFLOW.md](../../AIFLOW.md)
|
|
4
|
+
> **Gates must pass in order: 1 → 2 → 3 → 4 → 5**
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Step 1: Load ticket & AI analyzes (Gate 1)
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
aiflow use PROJ-33 --with-comments # get both comments — important for bugs
|
|
12
|
+
claude # AI auto-starts Gate 1
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
AI will **automatically**:
|
|
16
|
+
1. Load ticket info + comments from Backlog/Jira
|
|
17
|
+
2. Read source code — trace data flow related to the bug
|
|
18
|
+
3. Use `superpowers:systematic-debugging` to form root cause hypothesis
|
|
19
|
+
4. Ask clarifying questions if reproduction steps are unclear
|
|
20
|
+
5. Output `plan/[ticket-id]/requirement.md` containing:
|
|
21
|
+
- Bug analysis (current vs expected behavior)
|
|
22
|
+
- **Root cause hypothesis** with evidence from source code
|
|
23
|
+
- **Proposed fix approach** (with alternatives if applicable)
|
|
24
|
+
- **Impact analysis** — will the fix break anything else?
|
|
25
|
+
- **Effort estimate** (S/M/L/XL)
|
|
26
|
+
- Testing plan (reproduce bug + verify fix)
|
|
27
|
+
|
|
28
|
+
**PM needs to prepare on the ticket:**
|
|
29
|
+
```markdown
|
|
30
|
+
## Description
|
|
31
|
+
Bug description: current behavior vs expected.
|
|
32
|
+
|
|
33
|
+
## Acceptance Criteria
|
|
34
|
+
- [ ] Bug no longer occurs
|
|
35
|
+
- [ ] [Other specific conditions]
|
|
36
|
+
|
|
37
|
+
## Reproduction Steps
|
|
38
|
+
1. [Step 1]
|
|
39
|
+
2. [Step 2]
|
|
40
|
+
3. Actual result: [what error, what screen]
|
|
41
|
+
4. Expected result: [...]
|
|
42
|
+
|
|
43
|
+
## Context
|
|
44
|
+
Error log (if any), environment (browser, OS, app version).
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**If reproduction steps are unclear:** AI will ask based on what it found in the code.
|
|
48
|
+
|
|
49
|
+
**When satisfied with the requirement document, type:**
|
|
50
|
+
```
|
|
51
|
+
APPROVED
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Step 2: Review Implementation Plan (Gate 2)
|
|
57
|
+
|
|
58
|
+
AI generates:
|
|
59
|
+
- TDD plan: write test to reproduce bug → implement fix → verify
|
|
60
|
+
- Minimal fix approach (only edit the bug location)
|
|
61
|
+
|
|
62
|
+
**When agreed, type:**
|
|
63
|
+
```
|
|
64
|
+
APPROVED
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Step 3: AI Fix Code (Gate 3)
|
|
70
|
+
|
|
71
|
+
AI performs in the following order:
|
|
72
|
+
1. `superpowers:systematic-debugging` — confirm root cause
|
|
73
|
+
2. `investigate-bug` skill — trace Controller→Service→Repository to identify the bug layer
|
|
74
|
+
3. Write test to reproduce bug → run → confirm FAIL
|
|
75
|
+
4. Implement fix → tests PASS
|
|
76
|
+
5. Commit
|
|
77
|
+
|
|
78
|
+
**Principle:** Minimal fix — only edit the bug location, no extra changes.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Step 4: Review Summary (Gate 4)
|
|
83
|
+
|
|
84
|
+
AI runs:
|
|
85
|
+
1. `superpowers:verification-before-completion` — all tests PASS (including old tests)
|
|
86
|
+
2. `impact-analysis` — fix doesn't cause new bugs elsewhere
|
|
87
|
+
3. Create `plan/[ticket-id]/summary.md`
|
|
88
|
+
|
|
89
|
+
**If OK, type:**
|
|
90
|
+
```
|
|
91
|
+
APPROVED
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**If the fix is incorrect:**
|
|
95
|
+
```
|
|
96
|
+
BUG: [describe specifically what is wrong]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Step 5: Peer Review & PR (Gate 5)
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
git push origin fix/PROJ-33-description
|
|
105
|
+
# PR title: fix: [PROJ-33] Short description
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Commit message format:
|
|
109
|
+
```
|
|
110
|
+
fix: [PROJ-33] Payment processing timeout
|
|
111
|
+
|
|
112
|
+
Root cause: API timeout too short (5s), needs at least 10s
|
|
113
|
+
Fix: Increase timeout + add retry logic
|
|
114
|
+
|
|
115
|
+
Closes PROJ-33
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Completion Checklist
|
|
121
|
+
|
|
122
|
+
- [ ] Gate 1 APPROVED — requirement doc with root cause, fix approach, impact, estimate
|
|
123
|
+
- [ ] Gate 2 APPROVED — implementation plan confirmed
|
|
124
|
+
- [ ] Gate 3 done — test reproduce bug + fix → green
|
|
125
|
+
- [ ] Gate 4 APPROVED — no regression
|
|
126
|
+
- [ ] Gate 5 done — PR merged
|