-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtechpack.yaml
More file actions
287 lines (265 loc) · 11.1 KB
/
Copy pathtechpack.yaml
File metadata and controls
287 lines (265 loc) · 11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
schemaVersion: 1
identifier: memory
displayName: "Memory"
description: Persistent memory and knowledge management for Claude Code
author: Bruno Guidolim
minMCSVersion: "2026.4.12"
# ---------------------------------------------------------------------------
# Prompts — asked once per project during `mcs sync`, then remembered
# ---------------------------------------------------------------------------
prompts:
- key: KB_GATE_MODE
type: select
label: "KB gate — how strictly must Claude check the KB before delegating?"
default: "warn"
options:
- value: "warn"
label: "Warn — remind and log when a sub-agent is spawned without KB findings"
- value: "enforce"
label: "Enforce — block the spawn until the KB has been searched this turn"
- value: "observe"
label: "Observe — never gate the main thread, just log (sub-agents are still briefed)"
- value: "off"
label: "Off — no gating and no sub-agent briefing; prompt reminder only"
# ---------------------------------------------------------------------------
# Components
# ---------------------------------------------------------------------------
components:
# ── Dependencies ────────────────────────────────────────────────────────
- id: node
displayName: Node.js
description: JavaScript runtime (for npx-based MCP servers)
brew: node
- id: gh
displayName: GitHub CLI
description: GitHub CLI for PR operations
brew: gh
- id: jq
displayName: jq
description: Lightweight JSON processor
brew: jq
- id: ollama
displayName: Ollama
description: Local LLM runtime (compatible with all Apple Silicon)
type: configuration
shell: "curl -fsSL https://ollama.com/install.sh | sh"
shellInteractive: true
doctorChecks:
- type: commandExists
name: "Ollama installed"
section: AI Models
command: ollama
args: ["--version"]
- id: ollama-service
displayName: Ollama service
description: Ensure Ollama is running
type: configuration
dependencies: [ollama]
shell: "open /Applications/Ollama.app --args hidden"
doctorChecks:
- type: commandExists
name: "Ollama service running"
section: AI Models
command: curl
args: ["-sf", "http://localhost:11434/api/tags"]
fixCommand: "open /Applications/Ollama.app --args hidden"
- id: ollama-nomic-embed
displayName: nomic-embed-text model
description: Embedding model for docs-mcp-server
type: configuration
dependencies: [ollama-service]
shell: "ollama pull nomic-embed-text"
doctorChecks:
- type: commandExists
name: "nomic-embed-text model"
section: AI Models
command: curl
args: ["-sf", "http://localhost:11434/api/show", "-d", "{\"name\":\"nomic-embed-text\"}"]
# Probes the exact endpoint docs-mcp-server calls. /api/show only reads the
# manifest — it does not load the model. This check forces a full load+embed
# round-trip, so a runner crash (e.g. Ollama/ggml incompatibility) surfaces
# as HTTP 500 and fails the check.
- type: commandExists
name: "nomic-embed-text embedding endpoint"
section: AI Models
command: curl
args:
- "-sf"
- "-X"
- "POST"
- "-H"
- "Content-Type: application/json"
- "-d"
- '{"model":"nomic-embed-text","input":"ping"}'
- "http://localhost:11434/v1/embeddings"
# ── MCP Servers ─────────────────────────────────────────────────────────
# Install the binary once (pinned) so Claude launches a prebuilt binary.
# `npx @latest` re-downloaded on every cache eviction, blowing Claude's 30s
# MCP startup limit → "MCP error -32000: Connection closed".
- id: docs-mcp-server-install
displayName: docs-mcp-server binary
description: Installs the docs-mcp-server MCP binary once so Claude launches a prebuilt binary
dependencies: [node]
type: configuration
shell: "npm install -g @arabold/docs-mcp-server@2.4.3"
doctorChecks:
# `list` loads the better-sqlite3 native addon (a broken/ABI-mismatched
# build fails here); `--version` wouldn't — it never loads it.
- type: commandExists
name: "docs-mcp-server binary loads"
section: MCP Servers
command: docs-mcp-server
args: ["list"]
fixCommand: "npm install -g @arabold/docs-mcp-server@2.4.3"
- id: docs-mcp-server
description: Semantic search over memories using local Ollama embeddings
isRequired: true
dependencies: [node, ollama, docs-mcp-server-install]
mcp:
command: docs-mcp-server
args:
- "--read-only"
- "--telemetry=false"
env:
OPENAI_API_KEY: "ollama"
OPENAI_API_BASE: "http://localhost:11434/v1"
DOCS_MCP_EMBEDDING_MODEL: "openai:nomic-embed-text"
# ── Skills ──────────────────────────────────────────────────────────────
- id: skill-continuous-learning
displayName: continuous-learning skill
description: Extracts learnings and decisions from sessions into memory
isRequired: true
skill:
source: skills/continuous-learning
destination: continuous-learning
- id: skill-memory-audit
displayName: memory-audit skill
description: Reviews and audits memories to keep the knowledge base lean and valuable
skill:
source: skills/memory-audit
destination: memory-audit
# ── Hooks ───────────────────────────────────────────────────────────────
- id: hook-continuous-learning
displayName: Continuous learning activator
description: Reminds to evaluate learnings on each prompt
isRequired: true
hookEvent: UserPromptSubmit
hook:
source: hooks/continuous-learning-activator.sh
destination: continuous-learning-activator.sh
- id: hook-sync-memories
displayName: Sync memories hook
description: Checks Ollama health and syncs docs-mcp-server library on session start
dependencies: [ollama, docs-mcp-server, jq]
hookEvent: SessionStart
hookAsync: true
hookTimeout: 120
hookStatusMessage: "Indexing memories..."
hook:
source: hooks/sync-memories.sh
destination: sync-memories.sh
- id: hook-reindex-memories
displayName: Reindex memories hook
description: Reindexes docs-mcp-server library when memories have changed mid-session
dependencies: [ollama, docs-mcp-server, jq]
hookEvent: UserPromptSubmit
hookAsync: true
hookTimeout: 120
hookStatusMessage: "Reindexing memories..."
hook:
source: hooks/sync-memories.sh
destination: sync-memories.sh
# ── KB-first delegation ─────────────────────────────────────────────────
# Four registrations of one dispatcher script, which branches on
# `hook_event_name`. Together they keep KB lookups ahead of delegated discovery,
# so sub-agents don't rediscover what a memory already recorded. Matchers stay
# broad on purpose — which agent types count as "discovery" is decided in one
# place, by `GATED_AGENTS` in the script.
- id: hook-kb-gate-turn
displayName: KB gate — turn boundary
description: Marks each new prompt so the KB check is required again per turn
dependencies: [jq]
hookEvent: UserPromptSubmit
hook:
source: hooks/kb-gate.sh
destination: kb-gate.sh
# Checked because losing this one corrupts the gate rather than disabling it:
# with no turn stamp the counter reads 0 forever, so every search ever made in
# the session counts as fresh and the barrier silently widens from per-turn to
# per-session.
doctorChecks:
- type: hookEventExists
name: "UserPromptSubmit hook registered"
section: Hooks
event: UserPromptSubmit
- id: hook-kb-gate-record
displayName: KB gate — record searches
description: Records each KB search so delegated discovery can be checked against it
dependencies: [jq]
hookEvent: PostToolUse
hookMatcher: "mcp__docs-mcp-server__search_docs"
hook:
source: hooks/kb-gate.sh
destination: kb-gate.sh
# Same reasoning: without this, no search is ever recorded and the gate is
# pure friction until the budget releases it.
doctorChecks:
- type: hookEventExists
name: "PostToolUse hook registered"
section: Hooks
event: PostToolUse
- id: hook-kb-gate-check
displayName: KB gate — check sub-agent spawns
description: Warns or blocks when a discovery sub-agent is spawned without KB findings in its prompt
dependencies: [jq]
hookEvent: PreToolUse
# The spawn tool is `Agent` in current Claude Code and `Task` in older
# builds. Matching only `Task` silently matches nothing.
hookMatcher: "Agent|Task"
hook:
source: hooks/kb-gate.sh
destination: kb-gate.sh
doctorChecks:
- type: hookEventExists
name: "PreToolUse hook registered"
section: Hooks
event: PreToolUse
- id: hook-kb-subagent-brief
displayName: Sub-agent KB brief
description: Tells discovery sub-agents that the KB exists, so they search it instead of sweeping files
dependencies: [jq]
hookEvent: SubagentStart
hook:
source: hooks/kb-gate.sh
destination: kb-gate.sh
doctorChecks:
- type: hookEventExists
name: "SubagentStart hook registered"
section: Hooks
event: SubagentStart
# ── Configuration ───────────────────────────────────────────────────────
- id: settings
displayName: Settings
description: Disables built-in auto-memory in favor of continuous learning system
settingsFile: config/settings.json
- id: gitignore
displayName: Global gitignore
description: Ignores memory files from version control
gitignore:
- ".claude/.memories-last-indexed"
- ".claude/.kb-gate/"
- ".claude/.kb-gate.log"
# ---------------------------------------------------------------------------
# Ignore — maintainer-only files not shipped with the pack
# ---------------------------------------------------------------------------
ignore:
- SYNC-BLOCKS.md
- tests/
# ---------------------------------------------------------------------------
# Templates — CLAUDE.local.md sections
# ---------------------------------------------------------------------------
templates:
- sectionIdentifier: continuous-learning
placeholders:
- __PROJECT_DIR_NAME__
contentFile: templates/continuous-learning.md