memtrace-skills 0.8.62 → 0.8.63

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.
Files changed (34) hide show
  1. package/dist/transformers/claude.js +9 -1
  2. package/dist/transformers/codex.js +9 -0
  3. package/dist/transformers/cursor.js +2 -1
  4. package/dist/transformers/hermes.js +2 -2
  5. package/dist/transformers/shared.d.ts +2 -0
  6. package/dist/transformers/shared.js +10 -0
  7. package/package.json +1 -1
  8. package/plugins/memtrace-skills/.claude-plugin/plugin.json +1 -1
  9. package/plugins/memtrace-skills/skills/memtrace-change-impact-analysis/SKILL.md +3 -1
  10. package/plugins/memtrace-skills/skills/memtrace-decision-memory/SKILL.md +12 -12
  11. package/plugins/memtrace-skills/skills/memtrace-docs/SKILL.md +44 -15
  12. package/plugins/memtrace-skills/skills/memtrace-fleet-first/SKILL.md +3 -1
  13. package/plugins/memtrace-skills/skills/memtrace-fleet-record-episode/SKILL.md +1 -1
  14. package/plugins/memtrace-skills/skills/memtrace-fleet-resolve/SKILL.md +1 -1
  15. package/skills/commands/memtrace-fleet-record-episode.md +1 -1
  16. package/skills/commands/memtrace-fleet-resolve.md +1 -1
  17. package/skills/workflows/memtrace-change-impact-analysis.md +3 -1
  18. package/skills/workflows/memtrace-decision-memory.md +12 -12
  19. package/skills/workflows/memtrace-docs.md +44 -15
  20. package/skills/workflows/memtrace-fleet-first.md +3 -1
  21. package/plugins/memtrace-skills/skills/memtrace-decision-recall/SKILL.md +0 -86
  22. package/plugins/memtrace-skills/skills/memtrace-docs-ask/SKILL.md +0 -91
  23. package/plugins/memtrace-skills/skills/memtrace-docs-read/SKILL.md +0 -84
  24. package/plugins/memtrace-skills/skills/memtrace-docs-search/SKILL.md +0 -87
  25. package/plugins/memtrace-skills/skills/memtrace-fleet-coordination/SKILL.md +0 -96
  26. package/plugins/memtrace-skills/skills/memtrace-intent-verification/SKILL.md +0 -72
  27. package/plugins/memtrace-skills/skills/memtrace-provenance/SKILL.md +0 -84
  28. package/skills/commands/memtrace-decision-recall.md +0 -94
  29. package/skills/commands/memtrace-docs-ask.md +0 -99
  30. package/skills/commands/memtrace-docs-read.md +0 -91
  31. package/skills/commands/memtrace-docs-search.md +0 -94
  32. package/skills/commands/memtrace-intent-verification.md +0 -81
  33. package/skills/commands/memtrace-provenance.md +0 -93
  34. package/skills/workflows/memtrace-fleet-coordination.md +0 -107
@@ -3,7 +3,7 @@ import path from 'path';
3
3
  import os from 'os';
4
4
  import { execCommand, commandExists } from '../utils.js';
5
5
  import { safeReadJson, writeJsonAtomic } from '../fs-safe.js';
6
- import { MEMTRACE_MCP_ENV } from './shared.js';
6
+ import { LEGACY_MCP_SERVER_NAME, MEMTRACE_MCP_ENV, removeLegacyMcpServer, } from './shared.js';
7
7
  const PLUGIN_NAME = 'memtrace-skills';
8
8
  const MARKETPLACE_NAME = 'memtrace';
9
9
  const MARKETPLACE_REPO = 'syncable-dev/memtrace-public';
@@ -64,6 +64,12 @@ function readExistingMemtraceEnv(filePath, serverKey = 'mcpServers') {
64
64
  async function tryMcpAddJson(memtraceBinary) {
65
65
  if (!(await commandExists('claude')))
66
66
  return false;
67
+ try {
68
+ await execCommand(`claude mcp remove --scope user ${LEGACY_MCP_SERVER_NAME}`, { timeoutMs: 5_000 });
69
+ }
70
+ catch {
71
+ // The legacy server is normally absent. Removal is a best-effort upgrade migration.
72
+ }
67
73
  const settingsFile = path.join(os.homedir(), '.claude', 'settings.json');
68
74
  const existingEnv = readExistingMemtraceEnv(settingsFile);
69
75
  const mergedEnv = { ...existingEnv, ...MEMTRACE_MCP_ENV };
@@ -200,6 +206,7 @@ export function registerMcpInSettingsAt(settingsPath, memtraceBinary) {
200
206
  }
201
207
  const settings = (value ?? {});
202
208
  settings.mcpServers = settings.mcpServers ?? {};
209
+ removeLegacyMcpServer(settings.mcpServers);
203
210
  // Deep-merge env so user-set keys (e.g. MEMTRACE_LICENSE_KEY) survive
204
211
  // re-registration. memtrace-owned keys (MEMTRACE_MCP_ENV) override on
205
212
  // conflict so installer-managed values stay authoritative.
@@ -611,6 +618,7 @@ function writeClaudeLocalMcp(mcpPath, binary) {
611
618
  }
612
619
  const cfg = (value ?? {});
613
620
  cfg.mcpServers = cfg.mcpServers ?? {};
621
+ removeLegacyMcpServer(cfg.mcpServers);
614
622
  // Deep-merge env: preserve user-set keys, memtrace defaults win on conflict.
615
623
  const existing = cfg.mcpServers['memtrace'];
616
624
  const existingEnv = (isRecord(existing) && isRecord(existing.env))
@@ -4,6 +4,7 @@ import path from 'path';
4
4
  import { commandExists, execCommand } from '../utils.js';
5
5
  import { registerSettingsHook, removeSettingsHook, CODEX_MATCHER, } from './rail-hooks.js';
6
6
  const MCP_SERVER_NAME = 'memtrace';
7
+ const LEGACY_MCP_SERVER_NAME = 'memfleet';
7
8
  function codexRailHooksPath(ctx) {
8
9
  const base = ctx.scope === 'global' ? path.join(os.homedir(), '.codex') : path.join(ctx.cwd, '.codex');
9
10
  return path.join(base, 'hooks.json');
@@ -43,6 +44,12 @@ function isMemtraceMcpTable(tableName) {
43
44
  || tableName.startsWith(`mcp_servers.${MCP_SERVER_NAME}.`)
44
45
  || tableName.startsWith(`mcp_servers."${MCP_SERVER_NAME}".`);
45
46
  }
47
+ function isLegacyMemfleetMcpTable(tableName) {
48
+ return tableName === `mcp_servers.${LEGACY_MCP_SERVER_NAME}`
49
+ || tableName === `mcp_servers."${LEGACY_MCP_SERVER_NAME}"`
50
+ || tableName.startsWith(`mcp_servers.${LEGACY_MCP_SERVER_NAME}.`)
51
+ || tableName.startsWith(`mcp_servers."${LEGACY_MCP_SERVER_NAME}".`);
52
+ }
46
53
  /**
47
54
  * Tables we want stripped on re-registration.
48
55
  *
@@ -51,6 +58,8 @@ function isMemtraceMcpTable(tableName) {
51
58
  * Only the top-level table + non-env sub-tables get stripped.
52
59
  */
53
60
  function isMemtraceMcpTableToStrip(tableName) {
61
+ if (isLegacyMemfleetMcpTable(tableName))
62
+ return true;
54
63
  if (tableName === `mcp_servers.${MCP_SERVER_NAME}.env`)
55
64
  return false;
56
65
  if (tableName === `mcp_servers."${MCP_SERVER_NAME}".env`)
@@ -2,7 +2,7 @@ import fs from 'fs';
2
2
  import os from 'os';
3
3
  import path from 'path';
4
4
  import { safeReadJson, writeJsonAtomic } from '../fs-safe.js';
5
- import { MEMTRACE_MCP_ENV } from './shared.js';
5
+ import { MEMTRACE_MCP_ENV, removeLegacyMcpServer } from './shared.js';
6
6
  import { registerCursorRailHook, removeCursorRailHook } from './rail-hooks.js';
7
7
  function skillsRoot(ctx) {
8
8
  const base = ctx.scope === 'global' ? os.homedir() : ctx.cwd;
@@ -71,6 +71,7 @@ export function registerCursorMcpAt(mcpFile, binary) {
71
71
  }
72
72
  const cfg = (value ?? {});
73
73
  cfg.mcpServers = cfg.mcpServers ?? {};
74
+ removeLegacyMcpServer(cfg.mcpServers);
74
75
  // Deep-merge env: preserve user-set keys (e.g. MEMTRACE_LICENSE_KEY) across
75
76
  // re-registration; memtrace-owned defaults (MEMTRACE_MCP_ENV) win on conflict.
76
77
  const existing = cfg.mcpServers['memtrace'];
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import os from 'os';
3
3
  import path from 'path';
4
- import { MEMTRACE_MCP_ENV, MCP_SERVER_NAME, removeMemtraceSkills, writeSkills, writeTextAtomic, } from './shared.js';
4
+ import { LEGACY_MCP_SERVER_NAME, MEMTRACE_MCP_ENV, MCP_SERVER_NAME, removeMemtraceSkills, writeSkills, writeTextAtomic, } from './shared.js';
5
5
  function skillsRoot(ctx) {
6
6
  void ctx;
7
7
  return path.join(os.homedir(), '.hermes', 'skills');
@@ -43,7 +43,7 @@ function removeMemtraceYamlBlock(raw) {
43
43
  out.push(line);
44
44
  continue;
45
45
  }
46
- if (inMcpServers && new RegExp(`^\\s{2}${MCP_SERVER_NAME}:\\s*$`).test(line)) {
46
+ if (inMcpServers && new RegExp(`^\\s{2}(?:${MCP_SERVER_NAME}|${LEGACY_MCP_SERVER_NAME}):\\s*$`).test(line)) {
47
47
  skippingMemtrace = true;
48
48
  continue;
49
49
  }
@@ -1,6 +1,8 @@
1
1
  import { Skill } from '../skills.js';
2
2
  export declare const MCP_SERVER_NAME = "memtrace";
3
+ export declare const LEGACY_MCP_SERVER_NAME = "memfleet";
3
4
  export declare const MEMTRACE_MCP_ENV: Record<string, string>;
5
+ export declare function removeLegacyMcpServer(servers: Record<string, unknown>): void;
4
6
  export declare function skillName(skill: Skill): string;
5
7
  export declare function skillMarkdown(skill: Skill, extraFrontmatter?: Record<string, string>): string;
6
8
  export declare function writeSkills(skills: Skill[], rootDir: string, extraFrontmatter?: Record<string, string>): number;
@@ -2,12 +2,19 @@ import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { safeReadJson, writeJsonAtomic } from '../fs-safe.js';
4
4
  export const MCP_SERVER_NAME = 'memtrace';
5
+ // MemFleet coordination now lives on the Memtrace MCP server. Replace this
6
+ // retired registration during install so clients do not load the same graph
7
+ // catalogue twice after upgrading from the standalone MemFleet plugin.
8
+ export const LEGACY_MCP_SERVER_NAME = 'memfleet';
5
9
  // The binary reads its configuration (workspace anchors, mode) directly, so no
6
10
  // env vars are required at MCP-registration time. Kept as an empty constant so
7
11
  // any future env-var plumbing (e.g. RUST_LOG, MEMTRACE_DATA_DIR overrides) has
8
12
  // one place to land. The upgrade migration in install.js also prunes stale env
9
13
  // keys from pre-existing MCP entries.
10
14
  export const MEMTRACE_MCP_ENV = {};
15
+ export function removeLegacyMcpServer(servers) {
16
+ delete servers[LEGACY_MCP_SERVER_NAME];
17
+ }
11
18
  export function skillName(skill) {
12
19
  return skill.filename.replace(/\.md$/, '');
13
20
  }
@@ -50,6 +57,7 @@ export function registerMcpServersJsonAt(filePath, binary) {
50
57
  return { registered: false, backupPath };
51
58
  const cfg = (value ?? {});
52
59
  cfg.mcpServers = cfg.mcpServers ?? {};
60
+ removeLegacyMcpServer(cfg.mcpServers);
53
61
  cfg.mcpServers[MCP_SERVER_NAME] = {
54
62
  command: binary,
55
63
  args: ['mcp'],
@@ -76,6 +84,7 @@ export function registerVsCodeMcpAt(filePath, binary) {
76
84
  return { registered: false, backupPath };
77
85
  const cfg = (value ?? {});
78
86
  cfg.servers = cfg.servers ?? {};
87
+ removeLegacyMcpServer(cfg.servers);
79
88
  cfg.servers[MCP_SERVER_NAME] = {
80
89
  type: 'stdio',
81
90
  command: binary,
@@ -104,6 +113,7 @@ export function registerOpenCodeMcpAt(filePath, binary) {
104
113
  const cfg = (value ?? {});
105
114
  cfg.$schema = cfg.$schema ?? 'https://opencode.ai/config.json';
106
115
  cfg.mcp = cfg.mcp ?? {};
116
+ removeLegacyMcpServer(cfg.mcp);
107
117
  cfg.mcp[MCP_SERVER_NAME] = {
108
118
  type: 'local',
109
119
  command: [binary, 'mcp'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memtrace-skills",
3
- "version": "0.8.62",
3
+ "version": "0.8.63",
4
4
  "description": "Memtrace skills for AI coding agents — codebase exploration, temporal evolution, impact analysis, and more.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "memtrace-skills",
3
3
  "description": "Memtrace skills for codebase exploration, code search, relationship analysis, temporal evolution, blast radius impact, code quality, graph algorithms, API topology, GitHub PR code review, multi-agent fleet coordination (branch-scoped intents, conflict classification, and agent-judged Class C resolution), and multi-step workflows for change impact, incident investigation, refactoring, session continuity, co-change analysis, and episode replay, Cortex decision memory (decision recall, provenance, intent verification), session bookends (daily briefing, hotspots, self-audit), and single-symbol pre-edit preflight checks.",
4
- "version": "0.8.62",
4
+ "version": "0.8.63",
5
5
  "author": {
6
6
  "name": "Syncable",
7
7
  "email": "support@syncable.dev"
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: memtrace-change-impact-analysis
3
- description: "Compute what a planned source-code change will break — blast radius, affected processes, cross-repo callers, temporal stability, and Cortex decision-memory constraints — and produce a risk-rated change plan. Use before edits, refactors, API changes, renames, removals, PR reviews, or risk assessments, especially when changing established behavior or deleting code. Do not manually grep references or browse files for impact; use Memtrace graph context, change history, and decision recall/provenance."
3
+ description: "Compute what a planned source-code change will break — blast radius, affected processes, cross-repo callers, temporal stability, and Cortex decision-memory constraints — and produce a risk-rated change plan. Use for multi-symbol or multi-part edits, refactors, API changes, renames, removals, PR reviews, or risk assessments that need a plan; for one symbol's raw blast radius, call get_impact directly. Do not manually grep references or browse files for impact; use Memtrace graph context, change history, and decision recall/provenance."
4
4
  ---
5
5
 
6
6
  ## Overview
7
7
 
8
8
  Pre-change risk assessment workflow. Before modifying code, this workflow maps the full blast radius, identifies affected processes, checks recent change history for instability signals, checks Cortex decision memory for recorded decisions/bans/contracts, and produces a risk-rated change plan.
9
9
 
10
+ Use this workflow when the change spans multiple symbols or needs a risk-rated plan. For a quick raw upstream/downstream radius around one known symbol, call `get_impact` directly.
11
+
10
12
  ## Steps
11
13
 
12
14
  ### 1. Identify what's being changed
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-decision-memory
3
- description: "Check Cortex decision memory through the normal Memtrace MCP tools the umbrella entry point for decision recall, provenance (why is this here), intent verification, and governing contracts. Use before assuming WHY code exists, before any non-trivial edit/refactor/delete of existing code, before re-picking a library/pattern/architecture, or before contradicting an apparent convention. Route: free-text decisions/bans/conventions memtrace-decision-recall; symbol lineage/contracts memtrace-provenance; did the decision hold → memtrace-intent-verification. Do not guess rationale from the diff or git log."
3
+ description: "Use Cortex decision memory through the normal Memtrace MCP tools. Trigger for free-text questions about what was decided, chosen, rejected, banned, or established as a convention; for why a symbol exists or which contracts constrain it; for whether a known decision held, drifted, or was violated; and for the implementation arc behind a decision. Use before non-trivial edits, refactors, deletions, or re-picking a library, pattern, architecture, or subsystem behavior. Routes internally across recall_decision, why_is_this_here, governing_contracts, verify_intent, and get_arc. Do not guess rationale from a diff or git log."
4
4
  ---
5
5
 
6
6
  # Decision Memory First
@@ -53,16 +53,16 @@ with `memtrace-first`; do not fabricate decisions.
53
53
 
54
54
  ## The decision rule
55
55
 
56
- | What you're about to do / be asked | Right tool | Sub-skill |
56
+ | What you're about to do / be asked | Right tool | Procedure |
57
57
  |---|---|---|
58
- | "Did we already decide/choose/reject X?" "What's our convention on Y?" | `recall_decision("X")` | `memtrace-decision-recall` |
59
- | "Is there a ban / a 'don't do this' on Z?" | `recall_decision("Z")` — bans surface as decisions | `memtrace-decision-recall` |
60
- | About to edit behavior, re-pick a library/pattern/architecture, or change a subsystem policy | `recall_decision` FIRST — don't re-litigate a settled call | `memtrace-decision-recall` |
61
- | "Why is this code here?" "Why is it done this odd way?" | `why_is_this_here(symbol_id)` | `memtrace-provenance` |
62
- | About to delete/refactor/clean up existing code, especially odd or "dead" code | `why_is_this_here` + `governing_contracts` before touching it | `memtrace-provenance` |
63
- | "What rules/contracts constrain this symbol?" | `governing_contracts(symbol_id)` | `memtrace-provenance` |
64
- | "Did decision D actually hold, or did we drift?" | `verify_intent(decision_id)` | `memtrace-intent-verification` |
65
- | "What commits/episodes implemented decision D?" | `get_arc(decision_id)` | `memtrace-intent-verification` |
58
+ | "Did we already decide/choose/reject X?" "What's our convention on Y?" | `recall_decision("X")` | Free-text recall |
59
+ | "Is there a ban / a 'don't do this' on Z?" | `recall_decision("Z")` — bans surface as decisions | Free-text recall |
60
+ | About to edit behavior, re-pick a library/pattern/architecture, or change a subsystem policy | `recall_decision` FIRST — don't re-litigate a settled call | Free-text recall |
61
+ | "Why is this code here?" "Why is it done this odd way?" | `why_is_this_here(symbol_id)` | Symbol provenance |
62
+ | About to delete/refactor/clean up existing code, especially odd or "dead" code | `why_is_this_here` + `governing_contracts` before touching it | Symbol provenance |
63
+ | "What rules/contracts constrain this symbol?" | `governing_contracts(symbol_id)` | Symbol contracts |
64
+ | "Did decision D actually hold, or did we drift?" | `verify_intent(decision_id)` | Intent verification |
65
+ | "What commits/episodes implemented decision D?" | `get_arc(decision_id)` | Implementation arc |
66
66
 
67
67
  ## How the tools chain (ids come from recall, not from names)
68
68
 
@@ -126,8 +126,8 @@ The routing outcome: which sibling skill/tool to invoke, and the evidence to quo
126
126
 
127
127
  ```
128
128
  Ask: "Should I switch to library X?"
129
- Route: recall_decision("library X") → memtrace-decision-recall
129
+ Route: recall_decision("library X") → free-text recall
130
130
  Hit: { id: 4217, kind: "decision", ... } (a ban exists)
131
- Next: verify_intent(4217) → memtrace-intent-verification
131
+ Next: verify_intent(4217) → intent verification
132
132
  Quote: Verdict + Evidence (FactStatus, proof path) — or CannotProve = unknown, not permission
133
133
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-docs
3
- description: "Route Memtrace product documentation questions to the hosted docs MCP tools before guessing, searching the web, or reading stale local copies. Use when the user asks how Memtrace works, how to install/configure CLI/MCP/fleet/Cortex/enterprise MemDB, what tools or skills exist, what a command does, or wants the agent to read up on official docs. Calls search_docs, ask_docs, or read_doc on memtrace.io (override with MEMTRACE_DOCS_API_URL). Do not hallucinate Memtrace behavior query docs first. Separate from memtrace-first (your repo's code graph)."
3
+ description: "Use official hosted Memtrace documentation before guessing, web search, or stale local copies. Trigger when the user asks how Memtrace works; how to install, configure, or deploy CLI, MCP, fleet, Cortex, or enterprise MemDB; what tools, skills, or commands exist; wants to find or locate official docs for a topic; or provides/asks to read a full docs page or slug. Routes internally across ask_docs for cited natural-language answers, search_docs for page discovery, and read_doc for complete page text. Separate from memtrace-first, which searches the user's indexed source code."
4
4
  ---
5
5
 
6
6
  # Memtrace Docs First
@@ -37,15 +37,15 @@ Override API host: `MEMTRACE_DOCS_API_URL` (default `https://memtrace.io`).
37
37
 
38
38
  ## The decision rule
39
39
 
40
- | User is asking | Right tool | Sub-skill |
40
+ | User is asking | Right tool |
41
41
  |---|---|---|
42
- | "How do I install / configure / deploy X in Memtrace?" | `ask_docs(question=…)` | `memtrace-docs-ask` |
43
- | "What MCP tools / skills / CLI commands exist?" | `ask_docs` or `search_docs` then `read_doc` on hit slugs | `memtrace-docs-ask` / `memtrace-docs-search` |
44
- | "What does `memtrace rail enable` do?" | `ask_docs` | `memtrace-docs-ask` |
45
- | "Find docs about fleet coordination" | `search_docs(query=…)` | `memtrace-docs-search` |
46
- | "Read the full getting-started page" | `read_doc(slug="getting-started")` | `memtrace-docs-read` |
47
- | "Read enterprise MemDB deploy guide" | `read_doc(slug="enterprise/memdb-deploy")` | `memtrace-docs-read` |
48
- | Need several related sections | `search_docs` → `read_doc` on top slugs | `memtrace-docs-search` + `memtrace-docs-read` |
42
+ | "How do I install / configure / deploy X in Memtrace?" | `ask_docs(question=…)` |
43
+ | "What MCP tools / skills / CLI commands exist?" | `ask_docs` or `search_docs` then `read_doc` on hit slugs |
44
+ | "What does `memtrace rail enable` do?" | `ask_docs` |
45
+ | "Find docs about fleet coordination" | `search_docs(query=…)` |
46
+ | "Read the full getting-started page" | `read_doc(slug="getting-started")` |
47
+ | "Read enterprise MemDB deploy guide" | `read_doc(slug="enterprise/memdb-deploy")` |
48
+ | Need several related sections | `search_docs` → `read_doc` on top slugs |
49
49
 
50
50
  **Default for natural-language questions:** `ask_docs` — it retrieves context and
51
51
  returns a cited answer in one call.
@@ -80,6 +80,41 @@ if you need the full page.
80
80
  2. Follow-up `read_doc(slug="enterprise/memdb-deploy")` for operator steps
81
81
  3. Engineer connect → `read_doc(slug="enterprise/connect")` or `cli/connect`
82
82
 
83
+ ## Tool procedures
84
+
85
+ ### ask_docs — cited answers
86
+
87
+ Pass the user's question verbatim when it is already clear:
88
+
89
+ ```json
90
+ { "question": "How do I deploy MemDB with Docker Compose?" }
91
+ ```
92
+
93
+ The response is `{ ok, answer, citations[], refused, refusalReason? }`. If
94
+ `refused: true` with `no_context`, retry `search_docs` with shorter keywords and
95
+ then `read_doc` on the best slug. `ask_docs` sends only the question string to
96
+ memtrace.io's hosted RAG service; do not include secrets or repo source.
97
+
98
+ ### search_docs — page discovery
99
+
100
+ ```json
101
+ { "query": "deploy MemDB helm azure", "limit": 8 }
102
+ ```
103
+
104
+ Results are ranked chunks with `slug`, `pageTitle`, `h2Title`, `excerpt`, and
105
+ `distance` (lower is a better match). They are not full pages. Follow with
106
+ `read_doc` when you need the complete reference.
107
+
108
+ ### read_doc — complete page text
109
+
110
+ ```json
111
+ { "slug": "enterprise/memdb-deploy" }
112
+ ```
113
+
114
+ Use a slug from a user URL, `ask_docs` citations, or `search_docs` results. The
115
+ response is `{ ok, slug, title, body }`. For multi-page topics, read each slug you
116
+ will rely on rather than extrapolating from one page.
117
+
83
118
  ## Red flags — STOP, use docs tools
84
119
 
85
120
  | Thought | Reality |
@@ -113,9 +148,3 @@ read_doc → { ok: true, slug, title, body }
113
148
 
114
149
  When `refused: true`, tell the user the docs did not cover it and suggest browsing
115
150
  https://memtrace.io/docs or rephrasing.
116
-
117
- ## Sub-skills
118
-
119
- - Discovery / chunk search → `memtrace-docs-search`
120
- - Grounded Q&A → `memtrace-docs-ask`
121
- - Full page read → `memtrace-docs-read`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-fleet-first
3
- description: "Coordinate fleets of coding agents sharing one repo+branch: declare typed intents, classify edit episodes, and resolve conflicts before they collide. Use FIRST when more than one coding agent works the same repo+branch at once (a 'fleet'), before reading code, planning a refactor, or making an edit triggered by 'I'm about to edit X', 'rename Y across the codebase', joining a running fleet/session branch, coordinating with other agents, or prose hand-offs. Do not grep for 'who else is touching this' and do not skip fleet_publish_intent because 'it's a small change'. Fleet coordination is branch-scoped: pass your session branch so your fleet coordinates and stays isolated from agents on other branches. Skip ONLY for genuinely solo sessions or pure docs-only edits where coordination has zero value."
3
+ description: "Coordinate fleets of coding agents sharing one repo+branch: publish typed intents, classify edit episodes, and resolve conflicts before they collide. Use FIRST when multiple agents work the same repo+branch, before reading/planning/editing, when joining a fleet or handing work off, and when the user says two agents are changing the same thing, asks who should proceed, has a decision waiting, or asks you to mediate a Class C conflict. Covers branch-scoped publish-edit-record plus verdict, human-resolution, and directive polling. Do not grep for who else is touching a symbol or skip coordination because a change looks small. Skip only genuinely solo sessions or docs-only edits with no coordination value."
4
4
  ---
5
5
 
6
6
  # Fleet First
@@ -115,6 +115,8 @@ degrades to "a human reviews a suggestion," never a silent bad merge.
115
115
  | Finish an edit | `fleet_record_episode` (get A/B/C) |
116
116
  | Got a Class C as the judge | `fleet_submit_verdict` (reconcile/recommend/defer) |
117
117
  | Blocked on a Class C | poll `fleet_get_escalation` until `your_directive ≠ wait` |
118
+ | A human chose the outcome | `fleet_resolve_escalation` (record the decision) |
119
+ | See the needs-human queue | `fleet_list_escalations` |
118
120
  | See who's in the fleet | `fleet_status` (active_agents, pending decisions) |
119
121
  | Inspect a symbol's coordination state | `fleet_get_node_state` |
120
122
 
@@ -41,7 +41,7 @@ never make your edit a Class C.
41
41
  ## After recording
42
42
 
43
43
  - Class A/B → continue.
44
- - Class C → enter the decision loop (see `memtrace-fleet-coordination`). Don't keep
44
+ - Class C → enter the decision loop (see `memtrace-fleet-first`). Don't keep
45
45
  editing the contested symbols until your directive is `proceed`.
46
46
  - Every recorded episode is logged and persists as the fleet's reviewable audit
47
47
  trail. Review history with `fleet_query_episodes({repo_id, node?, conflict_class?})`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-fleet-resolve
3
- description: "Resolve a Class C fleet decision: submit your verdict as an agent judge (fleet_submit_verdict), poll your own directive (fleet_get_escalation), see the needs-human queue (fleet_list_escalations), or record a human decision (fleet_resolve_escalation). Use when the user says 'a decision is waiting' or 'who should proceed', when you are handed a mediation_request, when acting as a mediator between two agents, or when a human chooses a winner in the dashboard. For the underlying conflict-class model and decision loop, see memtrace-fleet-coordination."
3
+ description: "Resolve a Class C fleet decision: submit your verdict as an agent judge (fleet_submit_verdict), poll your own directive (fleet_get_escalation), see the needs-human queue (fleet_list_escalations), or record a human decision (fleet_resolve_escalation). Use when the user says 'a decision is waiting' or 'who should proceed', when you are handed a mediation_request, when acting as a mediator between two agents, or when a human chooses a winner in the dashboard. For the underlying conflict-class model and decision loop, see memtrace-fleet-first."
4
4
  ---
5
5
 
6
6
  ## Overview
@@ -50,7 +50,7 @@ never make your edit a Class C.
50
50
  ## After recording
51
51
 
52
52
  - Class A/B → continue.
53
- - Class C → enter the decision loop (see `memtrace-fleet-coordination`). Don't keep
53
+ - Class C → enter the decision loop (see `memtrace-fleet-first`). Don't keep
54
54
  editing the contested symbols until your directive is `proceed`.
55
55
  - Every recorded episode is logged and persists as the fleet's reviewable audit
56
56
  trail. Review history with `fleet_query_episodes({repo_id, node?, conflict_class?})`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-fleet-resolve
3
- description: "Resolve a Class C fleet decision: submit your verdict as an agent judge (fleet_submit_verdict), poll your own directive (fleet_get_escalation), see the needs-human queue (fleet_list_escalations), or record a human decision (fleet_resolve_escalation). Use when the user says 'a decision is waiting' or 'who should proceed', when you are handed a mediation_request, when acting as a mediator between two agents, or when a human chooses a winner in the dashboard. For the underlying conflict-class model and decision loop, see memtrace-fleet-coordination."
3
+ description: "Resolve a Class C fleet decision: submit your verdict as an agent judge (fleet_submit_verdict), poll your own directive (fleet_get_escalation), see the needs-human queue (fleet_list_escalations), or record a human decision (fleet_resolve_escalation). Use when the user says 'a decision is waiting' or 'who should proceed', when you are handed a mediation_request, when acting as a mediator between two agents, or when a human chooses a winner in the dashboard. For the underlying conflict-class model and decision loop, see memtrace-fleet-first."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__fleet_submit_verdict
6
6
  - mcp__memtrace__fleet_get_escalation
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-change-impact-analysis
3
- description: "Compute what a planned source-code change will break — blast radius, affected processes, cross-repo callers, temporal stability, and Cortex decision-memory constraints — and produce a risk-rated change plan. Use before edits, refactors, API changes, renames, removals, PR reviews, or risk assessments, especially when changing established behavior or deleting code. Do not manually grep references or browse files for impact; use Memtrace graph context, change history, and decision recall/provenance."
3
+ description: "Compute what a planned source-code change will break — blast radius, affected processes, cross-repo callers, temporal stability, and Cortex decision-memory constraints — and produce a risk-rated change plan. Use for multi-symbol or multi-part edits, refactors, API changes, renames, removals, PR reviews, or risk assessments that need a plan; for one symbol's raw blast radius, call get_impact directly. Do not manually grep references or browse files for impact; use Memtrace graph context, change history, and decision recall/provenance."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__find_symbol
6
6
  - mcp__memtrace__find_code
@@ -24,6 +24,8 @@ user-invocable: true
24
24
 
25
25
  Pre-change risk assessment workflow. Before modifying code, this workflow maps the full blast radius, identifies affected processes, checks recent change history for instability signals, checks Cortex decision memory for recorded decisions/bans/contracts, and produces a risk-rated change plan.
26
26
 
27
+ Use this workflow when the change spans multiple symbols or needs a risk-rated plan. For a quick raw upstream/downstream radius around one known symbol, call `get_impact` directly.
28
+
27
29
  ## Steps
28
30
 
29
31
  ### 1. Identify what's being changed
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-decision-memory
3
- description: "Check Cortex decision memory through the normal Memtrace MCP tools the umbrella entry point for decision recall, provenance (why is this here), intent verification, and governing contracts. Use before assuming WHY code exists, before any non-trivial edit/refactor/delete of existing code, before re-picking a library/pattern/architecture, or before contradicting an apparent convention. Route: free-text decisions/bans/conventions memtrace-decision-recall; symbol lineage/contracts memtrace-provenance; did the decision hold → memtrace-intent-verification. Do not guess rationale from the diff or git log."
3
+ description: "Use Cortex decision memory through the normal Memtrace MCP tools. Trigger for free-text questions about what was decided, chosen, rejected, banned, or established as a convention; for why a symbol exists or which contracts constrain it; for whether a known decision held, drifted, or was violated; and for the implementation arc behind a decision. Use before non-trivial edits, refactors, deletions, or re-picking a library, pattern, architecture, or subsystem behavior. Routes internally across recall_decision, why_is_this_here, governing_contracts, verify_intent, and get_arc. Do not guess rationale from a diff or git log."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__recall_decision
6
6
  - mcp__memtrace__why_is_this_here
@@ -63,16 +63,16 @@ with `memtrace-first`; do not fabricate decisions.
63
63
 
64
64
  ## The decision rule
65
65
 
66
- | What you're about to do / be asked | Right tool | Sub-skill |
66
+ | What you're about to do / be asked | Right tool | Procedure |
67
67
  |---|---|---|
68
- | "Did we already decide/choose/reject X?" "What's our convention on Y?" | `recall_decision("X")` | `memtrace-decision-recall` |
69
- | "Is there a ban / a 'don't do this' on Z?" | `recall_decision("Z")` — bans surface as decisions | `memtrace-decision-recall` |
70
- | About to edit behavior, re-pick a library/pattern/architecture, or change a subsystem policy | `recall_decision` FIRST — don't re-litigate a settled call | `memtrace-decision-recall` |
71
- | "Why is this code here?" "Why is it done this odd way?" | `why_is_this_here(symbol_id)` | `memtrace-provenance` |
72
- | About to delete/refactor/clean up existing code, especially odd or "dead" code | `why_is_this_here` + `governing_contracts` before touching it | `memtrace-provenance` |
73
- | "What rules/contracts constrain this symbol?" | `governing_contracts(symbol_id)` | `memtrace-provenance` |
74
- | "Did decision D actually hold, or did we drift?" | `verify_intent(decision_id)` | `memtrace-intent-verification` |
75
- | "What commits/episodes implemented decision D?" | `get_arc(decision_id)` | `memtrace-intent-verification` |
68
+ | "Did we already decide/choose/reject X?" "What's our convention on Y?" | `recall_decision("X")` | Free-text recall |
69
+ | "Is there a ban / a 'don't do this' on Z?" | `recall_decision("Z")` — bans surface as decisions | Free-text recall |
70
+ | About to edit behavior, re-pick a library/pattern/architecture, or change a subsystem policy | `recall_decision` FIRST — don't re-litigate a settled call | Free-text recall |
71
+ | "Why is this code here?" "Why is it done this odd way?" | `why_is_this_here(symbol_id)` | Symbol provenance |
72
+ | About to delete/refactor/clean up existing code, especially odd or "dead" code | `why_is_this_here` + `governing_contracts` before touching it | Symbol provenance |
73
+ | "What rules/contracts constrain this symbol?" | `governing_contracts(symbol_id)` | Symbol contracts |
74
+ | "Did decision D actually hold, or did we drift?" | `verify_intent(decision_id)` | Intent verification |
75
+ | "What commits/episodes implemented decision D?" | `get_arc(decision_id)` | Implementation arc |
76
76
 
77
77
  ## How the tools chain (ids come from recall, not from names)
78
78
 
@@ -136,8 +136,8 @@ The routing outcome: which sibling skill/tool to invoke, and the evidence to quo
136
136
 
137
137
  ```
138
138
  Ask: "Should I switch to library X?"
139
- Route: recall_decision("library X") → memtrace-decision-recall
139
+ Route: recall_decision("library X") → free-text recall
140
140
  Hit: { id: 4217, kind: "decision", ... } (a ban exists)
141
- Next: verify_intent(4217) → memtrace-intent-verification
141
+ Next: verify_intent(4217) → intent verification
142
142
  Quote: Verdict + Evidence (FactStatus, proof path) — or CannotProve = unknown, not permission
143
143
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-docs
3
- description: "Route Memtrace product documentation questions to the hosted docs MCP tools before guessing, searching the web, or reading stale local copies. Use when the user asks how Memtrace works, how to install/configure CLI/MCP/fleet/Cortex/enterprise MemDB, what tools or skills exist, what a command does, or wants the agent to read up on official docs. Calls search_docs, ask_docs, or read_doc on memtrace.io (override with MEMTRACE_DOCS_API_URL). Do not hallucinate Memtrace behavior query docs first. Separate from memtrace-first (your repo's code graph)."
3
+ description: "Use official hosted Memtrace documentation before guessing, web search, or stale local copies. Trigger when the user asks how Memtrace works; how to install, configure, or deploy CLI, MCP, fleet, Cortex, or enterprise MemDB; what tools, skills, or commands exist; wants to find or locate official docs for a topic; or provides/asks to read a full docs page or slug. Routes internally across ask_docs for cited natural-language answers, search_docs for page discovery, and read_doc for complete page text. Separate from memtrace-first, which searches the user's indexed source code."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__search_docs
6
6
  - mcp__memtrace__ask_docs
@@ -45,15 +45,15 @@ Override API host: `MEMTRACE_DOCS_API_URL` (default `https://memtrace.io`).
45
45
 
46
46
  ## The decision rule
47
47
 
48
- | User is asking | Right tool | Sub-skill |
48
+ | User is asking | Right tool |
49
49
  |---|---|---|
50
- | "How do I install / configure / deploy X in Memtrace?" | `ask_docs(question=…)` | `memtrace-docs-ask` |
51
- | "What MCP tools / skills / CLI commands exist?" | `ask_docs` or `search_docs` then `read_doc` on hit slugs | `memtrace-docs-ask` / `memtrace-docs-search` |
52
- | "What does `memtrace rail enable` do?" | `ask_docs` | `memtrace-docs-ask` |
53
- | "Find docs about fleet coordination" | `search_docs(query=…)` | `memtrace-docs-search` |
54
- | "Read the full getting-started page" | `read_doc(slug="getting-started")` | `memtrace-docs-read` |
55
- | "Read enterprise MemDB deploy guide" | `read_doc(slug="enterprise/memdb-deploy")` | `memtrace-docs-read` |
56
- | Need several related sections | `search_docs` → `read_doc` on top slugs | `memtrace-docs-search` + `memtrace-docs-read` |
50
+ | "How do I install / configure / deploy X in Memtrace?" | `ask_docs(question=…)` |
51
+ | "What MCP tools / skills / CLI commands exist?" | `ask_docs` or `search_docs` then `read_doc` on hit slugs |
52
+ | "What does `memtrace rail enable` do?" | `ask_docs` |
53
+ | "Find docs about fleet coordination" | `search_docs(query=…)` |
54
+ | "Read the full getting-started page" | `read_doc(slug="getting-started")` |
55
+ | "Read enterprise MemDB deploy guide" | `read_doc(slug="enterprise/memdb-deploy")` |
56
+ | Need several related sections | `search_docs` → `read_doc` on top slugs |
57
57
 
58
58
  **Default for natural-language questions:** `ask_docs` — it retrieves context and
59
59
  returns a cited answer in one call.
@@ -88,6 +88,41 @@ if you need the full page.
88
88
  2. Follow-up `read_doc(slug="enterprise/memdb-deploy")` for operator steps
89
89
  3. Engineer connect → `read_doc(slug="enterprise/connect")` or `cli/connect`
90
90
 
91
+ ## Tool procedures
92
+
93
+ ### ask_docs — cited answers
94
+
95
+ Pass the user's question verbatim when it is already clear:
96
+
97
+ ```json
98
+ { "question": "How do I deploy MemDB with Docker Compose?" }
99
+ ```
100
+
101
+ The response is `{ ok, answer, citations[], refused, refusalReason? }`. If
102
+ `refused: true` with `no_context`, retry `search_docs` with shorter keywords and
103
+ then `read_doc` on the best slug. `ask_docs` sends only the question string to
104
+ memtrace.io's hosted RAG service; do not include secrets or repo source.
105
+
106
+ ### search_docs — page discovery
107
+
108
+ ```json
109
+ { "query": "deploy MemDB helm azure", "limit": 8 }
110
+ ```
111
+
112
+ Results are ranked chunks with `slug`, `pageTitle`, `h2Title`, `excerpt`, and
113
+ `distance` (lower is a better match). They are not full pages. Follow with
114
+ `read_doc` when you need the complete reference.
115
+
116
+ ### read_doc — complete page text
117
+
118
+ ```json
119
+ { "slug": "enterprise/memdb-deploy" }
120
+ ```
121
+
122
+ Use a slug from a user URL, `ask_docs` citations, or `search_docs` results. The
123
+ response is `{ ok, slug, title, body }`. For multi-page topics, read each slug you
124
+ will rely on rather than extrapolating from one page.
125
+
91
126
  ## Red flags — STOP, use docs tools
92
127
 
93
128
  | Thought | Reality |
@@ -121,9 +156,3 @@ read_doc → { ok: true, slug, title, body }
121
156
 
122
157
  When `refused: true`, tell the user the docs did not cover it and suggest browsing
123
158
  https://memtrace.io/docs or rephrasing.
124
-
125
- ## Sub-skills
126
-
127
- - Discovery / chunk search → `memtrace-docs-search`
128
- - Grounded Q&A → `memtrace-docs-ask`
129
- - Full page read → `memtrace-docs-read`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-fleet-first
3
- description: "Coordinate fleets of coding agents sharing one repo+branch: declare typed intents, classify edit episodes, and resolve conflicts before they collide. Use FIRST when more than one coding agent works the same repo+branch at once (a 'fleet'), before reading code, planning a refactor, or making an edit triggered by 'I'm about to edit X', 'rename Y across the codebase', joining a running fleet/session branch, coordinating with other agents, or prose hand-offs. Do not grep for 'who else is touching this' and do not skip fleet_publish_intent because 'it's a small change'. Fleet coordination is branch-scoped: pass your session branch so your fleet coordinates and stays isolated from agents on other branches. Skip ONLY for genuinely solo sessions or pure docs-only edits where coordination has zero value."
3
+ description: "Coordinate fleets of coding agents sharing one repo+branch: publish typed intents, classify edit episodes, and resolve conflicts before they collide. Use FIRST when multiple agents work the same repo+branch, before reading/planning/editing, when joining a fleet or handing work off, and when the user says two agents are changing the same thing, asks who should proceed, has a decision waiting, or asks you to mediate a Class C conflict. Covers branch-scoped publish-edit-record plus verdict, human-resolution, and directive polling. Do not grep for who else is touching a symbol or skip coordination because a change looks small. Skip only genuinely solo sessions or docs-only edits with no coordination value."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__fleet_status
6
6
  - mcp__memtrace__fleet_branch_context
@@ -128,6 +128,8 @@ degrades to "a human reviews a suggestion," never a silent bad merge.
128
128
  | Finish an edit | `fleet_record_episode` (get A/B/C) |
129
129
  | Got a Class C as the judge | `fleet_submit_verdict` (reconcile/recommend/defer) |
130
130
  | Blocked on a Class C | poll `fleet_get_escalation` until `your_directive ≠ wait` |
131
+ | A human chose the outcome | `fleet_resolve_escalation` (record the decision) |
132
+ | See the needs-human queue | `fleet_list_escalations` |
131
133
  | See who's in the fleet | `fleet_status` (active_agents, pending decisions) |
132
134
  | Inspect a symbol's coordination state | `fleet_get_node_state` |
133
135