brain-project-initlisted
Install: claude install-skill Krill113/symbiosis-brain
# Brain Project Init — Onboarding
## When to use
NEVER call this directly. It is invoked by `brain-init` Step 3.1, Step 5,
or Step 5 (migration / recovery branches). User-typed `/brain-project-init`
is allowed only for explicit re-onboarding.
## Inputs
The invoking skill or user passes:
- `scope` — required (already normalized).
- `project_path` — required (CWD usually).
- `mode` — `full` (default) | `recovery` | `migration`.
- `umbrella` — optional, pre-filled in recovery/migration.
## Procedure
### Step 1: Acquire lock
Run via Bash with **120s** timeout (onboarding can be slow on large vaults):
```bash
uv run --directory <symbiosis-brain-tools-path> brain-cli acquire-onboard-lock "$SCOPE" --timeout-s 120
```
(Fallback if `brain-cli` not on PATH: `uv run --directory <path> python -m symbiosis_brain.scope_cli acquire-onboard-lock "$SCOPE" --timeout-s 120`.)
Exit codes:
- `0` — got the lock, proceed.
- `1` — busy (another session is onboarding). See "busy" path below.
- `2` — lockdir unwritable (filesystem error). Tell the user: "Не могу создать lockfile в `<temp>/symbiosis-brain-onboard-<scope>.lock` — проверь права на запись в TEMP. Онбординг отложен." Exit silently.
**Busy path (exit 1):**
- Wait 5 seconds: `sleep 5`.
- Re-run `brain-cli scope-resolve "$PROJECT_PATH"`. If `source=marker_v1` now, another session finished — exit silently.
- Otherwise: tell the user "Параллельная сессия делает онбординг этого scope, ждём", then sleep 10 more, then re-check. After tw