brain_setup
Initialize BrainOS project state when no store exists: preview proposed files and confirm before writing, without overwriting existing instructions.
Instructions
Set up Brain OS in a project folder when no store exists yet (tools return 'No Brain OS store found'). Two steps, never skip the first: (1) call with no confirm — returns the proposed folder, a question for the user, and the exact files that would be created, refreshed, or preserved; nothing is written. It also returns a single-use preview_token. (2) Only after the user explicitly says yes, call again with confirm=true, the same target_dir and options, and that preview_token; writes without a matching token are refused. Existing instruction files are never overwritten; any that need a Brain OS line are listed in plan.needsIntegration — tell the user. Writes nothing outside the project unless include_user_protocol=true. If a store already exists, it reports that and does nothing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | true only after the user approved the folder and plan from the preview call. | |
| minimal | No | Install only AGENTS.md + CLAUDE.md instruction files, skip Copilot/Cursor/Zed/Windsurf pointers. | |
| target_dir | No | Absolute path of the project folder. Required with confirm=true. Must be inside an open workspace folder when the client reports them. | |
| preview_token | No | Token from the preview call. Required with confirm=true; single-use, expires after 15 minutes. | |
| include_commands | No | Install Claude Code slash commands into .claude/commands. Default true. | |
| include_user_protocol | No | Also write ~/.claude/brain-os/PROTOCOL.md in the home folder. Default false. |