ruvnet-kb-first 6.3.0 → 6.5.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/README.md +318 -533
- package/SKILL.md +222 -6
- package/kb-data/kb-embeddings.bin +0 -0
- package/kb-data/kb-entries.json +1 -0
- package/kb-data/kb-loader.js +238 -0
- package/kb-data/kb-metadata.json +71 -0
- package/package.json +3 -1
- package/scripts/kb-export-wasm.js +472 -0
- package/scripts/kb-ingest-template.js +548 -0
- package/scripts/kb-optimize.sql +250 -0
- package/scripts/kb-quality-audit.js +956 -0
package/SKILL.md
CHANGED
|
@@ -1,13 +1,228 @@
|
|
|
1
|
-
Updated: 2026-01-02
|
|
1
|
+
Updated: 2026-01-02 13:45:00 EST | Version 6.5.0
|
|
2
2
|
Created: 2026-01-01 15:00:00 EST
|
|
3
3
|
|
|
4
|
-
# RuvNet KB-First Application Builder v6.
|
|
4
|
+
# RuvNet KB-First Application Builder v6.5
|
|
5
5
|
|
|
6
6
|
## Score-Driven Architecture: Scoring IS Enforcement + UX Excellence
|
|
7
7
|
|
|
8
|
-
**Version:** 6.
|
|
8
|
+
**Version:** 6.5.0
|
|
9
9
|
**NPM Package:** `ruvnet-kb-first`
|
|
10
|
-
**Philosophy:** Every operation requires baseline scoring. Every change shows delta. Negative delta BLOCKS progress. No shortcuts.
|
|
10
|
+
**Philosophy:** Every operation requires baseline scoring. Every change shows delta. Negative delta BLOCKS progress. No shortcuts. Applications must be excellent, not just functional.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## What's New in v6.3.0 - Three-Tier KB Architecture
|
|
15
|
+
|
|
16
|
+
| Feature | Description |
|
|
17
|
+
|---------|-------------|
|
|
18
|
+
| **Three-Tier KB System** | Full (230K+) → Starter (500) → Structural fallback |
|
|
19
|
+
| **Unified Dashboard** | `npx ruvnet-kb-first` shows comprehensive project status |
|
|
20
|
+
| **KB Auto-Detection** | Automatically finds and connects to available KB |
|
|
21
|
+
| **Graceful Degradation** | Works without KB, with increasing capability as KB added |
|
|
22
|
+
| **`--kb` Connection Flag** | Connect to existing KB schemas (e.g., `--kb ask_ruvnet`) |
|
|
23
|
+
| **Live KB Stats** | Dashboard shows real-time entry count and connection status |
|
|
24
|
+
| **npx-First Distribution** | Always use `npx ruvnet-kb-first@latest` - no global installs |
|
|
25
|
+
|
|
26
|
+
### KB Tier System
|
|
27
|
+
|
|
28
|
+
| Tier | Description | Entries | Features |
|
|
29
|
+
|------|-------------|---------|----------|
|
|
30
|
+
| **Tier 1: Full KB** | ruvector-postgres on port 5435 | 230K+ | Semantic search, KB citations, gap detection |
|
|
31
|
+
| **Tier 2: Starter KB** | Bundled in .ruvector/ | 500 | Basic semantic search, core patterns |
|
|
32
|
+
| **Tier 3: Structural** | No KB required | 0 | Directory scoring, phase tracking, setup wizard |
|
|
33
|
+
|
|
34
|
+
### Quick Start (v6.3)
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Run from any project directory
|
|
38
|
+
npx ruvnet-kb-first@latest
|
|
39
|
+
|
|
40
|
+
# Connect to existing KB
|
|
41
|
+
npx ruvnet-kb-first init --kb ask_ruvnet
|
|
42
|
+
|
|
43
|
+
# Check status
|
|
44
|
+
npx ruvnet-kb-first status
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### MCP Server Configuration
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"ruvnet-kb-first": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["ruvnet-kb-first@latest", "mcp"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## What's New in v6.5.0 - Embedded WASM KB
|
|
63
|
+
|
|
64
|
+
| Feature | Description |
|
|
65
|
+
|---------|-------------|
|
|
66
|
+
| **Embedded KB** | 16,575 entries bundled in npm package (~10MB) |
|
|
67
|
+
| **WASM Search** | 15-30ms queries via RvLite (vs 6.7s PostgreSQL brute-force) |
|
|
68
|
+
| **Offline Capable** | Works without database connection |
|
|
69
|
+
| **Cross-Platform** | Windows, Mac, Linux, CI/CD pipelines |
|
|
70
|
+
| **Auto-Update Detection** | Checks PostgreSQL hash, notifies of updates |
|
|
71
|
+
| **Binary Quantization** | 32x compression (384 floats → 48 bytes per vector) |
|
|
72
|
+
|
|
73
|
+
### WASM KB Architecture
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
77
|
+
│ NPM PACKAGE (~22MB) │
|
|
78
|
+
├─────────────────────────────────────────────────────────────┤
|
|
79
|
+
│ kb-data/ │
|
|
80
|
+
│ ├── kb-metadata.json (1KB) Version, hash, categories │
|
|
81
|
+
│ ├── kb-entries.json (9MB) Titles, content, metadata │
|
|
82
|
+
│ ├── kb-embeddings.bin (0.8MB) Binary quantized vectors │
|
|
83
|
+
│ └── kb-loader.js (6KB) WASM loader + search API │
|
|
84
|
+
├─────────────────────────────────────────────────────────────┤
|
|
85
|
+
│ @ruvector/edge-full (1.3MB) RvLite WASM runtime │
|
|
86
|
+
└─────────────────────────────────────────────────────────────┘
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Performance Comparison
|
|
90
|
+
|
|
91
|
+
| Metric | PostgreSQL | WASM Embedded |
|
|
92
|
+
|--------|------------|---------------|
|
|
93
|
+
| Query latency | 6,700ms | **15-30ms** |
|
|
94
|
+
| Infrastructure | Docker + 2GB RAM | **None** |
|
|
95
|
+
| Offline | No | **Yes** |
|
|
96
|
+
| CI/CD ready | Complex | **Just works** |
|
|
97
|
+
| Package size | 160KB | 22MB |
|
|
98
|
+
| Recall quality | 100% | ~90% |
|
|
99
|
+
|
|
100
|
+
### Usage
|
|
101
|
+
|
|
102
|
+
```javascript
|
|
103
|
+
// Import from npm package
|
|
104
|
+
import { search, loadKB, checkForUpdates } from 'ruvnet-kb-first/kb-data/kb-loader.js';
|
|
105
|
+
|
|
106
|
+
// Load KB (once per session)
|
|
107
|
+
await loadKB();
|
|
108
|
+
|
|
109
|
+
// Search (15-30ms)
|
|
110
|
+
const results = await search('how to create agents', 5);
|
|
111
|
+
console.log(results.results);
|
|
112
|
+
|
|
113
|
+
// Check for PostgreSQL updates
|
|
114
|
+
const status = await checkForUpdates();
|
|
115
|
+
if (status.needsUpdate) {
|
|
116
|
+
console.log('Update available:', status.message);
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Auto-Update Workflow
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
1. npx ruvnet-kb-first (loads embedded WASM KB)
|
|
124
|
+
2. Checks PostgreSQL hash (if available)
|
|
125
|
+
3. If hash differs → notifies user
|
|
126
|
+
4. User runs: npm update ruvnet-kb-first
|
|
127
|
+
5. Gets new KB version
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### KB Export Command
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Re-export KB when PostgreSQL is updated
|
|
134
|
+
node scripts/kb-export-wasm.js --schema ask_ruvnet --output kb-data/
|
|
135
|
+
|
|
136
|
+
# This generates:
|
|
137
|
+
# - kb-metadata.json (with new content hash)
|
|
138
|
+
# - kb-entries.json (titles, content, categories)
|
|
139
|
+
# - kb-embeddings.bin (binary quantized vectors)
|
|
140
|
+
# - kb-loader.js (WASM loader)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## What's New in v6.4.0 - KB Quality Pipeline
|
|
146
|
+
|
|
147
|
+
| Feature | Description |
|
|
148
|
+
|---------|-------------|
|
|
149
|
+
| **KB Ingestion Template** | 6-step process with SHA-256 deduplication, auto-categorization, quality scoring |
|
|
150
|
+
| **KB Quality Audit** | 7-dimension scoring: embeddings, deduplication, categories, structure, content, recall, indexes |
|
|
151
|
+
| **KB Optimization Script** | ruvector-native optimization with `cosine_distance()` and `semantic_search()` functions |
|
|
152
|
+
| **15 Auto-Categories** | Automatic categorization: agents, workflows, embeddings, memory, llm, mcp, swarms, etc. |
|
|
153
|
+
| **Quality Scoring 0-100** | Content length, formatting, completeness scoring per entry |
|
|
154
|
+
|
|
155
|
+
### KB Quality Pipeline
|
|
156
|
+
|
|
157
|
+
When creating ANY knowledge base, the following process is **ALWAYS** followed:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
1. INGEST → scripts/kb-ingest-template.js (SHA-256 dedup, 15 categories, quality 0-100)
|
|
161
|
+
2. AUDIT → scripts/kb-quality-audit.js (7-dimension scoring, grade A-F)
|
|
162
|
+
3. OPTIMIZE → scripts/kb-optimize.sql (indexes, views, semantic_search function)
|
|
163
|
+
4. VERIFY → Re-audit until score ≥ 85 (B+ or higher)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### KB Quality Dimensions (7 Total)
|
|
167
|
+
|
|
168
|
+
| Dimension | Weight | What It Measures |
|
|
169
|
+
|-----------|--------|------------------|
|
|
170
|
+
| Embedding Quality | 15% | Completeness, variance, dimensionality |
|
|
171
|
+
| Deduplication | 15% | Hash-based duplicate detection |
|
|
172
|
+
| Category Coverage | 15% | Balanced distribution across 15 categories |
|
|
173
|
+
| Structural Integrity | 15% | Hierarchy, relationships, navigation |
|
|
174
|
+
| Content Quality | 15% | Length, formatting, source attribution |
|
|
175
|
+
| Recall Performance | 15% | Semantic search returns relevant results |
|
|
176
|
+
| Index Optimization | 10% | Supporting indexes, materialized views |
|
|
177
|
+
|
|
178
|
+
### KB Ingestion Template
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Ingest content into optimized KB
|
|
182
|
+
node scripts/kb-ingest-template.js --schema your_project
|
|
183
|
+
|
|
184
|
+
# Features:
|
|
185
|
+
# - SHA-256 content hashing for deduplication
|
|
186
|
+
# - 15 category auto-classification
|
|
187
|
+
# - Quality scoring 0-100 per entry
|
|
188
|
+
# - ruvector_embed() for 384-dim embeddings
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### KB Quality Audit
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# Score any existing KB
|
|
195
|
+
node scripts/kb-quality-audit.js --schema ask_ruvnet
|
|
196
|
+
|
|
197
|
+
# Output: Grade (A-F), 7-dimension breakdown, specific fixes
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### KB Optimization
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Run optimization script (ruvector-native)
|
|
204
|
+
PGPASSWORD=guruKB2025 psql -h localhost -p 5435 -U postgres -f scripts/kb-optimize.sql
|
|
205
|
+
|
|
206
|
+
# Creates:
|
|
207
|
+
# - cosine_distance(real[], real[]) function
|
|
208
|
+
# - semantic_search(query, limit, max_distance) function
|
|
209
|
+
# - Optimized indexes and materialized views
|
|
210
|
+
# - ask_ruvnet.kb view for high-quality entries
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Semantic Search Usage
|
|
214
|
+
|
|
215
|
+
```sql
|
|
216
|
+
-- Simple semantic search
|
|
217
|
+
SELECT * FROM ask_ruvnet.semantic_search('how to create agents', 5);
|
|
218
|
+
|
|
219
|
+
-- Direct cosine distance
|
|
220
|
+
SELECT title, cosine_distance(embedding, ruvector_embed('query')::real[]) as dist
|
|
221
|
+
FROM ask_ruvnet.kb ORDER BY dist LIMIT 10;
|
|
222
|
+
|
|
223
|
+
-- Category-filtered search
|
|
224
|
+
SELECT * FROM ask_ruvnet.kb WHERE category = 'agents' LIMIT 10;
|
|
225
|
+
```
|
|
11
226
|
|
|
12
227
|
---
|
|
13
228
|
|
|
@@ -23,7 +238,7 @@ Created: 2026-01-01 15:00:00 EST
|
|
|
23
238
|
| **Critical Review Questions** | How good? How could it be better? Where falling down? What would excellent look like? |
|
|
24
239
|
| **Playwright Auto-Install** | Offers to install Playwright if not present |
|
|
25
240
|
|
|
26
|
-
### The
|
|
241
|
+
### The 7 MCP Tools (v6.3)
|
|
27
242
|
|
|
28
243
|
| Tool | Purpose | When to Use |
|
|
29
244
|
|------|---------|-------------|
|
|
@@ -32,7 +247,8 @@ Created: 2026-01-01 15:00:00 EST
|
|
|
32
247
|
| `kb_first_confirm` | User confirms readiness to proceed | Before execution |
|
|
33
248
|
| `kb_first_execute` | Execute plan phase by phase | After confirmation |
|
|
34
249
|
| `kb_first_verify` | Compare predicted vs actual, recursive until 98+ | After execution |
|
|
35
|
-
| `kb_first_ux_review` | Playwright-based visual quality audit |
|
|
250
|
+
| `kb_first_ux_review` | Playwright-based visual quality audit | For UX excellence |
|
|
251
|
+
| `kb_first_status` | **NEW** Check KB connection and tier status | Diagnostics |
|
|
36
252
|
|
|
37
253
|
### UX Quality Criteria (Scored in UX Review)
|
|
38
254
|
|
|
Binary file
|