No description
Find a file
Parfii-bot 64ffe39e01 feat(convergence/u3): kei-provision Rust crate — unify hetzner+vultr provisioners
Pre-unlock wave U3 (highest-ROI). Task 7 from CONVERGENCE-PLAN —
consolidate 2 provision-*.sh scripts into Rust via Backend trait.

Old shells (provision-hetzner.sh, provision-vultr.sh) had identical
6-subcommand surface (create|status|destroy|list), log/die/check_deps
helpers, idempotency contract. Sole delta: hcloud vs vultr-cli. RULE 0.2
says Rust-first when >50 LOC + growth expected.

New crate _primitives/_rust/kei-provision/:
- src/backend.rs (58 LOC) — Backend trait: create/status/destroy/list;
  CreateOpts and ServerInfo structs
- src/backends/hetzner.rs (143 LOC) — shells to `hcloud server ...`
  --output=json, parses JSON response, honors HCLOUD_TOKEN env (RULE 0.8)
- src/backends/vultr.rs (189 LOC) — same pattern, `vultr-cli instance`,
  honors VULTR_API_KEY env
- src/exec.rs (100 LOC) — Command runner + PATH-aware env preservation
- src/b64.rs (49 LOC) — minimal user-data base64 encoder; zero
  transitive deps
- src/main.rs (141 LOC) — clap CLI `kei-provision <backend> <cmd>`
- tests/backend_smoke.rs (184 LOC) — tempdir PATH-inject fake hcloud +
  fake vultr-cli, no real cloud. Mutex-serialized (Rust test parallelism).

Tests: 11/11 (3 b64 unit + 8 backend_smoke integration). Coverage:
hetzner status present/absent/list, vultr status found/absent/destroy
idempotent, unknown-backend error, CreateOpts default.

Old shells kept with superseded-v0.17 header — install.sh still copies
them, legacy scripts still work. New users get kei-provision binary.
harden-base.sh untouched (different lifecycle — runs on target VPS).

Backend trait factored to accept aws/doctl/linode follow-ups without
re-architecture.

Workspace Cargo.toml: +kei-provision member (1 line).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 03:43:40 +08:00
.claude-plugin feat(v0.16): Anthropic plugin format + own marketplace 2026-04-22 15:10:15 +08:00
.github fix(release): v0.22.3 — native arm64-linux + gh-CLI Publish (no race, no draft) 2026-04-22 23:22:50 +08:00
_assembler feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
_blocks feat(v0.16.1): dynamic schema SSoT + KNOWN_SCHEMAS drift-test + mode-matrix Phase 3.6 2026-04-22 15:10:46 +08:00
_bridges feat(bridges): emit.sh renderer with --only filter 2026-04-21 14:43:07 +08:00
_capabilities feat(agent-substrate/phase-1): capability library — 11 declarative bundles 2026-04-23 02:35:52 +08:00
_manifests feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
_primitives feat(convergence/u3): kei-provision Rust crate — unify hetzner+vultr provisioners 2026-04-23 03:43:40 +08:00
_roles feat(agent-substrate/wrapper): kei-agent-runtime prepare — orchestrator ergonomics 2026-04-23 03:25:14 +08:00
_templates feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
_ts_packages chore(v0.19.1): replace placeholder bun.lock with real lockfile + fix workspace path 2026-04-22 17:16:57 +08:00
docs feat(convergence/u3): kei-provision Rust crate — unify hetzner+vultr provisioners 2026-04-23 03:43:40 +08:00
hooks feat(agent-substrate/phase-4): hook wiring — 3-line glue for kei-capability 2026-04-23 02:51:10 +08:00
install fix(install): copy sibling data dirs (schemas/ assets/ templates/ fixtures/ migrations/) in copy_rust_primitive 2026-04-22 18:39:28 +08:00
scripts feat(substrate): apply user decisions + ship atom template + generator 2026-04-22 23:53:26 +08:00
skills feat(v0.17.1): orchestrator-dirty-check hook — prevent uncommitted-output compounding 2026-04-22 15:42:11 +08:00
tests feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
.dockerignore docs(v0.21): .dockerignore + USB brain step-by-step guide 2026-04-22 18:47:12 +08:00
.gitignore feat(ci): GitHub Actions workflows + .claude/worktrees gitignore 2026-04-22 13:36:17 +08:00
CHANGELOG.md Merge docs/v0.22-reference-section — README Reference section (conflict resolved) 2026-04-22 21:11:21 +08:00
install.sh refactor(v0.16): split install.sh monolith (1238 LOC) into 17 cubes 2026-04-22 15:09:35 +08:00
kei-architect.md feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
kei-code-implementer.md feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
kei-critic.md feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
kei-security-auditor.md feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
kei-validator.md feat(agent-substrate/phase-5): migrate 5 kit agents to role+task-spec — substrate v1 FULL 2026-04-23 03:07:18 +08:00
LICENSE feat: KeiSeiKit v0.1.0 — initial public release 2026-04-20 23:58:34 +08:00
PLUGIN.md feat(v0.16): Anthropic plugin format + own marketplace 2026-04-22 15:10:15 +08:00
README.md docs(readme): outcome-oriented rewrite — hero + features + hide complexity under the hood 2026-04-22 21:23:23 +03:00
settings-snippet.json feat(agent-substrate/phase-4): hook wiring — 3-line glue for kei-capability 2026-04-23 02:51:10 +08:00

KeiSeiKit

Your AI agents, structured. One manifest, eleven AI assistants. A brain that follows you across machines.

Drop-in kit for Claude Code, Cursor, Continue, and Zed. Install once — get a 12-agent fleet that remembers yesterday's decisions, sleeps at night to consolidate what it learned, and lives on a USB stick you can carry between computers.

Install in one line

/plugin marketplace add KeiSei84/KeiSeiKit
/plugin install keisei@keisei-marketplace

That's it. 12 agents appear in Claude Code, 39 skills become callable as /self-audit, /compose-solution, /schema-design, and nightly consolidation is wired. Other install paths →

What you actually get

🌙 Your AI sleeps at night

You worked all day. At bedtime you type /sleep-on-it what's the right database for X and close the laptop. While you sleep, a remote agent reads your day's traces, extracts patterns, and by morning your memory-repo has a report waiting. git pull → read → decide. Nothing auto-injected. How sleep works →

💾 One brain, any client

keisei mount /Volumes/MyBrain

Your agents, memory, artifacts, and per-platform MCP binaries all live on a directory — USB stick, iCloud, S3, anything. One command mounts it into Claude Code + Cursor + Continue + Zed simultaneously. Move the drive to another computer — same state is there. Full setup →

🧩 Write agent rules once, ship everywhere

A manifest + reusable blocks compiles into a .md file Claude Code reads. Edit one block — every agent using it rebuilds automatically. Same kei-critic behaves identically on every machine that installs the kit. Architecture →

🛡️ Catches mistakes before they commit

Fabricated citations. Secrets in a push. Three failed retries on the same bug. All caught at the hook layer, before anything hits your repo. You don't configure it — it ships wired. What's watched →

🌉 One source, eleven AI tools

Your rules get emitted to .cursorrules, AGENTS.md, .github/copilot-instructions.md, Cursor MDC, Windsurf, Gemini.md, Aider, Continue, Junie, Replit, and plain AGENTS.md — in one command. Switch between tools without rewriting your setup.

Batteries included

  • 12 agentskei-code-implementer, kei-critic, kei-validator, kei-security-auditor, kei-architect, kei-researcher, kei-ml-implementer, and more (all namespaced kei-* so they coexist peacefully with anything you already have)
  • 39 skills — one-command pipelines: /new-project, /schema-design, /api-design, /ci-scaffold, /auth-setup, /observability-setup, /self-audit, /sleep-on-it, ...
  • 10 hooks — pre-commit safety net, always on
  • 79 behavioral blocks — tested patterns you compose into your own agents
  • 25 Rust primitives — for the jobs where Python silently corrupts your data

Every symbol, flag, and exit code: docs/REFERENCE.md

Under the hood (only if you care)

Constructor Pattern: one file, one concern. TOML manifests are the source of truth. A Rust assembler compiles them to the Markdown Claude Code expects. When you edit a block, a PostToolUse hook rebuilds every affected agent. Rust is the backbone because the type system catches the class of mistakes LLMs most often introduce — None vs [], missing .await, unhandled Result — at compile time, so they can't ship. Python is reserved for places where Python is genuinely better.

Full build pipeline, cross-tool bridge mechanics, meta-composer, sleep-layer internals → docs/ARCHITECTURE.md.

Docs

INSTALL.md All install paths, profiles, keisei CLI, hook controls
REFERENCE.md Every primitive, hook, skill with flags and exit codes
ARCHITECTURE.md Build pipeline, bridges, meta-composer
SLEEP-LAYER.md Nightly cycle + self-audit
SECURITY.md Threat model + mitigations
USB-BRAIN-GUIDE.md Portable brain — macOS / Linux / Windows
WHY.md The full story of why this exists
CHANGELOG.md What changed, version by version
PLUGIN.md Anthropic plugin-format details

About

Built by Denis Parfionovich (parfionovich@keilab.io) while running 48 parallel Claude Code terminals every day. What you're looking at is the scaffolding that makes that possible — shared now so you don't have to build your own.

Forks and PRs welcome. Open an issue at github.com/KeiSei84/KeiSeiKit/issues — a well-formulated problem is already half the solution.

License

MIT. See LICENSE.