claude-flow-novice 2.18.17 → 2.18.19

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.
@@ -1,37 +1,33 @@
1
1
  ---
2
- description: Update codebase index using git-detected changes (auto mode, incremental)
2
+ description: Update codebase index (default incremental, --force for full rebuild)
3
3
  ---
4
4
 
5
5
  # Codebase Reindex Command
6
6
 
7
- **Default mode: Auto-detection** - Indexes only changed files detected from git status (fast, incremental).
7
+ **Default mode:** Incremental - only re-indexes files with changed hashes (fast).
8
8
 
9
9
  **Use when:**
10
- - After committing code changes (recommended workflow)
11
- - Regular updates after development work
12
- - Need to refresh index for recently modified files
10
+ - After code changes
11
+ - Regular development workflow
12
+ - Need to refresh index
13
13
 
14
- **Process (--auto mode):**
15
- 1. Detects staged and modified files via `git diff`
16
- 2. Filters for indexable extensions (TypeScript, Python, etc.)
17
- 3. Incrementally updates RuVector database
18
- 4. Only re-indexes changed files
14
+ **For full rebuild:**
15
+ Add `--force` flag for complete reindex:
16
+ - First-time setup
17
+ - Major restructuring
18
+ - Index issues
19
19
 
20
- **Estimated time:** 5-30 seconds (depends on number of changed files)
20
+ **Prerequisites:**
21
+ - OPENAI_API_KEY must be set: `export OPENAI_API_KEY="sk-..."`
21
22
 
22
23
  ---
23
24
 
24
- **For full rebuild (only when needed):**
25
- Add `--full` flag if you need to rebuild the entire index from scratch:
26
- - First-time setup
27
- - Major codebase restructuring
28
- - Index corrupted or missing
29
- - After config changes (extensions, ignore patterns)
25
+ Execute reindex:
30
26
 
31
27
  ```bash
32
- # Default: Auto-detect changed files (fast)
33
- ./.claude/skills/cfn-ruvector-codebase-index/index.sh --auto
28
+ # Incremental (default - only changed files)
29
+ ./.claude/skills/cfn-local-ruvector-accelerator/target/release/local-ruvector index --path . --types rs,ts,js,py,sh,md
34
30
 
35
- # Full rebuild (only when explicitly needed)
36
- ./.claude/skills/cfn-ruvector-codebase-index/index.sh --full
31
+ # Full rebuild (when needed)
32
+ # ./.claude/skills/cfn-local-ruvector-accelerator/target/release/local-ruvector index --path . --types rs,ts,js,py,sh,md --force
37
33
  ```
@@ -1,38 +1,31 @@
1
1
  ---
2
- description: Search codebase using natural language queries via RuVector semantic index
2
+ description: Search codebase using RuVector semantic index (400x faster than grep)
3
3
  arguments:
4
4
  query:
5
5
  description: Natural language search query
6
6
  required: true
7
7
  --top:
8
- description: Number of results to return (default 5)
8
+ description: Number of results to return (default 10)
9
9
  required: false
10
10
  ---
11
11
 
12
12
  # Codebase Search Command
13
13
 
14
- Search your indexed codebase using natural language queries. Uses RuVector's semantic search to find relevant files based on meaning, not just keywords.
14
+ Search your indexed codebase using RuVector. Uses SQLite index for fast lookups.
15
15
 
16
16
  **Examples:**
17
- - `/codebase-search authentication logic`
18
- - `/codebase-search React components for user profile --top 10`
19
- - `/codebase-search database migration utilities`
20
- - `/codebase-search error handling patterns`
21
-
22
- **Returns:**
23
- - File paths ranked by relevance
24
- - File purpose and exports
25
- - Code metrics (lines, complexity)
26
- - Relevance scores
17
+ - `/cfn-ruvector:cfn-codebase-search authentication logic`
18
+ - `/cfn-ruvector:cfn-codebase-search React components --top 20`
19
+ - `/cfn-ruvector:cfn-codebase-search database migration`
27
20
 
28
21
  **Prerequisites:**
29
- - Codebase must be indexed first (run `/codebase-reindex`)
30
- - OPENAI_API_KEY or ZAI_API_KEY must be set
22
+ - Codebase must be indexed: `./local-ruvector index --path . --force`
23
+ - OPENAI_API_KEY must be set for indexing
31
24
 
32
25
  ---
33
26
 
34
27
  Execute the search:
35
28
 
36
29
  ```bash
37
- ./.claude/skills/cfn-ruvector-codebase-index/search.sh "{{query}}" {{#if top}}--top {{top}}{{/if}}
30
+ ./.claude/skills/cfn-local-ruvector-accelerator/target/release/local-ruvector query "{{query}}" --max-results {{#if top}}{{top}}{{else}}10{{/if}}
38
31
  ```
@@ -1,46 +1,34 @@
1
1
  ---
2
- description: "Semantic code search with RuVector"
2
+ description: "Semantic code search with RuVector (400x faster than grep)"
3
3
  argument-hint: "<query>"
4
4
  ---
5
5
 
6
- # /search - Semantic Code Search
6
+ # RuVector Search
7
7
 
8
- Quick semantic search through your codebase using RuVector.
8
+ Quick semantic search through your indexed codebase.
9
9
 
10
10
  ## Usage
11
11
 
12
- ```bash
13
- /search "authentication middleware"
14
- /search "error handling pattern"
15
- /search "database connection setup"
12
+ ```
13
+ /cfn-ruvector-search "authentication middleware"
14
+ /cfn-ruvector-search "error handling pattern"
16
15
  ```
17
16
 
18
17
  ## What it does
19
18
 
20
- - Searches for semantically similar code (not just text matching)
21
- - Returns the most relevant code snippets with similarity scores
22
- - Helps find existing implementations before building new ones
19
+ - Queries pre-built SQLite index (not filesystem scan)
20
+ - Returns file paths with line numbers
21
+ - 400x faster than grep for indexed projects
23
22
 
24
- ## Examples
23
+ ## Prerequisites
25
24
 
26
- Find similar implementations:
27
- ```bash
28
- /search "user login flow"
29
- ```
25
+ - Project must be indexed first
26
+ - Run: `./local-ruvector index --path . --force`
30
27
 
31
- Find error patterns:
32
- ```bash
33
- /search "timeout error handling"
34
- ```
35
-
36
- Find API patterns:
37
- ```bash
38
- /search "REST API validation"
39
- ```
28
+ ---
40
29
 
41
- ## Advanced Options
30
+ Execute search:
42
31
 
43
- For more control, use the full command:
44
32
  ```bash
45
- /codebase-search "query" --top 10 --full
46
- ```
33
+ ./.claude/skills/cfn-local-ruvector-accelerator/target/release/local-ruvector query "$ARGUMENTS" --max-results 10
34
+ ```
@@ -29,8 +29,8 @@ sqlite3 ~/.local/share/ruvector/index_v2.db "SELECT file_path, line_number FROM
29
29
  /codebase-search "authentication middleware pattern"
30
30
  /cfn-ruvector-search "error handling in API routes"
31
31
 
32
- # CLI direct
33
- ./.claude/skills/cfn-local-ruvector-accelerator/target/release/local-ruvector query --pattern "user login flow"
32
+ # CLI direct (note: query text is positional, use --max-results not --limit)
33
+ ./.claude/skills/cfn-local-ruvector-accelerator/target/release/local-ruvector query "user login flow" --max-results 5
34
34
  ```
35
35
 
36
36
  ### Structural Search (V2 - SQL on AST)
@@ -48,6 +48,27 @@ sqlite3 ~/.local/share/ruvector/index_v2.db \
48
48
  "SELECT COUNT(*) FROM entities WHERE project_root = '/path/to/project';"
49
49
  ```
50
50
 
51
+ ## Prerequisites
52
+
53
+ **OPENAI_API_KEY is REQUIRED for indexing.** Indexing will fail without a valid key.
54
+
55
+ ```bash
56
+ # Option 1: Export before running
57
+ export OPENAI_API_KEY="sk-..."
58
+
59
+ # Option 2: Add to shell profile (~/.bashrc or ~/.zshrc)
60
+ echo 'export OPENAI_API_KEY="sk-..."' >> ~/.bashrc
61
+ source ~/.bashrc
62
+
63
+ # Option 3: Inline with command
64
+ OPENAI_API_KEY="sk-..." ./local-ruvector index --path /project
65
+ ```
66
+
67
+ **Verify key is set:**
68
+ ```bash
69
+ echo $OPENAI_API_KEY # Should show your key (not empty)
70
+ ```
71
+
51
72
  ## Index Management
52
73
 
53
74
  ```bash
@@ -78,8 +99,10 @@ sqlite3 ~/.local/share/ruvector/index_v2.db "SELECT project_root, COUNT(*) FROM
78
99
 
79
100
  Before implementing changes, ALWAYS query RuVector first:
80
101
  ```bash
81
- # Find similar patterns
102
+ # Find similar patterns (slash command uses --top, CLI uses --max-results)
82
103
  /codebase-search "relevant search terms" --top 5
104
+ # Or via CLI:
105
+ ./local-ruvector query "relevant search terms" --max-results 5
83
106
 
84
107
  # Query past errors
85
108
  ./.claude/skills/cfn-ruvector-codebase-index/query-error-patterns.sh --task-description "description"
@@ -46,7 +46,7 @@ use anyhow::{Result, Context, anyhow};
46
46
  use std::fs;
47
47
  use std::path::{Path, PathBuf};
48
48
  use walkdir::{WalkDir, DirEntry};
49
- use tracing::{info, debug, warn};
49
+ use tracing::{info, debug, warn, error};
50
50
  use regex::Regex;
51
51
  use std::sync::Arc;
52
52
  use std::sync::RwLock;
@@ -286,6 +286,15 @@ impl IndexCommand {
286
286
  }
287
287
 
288
288
  pub fn execute(&mut self) -> Result<IndexStats> {
289
+ // Fail early if OPENAI_API_KEY is not set
290
+ if std::env::var("OPENAI_API_KEY").is_err() {
291
+ error!("OPENAI_API_KEY environment variable is required for indexing");
292
+ return Err(anyhow!(
293
+ "OPENAI_API_KEY not found. Set it with: export OPENAI_API_KEY=\"sk-...\"\n\
294
+ Indexing requires a valid OpenAI API key for generating embeddings."
295
+ ));
296
+ }
297
+
289
298
  info!("Starting index process");
290
299
  info!("File types: {:?}", self.file_types);
291
300
  if let Some(ref patterns) = self.patterns {
@@ -99,6 +99,15 @@ impl AstIndexCommand {
99
99
  }
100
100
 
101
101
  pub fn execute(&mut self) -> Result<IndexStats> {
102
+ // Fail early if OPENAI_API_KEY is not set
103
+ if std::env::var("OPENAI_API_KEY").is_err() {
104
+ error!("OPENAI_API_KEY environment variable is required for indexing");
105
+ return Err(anyhow!(
106
+ "OPENAI_API_KEY not found. Set it with: export OPENAI_API_KEY=\"sk-...\"\n\
107
+ Indexing requires a valid OpenAI API key for generating embeddings."
108
+ ));
109
+ }
110
+
102
111
  let start_time = std::time::Instant::now();
103
112
 
104
113
  info!("Starting AST-based index process");
@@ -101,13 +101,10 @@ impl EmbeddingsManager {
101
101
  debug!("Generating embeddings for {} texts", texts.len());
102
102
 
103
103
  if self.config.api_key.is_none() {
104
- warn!("OpenAI API key not found, falling back to dummy embeddings");
105
- let mut embeddings = Vec::with_capacity(texts.len());
106
- for text in texts {
107
- embeddings.push(self.generate_dummy_embedding(text));
108
- }
109
- info!("Generated {} dummy embeddings", embeddings.len());
110
- return Ok(embeddings);
104
+ error!("OPENAI_API_KEY environment variable not set");
105
+ return Err(anyhow!(
106
+ "OPENAI_API_KEY not found. Set it with: export OPENAI_API_KEY=\"sk-...\""
107
+ ));
111
108
  }
112
109
 
113
110
  let mut all_embeddings = Vec::with_capacity(texts.len());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow-novice",
3
- "version": "2.18.17",
3
+ "version": "2.18.19",
4
4
  "description": "Claude Flow Novice - Advanced orchestration platform for multi-agent AI workflows with CFN Loop architecture\n\nIncludes Local RuVector Accelerator and all CFN skills for complete functionality.",
5
5
  "main": "index.js",
6
6
  "type": "module",