@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,394 @@
|
|
|
1
|
+
# Honcho Memory
|
|
2
|
+
|
|
3
|
+
Persistent cross-session memory for Claude Code, anchored on **Honcho v3 self-hosted**. Memories survive across sessions, projects, and machines. When relevant, they are injected automatically into the system prompt of every turn through the `[HONCHO MEMORY]` block, so the user does not have to re-explain preferences.
|
|
4
|
+
|
|
5
|
+
The integration runs as a pair of Claude Code hooks (`UserPromptSubmit` and `Stop`) and degrades gracefully: if the Honcho server is offline, the hook times out, returns exit 0, and Claude proceeds without the memory block. The main flow never blocks.
|
|
6
|
+
|
|
7
|
+
Audience: Java/Angular developers who want the assistant to "remember" style rules, stack decisions, and feature context without reopening documents every session.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Flow overview
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
user prompt
|
|
15
|
+
|
|
|
16
|
+
v
|
|
17
|
+
UserPromptSubmit hook (on-prompt-submit.js)
|
|
18
|
+
|
|
|
19
|
+
|-- trigger detected? ("lembra que", "remember that", "never ...", "always ...")
|
|
20
|
+
| |
|
|
21
|
+
| v
|
|
22
|
+
| SAVE explicit (POST /v3/.../messages, metadata.type = "explicit")
|
|
23
|
+
|
|
|
24
|
+
|-- hybrid search in Promise.all (timeoutMs default = 450ms)
|
|
25
|
+
| |
|
|
26
|
+
| |-- peer-scoped (POST /peers/{peer}/search) -> cross-project explicit + inferred
|
|
27
|
+
| |-- session-scoped (POST /sessions/{id}/messages/list) -> project-context
|
|
28
|
+
|
|
|
29
|
+
|-- merge by relevance, cap topN + 2000 chars
|
|
30
|
+
|
|
|
31
|
+
v
|
|
32
|
+
stdout: [HONCHO MEMORY] ... [/HONCHO MEMORY] -> injected into system prompt
|
|
33
|
+
|
|
|
34
|
+
v
|
|
35
|
+
Claude responds
|
|
36
|
+
|
|
|
37
|
+
v
|
|
38
|
+
Stop hook (on-stop.js)
|
|
39
|
+
|
|
|
40
|
+
v
|
|
41
|
+
extracts feature/sprint from CLAUDE.md + git log -3
|
|
42
|
+
|
|
|
43
|
+
v
|
|
44
|
+
SAVE project-context (POST /v3/.../messages, metadata.type = "project-context")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Hooks are registered in `~/.claude/settings.json` (global), pointing to `C:/development/tools/development-utility-kit/.claude/skills/honcho-memory/hooks/`. Forward-slash paths — accepted by the Claude Code hook runner on Windows.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Memory types
|
|
52
|
+
|
|
53
|
+
The `type` metadata on every message saved to Honcho controls scope, source and visibility.
|
|
54
|
+
|
|
55
|
+
| Type | Scope | Source | When it is created |
|
|
56
|
+
|---|---|---|---|
|
|
57
|
+
| `explicit` | Peer (cross-project) | User | Triggered by verbal patterns ("lembra que", "remember that", "memoriza", "never ...", "always ...") |
|
|
58
|
+
| `inferred` | Peer (cross-project) | Automatic hook (v2) | **Disabled by default in v1** — stub for `PLAN_honcho-inference.md`. When `inferenceEnabled: true`, `on-stop.js` only writes `HONCHO_INFO` to stderr and proceeds without inference |
|
|
59
|
+
| `project-context` | Session (1 per CWD) | `Stop` hook | At the end of each turn, extracts active feature/sprint from `CLAUDE.md` + last 3 commits |
|
|
60
|
+
|
|
61
|
+
The `session ID` is derived deterministically: `sha256(CWD)[:16]`. Each directory is a unique bucket and never rotates — every `project-context` memory for `C:/dev/source/projects/foo/` accumulates in the same session indefinitely.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Automatic triggers
|
|
66
|
+
|
|
67
|
+
Five patterns in the user prompt trigger an **immediate explicit save**, before any search. The save happens with `metadata.type = "explicit"` and `metadata.source = "user"`.
|
|
68
|
+
|
|
69
|
+
| Pattern | Language | Example |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| `lembra que` | PT | "lembra que prefiro records imutáveis em DTOs Java" |
|
|
72
|
+
| `remember that` | EN | "remember that I prefer immutable records" |
|
|
73
|
+
| `memoriza` | PT | "memoriza: usar OnPush em todos os componentes Angular" |
|
|
74
|
+
| `never ` (start of line) | EN | "never use var in TypeScript" |
|
|
75
|
+
| `always ` (start of line) | EN | "always add JSDoc to public methods" |
|
|
76
|
+
|
|
77
|
+
Detection is case-insensitive. Matching is done against `prompt.toLowerCase()`.
|
|
78
|
+
|
|
79
|
+
Trigger-saved memories are **peer-scoped** — they surface in searches from any project that uses the same `peerName` in `config.json`.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## CLI subcommands
|
|
84
|
+
|
|
85
|
+
The CLI lives at `.claude/skills/honcho-memory/scripts/cli.js` and runs via `bun`. The subcommands are also what the user invokes in chat (the skill detects the `/honcho <verb>` pattern and routes to the script).
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
bun run .claude/skills/honcho-memory/scripts/cli.js <subcommand> [args]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### `/honcho save <text>`
|
|
92
|
+
|
|
93
|
+
Saves an explicit memory immediately. Prints the message ID.
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
$ /honcho save "prefer Testcontainers in integration, never H2"
|
|
97
|
+
saved: msg_01HXY7K9AB...
|
|
98
|
+
type: explicit
|
|
99
|
+
peer: elton
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### `/honcho search <query>`
|
|
103
|
+
|
|
104
|
+
Peer-scoped semantic search. Returns top-N (default 5) relevant memories. Soft-deleted memories are excluded.
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
$ /honcho search "java DTO"
|
|
108
|
+
1. [explicit | 2026-05-12] Prefer immutable records for DTOs in Java
|
|
109
|
+
2. [explicit | 2026-04-30] Never expose JPA entities directly through the API
|
|
110
|
+
3. [project-context | 2026-05-20] Sprint 3 — refactor backend DTOs to records
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### `/honcho list`
|
|
114
|
+
|
|
115
|
+
Lists every memory in the current session (filtered by `sha256(CWD)[:16]`). Soft-deleted memories do not appear.
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
$ /honcho list
|
|
119
|
+
session: a1b2c3d4e5f60718
|
|
120
|
+
total: 12 memories
|
|
121
|
+
|
|
122
|
+
[project-context | 2026-05-27] Active feature: honcho-memory Sprint 3
|
|
123
|
+
[project-context | 2026-05-26] PLAN_honcho-inference seed for v2
|
|
124
|
+
[explicit | 2026-05-12] Prefer immutable records for DTOs in Java
|
|
125
|
+
...
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### `/honcho forget <id>`
|
|
129
|
+
|
|
130
|
+
Soft-delete via `PUT`, not `DELETE`. The record stays in the database but is excluded from all future searches and listings.
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
$ /honcho forget msg_01HXY7K9AB
|
|
134
|
+
soft-deleted: msg_01HXY7K9AB
|
|
135
|
+
method: PUT
|
|
136
|
+
endpoint: /v3/workspaces/claude_code/sessions/.../messages/msg_01HXY7K9AB
|
|
137
|
+
body: { "metadata": { "deleted": true } }
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Calling `/honcho forget` without an ID returns exit code 1 with usage info.
|
|
141
|
+
|
|
142
|
+
### `/honcho status`
|
|
143
|
+
|
|
144
|
+
Shows connection state, count of memories in the current session, config version, and flags.
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
$ /honcho status
|
|
148
|
+
connection: OK
|
|
149
|
+
endpoint: https://honcho.pazzne.cloud
|
|
150
|
+
workspace: claude_code
|
|
151
|
+
peer: elton
|
|
152
|
+
session: a1b2c3d4e5f60718
|
|
153
|
+
|
|
154
|
+
config version: 0.1.0
|
|
155
|
+
enabled: true
|
|
156
|
+
inferenceEnabled: false
|
|
157
|
+
topN: 5
|
|
158
|
+
timeoutMs: 450
|
|
159
|
+
|
|
160
|
+
session memories: 12
|
|
161
|
+
peer memories (sample): 47
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
When the server is offline, returns `connection: FAIL` with the reason (timeout, 5xx, DNS).
|
|
165
|
+
|
|
166
|
+
### `/honcho setup`
|
|
167
|
+
|
|
168
|
+
Interactive wizard. Verifies connection, reads legacy `memory/*.md` files, shows preview, asks for confirmation, backs up originals to `memory/backup-YYYYMMDD/`, migrates to Honcho and archives the original `.md` files. Idempotent — running it multiple times is safe.
|
|
169
|
+
|
|
170
|
+
Dry-run (no writes):
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
bun run .claude/skills/honcho-memory/scripts/setup.js --dry-run
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## The `[HONCHO MEMORY]` block
|
|
179
|
+
|
|
180
|
+
When relevant memories exist, the hook writes the block below to stdout. Claude Code consumes that stdout as a system prompt extension for the current turn.
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
[HONCHO MEMORY]
|
|
184
|
+
type: explicit | project: my-project | 2026-05-26T10:00:00Z
|
|
185
|
+
Prefer immutable records for DTOs in Java
|
|
186
|
+
|
|
187
|
+
type: project-context | project: development-utility-kit | 2026-05-26T09:00:00Z
|
|
188
|
+
Active feature: honcho-memory-skill Sprint 3
|
|
189
|
+
[/HONCHO MEMORY]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Rules:
|
|
193
|
+
|
|
194
|
+
- `[HONCHO MEMORY]` and `[/HONCHO MEMORY]` tags are always present (even with an empty list)
|
|
195
|
+
- Limit: `topN` memories (default 5)
|
|
196
|
+
- Limit: 2,000 characters total — overflow is trimmed
|
|
197
|
+
- Ordering: by semantic search relevance (peer) + chronological descending (session)
|
|
198
|
+
- Deduplicated by ID before merging
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Configuration
|
|
203
|
+
|
|
204
|
+
Config file path:
|
|
205
|
+
|
|
206
|
+
- Windows: `C:\Users\<user>\.honcho\config.json`
|
|
207
|
+
- macOS/Linux: `~/.honcho/config.json`
|
|
208
|
+
|
|
209
|
+
Full structure:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"apiKey": "<bearer-token — never logged, never committed>",
|
|
214
|
+
"peerName": "elton",
|
|
215
|
+
"workspace": "claude_code",
|
|
216
|
+
"endpoint": {
|
|
217
|
+
"baseUrl": "https://honcho.pazzne.cloud"
|
|
218
|
+
},
|
|
219
|
+
"enabled": true,
|
|
220
|
+
"logging": false,
|
|
221
|
+
"inferenceEnabled": false,
|
|
222
|
+
"topN": 5,
|
|
223
|
+
"timeoutMs": 450
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Fields:
|
|
228
|
+
|
|
229
|
+
| Field | Type | Default | Description |
|
|
230
|
+
|---|---|---|---|
|
|
231
|
+
| `apiKey` | string | — | Bearer token for authenticating with the Honcho server. Never appears in stdout, stderr or logs. **Never commit.** |
|
|
232
|
+
| `peerName` | string | — | Logical user identity in Honcho. `explicit` and `inferred` memories are visible to this peer cross-project |
|
|
233
|
+
| `workspace` | string | `claude_code` | Server namespace — multi-tenant separation |
|
|
234
|
+
| `endpoint.baseUrl` | string | — | Honcho v3 server base URL |
|
|
235
|
+
| `enabled` | boolean | `true` | If `false`, the hook returns immediately without calling the server |
|
|
236
|
+
| `logging` | boolean | `false` | Stub for future verbose logging |
|
|
237
|
+
| `inferenceEnabled` | boolean | `false` | Stub — when `true`, `on-stop.js` only writes `HONCHO_INFO: inference deferred to v2 PLAN, see PLAN_honcho-inference.md` to stderr |
|
|
238
|
+
| `topN` | number | `5` | Cap on memories included in the block |
|
|
239
|
+
| `timeoutMs` | number | `450` | Global hook operation timeout. Above this, returns exit 0 with no block |
|
|
240
|
+
|
|
241
|
+
### Env var overrides
|
|
242
|
+
|
|
243
|
+
Environment variables take precedence over `config.json` — useful for testing and CI.
|
|
244
|
+
|
|
245
|
+
| Env var | Effect |
|
|
246
|
+
|---|---|
|
|
247
|
+
| `HONCHO_DRY_RUN=1` | Skip real Honcho calls; emit telemetry JSON to stdout for diagnostics |
|
|
248
|
+
| `HONCHO_BASE_URL` | Override `endpoint.baseUrl` |
|
|
249
|
+
| `HONCHO_TIMEOUT_MS` | Override `timeoutMs` in ms |
|
|
250
|
+
| `HONCHO_INFERENCE_ENABLED=true` | Enable the inference stub in `on-stop.js` (writes `HONCHO_INFO`) |
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Initial setup
|
|
255
|
+
|
|
256
|
+
Run the interactive wizard:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
bun run .claude/skills/honcho-memory/scripts/setup.js
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Steps:
|
|
263
|
+
|
|
264
|
+
1. Verifies connectivity to the Honcho server
|
|
265
|
+
2. Reads legacy `memory/*.md` files, if present
|
|
266
|
+
3. Displays a preview/diff of what will be migrated
|
|
267
|
+
4. Asks for explicit confirmation
|
|
268
|
+
5. Backs up originals to `memory/backup-YYYYMMDD/`
|
|
269
|
+
6. Migrates each `.md` file as an `explicit` message in Honcho
|
|
270
|
+
7. Archives the original `.md` files
|
|
271
|
+
|
|
272
|
+
Idempotent — running it more than once does not duplicate. If the server is offline, the wizard aborts with a clear message without touching files.
|
|
273
|
+
|
|
274
|
+
Dry-run for diagnostics:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
bun run .claude/skills/honcho-memory/scripts/setup.js --dry-run
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Self-hosting Honcho v3
|
|
283
|
+
|
|
284
|
+
Honcho v3 is an open-source semantic memory server. The harness does not include the server — it expects it to be reachable at an endpoint (cloud, your own VPS, local container). Consult the official Honcho project documentation for Docker Compose, PostgreSQL/pgvector schema, and auth setup.
|
|
285
|
+
|
|
286
|
+
Endpoints used (verified in v3.0.6):
|
|
287
|
+
|
|
288
|
+
| Operation | Method | Path |
|
|
289
|
+
|---|---|---|
|
|
290
|
+
| Create/get session | POST/GET | `/v3/workspaces/{ws}/sessions` |
|
|
291
|
+
| Save memory (batch) | POST | `/v3/workspaces/{ws}/sessions/{session}/messages` |
|
|
292
|
+
| Soft-delete | PUT | `/v3/workspaces/{ws}/sessions/{session}/messages/{id}` |
|
|
293
|
+
| Peer-scoped search | POST | `/v3/workspaces/{ws}/peers/{peer}/search` |
|
|
294
|
+
| List session messages | POST | `/v3/workspaces/{ws}/sessions/{session}/messages/list` |
|
|
295
|
+
| Delete session (nuke) | DELETE | `/v3/workspaces/{ws}/sessions/{session}` |
|
|
296
|
+
| OpenAPI spec | GET | `/openapi.json` (root, not `/v3/openapi.json`) |
|
|
297
|
+
|
|
298
|
+
Full catalog in `.claude/skills/honcho-memory/docs/api-endpoints-verified.md`.
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Failure behavior (graceful degradation)
|
|
303
|
+
|
|
304
|
+
Scenarios and responses:
|
|
305
|
+
|
|
306
|
+
| Scenario | Hook response |
|
|
307
|
+
|---|---|
|
|
308
|
+
| Honcho offline (DNS, connection refused) | `HONCHO_WARN: <reason>` on stderr, empty stdout, exit 0 |
|
|
309
|
+
| HTTP 5xx | `HONCHO_WARN: 5xx <body>` on stderr, empty stdout, exit 0 |
|
|
310
|
+
| Timeout (default 450ms) | `HONCHO_WARN: timeout after 450ms` on stderr, empty stdout, exit 0 |
|
|
311
|
+
| Missing config | `HONCHO_WARN: config not found` on stderr, empty stdout, exit 0 |
|
|
312
|
+
| `enabled: false` in config | No warning, empty stdout, exit 0 |
|
|
313
|
+
| Invalid API key (401) | `HONCHO_WARN: 401 unauthorized` on stderr, empty stdout, exit 0 |
|
|
314
|
+
|
|
315
|
+
In **every** case Claude Code proceeds normally — no `[HONCHO MEMORY]` block, but no flow disruption.
|
|
316
|
+
|
|
317
|
+
Diagnostic telemetry (in `HONCHO_DRY_RUN=1` mode or when future logging is enabled): stdout JSON with `{ peerSearchExecuted, sessionListExecuted, savedExplicit, timedOut, elapsedMs }`.
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Best practices
|
|
322
|
+
|
|
323
|
+
### Use "remember that" for stack preferences
|
|
324
|
+
|
|
325
|
+
Style preferences, architectural patterns and stack decisions are perfect candidates. They apply cross-project and rarely change.
|
|
326
|
+
|
|
327
|
+
```text
|
|
328
|
+
remember that I prefer immutable records for DTOs in Java
|
|
329
|
+
remember that I always use Testcontainers, never H2 in integration tests
|
|
330
|
+
remember that I want OnPush change detection on every Angular component
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Do NOT use Honcho for secrets
|
|
334
|
+
|
|
335
|
+
Tokens, passwords, API keys, personal data should never go to Honcho. The Honcho `apiKey` itself is already on disk in `config.json` — do not pipe further secrets through the `[HONCHO MEMORY]` block.
|
|
336
|
+
|
|
337
|
+
### Run `/honcho list` periodically
|
|
338
|
+
|
|
339
|
+
Audit what is saved. Old, contradictory or wrong memories can influence responses. Clean up with `/honcho forget`.
|
|
340
|
+
|
|
341
|
+
### Project-specific memories -> `project-context`
|
|
342
|
+
|
|
343
|
+
Cross-project preferences: `explicit`. Current feature/sprint state: `project-context` (the `Stop` hook handles that automatically; no need to save manually).
|
|
344
|
+
|
|
345
|
+
### Do not lean on inference (yet)
|
|
346
|
+
|
|
347
|
+
`inferenceEnabled` is a stub in v1. Keep it `false`. v2 (`PLAN_honcho-inference.md`) will bring LLM-based inference — until then, explicit saves are the reliable path.
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Troubleshooting
|
|
352
|
+
|
|
353
|
+
### `/honcho status` returns FAIL
|
|
354
|
+
|
|
355
|
+
1. Check that `~/.honcho/config.json` exists and contains valid JSON
|
|
356
|
+
2. Check `endpoint.baseUrl` — `curl -I <url>/openapi.json` should return 200
|
|
357
|
+
3. Validate `apiKey` — a wrong key returns `connection: FAIL — 401 unauthorized`
|
|
358
|
+
4. Is the Honcho server running? Container up, port exposed, no firewall
|
|
359
|
+
|
|
360
|
+
### `[HONCHO MEMORY]` block does not appear in the prompt
|
|
361
|
+
|
|
362
|
+
1. Hook registered? Check `~/.claude/settings.json` for a `UserPromptSubmit` entry pointing to `on-prompt-submit.js`
|
|
363
|
+
2. Is `bun` on PATH? The hook uses `bun run`
|
|
364
|
+
3. Restart the Claude Code session — hooks are loaded at startup
|
|
365
|
+
4. `enabled: false` or missing `apiKey` in config forces empty stdout even with the hook active
|
|
366
|
+
5. Run `HONCHO_DRY_RUN=1` manually and inspect the telemetry JSON
|
|
367
|
+
|
|
368
|
+
### Old memories keep reappearing
|
|
369
|
+
|
|
370
|
+
1. Verify they are indeed saved as `inferred` — that type would only be produced by v2, so it should not exist in v1
|
|
371
|
+
2. Use `/honcho list` + `/honcho forget <id>` to clean them out
|
|
372
|
+
3. If `inferenceEnabled` is `true`, switch it to `false` — it does not run inference, but the flag may be consumed by future routines
|
|
373
|
+
|
|
374
|
+
### Slow hook, sluggish prompt
|
|
375
|
+
|
|
376
|
+
1. `timeoutMs` too high. Default is 450ms; values > 1000ms are overkill. Lower it
|
|
377
|
+
2. Network latency to the Honcho server? Consider hosting closer
|
|
378
|
+
3. `topN` too high and the search payload slow? Lower to 3-5
|
|
379
|
+
|
|
380
|
+
### Setup wizard hangs
|
|
381
|
+
|
|
382
|
+
1. Run `--dry-run` first to validate read without write
|
|
383
|
+
2. Check permissions on `memory/` — the wizard must create `memory/backup-YYYYMMDD/`
|
|
384
|
+
3. If it hangs during migration, it is most likely server latency — interrupt, validate with `/honcho status`, re-run
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## Cross-references
|
|
389
|
+
|
|
390
|
+
- [Hooks reference](hooks-reference) — details on the `UserPromptSubmit` and `Stop` events that fire the honcho-memory scripts
|
|
391
|
+
- [Architecture overview](architecture-overview) — where memory plugs into the broader pipeline
|
|
392
|
+
- `.claude/skills/honcho-memory/SKILL.md` — canonical skill source
|
|
393
|
+
- `.claude/skills/honcho-memory/docs/api-endpoints-verified.md` — full Honcho v3 endpoint catalog
|
|
394
|
+
- `PLAN_honcho-inference.md` — future plan for LLM-based inference (v2)
|