@dug-21/unimatrix 0.5.9 → 0.6.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.
@@ -141,11 +141,74 @@ If this fails, stop with: **"Build check failed after version update. Review cha
141
141
 
142
142
  ---
143
143
 
144
+ ## Step 7a: Sync protocols/ Distribution Copies
145
+
146
+ Copy the four protocol files from the internal `.claude/protocols/uni/` directory
147
+ to two locations: the repo-root `protocols/` (for repo users) and
148
+ `packages/unimatrix/protocols/` (for npm — npm resolves `files` relative to the
149
+ package directory, not the repo root):
150
+
151
+ ```bash
152
+ # Repo-root copy (for users who clone the repo)
153
+ cp .claude/protocols/uni/uni-design-protocol.md protocols/uni-design-protocol.md
154
+ cp .claude/protocols/uni/uni-delivery-protocol.md protocols/uni-delivery-protocol.md
155
+ cp .claude/protocols/uni/uni-bugfix-protocol.md protocols/uni-bugfix-protocol.md
156
+ cp .claude/protocols/uni/uni-agent-routing.md protocols/uni-agent-routing.md
157
+ cp protocols/README.md protocols/README.md # already exists; update if changed
158
+
159
+ # npm package copy (what npm pack actually includes)
160
+ cp .claude/protocols/uni/uni-design-protocol.md packages/unimatrix/protocols/uni-design-protocol.md
161
+ cp .claude/protocols/uni/uni-delivery-protocol.md packages/unimatrix/protocols/uni-delivery-protocol.md
162
+ cp .claude/protocols/uni/uni-bugfix-protocol.md packages/unimatrix/protocols/uni-bugfix-protocol.md
163
+ cp .claude/protocols/uni/uni-agent-routing.md packages/unimatrix/protocols/uni-agent-routing.md
164
+ cp protocols/README.md packages/unimatrix/protocols/README.md
165
+ ```
166
+
167
+ Verify each copy is identical to its source (run for both destinations):
168
+
169
+ ```bash
170
+ diff .claude/protocols/uni/uni-design-protocol.md protocols/uni-design-protocol.md
171
+ diff .claude/protocols/uni/uni-delivery-protocol.md protocols/uni-delivery-protocol.md
172
+ diff .claude/protocols/uni/uni-bugfix-protocol.md protocols/uni-bugfix-protocol.md
173
+ diff .claude/protocols/uni/uni-agent-routing.md protocols/uni-agent-routing.md
174
+ diff protocols/uni-design-protocol.md packages/unimatrix/protocols/uni-design-protocol.md
175
+ diff protocols/uni-delivery-protocol.md packages/unimatrix/protocols/uni-delivery-protocol.md
176
+ diff protocols/uni-bugfix-protocol.md packages/unimatrix/protocols/uni-bugfix-protocol.md
177
+ diff protocols/uni-agent-routing.md packages/unimatrix/protocols/uni-agent-routing.md
178
+ diff protocols/README.md packages/unimatrix/protocols/README.md
179
+ ```
180
+
181
+ All diffs must produce zero output. The `.claude/protocols/uni/` directory is the
182
+ source of truth — apply any needed corrections there first, then re-copy both.
183
+
184
+ ---
185
+
186
+ ## Step 7b: Sync uni-retro Distribution Copies
187
+
188
+ Copy the uni-retro skill to two locations: the repo-root `skills/uni-retro/` (for
189
+ repo users) and `packages/unimatrix/skills/uni-retro/` (for npm):
190
+
191
+ ```bash
192
+ cp .claude/skills/uni-retro/SKILL.md skills/uni-retro/SKILL.md
193
+ cp .claude/skills/uni-retro/SKILL.md packages/unimatrix/skills/uni-retro/SKILL.md
194
+ ```
195
+
196
+ Verify both copies are identical to their source:
197
+
198
+ ```bash
199
+ diff .claude/skills/uni-retro/SKILL.md skills/uni-retro/SKILL.md
200
+ diff .claude/skills/uni-retro/SKILL.md packages/unimatrix/skills/uni-retro/SKILL.md
201
+ ```
202
+
203
+ Both diffs must produce zero output.
204
+
205
+ ---
206
+
144
207
  ## Step 7: Create Release Commit
145
208
 
146
209
  Stage only the release-related files:
147
210
  ```bash
148
- git add Cargo.toml packages/unimatrix/package.json packages/unimatrix-linux-x64/package.json packages/unimatrix-linux-arm64/package.json CHANGELOG.md
211
+ git add Cargo.toml packages/unimatrix/package.json packages/unimatrix-linux-x64/package.json packages/unimatrix-linux-arm64/package.json CHANGELOG.md protocols/ skills/uni-retro/ packages/unimatrix/protocols/ packages/unimatrix/skills/uni-retro/
149
212
  ```
150
213
 
151
214
  Commit with the release message:
@@ -187,6 +250,10 @@ Files modified:
187
250
  - packages/unimatrix-linux-x64/package.json
188
251
  - packages/unimatrix-linux-arm64/package.json
189
252
  - CHANGELOG.md
253
+ - protocols/ (synced from .claude/protocols/uni/ — repo-root copy)
254
+ - packages/unimatrix/protocols/ (npm-distributed copy)
255
+ - skills/uni-retro/SKILL.md (synced from .claude/skills/uni-retro/ — repo-root copy)
256
+ - packages/unimatrix/skills/uni-retro/SKILL.md (npm-distributed copy)
190
257
 
191
258
  Git:
192
259
  - Commit: release: v{new_version}
@@ -7,7 +7,7 @@ description: "Post-merge retrospective — extracts patterns, procedures, and le
7
7
 
8
8
  ## What This Skill Does
9
9
 
10
- Analyzes a shipped feature and extracts reusable knowledge — patterns, procedures, and lessons — into Unimatrix. This is how the project learns.
10
+ Analyzes a shipped feature and shares valuable feedback with the human, reports Unimatrix usage, and extracts reusable knowledge — patterns, procedures, and lessons — into Unimatrix. This is how the project learns.
11
11
 
12
12
  ---
13
13
 
@@ -20,13 +20,27 @@ From the invoker:
20
20
 
21
21
  ---
22
22
 
23
+ ## When to Go Lightweight
24
+
25
+ Not every feature needs a full retro:
26
+
27
+ | Situation | Action |
28
+ |---|---|
29
+ | Zero gate failures, no rework, zero hotspots | Skip lesson extraction. Focus on patterns/procedures only. |
30
+ | Minor enhancement (1-2 components) | Check for pattern drift only, skip procedure review. |
31
+ | New infrastructure introduced | Full retro — high likelihood of new patterns and procedures. |
32
+ | Multiple SCOPE FAILs or heavy rework | Full retro — prioritize lesson extraction. |
33
+ | Many Warning hotspots or baseline outliers | Full retro — prioritize hotspot-driven lessons and procedure updates. |
34
+
35
+ ---
36
+
23
37
  ## Phase 1: Data Gathering & Retrospective Analysis
24
38
 
25
39
  Gather all evidence about the shipped feature:
26
40
 
27
41
  1. **Run retrospective analysis** (if observation data exists):
28
42
  ```
29
- mcp__unimatrix__context_retrospective(feature_cycle: "{feature-id}")
43
+ mcp__unimatrix__context_cycle_review({"feature_cycle": "{feature-id}", "format": "markdown"})
30
44
  ```
31
45
  This returns structured data: metrics, hotspots, baseline comparisons, narratives, and recommendations.
32
46
 
@@ -36,7 +50,7 @@ Gather all evidence about the shipped feature:
36
50
  - `Warning` hotspots → potential lessons or procedure gaps
37
51
  - `Info` hotspots → note trends, may not need action
38
52
  - Key hotspot types to watch:
39
- - `permission_retries` → settings.json allowlist may need updating
53
+ - `orphaned_calls` → tool invocations with no terminal event — check context overflow or parallel call management
40
54
  - `sleep_workarounds` → agents using sleep instead of run_in_background
41
55
  - `cold_restart` → context loss after gaps, agents re-reading files
42
56
  - `coordinator_respawns` → SM lifetime/handoff issues
@@ -74,38 +88,7 @@ Gather all evidence about the shipped feature:
74
88
  ```
75
89
  Look for rework commits (`fix(gate):`) — these indicate where the process struggled.
76
90
 
77
- ---
78
-
79
- ## Phase 1b: Stewardship Quality Review
80
-
81
- Before extracting new patterns, review the quality of entries agents stored during this feature cycle.
82
-
83
- 1. **Query entries stored during the feature**:
84
- ```
85
- mcp__unimatrix__context_search(
86
- query: "{feature-id}",
87
- k: 20
88
- )
89
- ```
90
- Also search by feature_cycle tag if available. Use content/title matching as fallback — not all agents tag consistently.
91
-
92
- 2. **Assess each entry against its category template**:
93
- - **Patterns**: Has what/why/scope structure? Is "why" substantive (not "it works")?
94
- - **Lessons**: Has what-happened/root-cause/takeaway? Is takeaway actionable?
95
- - **Procedures**: Has numbered steps? Are steps specific (not generic)?
96
-
97
- 3. **Curate**:
98
- - **Low-quality entries** (missing structure, no substantive "why", API docs disguised as patterns): deprecate via `context_deprecate` with reason.
99
- - **High-quality entries** confirmed by successful delivery: note for the architect to validate during pattern extraction.
100
- - **Miscategorized entries** (lesson stored as pattern, or vice versa): note for correction.
101
-
102
- 4. **Report** the stewardship review results before proceeding to Phase 2:
103
- ```
104
- Stewardship Quality Review:
105
- - Entries found: {N}
106
- - Quality: {N} good, {N} deprecated (low quality), {N} flagged for recategorization
107
- - Details: {list each entry with assessment}
108
- ```
91
+ 6. **Share the interim results**: Provide cleanesed view of the context_cycle_review output with key observations before moving forward. At a MINIMUM show the ##Phase Narrative and ##Phase Timeline. Also Highlight a specific section of content retrieved during the cycle... (This reinforces the Unimatrix Value Prop)
109
92
 
110
93
  ---
111
94
 
@@ -144,7 +127,7 @@ Agent(uni-architect, "
144
127
  MODE: retrospective (not design)
145
128
  Feature: {feature-id}
146
129
 
147
- You are reviewing a SHIPPED feature to extract reusable knowledge.
130
+ You are reviewing a SHIPPED feature to extract reusable knowledge. More entries not better. You are looking for aspects future agents will benefit from. Be selective.
148
131
  You are NOT designing anything new.
149
132
 
150
133
  Read these artifacts:
@@ -159,12 +142,23 @@ Agent(uni-architect, "
159
142
 
160
143
  YOUR TASKS:
161
144
 
145
+ 0. STEWARDSHIP REVIEW — Before extracting new knowledge, assess entries already stored during this cycle:
146
+ a. Query: `mcp__unimatrix__context_search({"query": "{feature-id}", "k": 20})`. Also try feature_cycle tag if available.
147
+ b. For each entry, assess against its category template:
148
+ - **Patterns**: Has what/why/scope? Is "why" substantive (not "it works")?
149
+ - **Lessons**: Has what-happened/root-cause/takeaway? Is takeaway actionable?
150
+ - **Procedures**: Has numbered steps? Are steps specific (not generic)?
151
+ c. Low-quality entries (missing structure, no substantive "why", API docs disguised as patterns):
152
+ correct via `context_correct` or remove via `context_deprecate` as appropriate.
153
+ d. Miscategorized entries: correct category via `context_correct`.
154
+ e. High-quality entries confirmed by delivery: carry forward into steps 1-4 as evidence.
155
+
162
156
  1. PATTERN EXTRACTION — For each component implemented:
163
157
  a. Use /uni-query-patterns to find existing patterns for the affected crate(s)
164
158
  b. If the component followed an existing pattern: verify it's still accurate.
165
159
  If the pattern drifted, use /uni-store-procedure or context_correct to update it.
166
160
  c. If the component established a NEW reusable structure (used in 2+ features
167
- or clearly generic): store it via context_store(category: 'pattern').
161
+ or clearly generic): store it via mcp__unimatrix__context_store({"category": "pattern", ...}).
168
162
  d. If the component was one-off: skip — don't store patterns for unique work.
169
163
 
170
164
  2. PROCEDURE REVIEW — Check if any HOW-TO changed:
@@ -181,7 +175,7 @@ Agent(uni-architect, "
181
175
  4. LESSON EXTRACTION — Two sources:
182
176
 
183
177
  A. From gate failures and rework:
184
- a. What went wrong? (root cause, not symptoms)
178
+ a. Are there items future agents can learn from? (Don't just report failures)
185
179
  b. Is the lesson generalizable beyond this feature?
186
180
  c. If yes: use /uni-store-lesson.
187
181
 
@@ -189,12 +183,7 @@ Agent(uni-architect, "
189
183
  For each Warning-severity hotspot, ask:
190
184
  - Is this a recurring problem (check baseline — is it consistently above threshold)?
191
185
  - Can it be prevented by a procedure change or config update?
192
- - If yes: store as lesson (/uni-store-lesson) or procedure (/uni-store-procedure).
193
-
194
- For each recommendation from the retrospective:
195
- - Check if a matching procedure already exists (/uni-query-patterns).
196
- - If not, and the recommendation is actionable: store as procedure.
197
- - If it updates existing guidance: use context_correct.
186
+ - If yes: If HUMAN must take the action - report only (don't store). If future agents need to know: store as lesson (/uni-store-lesson) or procedure (/uni-store-procedure).
198
187
 
199
188
  C. From baseline outliers:
200
189
  - Positive outliers (improvements): note what changed and why — may be a new pattern.
@@ -210,25 +199,8 @@ Agent(uni-architect, "
210
199
 
211
200
  ---
212
201
 
213
- ## Phase 3: ADR Supersession (if flagged)
214
-
215
- If the architect flagged any ADRs for supersession:
216
202
 
217
- 1. Present each flagged ADR to the human:
218
- ```
219
- ADR #{entry-id}: "{title}"
220
- Architect's finding: {why it should be superseded}
221
- Proposed replacement: {what the new decision should be}
222
-
223
- Approve supersession?
224
- ```
225
-
226
- 2. If human approves: spawn architect to perform the supersession via `/uni-store-adr`.
227
- 3. If human disagrees: note as "ADR validated with caveat".
228
-
229
- ---
230
-
231
- ## Phase 4: Worktree Cleanup
203
+ ## Phase 3: Worktree Cleanup
232
204
 
233
205
  Worker agents spawned with `isolation: "worktree"` create directories under `.claude/worktrees/`. Each contains a full `target/` build directory (~1-2GB). Clean up after merge.
234
206
 
@@ -247,22 +219,22 @@ If a worktree has uncommitted changes, warn the human — do NOT force-remove.
247
219
 
248
220
  ---
249
221
 
250
- ## Phase 5: Summary & Outcome
222
+ ## Phase 4: Summary & Outcome
251
223
 
252
224
  Collect all knowledge base changes from Phases 2-3.
253
225
 
254
- Use `/uni-record-outcome` with:
255
- - Feature: `{feature-id}`
256
- - Type: `retro`
257
- - Phase: `retro`
258
- - Result: `pass`
259
- - Content: `Retrospective complete. {N} patterns, {N} procedures, {N} lessons extracted. {N} ADRs validated. Hotspots: {count} ({warning_count} warnings). Outliers: {list outlier metric names}.`
226
+ **Commit retro artifacts** before recording outcome:
227
+ ```bash
228
+ git add product/features/{id}/agents/
229
+ git commit -m "chore: add retro artifacts ({feature-id})"
230
+ git push origin main
231
+ ```
260
232
 
261
233
  **Return format:**
262
234
  ```
263
235
  RETROSPECTIVE COMPLETE — Knowledge base updated.
264
236
 
265
- Feature: {feature-id}
237
+ Cycle: {feature-id}
266
238
  PR: #{pr-number} (merged)
267
239
 
268
240
  Retrospective summary:
@@ -270,7 +242,10 @@ Retrospective summary:
270
242
  - Hotspots: {count} ({warning_count} warnings, {info_count} info)
271
243
  - Baseline outliers: {list metric names and status}
272
244
 
273
- Knowledge extracted:
245
+ Knowledge delivered:
246
+ - {N} entries served across {N} sessions. Example: #{id} "{title}" retrieved in {phase} — {one sentence on how it shaped the work}.
247
+
248
+ Knowledge curated:
274
249
  - Patterns: {count} new, {count} updated
275
250
  - Procedures: {count} new, {count} updated
276
251
  - Lessons learned: {count} new ({count} from hotspots, {count} from gate failures)
@@ -280,17 +255,3 @@ Knowledge extracted:
280
255
  Details:
281
256
  {list each entry with Unimatrix ID, title, and whether new or updated}
282
257
  ```
283
-
284
- ---
285
-
286
- ## When to Go Lightweight
287
-
288
- Not every feature needs a full retro:
289
-
290
- | Situation | Action |
291
- |---|---|
292
- | Zero gate failures, no rework, zero hotspots | Skip lesson extraction. Focus on patterns/procedures only. |
293
- | Minor enhancement (1-2 components) | Check for pattern drift only, skip procedure review. |
294
- | New infrastructure introduced | Full retro — high likelihood of new patterns and procedures. |
295
- | Multiple SCOPE FAILs or heavy rework | Full retro — prioritize lesson extraction. |
296
- | Many Warning hotspots or baseline outliers | Full retro — prioritize hotspot-driven lessons and procedure updates. |
@@ -88,6 +88,20 @@ If any blocking item → `Merge readiness: BLOCKED` with specific items listed
88
88
 
89
89
  ---
90
90
 
91
+ ## Step 3b: Commit Security Reviewer Report
92
+
93
+ After the security reviewer returns, commit its report to the PR branch so it is included in the merge:
94
+
95
+ ```bash
96
+ git add product/features/{id}/agents/{feature-id}-security-reviewer-report.md
97
+ git commit -m "chore: add security reviewer report ({feature-id}) (#{issue})"
98
+ git push
99
+ ```
100
+
101
+ If the PR is already merged and you are on `main`, commit directly to main instead.
102
+
103
+ ---
104
+
91
105
  ## Step 4: Report
92
106
 
93
107
  Post security review result to GH Issue:
@@ -9,7 +9,7 @@ description: "Populate Unimatrix with foundational repository knowledge through
9
9
 
10
10
  Before running this skill:
11
11
 
12
- 1. **MCP server running**: The Unimatrix MCP server (`unimatrix-server`) must be running and wired in your Claude Code `settings.json`. This skill calls `context_status`, `context_search`, and `context_store` — all require an operational MCP server.
12
+ 1. **MCP server running**: The Unimatrix MCP server (`unimatrix`) must be running and wired in your Claude Code `settings.json`. This skill calls `context_status`, `context_search`, and `context_store` — all require an operational MCP server.
13
13
  2. **Recommended**: Run `/uni-init` first to set up the CLAUDE.md knowledge block. Seeding works without it, but the CLAUDE.md block provides ongoing awareness.
14
14
 
15
15
  If `context_status` fails at startup, the MCP server is not available. Consult the installation documentation for wiring setup.
@@ -18,6 +18,8 @@ If `context_status` fails at startup, the MCP server is not available. Consult t
18
18
 
19
19
  ## What This Skill Does
20
20
 
21
+ A fresh Unimatrix install starts with an empty database; this skill provides an initial curated knowledge set.
22
+
21
23
  Guides you through populating Unimatrix with foundational knowledge about your repository. The skill explores your repo structure in bounded levels, proposes knowledge entries, and stores only what you approve.
22
24
 
23
25
  **Depth limit**: Level 0 (automatic) + up to 2 opt-in levels. No deeper. You control how far to go.
@@ -46,12 +48,16 @@ Follow these steps in strict order. At every gate marked with **STOP**, halt and
46
48
 
47
49
  **This must be the very first action. Do not read any files before this step.**
48
50
 
49
- Call `context_status()`.
51
+ > **Important:** Run once per new project before the first delivery session.
52
+ > Do not re-run on an established installation — seed entries will duplicate
53
+ > existing knowledge.
54
+
55
+ Call `mcp__unimatrix__context_status({})`.
50
56
 
51
57
  - **If the call fails or returns an error**: Print the following and halt immediately. Do not proceed to any further steps.
52
58
  ```
53
59
  Unimatrix MCP is not available.
54
- Ensure unimatrix-server is running and wired in your Claude settings.json.
60
+ Ensure unimatrix is running and wired in your Claude settings.json.
55
61
  See installation documentation for setup instructions.
56
62
  ```
57
63
 
@@ -64,9 +70,9 @@ Call `context_status()`.
64
70
  Check whether seed entries already exist to avoid near-duplicates.
65
71
 
66
72
  Call `context_search` for each seeding category:
67
- - `context_search(query: "repository", category: "convention", k: 5)`
68
- - `context_search(query: "repository", category: "pattern", k: 5)`
69
- - `context_search(query: "repository", category: "procedure", k: 5)`
73
+ - `mcp__unimatrix__context_search({"query": "repository", "category": "convention", "k": 5})`
74
+ - `mcp__unimatrix__context_search({"query": "repository", "category": "pattern", "k": 5})`
75
+ - `mcp__unimatrix__context_search({"query": "repository", "category": "procedure", "k": 5})`
70
76
 
71
77
  Count the total results across all three searches.
72
78
 
@@ -146,14 +152,14 @@ Approve all entries? (approve / reject)
146
152
 
147
153
  - **If approved**: Store each entry via `context_store`:
148
154
  ```
149
- context_store(
150
- title: "{what}",
151
- content: "What: {what}\nWhy: {why}\nScope: {scope}",
152
- topic: "{repo name or top-level context}",
153
- category: "{convention|pattern|procedure}",
154
- tags: ["seed", "level-0"],
155
- agent_id: "uni-seed"
156
- )
155
+ mcp__unimatrix__context_store({
156
+ "title": "{what}",
157
+ "content": "What: {what}\nWhy: {why}\nScope: {scope}",
158
+ "topic": "{repo name or top-level context}",
159
+ "category": "{convention|pattern|procedure}",
160
+ "tags": ["seed", "level-0"],
161
+ "agent_id": "uni-seed"
162
+ })
157
163
  ```
158
164
  Report success or failure for each entry individually. If a `context_store` call fails, report which entry failed and continue storing the remaining entries.
159
165
 
@@ -18,7 +18,7 @@ Stores an architectural decision record in Unimatrix as the **sole authoritative
18
18
  ### Step 1: Search for prior ADRs in the same domain (MANDATORY)
19
19
 
20
20
  ```
21
- mcp__unimatrix__context_search(query: "{decision domain}", category: "decision", k: 5)
21
+ mcp__unimatrix__context_search({"query": "{decision domain}", "category": "decision", "k": 5})
22
22
  ```
23
23
 
24
24
  Check if any existing ADR covers the same concern. If so, you may need to supersede it (see "How to Supersede" below).
@@ -26,16 +26,16 @@ Check if any existing ADR covers the same concern. If so, you may need to supers
26
26
  ### Step 2: Store the ADR
27
27
 
28
28
  ```
29
- mcp__unimatrix__context_store(
30
- title: "ADR-NNN: {decision title}",
31
- content: "## Context\n{why this decision is needed}\n\n## Decision\n{what we decided}\n\n## Consequences\n{what follows from this decision}",
32
- topic: "{feature-id}",
33
- category: "decision",
34
- tags: ["adr", "{phase-prefix}", "{domain-tags}"],
35
- source: "architect",
36
- feature_cycle: "{feature-id}",
37
- agent_id: "{your role name, e.g. uni-architect}"
38
- )
29
+ mcp__unimatrix__context_store({
30
+ "title": "ADR-NNN: {decision title}",
31
+ "content": "## Context\n{why this decision is needed}\n\n## Decision\n{what we decided}\n\n## Consequences\n{what follows from this decision}",
32
+ "topic": "{feature-id}",
33
+ "category": "decision",
34
+ "tags": ["adr", "{phase-prefix}", "{domain-tags}"],
35
+ "source": "architect",
36
+ "feature_cycle": "{feature-id}",
37
+ "agent_id": "{your role name, e.g. uni-architect}"
38
+ })
39
39
  ```
40
40
 
41
41
  ### Step 3: Record the entry ID
@@ -63,7 +63,7 @@ When a new decision replaces a prior one:
63
63
  ### Step 1: Find the old ADR
64
64
 
65
65
  ```
66
- mcp__unimatrix__context_search(query: "{domain of old decision}", category: "decision")
66
+ mcp__unimatrix__context_search({"query": "{domain of old decision}", "category": "decision"})
67
67
  ```
68
68
 
69
69
  Note the old entry's ID.
@@ -71,12 +71,12 @@ Note the old entry's ID.
71
71
  ### Step 2: Use context_correct to supersede
72
72
 
73
73
  ```
74
- mcp__unimatrix__context_correct(
75
- original_id: {old entry ID},
76
- content: "## Context\n{why the old decision is being replaced}\n\n## Decision\n{new decision}\n\n## Consequences\n{what changes}",
77
- title: "ADR-NNN: {new decision title}",
78
- reason: "Superseded by {feature-id}: {short explanation}"
79
- )
74
+ mcp__unimatrix__context_correct({
75
+ "original_id": 1234, // integer — never quote it
76
+ "content": "## Context\n{why the old decision is being replaced}\n\n## Decision\n{new decision}\n\n## Consequences\n{what changes}",
77
+ "title": "ADR-NNN: {new decision title}",
78
+ "reason": "Superseded by {feature-id}: {short explanation}"
79
+ })
80
80
  ```
81
81
 
82
82
  This automatically:
@@ -18,11 +18,11 @@ Stores a lesson learned in Unimatrix. Lessons capture what went wrong, why, and
18
18
  ### Step 1: Check for existing lessons in the same area
19
19
 
20
20
  ```
21
- mcp__unimatrix__context_search(
22
- query: "{what went wrong}",
23
- category: "lesson-learned",
24
- k: 3
25
- )
21
+ mcp__unimatrix__context_search({
22
+ "query": "{what went wrong}",
23
+ "category": "lesson-learned",
24
+ "k": 3
25
+ })
26
26
  ```
27
27
 
28
28
  If a matching lesson already exists, go to Step 2b (supersede) instead of creating a duplicate.
@@ -30,24 +30,24 @@ If a matching lesson already exists, go to Step 2b (supersede) instead of creati
30
30
  ### Step 2a: Store NEW lesson (no prior exists)
31
31
 
32
32
  ```
33
- mcp__unimatrix__context_store(
34
- title: "{concise description of what went wrong}",
35
- content: "{structured lesson content}",
36
- topic: "{feature-id or crate}",
37
- category: "lesson-learned",
38
- tags: ["{domain}", "{failure-type}"],
39
- agent_id: "{your role name, e.g. uni-architect}"
40
- )
33
+ mcp__unimatrix__context_store({
34
+ "title": "{concise description of what went wrong}",
35
+ "content": "{structured lesson content}",
36
+ "topic": "{feature-id or crate}",
37
+ "category": "lesson-learned",
38
+ "tags": ["{domain}", "{failure-type}"],
39
+ "agent_id": "{your role name, e.g. uni-architect}"
40
+ })
41
41
  ```
42
42
 
43
43
  ### Step 2b: Supersede EXISTING lesson (prior exists but is incomplete or outdated)
44
44
 
45
45
  ```
46
- mcp__unimatrix__context_correct(
47
- original_id: {old entry ID},
48
- content: "{updated lesson with new evidence or broader scope}",
49
- reason: "Updated: {what new evidence or context was added}"
50
- )
46
+ mcp__unimatrix__context_correct({
47
+ "original_id": 1234, // integer — never quote it
48
+ "content": "{updated lesson with new evidence or broader scope}",
49
+ "reason": "Updated: {what new evidence or context was added}"
50
+ })
51
51
  ```
52
52
 
53
53
  This deprecates the old lesson and creates a corrected version with a supersession chain. Future searches return the latest version.
@@ -57,7 +57,7 @@ This deprecates the old lesson and creates a corrected version with a supersessi
57
57
  If a lesson is simply wrong or no longer applies (e.g., the underlying code was redesigned):
58
58
 
59
59
  ```
60
- mcp__unimatrix__context_deprecate(id: {entry ID}, reason: "{why it no longer applies}")
60
+ mcp__unimatrix__context_deprecate({"id": 1234, "reason": "{why it no longer applies}"}) // id is an integer — never quote it
61
61
  ```
62
62
 
63
63
  ---
@@ -30,11 +30,11 @@ Stores a reusable pattern in Unimatrix. Patterns capture implementation gotchas,
30
30
  ### Step 1: Check for existing patterns in the same area
31
31
 
32
32
  ```
33
- mcp__unimatrix__context_search(
34
- query: "{what the pattern is about}",
35
- category: "pattern",
36
- k: 3
37
- )
33
+ mcp__unimatrix__context_search({
34
+ "query": "{what the pattern is about}",
35
+ "category": "pattern",
36
+ "k": 3
37
+ })
38
38
  ```
39
39
 
40
40
  If a matching pattern already exists, go to Step 2b (supersede) instead of creating a duplicate.
@@ -48,24 +48,24 @@ Assemble the content from three required fields:
48
48
  - **Scope**: Where it applies — crate name, module, or context.
49
49
 
50
50
  ```
51
- mcp__unimatrix__context_store(
52
- title: "{concise what statement}",
53
- content: "What: {what}\nWhy: {why}\nScope: {scope}",
54
- topic: "{crate name or module — e.g., 'unimatrix-store'}",
55
- category: "pattern",
56
- tags: ["{domain}", "{feature_cycle if known}"],
57
- agent_id: "{your role name, e.g. uni-rust-dev}"
58
- )
51
+ mcp__unimatrix__context_store({
52
+ "title": "{concise what statement}",
53
+ "content": "What: {what}\nWhy: {why}\nScope: {scope}",
54
+ "topic": "{crate name or module — e.g., 'unimatrix-store'}",
55
+ "category": "pattern",
56
+ "tags": ["{domain}", "{feature_cycle if known}"],
57
+ "agent_id": "{your role name, e.g. uni-rust-dev}"
58
+ })
59
59
  ```
60
60
 
61
61
  ### Step 2b: Supersede EXISTING pattern (prior exists but is incomplete or outdated)
62
62
 
63
63
  ```
64
- mcp__unimatrix__context_correct(
65
- original_id: {old entry ID},
66
- content: "What: {updated what}\nWhy: {updated why}\nScope: {updated scope}",
67
- reason: "Updated: {what changed and why}"
68
- )
64
+ mcp__unimatrix__context_correct({
65
+ "original_id": 1234, // integer — never quote it
66
+ "content": "What: {updated what}\nWhy: {updated why}\nScope: {updated scope}",
67
+ "reason": "Updated: {what changed and why}"
68
+ })
69
69
  ```
70
70
 
71
71
  This deprecates the old pattern and creates a corrected version with a supersession chain.
@@ -30,11 +30,11 @@ If it has **numbered steps**, it's a procedure. If it's a **rule**, it's a conve
30
30
  ### Step 1: Check for existing procedure
31
31
 
32
32
  ```
33
- mcp__unimatrix__context_search(
34
- query: "{what the procedure covers}",
35
- category: "procedure",
36
- k: 3
37
- )
33
+ mcp__unimatrix__context_search({
34
+ "query": "{what the procedure covers}",
35
+ "category": "procedure",
36
+ "k": 3
37
+ })
38
38
  ```
39
39
 
40
40
  If an existing procedure covers the same task, use Step 2 (Update) instead.
@@ -42,24 +42,24 @@ If an existing procedure covers the same task, use Step 2 (Update) instead.
42
42
  ### Step 2a: Store NEW procedure
43
43
 
44
44
  ```
45
- mcp__unimatrix__context_store(
46
- title: "How to {task description}",
47
- content: "{step-by-step content}",
48
- topic: "{crate or area — e.g., 'unimatrix-server'}",
49
- category: "procedure",
50
- tags: ["{domain}", "{consuming-roles}"],
51
- agent_id: "{your role name, e.g. uni-architect}"
52
- )
45
+ mcp__unimatrix__context_store({
46
+ "title": "How to {task description}",
47
+ "content": "{step-by-step content}",
48
+ "topic": "{crate or area — e.g., 'unimatrix-server'}",
49
+ "category": "procedure",
50
+ "tags": ["{domain}", "{consuming-roles}"],
51
+ "agent_id": "{your role name, e.g. uni-architect}"
52
+ })
53
53
  ```
54
54
 
55
55
  ### Step 2b: UPDATE existing procedure (supersedes old version)
56
56
 
57
57
  ```
58
- mcp__unimatrix__context_correct(
59
- original_id: {old entry ID},
60
- content: "{updated step-by-step content}",
61
- reason: "Updated: {what changed and why}"
62
- )
58
+ mcp__unimatrix__context_correct({
59
+ "original_id": 1234, // integer — never quote it
60
+ "content": "{updated step-by-step content}",
61
+ "reason": "Updated: {what changed and why}"
62
+ })
63
63
  ```
64
64
 
65
65
  This deprecates the old entry and creates a new one with a supersession chain. Agents querying later will get the latest version.