@dug-21/unimatrix 0.6.3 → 0.7.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dug-21/unimatrix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Unimatrix knowledge engine for multi-agent development",
|
|
5
5
|
"bin": {
|
|
6
6
|
"unimatrix": "bin/unimatrix.js"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"postinstall": "node postinstall.js"
|
|
10
10
|
},
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"@dug-21/unimatrix-linux-x64": "0.
|
|
13
|
-
"@dug-21/unimatrix-linux-arm64": "0.
|
|
12
|
+
"@dug-21/unimatrix-linux-x64": "0.7.0",
|
|
13
|
+
"@dug-21/unimatrix-linux-arm64": "0.7.0"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"bin/",
|
|
@@ -311,7 +311,13 @@ Task(subagent_type: "uni-validator",
|
|
|
311
311
|
- Integration smoke tests passed
|
|
312
312
|
- Any xfail markers added have corresponding GH Issues
|
|
313
313
|
- If bug was discovered by integration test, that test's xfail marker was removed
|
|
314
|
-
- Knowledge stewardship: investigator and rust-dev
|
|
314
|
+
- Knowledge stewardship: investigator, architect, and rust-dev phase comments each contain
|
|
315
|
+
a ## Knowledge Stewardship block with Queried/Stored/Declined entries
|
|
316
|
+
|
|
317
|
+
To verify Knowledge Stewardship:
|
|
318
|
+
Run: gh issue view {issue-number} --comments
|
|
319
|
+
Read all phase comments. Verify each of the three agents has a ## Knowledge Stewardship
|
|
320
|
+
block. Missing block = REWORKABLE FAIL. Present with no reason after "nothing novel" = WARN.
|
|
315
321
|
|
|
316
322
|
Bug report: {bug description}
|
|
317
323
|
Root cause diagnosis: {from approved diagnosis}
|
|
@@ -406,7 +412,7 @@ Human action required: Review PR and approve merge.
|
|
|
406
412
|
```
|
|
407
413
|
|
|
408
414
|
On human approval to merge, the Bugfix Manager:
|
|
409
|
-
1. Merges the PR with `gh pr merge --
|
|
415
|
+
1. Merges the PR with `gh pr merge --squash --delete-branch` (if human requests it) — squash preferred: one commit = one revert target if backout is needed
|
|
410
416
|
2. Closes the GH Issue with reference to the PR (if applicable)
|
|
411
417
|
|
|
412
418
|
---
|
|
@@ -539,9 +545,10 @@ Then use Unimatrix skills as applicable:
|
|
|
539
545
|
|
|
540
546
|
### Stewardship Compliance
|
|
541
547
|
|
|
542
|
-
The bugfix gate validator checks stewardship compliance for
|
|
543
|
-
- Investigator
|
|
544
|
-
-
|
|
548
|
+
The bugfix gate validator checks stewardship compliance for all three agents via `gh issue view --comments`:
|
|
549
|
+
- Investigator phase comment must include `## Knowledge Stewardship` with `Queried:` and `Stored:`/`Declined:` entries
|
|
550
|
+
- Architect phase comment must include `## Knowledge Stewardship` with `Queried:` and `Stored:`/`Declined:` entries
|
|
551
|
+
- Rust-dev phase comment must include `## Knowledge Stewardship` with `Queried:` and `Stored:`/`Declined:` entries
|
|
545
552
|
- Missing stewardship block = REWORKABLE FAIL
|
|
546
553
|
|
|
547
554
|
All phase outputs (diagnosis, fix summary, gate results, security review) are posted as **GH Issue comments** — never written to the filesystem.
|
|
@@ -42,6 +42,7 @@ Phase 4: Delivery
|
|
|
42
42
|
- Max 2 rework iterations per gate — protects context window
|
|
43
43
|
- Cargo output truncated to first error + summary line
|
|
44
44
|
- The three source documents (Architecture, Specification, Risk Strategy) are sacred — all work traces back to them
|
|
45
|
+
- **Artifact hierarchy**: Architecture, Specification, and Risk Strategy are the technical ground truth. The Implementation Brief is a coordination artifact — it routes and summarizes but does not override source documents. If the brief and a source document conflict, the source document is authoritative; resolve before Stage 3a begins.
|
|
45
46
|
|
|
46
47
|
---
|
|
47
48
|
|
|
@@ -281,11 +282,13 @@ Task(subagent_type: "uni-validator",
|
|
|
281
282
|
- Does implementation align with approved Architecture?
|
|
282
283
|
- Are component interfaces implemented as specified?
|
|
283
284
|
- Do test cases match component test plans?
|
|
285
|
+
- Do test cases cover risks from the Risk-Based Test Strategy?
|
|
284
286
|
- Does code compile? Are there stubs or placeholders?
|
|
285
287
|
|
|
286
288
|
Source documents:
|
|
287
289
|
- product/features/{id}/architecture/ARCHITECTURE.md
|
|
288
290
|
- product/features/{id}/specification/SPECIFICATION.md
|
|
291
|
+
- product/features/{id}/RISK-TEST-STRATEGY.md
|
|
289
292
|
- product/features/{id}/pseudocode/ (all files)
|
|
290
293
|
- product/features/{id}/test-plan/ (all files)
|
|
291
294
|
|
|
@@ -44,6 +44,7 @@ Each message batches ALL related operations of the same type:
|
|
|
44
44
|
- NO code changes. NO file edits outside `product/features/`
|
|
45
45
|
- NO launching delivery agents (uni-rust-dev, uni-pseudocode, uni-tester)
|
|
46
46
|
- Agents return: artifact paths + key decisions + open questions (NOT full file contents)
|
|
47
|
+
- **Artifact hierarchy**: Architecture, Specification, and Risk Strategy are the technical ground truth. The Implementation Brief is a coordination artifact derived from them — technical decisions live in source documents, the brief routes and summarizes.
|
|
47
48
|
|
|
48
49
|
### No Git Operations in Design
|
|
49
50
|
|
|
@@ -322,6 +323,10 @@ Open questions: {list or "none"}
|
|
|
322
323
|
Human action required: Review design artifacts. Then start Session 2 to deliver.
|
|
323
324
|
```
|
|
324
325
|
|
|
326
|
+
**Handling human-requested changes**: If the human requests changes after reviewing artifacts:
|
|
327
|
+
- **Technical changes** (architecture decisions, requirements, risk coverage) → update the relevant source document(s) first, then re-run the synthesizer to regenerate the Implementation Brief and Acceptance Map from the updated sources.
|
|
328
|
+
- **Coordination changes only** (wave ordering, component naming, delivery notes) → update the Implementation Brief directly.
|
|
329
|
+
|
|
325
330
|
**Session 1 ends here.** No branch, no commit, no PR — artifacts sit untracked in `product/features/{feature-id}/` until Session 2 picks them up.
|
|
326
331
|
|
|
327
332
|
---
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "unimatrix-init"
|
|
3
|
-
description: "Initialize Unimatrix in a repository: append knowledge block to CLAUDE.md and produce agent orientation recommendations."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /unimatrix-init — Repository Initialization
|
|
7
|
-
|
|
8
|
-
## Prerequisites
|
|
9
|
-
|
|
10
|
-
Before running this skill:
|
|
11
|
-
|
|
12
|
-
1. **Skill files installed**: Both `unimatrix-init/SKILL.md` and `unimatrix-seed/SKILL.md` must be present in `.claude/skills/` in the target repository.
|
|
13
|
-
2. **MCP server wired** (for `/unimatrix-seed`): The Unimatrix MCP server (`unimatrix-server`) must be running and configured in your Claude Code `settings.json`. This skill (`/unimatrix-init`) does not require MCP, but `/unimatrix-seed` does.
|
|
14
|
-
|
|
15
|
-
If you need to install the Unimatrix server or wire MCP, consult the installation documentation.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## What This Skill Does
|
|
20
|
-
|
|
21
|
-
Sets up Unimatrix awareness in a repository by:
|
|
22
|
-
1. Checking if Unimatrix is already initialized (idempotency guard)
|
|
23
|
-
2. Scanning agent definitions for orientation gaps (read-only)
|
|
24
|
-
3. Appending a self-contained Unimatrix knowledge block to CLAUDE.md
|
|
25
|
-
|
|
26
|
-
**This is different from the `uni-init` agent** (`.claude/agents/uni/uni-init.md`). The `uni-init` agent performs brownfield bootstrap — it extracts knowledge from existing `.claude/agents/` and `.claude/protocols/` files into Unimatrix entries. Use `/unimatrix-init` for new repository setup (CLAUDE.md + recommendations). Use the `uni-init` agent when you already have agent definitions and want to populate Unimatrix from them.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Arguments
|
|
31
|
-
|
|
32
|
-
- **No arguments**: Run the full initialization (sentinel check, agent scan, CLAUDE.md append).
|
|
33
|
-
- **`--dry-run`**: Print what would happen without modifying any files.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Execution Steps
|
|
38
|
-
|
|
39
|
-
Follow these phases in strict order. Do not skip or reorder.
|
|
40
|
-
|
|
41
|
-
### Phase 1: Pre-flight — Idempotency Check
|
|
42
|
-
|
|
43
|
-
**Check for `--dry-run` argument first.** If the user invoked `/unimatrix-init --dry-run`, set dry-run mode. In dry-run mode, no files will be created or modified — only terminal output.
|
|
44
|
-
|
|
45
|
-
1. Check if `CLAUDE.md` exists in the repository root.
|
|
46
|
-
|
|
47
|
-
2. **If CLAUDE.md exists**, read the entire file and search for this exact sentinel string:
|
|
48
|
-
```
|
|
49
|
-
<!-- unimatrix-init v1: DO NOT REMOVE THIS LINE -->
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
3. **Head-check fallback for large files**: If `CLAUDE.md` has more than 200 lines, also explicitly read the last 30 lines of the file and check for the sentinel there. This catches cases where the sentinel is at the end of a large file.
|
|
53
|
-
|
|
54
|
-
4. **If the sentinel is found** (in either check): Print the following and stop immediately. Do not proceed to Phase 2 or Phase 3.
|
|
55
|
-
```
|
|
56
|
-
Already initialized. Unimatrix block found in CLAUDE.md.
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
5. **If CLAUDE.md does not exist**: Note this — CLAUDE.md will be created in Phase 3. Continue to Phase 2.
|
|
60
|
-
|
|
61
|
-
6. **If CLAUDE.md exists but sentinel is not found**: Continue to Phase 2.
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
### Phase 2: Agent Scan (Read-Only)
|
|
66
|
-
|
|
67
|
-
This phase produces a terminal-only recommendation report. **Do not write any files. Do not modify any agent files.**
|
|
68
|
-
|
|
69
|
-
1. Glob for agent definition files: `.claude/agents/**/*.md`
|
|
70
|
-
|
|
71
|
-
2. **If no agent files are found**: Print the following and continue to Phase 3.
|
|
72
|
-
```
|
|
73
|
-
No agent files found at .claude/agents/. Skipping agent scan.
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
3. **For each agent file found**, read its content and check for the presence of these three patterns:
|
|
77
|
-
|
|
78
|
-
- **context_briefing**: Does the file contain `context_briefing`? (This indicates the agent calls the Unimatrix briefing tool at session start.)
|
|
79
|
-
- **Outcome reporting**: Does the file contain `/record-outcome` or reference `context_store` with `category: "outcome"`? (This indicates the agent records session outcomes.)
|
|
80
|
-
- **unimatrix-\* skill reference**: Does the file contain any reference to `unimatrix-` prefixed skills (e.g., `/unimatrix-init`, `/unimatrix-seed`)?
|
|
81
|
-
|
|
82
|
-
4. **Print the Agent Orientation Report** to the terminal:
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
Agent Orientation Report
|
|
86
|
-
========================
|
|
87
|
-
Agent | Missing | Suggested Addition
|
|
88
|
-
-------------------------------|----------------------------------|------------------------------------------
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
For each agent file, print a row:
|
|
92
|
-
- **Agent**: the filename (without path prefix)
|
|
93
|
-
- **Missing**: which of the three patterns are absent
|
|
94
|
-
- **Suggested Addition**: concrete, skill-level recommendation. Examples:
|
|
95
|
-
- Missing context_briefing: "Add orientation section: call context_briefing at session start for relevant knowledge"
|
|
96
|
-
- Missing outcome reporting: "Add session end: invoke /record-outcome to capture what was learned"
|
|
97
|
-
- Missing unimatrix-* skills: "Reference /unimatrix-init and /unimatrix-seed for onboarding new repos"
|
|
98
|
-
- All present: "fully wired" / "none"
|
|
99
|
-
|
|
100
|
-
5. **If all agents have all three patterns**: Print after the table:
|
|
101
|
-
```
|
|
102
|
-
All agents fully wired.
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
### Phase 3: CLAUDE.md Append
|
|
108
|
-
|
|
109
|
-
**If in dry-run mode**: Print the following, then print the full Unimatrix block content below, and stop. Do not create or modify any files.
|
|
110
|
-
```
|
|
111
|
-
DRY RUN -- the following block would be appended to CLAUDE.md:
|
|
112
|
-
```
|
|
113
|
-
Print the block, then:
|
|
114
|
-
```
|
|
115
|
-
No files were modified.
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**If NOT in dry-run mode**:
|
|
119
|
-
|
|
120
|
-
The exact block to append is:
|
|
121
|
-
|
|
122
|
-
```markdown
|
|
123
|
-
|
|
124
|
-
<!-- unimatrix-init v1: DO NOT REMOVE THIS LINE -->
|
|
125
|
-
## Unimatrix
|
|
126
|
-
|
|
127
|
-
Knowledge engine (MCP server). Makes agent expertise searchable, trustworthy, and self-improving.
|
|
128
|
-
|
|
129
|
-
### Available Skills
|
|
130
|
-
|
|
131
|
-
| Skill | When to Use |
|
|
132
|
-
|-------|-------------|
|
|
133
|
-
| `/unimatrix-init` | First-time setup: wire CLAUDE.md and get agent recommendations |
|
|
134
|
-
| `/unimatrix-seed` | Populate Unimatrix with foundational repo knowledge |
|
|
135
|
-
|
|
136
|
-
### Knowledge Categories
|
|
137
|
-
|
|
138
|
-
| Category | What Goes Here |
|
|
139
|
-
|----------|---------------|
|
|
140
|
-
| `decision` | Architectural decisions (ADRs) — use `/store-adr` |
|
|
141
|
-
| `pattern` | Reusable implementation patterns — use `/store-pattern` |
|
|
142
|
-
| `procedure` | Step-by-step workflows — use `/store-procedure` |
|
|
143
|
-
| `convention` | Project-wide coding/process standards |
|
|
144
|
-
| `lesson-learned` | Post-failure takeaways — use `/store-lesson` |
|
|
145
|
-
|
|
146
|
-
### When to Invoke
|
|
147
|
-
|
|
148
|
-
- Before implementing anything new → search knowledge base
|
|
149
|
-
- After each architectural decision → store ADR
|
|
150
|
-
- After each shipped feature → run retrospective
|
|
151
|
-
- When a technique evolves → update procedure
|
|
152
|
-
<!-- end unimatrix-init v1 -->
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**If CLAUDE.md exists**: Append the block to the end of the existing file. Use Edit/append semantics — do NOT overwrite the file. Preserve all existing content. Add a blank line before the block if the file does not already end with a blank line.
|
|
156
|
-
|
|
157
|
-
**If CLAUDE.md does not exist**: Create CLAUDE.md with the block as its only content (without the leading blank line).
|
|
158
|
-
|
|
159
|
-
After writing, confirm:
|
|
160
|
-
```
|
|
161
|
-
Unimatrix block appended to CLAUDE.md.
|
|
162
|
-
```
|
|
163
|
-
Or if created:
|
|
164
|
-
```
|
|
165
|
-
Created CLAUDE.md with Unimatrix block.
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Finally, print:
|
|
169
|
-
```
|
|
170
|
-
Initialization complete. Run /unimatrix-seed next to populate the knowledge base.
|
|
171
|
-
```
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "unimatrix-seed"
|
|
3
|
-
description: "Populate Unimatrix with foundational repository knowledge through human-directed, gated exploration."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /unimatrix-seed — Knowledge Base Seeding
|
|
7
|
-
|
|
8
|
-
## Prerequisites
|
|
9
|
-
|
|
10
|
-
Before running this skill:
|
|
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.
|
|
13
|
-
2. **Recommended**: Run `/unimatrix-init` first to set up the CLAUDE.md knowledge block. Seeding works without it, but the CLAUDE.md block provides ongoing awareness.
|
|
14
|
-
|
|
15
|
-
If `context_status` fails at startup, the MCP server is not available. Consult the installation documentation for wiring setup.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## What This Skill Does
|
|
20
|
-
|
|
21
|
-
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
|
-
|
|
23
|
-
**Depth limit**: Level 0 (automatic) + up to 2 opt-in levels. No deeper. You control how far to go.
|
|
24
|
-
|
|
25
|
-
**Categories used**: Only `convention`, `pattern`, and `procedure`. Categories like `decision`, `outcome`, and `lesson-learned` are excluded from seeding — they emerge from real feature work, not initial exploration.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Entry Quality Rules
|
|
30
|
-
|
|
31
|
-
Every proposed entry must pass this quality gate before being shown to you. Entries that fail are silently discarded — you only see quality entries.
|
|
32
|
-
|
|
33
|
-
| Field | Rule |
|
|
34
|
-
|-------|------|
|
|
35
|
-
| **What** | One sentence, max 200 characters. Describes the knowledge. |
|
|
36
|
-
| **Why** | Min 10 characters. Explains the consequence or motivation — what goes wrong without this knowledge. Must not be tautological (restating "what" without adding value). |
|
|
37
|
-
| **Scope** | Where this applies — component, module, or workflow context. Must be present. |
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Execution Steps
|
|
42
|
-
|
|
43
|
-
Follow these steps in strict order. At every gate marked with **STOP**, halt and wait for the human to respond before proceeding. Do not auto-advance.
|
|
44
|
-
|
|
45
|
-
### Step 1: Pre-flight — MCP Availability Check
|
|
46
|
-
|
|
47
|
-
**This must be the very first action. Do not read any files before this step.**
|
|
48
|
-
|
|
49
|
-
Call `context_status()`.
|
|
50
|
-
|
|
51
|
-
- **If the call fails or returns an error**: Print the following and halt immediately. Do not proceed to any further steps.
|
|
52
|
-
```
|
|
53
|
-
Unimatrix MCP is not available.
|
|
54
|
-
Ensure unimatrix-server is running and wired in your Claude settings.json.
|
|
55
|
-
See installation documentation for setup instructions.
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
- **If the response is healthy** (no error indicators, returns system status): Continue to Step 2.
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
### Step 2: Existing-Entries Check
|
|
63
|
-
|
|
64
|
-
Check whether seed entries already exist to avoid near-duplicates.
|
|
65
|
-
|
|
66
|
-
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)`
|
|
70
|
-
|
|
71
|
-
Count the total results across all three searches.
|
|
72
|
-
|
|
73
|
-
**If 3 or more entries found**:
|
|
74
|
-
|
|
75
|
-
Print:
|
|
76
|
-
```
|
|
77
|
-
Found {count} existing entries in seeding categories (convention/pattern/procedure).
|
|
78
|
-
Re-seeding may create near-duplicates. You can save tokens by skipping if the knowledge base already has a good foundation.
|
|
79
|
-
|
|
80
|
-
Options:
|
|
81
|
-
supplement — continue and add new knowledge alongside existing entries
|
|
82
|
-
skip — exit without changes
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**STOP. Wait for human response before proceeding.**
|
|
86
|
-
|
|
87
|
-
- If the human says **skip**: Print "No changes made." and halt.
|
|
88
|
-
- If the human says **supplement**: Continue to Step 3.
|
|
89
|
-
|
|
90
|
-
**If fewer than 3 entries found**: Continue to Step 3 (clean first run).
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
### Step 3: Level 0 — Automatic Foundational Exploration
|
|
95
|
-
|
|
96
|
-
Read the following files without requiring human confirmation. Skip any that do not exist:
|
|
97
|
-
|
|
98
|
-
- `README.md`
|
|
99
|
-
- `CLAUDE.md`
|
|
100
|
-
- `Cargo.toml` (Rust)
|
|
101
|
-
- `package.json` (Node.js)
|
|
102
|
-
- `pyproject.toml` (Python)
|
|
103
|
-
- `go.mod` (Go)
|
|
104
|
-
- List the `.claude/` directory structure (if present) — directory listing only, not deep file reads
|
|
105
|
-
|
|
106
|
-
From what you read, generate 2 to 4 high-level foundational entries. Typical entries cover:
|
|
107
|
-
|
|
108
|
-
- **Repository purpose**: What this project does and why it exists
|
|
109
|
-
- **Technology stack**: Primary language, framework, key dependencies
|
|
110
|
-
- **Project structure**: How the codebase is organized (monorepo, workspace, key directories)
|
|
111
|
-
- **Key conventions**: Any obvious conventions visible in top-level config (naming, formatting, etc.)
|
|
112
|
-
|
|
113
|
-
Apply the quality gate (What/Why/Scope) to each candidate. Silently discard any that fail. If fewer than 2 entries pass the gate, include only what passes — do not pad with low-quality entries.
|
|
114
|
-
|
|
115
|
-
If 0 entries pass the quality gate:
|
|
116
|
-
```
|
|
117
|
-
Could not generate quality entries from available files. Consider adding a README.md with project context, then re-run /unimatrix-seed.
|
|
118
|
-
```
|
|
119
|
-
Skip to the Done summary.
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
### Step 4: Gate 0 — Batch Approval
|
|
124
|
-
|
|
125
|
-
Present all Level 0 entries as a batch:
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
Level 0 — Foundational Knowledge
|
|
129
|
-
=================================
|
|
130
|
-
Proposed entries (approve or reject as a batch):
|
|
131
|
-
|
|
132
|
-
1. [convention] {what}
|
|
133
|
-
Why: {why}
|
|
134
|
-
Scope: {scope}
|
|
135
|
-
|
|
136
|
-
2. [pattern] {what}
|
|
137
|
-
Why: {why}
|
|
138
|
-
Scope: {scope}
|
|
139
|
-
|
|
140
|
-
...
|
|
141
|
-
|
|
142
|
-
Approve all entries? (approve / reject)
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**STOP. Wait for human response before proceeding.**
|
|
146
|
-
|
|
147
|
-
- **If approved**: Store each entry via `context_store`:
|
|
148
|
-
```
|
|
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: "unimatrix-seed"
|
|
156
|
-
)
|
|
157
|
-
```
|
|
158
|
-
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
|
-
|
|
160
|
-
Print: "Stored {count} entries."
|
|
161
|
-
|
|
162
|
-
- **If rejected**: Print "0 entries stored. Re-invoke /unimatrix-seed with more specific guidance if needed." and skip to the Done summary.
|
|
163
|
-
|
|
164
|
-
After storing (or rejecting), present the Level 1 exploration menu:
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
Would you like to explore deeper? Options:
|
|
168
|
-
a) Module structure — explore source directories and key modules
|
|
169
|
-
b) Conventions — look for coding standards, linting, formatting config
|
|
170
|
-
c) Build & test — explore build system, test framework, CI config
|
|
171
|
-
d) Done — stop here
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**STOP. Wait for human response before proceeding.**
|
|
175
|
-
|
|
176
|
-
- If the human selects one or more options (a, b, c, or combinations): Continue to Step 5 with those selections.
|
|
177
|
-
- If the human selects **d (Done)**: Skip to the Done summary.
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
### Step 5: Level 1 — Category Exploration (Opt-in)
|
|
182
|
-
|
|
183
|
-
For each category the human selected, explore relevant files:
|
|
184
|
-
|
|
185
|
-
- **Module structure**: Read `src/` or `lib/` directory listings, key module entry points, workspace member crates
|
|
186
|
-
- **Conventions**: Read `.editorconfig`, `.eslintrc`, `rustfmt.toml`, `.clippy.toml`, `.prettierrc`, similar config files
|
|
187
|
-
- **Build & test**: Read CI config (`.github/workflows/`, `Makefile`, `justfile`), test directory structure, build scripts
|
|
188
|
-
|
|
189
|
-
For each entry generated from exploration, apply the quality gate. For entries that pass, present them **individually** (not as a batch):
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
Proposed entry:
|
|
193
|
-
[{category}] {what}
|
|
194
|
-
Why: {why}
|
|
195
|
-
Scope: {scope}
|
|
196
|
-
|
|
197
|
-
Store this entry? (yes / no)
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
**STOP. Wait for human response before proceeding.**
|
|
201
|
-
|
|
202
|
-
- **yes**: Store via `context_store` with tags `["seed", "level-1"]`. Report success or failure.
|
|
203
|
-
- **no**: Skip this entry.
|
|
204
|
-
|
|
205
|
-
Continue until all Level 1 entries have been presented.
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
### Step 6: Gate 1 — Level 2 Decision
|
|
210
|
-
|
|
211
|
-
```
|
|
212
|
-
Level 1 complete. Stored {count} new entries.
|
|
213
|
-
|
|
214
|
-
Level 2 is the final exploration level. Would you like to go deeper into any area?
|
|
215
|
-
a) {list deeper explorations based on Level 1 selections — e.g., "specific module internals", "test patterns", "CI pipeline details"}
|
|
216
|
-
b) Done — stop here
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
**STOP. Wait for human response before proceeding.**
|
|
220
|
-
|
|
221
|
-
- If the human selects a deeper exploration: Continue to Step 7.
|
|
222
|
-
- If the human selects **Done**: Skip to the Done summary.
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
### Step 7: Level 2 — Deep Exploration (Final Level)
|
|
227
|
-
|
|
228
|
-
Explore the selected areas in greater depth. Read specific files within the directories explored at Level 1.
|
|
229
|
-
|
|
230
|
-
For each entry generated, apply the quality gate and present individually (same as Level 1):
|
|
231
|
-
|
|
232
|
-
```
|
|
233
|
-
Proposed entry:
|
|
234
|
-
[{category}] {what}
|
|
235
|
-
Why: {why}
|
|
236
|
-
Scope: {scope}
|
|
237
|
-
|
|
238
|
-
Store this entry? (yes / no)
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
**STOP. Wait for human response before proceeding.**
|
|
242
|
-
|
|
243
|
-
Store approved entries with tags `["seed", "level-2"]`.
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
### Step 8: Gate 2 — Terminal
|
|
248
|
-
|
|
249
|
-
After Level 2 entries are processed:
|
|
250
|
-
|
|
251
|
-
```
|
|
252
|
-
Level 2 complete. This is the final exploration level. No further levels are available.
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
Proceed directly to the Done summary. **Do not offer a Level 3 option. Level 2 is the terminal level.**
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
### Done Summary
|
|
260
|
-
|
|
261
|
-
```
|
|
262
|
-
Seed Summary
|
|
263
|
-
============
|
|
264
|
-
Total entries stored: {total}
|
|
265
|
-
Level 0: {l0_count}
|
|
266
|
-
Level 1: {l1_count}
|
|
267
|
-
Level 2: {l2_count}
|
|
268
|
-
|
|
269
|
-
Knowledge base is ready. Future context_briefing calls will return these entries
|
|
270
|
-
to agents working in this repository.
|
|
271
|
-
```
|