@dug-21/unimatrix 0.6.2 → 0.6.3
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/README.md +9 -0
- package/package.json +5 -4
- package/skills/knowledge-lookup/SKILL.md +0 -120
- package/skills/knowledge-search/SKILL.md +0 -113
- package/skills/query-patterns/SKILL.md +0 -110
- package/skills/record-outcome/SKILL.md +0 -96
- package/skills/retro/SKILL.md +0 -296
- package/skills/review-pr/SKILL.md +0 -128
- package/skills/store-adr/SKILL.md +0 -142
- package/skills/store-lesson/SKILL.md +0 -109
- package/skills/store-pattern/SKILL.md +0 -124
- package/skills/store-procedure/SKILL.md +0 -114
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "store-pattern"
|
|
3
|
-
description: "Store a reusable implementation pattern in Unimatrix. Use when you discover a gotcha, trap, or reusable solution that future agents should know."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Store Pattern — Implementation Knowledge
|
|
7
|
-
|
|
8
|
-
## What This Skill Does
|
|
9
|
-
|
|
10
|
-
Stores a reusable pattern in Unimatrix. Patterns capture implementation gotchas, traps, and solutions — knowledge invisible in source code that you only learn by hitting it. They surface in future `/query-patterns` results so the next agent doesn't repeat the discovery.
|
|
11
|
-
|
|
12
|
-
**Use when:** you discover something that compiles but breaks at runtime, a non-obvious integration requirement, a crate-specific trap, or a reusable solution to a recurring problem.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Pattern vs Lesson vs Procedure
|
|
17
|
-
|
|
18
|
-
| Type | When to use | Example |
|
|
19
|
-
|------|------------|---------|
|
|
20
|
-
| **Pattern** (`/store-pattern`) | Reusable solution or gotcha applicable regardless of failure context | "Don't hold lock_conn() across await — deadlocks under concurrent requests" |
|
|
21
|
-
| **Lesson** (`/store-lesson`) | Triggered by a specific failure; takeaway is preventive | "Gate 3b failed because rust-dev didn't read ADR before implementing" |
|
|
22
|
-
| **Procedure** (`/store-procedure`) | Ordered steps to accomplish a task | "How to add a new MCP tool: step 1, 2, 3..." |
|
|
23
|
-
|
|
24
|
-
**Decision rule:** If the knowledge was triggered by a specific failure and the takeaway is "don't do X," use `/store-lesson`. If the knowledge is a reusable solution applicable regardless of failure context — "when doing X, use approach Y because Z" — use `/store-pattern`.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## How to Store
|
|
29
|
-
|
|
30
|
-
### Step 1: Check for existing patterns in the same area
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
mcp__unimatrix__context_search(
|
|
34
|
-
query: "{what the pattern is about}",
|
|
35
|
-
category: "pattern",
|
|
36
|
-
k: 3
|
|
37
|
-
)
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
If a matching pattern already exists, go to Step 2b (supersede) instead of creating a duplicate.
|
|
41
|
-
|
|
42
|
-
### Step 2a: Store NEW pattern (no prior exists)
|
|
43
|
-
|
|
44
|
-
Assemble the content from three required fields:
|
|
45
|
-
|
|
46
|
-
- **What**: The pattern in one sentence (max 200 chars). What to do or not do.
|
|
47
|
-
- **Why**: What goes wrong without it (min 10 chars). The consequence that makes this worth knowing.
|
|
48
|
-
- **Scope**: Where it applies — crate name, module, or context.
|
|
49
|
-
|
|
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
|
-
)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Step 2b: Supersede EXISTING pattern (prior exists but is incomplete or outdated)
|
|
62
|
-
|
|
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
|
-
)
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
This deprecates the old pattern and creates a corrected version with a supersession chain.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Quality Rules
|
|
76
|
-
|
|
77
|
-
**Reject if:**
|
|
78
|
-
- `why` is missing or under 10 characters — no motivation, no value
|
|
79
|
-
- `what` exceeds 200 characters — not concise enough
|
|
80
|
-
- Content is API documentation, not a gotcha — "Store has a lock_conn() method" is docs, not a pattern
|
|
81
|
-
|
|
82
|
-
**Good patterns:**
|
|
83
|
-
```
|
|
84
|
-
What: Don't hold lock_conn() across await points
|
|
85
|
-
Why: Deadlocks under concurrent MCP requests — the Store mutex is not async-aware
|
|
86
|
-
Scope: unimatrix-store, any async caller
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
What: Use #[serde(default)] on all new EntryRecord fields
|
|
91
|
-
Why: Existing serialized records lack the field; deserialization panics without default
|
|
92
|
-
Scope: unimatrix-core EntryRecord, any schema evolution
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**Bad patterns:**
|
|
96
|
-
```
|
|
97
|
-
What: I used Arc::clone for shared ownership
|
|
98
|
-
Why: It works
|
|
99
|
-
```
|
|
100
|
-
(No gotcha. No consequence. This is just Rust basics.)
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## Tagging Conventions
|
|
105
|
-
|
|
106
|
-
| Tag type | Examples |
|
|
107
|
-
|----------|----------|
|
|
108
|
-
| Crate | `store`, `server`, `vector`, `core`, `embed`, `engine` |
|
|
109
|
-
| Domain | `async`, `serialization`, `migration`, `mcp`, `confidence` |
|
|
110
|
-
| Feature cycle | `vnc-009`, `crt-005` (for retro traceability) |
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Who Stores Patterns
|
|
115
|
-
|
|
116
|
-
| Agent | When |
|
|
117
|
-
|-------|------|
|
|
118
|
-
| uni-rust-dev | Implementation gotchas discovered while coding |
|
|
119
|
-
| uni-tester | Test infrastructure patterns, fixture usage discoveries |
|
|
120
|
-
| uni-risk-strategist | Risk patterns that recur across features |
|
|
121
|
-
| uni-researcher | Technical landscape patterns from problem space exploration |
|
|
122
|
-
| uni-vision-guardian | Recurring alignment variance patterns across features |
|
|
123
|
-
| uni-validator | Quality patterns (cross-feature, not gate-specific) |
|
|
124
|
-
| Retrospective agents | Patterns extracted from shipped feature analysis |
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "store-procedure"
|
|
3
|
-
description: "Store or update a technical procedure (how-to) in Unimatrix. Use during retrospectives when a technique has evolved or been discovered."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Store Procedure — Technical How-To Knowledge
|
|
7
|
-
|
|
8
|
-
## What This Skill Does
|
|
9
|
-
|
|
10
|
-
Stores a step-by-step technical procedure in Unimatrix. Procedures describe HOW to accomplish specific tasks in this project. They evolve as the project evolves.
|
|
11
|
-
|
|
12
|
-
**Use during retrospectives** — not while implementing. Procedures are extracted from evidence, not guessed mid-session.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Procedure vs Convention vs Pattern
|
|
17
|
-
|
|
18
|
-
| Type | What it is | Example |
|
|
19
|
-
|------|-----------|---------|
|
|
20
|
-
| **Procedure** | Ordered steps to accomplish a task | "How to add a new MCP tool: step 1, 2, 3..." |
|
|
21
|
-
| **Convention** | A rule or standard | "No .unwrap() in non-test code" |
|
|
22
|
-
| **Pattern** | A reusable solution to a recurring problem | "Fresh context for unbiased review" |
|
|
23
|
-
|
|
24
|
-
If it has **numbered steps**, it's a procedure. If it's a **rule**, it's a convention. If it's a **when/why/how solution**, it's a pattern.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## How to Store a New Procedure
|
|
29
|
-
|
|
30
|
-
### Step 1: Check for existing procedure
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
mcp__unimatrix__context_search(
|
|
34
|
-
query: "{what the procedure covers}",
|
|
35
|
-
category: "procedure",
|
|
36
|
-
k: 3
|
|
37
|
-
)
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
If an existing procedure covers the same task, use Step 2 (Update) instead.
|
|
41
|
-
|
|
42
|
-
### Step 2a: Store NEW procedure
|
|
43
|
-
|
|
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
|
-
)
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Step 2b: UPDATE existing procedure (supersedes old version)
|
|
56
|
-
|
|
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
|
-
)
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
This deprecates the old entry and creates a new one with a supersession chain. Agents querying later will get the latest version.
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Content Format
|
|
70
|
-
|
|
71
|
-
Procedures should be **concise and actionable** (200-500 chars):
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
How to add a new MCP tool:
|
|
75
|
-
1. Add validate_{tool}_params fn in validation.rs (pure, no I/O)
|
|
76
|
-
2. Add format_{tool}_success fn in response.rs (summary + markdown + json)
|
|
77
|
-
3. Add handler block in tools.rs match arm
|
|
78
|
-
4. Add AuditEvent variant in audit.rs
|
|
79
|
-
5. Add tool schema in server registration
|
|
80
|
-
6. Add integration test in product/test/infra-001/
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
NOT:
|
|
84
|
-
```
|
|
85
|
-
When you want to add a new MCP tool to the server, you should first consider
|
|
86
|
-
the validation requirements. The validation module in validation.rs contains
|
|
87
|
-
pure functions that validate input parameters...
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Tagging Conventions
|
|
93
|
-
|
|
94
|
-
| Tag type | Examples |
|
|
95
|
-
|----------|----------|
|
|
96
|
-
| Crate/area | `server`, `store`, `vector`, `core`, `embed` |
|
|
97
|
-
| Consuming roles | `rust-dev`, `pseudocode`, `architect` |
|
|
98
|
-
| Domain | `mcp-tool`, `schema`, `testing`, `integration` |
|
|
99
|
-
|
|
100
|
-
Always include at least one consuming-role tag so `/query-patterns` can filter by who needs it.
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## When to Store vs When to Skip
|
|
105
|
-
|
|
106
|
-
**Store when:**
|
|
107
|
-
- A multi-step technique was used across 2+ features
|
|
108
|
-
- An existing procedure was wrong and needed correction
|
|
109
|
-
- A developer had to figure out steps that should have been documented
|
|
110
|
-
|
|
111
|
-
**Skip when:**
|
|
112
|
-
- The technique was used once and may not recur
|
|
113
|
-
- The steps are obvious to any Rust developer (not project-specific)
|
|
114
|
-
- The procedure is workflow choreography (that stays in coordinator agent defs)
|