From fsm-workflow
Install the FSM workflow enforcement hooks. Required after marketplace install for the full package — without these hooks the workflow loses context isolation, single-writer state, nonce-proof reads, and the discipline gate.
How this command is triggered — by the user, by Claude, or both
Slash command
/fsm-workflow:fsm-setup-hooksThe summary Claude sees in its command listing — used to decide when to auto-load this command
The user just ran `/plugin install fsm-workflow` from the Claude Code plugin marketplace and is invoking this command to complete the install. The plugin marketplace ships agents, commands, and templates — but **not** hooks. The hooks are the entire moat of this package. Without them, it's 22 persona agents with no teeth. Your job is to get the four user-level hooks into `~/.claude/hooks/` and registered in `~/.claude/settings.json`. The package ships an idempotent `install.sh` that does exactly this — your job is to run it (with the user's permission) or walk them through running it thems...
The user just ran /plugin install fsm-workflow from the Claude Code plugin marketplace and is invoking this command to complete the install. The plugin marketplace ships agents, commands, and templates — but not hooks. The hooks are the entire moat of this package. Without them, it's 22 persona agents with no teeth.
Your job is to get the four user-level hooks into ~/.claude/hooks/ and registered in ~/.claude/settings.json. The package ships an idempotent install.sh that does exactly this — your job is to run it (with the user's permission) or walk them through running it themselves.
Run:
ls ~/.claude/hooks/block-map-writes.sh \
~/.claude/hooks/block-worker-reads.sh \
~/.claude/hooks/block-model-override.sh \
~/.claude/hooks/surface-map-on-start.sh 2>&1
Also check they're registered in settings.json:
jq '.hooks.PreToolUse, .hooks.SessionStart' ~/.claude/settings.json
If all four files exist AND the settings.json hook arrays reference them → report "enforcement is already active, no action needed" and stop. Do not re-install.
If the hooks are missing, explain plainly:
The Claude Code plugin marketplace installs agents, commands, and templates — but not hooks. This package's entire value proposition is mechanical enforcement via 4 user-level hooks that physically prevent:
- Workers from reading
MAP.mdorCLAUDE.md(context isolation)- Unauthorized agents from writing
MAP.md(single-writer state)- Agents from overriding each other's model assignments (model lock)
- Sessions from resuming blind without a status summary (recovery awareness)
Every competing multi-agent package the author surveyed relies on prompt instructions for these properties — none return
permissionDecision: denyfrom hooks on anything more substantial thanrm -rf. This is the moat. Without the hooks, you have the agents but not the enforcement, and the workflow will drift like everyone else's.
Path A — automatic (with explicit permission). Offer to clone the repo to a temp dir and run the installer yourself. Do NOT proceed without user confirmation — this modifies global Claude Code config.
If the user says yes:
TMP=$(mktemp -d)
git clone --quiet --depth 1 https://github.com/itsaldrincr/claude-code-fsm-workflow.git "$TMP/fsm-workflow"
cd "$TMP/fsm-workflow" && ./install.sh
rm -rf "$TMP"
Path B — manual. Give them the exact commands to run in their own terminal:
git clone https://github.com/itsaldrincr/claude-code-fsm-workflow.git
cd claude-code-fsm-workflow
./install.sh
Path C — ask another Claude. Tell them the repo ships an INSTALL_FOR_CLAUDE.md file that they can paste into a fresh Claude Code session. Claude will walk them through the install with safety checks.
Let the user pick. Default recommendation: Path A (automatic) for users who trust you, Path B (manual) for users who want to see the commands themselves.
After Path A or B runs, verify the install landed:
ls ~/.claude/hooks/{block-map-writes,block-worker-reads,block-model-override,surface-map-on-start}.sh
jq '.hooks.PreToolUse | length, .hooks.SessionStart | length' ~/.claude/settings.json
Expected: all four .sh files listed, PreToolUse length ≥ 3, SessionStart length ≥ 1. Report the numbers to the user.
Tell them:
Close and re-open Claude Code so the new hook registrations take effect. After that,
cdinto any project directory, open Claude Code there, and run/init-workflowto bootstrap that project'sCLAUDE.md+ discipline gate. Then describe what you want to build.
./install.sh without explicit user approval at Step 3. This modifies ~/.claude/settings.json.install.sh script handles backup, idempotent merge, and validation in ways that are hard to replicate line by line. Trust the installer.jq is missing on the user's system, tell them to brew install jq (macOS) or sudo apt install jq (Linux) and stop until they confirm it's installed.npx claudepluginhub itsaldrincr/claude-code-fsm-workflow --plugin fsm-workflow