Session Hook Setup
faf_setupInstall or remove the native SessionStart hook in project settings so every Claude Code session starts with fresh .faf context. Previews first; writes only with confirm: true.
Instructions
Install the native SessionStart hook in the project settings (/.claude/settings.json) — every Claude Code session in this project starts with fresh .faf context. Shows the exact settings first (preview); writes only with confirm: true, install or remove. faf changes only its own hook entry; every other key and hook stays as written. remove: true takes out only the hook whose command is exactly the faf hook command. Never writes the user settings: the home folder is refused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Project path. Defaults to the current project context. | |
| remove | No | Remove the faf SessionStart hook (and only it) from the project settings. Previews unless confirm: true. | |
| confirm | No | Write the change to the project settings (.claude/settings.json). Without it, faf_setup only previews — install and remove alike. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | What faf_setup did | |
| message | Yes | Human-readable summary | |
| settings | No | The full settings object as written (or as it would be written in preview) | |
| hookCommand | No | The command the SessionStart hook runs | |
| settingsPath | Yes | The settings file involved |