@eltonssouza/development-utility-kit 0.10.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.
Files changed (131) hide show
  1. package/.claude/agents/README.md +24 -0
  2. package/.claude/agents/analyst.md +198 -0
  3. package/.claude/agents/backend-developer.md +126 -0
  4. package/.claude/agents/brain-keeper.md +229 -0
  5. package/.claude/agents/code-reviewer.md +181 -0
  6. package/.claude/agents/database-engineer.md +94 -0
  7. package/.claude/agents/devops-engineer.md +141 -0
  8. package/.claude/agents/frontend-developer.md +97 -0
  9. package/.claude/agents/gate-keeper.md +118 -0
  10. package/.claude/agents/migrator.md +291 -0
  11. package/.claude/agents/mobile-developer.md +80 -0
  12. package/.claude/agents/n8n-specialist.md +94 -0
  13. package/.claude/agents/product-owner.md +115 -0
  14. package/.claude/agents/qa-engineer.md +232 -0
  15. package/.claude/agents/release-engineer.md +204 -0
  16. package/.claude/agents/scaffold.md +87 -0
  17. package/.claude/agents/security-engineer.md +199 -0
  18. package/.claude/agents/sprint-runner.md +46 -0
  19. package/.claude/agents/stack-resolver.md +104 -0
  20. package/.claude/agents/tech-lead.md +182 -0
  21. package/.claude/agents/update-template.md +54 -0
  22. package/.claude/agents/ux-designer.md +118 -0
  23. package/.claude/hooks/flow-guard.js +261 -0
  24. package/.claude/hooks/flow-state.js +197 -0
  25. package/.claude/local/CLAUDE.md +71 -0
  26. package/.claude/settings.json +55 -0
  27. package/.claude/skills/README.md +331 -0
  28. package/.claude/skills/active-project/SKILL.md +131 -0
  29. package/.claude/skills/api-integration-test/SKILL.md +84 -0
  30. package/.claude/skills/auto-test-guard/SKILL.md +239 -0
  31. package/.claude/skills/auto-test-guard/resources/backend-tests.md +20 -0
  32. package/.claude/skills/auto-test-guard/resources/e2e-tests.md +24 -0
  33. package/.claude/skills/auto-test-guard/resources/execution-report.md +49 -0
  34. package/.claude/skills/auto-test-guard/resources/frontend-tests.md +18 -0
  35. package/.claude/skills/auto-test-guard/resources/initial-setup.md +108 -0
  36. package/.claude/skills/auto-test-guard/resources/run-suite.md +48 -0
  37. package/.claude/skills/auto-test-guard/resources/senior-gate.md +19 -0
  38. package/.claude/skills/brain-keeper/SKILL.md +62 -0
  39. package/.claude/skills/brain-keeper/obsidian/app.json +9 -0
  40. package/.claude/skills/brain-keeper/obsidian/appearance.json +4 -0
  41. package/.claude/skills/brain-keeper/obsidian/core-plugins.json +20 -0
  42. package/.claude/skills/brain-keeper/obsidian/daily-notes.json +5 -0
  43. package/.claude/skills/brain-keeper/obsidian/graph.json +32 -0
  44. package/.claude/skills/brain-keeper/obsidian/snippets/folder-colors.css +90 -0
  45. package/.claude/skills/brain-keeper/obsidian/templates.json +5 -0
  46. package/.claude/skills/brain-keeper/templates/README.md +51 -0
  47. package/.claude/skills/brain-keeper/templates/adr.md +40 -0
  48. package/.claude/skills/brain-keeper/templates/bug.md +35 -0
  49. package/.claude/skills/brain-keeper/templates/daily.md +38 -0
  50. package/.claude/skills/brain-keeper/templates/feature.md +62 -0
  51. package/.claude/skills/brain-keeper/templates/meeting.md +34 -0
  52. package/.claude/skills/brain-keeper/templates/tech-debt.md +21 -0
  53. package/.claude/skills/caveman/SKILL.md +189 -0
  54. package/.claude/skills/create-stack-pack/SKILL.md +281 -0
  55. package/.claude/skills/grill-me/SKILL.md +80 -0
  56. package/.claude/skills/pair-debug/SKILL.md +288 -0
  57. package/.claude/skills/prd-ready-check/SKILL.md +86 -0
  58. package/.claude/skills/project-manager/SKILL.md +334 -0
  59. package/.claude/skills/quality-standards/SKILL.md +203 -0
  60. package/.claude/skills/quick-feature/SKILL.md +266 -0
  61. package/.claude/skills/run-sprint/SKILL.md +41 -0
  62. package/.claude/skills/scaffold/SKILL.md +60 -0
  63. package/.claude/skills/stack-discovery/SKILL.md +161 -0
  64. package/.claude/skills/test-coverage-auditor/SKILL.md +87 -0
  65. package/.claude/skills/to-issues/SKILL.md +163 -0
  66. package/.claude/skills/to-prd/SKILL.md +130 -0
  67. package/.claude/skills/update-template/SKILL.md +256 -0
  68. package/.claude/stacks/CODEOWNERS +30 -0
  69. package/.claude/stacks/README.md +97 -0
  70. package/.claude/stacks/_template.md +116 -0
  71. package/.claude/stacks/dotnet/aspire-9.md +528 -0
  72. package/.claude/stacks/go/gin-1.10.md +570 -0
  73. package/.claude/stacks/java/spring-boot-3.md +376 -0
  74. package/.claude/stacks/java/spring-boot-4.md +438 -0
  75. package/.claude/stacks/node/express-5.md +538 -0
  76. package/.claude/stacks/python/django-5.md +483 -0
  77. package/.claude/stacks/python/fastapi-0.115.md +522 -0
  78. package/.claude/stacks/typescript/angular-18.md +420 -0
  79. package/.claude/stacks/typescript/angular-19.md +397 -0
  80. package/.claude/stacks/typescript/angular-21.md +494 -0
  81. package/CLAUDE.md +472 -0
  82. package/README.md +412 -0
  83. package/bin/cli.js +848 -0
  84. package/bin/lib/adr.js +146 -0
  85. package/bin/lib/backup.js +62 -0
  86. package/bin/lib/detect-stack.js +476 -0
  87. package/bin/lib/doctor.js +527 -0
  88. package/bin/lib/help.js +328 -0
  89. package/bin/lib/identity.js +108 -0
  90. package/bin/lib/lint-allowlist.json +15 -0
  91. package/bin/lib/lint.js +798 -0
  92. package/bin/lib/local-dir.js +68 -0
  93. package/bin/lib/manifest.js +236 -0
  94. package/bin/lib/sync-all.js +394 -0
  95. package/bin/lib/version-check.js +398 -0
  96. package/dashboard/db.js +321 -0
  97. package/dashboard/package.json +22 -0
  98. package/dashboard/public/app.js +853 -0
  99. package/dashboard/public/content/docs/agents-reference.en.md +911 -0
  100. package/dashboard/public/content/docs/architecture-overview.en.md +252 -0
  101. package/dashboard/public/content/docs/autonomy-matrix.en.md +186 -0
  102. package/dashboard/public/content/docs/cli-reference.en.md +538 -0
  103. package/dashboard/public/content/docs/git-flow.en.md +525 -0
  104. package/dashboard/public/content/docs/honcho-memory.en.md +394 -0
  105. package/dashboard/public/content/docs/hooks-reference.en.md +404 -0
  106. package/dashboard/public/content/docs/pipeline.en.md +414 -0
  107. package/dashboard/public/content/docs/plugins.en.md +289 -0
  108. package/dashboard/public/content/docs/quality-gate.en.md +315 -0
  109. package/dashboard/public/content/docs/skills-reference.en.md +484 -0
  110. package/dashboard/public/content/docs/stack-rules.en.md +362 -0
  111. package/dashboard/public/content/docs/troubleshooting.en.md +565 -0
  112. package/dashboard/public/content/manifest.json +114 -0
  113. package/dashboard/public/content/manual/backend.en.md +1053 -0
  114. package/dashboard/public/content/manual/existing-project.en.md +848 -0
  115. package/dashboard/public/content/manual/frontend.en.md +1008 -0
  116. package/dashboard/public/content/manual/fullstack.en.md +1459 -0
  117. package/dashboard/public/content/manual/mobile.en.md +837 -0
  118. package/dashboard/public/content/manual/quickstart.en.md +169 -0
  119. package/dashboard/public/index.html +217 -0
  120. package/dashboard/public/style.css +857 -0
  121. package/dashboard/public/vendor/marked.min.js +69 -0
  122. package/dashboard/rtk.js +143 -0
  123. package/dashboard/server-app.js +421 -0
  124. package/dashboard/server.js +104 -0
  125. package/dashboard/test/sprint1.test.js +406 -0
  126. package/dashboard/test/sprint2.test.js +571 -0
  127. package/dashboard/test/sprint3.test.js +560 -0
  128. package/package.json +33 -0
  129. package/scripts/hooks/subagent-telemetry.sh +14 -0
  130. package/scripts/hooks/telemetry-writer.js +250 -0
  131. package/scripts/latest-versions.json +56 -0
@@ -0,0 +1,565 @@
1
+ # Troubleshooting
2
+
3
+ Consolidated FAQ and problem-solving guide for `development-utility-kit`. Covers skills, agents, hooks, stacks (backend, frontend, mobile, fullstack), adopting existing projects, the senior+ gate, and Git Flow.
4
+
5
+ > **Principle**: try the specialist agent for the area first. Only escalate to a human in the 4 Product Owner situations or 3 Tech Lead situations described at the end of this document.
6
+
7
+ Each item follows the pattern:
8
+
9
+ - **Symptom** — what you see.
10
+ - **Cause** — why it happens.
11
+ - **Solution** — command or step-by-step.
12
+
13
+ ## Skills
14
+
15
+ ### Skill does not trigger on a trigger phrase
16
+
17
+ - **Symptom**: you write "audit coverage" but `test-coverage-auditor` does not run.
18
+ - **Cause**: the skill's frontmatter `description` does not exactly match the phrase you used. Matching is keyword-based on the frontmatter.
19
+ - **Solution**: open `.claude/skills/<skill>/SKILL.md`, read the `description`, adjust your phrase, or edit the description to include the synonym:
20
+ ```bash
21
+ cat .claude/skills/test-coverage-auditor/SKILL.md | head -20
22
+ ```
23
+ Restart the session after editing the frontmatter.
24
+
25
+ ### Specific skill overridden by `project-manager`
26
+
27
+ - **Symptom**: when asking "review code", `project-manager` (catch-all) answers instead of the more specific skill.
28
+ - **Cause**: no specific skill matched the exact phrase; the catch-all takes over.
29
+ - **Solution**: prefer the canonical phrase from the skill (see the "Skills" table in `CLAUDE.md`). E.g., for PR review use "review the PR" or "audit this change". A more specific skill always wins on match.
30
+
31
+ ### `caveman` cutting too much substance
32
+
33
+ - **Symptom**: responses become so telegraphic they omit necessary context.
34
+ - **Cause**: caveman is in ULTRA mode (default for code).
35
+ - **Solution**: downgrade explicitly:
36
+ ```
37
+ caveman lite
38
+ ```
39
+ or turn it off entirely:
40
+ ```
41
+ stop caveman
42
+ ```
43
+ Re-enable when you want: `caveman full`.
44
+
45
+ ## Agents
46
+
47
+ ### Agent `analyst` returns "Discovery artifact missing"
48
+
49
+ - **Symptom**: when asking "break into PLAN", `analyst` refuses with a message about a discovery artifact.
50
+ - **Cause**: ADR-013/ADR-017 require `docs/discovery/DISCOVERY_*.md` produced by `grill-me` before `analyst` can be invoked by a human.
51
+ - **Solution**:
52
+ ```
53
+ grill-me
54
+ ```
55
+ Answer the interview; `grill-me` generates `DISCOVERY_*.md` and hands off to `analyst` automatically. Autonomous callers (`sprint-runner`, `release-engineer`) are exempt.
56
+
57
+ ### `sprint-runner` stopped mid-checkpoint
58
+
59
+ - **Symptom**: the agent stopped after Sprint X and did not resume Sprint X+1.
60
+ - **Cause**: intermittent error or session token limit.
61
+ - **Solution**: continue manually:
62
+ ```
63
+ run sprint X+1
64
+ ```
65
+ If it persists, read the latest `PLAN_*.md` to understand where it stopped and open a ticket.
66
+
67
+ ### `tech-lead` does not approve merge
68
+
69
+ - **Symptom**: PR stays in "changes requested" without approval.
70
+ - **Cause**: senior+ gate failed OR a convention is violated (separate Angular files, commit with AI reference, etc.).
71
+ - **Solution**: read the `tech-lead`'s diagnosis in the PR comment. Send back to the indicated developer (`backend-developer`, `frontend-developer`) with the requested fix. Do not manually approve.
72
+
73
+ ### Agent chosen by `project-manager` seems wrong
74
+
75
+ - **Symptom**: you asked "design DB" and it triggered `backend-developer` instead of `database-engineer`.
76
+ - **Cause**: ambiguous keyword.
77
+ - **Solution**: be explicit: "use database-engineer to design schema for X". `project-manager` accepts override.
78
+
79
+ ### Agent escalates directly to human unnecessarily
80
+
81
+ - **Symptom**: specialist asks "what's your preference?" instead of deciding.
82
+ - **Cause**: violation of the Autonomy Matrix.
83
+ - **Solution**: reply "you decide" and cite the rule. If it persists, open a ticket — it may be drift in the agent prompt.
84
+
85
+ ## Hooks (Claude Code)
86
+
87
+ > These are Claude Code hooks (`PostToolUse`, `UserPromptSubmit`, etc.), different from git hooks (see [Git Flow](git-flow)).
88
+
89
+ ### Hook blocks every write
90
+
91
+ - **Symptom**: every `Write` call returns a hook error.
92
+ - **Cause**: `pre-push-guard.sh` or another script exited with exit != 0; or the script path in `settings.json` is invalid.
93
+ - **Solution**: read hook stderr in the log. Check the script's exit code. Edit `.claude/settings.json` and temporarily disable:
94
+ ```json
95
+ "hooks": {
96
+ "PostToolUse": []
97
+ }
98
+ ```
99
+
100
+ ### Hook script not found
101
+
102
+ - **Symptom**: `python3: can't open file '.../scripts/check-sql-files.py'` or similar.
103
+ - **Cause**: `settings.json` references up to 5 scripts in `scripts/hooks/` that were not created yet in the project.
104
+ - **Solution**: create the script with a stub that returns 0:
105
+ ```python
106
+ #!/usr/bin/env python3
107
+ # stub hook — replace with real validation later
108
+ import sys
109
+ sys.exit(0)
110
+ ```
111
+ Or remove the entry from `settings.json` if the hook is not needed in this project.
112
+
113
+ ### `${CLAUDE_PLUGIN_ROOT}` not resolved
114
+
115
+ - **Symptom**: the path appears literal in logs (with `${CLAUDE_PLUGIN_ROOT}` instead of expanded value).
116
+ - **Cause**: the plugin's environment variable is not available on the machine/session.
117
+ - **Solution**: two options:
118
+ 1. Export the variable before starting Claude:
119
+ ```bash
120
+ export CLAUDE_PLUGIN_ROOT=/path/to/development-utility-kit
121
+ ```
122
+ 2. Remove the hook from `settings.json` if it is not required locally.
123
+
124
+ ### Prettier fails in `PostToolUse`
125
+
126
+ - **Symptom**: format hook fails with `prettier: command not found`.
127
+ - **Cause**: `node_modules/.bin/prettier` does not exist.
128
+ - **Solution**:
129
+ ```bash
130
+ npm install --save-dev prettier
131
+ npx prettier --version # confirm installation
132
+ ```
133
+
134
+ ### Hook runs in an infinite loop
135
+
136
+ - **Symptom**: PostToolUse hook re-triggers when it edits the same file it observes.
137
+ - **Cause**: the hook writes to the same path it watches.
138
+ - **Solution**: add a `matcher` filter in `settings.json` to exclude the tool type, or use timestamp/flag guarding.
139
+
140
+ ## Backend (Java 25 + Spring Boot 4)
141
+
142
+ ### Port 8080 in use
143
+
144
+ - **Symptom**: `Web server failed to start. Port 8080 was already in use.`
145
+ - **Cause**: another process (another app, container) occupies the port.
146
+ - **Solution**:
147
+ ```bash
148
+ # Linux/Mac
149
+ lsof -i :8080 | grep LISTEN
150
+ # Windows (PowerShell)
151
+ netstat -ano | findstr :8080
152
+ taskkill /PID <pid> /F
153
+ ```
154
+ Or change `server.port` in `application.yml`.
155
+
156
+ ### Wrong JDK (different version than required)
157
+
158
+ - **Symptom**: compile errors like `record` not recognized, or `release version X not supported`.
159
+ - **Cause**: active JDK is < 25.
160
+ - **Solution** (sdkman):
161
+ ```bash
162
+ sdk list java | grep 25
163
+ sdk install java 25.0.1-tem
164
+ sdk use java 25.0.1-tem
165
+ java -version # must show 25
166
+ ```
167
+
168
+ ### Flyway lock stuck
169
+
170
+ - **Symptom**: migrations do not run and the log shows `unable to acquire lock`.
171
+ - **Cause**: a previous process died without releasing the lock in `flyway_schema_history`.
172
+ - **Solution**:
173
+ ```bash
174
+ ./mvnw flyway:repair
175
+ ```
176
+ Or via SQL:
177
+ ```sql
178
+ DELETE FROM flyway_schema_history WHERE success = false;
179
+ ```
180
+
181
+ ### CORS blocking in production
182
+
183
+ - **Symptom**: frontend receives missing `Access-Control-Allow-Origin`.
184
+ - **Cause**: `SecurityFilterChain` with `*` in dev but restricted in prod, or missing CORS config.
185
+ - **Solution**: never use `*` in prod. Configure explicit domains:
186
+ ```java
187
+ config.setAllowedOrigins(List.of("https://app.company.com"));
188
+ ```
189
+
190
+ ### Secret in code
191
+
192
+ - **Symptom**: `security-engineer` or `gate-keeper` blocks PR with credential detected message.
193
+ - **Cause**: password, token, or key hardcoded in `.java`, `.yml`, `.properties`.
194
+ - **Solution**: move to env var or Vault. Rewrite history if the secret was already committed:
195
+ ```bash
196
+ git filter-repo --invert-paths --path <file>
197
+ ```
198
+ And revoke the secret at the provider immediately.
199
+
200
+ ### Testcontainers do not start in CI
201
+
202
+ - **Symptom**: `Could not find a valid Docker environment` in GitHub Actions.
203
+ - **Cause**: runner without Docker in daemon mode.
204
+ - **Solution**: use `ubuntu-latest` (has Docker), or run `docker info` in a step before `mvn verify`.
205
+
206
+ ## Frontend (Angular 21)
207
+
208
+ ### HMR not refreshing
209
+
210
+ - **Symptom**: saving file does not reload the browser.
211
+ - **Cause**: filesystem watch does not trigger (WSL, Docker volume, polling required).
212
+ - **Solution**:
213
+ ```bash
214
+ npm start -- --poll=500
215
+ ```
216
+
217
+ ### Signal does not dispatch — `OnPush` stale
218
+
219
+ - **Symptom**: state changed but component does not re-render.
220
+ - **Cause**: you mutated the array instead of creating a new reference (`signal().push(item)`).
221
+ - **Solution**:
222
+ ```ts
223
+ // Wrong
224
+ this.items().push(newItem);
225
+ // Right
226
+ this.items.update(arr => [...arr, newItem]);
227
+ // Or
228
+ this.items.set([...this.items(), newItem]);
229
+ ```
230
+
231
+ ### `ChangeDetectorRef.markForCheck()` abuse
232
+
233
+ - **Symptom**: you need to call `cdr.markForCheck()` everywhere.
234
+ - **Cause**: Signals are not being used — you are still in old zone.js pattern.
235
+ - **Solution**: refactor state management to use Signals consistently. They propagate changes automatically in `OnPush`.
236
+
237
+ ### Bundle > 500KB
238
+
239
+ - **Symptom**: build warning about exceeded bundle budget.
240
+ - **Cause**: heavy imports, large dependencies, no lazy loading.
241
+ - **Solution**:
242
+ ```bash
243
+ npm run build -- --stats-json
244
+ npx webpack-bundle-analyzer dist/browser/stats.json
245
+ ```
246
+ Identify heavy imports, fragment into lazy routes, remove unused dependencies.
247
+
248
+ ### E2E timeout (Playwright)
249
+
250
+ - **Symptom**: `Test timeout of 30000ms exceeded`.
251
+ - **Cause**: browser not installed, app slow to start, wrong selector.
252
+ - **Solution**:
253
+ ```bash
254
+ npx playwright install --with-deps
255
+ ```
256
+ Increase the timeout in `playwright.config.ts` only if the app is legitimately slow:
257
+ ```ts
258
+ timeout: 60_000
259
+ ```
260
+
261
+ ### `templateUrl` pointing to missing file
262
+
263
+ - **Symptom**: build breaks with `ENOENT: no such file 'name.html'`.
264
+ - **Cause**: someone tried inline template and broke it. Reminder: three separate files are **mandatory**.
265
+ - **Solution**: create `name.html` and `name.scss` next to `name.ts`, and use:
266
+ ```ts
267
+ @Component({
268
+ templateUrl: './name.html',
269
+ styleUrl: './name.scss'
270
+ })
271
+ ```
272
+
273
+ ## Mobile (React Native + Expo)
274
+
275
+ ### `pod install` fails (iOS)
276
+
277
+ - **Symptom**: pod version or checksum errors.
278
+ - **Solution**:
279
+ ```bash
280
+ cd ios && pod install --repo-update
281
+ # If it persists:
282
+ rm -rf ios/Pods ios/Podfile.lock
283
+ cd ios && pod install
284
+ ```
285
+
286
+ ### Gradle daemon stuck (Android)
287
+
288
+ - **Symptom**: build hangs at `Daemon will be stopped`.
289
+ - **Solution**:
290
+ ```bash
291
+ cd android && ./gradlew --stop
292
+ ./gradlew clean
293
+ npx expo run:android
294
+ ```
295
+
296
+ ### Metro cache corrupted
297
+
298
+ - **Symptom**: app starts with `Cannot find module` error.
299
+ - **Solution**:
300
+ ```bash
301
+ npx expo start --clear
302
+ # Or force full cleanup:
303
+ watchman watch-del-all
304
+ rm -rf $TMPDIR/metro-*
305
+ npx expo start --clear
306
+ ```
307
+
308
+ ### `AsyncStorage` deprecated
309
+
310
+ - **Symptom**: warning about core AsyncStorage.
311
+ - **Cause**: native package removed in RN 0.73+.
312
+ - **Solution**:
313
+ ```bash
314
+ npm install @react-native-async-storage/async-storage
315
+ ```
316
+ And adjust imports.
317
+
318
+ ### Library incompatible with New Architecture
319
+
320
+ - **Symptom**: app crashes at runtime with TurboModule error.
321
+ - **Cause**: lib still uses legacy bridge.
322
+ - **Solution**: check compatibility on `reactnative.directory` (filter "New Architecture"). Use `npx react-native-community-upgrade-helper` for breaking changes in your version.
323
+
324
+ ## Fullstack
325
+
326
+ ### CORS blocking Angular -> Spring
327
+
328
+ - **Symptom**: missing `Access-Control-Allow-Origin` in front-end calls.
329
+ - **Cause**: `CorsConfig` in the backend does not include `http://localhost:4200`.
330
+ - **Solution**: add to `WebMvcConfigurer` or `SecurityFilterChain`:
331
+ ```java
332
+ config.setAllowedOrigins(List.of("http://localhost:4200"));
333
+ config.setAllowedMethods(List.of("GET","POST","PUT","DELETE","PATCH"));
334
+ config.setAllowCredentials(true);
335
+ ```
336
+
337
+ ### TS types out of sync with backend
338
+
339
+ - **Symptom**: frontend interface differs from real payload.
340
+ - **Cause**: backend contract changed but types were not regenerated.
341
+ - **Solution**:
342
+ ```bash
343
+ npx openapi-typescript http://localhost:8080/v3/api-docs -o src/types/api.d.ts
344
+ ```
345
+ Add this step to CI so it fails when the contract changes without type updates.
346
+
347
+ ### Docker compose network — frontend cannot reach backend
348
+
349
+ - **Symptom**: frontend returns `ECONNREFUSED` or `getaddrinfo ENOTFOUND backend`.
350
+ - **Cause**: frontend uses `localhost` instead of the Docker service name.
351
+ - **Solution**: inside the Docker network, use the service name:
352
+ ```yaml
353
+ environment:
354
+ API_URL: http://backend:8080
355
+ ```
356
+ In the dev's browser, use `http://localhost:8080` (exposed port).
357
+
358
+ ### Backend starts after frontend
359
+
360
+ - **Symptom**: frontend loads before backend is ready and breaks.
361
+ - **Cause**: `depends_on` without a healthcheck condition.
362
+ - **Solution**: add `HEALTHCHECK` in the backend Dockerfile and use `condition: service_healthy`:
363
+ ```yaml
364
+ depends_on:
365
+ backend:
366
+ condition: service_healthy
367
+ ```
368
+
369
+ ### Port 4200 already in use
370
+
371
+ - **Solution**:
372
+ ```bash
373
+ npm start -- --port 4201
374
+ ```
375
+
376
+ ## Adopting an existing project
377
+
378
+ ### `update-template` destroyed custom rules
379
+
380
+ - **Symptom**: your `CLAUDE.md` was reset to default, losing the `Project Identity` section.
381
+ - **Cause**: merge failed to preserve the custom section.
382
+ - **Solution**: restore from backup:
383
+ ```bash
384
+ ls CLAUDE.md.bak.*
385
+ cp CLAUDE.md.bak.2026-05-26 CLAUDE.md
386
+ ```
387
+ Reapply customization manually by comparing with the new template.
388
+
389
+ ### Vault without `.obsidian/`
390
+
391
+ - **Symptom**: `brain-keeper` does not write into `docs/brain/`.
392
+ - **Cause**: Obsidian vault structure was not created.
393
+ - **Solution**:
394
+ ```bash
395
+ mkdir -p docs/brain/.obsidian
396
+ ```
397
+ Run `brain-keeper` again.
398
+
399
+ ### Agents with wrong path
400
+
401
+ - **Symptom**: agent references missing file in `.claude/agents/`.
402
+ - **Cause**: `active-project` failed partially.
403
+ - **Solution**:
404
+ ```bash
405
+ duk active-project <path> --force
406
+ ```
407
+
408
+ ### `settings.json` merge conflicts
409
+
410
+ - **Symptom**: duplicated or missing hooks after `update-template`.
411
+ - **Cause**: file is not automatically merged — it overwrites.
412
+ - **Solution**: manually compare with `.claude/settings.json.bak.*` and preserve local rules.
413
+
414
+ ## Senior+ gate / quality
415
+
416
+ ### Coverage < 85%
417
+
418
+ - **Symptom**: `gate-keeper` failed with "Backend coverage (lines) 78% < 85%".
419
+ - **Cause**: new files without tests, or uncovered paths.
420
+ - **Solution**: call `qa-engineer` or let `gate-keeper` generate missing tests automatically. Per-file coverage:
421
+ ```bash
422
+ ./mvnw jacoco:report
423
+ open target/site/jacoco/index.html
424
+ ```
425
+
426
+ ### Mutation score < 70%
427
+
428
+ - **Symptom**: PIT failed with mutation < 70% in `domain/` or `application/`.
429
+ - **Cause**: tests exist but do not kill mutations — usually weak asserts.
430
+ - **Solution**:
431
+ ```bash
432
+ ./mvnw verify -Ppitest
433
+ open target/pit-reports/index.html
434
+ ```
435
+ Strengthen asserts (use `assertThat(...).isEqualTo(...)` instead of `assertNotNull`).
436
+
437
+ ### Lighthouse < 0.80
438
+
439
+ - **Symptom**: gate fails on performance.
440
+ - **Cause**: LCP, CLS, or TBT above threshold.
441
+ - **Solution**: analyze each metric:
442
+ - LCP > 2500ms: heavy hero image, custom font without `font-display: swap`.
443
+ - CLS > 0.1: images without `width/height` causing layout shift.
444
+ - TBT > 300ms: large JS bundle, insufficient lazy loading.
445
+
446
+ ### A11y violations serious/critical
447
+
448
+ - **Symptom**: jest-axe or playwright-axe failed.
449
+ - **Cause**: insufficient contrast, missing label, broken tab order.
450
+ - **Solution**: read the axe report. Each violation has a link to WCAG. Fix in the component — `ux-designer` can help.
451
+
452
+ ### SpotBugs CRITICAL
453
+
454
+ - **Symptom**: build fails with critical SpotBugs bug.
455
+ - **Solution**:
456
+ ```bash
457
+ ./mvnw spotbugs:gui
458
+ ```
459
+ Investigate every CRITICAL/HIGH. Do not ignore — fix or justify in `@SuppressFBWarnings` with a clear reason.
460
+
461
+ ### `npm audit` HIGH/CRITICAL
462
+
463
+ - **Symptom**: gate fails on dependency vulnerability.
464
+ - **Solution**:
465
+ ```bash
466
+ npm audit fix
467
+ # For vulns requiring breaking change:
468
+ npm audit fix --force # caution, may bump major
469
+ ```
470
+
471
+ ## Git Flow / commits
472
+
473
+ ### Commit with "Claude" / "Anthropic" / "AI" in the body
474
+
475
+ - **Symptom**: `tech-lead` blocked the PR for commit restriction.
476
+ - **Cause**: violation of the non-negotiable rule documented in [Git Flow](git-flow).
477
+ - **Solution**: rewrite history:
478
+ ```bash
479
+ # Latest commit:
480
+ git commit --amend
481
+ # Several commits:
482
+ git rebase -i HEAD~N
483
+ # Mark each as `reword`, save, edit the message.
484
+ ```
485
+ If already pushed on your own branch:
486
+ ```bash
487
+ git push --force-with-lease origin feature/<your-branch>
488
+ ```
489
+
490
+ ### PR rejected by `tech-lead`
491
+
492
+ - **Symptom**: review with "changes requested".
493
+ - **Cause**: senior+ gate failed, convention violated, or the separate-Angular-files rule broken.
494
+ - **Solution**: read the `tech-lead`'s inline diagnosis on the PR. Send back to the indicated developer with the fix. Do not force the merge.
495
+
496
+ ### Wrong target branch for PR
497
+
498
+ - **Symptom**: you opened a PR from `feature/x` directly to `main`.
499
+ - **Cause**: confusion about the correct target.
500
+ - **Solution**: close the PR, recreate it:
501
+ ```bash
502
+ gh pr create --base develop --head feature/x
503
+ ```
504
+ Remember: `feature/*` -> `develop`, `hotfix/*` -> `main` + `develop`.
505
+
506
+ ### Forgot hotfix back-merge into `develop`
507
+
508
+ - **Symptom**: same bug regresses in the next release.
509
+ - **Cause**: hotfix landed in `main` but not in `develop`.
510
+ - **Solution**:
511
+ ```bash
512
+ git checkout develop
513
+ git cherry-pick <fix-SHA-from-main>
514
+ git push origin develop
515
+ ```
516
+
517
+ ### Accidental force push on shared branch
518
+
519
+ - **Symptom**: other devs complain that pull fails.
520
+ - **Cause**: you did `git push --force` on `main`/`develop`/`release/*`.
521
+ - **Solution**: WHILE STILL FRESH — ask another dev with the full local history to do:
522
+ ```bash
523
+ git push --force-with-lease origin <branch>
524
+ ```
525
+ to restore. Rewriting shared history is an incident — notify `tech-lead`.
526
+
527
+ ### Commit outside Conventional Commits
528
+
529
+ - **Symptom**: `commit-msg` hook rejected it or `tech-lead` complained in review.
530
+ - **Solution**: `git commit --amend` and use the `<type>(<scope>): <description>` format. See types in [Git Flow](git-flow).
531
+
532
+ ## When to open a ticket / ask for human help
533
+
534
+ Specialists **DO NOT** escalate to a human directly. Only PO or TL escalate, and only in the following situations:
535
+
536
+ ### Product Owner escalates ONLY in 4 situations
537
+
538
+ 1. Irreversible action on real customer data (delete/overwrite without backup).
539
+ 2. Relevant financial cost (paid SaaS, tier change).
540
+ 3. Breaking change on PUBLIC contract already published (external client).
541
+ 4. Identity/brand change approved by another area.
542
+
543
+ ### Tech Lead escalates ONLY in 3 situations
544
+
545
+ 1. Technical requirement conflict that cannot be resolved by grounding.
546
+ 2. Breaking change on public production contract (window with external client).
547
+ 3. Infra cost > R$ 200/month additional.
548
+
549
+ ### Escalation format
550
+
551
+ Never an open question. Always **proposal + recommendation + impact of the opposite decision**:
552
+
553
+ > "Provision managed Redis Cluster (+R$ 380/month) to support 10x traffic in 6 months. I recommend approving now; if we keep single-node, cache queue in 2 months."
554
+
555
+ See [Autonomy matrix](autonomy-matrix) for full details.
556
+
557
+ ## Cross-references
558
+
559
+ - [Agents reference](agents-reference) — when to call each agent.
560
+ - [Skills reference](skills-reference) — triggers and responsibilities of each skill.
561
+ - [Hooks reference](hooks-reference) — Claude Code hooks (do not confuse with git hooks).
562
+ - [Git Flow](git-flow) — branch, commit, and PR flow.
563
+ - [Quality gate](quality-gate) — thresholds and tools.
564
+ - [Autonomy matrix](autonomy-matrix) — who decides what.
565
+ - [Pipeline](pipeline) — standard task pipeline.
@@ -0,0 +1,114 @@
1
+ {
2
+ "manual": [
3
+ {
4
+ "slug": "quickstart",
5
+ "id": "quickstart",
6
+ "title": "Quickstart — 5 minutes to first value",
7
+ "path": "dashboard/public/content/manual/quickstart.en.md"
8
+ },
9
+ {
10
+ "slug": "backend",
11
+ "id": "backend",
12
+ "title": "Backend",
13
+ "path": "dashboard/public/content/manual/backend.en.md"
14
+ },
15
+ {
16
+ "slug": "frontend",
17
+ "id": "frontend",
18
+ "title": "Frontend",
19
+ "path": "dashboard/public/content/manual/frontend.en.md"
20
+ },
21
+ {
22
+ "slug": "fullstack",
23
+ "id": "fullstack",
24
+ "title": "Fullstack",
25
+ "path": "dashboard/public/content/manual/fullstack.en.md"
26
+ },
27
+ {
28
+ "slug": "mobile",
29
+ "id": "mobile",
30
+ "title": "Mobile",
31
+ "path": "dashboard/public/content/manual/mobile.en.md"
32
+ },
33
+ {
34
+ "slug": "existing-project",
35
+ "id": "existing-project",
36
+ "title": "Existing project adoption",
37
+ "path": "dashboard/public/content/manual/existing-project.en.md"
38
+ }
39
+ ],
40
+ "docs": [
41
+ {
42
+ "slug": "architecture-overview",
43
+ "id": "architecture-overview",
44
+ "title": "Architecture overview",
45
+ "path": "dashboard/public/content/docs/architecture-overview.en.md"
46
+ },
47
+ {
48
+ "slug": "agents-reference",
49
+ "id": "agents-reference",
50
+ "title": "Agents reference",
51
+ "path": "dashboard/public/content/docs/agents-reference.en.md"
52
+ },
53
+ {
54
+ "slug": "skills-reference",
55
+ "id": "skills-reference",
56
+ "title": "Skills reference",
57
+ "path": "dashboard/public/content/docs/skills-reference.en.md"
58
+ },
59
+ {
60
+ "slug": "plugins",
61
+ "id": "plugins",
62
+ "title": "External plugins (grill-me, caveman, impeccable, rtk)",
63
+ "path": "dashboard/public/content/docs/plugins.en.md"
64
+ },
65
+ {
66
+ "slug": "hooks-reference",
67
+ "id": "hooks-reference",
68
+ "title": "Hooks reference",
69
+ "path": "dashboard/public/content/docs/hooks-reference.en.md"
70
+ },
71
+ {
72
+ "slug": "cli-reference",
73
+ "id": "cli-reference",
74
+ "title": "CLI reference (duk commands)",
75
+ "path": "dashboard/public/content/docs/cli-reference.en.md"
76
+ },
77
+ {
78
+ "slug": "autonomy-matrix",
79
+ "id": "autonomy-matrix",
80
+ "title": "Autonomy matrix",
81
+ "path": "dashboard/public/content/docs/autonomy-matrix.en.md"
82
+ },
83
+ {
84
+ "slug": "pipeline",
85
+ "id": "pipeline",
86
+ "title": "Development pipeline",
87
+ "path": "dashboard/public/content/docs/pipeline.en.md"
88
+ },
89
+ {
90
+ "slug": "quality-gate",
91
+ "id": "quality-gate",
92
+ "title": "Quality Gate Senior+",
93
+ "path": "dashboard/public/content/docs/quality-gate.en.md"
94
+ },
95
+ {
96
+ "slug": "stack-rules",
97
+ "id": "stack-rules",
98
+ "title": "Stack rules",
99
+ "path": "dashboard/public/content/docs/stack-rules.en.md"
100
+ },
101
+ {
102
+ "slug": "git-flow",
103
+ "id": "git-flow",
104
+ "title": "Git Flow and commit conventions",
105
+ "path": "dashboard/public/content/docs/git-flow.en.md"
106
+ },
107
+ {
108
+ "slug": "troubleshooting",
109
+ "id": "troubleshooting",
110
+ "title": "Troubleshooting",
111
+ "path": "dashboard/public/content/docs/troubleshooting.en.md"
112
+ }
113
+ ]
114
+ }