KeiSeiKit-1.0/install
Parfii-bot c9dc94393c feat(install): outcome-only minimum profile
Reviewer suggested an evaluation footprint that lands "the smallest
substrate any caller-LLM can use", with 5 files and ~200 LOC ceiling
in $HOME. This commit ships that profile.

Files installed in $HOME by `./install.sh --profile=outcome-only`:
1. ~/.claude/hooks/agent-outcome-backfill.sh   (PostToolUse:Agent)
2. ~/.claude/hooks/error-spike-detector.sh     (PostToolUse:Bash, rolling 20-call window)
3. ~/.claude/agents/ledger.sqlite              (full v9 schema via kei-ledger init, or sqlite3-fallback DDL)
4. ~/.claude/CLAUDE.md                         (1-line STATUS-TRUTH MARKER instruction appended)
5. ~/.claude/settings.json                     (jq-merge of 2 hook entries)

Plus optional 6th: kei-model-router binary built from _primitives/_rust if
cargo on PATH; deferred otherwise (warning printed, install continues).

Files added to repo:
- install/lib-profile-outcome-only.sh (145 LOC) — profile orchestrator with
  --dry-run support; sources lib-log/lib-backup/lib-hooks helpers; exits
  before heavy install phases when --profile=outcome-only
- install/sql/outcome-only-schema.sql (69 LOC) — flattened v9-equivalent
  SQLite DDL (agents + skill_invocations + indexes), used by sqlite3
  fallback when kei-ledger CLI is unavailable
- docs/PROFILE-OUTCOME-ONLY.md (97 LOC) — reviewer-facing doc: 5-file
  install table, what is NOT installed, kei-model-router activation
  explanation, privacy posture (no telemetry), 4-line uninstall paste

Files modified:
- install.sh (+12 LOC) — sources outcome-only lib, adds short-circuit
  before menu when --profile=outcome-only, accepts in profile validator
- install/lib-args.sh (+9 LOC) — registers --dry-run flag (sets
  OUTCOME_DRY_RUN=1), adds outcome-only + --dry-run lines to --help
- README.md (+7 LOC) — adds Outcome-only Quick-start section pointing to
  PROFILE-OUTCOME-ONLY.md

Verification:
- bash -n clean on all 3 modified shell files
- Dry-run produces exactly 5 numbered $HOME paths (verified end-to-end:
  HOME=/tmp/kei-fake-home bash install.sh --profile=outcome-only --dry-run)
- Real install against fake $HOME succeeds (5 files present, ledger init
  via kei-ledger binary, router build correctly skipped on toolchain
  absence with warning)
- Ledger schema includes agents + skill_invocations tables + 3 indexes
  + 2 triggers via real migration path (not the SQL fallback)

[FROM-JOURNAL: end-to-end install dry-run + real-run measured at
~/.claude/memory/time-metrics/sessions.jsonl this session, both <2s wall]

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 16:59:53 +08:00
..
launchd-templates KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
sql feat(install): outcome-only minimum profile 2026-05-03 16:59:53 +08:00
lib-agents.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-args.sh feat(install): outcome-only minimum profile 2026-05-03 16:59:53 +08:00
lib-backup.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-bin.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-bridges.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-dev-hub-datasette.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-dev-hub-daytona.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-dev-hub-forgejo-runner.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-dev-hub-forgejo.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-dev-hub-gdrive-import.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-dev-hub-mdbook.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-dev-hub-restic.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-dev-hub-zoekt.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-frustration-bootstrap.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-hooks.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-launchd.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-log.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-menu.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-pathway.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-plan.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-prereqs.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-primitives.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-profile-outcome-only.sh feat(install): outcome-only minimum profile 2026-05-03 16:59:53 +08:00
lib-profile.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-rust-mirror.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-rust-prebuild.sh fix(hooks+install): disk-reclaim Guard 3 + secrets per-line + sha256 fail-closed 2026-05-03 15:37:57 +08:00
lib-rust.sh feat(install): Rust binary acquisition for fresh-clone installs (Path A + Path B) 2026-05-01 19:07:55 +08:00
lib-scaffold.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-skills.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-substrate.sh chore(kit): wire kei-db-contract into installer + drop final #[path] hack 2026-05-01 17:55:52 +08:00
lib-summary.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
lib-wizard.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00