@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,831 @@
|
|
|
1
|
+
# Manual — Adopting an existing project
|
|
2
|
+
|
|
3
|
+
> Picked up a legacy repo? Got an old Java/Spring/Angular codebase and want the
|
|
4
|
+
> development-utility-kit harness without rewriting anything? This manual is for
|
|
5
|
+
> you. Covers initial adoption, debt audit, safe first feature, stack migration,
|
|
6
|
+
> and recurring template updates — without breaking production.
|
|
7
|
+
|
|
8
|
+
## 1. Introduction
|
|
9
|
+
|
|
10
|
+
**For whom**: dev who inherited a legacy project (Java 8/11/17 + Spring Boot
|
|
11
|
+
2/3, Angular 14/15/16, RN 0.70+) and wants to adopt the `development-utility-kit`
|
|
12
|
+
harness to get agents/skills, senior+ gate, brain-keeper and Honcho memory
|
|
13
|
+
running.
|
|
14
|
+
|
|
15
|
+
**What this manual covers**:
|
|
16
|
+
|
|
17
|
+
- Installing the harness on a project WITHOUT `.claude/`
|
|
18
|
+
- Updating a project that ALREADY has `.claude/` (idempotent)
|
|
19
|
+
- Batch adoption (multiple projects via `/active-project`)
|
|
20
|
+
- Initial audit: structure, coverage, debt
|
|
21
|
+
- First feature on a legacy codebase with a GREEN baseline
|
|
22
|
+
- Stack migration (Java/Spring/Angular major versions)
|
|
23
|
+
- Recurring template update when the plugin evolves
|
|
24
|
+
- Antipatterns, troubleshooting, glossary
|
|
25
|
+
|
|
26
|
+
**Prerequisites**:
|
|
27
|
+
|
|
28
|
+
- Git installed, clean repository (commit or stash pending changes first)
|
|
29
|
+
- Node.js >= 18 (for `npx @eltonssouza/development-utility-kit install`)
|
|
30
|
+
- Cowork connected OR Claude Code CLI installed
|
|
31
|
+
- Dedicated branch (`git checkout -b chore/adopt-harness` before touching anything)
|
|
32
|
+
- Read/write access on the project directory
|
|
33
|
+
|
|
34
|
+
**What's NOT here**: scaffolding a new project (use `backend.en.md`,
|
|
35
|
+
`frontend.en.md`, `fullstack.en.md`, `mobile.en.md`). This manual is legacy only.
|
|
36
|
+
|
|
37
|
+
## 2. 5-min onboarding — project WITHOUT `.claude/`
|
|
38
|
+
|
|
39
|
+
Scenario: you cloned a legacy repo and want to plug in the harness for the first
|
|
40
|
+
time.
|
|
41
|
+
|
|
42
|
+
### 2.1 Preparation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd C:\my-legacy-project
|
|
46
|
+
|
|
47
|
+
# Confirm clean branch — installer does NOT touch dirty files
|
|
48
|
+
git status
|
|
49
|
+
|
|
50
|
+
# Dedicated branch for adoption (NEVER run on main/develop directly)
|
|
51
|
+
git checkout -b chore/adopt-harness
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2.2 Install via npx (recommended)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx @eltonssouza/development-utility-kit install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Expected output:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
> development-utility-kit install
|
|
64
|
+
> Detecting project type...
|
|
65
|
+
✓ Detected type: fullstack (backend/pom.xml + frontend/angular.json)
|
|
66
|
+
✓ Backup created at .claude.backup-2026-05-27T14-32-18/ (if .claude already existed)
|
|
67
|
+
✓ .claude/agents/ — 25 agents installed
|
|
68
|
+
✓ .claude/skills/ — 18 skills installed
|
|
69
|
+
✓ .claude/settings.json — hooks configured
|
|
70
|
+
✓ CLAUDE.md — generated/merged preserving Project Identity
|
|
71
|
+
✓ docs/brain/ — provisioned if absent
|
|
72
|
+
✓ Install completed in 3.2s
|
|
73
|
+
|
|
74
|
+
Next step: edit CLAUDE.md → ## Project Identity with the REAL current state of the project.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 2.3 Install via global binary
|
|
78
|
+
|
|
79
|
+
If you've already run `npx @eltonssouza/development-utility-kit install` on the
|
|
80
|
+
host and have `duk` on PATH:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
cd C:\my-legacy-project
|
|
84
|
+
duk install
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`duk install` and `duk update` are aliases — same behavior. Use whichever you
|
|
88
|
+
prefer; `update` makes it explicit you're re-injecting on a project that
|
|
89
|
+
already has the harness.
|
|
90
|
+
|
|
91
|
+
### 2.4 Preview without writing
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
duk install --dry-run
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Prints what WOULD be written without touching any file. Use this on sensitive
|
|
98
|
+
projects before adopting.
|
|
99
|
+
|
|
100
|
+
### 2.5 Subfolder (monorepo)
|
|
101
|
+
|
|
102
|
+
If the fullstack project lives in a subdirectory:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
cd C:\my-monorepo
|
|
106
|
+
duk install --sub backend
|
|
107
|
+
duk install --sub frontend
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Each subfolder gets its own `.claude/` + `CLAUDE.md`, with isolated
|
|
111
|
+
`Project Identity`.
|
|
112
|
+
|
|
113
|
+
### 2.6 Edit `CLAUDE.md → Project Identity`
|
|
114
|
+
|
|
115
|
+
The template injects a `## Project Identity` section with placeholders. Replace
|
|
116
|
+
them with the REAL state of the project (not the desired state):
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
## Project Identity
|
|
120
|
+
|
|
121
|
+
- **Project name**: `legacy-erp`
|
|
122
|
+
- **Project type**: `fullstack`
|
|
123
|
+
- **Primary stack**: `Java 11 + Spring Boot 2.7 + Angular 14`
|
|
124
|
+
- **Database**: `Oracle 19c + Redis 6`
|
|
125
|
+
- **Domain**: `Financial ERP`
|
|
126
|
+
- **Team size**: `5 backend, 2 frontend`
|
|
127
|
+
- **Additional rules**: |
|
|
128
|
+
- JUnit 4 in use (JUnit 5 migration tracked in ADR-031)
|
|
129
|
+
- H2 in legacy tests
|
|
130
|
+
- Modernization to Java 25 + SB 4 in backlog (ADR-040)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 2.7 Bring up the dashboard (optional)
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
duk dashboard
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Opens `http://localhost:4242` with manuals, agents, skills, and ADRs of the
|
|
140
|
+
harness for offline reference.
|
|
141
|
+
|
|
142
|
+
### 2.8 Open Cowork or Claude Code
|
|
143
|
+
|
|
144
|
+
From here the chat has access to all agents/skills. Recommended first prompt:
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
auditor compares .claude structure with official template
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Confirms the install came out clean.
|
|
151
|
+
|
|
152
|
+
## 3. Onboarding — project ALREADY HAS `.claude/`
|
|
153
|
+
|
|
154
|
+
Scenario: the repo was adopted before (by you or another dev) and you want to
|
|
155
|
+
update.
|
|
156
|
+
|
|
157
|
+
### 3.1 Update via CLI (idempotent)
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
cd C:\my-legacy-project
|
|
161
|
+
git checkout -b chore/update-harness
|
|
162
|
+
duk install
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The installer:
|
|
166
|
+
|
|
167
|
+
- Detects existing `.claude/`
|
|
168
|
+
- Creates backup at `.claude.backup-<timestamp>/`
|
|
169
|
+
- Overwrites `agents/`, `skills/`, `settings.json` with current version
|
|
170
|
+
- MERGES `CLAUDE.md`: preserves `## Project Identity`, overwrites other
|
|
171
|
+
sections with the new plugin version
|
|
172
|
+
- Prints summary diff
|
|
173
|
+
|
|
174
|
+
### 3.2 Update via chat
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
> "update the template"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Triggers the `update-template` agent (model: haiku, it's mechanical). Same
|
|
181
|
+
effect as `duk install`, but you watch it via chat.
|
|
182
|
+
|
|
183
|
+
### 3.3 Sync with claude-code-agents
|
|
184
|
+
|
|
185
|
+
```text
|
|
186
|
+
> "sync with claude-code-agents"
|
|
187
|
+
> "bring in the new skills"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Same triggers as `update-template`. Use whichever vocabulary feels natural.
|
|
191
|
+
|
|
192
|
+
## 4. Batch adoption — multiple projects
|
|
193
|
+
|
|
194
|
+
If you have 5+ legacy repos and want to adopt them all without entering each:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
/active-project C:/projects/legacy-1
|
|
198
|
+
/active-project C:/projects/legacy-2 --force-type=backend
|
|
199
|
+
/active-project C:/projects/legacy-3 --template=C:/development/tools/development-utility-kit
|
|
200
|
+
/active-project C:/projects/legacy-4 --dry-run
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### 4.1 `/active-project` flags
|
|
204
|
+
|
|
205
|
+
- `--dry-run` — preview, writes nothing
|
|
206
|
+
- `--force-type=<backend|frontend|fullstack|mobile>` — force type when
|
|
207
|
+
auto-detect gets it wrong (e.g. backend with `package.json` for build tools
|
|
208
|
+
but actually Java)
|
|
209
|
+
- `--template=<path>` — use an alternate template path (local forks, pending
|
|
210
|
+
upstream fix)
|
|
211
|
+
- `--skip-brain` — don't provision `docs/brain/`
|
|
212
|
+
- `--skip-honcho` — don't inject Honcho config
|
|
213
|
+
|
|
214
|
+
### 4.2 Fast-lane vs interactive
|
|
215
|
+
|
|
216
|
+
| Skill | Mode | When to use |
|
|
217
|
+
|---|---|---|
|
|
218
|
+
| `active-project` | Non-interactive, path-driven | Batch, multiple projects, CI |
|
|
219
|
+
| `update-template` | Interactive, prompt-driven | Single project, manual validation |
|
|
220
|
+
| `duk install` (CLI) | Non-interactive, CWD-driven | Local, first contact |
|
|
221
|
+
|
|
222
|
+
All three converge on the same result: `.claude/` + `CLAUDE.md` at the current
|
|
223
|
+
version.
|
|
224
|
+
|
|
225
|
+
## 5. Workflow 1 — Initial audit (day 1)
|
|
226
|
+
|
|
227
|
+
You just installed the harness. Before touching code, audit the state.
|
|
228
|
+
|
|
229
|
+
### Turn 1 — compare with official template
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
You:
|
|
233
|
+
auditor compares .claude structure with official template
|
|
234
|
+
|
|
235
|
+
Claude (auditor):
|
|
236
|
+
> Diff vs template development-utility-kit v5.18.0:
|
|
237
|
+
> .claude/agents/: 25 agents, all up to date ✓
|
|
238
|
+
> .claude/skills/: 18 skills, 1 outdated:
|
|
239
|
+
> - auto-test-guard V5.13 (current V5.18) — pyramid ratio gate missing
|
|
240
|
+
> CLAUDE.md: Project Identity OK ✓
|
|
241
|
+
> docs/brain/: structure missing
|
|
242
|
+
> .claude/settings.json: custom PostToolUse hook preserved
|
|
243
|
+
> Recommend: "update the template" for skill sync, then "register in the brain"
|
|
244
|
+
> to provision docs/brain/.
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Turn 2 — audit tests
|
|
248
|
+
|
|
249
|
+
```text
|
|
250
|
+
You:
|
|
251
|
+
audit the tests
|
|
252
|
+
|
|
253
|
+
Claude (test-coverage-auditor):
|
|
254
|
+
> Backend src/main/java/: 187 classes, 142 with tests (76%)
|
|
255
|
+
> Frontend src/app/: 87 .ts, 51 with .spec.ts (59%)
|
|
256
|
+
> JaCoCo: 71% lines (below 85% threshold)
|
|
257
|
+
> JaCoCo branches: 64% (below 80%)
|
|
258
|
+
> PIT mutation: not configured (gate requires 70% in domain/application)
|
|
259
|
+
>
|
|
260
|
+
> P0 (business rule without test): 3 use cases
|
|
261
|
+
> - PaymentUseCase.calculateTax — 4 branches, 0 tests
|
|
262
|
+
> - OrderUseCase.applyDiscount — 6 branches, 0 tests
|
|
263
|
+
> - InventoryUseCase.reserve — 8 branches, 0 tests
|
|
264
|
+
> P1 (partial, edges missing): 8 classes
|
|
265
|
+
> P2 (utility, low criticality): 23 classes
|
|
266
|
+
> P3 (DTO/config): 12 classes
|
|
267
|
+
>
|
|
268
|
+
> Verdict PRD-ready: NO-GO.
|
|
269
|
+
> Full report in docs/brain/architecture/tech-debt.md
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Turn 3 — prioritize
|
|
273
|
+
|
|
274
|
+
```text
|
|
275
|
+
You:
|
|
276
|
+
tech-lead prioritizes P0/P1 and creates ADR for debt payment
|
|
277
|
+
|
|
278
|
+
Claude (tech-lead):
|
|
279
|
+
> Plan:
|
|
280
|
+
> 1. P0 PaymentUseCase — 2 days (estimated by @qa-engineer)
|
|
281
|
+
> 2. P0 OrderUseCase — 1 day
|
|
282
|
+
> 3. P0 InventoryUseCase — 1 day
|
|
283
|
+
> 4. P1 (8 classes) — 1 week, parallelizable by sub-team
|
|
284
|
+
> 5. P2 — backlog, pay along with features that touch the code
|
|
285
|
+
>
|
|
286
|
+
> ADR-040 created in docs/adr/ADR-040-coverage-debt-payment.md:
|
|
287
|
+
> - Context: RED gate blocks new features
|
|
288
|
+
> - Decision: pay P0+P1 in a dedicated sprint before release
|
|
289
|
+
> - Consequences: 2 weeks without new features, GREEN gate in 14 days
|
|
290
|
+
>
|
|
291
|
+
> Sprint 0 (debt-payment) created in docs/sprints/SPRINT-0.md.
|
|
292
|
+
> Recommend: "run sprint 0" to start.
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Turn 4 — provision vault
|
|
296
|
+
|
|
297
|
+
```text
|
|
298
|
+
You:
|
|
299
|
+
register in the brain
|
|
300
|
+
|
|
301
|
+
Claude (brain-keeper):
|
|
302
|
+
> docs/brain/ provisioned:
|
|
303
|
+
> ├── MOC.md (map of content)
|
|
304
|
+
> ├── architecture/
|
|
305
|
+
> │ ├── tech-debt.md (auditor report)
|
|
306
|
+
> │ └── decisions.md (ADR index)
|
|
307
|
+
> ├── features/
|
|
308
|
+
> ├── daily/2026-05-27.md
|
|
309
|
+
> └── .obsidian/ (color snippet, initial config)
|
|
310
|
+
> Vault ready for Obsidian. Open with File > Open Folder.
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Turn 5 — memorize context
|
|
314
|
+
|
|
315
|
+
```text
|
|
316
|
+
You:
|
|
317
|
+
remember that the project is on Java 11 + Spring Boot 2.7, modernization to
|
|
318
|
+
Java 25 + SB 4 planned for Q3. JUnit 4 still in 23 tests.
|
|
319
|
+
|
|
320
|
+
Claude (honcho-memory):
|
|
321
|
+
> Saved to Honcho:
|
|
322
|
+
> [PROJECT_CONTEXT] legacy-erp on Java 11 + Spring Boot 2.7
|
|
323
|
+
> [MIGRATION_PLAN] target Java 25 + Spring Boot 4, Q3 2026
|
|
324
|
+
> [DEBT] JUnit 4 in 23 tests — do not auto-convert
|
|
325
|
+
> From the next turn on, this context enters the prompt as [HONCHO MEMORY].
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
## 6. Workflow 2 — First feature on legacy
|
|
329
|
+
|
|
330
|
+
Rule: never start a feature on a project with a RED gate. The harness protects you.
|
|
331
|
+
|
|
332
|
+
### Turn 1 — request
|
|
333
|
+
|
|
334
|
+
```text
|
|
335
|
+
You:
|
|
336
|
+
grill me about adding CSV export of sales
|
|
337
|
+
|
|
338
|
+
Claude (grill-me):
|
|
339
|
+
> Before starting the discovery interview: is gate-keeper GREEN on the current
|
|
340
|
+
> project state? Without a green baseline, adding a feature on top of debt is
|
|
341
|
+
> stacking liability.
|
|
342
|
+
> Run "run the tests" first to validate.
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Turn 2 — validate baseline
|
|
346
|
+
|
|
347
|
+
```text
|
|
348
|
+
You:
|
|
349
|
+
run the tests
|
|
350
|
+
|
|
351
|
+
Claude (gate-keeper):
|
|
352
|
+
> Full suite:
|
|
353
|
+
> mvn verify ......................... FAIL (3 tests RED after develop merge)
|
|
354
|
+
> Backend coverage ................... 71% (below 85%)
|
|
355
|
+
> PIT mutation ....................... not configured
|
|
356
|
+
> SpotBugs ........................... 2 HIGH
|
|
357
|
+
> Frontend coverage .................. 59%
|
|
358
|
+
> ESLint ............................. 14 warnings
|
|
359
|
+
> Playwright ......................... PASS
|
|
360
|
+
>
|
|
361
|
+
> Verdict: RED. Don't start a new feature. Recommend:
|
|
362
|
+
> 1. "tech-lead diagnoses the 3 red tests"
|
|
363
|
+
> 2. "gate-keeper generates tests for P0 of tech-debt.md"
|
|
364
|
+
> 3. Then: feature.
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Turn 3 — pay debt first
|
|
368
|
+
|
|
369
|
+
```text
|
|
370
|
+
You:
|
|
371
|
+
gate-keeper generate tests for the 3 P0 from tech-debt.md
|
|
372
|
+
|
|
373
|
+
Claude:
|
|
374
|
+
> Dispatch in parallel:
|
|
375
|
+
> - qa-engineer → PaymentUseCase (18 tests, branches + edge cases)
|
|
376
|
+
> - qa-engineer → OrderUseCase (24 tests)
|
|
377
|
+
> - qa-engineer → InventoryUseCase (32 tests)
|
|
378
|
+
> Total: 74 new tests in domain/application.
|
|
379
|
+
>
|
|
380
|
+
> Re-run of the gate:
|
|
381
|
+
> JaCoCo lines ................... 86% ✓
|
|
382
|
+
> JaCoCo branches ................ 81% ✓
|
|
383
|
+
> PIT mutation (configured) ...... 71% ✓
|
|
384
|
+
> SpotBugs ....................... 0 HIGH ✓
|
|
385
|
+
> Frontend ....................... 59% (still below, P1 backlog)
|
|
386
|
+
>
|
|
387
|
+
> Verdict: GREEN on backend. Frontend still P1 but does not block backend
|
|
388
|
+
> feature. You can proceed.
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Turn 4 — normal discovery
|
|
392
|
+
|
|
393
|
+
```text
|
|
394
|
+
You:
|
|
395
|
+
now grill me about adding CSV export of sales
|
|
396
|
+
|
|
397
|
+
Claude (grill-me):
|
|
398
|
+
> Discovery interview, 10-15 turns. Question 1/N:
|
|
399
|
+
> What's the definition of "sale" in the export context? Order completed?
|
|
400
|
+
> Order shipped? Order with confirmed payment? Each changes the SQL filter.
|
|
401
|
+
> ...
|
|
402
|
+
> [full interview]
|
|
403
|
+
> Output: docs/discovery/DISCOVERY-csv-export-sales.md
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
From here the flow is standard (analyst → architect → sprint-runner →
|
|
407
|
+
gate-keeper → code-reviewer → tech-lead). See `pipeline.en.md` for details.
|
|
408
|
+
|
|
409
|
+
## 7. Workflow 3 — Stack migration (migrator)
|
|
410
|
+
|
|
411
|
+
Full example: Java 11 + Spring Boot 2.7 → Java 25 + Spring Boot 4.0.
|
|
412
|
+
|
|
413
|
+
### Turn 1 — request
|
|
414
|
+
|
|
415
|
+
```text
|
|
416
|
+
You:
|
|
417
|
+
migrate this project from Java 11 + Spring Boot 2.7 to Java 25 + Spring Boot 4
|
|
418
|
+
|
|
419
|
+
Claude (migrator):
|
|
420
|
+
> Mandatory prerequisite: gate-keeper GREEN baseline. A major migration on a
|
|
421
|
+
> project with RED tests or coverage below threshold = Russian roulette.
|
|
422
|
+
> Confirm gate-keeper returned GREEN in the last 24h? (yes/no)
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Turn 2 — confirmation
|
|
426
|
+
|
|
427
|
+
```text
|
|
428
|
+
You:
|
|
429
|
+
yes, ran it yesterday and came back GREEN
|
|
430
|
+
|
|
431
|
+
Claude (migrator):
|
|
432
|
+
> Plan in 4 phases. Each phase ends with gate-keeper validation.
|
|
433
|
+
>
|
|
434
|
+
> Phase 1 — Assessment (read-only, 1 day)
|
|
435
|
+
> Generates docs/migrations/MIGRATION-java11-springboot2.7-to-java25-springboot4.md
|
|
436
|
+
> - 47 removed APIs in use (List.of, var inference, switch expressions)
|
|
437
|
+
> - 12 deprecated APIs (RestTemplate → RestClient, WebSecurityConfigurerAdapter)
|
|
438
|
+
> - 8 application.yml changes (jakarta.* namespace, renamed properties)
|
|
439
|
+
> - 5 dependencies without Spring Boot 4 compatible version
|
|
440
|
+
> - hibernate-core 5.6 → 6.5
|
|
441
|
+
> - lombok 1.18.20 → 1.18.32
|
|
442
|
+
> - mapstruct 1.4 → 1.6
|
|
443
|
+
> - testcontainers 1.16 → 1.20
|
|
444
|
+
> - mockito 3.12 → 5.14
|
|
445
|
+
> - 23 JUnit 4 tests (migrate to JUnit 5 in parallel)
|
|
446
|
+
>
|
|
447
|
+
> Phase 2 — Quick wins non-breaking (1 day)
|
|
448
|
+
> ✓ List.of() / Map.of() where applicable
|
|
449
|
+
> ✓ Optional.orElseThrow()
|
|
450
|
+
> ✓ Records where DTOs became immutable
|
|
451
|
+
> ✓ Pattern matching for instanceof
|
|
452
|
+
> gate-keeper validation: GREEN ✓
|
|
453
|
+
>
|
|
454
|
+
> Phase 3 — Breaking changes (4-6 days, ADR per major cross)
|
|
455
|
+
> ADR-041: Java 11 → 17 LTS (text blocks, sealed classes)
|
|
456
|
+
> ADR-042: Java 17 → 21 LTS (virtual threads, sequenced collections)
|
|
457
|
+
> ADR-043: Java 21 → 25 (stream gatherers, scoped values stable)
|
|
458
|
+
> ADR-044: Spring Boot 2.7 → 3.0 (jakarta.* migration — highest risk)
|
|
459
|
+
> ADR-045: 3.0 → 3.2 (optional Native Image)
|
|
460
|
+
> ADR-046: 3.2 → 4.0 (SecurityFilterChain, RestClient, ProblemDetail RFC 9457)
|
|
461
|
+
> gate-keeper validation: GREEN on EACH cross ✓
|
|
462
|
+
>
|
|
463
|
+
> Phase 4 — Final validation (1 day)
|
|
464
|
+
> mvn verify ...................... ✓
|
|
465
|
+
> PIT mutation .................... 74% ✓
|
|
466
|
+
> SpotBugs ........................ 0 HIGH ✓
|
|
467
|
+
> OWASP DC ........................ 0 CVE CVSS ≥ 7.0 ✓
|
|
468
|
+
> Smoke test in staging ........... 48h mandatory
|
|
469
|
+
>
|
|
470
|
+
> Total estimate: 7-9 working days. PR per phase (6 PRs total). Rollback plan:
|
|
471
|
+
> revert phase PR + controlled downgrade via maven profile.
|
|
472
|
+
>
|
|
473
|
+
> Confirm kickoff? (yes for Phase 1 / no to abort)
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Turn 3 — execution
|
|
477
|
+
|
|
478
|
+
```text
|
|
479
|
+
You:
|
|
480
|
+
yes
|
|
481
|
+
|
|
482
|
+
Claude (migrator):
|
|
483
|
+
> Phase 1 started. Output in docs/migrations/MIGRATION-*.md in ~10 minutes.
|
|
484
|
+
> Next expected prompt: "phase 2" after you review the assessment.
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### Why one ADR per major cross?
|
|
488
|
+
|
|
489
|
+
Each major jump (Java 11→17→21→25, SB 2.7→3.0→3.2→4.0) has its own trade-offs:
|
|
490
|
+
deps, breaking changes, lib velocity. A single ADR "migrate from X to Y" loses
|
|
491
|
+
traceability. One ADR per cross keeps the decision history clear and enables
|
|
492
|
+
granular rollback.
|
|
493
|
+
|
|
494
|
+
## 8. Workflow 4 — Recurring debt audit
|
|
495
|
+
|
|
496
|
+
Audit isn't a one-time event. Run quarterly or after long sprints.
|
|
497
|
+
|
|
498
|
+
```text
|
|
499
|
+
You:
|
|
500
|
+
audit coverage and update tech-debt.md
|
|
501
|
+
|
|
502
|
+
Claude (test-coverage-auditor):
|
|
503
|
+
> Comparison with previous audit (2026-04-01):
|
|
504
|
+
> JaCoCo lines coverage ............ 71% → 86% ✓
|
|
505
|
+
> JaCoCo branches coverage ......... 64% → 81% ✓
|
|
506
|
+
> PIT mutation ..................... not configured → 74% ✓
|
|
507
|
+
> Frontend coverage ................ 59% → 68% (P1 still open)
|
|
508
|
+
>
|
|
509
|
+
> P0 closed ........................ 3 → 0 ✓
|
|
510
|
+
> P1 closed ........................ 8 → 2 (6 paid)
|
|
511
|
+
> P2 closed ........................ 23 → 19 (4 paid via feature work)
|
|
512
|
+
> P3 ............................... 12 → 12 (unchanged)
|
|
513
|
+
>
|
|
514
|
+
> New P0 ........................... 0 ✓
|
|
515
|
+
> New P1 ........................... 1
|
|
516
|
+
> - ExportCsvUseCase.streamLargeBatch: >100k rows edge case untested
|
|
517
|
+
>
|
|
518
|
+
> Verdict PRD-ready: GO.
|
|
519
|
+
>
|
|
520
|
+
> docs/brain/architecture/tech-debt.md updated.
|
|
521
|
+
> docs/brain/daily/2026-05-27.md got the audit entry.
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
## 9. Workflow 5 — Recurring template update
|
|
525
|
+
|
|
526
|
+
When the `development-utility-kit` plugin evolves (new agent, skill, base ADR),
|
|
527
|
+
you'll want to pull it into your project.
|
|
528
|
+
|
|
529
|
+
### Via CLI
|
|
530
|
+
|
|
531
|
+
```bash
|
|
532
|
+
cd C:\my-project
|
|
533
|
+
git checkout -b chore/update-harness-2026-05
|
|
534
|
+
duk install
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
Output:
|
|
538
|
+
|
|
539
|
+
```text
|
|
540
|
+
✓ Backup: .claude.backup-2026-05-27T15-12-04/
|
|
541
|
+
✓ 2 skills updated (auto-test-guard, brain-keeper)
|
|
542
|
+
✓ 1 new agent (release-engineer-v2)
|
|
543
|
+
✓ settings.json overwritten (3 new hooks)
|
|
544
|
+
✓ CLAUDE.md merged — Project Identity preserved
|
|
545
|
+
✓ docs/brain/ untouched (history is never overwritten)
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
### Via chat
|
|
549
|
+
|
|
550
|
+
```text
|
|
551
|
+
> "update the template"
|
|
552
|
+
> "sync with claude-code-agents"
|
|
553
|
+
> "bring in the new skills"
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
All trigger the `update-template` agent (haiku). Result identical to CLI.
|
|
557
|
+
|
|
558
|
+
### Update policy
|
|
559
|
+
|
|
560
|
+
- Update on demand, not by habit
|
|
561
|
+
- ALWAYS on a dedicated branch (`chore/update-harness-<date>`)
|
|
562
|
+
- Review diff in `.claude/settings.json` (hooks can change behavior)
|
|
563
|
+
- Confirm `## Project Identity` in `CLAUDE.md` is intact
|
|
564
|
+
- Run `auditor` afterwards to validate
|
|
565
|
+
- Test 1-2 critical skills before merge (`audit the tests`, `run the tests`)
|
|
566
|
+
- Keep `.claude.backup-*` backup for 7 days before removing
|
|
567
|
+
|
|
568
|
+
## 10. Cheat sheet — triggers for existing projects
|
|
569
|
+
|
|
570
|
+
| I want to... | Type |
|
|
571
|
+
|---|---|
|
|
572
|
+
| Adopt project without .claude/ | `duk install` (terminal) OR `/active-project <path>` (chat) |
|
|
573
|
+
| Update template | `duk install` (terminal) OR `update the template` (chat) |
|
|
574
|
+
| Compare with official template | `auditor compares .claude structure with official template` |
|
|
575
|
+
| Audit coverage | `audit the tests` |
|
|
576
|
+
| Prioritize debt | `tech-lead prioritizes P0/P1` |
|
|
577
|
+
| Generate missing tests | `gate-keeper generates tests for P0` |
|
|
578
|
+
| Migrate Spring 2/3 → 4 | `migrate from Spring Boot <X> to 4` |
|
|
579
|
+
| Migrate legacy Java | `migrate Java <X> to 25` |
|
|
580
|
+
| Migrate Angular 14-20 → 21 | `migrate Angular <X> to 21` |
|
|
581
|
+
| First feature on legacy | `run the tests` → `grill me about <X>` |
|
|
582
|
+
| Bug on legacy | `let's debug <X>` |
|
|
583
|
+
| PRD-ready check | `is this ready for production?` |
|
|
584
|
+
| Batch adoption | `/active-project <path>` repeated |
|
|
585
|
+
| Remember state | `remember that the project is on <stack>` |
|
|
586
|
+
| List memories | `/honcho list` |
|
|
587
|
+
| Register feature/ADR/debt | `register in the brain` |
|
|
588
|
+
| Debt-payment sprint | `run sprint 0` (after tech-lead plan) |
|
|
589
|
+
|
|
590
|
+
## 11. Decision tree
|
|
591
|
+
|
|
592
|
+
```text
|
|
593
|
+
.claude/ absent in the project?
|
|
594
|
+
→ duk install (CLI) or /active-project <path> (chat batch)
|
|
595
|
+
|
|
596
|
+
.claude/ present but outdated?
|
|
597
|
+
→ duk install (idempotent) OR "update the template"
|
|
598
|
+
|
|
599
|
+
Don't know the test state?
|
|
600
|
+
→ "audit the tests" (test-coverage-auditor)
|
|
601
|
+
|
|
602
|
+
Coverage bad, going to prod tomorrow?
|
|
603
|
+
→ "is this ready for production?" (prd-ready-check)
|
|
604
|
+
→ "tech-lead prioritizes P0/P1"
|
|
605
|
+
|
|
606
|
+
Legacy stack (Java 8/11/17, Spring 2/3, Angular 14-20)?
|
|
607
|
+
→ "migrate from <X> to <Y>" (migrator)
|
|
608
|
+
→ ALWAYS with GREEN baseline first
|
|
609
|
+
|
|
610
|
+
About to start a new feature?
|
|
611
|
+
→ "run the tests" → gate GREEN? → "grill me about <X>"
|
|
612
|
+
→ Gate RED? → pay debt first
|
|
613
|
+
|
|
614
|
+
Several projects to adopt at once?
|
|
615
|
+
→ "/active-project <path>" in batch (non-interactive)
|
|
616
|
+
|
|
617
|
+
Obscure/intermittent bug on legacy?
|
|
618
|
+
→ "let's debug <X>" (pair-debug, hypothesis-driven)
|
|
619
|
+
|
|
620
|
+
Want project history/MOC?
|
|
621
|
+
→ "register in the brain" (brain-keeper)
|
|
622
|
+
→ Open docs/brain/ in Obsidian
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
## 12. CLAUDE.md Project Identity — declare REALITY
|
|
626
|
+
|
|
627
|
+
Common mistake: declare the DESIRED stack ("Java 25 + Spring Boot 4") in a
|
|
628
|
+
project still running Java 11 + SB 2.7. Agents will then suggest APIs that
|
|
629
|
+
don't exist yet, generate incompatible tests, and the gate becomes noise.
|
|
630
|
+
|
|
631
|
+
**Rule**: `Project Identity` reflects the CURRENT state. Use `Additional rules`
|
|
632
|
+
to annotate deviations and modernization plan.
|
|
633
|
+
|
|
634
|
+
### Correct example
|
|
635
|
+
|
|
636
|
+
```markdown
|
|
637
|
+
## Project Identity
|
|
638
|
+
|
|
639
|
+
- **Project name**: `legacy-erp`
|
|
640
|
+
- **Project type**: `fullstack`
|
|
641
|
+
- **Primary stack**: `Java 11 + Spring Boot 2.7 + Angular 14`
|
|
642
|
+
- **Database**: `Oracle 19c + Redis 6`
|
|
643
|
+
- **Domain**: `Financial ERP`
|
|
644
|
+
- **Team size**: `5 backend, 2 frontend`
|
|
645
|
+
- **Additional rules**: |
|
|
646
|
+
- JUnit 4 still in use (JUnit 5 migration in ADR-031)
|
|
647
|
+
- H2 in legacy tests (Testcontainers replacement in ADR-028)
|
|
648
|
+
- Hibernate 5.6, DO NOT use Hibernate 6 APIs
|
|
649
|
+
- javax.* namespace (DO NOT migrate to jakarta.* yet)
|
|
650
|
+
- RestTemplate in use (RestClient only after SB 3.x — ADR-044)
|
|
651
|
+
- Target modernization Java 25 + SB 4 in backlog (ADR-040)
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
### What goes in `Additional rules`
|
|
655
|
+
|
|
656
|
+
- Lib/framework versions that diverge from the harness target
|
|
657
|
+
- Temporary migration decisions ("don't auto-convert X")
|
|
658
|
+
- Local conventions ("NEVER use Lombok @SneakyThrows")
|
|
659
|
+
- Referenced ADRs (link to `docs/adr/ADR-NNN-*.md`)
|
|
660
|
+
|
|
661
|
+
### What NOT to touch
|
|
662
|
+
|
|
663
|
+
Other sections (`## Claude Model`, `## Mandatory Stack and Versions`,
|
|
664
|
+
`## Skills`, etc.) are plugin baseline. Don't edit manually — use `duk install`
|
|
665
|
+
/ `update-template` to receive updates. Local edits in those sections become
|
|
666
|
+
conflict on the next merge.
|
|
667
|
+
|
|
668
|
+
## 13. Antipatterns
|
|
669
|
+
|
|
670
|
+
### Adoption
|
|
671
|
+
|
|
672
|
+
- `duk install` directly on `main`/`master`/`develop` — always dedicated branch
|
|
673
|
+
- Deleting `.claude.backup-<timestamp>/` before testing — wait 7 days
|
|
674
|
+
- Overwriting `Project Identity` with desired stack, not current
|
|
675
|
+
- Manually editing `.claude/agents/*.md` (lost on next update)
|
|
676
|
+
- Modifying base sections of `CLAUDE.md` (only `Project Identity` is yours)
|
|
677
|
+
- Running `duk install` in a directory that's not a git repo (installer aborts)
|
|
678
|
+
|
|
679
|
+
### Execution
|
|
680
|
+
|
|
681
|
+
- Starting a new feature with RED gate
|
|
682
|
+
- Major migration without green baseline
|
|
683
|
+
- Skipping ADRs on migration (each major cross needs an ADR)
|
|
684
|
+
- Forcing automatic migration of everything instead of in phases
|
|
685
|
+
- Ignoring P0 from `test-coverage-auditor`
|
|
686
|
+
- Mixing debt payment with new feature in the same PR
|
|
687
|
+
|
|
688
|
+
### Commits
|
|
689
|
+
|
|
690
|
+
- `Co-Authored-By: Claude` (CLAUDE.md forbids)
|
|
691
|
+
- Mentioning Claude/Anthropic/AI/LLM in commits (NON-NEGOTIABLE)
|
|
692
|
+
- Committing directly to `main`/`master` — always via PR
|
|
693
|
+
|
|
694
|
+
### CLI
|
|
695
|
+
|
|
696
|
+
- `duk <skill>` — DOES NOT EXIST. Skills trigger via keyword in chat
|
|
697
|
+
- `duk migrate` — DOES NOT EXIST. Migration is via chat (`migrate from X to Y`)
|
|
698
|
+
- `duk audit` — DOES NOT EXIST. Audit is via chat (`audit the tests`)
|
|
699
|
+
- Asking the user for credentials — read from
|
|
700
|
+
`C:\development\tools\credentials\vps.txt`
|
|
701
|
+
|
|
702
|
+
## 14. Troubleshooting
|
|
703
|
+
|
|
704
|
+
| Symptom | Cause | Solution |
|
|
705
|
+
|---|---|---|
|
|
706
|
+
| `duk install` fails with "not a git repo" | Target directory isn't a git repo | `git init` or abort — installer requires git |
|
|
707
|
+
| `duk install` fails with `git pull` error | Target directory has pending changes | `git commit` or `git stash` first |
|
|
708
|
+
| Directory exists but isn't a git repo | Detected but invalid | Installer aborts with exit 1 — init git or remove directory |
|
|
709
|
+
| `auditor` reports outdated agents | Template evolved | `duk install` re-injects |
|
|
710
|
+
| `auditor` reports custom skills deleted | Overwritten by update | Restore from `.claude.backup-<date>/skills/` |
|
|
711
|
+
| `migrator` refuses to start | Gate baseline isn't GREEN | `run the tests`, pay debt, try again |
|
|
712
|
+
| `test-coverage-auditor` returns P0 | Business rules without tests | DO NOT skip; generate tests (`gate-keeper generates...`) OR create a documented acceptance ADR |
|
|
713
|
+
| `update-template` botched `CLAUDE.md` merge | Conflict in automatic merge | `cp CLAUDE.md.bak.<date> CLAUDE.md` + manual section merge |
|
|
714
|
+
| `.obsidian/` absent after adoption | brain-keeper didn't run | `register in the brain` provisions the vault |
|
|
715
|
+
| Obsidian vault without `MOC.md` | New vault, brain-keeper hasn't run yet | `register in the brain` creates MOC and indices |
|
|
716
|
+
| Honcho config missing | `~/.honcho/config.json` doesn't exist | `/honcho setup` (interactive wizard) |
|
|
717
|
+
| `[HONCHO MEMORY]` doesn't show up in prompts | `UserPromptSubmit` hook disabled | Check `.claude/settings.json` hooks |
|
|
718
|
+
| `settings.json` customizations lost | Merge overwrote on update | Restore from `.claude.backup-<date>/settings.json` |
|
|
719
|
+
| Agents with old path after update | Incomplete backup | `duk install --force` or remove `.claude/` and reinstall |
|
|
720
|
+
| `npx @eltonssouza/development-utility-kit install` fails with EACCES | Permission on target directory | Run as admin OR `--path <dir-with-permission>` |
|
|
721
|
+
| `duk install --sub <folder>` doesn't detect type | Subfolder without `pom.xml`/`package.json` at root | `--force-type=<backend\|frontend>` |
|
|
722
|
+
| Dashboard 4242 won't start | Port in use or Node < 18 | `node -v` and free the port |
|
|
723
|
+
| `/active-project` doesn't recognize path | Path with spaces or backslash | Use forward slash: `C:/projects/legacy-1` |
|
|
724
|
+
|
|
725
|
+
## 15. Honcho memory for legacy projects
|
|
726
|
+
|
|
727
|
+
Honcho is the cross-session persistent memory. On a legacy project, worth
|
|
728
|
+
memorizing:
|
|
729
|
+
|
|
730
|
+
### What to memorize
|
|
731
|
+
|
|
732
|
+
- **Real stack state**: `remember that the project is on Java 11 + Spring Boot 2.7`
|
|
733
|
+
- **Legacy conventions**: `remember that JUnit 4 is still in 23 tests — do not auto-convert`
|
|
734
|
+
- **Temporary restrictions**: `never use jakarta.* namespace yet (project on javax.*)`
|
|
735
|
+
- **Migration decisions**: `remember that modernization to Java 25 is in Q3, ADR-040`
|
|
736
|
+
- **Local patterns**: `always Testcontainers in NEW tests, even coexisting with H2 in legacy`
|
|
737
|
+
- **Accepted trade-offs**: `remember that ORM is Hibernate 5.6 (Spring Boot 2.7); waits for Hibernate 6 on Spring 3.0 phase`
|
|
738
|
+
|
|
739
|
+
### Commands
|
|
740
|
+
|
|
741
|
+
```text
|
|
742
|
+
/honcho save # saves short memory with last context
|
|
743
|
+
/honcho list # lists project/user memories
|
|
744
|
+
/honcho search <term> # searches in memories
|
|
745
|
+
/honcho forget <id> # removes outdated memory
|
|
746
|
+
/honcho status # shows config and count
|
|
747
|
+
/honcho setup # configuration wizard (first time)
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
### When to forget
|
|
751
|
+
|
|
752
|
+
Outdated memory becomes noise. Force `forget` when:
|
|
753
|
+
|
|
754
|
+
- Migration done — forget the old version's restrictions
|
|
755
|
+
- Convention changed — update the memory, don't accumulate
|
|
756
|
+
- ADR closed — replace "planned" with "implemented"
|
|
757
|
+
|
|
758
|
+
## 16. Active hooks after `duk install`
|
|
759
|
+
|
|
760
|
+
The `.claude/settings.json` injected by the harness activates these hooks
|
|
761
|
+
(summary):
|
|
762
|
+
|
|
763
|
+
- **UserPromptSubmit** — injects `[HONCHO MEMORY]` block with project memories
|
|
764
|
+
before each user prompt
|
|
765
|
+
- **PreToolUse Bash** — blocks dangerous commands: `rm -rf` in tests,
|
|
766
|
+
`git push --force` to `main`, `DROP DATABASE`, etc.
|
|
767
|
+
- **PostToolUse Edit/Write** — runs `prettier`/`spotless` inline on edited
|
|
768
|
+
files and fires a reminder if the file is production code without a matching
|
|
769
|
+
test
|
|
770
|
+
- **Stop** — saves a project-context snapshot to Honcho at session end (deltas,
|
|
771
|
+
decisions, ADRs created)
|
|
772
|
+
|
|
773
|
+
Full details: `[Hooks reference](../docs/hooks-reference)`.
|
|
774
|
+
|
|
775
|
+
Local customizations in `.claude/settings.json` are preserved until the next
|
|
776
|
+
`duk install`. To preserve across updates, edit via the `update-template`
|
|
777
|
+
agent rather than manually, or annotate the customization in `Additional rules`
|
|
778
|
+
of `CLAUDE.md` (alerts the template on the next merge).
|
|
779
|
+
|
|
780
|
+
## 17. Quick glossary
|
|
781
|
+
|
|
782
|
+
- **skill** — keyword-based entry point (`.claude/skills/<name>/SKILL.md`)
|
|
783
|
+
- **agent** — specialized executor (`.claude/agents/<name>.md`)
|
|
784
|
+
- **Task tool** — mechanism that lets a skill call an agent
|
|
785
|
+
- **PLAN** — `docs/plans/PLAN_*.md`, analyst output with goal-ready DoD
|
|
786
|
+
- **PRD** — `docs/prd/PRD_*.md`, product requirements (`to-prd`)
|
|
787
|
+
- **ADR** — Architecture Decision Record in `docs/adr/`
|
|
788
|
+
- **goal-ready DoD** — Definition of Done the sprint-runner can execute
|
|
789
|
+
- **senior+ gate** — threshold set in CLAUDE.md (`Senior+ Quality Gate`)
|
|
790
|
+
- **Obsidian vault** — `docs/brain/` opened in Obsidian for history/MOC
|
|
791
|
+
- **Autonomy Matrix** — who decides what without asking the human (CLAUDE.md)
|
|
792
|
+
- **P0/P1/P2/P3** — debt severity from `test-coverage-auditor`:
|
|
793
|
+
- P0: business rule without test — BLOCKS release
|
|
794
|
+
- P1: partial, edges missing — pay in dedicated sprint
|
|
795
|
+
- P2: utility, low criticality — pay along with features
|
|
796
|
+
- P3: DTO/config — perpetual backlog
|
|
797
|
+
- **Project Identity** — `CLAUDE.md` section YOU edit; rest is baseline
|
|
798
|
+
- **GREEN baseline** — gate-keeper returned OK on current state
|
|
799
|
+
- **`.claude.backup-<timestamp>/` backup** — automatic copy before
|
|
800
|
+
`duk install` overwrites
|
|
801
|
+
- **Honcho** — cross-session persistent memory (self-hosted)
|
|
802
|
+
- **MOC** — Map of Content, vault's main index at `docs/brain/MOC.md`
|
|
803
|
+
|
|
804
|
+
## 18. Cross references
|
|
805
|
+
|
|
806
|
+
- [Architecture overview](../docs/architecture-overview)
|
|
807
|
+
- [Agents reference](../docs/agents-reference)
|
|
808
|
+
- [Skills reference](../docs/skills-reference)
|
|
809
|
+
- [Pipeline](../docs/pipeline)
|
|
810
|
+
- [Quality gate](../docs/quality-gate)
|
|
811
|
+
- [Stack rules](../docs/stack-rules)
|
|
812
|
+
- [Autonomy matrix](../docs/autonomy-matrix)
|
|
813
|
+
- [Hooks reference](../docs/hooks-reference)
|
|
814
|
+
- [Honcho memory](../docs/honcho-memory)
|
|
815
|
+
- [Git Flow](../docs/git-flow)
|
|
816
|
+
- [Troubleshooting](../docs/troubleshooting)
|
|
817
|
+
|
|
818
|
+
## 19. End of manual
|
|
819
|
+
|
|
820
|
+
You adopted the harness, audited it, paid the debt, shipped your first safe
|
|
821
|
+
feature, migrated the stack, and updated the template. The legacy project now
|
|
822
|
+
runs with the same quality gate and the same agents/skills as a greenfield
|
|
823
|
+
project.
|
|
824
|
+
|
|
825
|
+
From here, the daily flow is identical to any harness project — see
|
|
826
|
+
`pipeline.en.md` for the standard cycle (PRD → PLAN → ADR → sprint → gate →
|
|
827
|
+
review → merge). The difference on legacy is: you never forget to validate the
|
|
828
|
+
baseline before a new feature, and you never skip ADRs in a migration.
|
|
829
|
+
|
|
830
|
+
To receive the next harness evolutions, schedule a monthly `duk install` on a
|
|
831
|
+
dedicated branch and review the diff.
|