# 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.
#
# Requires: say from lib-log.sh.
# Reads globals: $PROFILE, $DID_ACTIVATE, $KIT_DIR, $AGENTS_DIR, $HOME_DIR.

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 create a new 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 create a new project-specialist agent:
      /new-agent

==========================================================================
EOF
  fi
}
