From a234eecf40464f9b6a62079f748c2ab07d3892ed Mon Sep 17 00:00:00 2001 From: Paul Keen <125715+pftg@users.noreply.github.com> Date: Fri, 21 Aug 2026 13:27:12 +0200 Subject: [PATCH] Ruflo harness wiring: statusline + intelligence hooks in project settings statusLine -> .claude/helpers/statusline.cjs (helpers are gitignored, regenerate with: npx @claude-flow/cli init upgrade). Hooks: pre-bash risk check, post-edit learning, session-end persistence via hook-handler.cjs, all fail-open with short timeouts; agent-bootstrap SessionStart preserved. Plus CLAUDE_FLOW env flags and ruflo command permissions from init hooks. Note for cloners: run `npx @claude-flow/cli@latest init upgrade` once to materialize .claude/helpers/, or the statusline/hook commands no-op. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Vbrbwr2zW34aJw3TMjs9wK --- .claude/settings.json | 53 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 4faa7e3dc..a274b6723 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -11,9 +11,58 @@ } ] } + ], + "PreToolUse": [ + { + "matcher": "Bash", + "hooks": [ + { + "type": "command", + "command": "node .claude/helpers/hook-handler.cjs pre-bash || true", + "timeout": 10 + } + ] + } + ], + "PostToolUse": [ + { + "matcher": "Write|Edit", + "hooks": [ + { + "type": "command", + "command": "node .claude/helpers/hook-handler.cjs post-edit || true", + "timeout": 10 + } + ] + } + ], + "SessionEnd": [ + { + "hooks": [ + { + "type": "command", + "command": "node .claude/helpers/hook-handler.cjs session-end || true", + "timeout": 30 + } + ] + } ] }, + "statusLine": { + "type": "command", + "command": "node .claude/helpers/statusline.cjs" + }, "env": { - "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" + "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1", + "CLAUDE_FLOW_V3_ENABLED": "true", + "CLAUDE_FLOW_HOOKS_ENABLED": "true" + }, + "permissions": { + "allow": [ + "Bash(npx @claude-flow*)", + "Bash(npx claude-flow*)", + "Bash(node .claude/*)", + "mcp__claude-flow__*" + ] } -} +} \ No newline at end of file