@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,120 @@
1
+ ---
2
+ name: "knowledge-lookup"
3
+ description: "Deterministic lookup of Unimatrix knowledge by exact filters. Use when you know what you want — a specific feature, category, entry ID, or status."
4
+ ---
5
+
6
+ # Knowledge Lookup — Deterministic Query Against Unimatrix
7
+
8
+ ## What This Skill Does
9
+
10
+ Retrieves Unimatrix entries by exact filters — topic, category, tags, status, or entry ID. Returns all matching entries without semantic ranking. Use when you know precisely what you're looking for.
11
+
12
+ **Use this when you KNOW what you want** — a specific feature's ADRs, entries with a particular status, or a known entry by ID.
13
+
14
+ ---
15
+
16
+ ## How to Look Up
17
+
18
+ Call the `mcp__unimatrix__context_lookup` MCP tool:
19
+
20
+ | Parameter | Required | Description |
21
+ |-----------|----------|-------------|
22
+ | `topic` | No* | Exact feature ID match (e.g., `"nxs-001"`) |
23
+ | `category` | No* | Exact category match (e.g., `"decision"`) |
24
+ | `tags` | No* | All specified tags must match |
25
+ | `status` | No | `"active"` (default), `"deprecated"`, `"proposed"` |
26
+ | `id` | No* | Specific entry ID (returns exactly one entry) |
27
+ | `limit` | No | Max results (default: 10) |
28
+ | `format` | No | `"summary"` (default), `"markdown"` (full content), `"json"` |
29
+ | `agent_id` | No | Your role name (e.g. `uni-architect`) |
30
+
31
+ *At least one filter parameter is required (topic, category, tags, or id).
32
+
33
+ ### Examples
34
+
35
+ **Get all ADRs for a specific feature:**
36
+ ```
37
+ mcp__unimatrix__context_lookup(topic: "nxs-002", category: "decision")
38
+ ```
39
+
40
+ **Get a specific entry by ID (full content):**
41
+ ```
42
+ mcp__unimatrix__context_lookup(id: 42, format: "markdown")
43
+ ```
44
+
45
+ **Find all deprecated decisions:**
46
+ ```
47
+ mcp__unimatrix__context_lookup(category: "decision", status: "deprecated")
48
+ ```
49
+
50
+ **Find entries tagged with a specific domain:**
51
+ ```
52
+ mcp__unimatrix__context_lookup(category: "decision", tags: ["adr", "serialization"])
53
+ ```
54
+
55
+ **Get all knowledge for a feature (any category):**
56
+ ```
57
+ mcp__unimatrix__context_lookup(topic: "vnc-001")
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Single Entry Retrieval
63
+
64
+ If you already have an entry ID (from a prior search or lookup result), use `context_get` for direct retrieval:
65
+
66
+ ```
67
+ mcp__unimatrix__context_get(id: 42, format: "markdown")
68
+ ```
69
+
70
+ This is faster than a lookup with an ID filter and always returns full content.
71
+
72
+ ---
73
+
74
+ ## When to Use This vs /knowledge-search
75
+
76
+ | Use `/knowledge-lookup` when | Use `/knowledge-search` when |
77
+ |------------------------------|------------------------------|
78
+ | You know the exact feature/category | Exploring a concept |
79
+ | "Give me all ADRs for nxs-002" | "What do we know about X?" |
80
+ | Retrieving a specific entry by ID | Finding related decisions |
81
+ | Filtering by exact status or tags | Discovering unknown patterns |
82
+ | Checking what exists before storing | Broad exploration |
83
+
84
+ ---
85
+
86
+ ## Common Workflows
87
+
88
+ **Before writing a new ADR (architect):**
89
+ ```
90
+ 1. mcp__unimatrix__context_lookup(topic: "{feature-id}", category: "decision")
91
+ → See what ADRs already exist for this feature
92
+ 2. mcp__unimatrix__context_lookup(category: "decision", tags: ["adr", "{domain}"])
93
+ → See ADRs across features in the same domain
94
+ ```
95
+
96
+ **Before implementing a component (developer):**
97
+ ```
98
+ 1. mcp__unimatrix__context_lookup(topic: "{feature-id}", category: "decision", format: "markdown")
99
+ → Read all architectural decisions for this feature
100
+ ```
101
+
102
+ **Checking for deprecated knowledge:**
103
+ ```
104
+ mcp__unimatrix__context_lookup(category: "decision", status: "deprecated", topic: "{feature-id}")
105
+ → See what decisions have been superseded
106
+ ```
107
+
108
+ ---
109
+
110
+ ## When You Find Stale or Wrong Knowledge
111
+
112
+ Lookup may surface entries that are outdated or incorrect. Fix them:
113
+
114
+ | Situation | Action |
115
+ |-----------|--------|
116
+ | Entry is **wrong** | `mcp__unimatrix__context_correct(original_id: {id}, content: "{corrected version}", reason: "{why}")` — supersedes with chain link |
117
+ | Entry is **outdated** | `mcp__unimatrix__context_deprecate(id: {id}, reason: "{why}")` |
118
+ | Entry is **suspicious** | `mcp__unimatrix__context_quarantine(id: {id}, reason: "{concern}")` — Admin only |
119
+
120
+ Every agent shares responsibility for knowledge quality. Don't leave wrong entries for the next agent to trip over.
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: "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 /knowledge-lookup
82
+
83
+ | Use `/knowledge-search` when | Use `/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: "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: "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