memtrace 0.8.61 → 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.
- 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/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/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/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/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,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 |
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memtrace-provenance
|
|
3
|
-
description: "Retrieve the governing decision lineage (why is this here) and contracts that bind a symbol from Cortex decision memory through the normal Memtrace MCP server. Use before deleting, rewriting, refactoring, or 'cleaning up' existing code that looks unused, odd, redundant, legacy, or policy-sensitive, and when the user asks why a symbol exists or what rules constrain it. Symbol-scoped; for free-text decision search use memtrace-decision-recall first. Do not infer intent from the diff or assume unfamiliar code is safe to remove."
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- mcp__memtrace__why_is_this_here
|
|
6
|
-
- mcp__memtrace__governing_contracts
|
|
7
|
-
- mcp__memtrace__verify_intent
|
|
8
|
-
- mcp__memtrace__recall_decision
|
|
9
|
-
metadata:
|
|
10
|
-
author: "Syncable <support@syncable.dev>"
|
|
11
|
-
version: "1.0.0"
|
|
12
|
-
category: development
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
|
|
17
|
-
Provenance answers **"why is this code here, and what binds it?"** before you change
|
|
18
|
-
it. `why_is_this_here` returns the decision/conversation lineage that governs a symbol
|
|
19
|
-
(its Governs/Produced provenance); `governing_contracts` returns the contract nodes
|
|
20
|
-
that constrain it. Together they stop you from deleting code that closes a past issue
|
|
21
|
-
or violating an invariant nothing in the AST advertises.
|
|
22
|
-
|
|
23
|
-
Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
|
|
24
|
-
|
|
25
|
-
## Quick Reference
|
|
26
|
-
|
|
27
|
-
| Tool | Purpose | Returns / FactStatus |
|
|
28
|
-
|------|---------|----------------------|
|
|
29
|
-
| `why_is_this_here` | The governing decision/conversation lineage of a symbol | DeterministicallyDerived \| CannotProve |
|
|
30
|
-
| `governing_contracts` | The contract nodes that constrain a symbol | Contract nodes \| CannotProve |
|
|
31
|
-
| `verify_intent` | Given a returned governing `decision_id` — is that rationale still valid? | Held \| ViolatedAt \| CannotProve |
|
|
32
|
-
|
|
33
|
-
> **`why_is_this_here` and `governing_contracts` each take a `symbol_id` (uint64 node
|
|
34
|
-
> id), not a name. `verify_intent` takes a `decision_id` (uint64), not a `symbol_id`.**
|
|
35
|
-
> If you only have a name or a question, start with `recall_decision` (free text) — see
|
|
36
|
-
> `memtrace-decision-recall`. ids come from a prior recall/arc result or the Cortex
|
|
37
|
-
> view. Do not invent ids.
|
|
38
|
-
|
|
39
|
-
> **Honesty contract:** for a symbol no decision produced, `why_is_this_here` returns an
|
|
40
|
-
> honest **CannotProve**; `governing_contracts` returns CannotProve rather than a false
|
|
41
|
-
> "no contracts" verdict. **CannotProve ≠ safe to delete / unconstrained** — it means
|
|
42
|
-
> *unknown*, so fall back to blast-radius and the user.
|
|
43
|
-
|
|
44
|
-
## Steps
|
|
45
|
-
|
|
46
|
-
### 1. Get the symbol_id
|
|
47
|
-
|
|
48
|
-
If you have a name or a "why" question, run `recall_decision(...)` first and take the
|
|
49
|
-
`symbol_id` from the result if present, or use the id returned by a graph/Cortex view.
|
|
50
|
-
The id-based tools need a numeric id. If you cannot get a symbol id, do not skip
|
|
51
|
-
decision memory entirely: use `recall_decision("<symbol/subsystem/behavior>")` and
|
|
52
|
-
report any matching decision/bans before changing the code.
|
|
53
|
-
|
|
54
|
-
### 2. Ask why it's here
|
|
55
|
-
|
|
56
|
-
`why_is_this_here(symbol_id)` → the governing decision lineage. This is the *rationale*
|
|
57
|
-
the git blame won't give you: the decision that produced this code and, often, the
|
|
58
|
-
problem it was put there to solve.
|
|
59
|
-
|
|
60
|
-
### 3. Ask what constrains it
|
|
61
|
-
|
|
62
|
-
`governing_contracts(symbol_id)` → contracts that must survive any rewrite (invariants,
|
|
63
|
-
interface promises, "must always …" rules). A refactor that breaks one of these is a
|
|
64
|
-
regression even if every test passes.
|
|
65
|
-
|
|
66
|
-
### 4. Check the rationale still holds
|
|
67
|
-
|
|
68
|
-
If `why_is_this_here` returns a governing `decision_id`, run `verify_intent(decision_id)`
|
|
69
|
-
(see `memtrace-intent-verification`) — a `ViolatedAt` verdict (or a decision you can see
|
|
70
|
-
was superseded via `recall_decision`) changes whether the code should still look this way.
|
|
71
|
-
|
|
72
|
-
## Decision Points
|
|
73
|
-
|
|
74
|
-
| Situation | Action |
|
|
75
|
-
|-----------|--------|
|
|
76
|
-
| Code looks unused/dead and you want to delete it | `why_is_this_here` + `governing_contracts` BEFORE deleting; CannotProve is not a green light |
|
|
77
|
-
| Code is written in a strange/non-obvious way | `why_is_this_here` if you have a symbol id; otherwise `recall_decision` for the symbol/subsystem |
|
|
78
|
-
| About to refactor a symbol's internals | `why_is_this_here` + `governing_contracts` — preserve the rationale and every constraint, not just the test surface |
|
|
79
|
-
| User asks "why is this here?" | `why_is_this_here(symbol_id)`; if you only have a name, `recall_decision` first |
|
|
80
|
-
| All provenance returns CannotProve | Treat as unknown; combine with `memtrace-impact` (blast radius) and ask the user before removing |
|
|
81
|
-
|
|
82
|
-
## Output
|
|
83
|
-
|
|
84
|
-
```text
|
|
85
|
-
why_is_this_here(symbol_id: 4821)
|
|
86
|
-
→ DeterministicallyDerived — governing lineage:
|
|
87
|
-
decision_id 913 (Governs): "Keep retry shim until legacy clients migrate"
|
|
88
|
-
governing_contracts(symbol_id: 4821)
|
|
89
|
-
→ contract node: "writes must always be debounced" (must survive any rewrite)
|
|
90
|
-
— no decision produced the symbol → CannotProve (unknown, NOT unconstrained)
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
`verify_intent(decision_id)` on a returned lineage id yields Held | ViolatedAt | CannotProve.
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memtrace-fleet-coordination
|
|
3
|
-
description: "Resolve fleet conflicts between coordinated agents: what conflict class A/B/C means, how a Class C destructive overlap gets decided (by an agent judge or a human), how to be the judge (fleet_submit_verdict), how to read your directive after a decision, and how branch-scoping isolates fleets. Use when the user says 'two agents are changing the same thing', 'resolve this conflict', 'who should proceed', 'a decision is waiting', or asks you to act as a mediator between agents. This skill explains the conflict model and decision loop; for just the verdict/directive/resolution tool calls on a specific escalation, use memtrace-fleet-resolve."
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- mcp__memtrace__fleet_record_episode
|
|
6
|
-
- mcp__memtrace__fleet_submit_verdict
|
|
7
|
-
- mcp__memtrace__fleet_get_escalation
|
|
8
|
-
- mcp__memtrace__fleet_list_escalations
|
|
9
|
-
- mcp__memtrace__fleet_resolve_escalation
|
|
10
|
-
- mcp__memtrace__fleet_get_node_state
|
|
11
|
-
metadata:
|
|
12
|
-
author: "Syncable <support@syncable.dev>"
|
|
13
|
-
version: "1.0.0"
|
|
14
|
-
category: development
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# Fleet Coordination
|
|
18
|
-
|
|
19
|
-
How the fleet turns overlapping edits into a safe decision. Read
|
|
20
|
-
`memtrace-fleet-first` for the publish→edit→record protocol; this skill is the
|
|
21
|
-
*conflict resolution* half.
|
|
22
|
-
|
|
23
|
-
## Conflict classes (what `fleet_record_episode` returns)
|
|
24
|
-
|
|
25
|
-
| Class | Meaning | What to do |
|
|
26
|
-
|---|---|---|
|
|
27
|
-
| **A** | Additive, order-independent | Proceed. |
|
|
28
|
-
| **B** | Non-destructive overlap with another agent's work | Re-read the shared symbols, then proceed. |
|
|
29
|
-
| **C** | A **destructive** change (signature change / move / dead-code removal) overlaps another agent's work | A decision is needed — it does NOT auto-resolve. |
|
|
30
|
-
|
|
31
|
-
Class is computed **only against agents on your branch** (`(repo, branch)`).
|
|
32
|
-
Agents on other branches are never conflict peers.
|
|
33
|
-
|
|
34
|
-
## The Class C decision loop
|
|
35
|
-
|
|
36
|
-
When `fleet_record_episode` returns class C it also returns an `escalation_id` and
|
|
37
|
-
(when mediation is on) a `mediation_request`. The decision is made by an **agent
|
|
38
|
-
judge**, a **human**, or — only when provably safe — the **deterministic referee**.
|
|
39
|
-
|
|
40
|
-
### Being the judge (the user's own agent does the judging — no API keys)
|
|
41
|
-
|
|
42
|
-
The `mediation_request` bundles **every agent's `assignment`** plus the contested
|
|
43
|
-
symbols. Read the *other* agent's task and decide on merit (including against your
|
|
44
|
-
own change). Submit:
|
|
45
|
-
|
|
46
|
-
```jsonc
|
|
47
|
-
fleet_submit_verdict({
|
|
48
|
-
escalation_id: "01J…",
|
|
49
|
-
agent_id: "agent-a",
|
|
50
|
-
verdict: { "kind": "recommend", "winner": "agent-b",
|
|
51
|
-
"rationale": "the signature change is the wider contract; rebase the fix onto it",
|
|
52
|
-
"confidence": 0.8 }
|
|
53
|
-
})
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Verdict kinds: `reconcile {merge_plan}` · `recommend {winner, rationale, confidence}`
|
|
57
|
-
· `defer_to_human {question}`.
|
|
58
|
-
|
|
59
|
-
Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
|
|
60
|
-
|
|
61
|
-
The referee then decides the outcome:
|
|
62
|
-
- **Auto-apply** only when safe: the clear machine case, or ≥2 independent agents
|
|
63
|
-
agree — and **never** for a destructive *removal* (delete/move), which always
|
|
64
|
-
needs a human.
|
|
65
|
-
- **Human confirm** — a recommendation is surfaced for one-click confirmation.
|
|
66
|
-
- **Human required** — both sides destructive, agents disagree, or an agent
|
|
67
|
-
deferred → a person decides.
|
|
68
|
-
|
|
69
|
-
### Reading your directive
|
|
70
|
-
|
|
71
|
-
Poll `fleet_get_escalation({escalation_id, agent_id})` until `your_directive` ≠
|
|
72
|
-
`wait`: `proceed` (you continue), `defer` (stand down / rebase onto the winner),
|
|
73
|
-
`review` (read `resolution`).
|
|
74
|
-
|
|
75
|
-
### Resolving as a human (or on a human's behalf via the dashboard)
|
|
76
|
-
|
|
77
|
-
`fleet_resolve_escalation({escalation_id, resolution, winner})` records a human
|
|
78
|
-
decision and clears the queue. Prefer the agent-judge path; use this for the
|
|
79
|
-
genuine human-decision cases. `fleet_list_escalations({repo_id})` shows the
|
|
80
|
-
"needs human" queue.
|
|
81
|
-
|
|
82
|
-
## Why branch-scoping matters here
|
|
83
|
-
|
|
84
|
-
A "winner / defer" only makes sense on a shared surface. Across branches, the
|
|
85
|
-
loser can't defer (its branch needs the change too), so the fleet never escalates
|
|
86
|
-
cross-branch — that's a merge-time concern git already owns. Keep your fleet to
|
|
87
|
-
one session branch and conflicts stay real and resolvable.
|
|
88
|
-
|
|
89
|
-
## Inspecting state
|
|
90
|
-
|
|
91
|
-
`fleet_get_node_state({repo_id, node})` — recent episodes, active intents, dominant
|
|
92
|
-
intent, and conflict density for one symbol. Use it to understand pressure on a
|
|
93
|
-
hot symbol before you pile on.
|
|
94
|
-
|
|
95
|
-
## Output
|
|
96
|
-
|
|
97
|
-
`fleet_record_episode` on a destructive overlap, then `fleet_get_escalation` once decided:
|
|
98
|
-
|
|
99
|
-
```jsonc
|
|
100
|
-
// fleet_record_episode
|
|
101
|
-
{ "conflict_class": "C", "escalation_id": "01J…",
|
|
102
|
-
"mediation_request": { /* every agent's assignment + the contested symbols */ } }
|
|
103
|
-
|
|
104
|
-
// fleet_get_escalation — poll until your_directive ≠ "wait"
|
|
105
|
-
{ "your_directive": "defer",
|
|
106
|
-
"resolution": "recommend: agent-b — rebase the fix onto the signature change" }
|
|
107
|
-
```
|