/init-elektra
Run or re-run Elektra's First Session Protocol.
When to use
- First session in a new project (runs automatically via session-init hook)
- User wants to re-onboard: changed role, new team member, different project context
- Reset after cloning into a new machine or workspace
Behavior
Mode detection
Check for existing onboarding state:
if MEMORY.md exists AND contains user_profile:
MODE = "reset"
else:
MODE = "fresh"
Fresh mode (no prior onboarding)
Run the full First Session Protocol from CLAUDE.md:
- Phase A: Self-Onboard -- read README, package.json/pyproject.toml, git history, directory structure. Save to
project_discovery.md. - Phase B: Onboard User -- ask all questions in TWO batched prompts (role, experience band, team context, current work, git workflow, testing philosophy, deployment target). Save to
user_profile.md. - Phase C: Initialize Memory -- create MEMORY.md with index entries.
- Phase D: Configure Standing Orders -- adapt behavior based on discovered context.
- Phase E: Dispatch -- classify user's current task and route to the right Standing Order.
Reset mode (re-onboarding)
- Inform the user that existing onboarding data was found.
- Ask: "Re-run full onboarding (project + user), or just update your user profile?"
- Full reset: archive existing
project_discovery.mdanduser_profile.md(rename with_prev_YYYYMMDD_HHMMSStimestamp suffix), then run Phases A-E. - Profile only: archive
user_profile.md(timestamp suffix), re-run Phase B only, update MEMORY.md index.
- Full reset: archive existing
- After re-onboarding completes, confirm the new register (S1-S4) and announce readiness.
Rules
- Never delete memory files outright -- archive with
_prev_YYYYMMDD_HHMMSStimestamp suffix so nothing is lost. - Always run Phase A before Phase B in full reset -- project context informs which Phase B questions to skip.
- Batch all onboarding questions in TWO prompts, never one-by-one.
- After completing onboarding, announce:
[ELEKTRA] Onboarding complete. Register: {band}. Ready.