claude-flow-novice 2.18.39 → 2.19.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/.claude/agents/SHARED_PROTOCOL.md +25 -1
- package/.claude/agents/cfn-dev-team/dev-ops/fly-io-specialist.md +418 -0
- package/.claude/agents/cfn-dev-team/developers/database/mem0-specialist.md +579 -0
- package/.claude/agents/cfn-dev-team/developers/database/memgraph-specialist.md +722 -0
- package/.claude/agents/cfn-dev-team/documentation/pseudocode.md +1 -1
- package/.claude/agents/cfn-dev-team/documentation/specification-agent.md +1 -1
- package/.claude/agents/cfn-dev-team/testers/tester.md +35 -0
- package/.claude/commands/{cfn-ruvector → cfn-codesearch}/cfn-codebase-reindex.md +4 -4
- package/.claude/commands/{cfn-ruvector → cfn-codesearch}/cfn-codebase-search.md +7 -7
- package/.claude/commands/{cfn-ruvector → cfn-codesearch}/cfn-detect-stale-docs.md +3 -3
- package/.claude/commands/{cfn-ruvector-search.md → cfn-codesearch-search.md} +7 -7
- package/.claude/commands/cfn-fix-errors.md +1 -1
- package/.claude/commands/cfn-loop-task.md +291 -291
- package/.claude/skills/{bulk-add-ruvector-instructions.sh → bulk-add-codesearch-instructions.sh} +12 -12
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/AGENT_INTEGRATION_PATTERNS.md +20 -20
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/AGENT_LIFECYCLE_INTEGRATION.md +11 -11
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/Cargo.toml +9 -4
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/EXTRACTION_EXAMPLES.md +6 -6
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/IMMEDIATE_ACTION_REQUIRED.md +9 -9
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/README.md +7 -7
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/SCHEMA_V2_IMPLEMENTATION.md +1 -1
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/SECURITY_IMPLEMENTATION.md +3 -3
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/SECURITY_TESTING_COMPLETION.md +4 -4
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/SKILL.md +31 -31
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/analyze-agent-failures.sh +11 -11
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/cfn-integration.sh +27 -27
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/index-code.sh +11 -11
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/index_all.sh +2 -2
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/ingest-agent-transcript.sh +10 -10
- package/.claude/skills/{cfn-local-ruvector-accelerator/init-local-ruvector.sh → cfn-codesearch/init-local-codesearch.sh} +16 -16
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/project-structure.md +10 -10
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/query-local.sh +6 -6
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/index.rs +233 -4
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/init.rs +18 -18
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/query.rs +64 -3
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/embeddings.rs +19 -5
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/lib.rs +6 -4
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/main.rs +35 -25
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/paths.rs +19 -13
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/query_v2.rs +3 -4
- package/.claude/skills/cfn-codesearch/src/store_pgvector.rs +301 -0
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/store_v2.rs +12 -1
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/test-agent-lifecycle-integration.sh +6 -6
- package/.claude/skills/{cfn-local-ruvector-accelerator/test-local-ruvector.sh → cfn-codesearch/test-local-codesearch.sh} +7 -7
- package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/test_query_api.sh +2 -2
- package/.claude/skills/cfn-epic-creator/SKILL.md +110 -2
- package/.claude/skills/cfn-epic-creator/invoke.sh +120 -1
- package/.claude/skills/cfn-mdap-context-injection/SKILL.md +2 -2
- package/.claude/skills/cfn-mdap-context-injection/inject.sh +21 -21
- package/package.json +11 -11
- package/readme/feature-status.md +405 -0
- package/.claude/agents/docker-ts-fixer.md +0 -65
- /package/.claude/agents/cfn-dev-team/{testing → testers}/test-validation-agent.md +0 -0
- /package/.claude/{agents/cfn-dev-team/utility → cfn-extras/agents}/context-curator.md +0 -0
- /package/.claude/{agents/custom → cfn-extras/agents/custom-agents}/cfn-docker-expert.md +0 -0
- /package/.claude/{agents/custom → cfn-extras/agents/custom-agents}/cfn-loops-cli-expert.md +0 -0
- /package/.claude/{agents/custom → cfn-extras/agents/custom-agents}/cfn-redis-operations.md +0 -0
- /package/.claude/{agents/custom → cfn-extras/agents/custom-agents}/cfn-system-expert.md +0 -0
- /package/.claude/{agents/csuite → cfn-extras/agents/custom-agents}/cto-agent.md +0 -0
- /package/.claude/{agents/custom → cfn-extras/agents/custom-agents}/trigger-dev-expert.md +0 -0
- /package/.claude/{agents/cfn-dev-team/coordinators → cfn-extras/agents/deprecated-coordinators}/consensus-builder.md +0 -0
- /package/.claude/{agents/cfn-dev-team/coordinators → cfn-extras/agents/deprecated-coordinators}/multi-sprint-coordinator.md +0 -0
- /package/.claude/{agents → cfn-extras/agents/docker-team}/docker-coordinators/cfn-docker-v3-coordinator.md +0 -0
- /package/.claude/{agents/cfn-dev-team/dev-ops → cfn-extras/agents}/kubernetes-specialist.md +0 -0
- /package/.claude/{agents/cfn-dev-team/architecture → cfn-extras/agents}/planner.md +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/.claude/hooks/SessionStart-cfn-build-ruvector.sh +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/Cargo.toml.backup +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/SECURITY_FINDINGS_SUMMARY.txt +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/docs/EXECUTIVE_SUMMARY.txt +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/docs/PHASE_4_QUERY_API.md +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/docs/RUST_AST_EXTRACTOR_IMPLEMENTATION.md +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/docs/TRANSACTION_MANAGEMENT.md +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/docs/VALIDATION_FINDINGS.txt +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/embeddings_manager.py.backup +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/epic-ast-indexer.json +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/index/index.bin +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/index/metadata.json +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/index-code.sh.backup +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/query-agent-patterns.sh +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/requirements.txt +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/search_engine_v2.py.backup +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/sqlite_store.py.backup +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/cleanup.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/export.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/find.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/index_ast.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/index_modified.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/migration.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/mod.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/refs.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/reset.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/cli/stats.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/extractors/mod.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/extractors/rust.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/extractors/rust_placeholder.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/extractors/text_fallback.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/extractors/typescript.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/extractors/typescript_full.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/main.rs.backup +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/migration.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/migration_backup.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/migration_tx.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/migration_v2.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/path_validator.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/query_api.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/schema_v2.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/search_engine.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/security_tests.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/sqlite_store.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/store_v2_backup.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/store_v2_fixed.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/store_v2_tx.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/test_schema.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/src/transaction_tests.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/test_ast_indexing.rs +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/test_schema.sql +0 -0
- /package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/test_schema_v2.sql +0 -0
package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/analyze-agent-failures.sh
RENAMED
|
@@ -20,7 +20,7 @@ set -euo pipefail
|
|
|
20
20
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
21
21
|
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
|
|
22
22
|
DB_PATH="${PROJECT_ROOT}/.claude/skills/cfn-redis-coordination/data/cfn-loop.db"
|
|
23
|
-
LOG_PATH="${PROJECT_ROOT}/.artifacts/logs/
|
|
23
|
+
LOG_PATH="${PROJECT_ROOT}/.artifacts/logs/codesearch-failure-analysis.log"
|
|
24
24
|
|
|
25
25
|
# Ensure log directory exists
|
|
26
26
|
mkdir -p "$(dirname "$LOG_PATH")"
|
|
@@ -50,7 +50,7 @@ while [[ $# -gt 0 ]]; do
|
|
|
50
50
|
esac
|
|
51
51
|
done
|
|
52
52
|
|
|
53
|
-
echo "[
|
|
53
|
+
echo "[CodeSearch] Analyzing agent failures from last $DAYS days" | tee -a "$LOG_PATH"
|
|
54
54
|
|
|
55
55
|
# ============================================================================
|
|
56
56
|
# Query Failed Agents
|
|
@@ -73,12 +73,12 @@ EOF
|
|
|
73
73
|
)
|
|
74
74
|
|
|
75
75
|
if [ -z "$FAILED_AGENTS" ]; then
|
|
76
|
-
echo "[
|
|
76
|
+
echo "[CodeSearch] No failures found in last $DAYS days" | tee -a "$LOG_PATH"
|
|
77
77
|
exit 0
|
|
78
78
|
fi
|
|
79
79
|
|
|
80
80
|
FAILURE_COUNT=$(echo "$FAILED_AGENTS" | wc -l)
|
|
81
|
-
echo "[
|
|
81
|
+
echo "[CodeSearch] Found $FAILURE_COUNT failed agent executions" | tee -a "$LOG_PATH"
|
|
82
82
|
|
|
83
83
|
# ============================================================================
|
|
84
84
|
# Extract Failure Patterns
|
|
@@ -150,7 +150,7 @@ SET
|
|
|
150
150
|
WHERE id = '$EXISTING_ID';
|
|
151
151
|
SQL_EOF
|
|
152
152
|
|
|
153
|
-
echo "[
|
|
153
|
+
echo "[CodeSearch] Updated pattern: $EXISTING_ID (count: $NEW_COUNT)" | tee -a "$LOG_PATH"
|
|
154
154
|
|
|
155
155
|
else
|
|
156
156
|
# Create new pattern
|
|
@@ -177,13 +177,13 @@ VALUES (
|
|
|
177
177
|
SQL_EOF
|
|
178
178
|
|
|
179
179
|
PATTERNS_CREATED=$((PATTERNS_CREATED + 1))
|
|
180
|
-
echo "[
|
|
180
|
+
echo "[CodeSearch] Created pattern: $PATTERN_ID ($AGENT_TYPE / $FAILURE_MODE)" | tee -a "$LOG_PATH"
|
|
181
181
|
fi
|
|
182
182
|
fi
|
|
183
183
|
fi
|
|
184
184
|
done
|
|
185
185
|
|
|
186
|
-
echo "[
|
|
186
|
+
echo "[CodeSearch] Created $PATTERNS_CREATED new failure patterns" | tee -a "$LOG_PATH"
|
|
187
187
|
|
|
188
188
|
# ============================================================================
|
|
189
189
|
# Identify High-Impact Patterns
|
|
@@ -205,7 +205,7 @@ EOF
|
|
|
205
205
|
|
|
206
206
|
if [ -n "$HIGH_IMPACT" ]; then
|
|
207
207
|
echo "" | tee -a "$LOG_PATH"
|
|
208
|
-
echo "[
|
|
208
|
+
echo "[CodeSearch] High-impact failure patterns (>= $MIN_OCCURRENCES occurrences):" | tee -a "$LOG_PATH"
|
|
209
209
|
echo "$HIGH_IMPACT" | while IFS='|' read -r TYPE MODE COUNT CAUSE; do
|
|
210
210
|
echo " - $TYPE / $MODE: $COUNT occurrences" | tee -a "$LOG_PATH"
|
|
211
211
|
echo " Cause: $(echo "$CAUSE" | head -c 80)..." | tee -a "$LOG_PATH"
|
|
@@ -220,7 +220,7 @@ fi
|
|
|
220
220
|
# and extract their approaches as recovery strategies
|
|
221
221
|
|
|
222
222
|
echo "" | tee -a "$LOG_PATH"
|
|
223
|
-
echo "[
|
|
223
|
+
echo "[CodeSearch] Searching for recovery strategies..." | tee -a "$LOG_PATH"
|
|
224
224
|
|
|
225
225
|
RECOVERIES_FOUND=0
|
|
226
226
|
|
|
@@ -259,14 +259,14 @@ SQL_EOF
|
|
|
259
259
|
fi
|
|
260
260
|
done
|
|
261
261
|
|
|
262
|
-
echo "[
|
|
262
|
+
echo "[CodeSearch] Identified $RECOVERIES_FOUND recovery strategies" | tee -a "$LOG_PATH"
|
|
263
263
|
|
|
264
264
|
# ============================================================================
|
|
265
265
|
# Summary Report
|
|
266
266
|
# ============================================================================
|
|
267
267
|
|
|
268
268
|
echo "" | tee -a "$LOG_PATH"
|
|
269
|
-
echo "[
|
|
269
|
+
echo "[CodeSearch] Failure Analysis Summary:" | tee -a "$LOG_PATH"
|
|
270
270
|
echo " - Analyzed: $FAILURE_COUNT failed agents" | tee -a "$LOG_PATH"
|
|
271
271
|
echo " - New patterns: $PATTERNS_CREATED" | tee -a "$LOG_PATH"
|
|
272
272
|
echo " - Recovery strategies: $RECOVERIES_FOUND" | tee -a "$LOG_PATH"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# CFN Integration Script for Local
|
|
2
|
+
# CFN Integration Script for Local CodeSearch Accelerator
|
|
3
3
|
# Works for both source repo and npm-installed packages
|
|
4
4
|
|
|
5
5
|
set -e
|
|
@@ -33,20 +33,20 @@ log_error() {
|
|
|
33
33
|
# Find binary - check multiple locations
|
|
34
34
|
find_binary() {
|
|
35
35
|
# 1. Check if in PATH
|
|
36
|
-
if command -v local-
|
|
37
|
-
echo "$(command -v local-
|
|
36
|
+
if command -v local-codesearch &> /dev/null; then
|
|
37
|
+
echo "$(command -v local-codesearch)"
|
|
38
38
|
return 0
|
|
39
39
|
fi
|
|
40
40
|
|
|
41
41
|
# 2. Check ~/.local/bin
|
|
42
|
-
if [[ -x "$HOME/.local/bin/local-
|
|
43
|
-
echo "$HOME/.local/bin/local-
|
|
42
|
+
if [[ -x "$HOME/.local/bin/local-codesearch" ]]; then
|
|
43
|
+
echo "$HOME/.local/bin/local-codesearch"
|
|
44
44
|
return 0
|
|
45
45
|
fi
|
|
46
46
|
|
|
47
47
|
# 3. Check local target directory (source repo)
|
|
48
|
-
if [[ -x "$SCRIPT_DIR/target/release/local-
|
|
49
|
-
echo "$SCRIPT_DIR/target/release/local-
|
|
48
|
+
if [[ -x "$SCRIPT_DIR/target/release/local-codesearch" ]]; then
|
|
49
|
+
echo "$SCRIPT_DIR/target/release/local-codesearch"
|
|
50
50
|
return 0
|
|
51
51
|
fi
|
|
52
52
|
|
|
@@ -58,23 +58,23 @@ BINARY_PATH=""
|
|
|
58
58
|
if ! BINARY_PATH=$(find_binary); then
|
|
59
59
|
# Try to build if Rust is available
|
|
60
60
|
if command -v cargo &> /dev/null && [[ -f "$SCRIPT_DIR/Cargo.toml" ]]; then
|
|
61
|
-
log_info "Building Local
|
|
61
|
+
log_info "Building Local CodeSearch..."
|
|
62
62
|
cd "$SCRIPT_DIR"
|
|
63
63
|
cargo build --release
|
|
64
|
-
BINARY_PATH="$SCRIPT_DIR/target/release/local-
|
|
64
|
+
BINARY_PATH="$SCRIPT_DIR/target/release/local-codesearch"
|
|
65
65
|
|
|
66
66
|
# Install to ~/.local/bin for future use
|
|
67
67
|
if [[ -n "$HOME" ]]; then
|
|
68
68
|
mkdir -p "$HOME/.local/bin"
|
|
69
|
-
cp "$BINARY_PATH" "$HOME/.local/bin/local-
|
|
70
|
-
chmod +x "$HOME/.local/bin/local-
|
|
71
|
-
log_success "Installed local-
|
|
69
|
+
cp "$BINARY_PATH" "$HOME/.local/bin/local-codesearch"
|
|
70
|
+
chmod +x "$HOME/.local/bin/local-codesearch"
|
|
71
|
+
log_success "Installed local-codesearch to ~/.local/bin/"
|
|
72
72
|
fi
|
|
73
73
|
log_success "Build complete"
|
|
74
74
|
else
|
|
75
|
-
log_error "local-
|
|
75
|
+
log_error "local-codesearch binary not found and cannot build (Rust not available)"
|
|
76
76
|
log_info "Install Rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
|
|
77
|
-
log_info "Then run: npm run
|
|
77
|
+
log_info "Then run: npm run codesearch:local:build"
|
|
78
78
|
exit 1
|
|
79
79
|
fi
|
|
80
80
|
fi
|
|
@@ -82,9 +82,9 @@ fi
|
|
|
82
82
|
# CFN integration commands
|
|
83
83
|
cfn_init() {
|
|
84
84
|
local project_dir="${1:-.}"
|
|
85
|
-
log_info "Initializing Local
|
|
85
|
+
log_info "Initializing Local CodeSearch for CFN in: $project_dir"
|
|
86
86
|
"$BINARY_PATH" --project-dir "$project_dir" init
|
|
87
|
-
log_success "CFN Local
|
|
87
|
+
log_success "CFN Local CodeSearch initialized"
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
cfn_index() {
|
|
@@ -112,7 +112,7 @@ cfn_query() {
|
|
|
112
112
|
|
|
113
113
|
cfn_stats() {
|
|
114
114
|
local project_dir="${1:-.}"
|
|
115
|
-
log_info "CFN Local
|
|
115
|
+
log_info "CFN Local CodeSearch statistics for: $project_dir"
|
|
116
116
|
"$BINARY_PATH" --project-dir "$project_dir" stats --detailed
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -152,12 +152,12 @@ cfn_coordinate_generation() {
|
|
|
152
152
|
# Show usage
|
|
153
153
|
show_usage() {
|
|
154
154
|
cat << 'EOF'
|
|
155
|
-
CFN Local
|
|
155
|
+
CFN Local CodeSearch Integration
|
|
156
156
|
|
|
157
|
-
Usage: cfn-local-
|
|
157
|
+
Usage: cfn-local-codesearch <COMMAND> [OPTIONS]
|
|
158
158
|
|
|
159
159
|
Commands:
|
|
160
|
-
init [DIR] Initialize Local
|
|
160
|
+
init [DIR] Initialize Local CodeSearch in project directory
|
|
161
161
|
index [DIR] [TYPES] Index code files (default types: rs,py,js,ts)
|
|
162
162
|
query DIR PATTERN [N] Query for patterns (default limit: 10)
|
|
163
163
|
stats [DIR] Show detailed statistics
|
|
@@ -165,25 +165,25 @@ Commands:
|
|
|
165
165
|
|
|
166
166
|
Examples:
|
|
167
167
|
# Initialize in current project
|
|
168
|
-
cfn-local-
|
|
168
|
+
cfn-local-codesearch init
|
|
169
169
|
|
|
170
170
|
# Initialize specific project
|
|
171
|
-
cfn-local-
|
|
171
|
+
cfn-local-codesearch init /path/to/project
|
|
172
172
|
|
|
173
173
|
# Index all code types
|
|
174
|
-
cfn-local-
|
|
174
|
+
cfn-local-codesearch index
|
|
175
175
|
|
|
176
176
|
# Index only Rust files
|
|
177
|
-
cfn-local-
|
|
177
|
+
cfn-local-codesearch index . rs
|
|
178
178
|
|
|
179
179
|
# Query for patterns
|
|
180
|
-
cfn-local-
|
|
180
|
+
cfn-local-codesearch query . "authentication middleware"
|
|
181
181
|
|
|
182
182
|
# Get statistics
|
|
183
|
-
cfn-local-
|
|
183
|
+
cfn-local-codesearch stats
|
|
184
184
|
|
|
185
185
|
# Coordinate generation (used by CFN agents)
|
|
186
|
-
cfn-local-
|
|
186
|
+
cfn-local-codesearch coordinate agent-123 src/auth.rs "create auth middleware"
|
|
187
187
|
|
|
188
188
|
Environment Variables:
|
|
189
189
|
RUVECTOR_VERBOSE=1 Enable verbose logging
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# index-code.sh - Index codebase using local-
|
|
2
|
+
# index-code.sh - Index codebase using local-codesearch Rust binary
|
|
3
3
|
# This is a wrapper around the Rust binary for convenience
|
|
4
4
|
|
|
5
5
|
set -e
|
|
@@ -40,7 +40,7 @@ if [[ "$HELP" == true ]]; then
|
|
|
40
40
|
cat << EOF
|
|
41
41
|
Usage: index-code [OPTIONS] [PATH]
|
|
42
42
|
|
|
43
|
-
Index codebase patterns using local-
|
|
43
|
+
Index codebase patterns using local-codesearch Rust binary
|
|
44
44
|
|
|
45
45
|
Arguments:
|
|
46
46
|
PATH Path to directory to index (default: current directory)
|
|
@@ -51,7 +51,7 @@ Options:
|
|
|
51
51
|
--help, -h Show this help
|
|
52
52
|
|
|
53
53
|
Database Location:
|
|
54
|
-
~/.local/share/
|
|
54
|
+
~/.local/share/codesearch/index_v2.db
|
|
55
55
|
|
|
56
56
|
Examples:
|
|
57
57
|
index-code --path ~/projects/my-app
|
|
@@ -62,13 +62,13 @@ EOF
|
|
|
62
62
|
fi
|
|
63
63
|
|
|
64
64
|
# Find the binary
|
|
65
|
-
if command -v local-
|
|
66
|
-
BINARY="local-
|
|
67
|
-
elif [[ -x "$HOME/.local/bin/local-
|
|
68
|
-
BINARY="$HOME/.local/bin/local-
|
|
65
|
+
if command -v local-codesearch &>/dev/null; then
|
|
66
|
+
BINARY="local-codesearch"
|
|
67
|
+
elif [[ -x "$HOME/.local/bin/local-codesearch" ]]; then
|
|
68
|
+
BINARY="$HOME/.local/bin/local-codesearch"
|
|
69
69
|
else
|
|
70
|
-
echo "❌ Error: local-
|
|
71
|
-
echo " Install with: ./scripts/install-
|
|
70
|
+
echo "❌ Error: local-codesearch binary not found"
|
|
71
|
+
echo " Install with: ./scripts/install-codesearch-global.sh"
|
|
72
72
|
exit 1
|
|
73
73
|
fi
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ PATH_TO_INDEX="$(cd "$PATH_TO_INDEX" 2>/dev/null && pwd)" || {
|
|
|
80
80
|
|
|
81
81
|
echo "🔍 Indexing code patterns in: $PATH_TO_INDEX"
|
|
82
82
|
echo "📄 File types: $FILE_TYPES"
|
|
83
|
-
echo "🗄️ Database: ~/.local/share/
|
|
83
|
+
echo "🗄️ Database: ~/.local/share/codesearch/index_v2.db"
|
|
84
84
|
echo ""
|
|
85
85
|
|
|
86
86
|
# Run the indexer
|
|
@@ -88,4 +88,4 @@ $BINARY index --path "$PATH_TO_INDEX" --types "$FILE_TYPES"
|
|
|
88
88
|
|
|
89
89
|
echo ""
|
|
90
90
|
echo "✅ Indexing complete!"
|
|
91
|
-
echo "💡 Query patterns with: sqlite3 ~/.local/share/
|
|
91
|
+
echo "💡 Query patterns with: sqlite3 ~/.local/share/codesearch/index_v2.db \"SELECT * FROM entities WHERE name LIKE '%keyword%';\""
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Index all files in the project
|
|
3
3
|
|
|
4
4
|
echo "Starting comprehensive indexing of all files..."
|
|
5
|
-
cd .claude/skills/cfn-local-
|
|
5
|
+
cd .claude/skills/cfn-local-codesearch-accelerator
|
|
6
6
|
|
|
7
7
|
# Clear existing index
|
|
8
8
|
rm -rf index/
|
|
@@ -34,7 +34,7 @@ for ext in "${file_types[@]}"; do
|
|
|
34
34
|
fi
|
|
35
35
|
|
|
36
36
|
# Index this file type
|
|
37
|
-
local-
|
|
37
|
+
local-codesearch index --path ../.. --types ${ext} --force
|
|
38
38
|
|
|
39
39
|
if [ $? -eq 0 ]; then
|
|
40
40
|
echo "✅ Successfully indexed .${ext} files"
|
package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/ingest-agent-transcript.sh
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# ingest-agent-transcript.sh - Extract and index agent transcript data for
|
|
2
|
+
# ingest-agent-transcript.sh - Extract and index agent transcript data for CodeSearch
|
|
3
3
|
#
|
|
4
4
|
# Purpose: Process agent transcripts to extract searchable decision points,
|
|
5
5
|
# tool usage patterns, and failure contexts for future semantic search.
|
|
@@ -21,7 +21,7 @@ set -euo pipefail
|
|
|
21
21
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
22
22
|
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
|
|
23
23
|
DB_PATH="${PROJECT_ROOT}/.claude/skills/cfn-redis-coordination/data/cfn-loop.db"
|
|
24
|
-
LOG_PATH="${PROJECT_ROOT}/.artifacts/logs/
|
|
24
|
+
LOG_PATH="${PROJECT_ROOT}/.artifacts/logs/codesearch-ingestion.log"
|
|
25
25
|
|
|
26
26
|
# Ensure dependencies exist
|
|
27
27
|
mkdir -p "$(dirname "$LOG_PATH")"
|
|
@@ -77,13 +77,13 @@ if [ ! -f "$TRANSCRIPT" ]; then
|
|
|
77
77
|
exit 1
|
|
78
78
|
fi
|
|
79
79
|
|
|
80
|
-
echo "[
|
|
80
|
+
echo "[CodeSearch] Starting transcript ingestion for $AGENT_ID ($AGENT_TYPE)" | tee -a "$LOG_PATH"
|
|
81
81
|
|
|
82
82
|
# ============================================================================
|
|
83
83
|
# Initialize Schema Extensions
|
|
84
84
|
# ============================================================================
|
|
85
85
|
|
|
86
|
-
# Create extended schema for agent lifecycle data in
|
|
86
|
+
# Create extended schema for agent lifecycle data in CodeSearch
|
|
87
87
|
sqlite3 "$DB_PATH" <<'EOF'
|
|
88
88
|
-- Agent transcript embeddings table
|
|
89
89
|
CREATE TABLE IF NOT EXISTS agent_transcripts (
|
|
@@ -124,7 +124,7 @@ CREATE INDEX IF NOT EXISTS idx_failure_patterns_agent_type ON agent_failure_patt
|
|
|
124
124
|
CREATE INDEX IF NOT EXISTS idx_failure_patterns_mode ON agent_failure_patterns(failure_mode);
|
|
125
125
|
EOF
|
|
126
126
|
|
|
127
|
-
echo "[
|
|
127
|
+
echo "[CodeSearch] Schema initialized" | tee -a "$LOG_PATH"
|
|
128
128
|
|
|
129
129
|
# ============================================================================
|
|
130
130
|
# Extract Decision Points and Tool Usage from Transcript
|
|
@@ -222,7 +222,7 @@ SQL_EOF
|
|
|
222
222
|
|
|
223
223
|
done < "$TRANSCRIPT"
|
|
224
224
|
|
|
225
|
-
echo "[
|
|
225
|
+
echo "[CodeSearch] Extracted $SNIPPETS_EXTRACTED snippets from transcript" | tee -a "$LOG_PATH"
|
|
226
226
|
|
|
227
227
|
# ============================================================================
|
|
228
228
|
# Update Agent Metadata
|
|
@@ -233,21 +233,21 @@ sqlite3 "$DB_PATH" <<EOF
|
|
|
233
233
|
UPDATE agents
|
|
234
234
|
SET metadata = json_set(
|
|
235
235
|
metadata,
|
|
236
|
-
'$.
|
|
236
|
+
'$.codesearch_processed',
|
|
237
237
|
'true',
|
|
238
|
-
'$.
|
|
238
|
+
'$.codesearch_snippets',
|
|
239
239
|
$SNIPPETS_EXTRACTED
|
|
240
240
|
)
|
|
241
241
|
WHERE id = '$AGENT_ID';
|
|
242
242
|
EOF
|
|
243
243
|
|
|
244
|
-
echo "[
|
|
244
|
+
echo "[CodeSearch] Updated agent metadata for $AGENT_ID" | tee -a "$LOG_PATH"
|
|
245
245
|
|
|
246
246
|
# ============================================================================
|
|
247
247
|
# Success Exit
|
|
248
248
|
# ============================================================================
|
|
249
249
|
|
|
250
|
-
echo "[
|
|
250
|
+
echo "[CodeSearch] Transcript ingestion completed successfully" | tee -a "$LOG_PATH"
|
|
251
251
|
echo " Agent: $AGENT_ID ($AGENT_TYPE)"
|
|
252
252
|
echo " Snippets: $SNIPPETS_EXTRACTED"
|
|
253
253
|
echo " Success: $SUCCESS"
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# init-local-
|
|
2
|
+
# init-local-codesearch.sh - Verify and setup local CodeSearch
|
|
3
3
|
# Ensures the Rust binary is installed and PATH is configured
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
7
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
BINARY_PATH="$HOME/.local/bin/local-
|
|
9
|
-
DB_PATH="$HOME/.local/share/
|
|
8
|
+
BINARY_PATH="$HOME/.local/bin/local-codesearch"
|
|
9
|
+
DB_PATH="$HOME/.local/share/codesearch/index_v2.db"
|
|
10
10
|
|
|
11
|
-
echo "🚀 Checking Local
|
|
11
|
+
echo "🚀 Checking Local CodeSearch Installation..."
|
|
12
12
|
echo ""
|
|
13
13
|
|
|
14
14
|
# Check if binary exists in PATH
|
|
15
|
-
if command -v local-
|
|
16
|
-
BINARY_LOCATION=$(command -v local-
|
|
17
|
-
VERSION=$(local-
|
|
18
|
-
echo "✅ local-
|
|
15
|
+
if command -v local-codesearch &>/dev/null; then
|
|
16
|
+
BINARY_LOCATION=$(command -v local-codesearch)
|
|
17
|
+
VERSION=$(local-codesearch --version 2>/dev/null || echo "unknown")
|
|
18
|
+
echo "✅ local-codesearch found in PATH"
|
|
19
19
|
echo " Location: $BINARY_LOCATION"
|
|
20
20
|
echo " Version: $VERSION"
|
|
21
21
|
elif [[ -x "$BINARY_PATH" ]]; then
|
|
22
22
|
VERSION=$($BINARY_PATH --version 2>/dev/null || echo "unknown")
|
|
23
|
-
echo "✅ local-
|
|
23
|
+
echo "✅ local-codesearch found at $BINARY_PATH"
|
|
24
24
|
echo " Version: $VERSION"
|
|
25
25
|
echo ""
|
|
26
26
|
echo "⚠️ Binary not in PATH. Add to your shell profile:"
|
|
27
27
|
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
|
|
28
28
|
else
|
|
29
|
-
echo "❌ local-
|
|
29
|
+
echo "❌ local-codesearch binary not found"
|
|
30
30
|
echo ""
|
|
31
31
|
echo "📦 Installation options:"
|
|
32
32
|
echo ""
|
|
33
33
|
echo " Option 1 - Use install script (if available):"
|
|
34
|
-
echo " ./scripts/install-
|
|
34
|
+
echo " ./scripts/install-codesearch-global.sh"
|
|
35
35
|
echo ""
|
|
36
36
|
echo " Option 2 - Build from source (requires Rust):"
|
|
37
37
|
echo " cd $SCRIPT_DIR"
|
|
38
38
|
echo " cargo build --release"
|
|
39
|
-
echo " cp target/release/local-
|
|
39
|
+
echo " cp target/release/local-codesearch ~/.local/bin/"
|
|
40
40
|
echo ""
|
|
41
41
|
exit 1
|
|
42
42
|
fi
|
|
@@ -56,18 +56,18 @@ if [[ -f "$DB_PATH" ]]; then
|
|
|
56
56
|
echo " Projects: $PROJECT_COUNT"
|
|
57
57
|
else
|
|
58
58
|
echo "⚠️ No database found at $DB_PATH"
|
|
59
|
-
echo " Index a project with: local-
|
|
59
|
+
echo " Index a project with: local-codesearch index --path /your/project"
|
|
60
60
|
fi
|
|
61
61
|
|
|
62
62
|
echo ""
|
|
63
63
|
echo "📖 Quick Start:"
|
|
64
64
|
echo " # Index a project"
|
|
65
|
-
echo " local-
|
|
65
|
+
echo " local-codesearch index --path ~/projects/my-app --types ts,tsx,js,jsx,py"
|
|
66
66
|
echo ""
|
|
67
67
|
echo " # Query via SQL"
|
|
68
68
|
echo " sqlite3 $DB_PATH \"SELECT file_path, name FROM entities WHERE name LIKE '%auth%' LIMIT 10;\""
|
|
69
69
|
echo ""
|
|
70
70
|
echo " # Semantic search"
|
|
71
|
-
echo " local-
|
|
71
|
+
echo " local-codesearch query \"authentication middleware\""
|
|
72
72
|
echo ""
|
|
73
|
-
echo "🎉 Local
|
|
73
|
+
echo "🎉 Local CodeSearch is ready!"
|
package/.claude/skills/{cfn-local-ruvector-accelerator → cfn-codesearch}/project-structure.md
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Project-Specific Local
|
|
1
|
+
# Project-Specific Local CodeSearch Structure
|
|
2
2
|
|
|
3
3
|
## Current (Global) Structure:
|
|
4
4
|
```
|
|
5
|
-
~/.local-
|
|
5
|
+
~/.local-codesearch/
|
|
6
6
|
├── storage/
|
|
7
7
|
├── indexes/
|
|
8
8
|
└── config/
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
## Proposed Project-Specific Structure:
|
|
12
12
|
```
|
|
13
13
|
.your-project/
|
|
14
|
-
├── .
|
|
14
|
+
├── .codesearch/
|
|
15
15
|
│ ├── storage/
|
|
16
16
|
│ │ ├── embeddings.bin
|
|
17
17
|
│ │ └── cache.db
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
|
|
26
26
|
### 1. Update init script to accept project path:
|
|
27
27
|
```bash
|
|
28
|
-
# Instead of ~/.local-
|
|
29
|
-
./init-local-
|
|
28
|
+
# Instead of ~/.local-codesearch
|
|
29
|
+
./init-local-codesearch.sh --project-path /path/to/project
|
|
30
30
|
|
|
31
31
|
# Or detect current directory
|
|
32
|
-
./init-local-
|
|
32
|
+
./init-local-codesearch.sh --here
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### 2. Update index and query scripts:
|
|
36
36
|
```bash
|
|
37
|
-
# Auto-detect .
|
|
37
|
+
# Auto-detect .codesearch directory
|
|
38
38
|
# Fall back to parent directories
|
|
39
|
-
# Respect .gitignore for .
|
|
39
|
+
# Respect .gitignore for .codesearch/
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
### 3. Add .gitignore entry:
|
|
43
43
|
```
|
|
44
44
|
# .gitignore
|
|
45
|
-
.
|
|
45
|
+
.codesearch/
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
### 4. Benefits:
|
|
@@ -50,4 +50,4 @@
|
|
|
50
50
|
- Team members can share patterns
|
|
51
51
|
- No global state pollution
|
|
52
52
|
- Works with monorepos (each subproject has own patterns)
|
|
53
|
-
- Easy to clean up (just delete .
|
|
53
|
+
- Easy to clean up (just delete .codesearch/)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# query-local.sh - Query local
|
|
2
|
+
# query-local.sh - Query local CodeSearch for patterns using Rust binary
|
|
3
3
|
# This is a wrapper around the Rust binary for convenience
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
7
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
DB_PATH="$HOME/.local/share/
|
|
8
|
+
DB_PATH="$HOME/.local/share/codesearch/index_v2.db"
|
|
9
9
|
|
|
10
10
|
# Parse arguments
|
|
11
11
|
PATTERN=""
|
|
@@ -50,7 +50,7 @@ if [[ "$HELP" == true ]] || [[ -z "$PATTERN" ]]; then
|
|
|
50
50
|
cat << EOF
|
|
51
51
|
Usage: query-local [OPTIONS] PATTERN
|
|
52
52
|
|
|
53
|
-
Query local
|
|
53
|
+
Query local CodeSearch database for code patterns
|
|
54
54
|
|
|
55
55
|
Arguments:
|
|
56
56
|
PATTERN Search pattern (entity name or partial match)
|
|
@@ -86,8 +86,8 @@ fi
|
|
|
86
86
|
|
|
87
87
|
# Check if database exists
|
|
88
88
|
if [[ ! -f "$DB_PATH" ]]; then
|
|
89
|
-
echo "❌ Error:
|
|
90
|
-
echo " Run: local-
|
|
89
|
+
echo "❌ Error: CodeSearch database not found at $DB_PATH"
|
|
90
|
+
echo " Run: local-codesearch index --path /your/project"
|
|
91
91
|
exit 1
|
|
92
92
|
fi
|
|
93
93
|
|
|
@@ -118,7 +118,7 @@ if [[ -z "$RESULTS" ]]; then
|
|
|
118
118
|
echo "💡 Tips:"
|
|
119
119
|
echo " - Try a broader search term"
|
|
120
120
|
echo " - Check if your project is indexed: sqlite3 $DB_PATH 'SELECT COUNT(*) FROM entities;'"
|
|
121
|
-
echo " - Reindex if needed: local-
|
|
121
|
+
echo " - Reindex if needed: local-codesearch index --path /your/project"
|
|
122
122
|
else
|
|
123
123
|
echo "$RESULTS"
|
|
124
124
|
echo ""
|