@dug-21/unimatrix 0.5.5

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.
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: "uni-knowledge-search"
3
+ description: "Semantic search across Unimatrix knowledge. Use when exploring a topic, looking for related decisions, patterns, or conventions."
4
+ ---
5
+
6
+ # Knowledge Search — Semantic Query Against Unimatrix
7
+
8
+ ## What This Skill Does
9
+
10
+ Searches Unimatrix for knowledge entries using natural language. Returns results ranked by semantic similarity. Use when you need to explore what's known about a concept, find related decisions, or discover relevant patterns.
11
+
12
+ **Use this when you DON'T know exactly what you're looking for** — you have a concept or question, not a specific entry.
13
+
14
+ ---
15
+
16
+ ## How to Search
17
+
18
+ Call the `mcp__unimatrix__context_search` MCP tool:
19
+
20
+ | Parameter | Required | Description |
21
+ |-----------|----------|-------------|
22
+ | `query` | Yes | Natural language search query |
23
+ | `category` | No | Filter to a specific category |
24
+ | `topic` | No | Filter to a specific feature ID |
25
+ | `tags` | No | Filter by tags (all must match) |
26
+ | `k` | No | Max results (default: 5) |
27
+ | `format` | No | `"summary"` (default), `"markdown"` (full content), `"json"` |
28
+ | `agent_id` | No | Your role name (e.g. `uni-architect`) |
29
+
30
+ ### Examples
31
+
32
+ **Find ADRs about error handling across all features:**
33
+ ```
34
+ mcp__unimatrix__context_search(query: "error handling strategy", category: "decision")
35
+ ```
36
+
37
+ **Find anything related to MCP transport:**
38
+ ```
39
+ mcp__unimatrix__context_search(query: "MCP transport stdio protocol")
40
+ ```
41
+
42
+ **Find conventions about testing in a specific feature:**
43
+ ```
44
+ mcp__unimatrix__context_search(query: "test patterns integration", topic: "nxs-001")
45
+ ```
46
+
47
+ **Get full content instead of summaries:**
48
+ ```
49
+ mcp__unimatrix__context_search(query: "serialization approach", format: "markdown")
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Available Categories
55
+
56
+ | Category | Contains |
57
+ |----------|----------|
58
+ | `decision` | Architectural Decision Records (ADRs) |
59
+ | `convention` | Coding and process conventions |
60
+ | `pattern` | Reusable implementation patterns |
61
+ | `procedure` | Step-by-step processes |
62
+ | `outcome` | Results and outcomes |
63
+ | `lesson-learned` | Retrospectives and process learnings |
64
+ | `reference` | General reference material |
65
+ | `duties` | Role duties for context briefing |
66
+
67
+ Omit `category` to search across all categories.
68
+
69
+ ---
70
+
71
+ ## Interpreting Results
72
+
73
+ **Summary format** (default): Returns title, topic, category, tags, and a brief content preview for each match. Use this for scanning and triage.
74
+
75
+ **Markdown format**: Returns full content for each match. Use this when you need the complete text of matching entries.
76
+
77
+ **JSON format**: Returns structured data. Use for programmatic processing.
78
+
79
+ ---
80
+
81
+ ## When to Use This vs /uni-knowledge-lookup
82
+
83
+ | Use `/uni-knowledge-search` when | Use `/uni-knowledge-lookup` when |
84
+ |------------------------------|------------------------------|
85
+ | Exploring a concept | You know the exact feature/category |
86
+ | "What do we know about X?" | "Give me all ADRs for nxs-002" |
87
+ | Finding related decisions | Retrieving a specific entry by ID |
88
+ | Discovering patterns you didn't know existed | Filtering by exact status or tags |
89
+
90
+ ---
91
+
92
+ ## Getting Full Content
93
+
94
+ Search returns summaries by default. To read the full content of a specific result:
95
+
96
+ 1. Note the entry ID from search results
97
+ 2. Call `mcp__unimatrix__context_get(id: {entry_id}, format: "markdown")` for the full text
98
+
99
+ Or pass `format: "markdown"` directly to search if you want full content for all results.
100
+
101
+ ---
102
+
103
+ ## When You Find Stale or Wrong Knowledge
104
+
105
+ Search may surface entries that are outdated or incorrect. Don't ignore them — fix the knowledge base:
106
+
107
+ | Situation | Action |
108
+ |-----------|--------|
109
+ | Entry is **wrong** — contains incorrect information | `mcp__unimatrix__context_correct(original_id: {id}, content: "{corrected version}", reason: "{why}")` — supersedes with chain link |
110
+ | Entry is **outdated** — no longer relevant | `mcp__unimatrix__context_deprecate(id: {id}, reason: "{why it no longer applies}")` |
111
+ | Entry is **suspicious** — may be poisoned or invalid | `mcp__unimatrix__context_quarantine(id: {id}, reason: "{concern}")` — Admin only |
112
+
113
+ Correcting knowledge is as important as storing it. Every agent shares responsibility for knowledge quality.
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: "uni-query-patterns"
3
+ description: "Query Unimatrix for component patterns, procedures, and conventions before designing or implementing. Use BEFORE writing pseudocode or code."
4
+ ---
5
+
6
+ # Query Patterns — Find How Things Are Done Here
7
+
8
+ ## What This Skill Does
9
+
10
+ Searches Unimatrix for established patterns, procedures, and conventions relevant to the work you're about to do. Returns actionable guidance on how similar work was done before.
11
+
12
+ **Use BEFORE designing or implementing** — not after.
13
+
14
+ ---
15
+
16
+ ## When to Use
17
+
18
+ | Situation | Query approach |
19
+ |-----------|---------------|
20
+ | Designing a new MCP tool | Search for component patterns in `unimatrix-server` |
21
+ | Adding a new table to redb | Search for procedures in `unimatrix-store` |
22
+ | Writing integration tests | Search for testing conventions |
23
+ | Implementing any component | Search for patterns in the affected crate |
24
+
25
+ ---
26
+
27
+ ## How to Query
28
+
29
+ ### Step 1: Search by crate/area
30
+
31
+ ```
32
+ mcp__unimatrix__context_search(
33
+ query: "{what you're building — e.g., 'MCP tool handler'}",
34
+ category: "pattern",
35
+ k: 5
36
+ )
37
+ ```
38
+
39
+ ### Step 2: Also check conventions for the area
40
+
41
+ ```
42
+ mcp__unimatrix__context_search(
43
+ query: "{area — e.g., 'server tool pipeline'}",
44
+ category: "convention",
45
+ k: 5
46
+ )
47
+ ```
48
+
49
+ ### Step 3: Check for procedures (step-by-step techniques)
50
+
51
+ ```
52
+ mcp__unimatrix__context_search(
53
+ query: "{task — e.g., 'adding a new MCP tool'}",
54
+ category: "procedure",
55
+ k: 3
56
+ )
57
+ ```
58
+
59
+ ### Step 4: Check for relevant ADRs
60
+
61
+ ```
62
+ mcp__unimatrix__context_lookup(
63
+ topic: "{feature-id}",
64
+ category: "decision"
65
+ )
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Interpreting Results
71
+
72
+ **Patterns** tell you the reusable structure. Follow them unless your component has a good reason to deviate. If you deviate, note why in your pseudocode or code comments.
73
+
74
+ **Procedures** tell you the steps. Follow them in order. If a step is wrong or missing, note it — the retrospective will update the procedure.
75
+
76
+ **Conventions** tell you the rules. Follow them always. No deviations.
77
+
78
+ **ADRs** tell you what was decided and why. Respect the decision. If it seems wrong for your case, flag it to the coordinator — don't silently override.
79
+
80
+ ---
81
+
82
+ ## If Nothing Is Found
83
+
84
+ No results means either:
85
+ 1. This is genuinely new work with no prior patterns — proceed with your best design
86
+ 2. Patterns exist but aren't stored yet — check the codebase directly for similar code
87
+
88
+ In either case, your work may establish a NEW pattern that the retrospective will extract.
89
+
90
+ ---
91
+
92
+ ## When You Find Stale or Wrong Knowledge
93
+
94
+ Query results may include entries that are outdated or incorrect. Fix them before they mislead the next agent:
95
+
96
+ | Situation | Action |
97
+ |-----------|--------|
98
+ | Pattern/procedure is **wrong** | `mcp__unimatrix__context_correct(original_id: {id}, content: "{corrected version}", reason: "{why}")` |
99
+ | Pattern/procedure is **outdated** | `mcp__unimatrix__context_deprecate(id: {id}, reason: "{why}")` |
100
+ | Convention no longer applies | `mcp__unimatrix__context_deprecate(id: {id}, reason: "{why}")` |
101
+
102
+ If you correct or deprecate an entry during your session, mention it in your return to the coordinator so it can be noted in the outcome.
103
+
104
+ ---
105
+
106
+ ## What NOT to Do
107
+
108
+ - Do NOT store patterns during this query phase — that's the retrospective's job
109
+ - Do NOT ignore results because "my approach is better" — patterns represent accumulated project wisdom
110
+ - Do NOT query for workflow choreography — that's in your coordinator, not Unimatrix
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: "uni-record-outcome"
3
+ description: "Record a feature or bugfix outcome in Unimatrix. Use at the end of every session (design, delivery, bugfix, retrospective)."
4
+ ---
5
+
6
+ # Record Outcome — Session Completion Record
7
+
8
+ ## What This Skill Does
9
+
10
+ Stores a structured outcome record in Unimatrix. Outcomes enable the retrospective pipeline to analyze what shipped, how it went, and detect cross-feature patterns.
11
+
12
+ **Use at the END of every session** — design, delivery, bugfix, or retrospective.
13
+
14
+ ---
15
+
16
+ ## How to Record
17
+
18
+ Call `mcp__unimatrix__context_store` with these parameters:
19
+
20
+ | Parameter | Value |
21
+ |-----------|-------|
22
+ | `category` | `"outcome"` |
23
+ | `topic` | `"{feature-id}"` (e.g., `"col-011"`) |
24
+ | `feature_cycle` | `"{feature-id}"` |
25
+ | `tags` | Structured tags (see below) |
26
+ | `content` | What happened — artifacts, results, key facts |
27
+ | `agent_id` | Your role name (e.g. `uni-architect`) |
28
+
29
+ ### Required Tags
30
+
31
+ Tags use `key:value` format. Include ALL applicable:
32
+
33
+ | Tag | Values | Required |
34
+ |-----|--------|----------|
35
+ | `type:{x}` | `feature`, `bugfix`, `incident`, `process`, `session` | Yes |
36
+ | `phase:{x}` | `research`, `design`, `implementation`, `testing`, `validation` | Yes |
37
+ | `result:{x}` | `pass`, `fail`, `rework`, `skip` | Yes |
38
+ | `gate:{x}` | `3a`, `3b`, `3c` | Only for delivery (last gate passed) |
39
+
40
+ ### Examples
41
+
42
+ **Design session complete:**
43
+ ```
44
+ mcp__unimatrix__context_store(
45
+ category: "outcome",
46
+ topic: "col-011",
47
+ feature_cycle: "col-011",
48
+ tags: ["type:feature", "phase:design", "result:pass"],
49
+ content: "Session 1 complete. 9 artifacts produced. GH Issue #65.
50
+ ADR entries: #250, #251. 3 scope risks identified (SR-01 through SR-03)."
51
+ )
52
+ ```
53
+
54
+ **Implementation session complete:**
55
+ ```
56
+ mcp__unimatrix__context_store(
57
+ category: "outcome",
58
+ topic: "col-011",
59
+ feature_cycle: "col-011",
60
+ tags: ["type:feature", "phase:implementation", "result:pass", "gate:3c"],
61
+ content: "Session 2 complete. All 3 gates passed. PR #70.
62
+ 12 unit tests, 4 integration tests added. No rework needed."
63
+ )
64
+ ```
65
+
66
+ **Bugfix complete:**
67
+ ```
68
+ mcp__unimatrix__context_store(
69
+ category: "outcome",
70
+ topic: "col-011",
71
+ feature_cycle: "col-011",
72
+ tags: ["type:bugfix", "phase:implementation", "result:pass"],
73
+ content: "Bug fix shipped. Root cause: off-by-one in confidence calculation.
74
+ PR #72. 2 tests added. No rework."
75
+ )
76
+ ```
77
+
78
+ ---
79
+
80
+ ## Content Guidelines
81
+
82
+ Keep content to 100-300 characters. Include:
83
+ - What shipped (artifact count, PR number)
84
+ - Key metrics (test count, gate results, rework count)
85
+ - Notable facts (ADR IDs, risk count, scope changes)
86
+
87
+ Do NOT include full artifact lists or file paths — those are in the feature directory.
88
+
89
+ ---
90
+
91
+ ## Self-Verification
92
+
93
+ After calling `context_store`, verify:
94
+ - Response confirms entry stored (returns entry ID)
95
+ - Tags follow the `key:value` format exactly
96
+ - `feature_cycle` matches the feature ID
@@ -0,0 +1,210 @@
1
+ ---
2
+ name: "uni-release"
3
+ description: "Version bump, changelog generation, tag, and push to trigger the release pipeline."
4
+ ---
5
+
6
+ # /uni-release — Create a Unimatrix Release
7
+
8
+ ## Inputs
9
+
10
+ From the invoker:
11
+ - Bump level: `major`, `minor`, or `patch` — OR an explicit semver string (e.g. `0.7.0`).
12
+
13
+ If no bump level is provided, ask the user before proceeding.
14
+
15
+ ---
16
+
17
+ ## Pre-flight Checks
18
+
19
+ 1. Ensure the worktree is clean (no uncommitted changes):
20
+ ```bash
21
+ git status --porcelain
22
+ ```
23
+ If output is non-empty, stop with: **"Clean worktree required for release. Commit or stash changes first."**
24
+
25
+ 2. Ensure you are on a branch that can be pushed (typically `main` or a release branch).
26
+
27
+ ---
28
+
29
+ ## Step 1: Read Current Version
30
+
31
+ Read `[workspace.package] version` from the root `Cargo.toml`:
32
+
33
+ ```bash
34
+ grep -m1 'version' Cargo.toml | head -1
35
+ ```
36
+
37
+ Look inside the `[workspace.package]` section for the `version = "X.Y.Z"` line. Parse the current version string.
38
+
39
+ ---
40
+
41
+ ## Step 2: Compute New Version
42
+
43
+ - **If bump level** (`major` / `minor` / `patch`):
44
+ - Parse current version as `MAJOR.MINOR.PATCH`.
45
+ - `patch` -> `MAJOR.MINOR.(PATCH+1)`
46
+ - `minor` -> `MAJOR.(MINOR+1).0`
47
+ - `major` -> `(MAJOR+1).0.0`
48
+
49
+ - **If explicit version string**:
50
+ - Validate it matches `X.Y.Z` where X, Y, Z are non-negative integers.
51
+ - Validate it is strictly greater than the current version.
52
+ - If invalid, stop with a diagnostic error.
53
+
54
+ Check that the git tag `v{new_version}` does not already exist:
55
+ ```bash
56
+ git tag -l "v{new_version}"
57
+ ```
58
+ If it exists, stop with: **"Tag v{new_version} already exists."**
59
+
60
+ ---
61
+
62
+ ## Step 3: Update Root Cargo.toml
63
+
64
+ Edit the `[workspace.package]` section in the root `Cargo.toml`:
65
+ - Change `version = "{old_version}"` to `version = "{new_version}"`.
66
+
67
+ All 9 workspace crates use `version.workspace = true` and inherit automatically.
68
+
69
+ ---
70
+
71
+ ## Step 4: Update npm package.json Files
72
+
73
+ Update these files with the new version:
74
+
75
+ 1. **`packages/unimatrix/package.json`**:
76
+ - Set `"version"` to `"{new_version}"`.
77
+ - Set `"optionalDependencies"."@dug-21/unimatrix-linux-x64"` to `"{new_version}"`.
78
+ - Set `"optionalDependencies"."@dug-21/unimatrix-linux-arm64"` to `"{new_version}"`.
79
+
80
+ 2. **`packages/unimatrix-linux-x64/package.json`**:
81
+ - Set `"version"` to `"{new_version}"`.
82
+
83
+ 3. **`packages/unimatrix-linux-arm64/package.json`**:
84
+ - Set `"version"` to `"{new_version}"`.
85
+
86
+ ---
87
+
88
+ ## Step 5: Generate CHANGELOG.md
89
+
90
+ 1. Find the previous release tag:
91
+ ```bash
92
+ git describe --tags --abbrev=0 --match "v*" 2>/dev/null
93
+ ```
94
+ If no prior tag exists, use the first commit as the range start.
95
+
96
+ 2. Collect conventional commits in the range `{previous_tag}..HEAD`:
97
+ ```bash
98
+ git log {previous_tag}..HEAD --format="%H %s"
99
+ ```
100
+
101
+ 3. Classify each commit:
102
+ - Starts with `feat:` or `feat(` -> **Features** (strip prefix for display).
103
+ - Starts with `fix:` or `fix(` -> **Fixes** (strip prefix for display).
104
+ - Contains `BREAKING CHANGE` in the body OR has `!:` in the subject -> **Breaking Changes**.
105
+ - All other prefixes (`docs:`, `test:`, `chore:`, etc.) -> skip.
106
+
107
+ 4. Build the new changelog section:
108
+ ```
109
+ ## [{new_version}] - {YYYY-MM-DD}
110
+
111
+ ### Breaking Changes
112
+ - {message}
113
+
114
+ ### Features
115
+ - {message}
116
+
117
+ ### Fixes
118
+ - {message}
119
+ ```
120
+ Omit any section that has zero entries. Use today's date.
121
+
122
+ 5. If `CHANGELOG.md` does not exist, create it with this header:
123
+ ```
124
+ # Changelog
125
+
126
+ All notable changes to Unimatrix are documented here.
127
+ Format based on [Keep a Changelog](https://keepachangelog.com/).
128
+ ```
129
+
130
+ 6. **Prepend** the new section after the header (before any existing release sections).
131
+
132
+ ---
133
+
134
+ ## Step 6: Verify Build
135
+
136
+ Run a build check to confirm the version change does not break compilation:
137
+ ```bash
138
+ cargo check --workspace
139
+ ```
140
+ If this fails, stop with: **"Build check failed after version update. Review changes before releasing."**
141
+
142
+ ---
143
+
144
+ ## Step 7: Create Release Commit
145
+
146
+ Stage only the release-related files:
147
+ ```bash
148
+ git add Cargo.toml packages/unimatrix/package.json packages/unimatrix-linux-x64/package.json packages/unimatrix-linux-arm64/package.json CHANGELOG.md
149
+ ```
150
+
151
+ Commit with the release message:
152
+ ```bash
153
+ git commit -m "release: v{new_version}"
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Step 8: Create Git Tag
159
+
160
+ ```bash
161
+ git tag "v{new_version}"
162
+ ```
163
+
164
+ ---
165
+
166
+ ## Step 9: Push Commit and Tag
167
+
168
+ ```bash
169
+ git push origin HEAD
170
+ git push origin "v{new_version}"
171
+ ```
172
+
173
+ The tag push triggers the release pipeline defined in `.github/workflows/uni-release.yml`.
174
+
175
+ ---
176
+
177
+ ## Step 10: Print Summary
178
+
179
+ ```
180
+ Release v{new_version} complete.
181
+
182
+ Version: {old_version} -> {new_version}
183
+
184
+ Files modified:
185
+ - Cargo.toml (workspace version)
186
+ - packages/unimatrix/package.json
187
+ - packages/unimatrix-linux-x64/package.json
188
+ - packages/unimatrix-linux-arm64/package.json
189
+ - CHANGELOG.md
190
+
191
+ Git:
192
+ - Commit: release: v{new_version}
193
+ - Tag: v{new_version}
194
+ - Pushed to origin
195
+
196
+ CI pipeline: https://github.com/anthropic/unimatrix/actions
197
+ ```
198
+
199
+ ---
200
+
201
+ ## Error Reference
202
+
203
+ | Condition | Action |
204
+ |-----------|--------|
205
+ | No bump level or version provided | Ask the user to specify one |
206
+ | Invalid explicit version (not semver) | Stop with diagnostic |
207
+ | New version <= current version | Stop: "New version must be greater than {current}" |
208
+ | Git tag already exists | Stop: "Tag v{version} already exists" |
209
+ | Uncommitted changes in worktree | Stop: "Clean worktree required for release" |
210
+ | `cargo check` fails | Stop: "Build check failed, review changes" |