memtrace-skills 1.2.10 → 1.2.13

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-first
3
- description: "Route code discovery, debugging, flow tracing, how-code-works questions, and pre-edit rationale checks in indexed source-code repos to Memtrace graph plus Cortex decision tools. Use first before searching/reading code, and before editing, refactoring, deleting, or re-picking an approach that may have a recorded decision, ban, convention, or contract. Do not use Grep, Glob, rg, find, or manual file browsing for code discovery when Memtrace is indexed. Zero results are not permission to grep: diagnose the miss first, then allow one targeted reformulation and bounded source verification or fallback, and reindex only on evidence of stale or incomplete coverage — never in a loop. A `repo_not_in_store` refusal means a different store holds the repository: route to that store, never grep and never re-index here."
3
+ description: "Use indexed graph and decision context for nontrivial code discovery, debugging, caller or consumer analysis, cross-file changes, impact, history, and recorded contracts. Follow useful retrieval with relevant relationships and current-source verification. Ordinary tools remain available; explicit user and project workflows take precedence."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__list_indexed_repositories
6
6
  - mcp__memtrace__index_directory
@@ -37,9 +37,22 @@ metadata:
37
37
  ---
38
38
  # Memtrace First
39
39
 
40
- Use Memtrace first for code discovery in indexed repositories. Use its graph to
41
- understand relationships, processes and impact; verify source when exact behavior
42
- matters. Retrieval is evidence, not a guarantee of complete coverage.
40
+ Use Memtrace when indexed context helps resolve a concrete question about code,
41
+ relationships, processes, change impact or recorded decisions. Retrieval is
42
+ evidence, not a guarantee of complete coverage or correct behavior.
43
+
44
+ ## Respect the chosen workflow
45
+
46
+ This is the managed contextual default. Explicit user and project instructions,
47
+ including custom strict workflows and opt-outs, take precedence. Keep the existing
48
+ Rail setting: `off`, `observe`, `nudge`, `rail` or `strict`. Do not change a user's
49
+ mode or treat this default as authorization for indexing or other external actions.
50
+
51
+ Ordinary source search, reads, edits and tests remain available. Use them directly
52
+ for small, known local changes, exact text searches, or questions the graph cannot
53
+ answer. There is no mandatory first call, query quota or minimum tool count. For
54
+ nontrivial discovery or shared behavior, prefer Memtrace's indexed context and
55
+ follow useful hits with the relationships that answer the open question.
43
56
 
44
57
  ## Establish scope
45
58
 
@@ -162,9 +175,11 @@ searched nothing. The `diagnostic` block names the store that answered, its
162
175
  problem: the id matches more than one repository in *this* store, and the
163
176
  message says to pass the exact id. Do that and stop here. Everything below
164
177
  applies to the `not_in_store` reason.
165
- 2. Do not fall back to file search. The refusal says so itself, in `_note`:
166
- "Wrong store for this repo_id; do not fall back to filesystem search, ask
167
- the session attached to the store named in diagnostic.repo_lives_in."
178
+ 2. Route graph questions to the owning store. A filesystem match cannot turn
179
+ this refusal into successful graph retrieval or prove that graph edges are
180
+ absent. Ordinary source work may continue when the actual checkout, path and
181
+ branch have been verified; keep that evidence separate from the unavailable
182
+ graph answer. Do not freeze the user's workflow while waiting for a store.
168
183
  3. Do not call `index_directory`. The repository is already indexed in the
169
184
  store `repo_lives_in` names. Indexing it here would build a second copy in
170
185
  the wrong store — writes are never routed to another store, so the call
@@ -176,7 +191,9 @@ searched nothing. The `diagnostic` block names the store that answered, its
176
191
  or `--workspace <name>` when a manifest or a Named Workspace owns its
177
192
  scope.
178
193
  5. If `repo_lives_in` is absent, no live Memtrace runtime declares the
179
- repository. Running `memtrace start` in its own workspace is the fix.
194
+ repository. If graph access is needed and setup is authorized, start Memtrace
195
+ in that repository's own workspace. Ordinary verified source work need not
196
+ wait; a retrieval refusal is not authorization to create another index.
180
197
 
181
198
  A refusal is not the only outcome. When the runtime whose store declares the
182
199
  repository is live and publishes a reachable control port, the same read is
@@ -205,8 +222,9 @@ that sets no `repo_in_store` key, is handled in the section above, not here.
205
222
  tool that sets no `repo_in_store` key, missing scope, wrong branch, pending
206
223
  index/embedding job, stale index and a valid empty result. Do not treat an
207
224
  error as a clean miss, and do not treat a refusal or a keyless zero as one
208
- either — re-ask through `find_code` or `find_symbol` before reading
209
- anything into a keyless zero.
225
+ either. Use a membership-checking tool when a membership or absence claim
226
+ matters; a keyless zero alone cannot establish it. Ordinary source
227
+ verification remains available without an extra graph-call prerequisite.
210
228
  2. For an ambiguous query, make at most one targeted reformulation, using an
211
229
  identifier or path hint where available, and a `file_path` filter such as
212
230
  `ui/`, `memtrace-ui/`, `src/` or the framework directory when one applies.
@@ -233,8 +251,9 @@ are also appropriate uses of file tools.
233
251
 
234
252
  ## Check rationale before changing code
235
253
 
236
- BEFORE you edit/refactor/delete existing code or choose another pattern, call
237
- Cortex `recall_decision("<symbol/subsystem/approach>")` when available. If a symbol
254
+ When changing shared behavior, deleting code, or revisiting an approach that may
255
+ have a recorded contract, use Cortex `recall_decision("<symbol/subsystem/approach>")`
256
+ when available and relevant. If a symbol
238
257
  ID is available, consult `why_is_this_here(symbol_id)` and
239
258
  `governing_contracts(symbol_id)`. Verify a
240
259
  matching decision with `verify_intent` before relying on it. Unknown rationale
@@ -246,7 +265,8 @@ when choosing among competing local idioms.
246
265
 
247
266
  Use JSON numbers for limits/depths and booleans for switches. Use symbol names
248
267
  for `get_symbol_context.symbol`, `get_impact.target` and relationship targets;
249
- use IDs only where the specific schema asks for one. When a call is rejected,
268
+ use a returned exact UUID when that tool supports identity-based recovery. Check
269
+ the actual schema rather than guessing an argument name. When a call is rejected,
250
270
  check that tool's schema rather than retrying from memory; do not pre-read schemas.
251
271
  `find_code` has no `kind` filter; use `find_symbol` for it.
252
272
  Search without an explicit repository uses safe scope inference, not an implicit
@@ -261,12 +281,17 @@ receipts; preserve evidence internally and report meaningful findings and limits
261
281
  - The right repository and branch were used.
262
282
  - Graph claims are supported by retrieved edges, with missing/truncated data
263
283
  made explicit, and exact behavioral claims are checked against source.
264
- - A `repo_not_in_store` refusal was routed on `diagnostic.repo_lives_in`, not
265
- answered by grep and not answered by indexing the repository into this store.
284
+ - A `repo_not_in_store` graph question was routed on `diagnostic.repo_lives_in`,
285
+ not answered by indexing another copy into this store. Any ordinary source
286
+ fallback verified the actual checkout and was not reported as graph evidence.
266
287
  - A zero from a tool that sets no `repo_in_store` key was re-checked through a
267
288
  membership-checking tool before it was called an absence.
268
289
  - Failed retrieval on a genuine zero (`repo_in_store: true`) is diagnosed and
269
290
  bounded; it does not trigger query or reindex loops, and fallbacks remain
270
291
  distinguishable from retrieval successes.
271
- - Any source read was bounded to the span Memtrace returned.
272
- - Existing rationale and contracts were checked when the tools were available.
292
+ - Source inspection was scoped to the question; exact claims and edits were
293
+ verified against the current source rather than inferred from graph edges.
294
+ - Relevant recorded rationale and contracts were checked when available.
295
+ - Before finishing, compare the requested requirements with the implementation
296
+ and verification: state any remaining unverified behavior. This checklist is
297
+ a review aid, not machine-verified correctness or an extra approval gate.