memtrace 0.8.62 → 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/hooks/userprompt-claude.sh +14 -5
- package/installer/dist/transformers/claude.js +9 -1
- package/installer/dist/transformers/codex.js +9 -0
- package/installer/dist/transformers/cursor.js +2 -1
- package/installer/dist/transformers/hermes.js +2 -2
- package/installer/dist/transformers/shared.d.ts +2 -0
- package/installer/dist/transformers/shared.js +10 -0
- package/installer/package.json +1 -1
- package/installer/skills/commands/memtrace-fleet-record-episode.md +1 -1
- package/installer/skills/commands/memtrace-fleet-resolve.md +1 -1
- package/installer/skills/commands/memtrace-quality.md +17 -5
- package/installer/skills/workflows/memtrace-change-impact-analysis.md +3 -1
- package/installer/skills/workflows/memtrace-decision-memory.md +12 -12
- package/installer/skills/workflows/memtrace-docs.md +44 -15
- package/installer/skills/workflows/memtrace-fleet-first.md +3 -1
- package/installer/skills/workflows/memtrace-refactoring-guide.md +2 -2
- package/lib/cuda-ep.js +3 -3
- package/package.json +7 -7
- package/skills/commands/memtrace-fleet-record-episode.md +1 -1
- package/skills/commands/memtrace-fleet-resolve.md +1 -1
- package/skills/commands/memtrace-quality.md +17 -5
- package/skills/workflows/memtrace-change-impact-analysis.md +3 -1
- package/skills/workflows/memtrace-decision-memory.md +12 -12
- package/skills/workflows/memtrace-docs.md +44 -15
- package/skills/workflows/memtrace-fleet-first.md +3 -1
- package/skills/workflows/memtrace-refactoring-guide.md +2 -2
- package/installer/skills/commands/memtrace-decision-recall.md +0 -94
- package/installer/skills/commands/memtrace-docs-ask.md +0 -99
- package/installer/skills/commands/memtrace-docs-read.md +0 -91
- package/installer/skills/commands/memtrace-docs-search.md +0 -94
- package/installer/skills/commands/memtrace-intent-verification.md +0 -81
- package/installer/skills/commands/memtrace-provenance.md +0 -93
- package/installer/skills/workflows/memtrace-fleet-coordination.md +0 -107
- package/skills/commands/memtrace-decision-recall.md +0 -94
- package/skills/commands/memtrace-docs-ask.md +0 -99
- package/skills/commands/memtrace-docs-read.md +0 -91
- package/skills/commands/memtrace-docs-search.md +0 -94
- package/skills/commands/memtrace-intent-verification.md +0 -81
- package/skills/commands/memtrace-provenance.md +0 -93
- package/skills/workflows/memtrace-fleet-coordination.md +0 -107
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: memtrace-decision-memory
|
|
3
|
-
description: "
|
|
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 |
|
|
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")` |
|
|
69
|
-
| "Is there a ban / a 'don't do this' on Z?" | `recall_decision("Z")` — bans surface as decisions |
|
|
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 |
|
|
71
|
-
| "Why is this code here?" "Why is it done this odd way?" | `why_is_this_here(symbol_id)` |
|
|
72
|
-
| About to delete/refactor/clean up existing code, especially odd or "dead" code | `why_is_this_here` + `governing_contracts` before touching it |
|
|
73
|
-
| "What rules/contracts constrain this symbol?" | `governing_contracts(symbol_id)` |
|
|
74
|
-
| "Did decision D actually hold, or did we drift?" | `verify_intent(decision_id)` |
|
|
75
|
-
| "What commits/episodes implemented decision D?" | `get_arc(decision_id)` |
|
|
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") →
|
|
139
|
+
Route: recall_decision("library X") → free-text recall
|
|
140
140
|
Hit: { id: 4217, kind: "decision", ... } (a ban exists)
|
|
141
|
-
Next: verify_intent(4217) →
|
|
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: "
|
|
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 |
|
|
48
|
+
| User is asking | Right tool |
|
|
49
49
|
|---|---|---|
|
|
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 |
|
|
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:
|
|
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
|
|
|
@@ -35,7 +35,7 @@ Run these three tools in parallel to build a candidate list:
|
|
|
35
35
|
Call `find_most_complex_functions` with `top_n: 20`
|
|
36
36
|
|
|
37
37
|
**b) Dead code:**
|
|
38
|
-
Call `find_dead_code`
|
|
38
|
+
Call `find_dead_code` (prefer `min_confidence: "high"`) for symbols unreachable from roots
|
|
39
39
|
|
|
40
40
|
**c) Architectural bottlenecks:**
|
|
41
41
|
Call `find_bridge_symbols` to find chokepoints with too much responsibility
|
|
@@ -122,7 +122,7 @@ For each item, include:
|
|
|
122
122
|
|-----------|--------|
|
|
123
123
|
| Complex + volatile + high blast radius | Highest priority — but plan carefully; incremental approach |
|
|
124
124
|
| Complex + stable + low blast radius | Can wait; refactor when you're already touching nearby code |
|
|
125
|
-
| Dead code
|
|
125
|
+
| Dead code (`unreachable from roots`, high confidence) | Run Cortex provenance/recall first; reachability is not proof that no decision/contract keeps it |
|
|
126
126
|
| Bridge symbol with many dependents | Extract interface first, then refactor implementation behind it |
|
|
127
127
|
| Symbol in cross-repo API | Coordinate with consumers; backward-compatible changes only |
|
|
128
128
|
| Cortex returns a held ban/contract | Preserve it or ask before overriding it |
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memtrace-decision-recall
|
|
3
|
-
description: "Recall ranked decisions, bans, and conventions from Cortex decision memory by free-text query through the normal Memtrace MCP server. Use when the user asks what was decided/chosen/rejected, whether there is a convention/ban/policy, and before any non-trivial edit/refactor/delete or re-picking a library, pattern, architecture, or subsystem behavior that may already be settled. Do not reconstruct decisions from git log or guesswork. To verify whether a known decision held, use memtrace-intent-verification; for symbol lineage/contracts, use memtrace-provenance."
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- mcp__memtrace__recall_decision
|
|
6
|
-
- mcp__memtrace__verify_intent
|
|
7
|
-
- mcp__memtrace__get_arc
|
|
8
|
-
metadata:
|
|
9
|
-
author: "Syncable <support@syncable.dev>"
|
|
10
|
-
version: "1.0.0"
|
|
11
|
-
category: development
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Overview
|
|
15
|
-
|
|
16
|
-
`recall_decision` is the **free-text entry point** to decision memory. Given a query,
|
|
17
|
-
it returns the statistically-ranked set of decisions/conversations that bear on it —
|
|
18
|
-
including **bans** ("never use X", "don't do Y"), which are recorded as decisions.
|
|
19
|
-
Use it before re-litigating a settled choice, changing existing behavior, or
|
|
20
|
-
contradicting a convention.
|
|
21
|
-
|
|
22
|
-
This is the one decision-memory tool that takes plain text. The ranked decisions it
|
|
23
|
-
returns carry the `decision_id`s the other tools (`verify_intent`, `get_arc`) need.
|
|
24
|
-
|
|
25
|
-
Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
|
|
26
|
-
|
|
27
|
-
## Quick Reference
|
|
28
|
-
|
|
29
|
-
| Tool | Purpose |
|
|
30
|
-
|------|---------|
|
|
31
|
-
| `recall_decision` | Ranked decisions/bans for a free-text query (the entry point) |
|
|
32
|
-
| `verify_intent` | Given a returned `decision_id` — did it still hold? (see `memtrace-intent-verification`) |
|
|
33
|
-
| `get_arc` | Given a returned `decision_id` — what implemented it? (see `memtrace-intent-verification`) |
|
|
34
|
-
|
|
35
|
-
> **Honesty contract:** an empty or unknown query returns an explicit **CannotProve**,
|
|
36
|
-
> never a fabricated decision. CannotProve means "no recorded decision on this" — it is
|
|
37
|
-
> *unknown*, not *approved*. Don't treat it as a green light.
|
|
38
|
-
|
|
39
|
-
## Steps
|
|
40
|
-
|
|
41
|
-
### 1. Query in the user's own terms
|
|
42
|
-
|
|
43
|
-
`recall_decision(query)` — `query` is free text. Use the noun phrase of the thing in
|
|
44
|
-
question: a library (`"redis vs in-memory cache"`), a pattern (`"error handling
|
|
45
|
-
strategy"`), a subsystem (`"auth tokens"`), a symbol, or the exact edit/refactor/delete
|
|
46
|
-
you are about to do.
|
|
47
|
-
|
|
48
|
-
### 2. Read the ranked result
|
|
49
|
-
|
|
50
|
-
Results come back ranked (lexical + semantic lanes, RRF-fused) with an `id`, a
|
|
51
|
-
`kind`, and a score per hit. **`decision`-kind hits are ranked first**; lower-ranked
|
|
52
|
-
`conversation` hits are supporting context (the verbatim turns around the decision).
|
|
53
|
-
For anything you mean to chain (step 4), use a hit whose `kind` is `decision` — its
|
|
54
|
-
`id` is the `decision_id` the other tools require.
|
|
55
|
-
|
|
56
|
-
### 3. Act on what's there
|
|
57
|
-
|
|
58
|
-
| Result | Action |
|
|
59
|
-
|---|---|
|
|
60
|
-
| A matching decision | Honor it. Quote it back to the user before doing anything that contradicts it. |
|
|
61
|
-
| A **ban** ("never/don't …") | Do **not** reintroduce the banned approach without explicit user sign-off. |
|
|
62
|
-
| Several competing/old hits | Run `verify_intent(decision_id)` on the top one to see if it still holds before relying on it. |
|
|
63
|
-
| **CannotProve** | No recorded decision. Don't invent one — fall back to `memtrace-first` and/or ask the user. |
|
|
64
|
-
|
|
65
|
-
### 4. Chain into the id-based tools when you need more
|
|
66
|
-
|
|
67
|
-
The `id` of a `kind: "decision"` hit feeds `verify_intent` (did it hold?) and
|
|
68
|
-
`get_arc` (what implemented it?). Don't pass a `conversation` hit's id — those tools
|
|
69
|
-
require a Decision node and will honestly return CannotProve. See
|
|
70
|
-
`memtrace-intent-verification`.
|
|
71
|
-
|
|
72
|
-
## Decision Points
|
|
73
|
-
|
|
74
|
-
| Situation | Action |
|
|
75
|
-
|-----------|--------|
|
|
76
|
-
| About to edit/refactor/delete existing code where intent may matter | `recall_decision("<symbol/subsystem/behavior>")` FIRST — you may be crossing a recorded decision, ban, or convention |
|
|
77
|
-
| About to choose or replace a library/pattern/architecture | `recall_decision` FIRST — you may be undoing a deliberate choice or ban |
|
|
78
|
-
| User asks "did we decide X?" / "what's our convention on Y?" | `recall_decision("X" / "Y")` |
|
|
79
|
-
| You suspect a "don't do this" rule exists | `recall_decision` — bans are decisions and will surface |
|
|
80
|
-
| Recall returns a decision you're about to contradict | Surface it to the user verbatim; don't silently override |
|
|
81
|
-
| Recall returns CannotProve | Treat as unknown, not approval; do not fabricate a rationale |
|
|
82
|
-
|
|
83
|
-
## Output
|
|
84
|
-
|
|
85
|
-
`recall_decision` returns ranked hits — `kind: "decision"` first, `conversation` hits below as supporting context — or an explicit **CannotProve**:
|
|
86
|
-
|
|
87
|
-
```json
|
|
88
|
-
[
|
|
89
|
-
{ "id": "…", "kind": "decision", "score": 0.91 },
|
|
90
|
-
{ "id": "…", "kind": "conversation", "score": 0.44 }
|
|
91
|
-
]
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Only a `decision`-kind hit's `id` is a `decision_id` usable with `verify_intent` / `get_arc`. An empty or unknown query returns CannotProve, never fabricated hits.
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memtrace-docs-ask
|
|
3
|
-
description: "Answer questions from official Memtrace documentation only — installation, CLI, MCP tools, fleet, Cortex, enterprise MemDB deploy, skills, configuration. Use when the user asks how Memtrace works or wants a cited explanation. Calls ask_docs on memtrace.io (RAG + guardrails). Do not guess product behavior from training data."
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- mcp__memtrace__ask_docs
|
|
6
|
-
- mcp__memtrace__search_docs
|
|
7
|
-
- mcp__memtrace__read_doc
|
|
8
|
-
metadata:
|
|
9
|
-
author: "Syncable <support@syncable.dev>"
|
|
10
|
-
version: "1.0.0"
|
|
11
|
-
category: development
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Overview
|
|
15
|
-
|
|
16
|
-
`ask_docs` sends the user's question to the hosted docs RAG backend. The server
|
|
17
|
-
retrieves relevant doc chunks, generates an answer **only from that context**, and
|
|
18
|
-
returns citations. Off-topic or ungrounded questions return `refused: true`.
|
|
19
|
-
|
|
20
|
-
This is the **default** tool for "how does Memtrace X work?" questions.
|
|
21
|
-
|
|
22
|
-
Umbrella routing: `memtrace-docs` workflow.
|
|
23
|
-
|
|
24
|
-
## `ask_docs` parameters
|
|
25
|
-
|
|
26
|
-
| Param | Required | Notes |
|
|
27
|
-
|---|---|---|
|
|
28
|
-
| `question` | yes | Pass the user's question verbatim when possible |
|
|
29
|
-
|
|
30
|
-
```json
|
|
31
|
-
{ "question": "How do I deploy MemDB with Docker Compose?" }
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Response shape
|
|
35
|
-
|
|
36
|
-
```json
|
|
37
|
-
{
|
|
38
|
-
"ok": true,
|
|
39
|
-
"answer": "…markdown with /docs/… links…",
|
|
40
|
-
"citations": ["enterprise/memdb-deploy", "cli/connect"],
|
|
41
|
-
"refused": false
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
| Field | Meaning |
|
|
46
|
-
|---|---|
|
|
47
|
-
| `answer` | Grounded response text |
|
|
48
|
-
| `citations` | Doc slugs used as context |
|
|
49
|
-
| `refused` | `true` when no context or injection detected |
|
|
50
|
-
| `refusalReason` | `no_context` or `injection` when refused |
|
|
51
|
-
|
|
52
|
-
## Steps
|
|
53
|
-
|
|
54
|
-
### 1. Ask
|
|
55
|
-
|
|
56
|
-
Use the user's exact wording when it is already a clear question:
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{ "question": "What MCP tools are available?" }
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 2. Handle refusal
|
|
63
|
-
|
|
64
|
-
If `refused: true` with `no_context`:
|
|
65
|
-
|
|
66
|
-
1. Retry `search_docs` with shorter keywords
|
|
67
|
-
2. `read_doc` on the best slug
|
|
68
|
-
3. If still empty — tell the user docs did not cover it; do not invent
|
|
69
|
-
|
|
70
|
-
### 3. Deepen with read_doc
|
|
71
|
-
|
|
72
|
-
When the user needs exhaustive tables (e.g. all MCP tools):
|
|
73
|
-
|
|
74
|
-
```json
|
|
75
|
-
{ "slug": "mcp/tools" }
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
After `ask_docs` gave a summary.
|
|
79
|
-
|
|
80
|
-
## Example questions → ask_docs
|
|
81
|
-
|
|
82
|
-
| User asks | ask_docs question |
|
|
83
|
-
|---|---|
|
|
84
|
-
| How to install Memtrace? | `"How do I install Memtrace?"` |
|
|
85
|
-
| What is Rail? | `"What is Memtrace Rail and how do I enable it?"` |
|
|
86
|
-
| Enterprise MemDB on Azure | `"How do I deploy self-hosted MemDB on Azure?"` |
|
|
87
|
-
| How to connect local memtrace to shared MemDB | `"How do engineers connect with memtrace connect?"` |
|
|
88
|
-
| What skills exist? | `"What agent skills does Memtrace ship?"` |
|
|
89
|
-
|
|
90
|
-
## Privacy note
|
|
91
|
-
|
|
92
|
-
`ask_docs` sends the **question string** to memtrace.io, which runs retrieval and
|
|
93
|
-
calls a hosted LLM (DeepSeek) server-side. No repo source code is transmitted.
|
|
94
|
-
Do not paste secrets into questions.
|
|
95
|
-
|
|
96
|
-
## Offline behavior
|
|
97
|
-
|
|
98
|
-
`ok: false` → network or API error. Quote the `error` and `hint` fields; suggest
|
|
99
|
-
checking connectivity or `MEMTRACE_DOCS_API_URL`.
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memtrace-docs-read
|
|
3
|
-
description: "Read the full plain-text body of an official Memtrace docs page by slug. Use when you know the page path (from search_docs, ask_docs citations, or user link) and need complete content — CLI reference, enterprise deploy guide, MCP tool tables. Calls read_doc or memtrace://docs/* resources on memtrace.io."
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- mcp__memtrace__read_doc
|
|
6
|
-
- mcp__memtrace__search_docs
|
|
7
|
-
metadata:
|
|
8
|
-
author: "Syncable <support@syncable.dev>"
|
|
9
|
-
version: "1.0.0"
|
|
10
|
-
category: development
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
`read_doc` fetches the full rendered text of one docs page. Use after `search_docs`
|
|
16
|
-
or `ask_docs` when excerpts are not enough — long flag tables, deploy runbooks,
|
|
17
|
-
MCP tool inventories.
|
|
18
|
-
|
|
19
|
-
Alternative: MCP resource `memtrace://docs/<slug>` via `read_resource` if your
|
|
20
|
-
client prefers resources over tools.
|
|
21
|
-
|
|
22
|
-
Umbrella routing: `memtrace-docs` workflow.
|
|
23
|
-
|
|
24
|
-
## `read_doc` parameters
|
|
25
|
-
|
|
26
|
-
| Param | Required | Notes |
|
|
27
|
-
|---|---|---|
|
|
28
|
-
| `slug` | yes | Path without `/docs/` prefix |
|
|
29
|
-
|
|
30
|
-
```json
|
|
31
|
-
{ "slug": "enterprise/memdb-deploy" }
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Valid examples:
|
|
35
|
-
|
|
36
|
-
- `getting-started`
|
|
37
|
-
- `cli/start`
|
|
38
|
-
- `mcp/tools`
|
|
39
|
-
- `enterprise/connect`
|
|
40
|
-
- `cli/rail` (hidden from sidebar but indexed)
|
|
41
|
-
|
|
42
|
-
## Response shape
|
|
43
|
-
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"ok": true,
|
|
47
|
-
"slug": "enterprise/memdb-deploy",
|
|
48
|
-
"title": "Deploy MemDB",
|
|
49
|
-
"body": "…full plain text…"
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Steps
|
|
54
|
-
|
|
55
|
-
### 1. Resolve slug
|
|
56
|
-
|
|
57
|
-
From user URL `https://memtrace.io/docs/cli/connect` → slug `cli/connect`.
|
|
58
|
-
|
|
59
|
-
From `ask_docs` citations array → use slug directly.
|
|
60
|
-
|
|
61
|
-
From unknown topic → `search_docs` first, then `read_doc` on top hit.
|
|
62
|
-
|
|
63
|
-
### 2. Read and summarize
|
|
64
|
-
|
|
65
|
-
Read the `body`, answer the user, keep `/docs/<slug>` links when citing.
|
|
66
|
-
|
|
67
|
-
### 3. Multi-page topics
|
|
68
|
-
|
|
69
|
-
Enterprise deploy + engineer connect:
|
|
70
|
-
|
|
71
|
-
```json
|
|
72
|
-
{ "slug": "enterprise/memdb-deploy" }
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
then
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{ "slug": "enterprise/connect" }
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## When NOT to use read_doc
|
|
82
|
-
|
|
83
|
-
| Situation | Use instead |
|
|
84
|
-
|---|---|
|
|
85
|
-
| User asked a natural-language question | `ask_docs` first |
|
|
86
|
-
| You don't know which page | `search_docs` first |
|
|
87
|
-
| User's **source code** in their repo | `memtrace-search` / `memtrace-first` |
|
|
88
|
-
|
|
89
|
-
## Offline behavior
|
|
90
|
-
|
|
91
|
-
`ok: false` → docs API unreachable. Do not substitute local README guesses.
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memtrace-docs-search
|
|
3
|
-
description: "Search official Memtrace documentation with semantic full-text search. Use when the user wants to find doc pages, locate a guide, or discover which docs cover a topic (fleet, MCP, CLI, enterprise MemDB, skills). Calls search_docs on memtrace.io. Do not grep local files or web-search for Memtrace product docs."
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- mcp__memtrace__search_docs
|
|
6
|
-
- mcp__memtrace__read_doc
|
|
7
|
-
metadata:
|
|
8
|
-
author: "Syncable <support@syncable.dev>"
|
|
9
|
-
version: "1.0.0"
|
|
10
|
-
category: development
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
`search_docs` queries the hosted Memtrace docs corpus (same index as memtrace.io/docs
|
|
16
|
-
and the Ask AI widget). Returns ranked **chunks** — not full pages. Follow with
|
|
17
|
-
`read_doc` when you need the complete page.
|
|
18
|
-
|
|
19
|
-
Umbrella routing: `memtrace-docs` workflow.
|
|
20
|
-
|
|
21
|
-
## Quick Reference
|
|
22
|
-
|
|
23
|
-
| Tool | Best for |
|
|
24
|
-
|------|----------|
|
|
25
|
-
| `search_docs` | Find which doc pages/sections match a topic |
|
|
26
|
-
| `read_doc` | Load full page text after search hits |
|
|
27
|
-
|
|
28
|
-
## `search_docs` parameters
|
|
29
|
-
|
|
30
|
-
| Param | Required | Default | Notes |
|
|
31
|
-
|---|---|---|---|
|
|
32
|
-
| `query` | yes | — | Natural-language search string |
|
|
33
|
-
| `limit` | no | 8 | Max chunks to return |
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{ "query": "deploy MemDB helm azure", "limit": 8 }
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Steps
|
|
40
|
-
|
|
41
|
-
### 1. Search
|
|
42
|
-
|
|
43
|
-
```json
|
|
44
|
-
{ "query": "memtrace rail enable hook", "limit": 6 }
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### 2. Inspect results
|
|
48
|
-
|
|
49
|
-
Each hit includes:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"slug": "cli/rail",
|
|
54
|
-
"pageTitle": "memtrace rail & route",
|
|
55
|
-
"h2Title": "Subcommands",
|
|
56
|
-
"h2Id": "enable-sub",
|
|
57
|
-
"excerpt": "…",
|
|
58
|
-
"distance": 0.12
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Lower `distance` ≈ better match.
|
|
63
|
-
|
|
64
|
-
### 3. Read full pages when needed
|
|
65
|
-
|
|
66
|
-
```json
|
|
67
|
-
{ "slug": "cli/rail" }
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Slug uses forward slashes: `enterprise/memdb-deploy`, `mcp/tools`, `getting-started`.
|
|
71
|
-
|
|
72
|
-
## Common slugs
|
|
73
|
-
|
|
74
|
-
| Topic | Slug |
|
|
75
|
-
|---|---|
|
|
76
|
-
| Getting started | `getting-started` |
|
|
77
|
-
| MCP tools list | `mcp/tools` |
|
|
78
|
-
| MCP docs tools | `mcp/docs-tools` |
|
|
79
|
-
| Agent skills | `mcp/skills` |
|
|
80
|
-
| Deploy MemDB (enterprise) | `enterprise/memdb-deploy` |
|
|
81
|
-
| Connect to shared MemDB | `enterprise/connect` |
|
|
82
|
-
| memtrace connect CLI | `cli/connect` |
|
|
83
|
-
| Rail | `cli/rail` |
|
|
84
|
-
|
|
85
|
-
## Offline behavior
|
|
86
|
-
|
|
87
|
-
If `ok: false`, the docs API is unreachable. Report the error; do not fall back to
|
|
88
|
-
hallucinated documentation. Local code-graph tools are unaffected.
|
|
89
|
-
|
|
90
|
-
## Hand off
|
|
91
|
-
|
|
92
|
-
- Natural-language "how do I…" → `memtrace-docs-ask` (`ask_docs`) instead
|
|
93
|
-
- Found the right slug → `memtrace-docs-read` (`read_doc`)
|
|
94
|
-
- User's **source code** → `memtrace-first` / `memtrace-search` (different corpus)
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memtrace-intent-verification
|
|
3
|
-
description: "Verify whether a past decision actually held or was violated, and surface the arc of episodes that implemented that specific decision. Returns a Held | ViolatedAt | CannotProve verdict and the implementing arc from Cortex decision memory. Use when the user asks whether a decision held, was followed, or drifted, or before relying on a decision or reporting drift. Requires a decision_id (from memtrace-decision-recall); do NOT use for free-text decision lookup — use memtrace-decision-recall first. Do not assume a decision was followed; verify it."
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- mcp__memtrace__verify_intent
|
|
6
|
-
- mcp__memtrace__get_arc
|
|
7
|
-
- mcp__memtrace__recall_decision
|
|
8
|
-
- mcp__memtrace__why_is_this_here
|
|
9
|
-
metadata:
|
|
10
|
-
author: "Syncable <support@syncable.dev>"
|
|
11
|
-
version: "1.0.0"
|
|
12
|
-
category: development
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
|
|
17
|
-
A decision being *recorded* doesn't mean it was *followed*. `verify_intent` checks
|
|
18
|
-
whether a decision held across its arc; `get_arc` returns the episodes that implemented
|
|
19
|
-
it. Use these to confirm a rationale is still in force before relying on it, and to
|
|
20
|
-
detect drift where the code quietly diverged from what was decided.
|
|
21
|
-
|
|
22
|
-
Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
|
|
23
|
-
|
|
24
|
-
## Quick Reference
|
|
25
|
-
|
|
26
|
-
| Tool | Purpose | Returns / FactStatus |
|
|
27
|
-
|------|---------|----------------------|
|
|
28
|
-
| `verify_intent` | Did the decision hold across its arc? | `Held` \| `ViolatedAt` \| `CannotProve` |
|
|
29
|
-
| `get_arc` | Arc of episodes implementing the decision | DeterministicallyDerived \| CannotProve |
|
|
30
|
-
|
|
31
|
-
> **Both take a `decision_id` (uint64), not free text.** Get it from `recall_decision`
|
|
32
|
-
> (see `memtrace-decision-recall`) or from `why_is_this_here` (see `memtrace-provenance`).
|
|
33
|
-
> Do not invent ids.
|
|
34
|
-
|
|
35
|
-
> **Honesty contract:** verdicts are deterministically defended. `CannotProve` means the
|
|
36
|
-
> decision is invisible or has no implementing episode — *unknown*, not "fine."
|
|
37
|
-
|
|
38
|
-
## Steps
|
|
39
|
-
|
|
40
|
-
### 1. Get the decision_id
|
|
41
|
-
|
|
42
|
-
Run `recall_decision(...)` and take a `decision_id` from a hit, or get one from
|
|
43
|
-
`why_is_this_here(symbol_id)`. These tools do not accept names.
|
|
44
|
-
|
|
45
|
-
### 2. Verify it held
|
|
46
|
-
|
|
47
|
-
`verify_intent(decision_id)`:
|
|
48
|
-
|
|
49
|
-
| Verdict | Meaning | Action |
|
|
50
|
-
|---|---|---|
|
|
51
|
-
| **Held** | The decision held across its arc | Safe to rely on; honor it |
|
|
52
|
-
| **ViolatedAt** | The code drifted from the decision at a point | Surface the drift — it's either a bug or an unrecorded reversal; ask which |
|
|
53
|
-
| **CannotProve** | Decision invisible or no implementing episode | Treat as unknown; don't claim it held |
|
|
54
|
-
|
|
55
|
-
### 3. Inspect what implemented it
|
|
56
|
-
|
|
57
|
-
`get_arc(decision_id)` → the episodes reachable by Produced/DerivedFrom edges. This is
|
|
58
|
-
the implementation trail: where the decision actually landed (or where it should have).
|
|
59
|
-
|
|
60
|
-
### 4. Cross to the code graph for the "what"
|
|
61
|
-
|
|
62
|
-
The arc names episodes/symbols; to see the current code or its blast radius, hand those
|
|
63
|
-
over to `memtrace-first` / `memtrace-impact`. Decision memory proves *whether it held*;
|
|
64
|
-
the code graph shows *the current state*.
|
|
65
|
-
|
|
66
|
-
## Decision Points
|
|
67
|
-
|
|
68
|
-
| Situation | Action |
|
|
69
|
-
|-----------|--------|
|
|
70
|
-
| Relying on a recalled decision for a choice | `verify_intent` first — only trust a `Held` verdict |
|
|
71
|
-
| Auditing whether the codebase follows its own decisions | `verify_intent` per decision; report every `ViolatedAt` |
|
|
72
|
-
| "Where/when was decision D implemented?" | `get_arc(decision_id)` |
|
|
73
|
-
| `verify_intent` returns `ViolatedAt` | Don't silently 'fix' it — it may be a deliberate (unrecorded) reversal; confirm with the user |
|
|
74
|
-
| `verify_intent` returns `CannotProve` | Treat as unknown; fall back to `recall_decision` + the code graph |
|
|
75
|
-
|
|
76
|
-
## Output
|
|
77
|
-
|
|
78
|
-
| Call | Returns |
|
|
79
|
-
|------|---------|
|
|
80
|
-
| `verify_intent(decision_id)` | Verdict: `Held` \| `ViolatedAt` (the point where code drifted from the decision) \| `CannotProve` (decision invisible or no implementing episode — unknown, not "fine") |
|
|
81
|
-
| `get_arc(decision_id)` | FactStatus `DeterministicallyDerived` \| `CannotProve`, plus the implementing arc: the episodes reachable by Produced/DerivedFrom edges |
|