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>
107 lines
3.7 KiB
Bash
107 lines
3.7 KiB
Bash
# shellcheck shell=bash
|
|
# lib-summary.sh — final success banner with next-step hints.
|
|
#
|
|
# Two shapes: "hooks activated" vs "hooks pending manual merge". Both tell
|
|
# the user how to verify the install and how to create a new specialist.
|
|
# v0.40 Wave 39: appends substrate-ready block listing kei-fork/kei-ledger/
|
|
# kei-spawn entry points + kei-doctor health check + sleep-layer setup.
|
|
#
|
|
# Requires: say from lib-log.sh.
|
|
# Reads globals: $PROFILE, $DID_ACTIVATE, $KIT_DIR, $AGENTS_DIR, $HOME_DIR.
|
|
|
|
# Print the substrate-ready next-steps block (always shown after install).
|
|
print_substrate_summary() {
|
|
local target_dir="$AGENTS_DIR/_primitives/_rust/target/release"
|
|
cat <<EOF
|
|
|
|
==========================================================================
|
|
Substrate ready
|
|
==========================================================================
|
|
|
|
Substrate primitives are installed under:
|
|
$target_dir/
|
|
|
|
Quick sanity checks:
|
|
kei-fork list # managed worktrees + ledger lifecycle
|
|
kei-ledger list # agent-fork rows
|
|
kei-spawn list-pending # pending spawn requests
|
|
|
|
Full health diagnostic:
|
|
kei-doctor # PATH, ledger, secrets, deps
|
|
kei-doctor --fix # attempt to repair what is recoverable
|
|
|
|
EOF
|
|
case "$PROFILE" in
|
|
cortex|full)
|
|
cat <<EOF
|
|
Cortex profile:
|
|
/cortex-setup # token, whisper, model, UI bundle, daemon
|
|
|
|
EOF
|
|
;;
|
|
esac
|
|
cat <<EOF
|
|
Sleep layer (recommended — nightly REM consolidation):
|
|
/sleep-setup # one-time wizard
|
|
|
|
If kei-* commands are not found, open a new terminal or run:
|
|
source ~/.bashrc # or ~/.zshrc / ~/.config/fish/config.fish
|
|
==========================================================================
|
|
EOF
|
|
}
|
|
|
|
print_summary() {
|
|
local settings_file="$HOME_DIR/.claude/settings.json"
|
|
echo
|
|
say "install complete (profile=$PROFILE)"
|
|
echo
|
|
if [ "$DID_ACTIVATE" = "1" ]; then
|
|
cat <<EOF
|
|
==========================================================================
|
|
Hooks activated. Settings merged into $settings_file
|
|
==========================================================================
|
|
|
|
To verify install:
|
|
ls $AGENTS_DIR/*.md # should show 12 generated agents
|
|
$AGENTS_DIR/_assembler/target/release/assemble --validate
|
|
./install.sh --list # show installed primitives
|
|
|
|
To set up agents for ALL your projects (scan stack + create one per project):
|
|
/onboard ~/Projects/*
|
|
Or create a single project-specialist agent:
|
|
/new-agent
|
|
|
|
==========================================================================
|
|
EOF
|
|
else
|
|
cat <<EOF
|
|
==========================================================================
|
|
NEXT STEP: merge settings-snippet.json into ~/.claude/settings.json
|
|
==========================================================================
|
|
|
|
KeiSeiKit ships 9 hooks (assemble-agents, assemble-validate, no-hand-edit,
|
|
tomd-preread, agent-fork-logger, site-wysiwyd-check, session-end-dump,
|
|
milestone-commit-hook, error-spike-detector).
|
|
To activate them, merge entries from:
|
|
$KIT_DIR/settings-snippet.json
|
|
into your:
|
|
$settings_file
|
|
|
|
Or re-run with automatic activation:
|
|
./install.sh --activate-hooks
|
|
|
|
To verify install:
|
|
ls $AGENTS_DIR/*.md # should show 12 generated agents
|
|
$AGENTS_DIR/_assembler/target/release/assemble --validate
|
|
./install.sh --list # show installed primitives
|
|
|
|
To set up agents for ALL your projects (scan stack + create one per project):
|
|
/onboard ~/Projects/*
|
|
Or create a single project-specialist agent:
|
|
/new-agent
|
|
|
|
==========================================================================
|
|
EOF
|
|
fi
|
|
print_substrate_summary
|
|
}
|