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,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
|
-
```
|