diff --git a/PLUGIN.md b/PLUGIN.md index 93393b0..35569a8 100644 --- a/PLUGIN.md +++ b/PLUGIN.md @@ -38,7 +38,7 @@ Paths inside `hooks/hooks.json` use `${CLAUDE_PLUGIN_ROOT}` (expanded by Claude | Skills registered | yes, automatic | yes, copied to `~/.claude/skills/` | | Hooks wired | yes, via `hooks/hooks.json` | requires `--activate-hooks` (jq-merge of `settings-snippet.json`) | | MCP server | yes, via `.mcp.json` (once `@keisei/mcp-server` is published) | same | -| 24 Rust primitives | **no** — plugin ships manifest sources only; no cargo build | yes, `--profile=` builds the selected set | +| 36 Rust primitives | **no** — plugin ships manifest sources only; no cargo build | yes, `--profile=` builds the selected set | | 13 shell primitives | **no** | yes, copied to `~/.claude/agents/_primitives/` | | Disk footprint | ~2 MB (plugin cache) | ~2 MB minimal up to ~200 MB full | | Update path | `/plugin update keisei` | `git pull && ./install.sh` | diff --git a/README.md b/README.md index fea7ac7..dec5777 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Drop-in kit for Claude Code, Cursor, Continue, and Zed. Install once — get a 1 /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 →](./docs/INSTALL.md) +That's it. 12 agents appear in Claude Code, 43 skills become callable as `/self-audit`, `/compose-solution`, `/schema-design`, and nightly consolidation is wired. [Other install paths →](./docs/INSTALL.md) ## What you actually get @@ -42,10 +42,10 @@ Your rules get emitted to `.cursorrules`, `AGENTS.md`, `.github/copilot-instruct ## Batteries included - **12 agents** — `kei-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 -- **33 Rust primitives** — for the jobs where Python silently corrupts your data +- **43 skills** — one-command pipelines: `/new-project`, `/schema-design`, `/api-design`, `/ci-scaffold`, `/auth-setup`, `/observability-setup`, `/self-audit`, `/sleep-on-it`, ... +- **12 hooks** — pre-commit safety net, always on +- **82 behavioral blocks** — tested patterns you compose into your own agents +- **36 Rust primitives** — for the jobs where Python silently corrupts your data Every symbol, flag, and exit code: [docs/REFERENCE.md](./docs/REFERENCE.md) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 8fc6f3f..a95224a 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -17,7 +17,7 @@ How agents, blocks, manifests, the assembler, and cross-tool bridges fit togethe Block edit (_blocks/.md) <-- triggers rebuild of ALL agents ``` -10 hooks enforce the pipeline (7 pipeline + 3 session-audit): +12 hooks enforce the pipeline (7 pipeline + 3 session-audit + 2 capability — `agent-capability-check` / `agent-capability-verify` wire the v0.24 substrate capability layer; see `hooks/` directory for details): - **`assemble-agents`** (PostToolUse, Write/Edit) — rebuilds the affected agent(s) whenever a manifest or a block changes. No manual rebuild needed. - **`assemble-validate`** (PreToolUse, Bash) — blocks `git commit` inside `~/.claude` if any manifest fails validation. Keeps the repo in a buildable state at all times. diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 7bfa1de..e59871c 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -9,7 +9,7 @@ Complete install guide. Quick-start lives in the main [README](../README.md#inst | Path | Command | Best for | |---|---|---| | **Plugin** (v0.16+, recommended on Claude Code 2.1+) | `/plugin marketplace add KeiSei84/KeiSeiKit` then `/plugin install keisei@keisei-marketplace` | Agents + skills + hooks + MCP. Zero cargo build. See [PLUGIN.md](../PLUGIN.md). | -| **Classic** `./install.sh` | Below | Full kit incl. 33 Rust primitives + 13 shell primitives. Required for `ops` / `dev` / `full` profiles. | +| **Classic** `./install.sh` | Below | Full kit incl. 36 Rust primitives + 13 shell primitives. Required for `ops` / `dev` / `full` profiles. | ## Prerequisites @@ -46,7 +46,7 @@ cd KeiSeiKit 5. Builds the Rust assembler (`cargo build --release` in `_assembler/`) 6. If any Rust primitive is in the selected profile: writes a scoped workspace `Cargo.toml` listing ONLY the installed crates, then `cargo build --release` 7. Generates agent `.md` files in-place with `AGENT_ROOT=~/.claude/agents assemble --in-place` -8. Copies the 10 hooks and 39 skills +8. Copies the 12 hooks and 43 skills After install, the only remaining step is merging `settings-snippet.json` into your `~/.claude/settings.json` to activate the hooks. You can do this automatically with `./install.sh --activate-hooks` or answer `y` at the end-of-install TTY prompt. @@ -70,7 +70,7 @@ By default `./install.sh` is **minimal** — agents + hooks + skills + bridges, | `frontend` | 8 site tools: `mock-render`, `visual-diff`, `tokens-sync`, `design-scrape`, `live-preview`, `figma-tokens`, `frontend-inspect`, `screenshot-decode` | ~60s | ~80 MB | | `ops` | 9 infra tools: `kei-ledger`, `ssh-check`, `firewall-diff`, `provision-hetzner`, `provision-vultr`, `harden-base`, `metrics-scrape`, `log-ship`, `kei-provision` | ~90s | ~55 MB | | `dev` | 17 dev tools: `kei-migrate`, `kei-changelog`, `kei-ci-lint`, `kei-docs-scaffold`, `kei-memory`, `kei-conflict-scan`, `kei-refactor-engine`, `kei-graph-check`, `kei-store`, `kei-artifact`, `kei-agent-runtime`, `kei-capability`, `kei-entity-store`, `kei-pipe`, `kei-cache`, `kei-spawn`, `kei-replay` | ~90s | ~60 MB | -| `full` | everything (46 primitives) | ~6 min | ~220 MB | +| `full` | everything in `MANIFEST.toml` `full` profile (46 primitives — see manifest for exact list; `kei-atom-discovery`, `kei-forge`, `kei-runtime` ship as sources only, not in any profile yet) | ~6 min | ~220 MB | Examples: @@ -203,16 +203,16 @@ Interactive wizard: run `/hooks-control` — click-only picker that shows curren | Category | Count | Examples | |---|---:|---| -| Behavioral blocks | 79 | `baseline`, `evidence-grading`, `rule-math-first`, `stack-rust-axum`, `stack-react-vite`, `stack-sveltekit`, `stack-astro`, `deploy-modal`, `api-fal-ai`, ... | +| Behavioral blocks | 82 | `baseline`, `evidence-grading`, `rule-math-first`, `stack-rust-axum`, `stack-react-vite`, `stack-sveltekit`, `stack-astro`, `deploy-modal`, `api-fal-ai`, ... | | Generic agents (manifests) | 12 | `kei-code-implementer`, `kei-critic`, `kei-validator`, `kei-security-auditor`, `kei-architect`, `kei-researcher`, `kei-ml-implementer`, `kei-cost-guardian`, `kei-modal-runner`, ... | -| Hooks (PreToolUse / PostToolUse) | 10 | `assemble-agents`, `assemble-validate`, `no-hand-edit-agents`, `tomd-preread`, `agent-fork-logger`, `orchestrator-dirty-check`, `site-wysiwyd-check`, `session-end-dump`, `milestone-commit-hook`, `error-spike-detector` | -| Portable skills | 39 | `compose-solution`, `new-agent`, `new-project`, `site-create`, `schema-design`, `observability-setup`, `auth-setup`, `api-design`, `ci-scaffold`, `test-matrix`, `docs-scaffold`, `vm-provision`, ... | -| Primitives (Rust crates, opt-in) | 33 | `kei-ledger`, `kei-migrate`, `kei-changelog`, `ssh-check`, `firewall-diff`, `mock-render`, `visual-diff`, `tokens-sync`, `kei-memory`, `kei-conflict-scan`, `kei-refactor-engine`, `kei-graph-check`, `kei-store`, `kei-router`, `kei-sage`, `kei-task`, `kei-chat-store`, `kei-crossdomain`, `kei-search-core`, `kei-content-store`, `kei-social-store`, `kei-curator`, `kei-auth`, `kei-artifact`, `keisei`, `kei-agent-runtime`, `kei-capability`, `kei-provision`, `kei-entity-store`, `kei-pipe`, `kei-cache`, `kei-spawn`, `kei-replay` | +| Hooks (PreToolUse / PostToolUse) | 12 | `assemble-agents`, `assemble-validate`, `no-hand-edit-agents`, `tomd-preread`, `agent-fork-logger`, `orchestrator-dirty-check`, `site-wysiwyd-check`, `session-end-dump`, `milestone-commit-hook`, `error-spike-detector`, `agent-capability-check`, `agent-capability-verify` | +| Portable skills | 43 | `compose-solution`, `new-agent`, `new-project`, `site-create`, `schema-design`, `observability-setup`, `auth-setup`, `api-design`, `ci-scaffold`, `test-matrix`, `docs-scaffold`, `vm-provision`, ... | +| Primitives (Rust crates, opt-in) | 36 | `kei-ledger`, `kei-migrate`, `kei-changelog`, `ssh-check`, `firewall-diff`, `mock-render`, `visual-diff`, `tokens-sync`, `kei-memory`, `kei-conflict-scan`, `kei-refactor-engine`, `kei-graph-check`, `kei-store`, `kei-router`, `kei-sage`, `kei-task`, `kei-chat-store`, `kei-crossdomain`, `kei-search-core`, `kei-content-store`, `kei-social-store`, `kei-curator`, `kei-auth`, `kei-artifact`, `keisei`, `kei-agent-runtime`, `kei-capability`, `kei-provision`, `kei-entity-store`, `kei-pipe`, `kei-cache`, `kei-spawn`, `kei-replay`, `kei-atom-discovery`, `kei-forge`, `kei-runtime` | | Primitives (shell, opt-in via profile) | 13 | `tomd`, `design-scrape`, `live-preview`, `figma-tokens`, `frontend-inspect`, `screenshot-decode`, `metrics-scrape`, `log-ship`, `provision-hetzner`, `provision-vultr`, `harden-base`, `kei-ci-lint`, `kei-docs-scaffold` | | Shell helpers (always copied) | 3 | `kei-sleep-setup`, `kei-sleep-sync`, `kei-sleep-queue` (dormant until you run `/sleep-setup`) | | Cross-tool bridges | 11 | Cursor legacy/MDC, Codex, Copilot, Windsurf, Junie, Continue, Gemini, Aider, Replit | -Of the 79 blocks, the **8 base blocks** (`baseline`, `evidence-grading`, `memory-protocol`, `rule-pre-dev-gate`, `rule-test-first`, `rule-error-budget`, `rule-double-audit`, `rule-math-first`) are referenced directly by the 12 shipped manifests. The remaining blocks (`stack-*`, `deploy-*`, `api-*`, `scraper-*`, `domain-*`) are a library consumed by the `/new-agent` wizard and the hub-and-spoke pipeline skills. +Of the 82 blocks, the **8 base blocks** (`baseline`, `evidence-grading`, `memory-protocol`, `rule-pre-dev-gate`, `rule-test-first`, `rule-error-budget`, `rule-double-audit`, `rule-math-first`) are referenced directly by the 12 shipped manifests. The remaining blocks (`stack-*`, `deploy-*`, `api-*`, `scraper-*`, `domain-*`) are a library consumed by the `/new-agent` wizard and the hub-and-spoke pipeline skills. **Cognitive mode blocks** (`_blocks/mode-*.md`) are composable behavioural skews — `mode-skeptic`, `mode-devils-advocate`, `mode-minimalist`, `mode-maximalist`, `mode-first-principles`. Add any combination to an agent's manifest `blocks = [...]` list to stack the mode. See `_blocks/README.md` for the full list. diff --git a/docs/REFERENCE.md b/docs/REFERENCE.md index d56a8c5..8773d1f 100644 --- a/docs/REFERENCE.md +++ b/docs/REFERENCE.md @@ -8,7 +8,9 @@ Every shipped component, its real behaviour, and where to look in source. Each s ## Rust primitives -All 25 crates live under `_primitives/_rust//`. After `install.sh` runs, binaries land at `~/.claude/agents/_primitives/_rust/target/release/`. Exit codes: `0` success, `1` usage/IO error, `2` validation/diff-found (per-tool; see each entry). +All 36 crates live under `_primitives/_rust//`. After `install.sh` runs, binaries land at `~/.claude/agents/_primitives/_rust/target/release/`. Exit codes: `0` success, `1` usage/IO error, `2` validation/diff-found (per-tool; see each entry). + +> NOTE (v0.27): the following sections enumerate the 25 crates documented through v0.22. 11 newer crates shipped in v0.23–v0.27 (`kei-entity-store`, `kei-agent-runtime`, `kei-capability`, `kei-provision`, `kei-pipe`, `kei-cache`, `kei-spawn`, `kei-replay`, `kei-atom-discovery`, `kei-forge`, `kei-runtime`) are not yet documented here — see `CHANGELOG.md` Unreleased block and the crates' own `Cargo.toml` + `atoms/*.md` for their current CLI surface. A full REFERENCE.md expansion is tracked as a follow-up doc task. ### `kei-ledger` — agent-fork lifecycle ledger (RULE 0.12) @@ -502,7 +504,7 @@ Default: `--type=all`. Idempotent without `--force`. ## Hooks -All 10 kit-shipped hooks live under `hooks/*.sh`, get copied to `~/.claude/hooks/` on install. Every hook respects `KEI_DISABLED_HOOKS` and `KEI_HOOK_PROFILE` (see Runtime hook controls in [INSTALL.md](./INSTALL.md#runtime-hook-controls)). Silent fall-through on missing `jq` — never aborts a tool call system-wide. +All 12 kit-shipped hooks live under `hooks/*.sh`, get copied to `~/.claude/hooks/` on install. Every hook respects `KEI_DISABLED_HOOKS` and `KEI_HOOK_PROFILE` (see Runtime hook controls in [INSTALL.md](./INSTALL.md#runtime-hook-controls)). Silent fall-through on missing `jq` — never aborts a tool call system-wide. (v0.24 added `agent-capability-check` + `agent-capability-verify` for the substrate capability layer — not individually enumerated below yet.) | Hook | Event | Severity | Bypass | |---|---|---|---| @@ -532,7 +534,7 @@ Details beyond the table: ## Skills (grouped) -39 skills under `skills//SKILL.md`. Each is invoked as `/` inside Claude Code. Free-text is used only for intake fields; every other decision is a click via `AskUserQuestion`. +43 skills under `skills//SKILL.md`. Each is invoked as `/` inside Claude Code. Free-text is used only for intake fields; every other decision is a click via `AskUserQuestion`. (v0.23–v0.27 added 4 skills — `/spawn-agent`, `/atom-new`, and others — not yet individually enumerated below.)
Meta / project setup (4) diff --git a/docs/SECURITY.md b/docs/SECURITY.md index b406708..31ebce0 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -103,7 +103,7 @@ Install-test battle matrix runs every profile against three base images before e | `alpine:3.19` | musl | exposes musl-static-link issues in `rusqlite`, `git2`, `aws-sdk-s3` | | `debian:12` bookworm | glibc | different apt structure from Ubuntu | -Assertions per run: blocks ≥ 79, skills ≥ 39, top hooks ≥ 10, `_lib` hooks ≥ 2; `hooks/_lib/test-gate.sh` runs; `settings.json` validates. "Does it work on a fresh machine?" signal before every version ships. +Assertions per run: blocks ≥ 82, skills ≥ 43, top hooks ≥ 12, `_lib` hooks ≥ 2; `hooks/_lib/test-gate.sh` runs; `settings.json` validates. "Does it work on a fresh machine?" signal before every version ships. See `tests/battle/README.md` for running locally. diff --git a/docs/SUBSTRATE-SCHEMA.md b/docs/SUBSTRATE-SCHEMA.md index 3669cb3..1daebd0 100644 --- a/docs/SUBSTRATE-SCHEMA.md +++ b/docs/SUBSTRATE-SCHEMA.md @@ -16,7 +16,7 @@ An **atom** is **one verb** (one operation) on a primitive, not one crate. Examp - Discoverable (aggregated into `capabilities.toml`) - Composable (runtime pipes atoms by schema compatibility) -**Granularity target:** ~150 atoms across the current 25 crates. Crate = physical container; atom = unit of composition. +**Granularity target:** ~150 atoms across the current 36 crates (was 25 at v0.22 lock; 11 crates added v0.23–v0.27). Crate = physical container; atom = unit of composition. --- @@ -340,7 +340,7 @@ Here is exactly what each parallel stream can assume from this schema: - **Does NOT depend on:** Atoms-refactor (can work against any single atom template), Graph (independent), Runtime (independent) ### Stream B — Atoms refactor -- **Reads:** current 25 crates +- **Reads:** current 36 crates (25 at v0.22 lock; 11 added v0.23–v0.27) - **Writes:** `atoms/.md` + `atoms/schemas/*.json` + splits `src/main.rs` → `src/atoms/*.rs`, adds `[package.metadata.keisei]` to each `Cargo.toml` - **Does NOT depend on:** UI (can progress independently), Graph, Runtime. No build.rs, no generated files — atoms/*.md is SSoT.