KeiSeiKit-1.0/docs/HANDOFF-WAKE.md
KeiSei84 1dd4bad97a fix(install): make fresh install actually complete + ship tamagotchi (#26)
Root causes found by reproducing a clean install from keigit:

1. PROFILE_PRIMS resolved only inside check_prereqs → unbound for
   --no-execute (plan showed 0 prims for every profile) and silently
   empty for --skip-prereqs. Now resolved unconditionally in install.sh
   before any reader (SSoT).

2. Every profile (even minimal, advertised "no Rust compile") fell back
   to a 5-15 min `cargo build --workspace` because no prebuilt release
   binaries exist. Auto-set KEI_SKIP_RUST for profiles with no rust
   primitives → minimal installs in ~18s (assembler only). cargo stays a
   hard prereq because the agent assembler always compiles.

3. The assembler aborted the WHOLE install on any single bad manifest
   (set -e). generate_agents is now tolerant: bad manifests print FAIL
   but hooks/skills/settings still land. Commit-time validate stays strict.

4. Data bugs that broke the assembler:
   - duplicate [taxonomy] table in _roles/{auditor,merger}.toml
   - fal-ai-runner handoff → keimd-expert (not shipped in kit)
   - infra-implementer-cicd forbidden_domain literal `${{ secrets.NAME }}`
     collided with assembler ${{ }} placeholder detection

5. Metadata: KeiSei84 (nonexistent GitHub org) → KeiSeiLab/KeiSeiKit-1.0
   across plugin manifests, bootstrap, README, docs, Cargo/npm metadata.
   .claude-plugin/{plugin,marketplace}.json 0.16.0 → 0.38.0. SECURITY.md
   supported version 0.14.x → 0.38.x.

feat: ship KeiSei tamagotchi statusline into the kit
   - scripts/keisei-pet{,-update}.sh (portable, state under ~/.claude/pet/)
   - install copies them to ~/.claude/scripts/
   - settings-snippet adds statusLine (set-if-absent, never clobbers an
     existing one) + 4 pet-update hooks (prompt/rust_write/github_block/sleep)

Verified: clean minimal install RC=0, zero FAIL, 38 agents + 52 hooks +
68 skills, settings valid, statusLine wired, pet renders, idempotent re-run.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 01:40:50 +08:00

4.2 KiB
Raw Blame History

Handoff — Autonomous Report (v0.29.0)

Status: Green. 7 major versions: v0.23 / v0.24 / v0.25 / v0.26 / v0.27 / v0.28 / v0.29.0.

Versions shipped

Tag Crates Tests Highlights
v0.23.0 16 280 atom+agent substrate + 5 migrations + pipe + cache
v0.24.0 17 315 taxonomy + engine improvements + kei-spawn + fork
v0.25.0 18 326 bulk taxonomy + chat cost + /spawn-agent + drive + kei-replay
v0.26.0 18 330 deferred-flag closure + 12/12 agent migration
v0.27.0 36 ~470 Store::open multi-schema (breaking) + MANIFEST sync + pipe-cache
v0.28.0 36 538 W12 sister re-migration + docs refresh + forge audit
v0.29.0 39 620 Wave 13: 3 new primitives + 2 HIGH audit fixes + bio-framing README

Wave 11 closed the architectural gap from v0.26.0

  • Store::open(path, &[&EntitySchema]) breaking API (6 callers migrated atomically)
  • kei-chat-store sessions 100% engine-owned (was ~60%)
  • Transaction atomicity across all schemas

Wave 12 (Option A — maximum parallelism)

  • W12-A — CAMPAIGNS_SCHEMA promoted to engine (content-store 45%→67%)
  • W12-B — 9 stale count refs refreshed across 8 doc files
  • W12-C — kei-forge verified clean (44/44 tests, no shell-out)

No conflicts across the 3 parallel merges. Both integration tests green.

Remaining architectural gaps

None blocking. Two follow-ups open:

  1. HttpDriver impl for kei-spawn drive — needs reqwest + tokio deps + KEI_ANTHROPIC_KEY in ~/.claude/secrets/.env. Breaking-change-worthy (first runtime dep on HTTP), own PR.

  2. Wave 13 new primitives (concept stage):

    • kei-scheduler (cron/at/interval DAG)
    • kei-diff (JSON structural diff for drift detection)
    • kei-watch (fsnotify wrapper for hot-reload)

Snapshot — full system

  • 39 crates workspace
  • 538 tests green total (+208 since v0.26.0)
  • 12/12 agents migrated to substrate_role
  • 28+ primitives tagged with taxonomy facets
  • 6 major tags v0.23→v0.28 pushed to github + forgejo
  • 17 parallel agents run this session across 4 waves (W8=6, W9=5, W10=3, W12=3)
  • 0 conflicts required manual resolution
  • 0 findings required user intervention after billing was restored

Quick sanity on wake

cd ~/Projects/KeiSeiKit
git log --oneline v0.22.3..HEAD | head -60    # overnight commit chain
git tag -l 'v0.2[3-8]*'                        # 6 overnight tags
tests/substrate_integration.sh                 # gate 1
tests/hook_wiring_integration.sh               # gate 2
cd _primitives/_rust && cargo test --workspace 2>&1 | tail -5

GitHub Releases status

6 tags pushed. Release workflow in release.yml triggers on tag push. Expected: 6 releases × (3 Rust tarballs + 5 MCP binaries + sha256 each) = ~48 assets. Check github.com/KeiSeiLab/KeiSeiKit-1.0/releases on wake — all tags should have attached assets within 10 min of push per prior v0.22.3 smoke. CI was re-triggered after Pro upgrade; confirm status there.

What substrate looks like now

Atom substrate v1 — 25 crates → ~13-15 after engine extraction.

Agent substrate v1 — 12/12 agents migrated, DNA identity 32-bit entropy, prepare CLI, spawn envelope, replay from DNA, fork tracking.

Taxonomy graph — 28+ primitives facet-tagged, kei-sage facet-query spans all 3 roots, lineage traversal + author query.

Composition runtime — kei-pipe DAG, kei-cache query/transform cache wired into pipe executor, kei-spawn orchestration envelope, kei-replay drift detection.

Engine richness — 4 FieldKind variants + IntegerPk/TextPk, 3 EdgeKeyKind variants with extra_columns extension, Archive dual-mode, multi-schema Store::open with atomic transactions, PRAGMA user_version migrations.

Security note

⚠️ API key leak detected mid-session. User pasted an Anthropic API key in plain text (now redacted). User must revoke at https://console.anthropic.com/settings/keys and store replacement in ~/.claude/secrets/.env per RULE 0.8 before resuming HttpDriver work.


All autonomous mechanical work is done. Two open decisions on wake:

  1. HttpDriver — confirm key revoked + replacement in .env → ready to implement
  2. Wave 13 — pick scheduler / diff / watch (or defer)