claude-flow
Version:
Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)
138 lines • 5.69 kB
JSON
{
"env": {
"CLAUDE_FLOW_AUTO_COMMIT": "false",
"CLAUDE_FLOW_AUTO_PUSH": "false",
"CLAUDE_FLOW_HOOKS_ENABLED": "true",
"CLAUDE_FLOW_TELEMETRY_ENABLED": "true",
"CLAUDE_FLOW_REMOTE_EXECUTION": "true",
"CLAUDE_FLOW_GITHUB_INTEGRATION": "true",
"CLAUDE_FLOW_CHECKPOINTS_ENABLED": "true"
},
"permissions": {
"allow": [
"Bash(npx claude-flow *)",
"Bash(npm run lint)",
"Bash(npm run test:*)",
"Bash(npm test *)",
"Bash(git status)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push)",
"Bash(git config *)",
"Bash(git tag *)",
"Bash(git branch *)",
"Bash(git checkout *)",
"Bash(git stash *)",
"Bash(gh *)",
"Bash(node *)",
"Bash(which *)",
"Bash(pwd)",
"Bash(ls *)",
"Bash(jq *)"
],
"deny": [
"Bash(rm -rf /)",
"Bash(curl * | bash)",
"Bash(wget * | sh)",
"Bash(eval *)"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true"
}
]
},
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-edit --file '{}' --auto-assign-agents true --load-context true"
},
{
"type": "command",
"command": "bash -c 'FILE=$(echo \\\"{{tool_input}}\\\" | jq -r \\\".file_path // empty\\\") && [ -n \\\"$FILE\\\" ] && git add -A && git commit -m \\\"🔖 Pre-edit checkpoint: $FILE\\\" --quiet || true && echo \\\"✅ Created pre-edit checkpoint for $FILE\\\"'"
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true"
}
]
},
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-edit --file '{}' --format true --update-memory true"
},
{
"type": "command",
"command": "bash -c 'FILE=$(echo \\\"{{tool_input}}\\\" | jq -r \\\".file_path // empty\\\") && [ -n \\\"$FILE\\\" ] && git add \\\"$FILE\\\" && git commit -m \\\"🔖 Post-edit checkpoint: $FILE\\\" --quiet && TAG=\\\"checkpoint-$(date +%Y%m%d-%H%M%S)\\\" && git tag \\\"$TAG\\\" && echo \\\"✅ Created checkpoint: $TAG\\\"'"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "bash -c 'TASK=$(echo \\\"{{user_prompt}}\\\" | head -c 50 | tr \\\"\\\\n\\\" \\\" \\\") && git add -A && git commit -m \\\"🔖 Task checkpoint: $TASK...\\\" --quiet || true && echo \\\"✅ Created task checkpoint\\\"'"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true"
},
{
"type": "command",
"command": "bash -c 'git log --oneline -10 --grep=\\\"checkpoint\\\" > .claude/last-session-checkpoints.txt && echo \\\"📋 Session checkpoints saved to .claude/last-session-checkpoints.txt\\\"'"
}
]
}
],
"PreCompact": [
{
"matcher": "manual",
"hooks": [
{
"type": "command",
"command": "/bin/bash -c 'INPUT=$(cat); CUSTOM=$(echo \"$INPUT\" | jq -r \".custom_instructions // \\\"\\\"\"); echo \"🔄 PreCompact Guidance:\"; echo \"📋 IMPORTANT: Review CLAUDE.md in project root for:\"; echo \" • 54 available agents and concurrent usage patterns\"; echo \" • Swarm coordination strategies (hierarchical, mesh, adaptive)\"; echo \" • SPARC methodology workflows with batchtools optimization\"; echo \" • Critical concurrent execution rules (GOLDEN RULE: 1 MESSAGE = ALL OPERATIONS)\"; if [ -n \"$CUSTOM\" ]; then echo \"🎯 Custom compact instructions: $CUSTOM\"; fi; echo \"✅ Ready for compact operation\"'"
}
]
},
{
"matcher": "auto",
"hooks": [
{
"type": "command",
"command": "/bin/bash -c 'echo \"🔄 Auto-Compact Guidance (Context Window Full):\"; echo \"📋 CRITICAL: Before compacting, ensure you understand:\"; echo \" • All 54 agents available in .claude/agents/ directory\"; echo \" • Concurrent execution patterns from CLAUDE.md\"; echo \" • Batchtools optimization for 300% performance gains\"; echo \" • Swarm coordination strategies for complex tasks\"; echo \"⚡ Apply GOLDEN RULE: Always batch operations in single messages\"; echo \"✅ Auto-compact proceeding with full agent context\"'"
}
]
}
]
},
"includeCoAuthoredBy": true,
"enabledMcpjsonServers": ["claude-flow", "ruv-swarm"]
}