ruvnet-kb-first 6.2.0 → 6.4.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 +139 -6
- package/bin/kb-first.js +9 -6
- package/package.json +5 -5
- package/scripts/kb-ingest-template.js +548 -0
- package/scripts/kb-optimize.sql +250 -0
- package/scripts/kb-quality-audit.js +956 -0
- package/src/commands/dashboard.js +359 -0
- package/src/commands/init.js +138 -9
- package/src/commands/status.js +59 -5
package/SKILL.md
CHANGED
|
@@ -1,13 +1,145 @@
|
|
|
1
|
-
Updated: 2026-01-02
|
|
1
|
+
Updated: 2026-01-02 13:15:00 EST | Version 6.4.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.4
|
|
5
5
|
|
|
6
6
|
## Score-Driven Architecture: Scoring IS Enforcement + UX Excellence
|
|
7
7
|
|
|
8
|
-
**Version:** 6.
|
|
8
|
+
**Version:** 6.4.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.4.0 - KB Quality Pipeline
|
|
63
|
+
|
|
64
|
+
| Feature | Description |
|
|
65
|
+
|---------|-------------|
|
|
66
|
+
| **KB Ingestion Template** | 6-step process with SHA-256 deduplication, auto-categorization, quality scoring |
|
|
67
|
+
| **KB Quality Audit** | 7-dimension scoring: embeddings, deduplication, categories, structure, content, recall, indexes |
|
|
68
|
+
| **KB Optimization Script** | ruvector-native optimization with `cosine_distance()` and `semantic_search()` functions |
|
|
69
|
+
| **15 Auto-Categories** | Automatic categorization: agents, workflows, embeddings, memory, llm, mcp, swarms, etc. |
|
|
70
|
+
| **Quality Scoring 0-100** | Content length, formatting, completeness scoring per entry |
|
|
71
|
+
|
|
72
|
+
### KB Quality Pipeline
|
|
73
|
+
|
|
74
|
+
When creating ANY knowledge base, the following process is **ALWAYS** followed:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
1. INGEST → scripts/kb-ingest-template.js (SHA-256 dedup, 15 categories, quality 0-100)
|
|
78
|
+
2. AUDIT → scripts/kb-quality-audit.js (7-dimension scoring, grade A-F)
|
|
79
|
+
3. OPTIMIZE → scripts/kb-optimize.sql (indexes, views, semantic_search function)
|
|
80
|
+
4. VERIFY → Re-audit until score ≥ 85 (B+ or higher)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### KB Quality Dimensions (7 Total)
|
|
84
|
+
|
|
85
|
+
| Dimension | Weight | What It Measures |
|
|
86
|
+
|-----------|--------|------------------|
|
|
87
|
+
| Embedding Quality | 15% | Completeness, variance, dimensionality |
|
|
88
|
+
| Deduplication | 15% | Hash-based duplicate detection |
|
|
89
|
+
| Category Coverage | 15% | Balanced distribution across 15 categories |
|
|
90
|
+
| Structural Integrity | 15% | Hierarchy, relationships, navigation |
|
|
91
|
+
| Content Quality | 15% | Length, formatting, source attribution |
|
|
92
|
+
| Recall Performance | 15% | Semantic search returns relevant results |
|
|
93
|
+
| Index Optimization | 10% | Supporting indexes, materialized views |
|
|
94
|
+
|
|
95
|
+
### KB Ingestion Template
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Ingest content into optimized KB
|
|
99
|
+
node scripts/kb-ingest-template.js --schema your_project
|
|
100
|
+
|
|
101
|
+
# Features:
|
|
102
|
+
# - SHA-256 content hashing for deduplication
|
|
103
|
+
# - 15 category auto-classification
|
|
104
|
+
# - Quality scoring 0-100 per entry
|
|
105
|
+
# - ruvector_embed() for 384-dim embeddings
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### KB Quality Audit
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Score any existing KB
|
|
112
|
+
node scripts/kb-quality-audit.js --schema ask_ruvnet
|
|
113
|
+
|
|
114
|
+
# Output: Grade (A-F), 7-dimension breakdown, specific fixes
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### KB Optimization
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Run optimization script (ruvector-native)
|
|
121
|
+
PGPASSWORD=guruKB2025 psql -h localhost -p 5435 -U postgres -f scripts/kb-optimize.sql
|
|
122
|
+
|
|
123
|
+
# Creates:
|
|
124
|
+
# - cosine_distance(real[], real[]) function
|
|
125
|
+
# - semantic_search(query, limit, max_distance) function
|
|
126
|
+
# - Optimized indexes and materialized views
|
|
127
|
+
# - ask_ruvnet.kb view for high-quality entries
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Semantic Search Usage
|
|
131
|
+
|
|
132
|
+
```sql
|
|
133
|
+
-- Simple semantic search
|
|
134
|
+
SELECT * FROM ask_ruvnet.semantic_search('how to create agents', 5);
|
|
135
|
+
|
|
136
|
+
-- Direct cosine distance
|
|
137
|
+
SELECT title, cosine_distance(embedding, ruvector_embed('query')::real[]) as dist
|
|
138
|
+
FROM ask_ruvnet.kb ORDER BY dist LIMIT 10;
|
|
139
|
+
|
|
140
|
+
-- Category-filtered search
|
|
141
|
+
SELECT * FROM ask_ruvnet.kb WHERE category = 'agents' LIMIT 10;
|
|
142
|
+
```
|
|
11
143
|
|
|
12
144
|
---
|
|
13
145
|
|
|
@@ -23,7 +155,7 @@ Created: 2026-01-01 15:00:00 EST
|
|
|
23
155
|
| **Critical Review Questions** | How good? How could it be better? Where falling down? What would excellent look like? |
|
|
24
156
|
| **Playwright Auto-Install** | Offers to install Playwright if not present |
|
|
25
157
|
|
|
26
|
-
### The
|
|
158
|
+
### The 7 MCP Tools (v6.3)
|
|
27
159
|
|
|
28
160
|
| Tool | Purpose | When to Use |
|
|
29
161
|
|------|---------|-------------|
|
|
@@ -32,7 +164,8 @@ Created: 2026-01-01 15:00:00 EST
|
|
|
32
164
|
| `kb_first_confirm` | User confirms readiness to proceed | Before execution |
|
|
33
165
|
| `kb_first_execute` | Execute plan phase by phase | After confirmation |
|
|
34
166
|
| `kb_first_verify` | Compare predicted vs actual, recursive until 98+ | After execution |
|
|
35
|
-
| `kb_first_ux_review` | Playwright-based visual quality audit |
|
|
167
|
+
| `kb_first_ux_review` | Playwright-based visual quality audit | For UX excellence |
|
|
168
|
+
| `kb_first_status` | **NEW** Check KB connection and tier status | Diagnostics |
|
|
36
169
|
|
|
37
170
|
### UX Quality Criteria (Scored in UX Review)
|
|
38
171
|
|
package/bin/kb-first.js
CHANGED
|
@@ -58,6 +58,9 @@ program
|
|
|
58
58
|
.option('-f, --force', 'Overwrite existing configuration')
|
|
59
59
|
.option('-t, --template <type>', 'Template type (basic, api, fullstack)', 'basic')
|
|
60
60
|
.option('--no-hooks', 'Skip hook installation')
|
|
61
|
+
.option('--kb <schema>', 'Connect to existing KB schema (e.g., ask_ruvnet)')
|
|
62
|
+
.option('--kb-host <host>', 'KB database host', 'localhost')
|
|
63
|
+
.option('--kb-port <port>', 'KB database port', '5435')
|
|
61
64
|
.action(initCommand);
|
|
62
65
|
|
|
63
66
|
// Score command
|
|
@@ -113,11 +116,11 @@ program
|
|
|
113
116
|
await startMCPServer(options);
|
|
114
117
|
});
|
|
115
118
|
|
|
116
|
-
//
|
|
117
|
-
program.parse();
|
|
118
|
-
|
|
119
|
-
// Show help if no command provided
|
|
119
|
+
// Show dashboard if no command provided (before parsing)
|
|
120
120
|
if (!process.argv.slice(2).length) {
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
const { dashboardCommand } = await import('../src/commands/dashboard.js');
|
|
122
|
+
await dashboardCommand();
|
|
123
|
+
} else {
|
|
124
|
+
// Parse arguments
|
|
125
|
+
program.parse();
|
|
123
126
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ruvnet-kb-first",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "RuvNet KB-First Application Builder - Build intelligent applications on expert knowledge",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -56,19 +56,19 @@
|
|
|
56
56
|
"glob": "^10.3.0",
|
|
57
57
|
"inquirer": "^9.2.0",
|
|
58
58
|
"ora": "^8.0.0",
|
|
59
|
-
"pg": "^8.
|
|
59
|
+
"pg": "^8.16.3",
|
|
60
60
|
"ruv-swarm": "^1.0.20",
|
|
61
61
|
"ruvector": "^0.1.82"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
+
"@types/jest": "^29.5.11",
|
|
64
65
|
"@types/node": "^20.10.0",
|
|
65
66
|
"@types/pg": "^8.10.9",
|
|
66
|
-
"typescript": "^5.3.0",
|
|
67
|
-
"eslint": "^8.55.0",
|
|
68
67
|
"@typescript-eslint/eslint-plugin": "^6.13.0",
|
|
69
68
|
"@typescript-eslint/parser": "^6.13.0",
|
|
69
|
+
"eslint": "^8.55.0",
|
|
70
70
|
"jest": "^29.7.0",
|
|
71
|
-
"
|
|
71
|
+
"typescript": "^5.3.0"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=18.0.0"
|