# Inspect: Store Profiles in Project/Local Settings

## Overview
Profiles were written to clone-local preferences (.git/entire/preferences.json) — hidden and unshareable. Persist them to .entire/settings.json (shared, committed) or .entire/settings.local.json (per-developer) instead, and let the user choose:
- guided setup / --configure / --edit prompt for the destination,
- scripted --configure honors a new --local flag (default: project),
- non-interactive first run writes the project file.

### Functionality

- `saveReviewProfile` / `saveReviewProfileConfig` now do a raw read-modify-write on the chosen file preserving unrelated keys and other profiles and ensure `.entire/` exists.
- `settings.Load` now merges `review_profiles` per profile name across project → clone-prefs → local, so a team can share profiles in the project file while individuals can add or override profiles locally without hiding the shared set.
- Improves the output-destination picker wording and adds tests for the project-vs-local save (no leakage of local-only profiles into the shared file).

## Sessions
`entire inspect` runs a named review profile: a set of **inspector** agents run a shared task in parallel, then a single **judge** consolidates their reports into the final verdict in a closing round. Inspector sessions are immutable facts attached to checkpoints; the final verdict is stored locally in the review manifest. On the next `git commit`, inspector sessions are condensed into the checkpoint metadata, permanently recording that the code was reviewed and which skills were run.

Profiles live in `.entire/settings.json` under `review_profiles`; adapter-backed inspectors (claude-code, codex, gemini-cli) receive `ENTIRE_REVIEW_*` env vars that the `UserPromptSubmit` hook reads to tag the session as `Kind = "agent_review"`. Multi-agent runs use a TUI dashboard + automatic single-judge synthesis.

### Review Command Documentation
See [Review Command](docs/architecture/review-command.md) for the full command surface, settings schema, env-var handshake, multi-agent UI, anti-features (do NOT recreate), and key-file map.

## Configuration Options
- `--set-agents`: with `--configure`: comma-separated inspector agents for the profile
- `--set-judge`: with `--configure`: the consolidating judge as agent[=model]
- `--set-output`: with `--configure`: where the verdict goes — local (default) or trail
- `--local`: with `--configure`: save to .entire/settings.local.json (just you) instead of .entire/settings.json (shared). Interactive setup asks.
- `--set-task`: with `--configure`: the profile's canonical task text
- `--set-model`: with `--configure`: per-inspector model as agent=model (repeatable)
- `--set-slot`: with `--configure`: an inspector slot as agent[=model] (repeatable; same agent/model may repeat)

## Settings Schema
Profiles are configured in clone-local preferences or settings under `review_profiles`:
Profiles are configured under `review_profiles` in either the shared project settings (.entire/settings.json, committed) or the per-developer override (.entire/settings.local.json, git-ignored). Guided setup and `--configure` let the user pick the destination (`--local` for the scripted path); the non-interactive first run writes the project file. The two layers (plus legacy clone-local preferences) are **merged per profile name** by `settings.Load`, so a team can share profiles in the project file while individuals add or override profiles locally without hiding the shared set.
