Sleep/cortex setup were left as separate things the user had to discover. Make
the SessionStart first-run hook a single ordered post-install checklist that
Claude walks the user through: (1) /onboard projects → per-project agents,
(2) /sleep-setup → nightly REM (recommend local-only, no remote git needed),
(3) /cortex-setup (only if the cortex daemon primitive is installed). Confirm +
run each, skippable. Fires once (marker), then silent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After install the user got no guidance to set up project agents — the summary
only mentioned /new-agent (single), never /onboard (scan all projects → create
a specialist per project). The installer is bash and can't launch a skill, so:
- New SessionStart hook first-run-onboard.sh: on the FIRST Claude Code session
after install, injects context nudging the user/Claude to run
`/onboard ~/Projects/*` (scan stack + create per-project agent, delegates to
/new-agent). Fires once (marker ~/.claude/.kei-firstrun-shown), then silent.
Reset: rm the marker.
- settings-snippet.json: wire the hook under SessionStart (matcher "*").
- lib-summary.sh next-steps: lead with `/onboard ~/Projects/*`, then /new-agent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Users with pre-kit hooks that have no `matcher` field end up with matcher:null,
which Claude Code /doctor rejects ("Expected string, but received null") and
skips the whole settings file. The jq merge preserved null as-is, so every
reinstall re-surfaced the error. Now map(.matcher //= "") before group_by →
null/absent collapses to "" (match-all), one group per matcher.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>