@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,1459 @@
1
+ # User Manual — Fullstack (Java 25 + Spring Boot 4 + Angular 21)
2
+
3
+ Definitive edition. This manual covers the full lifecycle of a fullstack
4
+ project under the `development-utility-kit` harness: Spring Boot 4 backend,
5
+ Angular 21 frontend, monorepo, `docker-compose`, shared contracts via
6
+ OpenAPI, and the end-to-end workflow with Claude Code / Cowork skills and
7
+ agents.
8
+
9
+ ---
10
+
11
+ ## 1. Introduction
12
+
13
+ This manual targets **fullstack** developers building, evolving, or adopting
14
+ a project with:
15
+
16
+ - **Java 25 + Spring Boot 4** backend (Maven, JPA, Flyway, Testcontainers).
17
+ - **Angular 21** frontend (standalone, Signals, OnPush, Signal Forms,
18
+ `ng-bootstrap`).
19
+ - **PostgreSQL 17** + **Redis 7** via `docker-compose`.
20
+ - Shared types via `openapi-typescript` (generated from `/v3/api-docs`).
21
+ - Workflow driven by Cowork / Claude Code agents (analyst, architect,
22
+ backend-developer, frontend-developer, qa-engineer, gate-keeper,
23
+ tech-lead, etc.).
24
+
25
+ ### Prerequisites
26
+
27
+ - **JDK 25** on PATH (`java --version`).
28
+ - **Node.js 22+** and **npm 10+** (`node --version`).
29
+ - **Docker Desktop** or Docker Engine 25+ with Compose v2.
30
+ - **Git** on PATH.
31
+ - **Claude Code** (CLI) or **Cowork** (conversational mode).
32
+ - Optional: **VS Code** or **IntelliJ IDEA** Ultimate.
33
+
34
+ If you have never used the harness, also read:
35
+
36
+ - [Quick onboarding](../docs/architecture-overview)
37
+ - [Stack rules](../docs/stack-rules)
38
+ - [Skills reference](../docs/skills-reference)
39
+ - [Agents reference](../docs/agents-reference)
40
+
41
+ ---
42
+
43
+ ## 2. 5-minute onboarding
44
+
45
+ ```bash
46
+ cd C:\development\source\projects
47
+
48
+ # Create the project via interactive wrapper (Windows):
49
+ C:\development\tools\development-utility-kit\scripts\new-project.bat
50
+
51
+ # OR Git Bash / WSL / Mac / Linux:
52
+ bash /c/development/tools/development-utility-kit/scripts/new-project.sh
53
+ ```
54
+
55
+ The wrapper opens a wizard asking for:
56
+
57
+ - **Project name**: `my-fullstack`
58
+ - **Project type**: `Fullstack`
59
+ - **Primary stack**: accept the default (Java 25 + Spring Boot 4 + Angular 21)
60
+ - **Database**: accept `PostgreSQL 17 + Redis 7`
61
+
62
+ The wrapper:
63
+
64
+ 1. Creates `C:\development\source\projects\my-fullstack\`.
65
+ 2. Injects `.claude/` (agents + skills + settings + hooks) and `CLAUDE.md`.
66
+ 3. Fills the `Project Identity` block of `CLAUDE.md`.
67
+ 4. Opens Claude Code / Cowork pointing at the new folder.
68
+
69
+ Then, in chat:
70
+
71
+ ```text
72
+ > "scaffold the monorepo"
73
+ ```
74
+
75
+ The `bootstrap-fullstack` skill creates:
76
+
77
+ - `backend/` — Spring Initializr (Maven, Java 25, Spring Boot 4).
78
+ - `frontend/` — Angular 21 standalone + `ng-bootstrap`.
79
+ - `docker-compose.yml` with Postgres + Redis + Mailhog.
80
+ - Healthchecks, env-scoped CORS, `openapi-typescript` wired in the frontend.
81
+
82
+ Bring up the local environment:
83
+
84
+ ```bash
85
+ docker compose up -d
86
+ # Services:
87
+ # postgres :5432 (db: myfullstack, user: app)
88
+ # redis :6379
89
+ # mailhog :8025 (UI), :1025 (SMTP)
90
+ # backend :8080
91
+ # frontend :4200
92
+ ```
93
+
94
+ Health check:
95
+
96
+ ```bash
97
+ curl http://localhost:8080/api/v1/health
98
+ # {"status":"UP","components":{"db":"UP","redis":"UP"}}
99
+
100
+ curl http://localhost:8080/v3/api-docs
101
+ # OpenAPI 3.1 spec
102
+
103
+ # Browser:
104
+ # http://localhost:4200 → Angular app
105
+ # http://localhost:8080/swagger-ui.html → OpenAPI UI
106
+ # http://localhost:8025 → Mailhog
107
+ ```
108
+
109
+ Optional — docs dashboard:
110
+
111
+ ```bash
112
+ duk dashboard # opens http://localhost:4242
113
+ # duk dashboard --port 4243 --no-open # variants
114
+ ```
115
+
116
+ ---
117
+
118
+ ## 3. Monorepo architecture
119
+
120
+ ```
121
+ my-fullstack/
122
+ ├── backend/ ← Spring Boot 4 (Maven)
123
+ │ ├── src/main/java/com/company/myfullstack/
124
+ │ │ ├── domain/ ← model, ports (repository interfaces)
125
+ │ │ │ ├── product/
126
+ │ │ │ │ ├── Product.java
127
+ │ │ │ │ └── ProductRepository.java
128
+ │ │ │ └── shared/
129
+ │ │ ├── application/ ← use cases + DTO records + mappers
130
+ │ │ │ └── product/
131
+ │ │ │ ├── CreateProductUseCase.java
132
+ │ │ │ ├── CreateProductRequest.java (record)
133
+ │ │ │ └── ProductResponse.java (record)
134
+ │ │ ├── infrastructure/ ← JPA adapters, security, config
135
+ │ │ │ ├── persistence/jpa/
136
+ │ │ │ ├── security/
137
+ │ │ │ ├── messaging/
138
+ │ │ │ └── config/
139
+ │ │ └── web/ ← controllers + @ControllerAdvice
140
+ │ │ ├── ProductController.java
141
+ │ │ └── GlobalExceptionHandler.java
142
+ │ ├── src/main/resources/
143
+ │ │ ├── db/migration/V1__init.sql
144
+ │ │ ├── application.yml
145
+ │ │ └── application-prod.yml
146
+ │ ├── src/test/java/... ← JUnit 5 + Mockito + Testcontainers
147
+ │ ├── pom.xml
148
+ │ └── Dockerfile
149
+ ├── frontend/ ← Angular 21
150
+ │ ├── src/app/
151
+ │ │ ├── core/ ← auth, http interceptors, guards
152
+ │ │ │ ├── auth/
153
+ │ │ │ └── http/
154
+ │ │ ├── shared/ ← reusable components, pipes
155
+ │ │ │ └── ui/
156
+ │ │ └── features/ ← lazy modules
157
+ │ │ └── products/
158
+ │ │ ├── product-list/
159
+ │ │ │ ├── product-list.component.ts
160
+ │ │ │ ├── product-list.component.html
161
+ │ │ │ └── product-list.component.scss
162
+ │ │ └── product-create/
163
+ │ ├── src/api/types.ts ← generated by openapi-typescript
164
+ │ ├── src/environments/
165
+ │ ├── angular.json
166
+ │ ├── package.json
167
+ │ └── Dockerfile
168
+ ├── docker-compose.yml ← local env (postgres + redis + back + front)
169
+ ├── docker-compose.prod.yml ← optional, for staging
170
+ ├── docs/
171
+ │ ├── discovery/ ← DISCOVERY_*.md (grill-me skill)
172
+ │ ├── prd/ ← PRD_*.md (to-prd skill)
173
+ │ ├── issues/ ← ISSUES_*.md (to-issues skill)
174
+ │ ├── plans/ ← PLAN_*.md (analyst agent)
175
+ │ ├── decisions/ ← ADR-NNN-<slug>.md (architect/tech-lead)
176
+ │ └── brain/ ← Obsidian vault (brain-keeper agent)
177
+ │ ├── daily/
178
+ │ ├── features/
179
+ │ ├── bugs/
180
+ │ ├── decisions/
181
+ │ └── architecture/tech-debt.md
182
+ ├── .claude/ ← harness config
183
+ │ ├── agents/ ← 25 agents
184
+ │ ├── skills/ ← 18 skills
185
+ │ ├── hooks/ ← PreToolUse, PostToolUse, etc.
186
+ │ └── settings.json
187
+ ├── CLAUDE.md ← Project Identity + inherited rules
188
+ └── README.md
189
+ ```
190
+
191
+ The two sub-projects (`backend/` and `frontend/`) are **independent** at
192
+ build time but **coupled by contract** (OpenAPI). You run `mvn` in
193
+ `backend/` and `npm` in `frontend/`. `docker-compose.yml` orchestrates both.
194
+
195
+ ---
196
+
197
+ ## 4. CLAUDE.md — Project Identity
198
+
199
+ After scaffolding, edit **only** the `Project Identity` section of
200
+ `CLAUDE.md`. Everything else is inherited from the template and updated via
201
+ the `update-template` skill.
202
+
203
+ ```markdown
204
+ ## Project Identity
205
+
206
+ - **Project name**: `my-fullstack`
207
+ - **Project type**: `fullstack`
208
+ - **Primary stack**: `Java 25 + Spring Boot 4 + Angular 21`
209
+ - **Database**: `PostgreSQL 17 + Redis 7`
210
+ - **Domain**: `e-commerce`
211
+ - **Team size**: `3 backend, 2 frontend`
212
+ - **Additional rules**:
213
+ ```
214
+
215
+ Important fields:
216
+
217
+ - `Project type: fullstack` — enables `bootstrap-fullstack`,
218
+ `api-integration-test`, and the combined gate (JaCoCo + PIT + Jest +
219
+ Lighthouse).
220
+ - `Primary stack` — steers agents to Java 25 / Spring 4 (not 17 / 3.x) and
221
+ Angular 21 (not 17).
222
+ - `Database` — used by `database-engineer` to pick migrations, indexes, and
223
+ types (UUID, TIMESTAMPTZ, NUMERIC).
224
+
225
+ ---
226
+
227
+ ## 5. Skills that apply to fullstack
228
+
229
+ Skills fire by **keyword in chat**. There is no `duk <skill>`. Everything is
230
+ conversational.
231
+
232
+ | Skill | EN trigger | Output |
233
+ |---|---|---|
234
+ | `bootstrap-fullstack` | `scaffold the monorepo`, `create fullstack`, `set up backend and frontend` | `backend/` + `frontend/` + `docker-compose.yml` |
235
+ | `grill-me` | `grill me about <X>`, `interview me about <X>`, `stress-test the plan` | `docs/discovery/DISCOVERY_<X>.md` |
236
+ | `to-prd` | `generate PRD`, `create PRD` | `docs/prd/PRD_<X>.md` |
237
+ | `to-issues` | `break into issues` | `docs/issues/ISSUES_<X>.md` |
238
+ | `run-sprint` | `run sprint <N> of PLAN_<X>.md` | Sprint executed by `sprint-runner` |
239
+ | `auto-test-guard` | `run the tests`, `generate tests`, `full suite` | Senior+ gate green |
240
+ | `api-integration-test` | `test the integration` | curl + Chrome MCP across back+front |
241
+ | `prd-ready-check` | `is it production-ready?`, `DoD` | GO / NO-GO |
242
+ | `pair-debug` | `let's debug <X>`, `investigate this bug` | Hypothesis loop |
243
+ | `brain-keeper` | `record in brain`, `update the brain` | `docs/brain/` vault |
244
+ | `active-project` | `/active-project <path>`, `adopt project at <path>` | Non-interactive adoption |
245
+ | `update-template` | `update the template` | Sync `.claude/` + `CLAUDE.md` (merge) |
246
+ | `project-manager` | catch-all | Routes to 1 agent |
247
+
248
+ ### 5.1. `bootstrap-fullstack`
249
+
250
+ Run **once**, up front. Reads `Project Identity` and creates backend +
251
+ frontend + `docker-compose.yml`. Output:
252
+
253
+ - `backend/` with Maven package, `application.yml`, `Dockerfile`, migration
254
+ `V1__init.sql`, `/api/v1/health` endpoint.
255
+ - `frontend/` with Angular 21 standalone, `ng-bootstrap`, error
256
+ interceptor, placeholder auth guard, `openapi-typescript` wired in.
257
+ - `docker-compose.yml` with postgres + redis + mailhog + back + front.
258
+
259
+ Prerequisite: `Project type: fullstack` in `CLAUDE.md`.
260
+
261
+ ### 5.2. `grill-me`
262
+
263
+ Hypothesis-by-hypothesis discovery interview before writing a single line of
264
+ code. Covers persona, business rule, flow, auth, perf, error, audit, LGPD,
265
+ observability. Persists to `docs/discovery/DISCOVERY_<slug>.md` (PLAN seed —
266
+ see ADR-013).
267
+
268
+ Always use before `to-prd` on the human path (autonomous path via
269
+ `sprint-runner` is exempt).
270
+
271
+ ### 5.3. `to-prd`
272
+
273
+ Reads the discovery and produces `docs/prd/PRD_<slug>.md` with Overview,
274
+ Goals, User Stories, Functional Requirements, Non-functional Requirements,
275
+ and Out of Scope.
276
+
277
+ ### 5.4. `to-issues`
278
+
279
+ Reads the PRD and breaks it into `[ISSUE-N]` blocks ready for
280
+ `gh issue create`.
281
+
282
+ ### 5.5. `run-sprint`
283
+
284
+ `sprint-runner` executes Sprint N of `PLAN_<X>.md`, delegating in parallel
285
+ to `database-engineer`, `backend-developer`, `frontend-developer`,
286
+ `qa-engineer`. At the end, `gate-keeper` runs the senior+ gate.
287
+
288
+ ### 5.6. `auto-test-guard`
289
+
290
+ Runs the full gate: JaCoCo, PIT, SpotBugs, OWASP DC, Jest, jest-axe,
291
+ `@axe-core/playwright`, Lighthouse CI, pyramid ratio. Blocks merge if any
292
+ threshold fails. See [quality-gate](../docs/quality-gate).
293
+
294
+ ### 5.7. `api-integration-test`
295
+
296
+ Brings up back + front via `docker compose up` (or reuses what is already
297
+ running) and:
298
+
299
+ - Tests endpoints with `curl` (auth, CRUD, pagination, 422 error, 401 error).
300
+ - Opens the frontend via Chrome MCP and walks the critical flow.
301
+ - Validates the browser console (0 errors).
302
+ - Validates CORS, security headers, redirects.
303
+
304
+ ### 5.8. `prd-ready-check`
305
+
306
+ Go / No-Go for production. Runs:
307
+
308
+ - `./mvnw clean verify` on the backend.
309
+ - `npm test` + `npm run lint` + `npm audit --audit-level=high` on the frontend.
310
+ - `./mvnw package -DskipTests=false`.
311
+ - `ng build --configuration=production`.
312
+ - Playwright E2E.
313
+ - Lighthouse CI (median of 3 runs).
314
+ - `test-coverage-auditor` as a sub-gate.
315
+
316
+ If any P0/P1 fails → NO-GO with the list.
317
+
318
+ ### 5.9. `pair-debug`
319
+
320
+ Hypothesis-by-hypothesis loop. Each hypothesis has evidence + test. No
321
+ "try and see".
322
+
323
+ ### 5.10. `brain-keeper`
324
+
325
+ Provisions / updates `docs/brain/`:
326
+
327
+ - `daily/2026-05-27.md`
328
+ - `features/<slug>.md`
329
+ - `decisions/ADR-NNN-<slug>.md`
330
+ - `bugs/<id>-<slug>.md`
331
+ - `architecture/tech-debt.md`
332
+
333
+ All in Obsidian (vault) format, with `[[wiki]]` links, `#feature`, `#bug`,
334
+ `#adr` tags, and a MOC (Map of Content) per area.
335
+
336
+ ### 5.11. `active-project`
337
+
338
+ Non-interactive adoption of a legacy project:
339
+
340
+ ```text
341
+ > "/active-project C:\projects\legacy-fullstack"
342
+ ```
343
+
344
+ Equivalent to the fast lane of `update-template` when you want to skip the
345
+ wizard.
346
+
347
+ ### 5.12. `update-template`
348
+
349
+ Syncs `.claude/` + `CLAUDE.md` with the latest harness release. The merge
350
+ preserves the project's `Project Identity` section; everything else is
351
+ overwritten. A backup is created (`CLAUDE.md.bak-<timestamp>`).
352
+
353
+ ### 5.13. `project-manager`
354
+
355
+ Catch-all. Any prompt without a specific skill falls here and is routed to
356
+ **one** agent.
357
+
358
+ ### 5.15. Impeccable — visual polish
359
+
360
+ `Impeccable` is an external command pack focused on **visual and
361
+ typographic polish**. Especially relevant on the frontend side of a
362
+ fullstack project.
363
+
364
+ **Install** (once per project):
365
+
366
+ ```bash
367
+ npx skills add pbakaus/impeccable
368
+ ```
369
+
370
+ **Available commands**:
371
+
372
+ | Command | What it does | When to use |
373
+ |---|---|---|
374
+ | `/impeccable polish` | Applies targeted tweaks (spacing, alignment, hierarchy, focus ring) | After finishing a screen, before PR |
375
+ | `/impeccable harden` | Hardens visual edge cases (overflow, RTL, dark mode) | Before production |
376
+ | `/impeccable audit` | Full visual audit (typography, color, layout, density) | Monthly or before release |
377
+ | `/impeccable typeset` | Refines type scale and leading | When text feels "dense" |
378
+ | `/impeccable colorize` | Adjusts palette for WCAG AA contrast | After theme change |
379
+ | `/impeccable layout` | Reflows grid, hierarchy, breakpoints | When layout needs traction |
380
+
381
+ These commands complement the senior+ gate: the gate enforces the
382
+ **technical** floor (coverage, mutation, baseline a11y), Impeccable
383
+ enforces the **visual finish**.
384
+
385
+ ---
386
+
387
+ ## 6. End-to-end feature workflow (with prompts)
388
+
389
+ Real example: implement **product creation** with:
390
+
391
+ - Backend: `POST /api/v1/products` with validation, persistence,
392
+ `ROLE_ADMIN` auth.
393
+ - Frontend: `/products/new` screen with Signal Forms, API integration,
394
+ redirect to listing.
395
+ - Shared contract via `openapi-typescript`.
396
+
397
+ ### Turn 1 — you
398
+
399
+ ```text
400
+ grill me about product creation: name, price, stock, category
401
+ ```
402
+
403
+ ### Turn 1 — Claude (`grill-me` skill)
404
+
405
+ ```text
406
+ Let's get clear. Question 1/N:
407
+
408
+ Is auth required to create? I'd recommend @PreAuthorize ROLE_ADMIN,
409
+ returning 403 without a valid token. Confirm?
410
+ ```
411
+
412
+ ### Turns 2–20 — iterative interview
413
+
414
+ Covers: persona (catalog admin), validation rules (price > 0, stock >= 0,
415
+ unique name per category), error behavior (RFC 9457 ProblemDetail),
416
+ performance (synchronous create, < 200ms p95), audit (audit log), LGPD
417
+ (product is not personal data — N/A), observability (structured log +
418
+ `products.created` metric).
419
+
420
+ ### Turn 21 — Claude
421
+
422
+ ```text
423
+ Discovery complete. Saved to docs/discovery/DISCOVERY_product-create.md.
424
+ Suggested next step: "generate PRD".
425
+ ```
426
+
427
+ ### Turn 22 — you
428
+
429
+ ```text
430
+ generate PRD
431
+ ```
432
+
433
+ ### Turn 22 — Claude (`to-prd` skill)
434
+
435
+ ```text
436
+ docs/prd/PRD_product-create.md created with:
437
+ - Overview, Goals
438
+ - 3 User Stories
439
+ - 7 Functional Requirements
440
+ - 4 Non-functional Requirements (perf, security, observability, a11y)
441
+ - Out of Scope (bulk import, variants)
442
+ ```
443
+
444
+ ### Turn 23 — you
445
+
446
+ ```text
447
+ break into issues
448
+ ```
449
+
450
+ ### Turn 23 — Claude (`to-issues` skill)
451
+
452
+ ```text
453
+ docs/issues/ISSUES_product-create.md with 4 issues:
454
+ [ISSUE-1] DB: products schema + category index
455
+ [ISSUE-2] Backend: POST /api/v1/products + validation + auth
456
+ [ISSUE-3] Frontend: /products/new screen (Signal Forms)
457
+ [ISSUE-4] Integration: openapi-typescript + smoke E2E
458
+
459
+ Ready for:
460
+ gh issue create --title "[ISSUE-N] ..." --body-file <block>
461
+ ```
462
+
463
+ ### Turn 24 — you
464
+
465
+ ```text
466
+ analyst, generate the plan
467
+ ```
468
+
469
+ ### Turn 24 — Claude (`analyst` agent)
470
+
471
+ ```text
472
+ docs/plans/PLAN_product-create.md:
473
+
474
+ Sprint 1 — Backend
475
+ Task 1.1 database-engineer: V2__create_products.sql
476
+ Task 1.2 backend-developer: domain + application + web
477
+ Task 1.3 qa-engineer: integration test (Testcontainers)
478
+ Task 1.4 gate-keeper: JaCoCo + PIT + SpotBugs + OWASP
479
+
480
+ Sprint 2 — Frontend
481
+ Task 2.1 frontend-developer: ProductCreateComponent (3 files)
482
+ Task 2.2 frontend-developer: ProductService + interceptor
483
+ Task 2.3 qa-engineer: Jest + jest-axe + Playwright
484
+ Task 2.4 gate-keeper: coverage + Lighthouse
485
+
486
+ Sprint 3 — Integration
487
+ Task 3.1 devops-engineer: CORS, docker-compose
488
+ Task 3.2 frontend-developer: regenerate types via openapi-typescript
489
+ Task 3.3 sprint-runner -> api-integration-test (curl + Chrome MCP)
490
+
491
+ Goal-ready DoD on every task.
492
+ ```
493
+
494
+ ### Turn 25 — you
495
+
496
+ ```text
497
+ run sprint 1 of PLAN_product-create.md
498
+ ```
499
+
500
+ ### Turn 25 — Claude (`run-sprint` skill)
501
+
502
+ ```text
503
+ Sprint 1 — parallel execution:
504
+
505
+ [Task 1.1] database-engineer:
506
+ - V2__create_products.sql (UUID PK, TIMESTAMPTZ, NUMERIC(10,2))
507
+ - idx_products_category (B-tree)
508
+ - idx_products_name_category_unique (unique partial)
509
+
510
+ [Task 1.2] backend-developer (3 parallel):
511
+ - domain/product/Product.java + ProductRepository.java (port)
512
+ - application/product/CreateProductUseCase.java + records
513
+ - infrastructure/persistence/jpa/ProductJpaAdapter.java
514
+ - web/ProductController.java + @PreAuthorize("hasRole('ADMIN')")
515
+ - web/GlobalExceptionHandler.java (RFC 9457 ProblemDetail)
516
+
517
+ [Task 1.3] qa-engineer:
518
+ - ProductControllerIT.java (Testcontainers + Postgres)
519
+ - CreateProductUseCaseTest.java (unit, Mockito)
520
+
521
+ [Task 1.4] gate-keeper:
522
+ - JaCoCo: 88% lines / 82% branches ✓
523
+ - PIT mutation: 72% in domain/ + application/ ✓
524
+ - SpotBugs: 0 CRITICAL, 0 HIGH ✓
525
+ - OWASP DC: 0 CVE with CVSS >= 7.0 ✓
526
+
527
+ Sprint 1 GREEN ✓
528
+ ```
529
+
530
+ ### Turn 26 — you
531
+
532
+ ```text
533
+ run sprint 2
534
+ ```
535
+
536
+ ### Turn 26 — Claude (`run-sprint` skill)
537
+
538
+ ```text
539
+ Sprint 2 — parallel execution:
540
+
541
+ [Task 2.1] frontend-developer:
542
+ ProductCreateComponent in 3 physical files (non-negotiable):
543
+ - product-create.component.ts (standalone, OnPush, Signal Forms)
544
+ - product-create.component.html (form + ng-bootstrap)
545
+ - product-create.component.scss
546
+
547
+ [Task 2.2] frontend-developer:
548
+ - core/api/product.service.ts (typed HttpClient)
549
+ - core/http/error.interceptor.ts (ProblemDetail handler)
550
+
551
+ [Task 2.3] qa-engineer:
552
+ - product-create.component.spec.ts (Jest + Testing Library)
553
+ - product-create.a11y.spec.ts (jest-axe — 0 serious/critical)
554
+ - e2e/products/create.spec.ts (Playwright)
555
+
556
+ [Task 2.4] gate-keeper:
557
+ - Jest: 86% statements / 81% branches ✓
558
+ - jest-axe: 0 violations ✓
559
+ - @axe-core/playwright: 0 violations ✓
560
+ - Playwright E2E: 100% green, console 0 errors ✓
561
+ - Lighthouse: 0.85 perf / LCP 1800ms / CLS 0.05 / TBT 220ms ✓
562
+ - E2E pyramid ratio: 18% (<= 30% hard-fail; <= 15% ideal) ✓
563
+
564
+ Sprint 2 GREEN ✓
565
+ ```
566
+
567
+ ### Turn 27 — you
568
+
569
+ ```text
570
+ /impeccable polish
571
+ ```
572
+
573
+ ### Turn 27 — Claude (Impeccable)
574
+
575
+ ```text
576
+ Polish applied to ProductCreateComponent:
577
+ - Label alignment (top-aligned, 4px margin-bottom)
578
+ - Inline error spacing (4px, --bs-danger color)
579
+ - Consistent focus ring (2px outline, --bs-primary)
580
+ - Buttons with subtle hover lift (translateY(-1px))
581
+ - 12-col grid, 16px gutter
582
+ ```
583
+
584
+ ### Turn 28 — you
585
+
586
+ ```text
587
+ run sprint 3
588
+ ```
589
+
590
+ ### Turn 28 — Claude (`run-sprint` + `api-integration-test`)
591
+
592
+ ```text
593
+ Sprint 3 — execution:
594
+
595
+ [Task 3.1] devops-engineer:
596
+ - docker-compose.yml: backend service with CORS for http://localhost:4200
597
+ - application-dev.yml: cors.allowed-origins
598
+ - Rate limit configured (Bucket4j 100 req/min)
599
+
600
+ [Task 3.2] frontend-developer:
601
+ - npm run gen:api → src/api/types.ts regenerated
602
+ - product.service.ts typed via components["schemas"]["ProductResponse"]
603
+
604
+ [Task 3.3] api-integration-test:
605
+ Bringing up docker compose up -d...
606
+ Backend UP on :8080, Frontend UP on :4200.
607
+
608
+ curl tests:
609
+ POST /api/v1/products (Bearer admin) → 201 ✓
610
+ Location: /api/v1/products/<uuid>
611
+ body: { id, name, price, stock, category, createdAt }
612
+ POST /api/v1/products (no token) → 401 ✓
613
+ POST /api/v1/products (negative price) → 422 ✓
614
+ ProblemDetail: type, title, status, detail, errors[]
615
+ GET /api/v1/products → 200, pagination OK ✓
616
+
617
+ Chrome MCP:
618
+ http://localhost:4200/products/new
619
+ fill form (name, price, stock, category)
620
+ submit → redirect to /products
621
+ assertion: product appears in listing ✓
622
+ console: 0 errors ✓
623
+ a11y: 0 violations ✓
624
+
625
+ Sprint 3 GREEN ✓
626
+ ```
627
+
628
+ ### Turn 29 — you
629
+
630
+ ```text
631
+ is it production-ready?
632
+ ```
633
+
634
+ ### Turn 29 — Claude (`prd-ready-check` skill)
635
+
636
+ ```text
637
+ Running:
638
+ - ./mvnw clean verify (backend)
639
+ - npm test + npm run lint (frontend)
640
+ - npm audit --audit-level=high
641
+ - ./mvnw package
642
+ - ng build --configuration=production
643
+ - playwright test
644
+ - lhci autorun
645
+ - test-coverage-auditor (sub-gate)
646
+
647
+ Result:
648
+ Backend coverage: 88% / 82% ✓
649
+ Backend mutation: 72% ✓
650
+ Frontend coverage: 86% / 81% ✓
651
+ SpotBugs: 0 / 0 ✓
652
+ OWASP: 0 high ✓
653
+ npm audit: 0 high ✓
654
+ Playwright: 12/12 green ✓
655
+ jest-axe: 0 ✓
656
+ @axe-core/playwright:0 ✓
657
+ Lighthouse perf: 0.86 ✓
658
+ LCP / CLS / TBT: OK ✓
659
+ E2E pyramid ratio: 18% ✓
660
+ P0/P1 issues: 0 ✓
661
+
662
+ GO ✓
663
+ ```
664
+
665
+ ### Turn 30 — you
666
+
667
+ ```text
668
+ record in brain
669
+ ```
670
+
671
+ ### Turn 30 — Claude (`brain-keeper` agent)
672
+
673
+ ```text
674
+ Vault updated:
675
+ docs/brain/daily/2026-05-27.md (timeline for the day)
676
+ docs/brain/features/product-create.md (feature card)
677
+ docs/brain/decisions/ADR-043-products-tsvector-search.md (search decision)
678
+ docs/brain/architecture/tech-debt.md (added: move to event sourcing
679
+ if we cross 100 products/s)
680
+
681
+ Wiki links: [[product]], [[catalog]], [[admin]]
682
+ Tags: #feature #backend #frontend #shipped
683
+ ```
684
+
685
+ ---
686
+
687
+ ## 7. Workflow 2 — Production bug (pair-debug)
688
+
689
+ Scenario: intermittent 500 in production, only for `*.partner.com` subdomain
690
+ users when saving a product.
691
+
692
+ ### Turn 1 — you
693
+
694
+ ```text
695
+ let's debug: 500 on product create, only from partner.com subdomain.
696
+ log: "CorsConfigurationException: origin not allowed"
697
+ ```
698
+
699
+ ### Turn 1 — Claude (`pair-debug` skill)
700
+
701
+ ```text
702
+ Hypothesis 1: CORS allowed-origins does not include subdomain wildcard.
703
+ Expected evidence: application-prod.yml with a finite list.
704
+ Test: read application-prod.yml + grep allowed-origins.
705
+
706
+ Running...
707
+ ```
708
+
709
+ ### Turn 2 — Claude
710
+
711
+ ```text
712
+ Confirmed. application-prod.yml:
713
+ cors.allowed-origins:
714
+ - https://app.partner.com
715
+ Missing wildcard pattern.
716
+
717
+ Hypothesis 2 (discarded): Spring Boot 4 changed the default — no, a CORS
718
+ contract regression is an explicit responsibility.
719
+
720
+ Plan:
721
+ 1. Backend: swap allowed-origins for allowed-origin-patterns:
722
+ - https://*.partner.com
723
+ 2. Backend: integration test reproducing the case (Origin header from
724
+ unexpected subdomain).
725
+ 3. Frontend: verify axios/HttpClient is not sending a custom Origin.
726
+
727
+ Apply?
728
+ ```
729
+
730
+ ### Turn 3 — you
731
+
732
+ ```text
733
+ go ahead
734
+ ```
735
+
736
+ ### Turn 3 — Claude (delegating)
737
+
738
+ ```text
739
+ backend-developer:
740
+ - Diff applied in CorsConfig.java
741
+ - allowed-origin-patterns: [https://*.partner.com, https://app.company.com]
742
+
743
+ qa-engineer:
744
+ - CorsConfigIT.java reproduces: Origin: https://x.partner.com → 200 OK
745
+ - CorsConfigIT.java reproduces: Origin: https://evil.com → 403
746
+
747
+ gate-keeper:
748
+ - Suite green ✓
749
+
750
+ api-integration-test:
751
+ - Bringing up back + front locally
752
+ - curl with Origin: https://test.partner.com → 201 ✓
753
+
754
+ Suggested commit:
755
+ fix(security): allow subdomain wildcard for partner.com in CORS
756
+
757
+ Resolves 500 in production for dynamic-subdomain users.
758
+ Replaces allowed-origins with allowed-origin-patterns.
759
+ ```
760
+
761
+ ---
762
+
763
+ ## 8. Workflow 3 — Visual polish with Impeccable
764
+
765
+ Scenario: product listing screen works but "looks off".
766
+
767
+ ### Turn 1 — you
768
+
769
+ ```text
770
+ /impeccable audit
771
+ ```
772
+
773
+ ### Turn 1 — Claude
774
+
775
+ ```text
776
+ Full visual audit on ProductListComponent:
777
+
778
+ Typography:
779
+ Consistent scale (1rem base, ratio 1.25) ✓
780
+ Leading 1.5 (body), 1.2 (heading) ✓
781
+
782
+ Color:
783
+ WCAG AA contrast (4.5:1 body, 3:1 large) ✓
784
+ Consistent palette (--bs-*) ✓
785
+
786
+ Layout:
787
+ 12-col grid ✓
788
+ "product" card needs 8px vertical gap ✗
789
+ Uneven section spacing ✗
790
+
791
+ Density:
792
+ Card inner padding: 12/16/20 mixed ✗ (standardize on 16)
793
+
794
+ Hierarchy:
795
+ H1 > H2 > body ✓
796
+
797
+ Recommend:
798
+ /impeccable polish → targeted tweaks
799
+ /impeccable layout → reflow the grid for a stronger pass
800
+ ```
801
+
802
+ ### Turn 2 — you
803
+
804
+ ```text
805
+ /impeccable polish
806
+ ```
807
+
808
+ ### Turn 2 — Claude
809
+
810
+ ```text
811
+ Polish applied:
812
+ - product-list.component.scss:
813
+ .product-card { padding: 16px; gap: 8px; }
814
+ .section + .section { margin-top: 24px; }
815
+ - Lighthouse re-run: 0.88 (was 0.85) ✓
816
+ - axe: 0 violations ✓
817
+ ```
818
+
819
+ ---
820
+
821
+ ## 9. Workflow 4 — Spring Boot 3 → 4 + Angular 17 → 21 migration
822
+
823
+ Scenario: legacy fullstack project on Spring Boot 3.2 + Angular 17.
824
+
825
+ ### Turn 1 — you
826
+
827
+ ```text
828
+ migrate the project: Spring Boot 3.2 → 4.0 and Angular 17 → 21
829
+ ```
830
+
831
+ ### Turn 1 — Claude (`migrator` agent)
832
+
833
+ ```text
834
+ Phase 1 — Assessment (read-only):
835
+ Reading backend/pom.xml... Spring Boot 3.2.5 + Spring Security 6.2.
836
+ Reading frontend/package.json... Angular 17.2 + RxJS 7.8.
837
+
838
+ Identified risks:
839
+ Backend:
840
+ - WebSecurityConfigurerAdapter (deprecated, removed in Spring 6.4+)
841
+ - antMatchers (renamed to requestMatchers)
842
+ - JpaSpecificationExecutor unchanged
843
+ - Spring AI (not used) — N/A
844
+ Frontend:
845
+ - Legacy NgModule (12 modules) — migrate to standalone
846
+ - @Input() decorator-based — migrate to signal input()
847
+ - effect() still experimental in 17 — stable in 21
848
+ - Reactive forms — Signal Forms in 21 (opt-in)
849
+
850
+ Output: docs/migration/MIGRATION-spring3-to-4_angular17-to-21.md
851
+
852
+ Phase 2 — Backend (proposed, not yet applied):
853
+ Sprint 1.1: bump pom.xml + SecurityFilterChain
854
+ Sprint 1.2: swap antMatchers → requestMatchers
855
+ Sprint 1.3: run the suite, fix tests
856
+
857
+ Phase 3 — Frontend (proposed):
858
+ Sprint 2.1: codemod NgModule → standalone (Angular schematic)
859
+ Sprint 2.2: @Input() → input() signal
860
+ Sprint 2.3: reactive forms → Signal Forms (optional)
861
+
862
+ Approve?
863
+ ```
864
+
865
+ ### Turn 2 — you
866
+
867
+ ```text
868
+ approved, go
869
+ ```
870
+
871
+ `migrator` applies sprint by sprint, each passing through `gate-keeper`.
872
+ Automatic rollback if any gate fails.
873
+
874
+ ---
875
+
876
+ ## 10. Workflow 5 — Adopting a legacy fullstack project
877
+
878
+ Scenario: you have `C:\projects\legacy-fullstack` that was NOT created by the
879
+ harness. You want to onboard it.
880
+
881
+ ```bash
882
+ cd C:\projects\legacy-fullstack
883
+
884
+ # Inject .claude/ + CLAUDE.md (with backup):
885
+ duk install
886
+
887
+ # Preview before applying:
888
+ duk install --dry-run
889
+ ```
890
+
891
+ `duk install` is idempotent: if `.claude/` already exists, it does a
892
+ non-destructive merge and creates `CLAUDE.md.bak-<timestamp>` before
893
+ touching anything.
894
+
895
+ Edit `CLAUDE.md`:
896
+
897
+ ```markdown
898
+ ## Project Identity
899
+ - **Project name**: `legacy-fullstack`
900
+ - **Project type**: `fullstack`
901
+ - **Primary stack**: `Java 21 + Spring Boot 3.2 + Angular 17`
902
+ - ...
903
+ ```
904
+
905
+ In chat:
906
+
907
+ ```text
908
+ > "auditor, compare structure with template"
909
+ > "test-coverage-auditor, audit test debt"
910
+ > "tech-lead, prioritize P0/P1"
911
+ > "migrate to Spring Boot 4 + Angular 21" (optional)
912
+ ```
913
+
914
+ For non-interactive adoption:
915
+
916
+ ```text
917
+ > "/active-project C:\projects\legacy-fullstack"
918
+ ```
919
+
920
+ ---
921
+
922
+ ## 11. CORS, openapi-typescript, healthchecks, docker-compose
923
+
924
+ ### 11.1. CORS
925
+
926
+ Backend (`application-dev.yml`):
927
+
928
+ ```yaml
929
+ app:
930
+ cors:
931
+ allowed-origins:
932
+ - http://localhost:4200
933
+ allowed-methods: [GET, POST, PUT, PATCH, DELETE, OPTIONS]
934
+ allowed-headers: ["*"]
935
+ exposed-headers: [Authorization, Location, X-Total-Count]
936
+ allow-credentials: true
937
+ max-age: 3600
938
+ ```
939
+
940
+ Backend (`application-prod.yml`):
941
+
942
+ ```yaml
943
+ app:
944
+ cors:
945
+ allowed-origin-patterns:
946
+ - https://*.company.com
947
+ allow-credentials: true
948
+ ```
949
+
950
+ **Never** use `*` in production with `allow-credentials: true` (forbidden by
951
+ the CORS spec).
952
+
953
+ ### 11.2. openapi-typescript
954
+
955
+ Backend already exposes `/v3/api-docs` (Springdoc OpenAPI 3.1).
956
+
957
+ Frontend `package.json`:
958
+
959
+ ```json
960
+ {
961
+ "scripts": {
962
+ "gen:api": "openapi-typescript http://localhost:8080/v3/api-docs -o src/api/types.ts",
963
+ "gen:api:ci": "openapi-typescript ../backend/target/openapi.json -o src/api/types.ts"
964
+ }
965
+ }
966
+ ```
967
+
968
+ Typical service usage:
969
+
970
+ ```typescript
971
+ import type { components } from '@app/api/types';
972
+
973
+ type ProductResponse = components['schemas']['ProductResponse'];
974
+ type CreateProductRequest = components['schemas']['CreateProductRequest'];
975
+
976
+ @Injectable({ providedIn: 'root' })
977
+ export class ProductService {
978
+ private http = inject(HttpClient);
979
+
980
+ create(req: CreateProductRequest) {
981
+ return this.http.post<ProductResponse>('/api/v1/products', req);
982
+ }
983
+ }
984
+ ```
985
+
986
+ Rule: **always regenerate `types.ts` after every contract change.** A
987
+ PostToolUse hook in `.claude/settings.json` warns when the backend changes
988
+ an endpoint and the frontend hasn't regenerated.
989
+
990
+ ### 11.3. Healthchecks
991
+
992
+ Backend `application.yml`:
993
+
994
+ ```yaml
995
+ management:
996
+ endpoints:
997
+ web:
998
+ exposure:
999
+ include: health, info, metrics, prometheus
1000
+ endpoint:
1001
+ health:
1002
+ show-details: when_authorized
1003
+ probes:
1004
+ enabled: true
1005
+ ```
1006
+
1007
+ Endpoints:
1008
+
1009
+ - `/actuator/health/readiness`
1010
+ - `/actuator/health/liveness`
1011
+ - `/api/v1/health` (custom public, summarized)
1012
+
1013
+ Docker `Dockerfile`:
1014
+
1015
+ ```dockerfile
1016
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
1017
+ CMD curl -fsS http://localhost:8080/actuator/health/liveness || exit 1
1018
+ ```
1019
+
1020
+ ### 11.4. docker-compose.yml (summary)
1021
+
1022
+ ```yaml
1023
+ services:
1024
+ postgres:
1025
+ image: postgres:17-alpine
1026
+ environment:
1027
+ POSTGRES_DB: myfullstack
1028
+ POSTGRES_USER: app
1029
+ POSTGRES_PASSWORD: app
1030
+ ports: ["5432:5432"]
1031
+ volumes: [postgres-data:/var/lib/postgresql/data]
1032
+ healthcheck:
1033
+ test: ["CMD-SHELL", "pg_isready -U app -d myfullstack"]
1034
+ interval: 10s
1035
+ timeout: 5s
1036
+ retries: 5
1037
+
1038
+ redis:
1039
+ image: redis:7-alpine
1040
+ ports: ["6379:6379"]
1041
+ healthcheck:
1042
+ test: ["CMD", "redis-cli", "ping"]
1043
+ interval: 10s
1044
+ retries: 5
1045
+
1046
+ mailhog:
1047
+ image: mailhog/mailhog:latest
1048
+ ports: ["1025:1025", "8025:8025"]
1049
+
1050
+ backend:
1051
+ build: ./backend
1052
+ depends_on:
1053
+ postgres: { condition: service_healthy }
1054
+ redis: { condition: service_healthy }
1055
+ environment:
1056
+ SPRING_PROFILES_ACTIVE: dev
1057
+ SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/myfullstack
1058
+ SPRING_DATA_REDIS_HOST: redis
1059
+ ports: ["8080:8080"]
1060
+
1061
+ frontend:
1062
+ build: ./frontend
1063
+ depends_on: [backend]
1064
+ environment:
1065
+ API_BASE_URL: http://localhost:8080
1066
+ ports: ["4200:4200"]
1067
+
1068
+ volumes:
1069
+ postgres-data:
1070
+ ```
1071
+
1072
+ ---
1073
+
1074
+ ## 12. CI/CD — GitHub Actions matrix
1075
+
1076
+ `.github/workflows/ci.yml`:
1077
+
1078
+ ```yaml
1079
+ name: CI
1080
+
1081
+ on:
1082
+ pull_request:
1083
+ branches: [main, develop]
1084
+ push:
1085
+ branches: [main, develop]
1086
+
1087
+ jobs:
1088
+ backend:
1089
+ runs-on: ubuntu-latest
1090
+ services:
1091
+ postgres:
1092
+ image: postgres:17-alpine
1093
+ env:
1094
+ POSTGRES_DB: myfullstack_test
1095
+ POSTGRES_USER: app
1096
+ POSTGRES_PASSWORD: app
1097
+ options: >-
1098
+ --health-cmd "pg_isready -U app"
1099
+ --health-interval 10s
1100
+ --health-timeout 5s
1101
+ --health-retries 5
1102
+ ports: [5432:5432]
1103
+ steps:
1104
+ - uses: actions/checkout@v4
1105
+ - uses: actions/setup-java@v4
1106
+ with: { java-version: '25', distribution: 'temurin', cache: 'maven' }
1107
+ - name: Backend build + test + gate
1108
+ working-directory: backend
1109
+ run: |
1110
+ ./mvnw -B clean verify
1111
+ ./mvnw -B org.pitest:pitest-maven:mutationCoverage
1112
+ ./mvnw -B spotbugs:check
1113
+ ./mvnw -B org.owasp:dependency-check-maven:check
1114
+ - uses: actions/upload-artifact@v4
1115
+ with:
1116
+ name: backend-reports
1117
+ path: backend/target/site/
1118
+
1119
+ frontend:
1120
+ runs-on: ubuntu-latest
1121
+ needs: backend
1122
+ steps:
1123
+ - uses: actions/checkout@v4
1124
+ - uses: actions/setup-node@v4
1125
+ with: { node-version: '22', cache: 'npm', cache-dependency-path: frontend/package-lock.json }
1126
+ - name: Frontend build + test + gate
1127
+ working-directory: frontend
1128
+ run: |
1129
+ npm ci
1130
+ npm run lint -- --max-warnings 0
1131
+ npm test -- --coverage --watchAll=false
1132
+ npm audit --audit-level=high
1133
+ npm run build -- --configuration=production
1134
+ npx playwright install --with-deps
1135
+ npm run e2e
1136
+ npx @lhci/cli autorun
1137
+
1138
+ integration:
1139
+ runs-on: ubuntu-latest
1140
+ needs: [backend, frontend]
1141
+ steps:
1142
+ - uses: actions/checkout@v4
1143
+ - name: Docker compose up
1144
+ run: docker compose up -d --wait
1145
+ - name: Smoke
1146
+ run: |
1147
+ curl -fsS http://localhost:8080/api/v1/health
1148
+ curl -fsS http://localhost:4200
1149
+ ```
1150
+
1151
+ ---
1152
+
1153
+ ## 13. Cheat sheet — all fullstack triggers
1154
+
1155
+ Big table, ordered by intent.
1156
+
1157
+ | Intent | Example trigger | Skill / Agent |
1158
+ |---|---|---|
1159
+ | New monorepo from scratch | `scaffold the monorepo` | `bootstrap-fullstack` |
1160
+ | Adopt existing project | `duk install` (CLI) + `auditor, compare structure` | `update-template` + `auditor` |
1161
+ | Non-interactive adoption | `/active-project C:\projects\X` | `active-project` |
1162
+ | Idea discovery | `grill me about <X>` | `grill-me` |
1163
+ | Generate PRD | `generate PRD` | `to-prd` |
1164
+ | PRD into issues | `break into issues` | `to-issues` |
1165
+ | Technical plan (Sprint) | `analyst, generate the plan` | `analyst` agent |
1166
+ | Decision ADR | `architect, propose an ADR for <X>` | `architect` agent |
1167
+ | Implement Sprint N | `run sprint <N> of PLAN_<X>.md` | `run-sprint` |
1168
+ | Backend feature | `backend-developer, create endpoint <X>` | `backend-developer` agent |
1169
+ | Frontend feature | `frontend-developer, create screen <X>` | `frontend-developer` agent |
1170
+ | Model a table | `database-engineer, model <X>` | `database-engineer` agent |
1171
+ | Write tests | `qa-engineer, write tests for <X>` | `qa-engineer` agent |
1172
+ | Run gate | `run the tests` / `full suite` | `auto-test-guard` (→ `gate-keeper`) |
1173
+ | Integrated smoke | `test the integration` | `api-integration-test` |
1174
+ | Go/No-Go for prod | `is it production-ready?` | `prd-ready-check` |
1175
+ | Visual polish | `/impeccable polish` | Impeccable |
1176
+ | Visual audit | `/impeccable audit` | Impeccable |
1177
+ | Visual harden | `/impeccable harden` | Impeccable |
1178
+ | Reflow layout | `/impeccable layout` | Impeccable |
1179
+ | Hypothesis-driven debug | `let's debug <X>` / `investigate this bug` | `pair-debug` |
1180
+ | Record in vault | `record in brain` | `brain-keeper` |
1181
+ | Migrate stack | `migrate from <X> to <Y>` | `migrator` agent |
1182
+ | Update template | `update the template` | `update-template` |
1183
+ | Catch-all | any prompt without a keyword | `project-manager` |
1184
+
1185
+ CLI (terminal, outside chat):
1186
+
1187
+ | Command | What it does |
1188
+ |---|---|
1189
+ | `duk install` | Inject `.claude/` + `CLAUDE.md` in CWD |
1190
+ | `duk install --sub backend` | Inject in `backend/` subfolder |
1191
+ | `duk install --sub frontend` | Inject in `frontend/` subfolder |
1192
+ | `duk install --dry-run` | Preview without writing |
1193
+ | `duk update` | Alias of `duk install` |
1194
+ | `duk dashboard` | Brings up `http://localhost:4242` |
1195
+ | `duk dashboard --port 4243 --no-open` | Variants |
1196
+
1197
+ ---
1198
+
1199
+ ## 14. Decision tree — end-to-end flow
1200
+
1201
+ ```
1202
+ New project?
1203
+
1204
+ ┌────────────┴────────────┐
1205
+ YES NO
1206
+ │ │
1207
+ "scaffold the monorepo" "duk install" + edit CLAUDE.md
1208
+ │ │
1209
+ └────────────┬────────────┘
1210
+
1211
+ Feature idea?
1212
+
1213
+ YES
1214
+
1215
+ "grill me about <X>"
1216
+
1217
+ Discovery done?
1218
+
1219
+ YES
1220
+
1221
+ "generate PRD"
1222
+
1223
+ "break into issues" (optional)
1224
+
1225
+ "analyst, generate the plan"
1226
+
1227
+ PLAN_<X>.md ready?
1228
+
1229
+ YES
1230
+
1231
+ "run sprint <N> of PLAN_<X>.md"
1232
+
1233
+ Sprint green?
1234
+
1235
+ ┌────────────┴────────────┐
1236
+ YES NO
1237
+ │ │
1238
+ │ "let's debug"
1239
+ │ │
1240
+ │ (pair-debug loop)
1241
+ │ │
1242
+ ▼ ▼
1243
+ "/impeccable audit" retry sprint
1244
+
1245
+ "/impeccable polish"
1246
+
1247
+ "test the integration"
1248
+
1249
+ All green?
1250
+
1251
+ YES
1252
+
1253
+ "is it production-ready?"
1254
+
1255
+ GO?
1256
+
1257
+ YES
1258
+
1259
+ "record in brain"
1260
+
1261
+ merge
1262
+
1263
+ (in parallel, anytime:)
1264
+ Production bug? → "let's debug <X>"
1265
+ Migrate stack? → "migrate from <X> to <Y>"
1266
+ Update the harness? → "update the template"
1267
+ ```
1268
+
1269
+ ---
1270
+
1271
+ ## 15. Antipatterns
1272
+
1273
+ - ❌ Inline `template:` or `styles:` in an Angular component. **Always 3
1274
+ physical files** (.ts / .html / .scss). Hard-blocked by `code-reviewer`.
1275
+ - ❌ Exposing a JPA `@Entity` directly in `@RestController`. Use record DTO.
1276
+ - ❌ `duk <skill>`. Does not exist. Skills are chat keywords.
1277
+ - ❌ `to-prd` without first running `grill-me`. ADR-013 blocks it (human
1278
+ path).
1279
+ - ❌ Skipping `gate-keeper`. The senior+ gate is non-negotiable.
1280
+ - ❌ Stale TS types. Regenerate `src/api/types.ts` after every OpenAPI
1281
+ contract change.
1282
+ - ❌ Hardcoded `http://localhost:8080` in the production frontend. Use
1283
+ `environment.apiBaseUrl`.
1284
+ - ❌ `Co-Authored-By: Claude` in commits. Forbidden. Blocks merge.
1285
+ - ❌ `allowed-origins: "*"` with `allow-credentials: true`. CORS forbids it.
1286
+ - ❌ `var` in a public Java signature/return.
1287
+ - ❌ `any` in TypeScript. Use `unknown` + narrowing.
1288
+ - ❌ Product decisions by the developer. PO decides. Tech decisions by the
1289
+ PO. TL decides.
1290
+
1291
+ ---
1292
+
1293
+ ## 16. Fullstack troubleshooting
1294
+
1295
+ ### 16.1. CORS error in the browser
1296
+
1297
+ Symptom: console shows `Access to XMLHttpRequest at '...' has been blocked
1298
+ by CORS policy`.
1299
+
1300
+ Investigate:
1301
+
1302
+ ```bash
1303
+ curl -i -X OPTIONS http://localhost:8080/api/v1/products \
1304
+ -H "Origin: http://localhost:4200" \
1305
+ -H "Access-Control-Request-Method: POST"
1306
+ ```
1307
+
1308
+ If it does not return `Access-Control-Allow-Origin`, the issue is on the
1309
+ backend.
1310
+
1311
+ ```text
1312
+ > "let's debug CORS on the /api/v1/products endpoint"
1313
+ ```
1314
+
1315
+ ### 16.2. TS types out of sync
1316
+
1317
+ Symptom: TS compiles but runtime breaks with `Cannot read properties of
1318
+ undefined`.
1319
+
1320
+ Fix:
1321
+
1322
+ ```bash
1323
+ cd frontend
1324
+ npm run gen:api
1325
+ ```
1326
+
1327
+ Commit `src/api/types.ts`.
1328
+
1329
+ ### 16.3. Network between containers in docker-compose
1330
+
1331
+ Symptom: backend can't reach `localhost:5432`.
1332
+
1333
+ Cause: inside a container, the Postgres hostname is `postgres` (the service
1334
+ name), not `localhost`.
1335
+
1336
+ Fix: use `SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/...`.
1337
+
1338
+ ### 16.4. Port 8080 / 4200 in use
1339
+
1340
+ ```bash
1341
+ # Windows:
1342
+ netstat -ano | findstr :8080
1343
+ taskkill /F /PID <PID>
1344
+
1345
+ # Linux/Mac:
1346
+ lsof -i :8080
1347
+ kill -9 <PID>
1348
+ ```
1349
+
1350
+ Or change the port in `docker-compose.yml`.
1351
+
1352
+ ### 16.5. OpenAPI returns 404
1353
+
1354
+ Symptom: `http://localhost:8080/v3/api-docs` 404.
1355
+
1356
+ Common cause: Springdoc is not in the dependencies.
1357
+
1358
+ Fix in `pom.xml`:
1359
+
1360
+ ```xml
1361
+ <dependency>
1362
+ <groupId>org.springdoc</groupId>
1363
+ <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
1364
+ <version>2.6.0</version>
1365
+ </dependency>
1366
+ ```
1367
+
1368
+ ### 16.6. Hot reload on both
1369
+
1370
+ - **Backend**: `./mvnw spring-boot:run` + DevTools in `pom.xml`.
1371
+ - **Frontend**: `ng serve` (native hot reload).
1372
+ - **Docker**: bind mount `./backend/src:/app/src` + `./frontend/src:/app/src`,
1373
+ custom command to reload.
1374
+
1375
+ ### 16.7. Frontend comes up before the backend
1376
+
1377
+ Symptom: initial screen 500 / ECONNREFUSED.
1378
+
1379
+ Fix: `depends_on` with `condition: service_healthy` in compose. Without it,
1380
+ `depends_on` only waits for the container to exist, not for the service to
1381
+ be ready.
1382
+
1383
+ ### 16.8. 401 on integration
1384
+
1385
+ Expired / missing / invalid token. Check:
1386
+
1387
+ - The auth interceptor is registered in `app.config.ts`.
1388
+ - `localStorage` has the token under the right key.
1389
+ - Backend accepts the issuer/audience.
1390
+
1391
+ ### 16.9. Lighthouse below 0.80
1392
+
1393
+ - Images without `width/height` → high CLS.
1394
+ - Initial bundle > 500KB → high LCP.
1395
+ - Blocking JS in `<head>` → high TBT.
1396
+
1397
+ Fixes via `frontend-developer` + Impeccable.
1398
+
1399
+ More in [troubleshooting](../docs/troubleshooting).
1400
+
1401
+ ---
1402
+
1403
+ ## 18. Active hooks
1404
+
1405
+ `.claude/settings.json` defines hooks that fire at key moments:
1406
+
1407
+ - **PreToolUse**: validates `Edit`/`Write` (blocks inline Angular template,
1408
+ blocks `// TODO`, blocks exposing `@Entity` from a controller).
1409
+ - **PostToolUse**: warns if the backend changed the OpenAPI contract and
1410
+ the frontend hasn't regenerated `types.ts`.
1411
+ - **UserPromptSubmit**: runs at prompt submit.
1412
+ - **SessionStart**: loads `Project Identity` into the context.
1413
+
1414
+ Details: [hooks-reference](../docs/hooks-reference).
1415
+
1416
+ ---
1417
+
1418
+ ## 19. Quick glossary
1419
+
1420
+ - **Skill**: conversational entry-point triggered by a keyword. Routes to
1421
+ one or more agents.
1422
+ - **Agent**: specialized executor (analyst, backend-developer, etc.) with
1423
+ defined responsibility and autonomy.
1424
+ - **PLAN**: `docs/plans/PLAN_<slug>.md` with Sprints + Tasks + goal-ready DoD.
1425
+ - **PRD**: `docs/prd/PRD_<slug>.md` (Product Requirements Document).
1426
+ - **ADR**: Architecture Decision Record in `docs/decisions/ADR-NNN-*.md`.
1427
+ - **Goal-ready DoD**: verifiable, automatable acceptance criterion aligned
1428
+ with the task goal.
1429
+ - **Senior+ gate**: set of thresholds (coverage, mutation, a11y,
1430
+ Lighthouse, pyramid ratio) that blocks merge.
1431
+ - **Vault**: `docs/brain/` in Obsidian format (wiki links + tags + MOC).
1432
+ - **Impeccable**: external pack (`npx skills add pbakaus/impeccable`) with
1433
+ `/impeccable polish|audit|harden|typeset|colorize|layout` commands for
1434
+ visual polish.
1435
+ - **openapi-typescript**: TS type generator from OpenAPI 3.x.
1436
+ - **Goal-ready**: explicit, measurable, tied to the objective.
1437
+
1438
+ ---
1439
+
1440
+ ## 20. Cross-references
1441
+
1442
+ - [Architecture overview](../docs/architecture-overview)
1443
+ - [Stack rules](../docs/stack-rules)
1444
+ - [Skills reference](../docs/skills-reference)
1445
+ - [Agents reference](../docs/agents-reference)
1446
+ - [Pipeline](../docs/pipeline)
1447
+ - [Quality gate](../docs/quality-gate)
1448
+ - [Autonomy matrix](../docs/autonomy-matrix)
1449
+ - [Git flow](../docs/git-flow)
1450
+ - [Hooks reference](../docs/hooks-reference)
1451
+ - [Troubleshooting](../docs/troubleshooting)
1452
+ - [Manual — Backend (standalone)](./backend.en)
1453
+ - [Manual — Frontend (standalone)](./frontend.en)
1454
+ - [Manual — Mobile](./mobile.en)
1455
+ - [Manual — Existing project](./existing-project.en)
1456
+
1457
+ ---
1458
+
1459
+ **End of manual.** Happy building.