Stats
Actions
Tags
From fullstack-team
Enforces a pressure-based self-correction loop using bash scripts that monitor failures, restore session state, log compaction checkpoints, and validate tool integrity via PreToolUse guard.
7 events · 22 hooks
Safety signals detected in this hook configuration
Where this hook configuration is defined
Defined in hooks/hooks.json
Event handlers and matchers — expand Raw Configuration for the full JSON
STATE_FILE='.work-state/team-state.md'; if [ ! -f "$STATE_FILE" ] && [ -f '.claude/team-state.md' ]; then STATE_FILE='.claude/team-state.md'; fi; if [ -f "$STATE_FILE" ]; then echo '📋 Final state:' && grep -E '^- \[' "$STATE_FILE" | head -10; if grep -q '\[ \] Phase' "$STATE_FILE"; then echo '⚠️ INCOMPLETE PHASES: There are incomplete phases in team-state.md!'; fi; fi; mkdir -p .work-state && echo "Session ended: $(date '+%Y-%m-%d %H:%M:%S')" >> .work-state/sessions.log 2>/dev/null || true5msSCRIPT="${CLAUDE_PLUGIN_ROOT:-.}/hooks/dod-gate.sh"; if [ -f "$SCRIPT" ]; then bash "$SCRIPT"; else exit 0; fi5msecho '⚠️ Context compacting. State preserved in .work-state/team-state.md' && cat .work-state/team-state.md 2>/dev/null || cat .claude/team-state.md 2>/dev/null || echo 'No active task'5msWrite|Editif echo "$CLAUDE_FILE_PATH" | grep -qE '\.env|\.secret|credentials'; then echo 'BLOCK: Sensitive file' && exit 2; fi5msWrite|Editif command -v jq >/dev/null 2>&1 && [ -f .work-state/team-state.json ]; then T=$(jq -r '.classification.type // ""' .work-state/team-state.json 2>/dev/null); if [ "$T" = "BUG_FIX" ]; then RC=""; [ -f .work-state/artifacts/diagnosis.json ] && RC=$(jq -r '.root_cause // ""' .work-state/artifacts/diagnosis.json 2>/dev/null); if [ -z "$RC" ]; then echo 'ℹ️ BUG_FIX root-cause gate (§4): document the root cause in .work-state/artifacts/diagnosis.json BEFORE editing code — state WHY this fix closes the root cause, not the symptom. Do at least 2 repro/log iterations first.'; fi; fi; fi; exit 05msTaskSTATE_FILE='.work-state/team-state.md'; if [ ! -f "$STATE_FILE" ] && [ -f '.claude/team-state.md' ]; then STATE_FILE='.claude/team-state.md'; fi; if [ ! -f "$STATE_FILE" ]; then echo '⚠️ STATE SYNC WARNING: No .work-state/team-state.md found. Create state file before launching agents!'; else if [ "$(uname)" = "Darwin" ]; then LAST_MOD=$(stat -f %m "$STATE_FILE"); else LAST_MOD=$(stat -c %Y "$STATE_FILE"); fi; NOW=$(date +%s); AGE=$((NOW - LAST_MOD)); if [ $AGE -gt 600 ]; then echo "⚠️ STATE SYNC WARNING: team-state.md not updated for $((AGE / 60)) minutes. Update state before launching more agents!"; fi; fi5msTaskSCRIPT="${CLAUDE_PLUGIN_ROOT:-.}/hooks/validate-state.sh"; if [ -f "$SCRIPT" ]; then bash "$SCRIPT"; else exit 0; fi5msBashSCRIPT="${CLAUDE_PLUGIN_ROOT:-.}/hooks/safety-guard.sh"; if [ -f "$SCRIPT" ]; then bash "$SCRIPT"; else exit 0; fi5msBash(git commit:*)BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "production" ]; then echo '🚫 BLOCK: Direct commits to main/production are not allowed. Create a feature branch first (feat/*, fix/*, etc.)'; exit 2; fi5msBash(git push:*)BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); if echo "$CLAUDE_COMMAND" | grep -qE 'origin (main|production)'; then echo '🚫 BLOCK: Direct push to main/production is not allowed. Use Pull Requests via feature branches.'; exit 2; fi5msBash(gh pr merge:*)echo '🚫 BLOCK: PR merging should be done manually by the user. Do not use gh pr merge.'; exit 25msBash(git merge:*)BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "production" ]; then echo '🚫 BLOCK: Manual merging into main/production is not allowed. Use Pull Requests instead.'; exit 2; fi5msBash(git add:*)if echo "$CLAUDE_COMMAND" | grep -qE '\.work-state'; then echo '🚫 BLOCK: Do not stage .work-state/ files. This directory contains ephemeral session state and must not be committed.'; exit 2; fi5msBash(git commit:*)if git diff --cached --name-only 2>/dev/null | grep -q '^\.work-state/'; then echo '🚫 BLOCK: .work-state/ files are staged for commit. Unstage them first: git reset HEAD .work-state/'; exit 2; fi5msmcp__claude-in-chrome__*MARKER_FILE='.work-state/.manual-qa-active'; if [ ! -f "$MARKER_FILE" ]; then echo '🚫 BLOCK: MCP Chrome tools restricted to manual-qa agent only.'; echo ''; echo 'Main agent/EM must:'; echo '1. Launch manual-qa agent via Task tool (subagent_type="manual-qa")'; echo '2. manual-qa will create marker file, use Chrome tools, and report findings'; echo '3. Never use Chrome tools directly from main agent'; exit 2; fi5msmcp__mobile__(screenshot|get_ui|analyze_screen|tap|long_press|swipe|find_and_tap|tap_by_text|input_text|press_key|find_element|get_current_activity|launch_app|stop_app|shell|open_url|get_logs|launch_desktop_app|stop_desktop_app|get_window_info|focus_window|resize_window|get_clipboard|set_clipboard)MARKER_FILE='.work-state/.manual-qa-active'; if [ ! -f "$MARKER_FILE" ]; then echo '🚫 BLOCK: MCP Mobile interaction tools restricted to manual-qa agent only.'; echo ''; echo 'Allowed without manual-qa (setup/info):'; echo ' list_devices, set_device, set_target, get_target, install_app,'; echo ' get_system_info, get_monitors, get_performance_metrics, clear_logs, wait'; echo ''; echo 'To use interaction tools:'; echo '1. Launch manual-qa agent via Task tool (subagent_type="manual-qa")'; echo '2. manual-qa will create marker file and perform UI testing'; exit 2; fi5msWrite|Editmkdir -p .work-state && echo "[$(date '+%Y-%m-%d %H:%M:%S')] Modified: $CLAUDE_FILE_PATH" >> .work-state/changes.log 2>/dev/null || true5msTaskSTATE_FILE='.work-state/team-state.md'; if [ ! -f "$STATE_FILE" ] && [ -f '.claude/team-state.md' ]; then STATE_FILE='.claude/team-state.md'; fi; if [ -f "$STATE_FILE" ]; then if [ "$(uname)" = "Darwin" ]; then LAST_MOD=$(stat -f %m "$STATE_FILE"); else LAST_MOD=$(stat -c %Y "$STATE_FILE"); fi; NOW=$(date +%s); AGE=$((NOW - LAST_MOD)); if [ $AGE -gt 300 ]; then echo '⚠️ STATE REMINDER: Agent completed. Update .work-state/team-state.md with phase results before proceeding.'; fi; fi5msecho '🚀 Dream Team v2.3 Ready | 15 agents | State sync enabled'5msecho '📝 Subagent finished. Update .work-state/team-state.md with phase results!'5msSCRIPT="${CLAUDE_PLUGIN_ROOT:-.}/hooks/team-nudge.sh"; if [ -f "$SCRIPT" ]; then bash "$SCRIPT"; else exit 0; fi5msSCRIPT="${CLAUDE_PLUGIN_ROOT:-.}/hooks/skill-suggest.sh"; if [ -f "$SCRIPT" ]; then bash "$SCRIPT"; else exit 0; fi5ms13plugins reuse this hooks config
First indexed Jan 26, 2026
Showing the 6 earliest of 13 plugins
npx claudepluginhub andvl1/claude-plugin --plugin fullstack-team