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