Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .claude/agentic-flow-fast.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# Fast agentic-flow hooks wrapper - avoids npx overhead
# Usage: .claude/agentic-flow-fast.sh workers <command> [args...]

# Find agentic-flow CLI - check local first, then global
AGENTIC_CLI=""

# Check local npm package (for development)
if [ -f "$PWD/node_modules/agentic-flow/bin/cli.js" ]; then
AGENTIC_CLI="$PWD/node_modules/agentic-flow/bin/cli.js"
# Check global npm installation
elif [ -f "$PWD/node_modules/.bin/agentic-flow" ]; then
exec "$PWD/node_modules/.bin/agentic-flow" "$@"
elif command -v agentic-flow &> /dev/null; then
exec agentic-flow "$@"
# Fallback to npx (slow but works)
else
exec npx agentic-flow@alpha "$@"
fi

# Execute with node directly (fast path)
exec node "$AGENTIC_CLI" "$@"
23 changes: 23 additions & 0 deletions .claude/ruvector-fast.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Fast RuVector hooks wrapper - avoids npx overhead (20x faster)
# Usage: .claude/ruvector-fast.sh hooks <command> [args...]

# Find ruvector CLI - check local first, then global
RUVECTOR_CLI=""

# Check local npm package
if [ -f "$PWD/npm/packages/ruvector/bin/cli.js" ]; then
RUVECTOR_CLI="$PWD/npm/packages/ruvector/bin/cli.js"
# Check node_modules
elif [ -f "$PWD/node_modules/ruvector/bin/cli.js" ]; then
RUVECTOR_CLI="$PWD/node_modules/ruvector/bin/cli.js"
# Check global npm
elif command -v ruvector &> /dev/null; then
exec ruvector "$@"
# Fallback to npx (slow but works)
else
exec npx ruvector@latest "$@"
fi

# Execute with node directly (fast path)
exec node "$RUVECTOR_CLI" "$@"
80 changes: 60 additions & 20 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"permissions": {
"allow": [
"Bash(npx claude-flow:*)",
"Bash(npx ruvector:*)",
"Bash(npx agentic-flow:*)",
"Bash(npm run:*)",
"Bash(npm test:*)",
"Bash(cargo:*)",
Expand All @@ -41,6 +43,8 @@
"Bash(ls:*)",
"Bash(.claude/hooks:*)",
"Bash(.claude/intelligence:*)",
"Bash(.claude/ruvector-fast.sh:*)",
"Bash(.claude/agentic-flow-fast.sh:*)",
"Bash(ruvector:*)",
"Bash(ruvector-cli:*)"
],
Expand All @@ -55,7 +59,13 @@
"hooks": [
{
"type": "command",
"command": "/usr/local/bin/ruvector-cli hooks pre-edit \"$TOOL_INPUT_file_path\""
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks pre-edit \"$TOOL_INPUT_file_path\" 2>/dev/null || true"
},
{
"type": "command",
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks coedit-suggest --file \"$TOOL_INPUT_file_path\" 2>/dev/null || true"
}
]
},
Expand All @@ -64,7 +74,8 @@
"hooks": [
{
"type": "command",
"command": "/usr/local/bin/ruvector-cli hooks pre-command \"$TOOL_INPUT_command\""
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks pre-command \"$TOOL_INPUT_command\" 2>/dev/null || true"
}
]
},
Expand All @@ -73,8 +84,8 @@
"hooks": [
{
"type": "command",
"timeout": 1000,
"command": "/usr/local/bin/ruvector-cli hooks remember \"Reading: $TOOL_INPUT_file_path\" -t file_access 2>/dev/null || true"
"timeout": 300,
"command": ".claude/ruvector-fast.sh hooks remember \"Reading: $TOOL_INPUT_file_path\" -t file_access 2>/dev/null || true"
}
]
},
Expand All @@ -83,8 +94,8 @@
"hooks": [
{
"type": "command",
"timeout": 1000,
"command": "/usr/local/bin/ruvector-cli hooks remember \"Search: $TOOL_INPUT_pattern\" -t search_pattern 2>/dev/null || true"
"timeout": 300,
"command": ".claude/ruvector-fast.sh hooks remember \"Search: $TOOL_INPUT_pattern\" -t search_pattern 2>/dev/null || true"
}
]
},
Expand All @@ -93,8 +104,8 @@
"hooks": [
{
"type": "command",
"timeout": 1000,
"command": "/usr/local/bin/ruvector-cli hooks remember \"Agent: $TOOL_INPUT_subagent_type\" -t agent_spawn 2>/dev/null || true"
"timeout": 300,
"command": ".claude/ruvector-fast.sh hooks remember \"Agent: $TOOL_INPUT_subagent_type\" -t agent_spawn 2>/dev/null || true"
}
]
}
Expand All @@ -105,7 +116,8 @@
"hooks": [
{
"type": "command",
"command": "/usr/local/bin/ruvector-cli hooks post-edit \"$TOOL_INPUT_file_path\""
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks post-edit \"$TOOL_INPUT_file_path\" 2>/dev/null || true"
}
]
},
Expand All @@ -114,7 +126,8 @@
"hooks": [
{
"type": "command",
"command": "/usr/local/bin/ruvector-cli hooks post-command \"$TOOL_INPUT_command\""
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks post-command \"$TOOL_INPUT_command\" 2>/dev/null || true"
}
]
}
Expand All @@ -124,7 +137,13 @@
"hooks": [
{
"type": "command",
"command": "/usr/local/bin/ruvector-cli hooks session-start"
"timeout": 1000,
"command": ".claude/ruvector-fast.sh hooks session-start 2>/dev/null || true"
},
{
"type": "command",
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks trajectory-begin -c \"claude-session\" -a \"claude\" 2>/dev/null || true"
}
]
}
Expand All @@ -134,7 +153,13 @@
"hooks": [
{
"type": "command",
"command": "/usr/local/bin/ruvector-cli hooks session-end"
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks trajectory-end --success --quality 0.8 2>/dev/null || true"
},
{
"type": "command",
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks session-end 2>/dev/null || true"
}
]
}
Expand All @@ -145,8 +170,13 @@
"hooks": [
{
"type": "command",
"timeout": 3000,
"command": "/usr/local/bin/ruvector-cli hooks pre-compact --auto"
"timeout": 1000,
"command": ".claude/ruvector-fast.sh hooks pre-compact --auto 2>/dev/null || true"
},
{
"type": "command",
"timeout": 1000,
"command": ".claude/ruvector-fast.sh hooks compress 2>/dev/null || true"
}
]
},
Expand All @@ -155,19 +185,29 @@
"hooks": [
{
"type": "command",
"timeout": 3000,
"command": "/usr/local/bin/ruvector-cli hooks pre-compact"
"timeout": 1000,
"command": ".claude/ruvector-fast.sh hooks pre-compact 2>/dev/null || true"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"timeout": 500,
"command": ".claude/ruvector-fast.sh hooks suggest-context 2>/dev/null || true"
},
{
"type": "command",
"timeout": 2000,
"command": "/usr/local/bin/ruvector-cli hooks suggest-context"
"command": ".claude/agentic-flow-fast.sh workers dispatch-prompt \"$CLAUDE_USER_PROMPT\" 2>/dev/null || true"
},
{
"type": "command",
"timeout": 1000,
"command": ".claude/agentic-flow-fast.sh workers inject-context \"$CLAUDE_USER_PROMPT\" 2>/dev/null || true"
}
]
}
Expand All @@ -178,8 +218,8 @@
"hooks": [
{
"type": "command",
"timeout": 1000,
"command": "/usr/local/bin/ruvector-cli hooks track-notification"
"timeout": 300,
"command": ".claude/ruvector-fast.sh hooks track-notification 2>/dev/null || true"
}
]
}
Expand All @@ -194,4 +234,4 @@
"type": "command",
"command": ".claude/statusline-command.sh"
}
}
}
Loading