claude-flow-novice 2.18.22 → 2.18.24
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/.claude/CLAUDE.md +17 -0
- package/.claude/cfn-scripts/check-memory.sh +150 -0
- package/.claude/cfn-scripts/run-with-memory-limit.sh +91 -0
- package/.claude/commands/cfn-loop/cfn-loop-cli.md +9 -0
- package/.claude/commands/cfn-loop-task.md +11 -0
- package/.claude/commands/cfn-ruvector/cfn-codebase-reindex.md +23 -4
- package/.claude/commands/cfn-ruvector/cfn-codebase-search.md +10 -2
- package/.claude/commands/cfn-ruvector/cfn-detect-stale-docs.md +22 -4
- package/.claude/hooks/README.md +148 -148
- package/.claude/hooks/cfn-bash-search-hook.sh +87 -0
- package/.claude/hooks/cfn-smart-search-hook.sh +127 -0
- package/.claude/hooks/deprecated/cfn-SessionStart-cfn-load-openai-key.sh +48 -0
- package/.claude/hooks/post-commit-codebase-index +79 -45
- package/.claude/settings.json +20 -11
- package/.claude/skills/CLAUDE.md +70 -0
- package/.claude/skills/cfn-edit-safety/lib/hooks/security-scanner.sh +1 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/SKILL.md +37 -21
- package/.claude/skills/cfn-local-ruvector-accelerator/cfn-integration.sh +47 -6
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/index.rs +2 -1
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/init.rs +3 -3
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/query.rs +1 -1
- package/.claude/skills/cfn-local-ruvector-accelerator/src/lib.rs +1 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/paths.rs +4 -2
- package/.claude/skills/cfn-local-ruvector-accelerator/src/search_engine.rs +11 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_query_api.sh +102 -102
- package/CLAUDE.md +63 -373
- package/docs/CFN_LOOP_CLI_MODE.md +134 -0
- package/package.json +9 -5
- package/scripts/cfn-init.js +8 -2
- package/scripts/organize-root-files.sh +340 -340
- package/scripts/postinstall.js +120 -3
- package/test-epic-creator-security.sh +202 -202
- package/.claude/hooks/SessionStart:cfn-build-ruvector.sh +0 -28
- package/.claude/hooks/SessionStart:cfn-load-openai-key.sh +0 -35
- /package/.claude/hooks/{SessionStart-cfn-build-ruvector.sh → cfn-SessionStart-cfn-build-ruvector.sh} +0 -0
- /package/.claude/hooks/{cfn-load-cerebras-env.sh → deprecated/cfn-load-cerebras-env.sh} +0 -0
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Test script for Phase 4 Query API
|
|
4
|
-
# This script tests the new query functionality
|
|
5
|
-
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
echo "=== Testing Phase 4 Query API Implementation ==="
|
|
9
|
-
echo
|
|
10
|
-
|
|
11
|
-
# Check if the binary was built
|
|
12
|
-
BINARY_PATH="./target/debug/local-ruvector"
|
|
13
|
-
if [ ! -f "$BINARY_PATH" ]; then
|
|
14
|
-
echo "❌ Binary not found at $BINARY_PATH"
|
|
15
|
-
echo "Please build the project first with: cargo build"
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
echo "✅ Binary found at $BINARY_PATH"
|
|
20
|
-
echo
|
|
21
|
-
|
|
22
|
-
# Test 1: Check help for new subcommands
|
|
23
|
-
echo "1. Testing help for 'find' subcommand:"
|
|
24
|
-
$BINARY_PATH find --help | head -10
|
|
25
|
-
echo
|
|
26
|
-
|
|
27
|
-
echo "2. Testing help for 'refs' subcommand:"
|
|
28
|
-
$BINARY_PATH refs --help | head -10
|
|
29
|
-
echo
|
|
30
|
-
|
|
31
|
-
# Test 2: Create a simple test case
|
|
32
|
-
echo "3. Creating test data..."
|
|
33
|
-
mkdir -p test_code
|
|
34
|
-
cat > test_code/sample.rs << 'EOF'
|
|
35
|
-
use std::collections::HashMap;
|
|
36
|
-
|
|
37
|
-
pub struct Album {
|
|
38
|
-
pub id: u32,
|
|
39
|
-
pub title: String,
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
pub fn create_album(id: u32, title: &str) -> Album {
|
|
43
|
-
Album { id, title: title.to_string() }
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
pub fn print_album(album: &Album) {
|
|
47
|
-
println!("Album {}: {}", album.id, album.title);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
fn main() {
|
|
51
|
-
let album = create_album(1, "Test Album");
|
|
52
|
-
print_album(&album);
|
|
53
|
-
}
|
|
54
|
-
EOF
|
|
55
|
-
|
|
56
|
-
echo "✅ Created test_code/sample.rs"
|
|
57
|
-
echo
|
|
58
|
-
|
|
59
|
-
# Test 3: Initialize and index
|
|
60
|
-
echo "4. Initializing ruvector..."
|
|
61
|
-
$BINARY_PATH init --force
|
|
62
|
-
echo
|
|
63
|
-
|
|
64
|
-
echo "5. Indexing test files..."
|
|
65
|
-
$BINARY_PATH index --path test_code --types rs
|
|
66
|
-
echo
|
|
67
|
-
|
|
68
|
-
# Test 4: Test find commands
|
|
69
|
-
echo "6. Testing find commands..."
|
|
70
|
-
|
|
71
|
-
echo "6a. Find functions using type 'Album':"
|
|
72
|
-
$BINARY_PATH find --uses-type Album --limit 10
|
|
73
|
-
echo
|
|
74
|
-
|
|
75
|
-
echo "6b. Find callers of function 'create_album':"
|
|
76
|
-
$BINARY_PATH find --called-by create_album
|
|
77
|
-
echo
|
|
78
|
-
|
|
79
|
-
echo "6c. Find types from test_code/sample.rs used elsewhere:"
|
|
80
|
-
$BINARY_PATH find --types-from test_code/sample.rs
|
|
81
|
-
echo
|
|
82
|
-
|
|
83
|
-
echo "6d. Find public API of test_code module:"
|
|
84
|
-
$BINARY_PATH find --public-api test_code --format detailed
|
|
85
|
-
echo
|
|
86
|
-
|
|
87
|
-
# Test 5: Test refs command
|
|
88
|
-
echo "7. Testing refs command for 'Album':"
|
|
89
|
-
$BINARY_PATH refs Album --format simple
|
|
90
|
-
echo
|
|
91
|
-
|
|
92
|
-
echo "8. Testing refs command with JSON output:"
|
|
93
|
-
$BINARY_PATH refs create_album --format json | jq . 2>/dev/null || echo "(jq not available for pretty printing)"
|
|
94
|
-
echo
|
|
95
|
-
|
|
96
|
-
# Cleanup
|
|
97
|
-
echo "9. Cleaning up test data..."
|
|
98
|
-
rm -rf test_code
|
|
99
|
-
$BINARY_PATH reset --confirm 2>/dev/null || true
|
|
100
|
-
echo "✅ Cleanup complete"
|
|
101
|
-
echo
|
|
102
|
-
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Test script for Phase 4 Query API
|
|
4
|
+
# This script tests the new query functionality
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
echo "=== Testing Phase 4 Query API Implementation ==="
|
|
9
|
+
echo
|
|
10
|
+
|
|
11
|
+
# Check if the binary was built
|
|
12
|
+
BINARY_PATH="./target/debug/local-ruvector"
|
|
13
|
+
if [ ! -f "$BINARY_PATH" ]; then
|
|
14
|
+
echo "❌ Binary not found at $BINARY_PATH"
|
|
15
|
+
echo "Please build the project first with: cargo build"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
echo "✅ Binary found at $BINARY_PATH"
|
|
20
|
+
echo
|
|
21
|
+
|
|
22
|
+
# Test 1: Check help for new subcommands
|
|
23
|
+
echo "1. Testing help for 'find' subcommand:"
|
|
24
|
+
$BINARY_PATH find --help | head -10
|
|
25
|
+
echo
|
|
26
|
+
|
|
27
|
+
echo "2. Testing help for 'refs' subcommand:"
|
|
28
|
+
$BINARY_PATH refs --help | head -10
|
|
29
|
+
echo
|
|
30
|
+
|
|
31
|
+
# Test 2: Create a simple test case
|
|
32
|
+
echo "3. Creating test data..."
|
|
33
|
+
mkdir -p test_code
|
|
34
|
+
cat > test_code/sample.rs << 'EOF'
|
|
35
|
+
use std::collections::HashMap;
|
|
36
|
+
|
|
37
|
+
pub struct Album {
|
|
38
|
+
pub id: u32,
|
|
39
|
+
pub title: String,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
pub fn create_album(id: u32, title: &str) -> Album {
|
|
43
|
+
Album { id, title: title.to_string() }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
pub fn print_album(album: &Album) {
|
|
47
|
+
println!("Album {}: {}", album.id, album.title);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
fn main() {
|
|
51
|
+
let album = create_album(1, "Test Album");
|
|
52
|
+
print_album(&album);
|
|
53
|
+
}
|
|
54
|
+
EOF
|
|
55
|
+
|
|
56
|
+
echo "✅ Created test_code/sample.rs"
|
|
57
|
+
echo
|
|
58
|
+
|
|
59
|
+
# Test 3: Initialize and index
|
|
60
|
+
echo "4. Initializing ruvector..."
|
|
61
|
+
$BINARY_PATH init --force
|
|
62
|
+
echo
|
|
63
|
+
|
|
64
|
+
echo "5. Indexing test files..."
|
|
65
|
+
$BINARY_PATH index --path test_code --types rs
|
|
66
|
+
echo
|
|
67
|
+
|
|
68
|
+
# Test 4: Test find commands
|
|
69
|
+
echo "6. Testing find commands..."
|
|
70
|
+
|
|
71
|
+
echo "6a. Find functions using type 'Album':"
|
|
72
|
+
$BINARY_PATH find --uses-type Album --limit 10
|
|
73
|
+
echo
|
|
74
|
+
|
|
75
|
+
echo "6b. Find callers of function 'create_album':"
|
|
76
|
+
$BINARY_PATH find --called-by create_album
|
|
77
|
+
echo
|
|
78
|
+
|
|
79
|
+
echo "6c. Find types from test_code/sample.rs used elsewhere:"
|
|
80
|
+
$BINARY_PATH find --types-from test_code/sample.rs
|
|
81
|
+
echo
|
|
82
|
+
|
|
83
|
+
echo "6d. Find public API of test_code module:"
|
|
84
|
+
$BINARY_PATH find --public-api test_code --format detailed
|
|
85
|
+
echo
|
|
86
|
+
|
|
87
|
+
# Test 5: Test refs command
|
|
88
|
+
echo "7. Testing refs command for 'Album':"
|
|
89
|
+
$BINARY_PATH refs Album --format simple
|
|
90
|
+
echo
|
|
91
|
+
|
|
92
|
+
echo "8. Testing refs command with JSON output:"
|
|
93
|
+
$BINARY_PATH refs create_album --format json | jq . 2>/dev/null || echo "(jq not available for pretty printing)"
|
|
94
|
+
echo
|
|
95
|
+
|
|
96
|
+
# Cleanup
|
|
97
|
+
echo "9. Cleaning up test data..."
|
|
98
|
+
rm -rf test_code
|
|
99
|
+
$BINARY_PATH reset --confirm 2>/dev/null || true
|
|
100
|
+
echo "✅ Cleanup complete"
|
|
101
|
+
echo
|
|
102
|
+
|
|
103
103
|
echo "=== Phase 4 Query API Tests Complete ==="
|