Commit graph

45 commits

Author SHA1 Message Date
Parfii-bot
c778b7d9a3 feat(v0.20.1): workflow-file validation infrastructure
Three layers of defense against the dtolnay-SHA-class bug reaching main
(today's incident: agent SHA-pinned dtolnay/rust-toolchain with a pin
that was real but semantically wrong — lost 'install current stable'
meaning, locked to rust 1.94.1 branch tip, broke CI).

Layer 1 — actionlint static lint
  scripts/install-actionlint.sh (65 LOC) — installs rhysd/actionlint
    v1.7.12 [VERIFIED] to ~/.local/bin or suggests brew install.
  scripts/lint-workflows.sh (40 LOC) — runs actionlint on
    .github/workflows/*.yml, exit 0 on clean, advisory when binary
    missing.

Layer 2 — SHA existence check (today's bug class)
  scripts/validate-workflow-shas.sh (98 LOC) — extracts every
    'uses: <repo>@<40-hex>' from workflow files + dependabot.yml,
    checks each via GitHub REST commits API (exit 200/404/422).
    Supports 'validate-workflow-shas: skip=<reason>' trailing
    comment for intentional exceptions. Falls back to anonymous
    API (60/hr quota) if GITHUB_TOKEN probe fails.
  DESIGN PIVOT from spec: spec said 'git ls-remote <repo> <sha>'
    but that only resolves REFS (branch/tag tips), not arbitrary
    commit SHAs — would have given false-positive 100% MISSING
    report. Switched to REST API /commits/{sha} for unambiguous
    200/404/422.

Layer 3 — CI gate
  .github/workflows/ci.yml — new 'workflow-lint' job after
    shell-lint. Installs actionlint + runs both scripts on every
    push to main and PR. Blocks CI on any fabricated SHA.

Layer 4 — optional pre-commit hook
  scripts/pre-commit-workflow-lint.sh (54 LOC) — detects staged
    .github/workflows/*.{yml,yaml} + .github/dependabot.yml
    changes, runs layers 1+2, blocks commit on failure.
  Install via: ln -sf ../../scripts/pre-commit-workflow-lint.sh
    .git/hooks/pre-commit

REAL EXECUTION VERIFIED (not claim-only):
  - actionlint ran: zero findings on current workflows
  - validate-workflow-shas.sh ran: 21 SHA pins checked, 21 OK,
    0 MISSING (confirms all current v0.19.1+ pins resolve)
  - bash -n on every new script: clean
  - bash-3.2 parser bug workaround: case-in-subshell → grep -E

RULE 0.2 exception #6 (shell is external convention for git hooks
+ GH Actions runs — Rust rewrite would add zero value).
RULE 0.13 respected — no git invocations except read-only API calls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 17:50:23 +08:00
Parfii-bot
12e56d6590 feat(v0.20): Brain schema v2 per-platform mcp_server + post_attach_hint() trait
Closes 2 architect audit P3 findings. MVP on the USB-droppable brain
vision — one brain directory now serves every platform.

Schema v2 — per-platform mcp_server dispatch:
  [paths.mcp_server]
  darwin-arm64 = 'bin/kei-mcp-server-darwin-arm64'
  darwin-x64 = 'bin/kei-mcp-server-darwin-x64'
  linux-x64 = 'bin/kei-mcp-server-linux-x64'
  linux-arm64 = 'bin/kei-mcp-server-linux-arm64'
  windows-x64 = 'bin/kei-mcp-server-windows-x64.exe'

Schema v1 (single string) still accepted — v0.19 brains load unchanged.

Implementation:
  brain.rs — new McpServerPath enum (Single / PerPlatform BTreeMap<String, String>)
  with #[serde(untagged)]. Brain::current_platform_key() maps std::env::consts
  (macos→darwin, x86_64→x64, aarch64→arm64) to canonical key format.
  mcp_server_path() now returns Result — looks up current platform,
  returns Error::NoPlatformBinary { os, arch, available } if missing.
  Pre-canonicalized cache field removed so partial v2 brains load for
  status (just fail at actual resolve).
  brain_validate.rs — validate_schema accepts MIN..=MAX range (1 or 2);
  check_all_paths iterates v2 map entries for confinement check.

ClientAdapter::post_attach_hint() — default method + 4 overrides:
  claude_code: 'run /help in Claude Code to verify the MCP server is reachable'
  cursor: 'reload Cursor window (Cmd+Shift+P → Reload Window) to pick up the MCP server'
  continue_adapter: 'reload the Continue extension in VS Code (or restart) to pick up the MCP server'
  zed: 'run Zed :reload command to pick up the MCP server config'
  attach.rs prints adapter.post_attach_hint() instead of the hardcoded
  Claude-Code-specific string. No more client leak in orchestrator.

Error::NoPlatformBinary { os, arch, available } with thiserror Display.

Tests: 16 existing + 4 new = 20/20 pass.
  - schema_v2_current_platform_resolves
  - schema_v2_missing_current_platform_errors (macOS-gated)
  - schema_v1_still_readable_with_v2_code
  - post_attach_hint_is_adapter_specific

Constructor Pattern: all files <200 LOC (continue_adapter.rs 197 LOC
max). All fns <30 LOC (current_platform_key + check_all_paths 19 LOC max).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 17:19:58 +08:00
Parfii-bot
3db30a7084 docs(readme): expand intro — at-a-glance + what-it-solves + keisei CLI section
Prior README went from personal preface ('From the author') directly
into technical inventory ('What it is'). Reader gap: no value
proposition, no capability summary, no exobrain workflow docs.

Added:
  - 'At a glance' — 6-bullet capability summary (agents, hooks,
    skills, Rust primitives, exobrain, sleep-sync) written so a
    stranger arriving from search gets the model in 30 seconds
  - 'What it solves' — 7-row table mapping vanilla-Claude-Code pain
    points → specific kit component that addresses each
  - 'The keisei CLI' — new subsection documenting attach/mount/
    detach/list-adapters/status subcommands with brain-directory
    layout, 4 use cases (USB travel / team personas / cloud brain /
    experimental isolation), security hardening summary, deferred
    v0.19.1 items

Counts markers unchanged — no regen needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 16:41:43 +08:00
Parfii-bot
e6cab72587 feat(v0.19): multi-client adapters + detach/mount/list-adapters + schema v2
Extends keisei CLI from single-client (v0.18) to multi-client exobrain:
new subcommands detach/mount/list-adapters, 3 new adapters (Cursor,
Continue, Zed), schema v2 for ~/.claude/keisei-attached.toml with
[[attachments]] array (v1 backward-compat via untagged serde).

New subcommands:
  detach — iterate marker attachments, call adapter.detach() on each,
    then delete marker. Real strip of mcpServers entry per adapter.
  mount <brain> — auto-attach to ALL detected clients in one call.
  list-adapters — tabular status (name / detected / config path).

New adapters (each <130 LOC mirrors claude_code.rs pattern):
  adapters/cursor.rs — .cursor/mcp.json project-local, fallback
    ~/.cursor/mcp.json global.
  adapters/continue_adapter.rs — ~/.continue/config.json with
    experimental.modelContextProtocolServers key.
  adapters/zed.rs — ~/.config/zed/settings.json (Linux) or
    ~/Library/Application Support/Zed/settings.json (macOS) with
    context_servers key. Zed schema marked [UNVERIFIED] pending docs.

Schema v2 (~/.claude/keisei-attached.toml):
  [[attachments]]
  client_type = "claude-code"
  config_path = "/Users/.../.claude/settings.json"
  [[attachments]]
  client_type = "cursor"
  config_path = "/Users/.../proj/.cursor/mcp.json"

v1 marker migration: untagged serde accepts legacy client_type=string,
upgrades to single-entry attachments[] on next write.

Tests: 5 (v0.18) + 6 new = 11 integration tests, all pass:
  - attach_then_status_happy_path
  - attach_missing_manifest_errors
  - attach_unsupported_schema_errors
  - status_without_attach_is_clean
  - attach_writes_marker_with_expected_fields
  - mount_with_claude_code_only_detected (new)
  - mount_with_no_client_detected (new)
  - detach_round_trip (new)
  - detach_preserves_other_mcp_servers (new)
  - list_adapters_prints_expected_rows (new)
  - schema_v1_to_v2_migration (new)

Known issues (defer to follow-up commit):
  - CRITIC HIGH#1: rusqlite declared but unused
  - CRITIC HIGH#3: BrainPaths fields required but only mcp_server used
  - SECURITY H1/H2/H3: brain path/name not validated before writing
    into client config — will be addressed before tagging v0.19.0

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 16:04:45 +08:00
Parfii-bot
76ff1e637d chore(v0.18): regen counts — RUST_CRATES 24→25, PROFILE_FULL 37→38, TOTAL_PRIMITIVES 37→38 (keisei added) 2026-04-22 15:53:09 +08:00
Parfii-bot
e53ad26243 Merge feat/v0.18-keisei-cli-mvp — exobrain attach/status CLI 2026-04-22 15:52:59 +08:00
Parfii-bot
3bb9ba7911 feat(v0.18): keisei CLI MVP — exobrain attach/status
Phase 3 of exobrain architecture. Ships the entry-point CLI
that mounts a portable brain (memory + artifacts + manifests +
mcp-server) into an AI client via one command.

MVP scope: 2 subcommands (attach, status), 1 adapter (claude-code).
detach + mount + multi-client deferred to v1.0.

New Rust crate _primitives/_rust/keisei/ — 10 src files + 1 tests
(Constructor Pattern: all files <150 LOC, all fns <=23 LOC).
  main.rs (53 LOC) — clap dispatch
  error.rs (36 LOC) — thiserror enum (BrainNotFound,
    UnsupportedSchema, NoClientDetected, Io/Toml/Json #[from])
  brain.rs (103 LOC) — Brain::load() reads brain/manifest.toml
    schema_v1 (name, created, paths.{memory,artifacts,manifests,
    mcp_server})
  adapter.rs (38 LOC) — ClientAdapter trait (detect/attach/
    detach/config_path) + registry
  adapters/claude_code.rs (121 LOC) — writes MCP server entry
    into ~/.claude/settings.json via merge_mcp_entry (23 LOC,
    mirrors jq-merge pattern from install/lib-hooks.sh)
  attach.rs (44 LOC) — load brain, detect client, call adapter,
    write SSoT ~/.claude/keisei-attached.toml
  status.rs (62 LOC) — read SSoT, print brain name/path/client/
    timestamp + health check (mcp_server binary exists?)
  config.rs (97 LOC) — KeiseiAttached TOML struct + KEISEI_HOME
    env hook for test isolation
  tests/integration.rs (142 LOC) — 5 cases via tempfile + Mutex
    env guard: happy-path, missing-manifest, unsupported-schema,
    no-attach-state, marker-field verification

Workspace: keisei added to _primitives/_rust/Cargo.toml members.
MANIFEST.toml: [primitive.keisei] rust kind, kei-ledger-style
deps (rusqlite bundled, stub for future artifact reads), added
to full profile (standalone opt-in via --add=keisei).

README Rust crates table gains 1 row; count marker untouched.
CHANGELOG [Unreleased] bullet added.

Usage:
  keisei attach /path/to/brain    # mounts into current Claude Code
  keisei status                   # shows mounted brain + health

Next (v0.18 follow-ups): detach impl, cursor/continue adapters,
list-adapters subcommand.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:52:40 +08:00
Parfii-bot
e67ade47c8 feat(v0.18): kei-mcp-server single-binary compile — 5-platform via bun
Phase 1 of exobrain architecture. Ships TS MCP server as a static
binary so users on machines without Node can run KeiSeiKit (USB /
flashdrive / air-gapped scenarios).

.github/workflows/release.yml (+62 LOC) — new build-mcp-binary job:
  - 5-target matrix: darwin arm64/x64, linux arm64/x64, windows x64
  - bun build --compile, linux arm64 continue-on-error (ARM runners
    less reliable)
  - Artifact kei-mcp-server-<os>-<arch>[.exe] + sha256
  - release job now needs [build-release, build-mcp-binary]

install/lib-rust.sh (+50 LOC) — have_prebuilt_mcp_server() +
  report_mcp_server_binary_status(); KEI_SKIP_MCP_BUILD=1 env
  flag skips bun/npm install when a prebuilt binary is present.
  File 165 LOC (<200 limit).

_ts_packages/packages/mcp-server/package.json — scripts.build:native
  + 5 per-target aliases (macos-arm, macos-x64, linux-x64,
  linux-arm, win-x64) for local dev.

_ts_packages/packages/mcp-server/BUILD.md (NEW, 52 LOC) — local
  compile guide per platform + Gatekeeper/code-sign notes +
  cites bun docs [VERIFIED: https://bun.sh/docs/bundler/executables].

README.md pre-built-binaries section gains 'MCP server binary'
subsection (download, chmod +x, xattr -d com.apple.quarantine for
macOS, UAC note for Windows).

CHANGELOG.md [Unreleased] bullet added.

Output size: ~90 MB per binary (bundled bun runtime). Acceptable
trade for zero-dep USB distribution.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:52:36 +08:00
Parfii-bot
bcc199a62e chore(v0.17.1): regen counts — HOOKS 9 → 10 2026-04-22 15:42:12 +08:00
Parfii-bot
249733c164 feat(v0.17.1): orchestrator-dirty-check hook — prevent uncommitted-output compounding
PreToolUse:Agent advisory — warns orchestrator if git status is dirty
before spawning next agent. Closes the workflow gap that caused 28
uncommitted files across 5 bundles on main (2026-04-22 incident).

hooks/orchestrator-dirty-check.sh (51 LOC, POSIX sh):
  - Sources _lib/gate.sh, respects KEI_DISABLED_HOOKS
  - Reads git status --porcelain at repo root
  - Emits stderr advisory with modified/untracked counts + sample
  - Exit 0 always (advisory, not blocking)
  - Bypass: ORCHESTRATOR_META=1 (existing RULE 0.13 flag) or
    ORCHESTRATOR_DIRTY_OK=1 (new, explicit)
  - Severity: warn — per RULE 0.10 ladder; upgrade to enforce
    only after 2nd recurrence

hooks/_lib/test-orchestrator-dirty-check.sh (60 LOC):
  - 5 test cases with mocked git PATH shim
  - Clean / dirty-modified / dirty-untracked / env-bypass /
    gate-bypass
  - PASS 5/5 (existing gate.sh tests unchanged — 11/11)

Wired into hooks/hooks.json (plugin format) and settings-snippet.json
(classic install) at PreToolUse/Agent matcher.

skills/hooks-control/SKILL.md — hook list 9 → 10.
README.md — hook table gains 1 row; count marker left at 9 for
scripts/regen-counts.sh to update post-merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:42:11 +08:00
Parfii-bot
a6853134cc Merge refactor/v0.17-readme-counts-autogen — drift elimination (conflict resolved + regen)
README: took A2 markered version over polish bundle's hardcoded counts.
Then ran scripts/regen-counts.sh to sync marker values to current
post-v0.16.1 state — BLOCKS 78 → 79 (polish added _blocks/mode-matrix.md).

regen-counts --check now exits 0: zero drift.
2026-04-22 15:24:22 +08:00
Parfii-bot
d04e6efe1e refactor(v0.17): README counts auto-generation via markers + regen script
Eliminates README counts drift class (RULE 0.10 recurrence — 3rd
drift in one week: RUST_CRATES 23→24, SKILLS 38→39, PROFILE_FULL
36→37, PROFILE_DEV 4→10, BLOCKS 73→78).

Mechanism: HTML-comment markers wrap every auto-countable value:
  <!-- count:RUST_CRATES -->24<!-- /count:RUST_CRATES -->

16 marker types cover: RUST_CRATES, RUST/SHELL/TOTAL_PRIMITIVES,
SKILLS, HOOKS, BLOCKS, AGENTS, BRIDGES, PROFILE_FULL/MCP/DEV/OPS/
FRONTEND/CORE, LBM_PORTS.

scripts/regen-counts.sh (117 LOC, POSIX sh) — computes every count
from source (MANIFEST.toml, Cargo.toml, find on skills/hooks/blocks/
manifests/bridges) and rewrites markers in place. --check mode
(side-effect-free via mktemp+cmp+diff) exits 1 on drift.

scripts/precommit-counts-check.sh (26 LOC) — invokes regen-counts
--check, blocks commit on drift with fix-it hint.

README gains 'Regenerating counts' subsection documenting both
commands and pre-commit wiring.

No Python/jq/yq hard deps. macOS /bin/sh compat (3.2-era). Idempotent.

Constructor Pattern: largest script 117 LOC (<120), largest awk fn
10 LOC (<30).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:24:05 +08:00
Parfii-bot
d95a3ba48c feat(v0.16.1): dynamic schema SSoT + KNOWN_SCHEMAS drift-test + mode-matrix Phase 3.6
Three polish items from post-audit parallel agent.

1. Dynamic schema whitelist (drops hardcoded const drift)
   _assembler/src/schemas_export.rs (NEW, 136 LOC) — loader cube,
     priority path $AGENT_ROOT/artifacts/schemas.json →
     ~/.claude/agents/artifacts/schemas.json → BUILTIN fallback.
     Hand-rolled JSON parser (no serde_json dep).
   _assembler/src/validator.rs delegates to schemas_export::load,
     keeps KNOWN_ARTIFACT_SCHEMAS alias for back-compat.
   _primitives/_rust/kei-artifact/src/export.rs (NEW, 82 LOC) —
     write() + render() + default_path().
   _primitives/_rust/kei-artifact/src/cli_cmds.rs (NEW, 126 LOC) —
     extracted cmd_emit/get/list/chain so main stays <200 LOC.
   ExportSchemas + ListSchemas subcommands; cmd_register
     auto-refreshes export file (best-effort).

2. KNOWN_SCHEMAS SSoT — documented-dual-const + drift-test
   (Option "simpler than new crate"). SSoT in kei-artifact's
   BUILTIN; schemas_export::BUILTIN is a documented mirror;
   builtin_schemas_do_not_drift_from_kei_artifact test in
   validator.rs parses the primitive's source at test time and
   diffs. <30 LOC change. No workspace structural change —
   assembler stays decoupled from runtime primitive.

3. Agent-to-mode matrix + wizard Phase 3.6
   _blocks/mode-matrix.md (NEW, 24 LOC) — 11-row table mapping
     agent role × recommended mode blocks.
   skills/new-agent/SKILL.md — new Phase 3.6 (between name-confirm
     3.5 and manifest-write 4). AskUserQuestion with 5
     cognitive-mode options (skeptic/devils-advocate/minimalist/
     maximalist/first-principles, multiSelect). Appends picked
     labels to manifest's blocks array. Defaults to NONE.
   _blocks/README.md adds one-line reference to the matrix.
   _assembler/tests/mode_blocks.rs (NEW, 78 LOC) — 3 integration
     tests lock the wiring.

README.md — all accumulated count + pre-built-binaries + plugin
section edits from the v0.16 cycle consolidated here (will be
replaced by markers in v0.17 counts-autogen refactor).

Tests: assembler 24 → 33 (+9), kei-artifact 24 → 31 (+7), total
48 → 64. cargo check --workspace clean.

Constructor Pattern: largest new file validator.rs 180 LOC.

Pre-existing flagged for separate refactor: kei-artifact
validate.rs 268 LOC (not touched by this polish).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:10:46 +08:00
Parfii-bot
b62b219500 Merge branch 'feat/v0.15-cognitive-modes' — 5 cognitive mode blocks 2026-04-22 14:15:17 +08:00
Parfii-bot
24c584ee50 fix: remove genesis-scan from public kit (internal tool, Bundle-only)
Per user decision: publishing the sensitive IP pattern blocklist via public
scanner is leak of the blocklist itself (attack surface). genesis-scan
remains in PROJECT-E (private); user-global
~/.claude/hooks/genesis-leak-guard.sh (runtime hook) separate.

Deleted:
- _primitives/_rust/genesis-scan/ (whole crate, 5 files)
- hooks/git-pre-commit-genesis.sh (scanner companion)

Modified:
- workspace Cargo.toml -1 member (24→23)
- MANIFEST.toml — removed [primitive.genesis-scan] + core/full profile refs
- .github/workflows/ci.yml — removed genesis-scan job
- README.md — 7 count/description edits (24→23 rust, 10→9 hooks, 37→36 full)
- install.sh — 5 edits (--help + menus)
- mcp-server tool-registry.ts + test — scanner removed from MCP surface
- kei-sleep-queue.sh — removed scan_prompt() pre-submit hook
- 2 sleep-on-it skill phases — removed genesis-scan references

Tests: 160 Rust (was 167, -7 genesis-scan tests as expected), 24 assembler unchanged.
2026-04-22 14:11:22 +08:00
Parfii-bot
d50c5a56ae feat(blocks): 5 cognitive mode blocks + 2 manifest wirings
- mode-skeptic (17 LOC) — doubt everything, E1/E2 grade evidence
- mode-devils-advocate (16) — steel-man the opposite
- mode-minimalist (18) — what is unnecessary?
- mode-maximalist (19) — 10x thinking for broad scope
- mode-first-principles (21) — derive from invariants

kei-critic += skeptic + devils-advocate
kei-architect += first-principles

Docs: _blocks/README.md + README.md paragraph under Behavioral blocks
2026-04-22 13:49:57 +08:00
Parfii-bot
a25796df76 docs(readme + install): reconcile all count drift (F4 RELEASE BLOCKER)
Disk reality:
- blocks: 73, manifests: 12, skills: 38 (was 34/35), hooks: 10 (was 6/9)
- shell primitives: 16 (13 opt-in + 3 always-copied)
- bridges: 11, rust crates: 24 (was 8/9/14), MANIFEST full profile: 37

Updated: README.md lines 31, 70, 94, 111, 119-125, 254, 307 and install.sh --help + whiptail.
2026-04-22 13:36:17 +08:00
Parfii-bot
88a59f017f feat(integration): deep-sleep wired into MANIFEST + sleep-setup Phase 3b + README 2026-04-22 08:28:22 +08:00
Parfii-bot
9ca7c4e148 docs(readme): add 'Why Rust, not Python' paragraph in author note 2026-04-22 04:14:52 +08:00
Parfii-bot
c2fdaf8c4c docs(readme): clarify 'my sample, not claim of originality' in author note 2026-04-22 03:03:56 +08:00
Parfii-bot
5fb152a758 docs(readme): add 'double sorry' disclaimer in author note 2026-04-22 03:02:11 +08:00
Parfii-bot
deda7848c6 docs(readme): move 'From the author' to opening, expand with transformer-error context 2026-04-22 02:58:05 +08:00
Parfii-bot
5c177d0f9b docs(readme): add 'From the author' note 2026-04-22 02:44:09 +08:00
Parfii-bot
3cead09520 feat(integration): Phase A incubation wired into trigger + install + README 2026-04-22 02:30:04 +08:00
Parfii-bot
aa77043477 feat(integration): --with-sleep-sync flag + README Cloud REM sync section 2026-04-22 01:34:42 +08:00
Parfii-bot
48b1a8cdcf Merge branch 'feat/v0.10-genesis-scan' — kei-memory + genesis-scan v0.10.0 reconciled 2026-04-22 01:04:32 +08:00
Parfii-bot
c436eb105d feat(integration): register genesis-scan in MANIFEST core+full + README + install.sh sizing 2026-04-22 01:01:56 +08:00
Parfii-bot
edeca916db feat(integration): wire kei-memory into MANIFEST + settings-snippet + README for v0.10 2026-04-22 00:50:04 +08:00
Parfii-bot
b1ce0609ee feat(install): interactive menu (whiptail/dialog/plain) + confirm screen + --yes/--no-execute
- TUI via whiptail (preferred) or dialog; plain-text fallback with zero deps
- Install Plan confirm screen: primitives, soft-deps status (✓/✗), estimates
- Skip menu on --profile/--add/--remove/--list or non-TTY (CI-safe)
- --yes skips confirm; --no-execute dry-run
- install.sh 844 → 1195 LOC, 10 new functions all <30 LOC
- README +8 LOC Interactive install section
2026-04-21 23:11:58 +08:00
Parfii-bot
c5078f8918 docs(readme): install profiles table + migration note for v0.9.0 2026-04-21 23:00:32 +08:00
Parfii-bot
7b89aba305 docs(readme): v0.8.0 — 73 blocks / 34 skills / 21 primitives / 6 hooks / 11 bridges + pipelines section 2026-04-21 21:33:11 +08:00
Parfii-bot
fba0436fb9 fix(audit-h1): one more stale 'three shell hooks' → 'four shell hooks' in prerequisites 2026-04-21 20:11:37 +08:00
Parfii-bot
ab70b8344d fix(audit-l): agent count drift in install.sh and compose-solution
- L1: install.sh post-install banners '~14 generated agents' → '12 generated agents'
  (both the activated-path and the manual-merge-path copies).
- L2: skills/compose-solution/SKILL.md handoff reference '14 kit agents' → '12 kit agents'.
- L3: README /new-agent section rephrases 'via option-pickers' to call out that
  the 6 questions are grouped into multiple option-picker batches (two
  AskUserQuestion calls) rather than six separate prompts.
2026-04-21 20:10:04 +08:00
Parfii-bot
d155afc554 fix(audit-m): tomd cache path-salt; bridges respects rollback; rollback rm-rf guard; placeholder URLs; research skill role-tag note; stack frontend-gap doc
- M1 (RULE 0.4): replace fabricated URLs 'https://example.invalid/PROJECT-D'
  and 'https://…/PROJECT-D' with plain text ('user's personal CLI predecessor').
- M2: tomd-preread cache key = basename + mtime + 8-char shasum of full path,
  so two files with the same basename+mtime at different paths no longer
  collide. Portable shasum shim; falls back to 'nohash' if shasum absent.
- M3: install.sh --with-bridges gated on ROLLED_BACK=0 so bridges are NOT
  emitted into $PWD after an ERR-trap rollback.
- M4: rollback() guards rm -rf "$orig" behind an existence check.
- M5: skills/research/SKILL.md front-matter note — role tags like
  'web-researcher' / 'meta-critic' are ad-hoc prompt labels for the generic
  kei-researcher subagent, NOT separate manifests. Prevents fruitless
  grep in _manifests/.
- M6: README adds a 'Frontend-stack coverage gap' callout listing the
  planned-but-not-shipped frameworks (React-Vite, Vue-Nuxt, SvelteKit,
  Astro, Angular, plain-web).
- M7: no-hand-edit-agents.sh documents at case block that the GENERATED
  marker is the SOLE source of truth — legacy unmarked .md files pass
  silently by design; re-run the assembler to adopt them.
2026-04-21 20:09:24 +08:00
Parfii-bot
77184ca2ae fix(audit-h1): correct README counts — 4 hooks, 7 skills, 12 agents; document compose-solution + tomd-preread
- README line 3: 'three pre-wired hooks ... six portable skills' → 'four ... seven'
- README table row: hooks 3→4 (adds tomd-preread), skills 6→7 (adds compose-solution)
- README step 6: 'three hooks and six skills' → 'four hooks and seven skills'
- README pipeline paragraph: 'Three hooks enforce' → 'Four hooks enforce' + tomd-preread bullet
- install.sh post-install message: '3 hooks' → '4 hooks' (tomd-preread added)
2026-04-21 20:07:06 +08:00
Parfii-bot
a9abc6cace docs: primitives section + compose-solution phase-3/5 cross-refs
- README.md: new 'Primitives' section between Cross-tool bridges and
  Meta-composer. Explains _primitives/ vs _blocks/, lists tomd, names
  the PreToolUse(Read) hook, notes /compose-solution auto-discovery
- phase-3-prior-art.md: extend grep target list to include _primitives/
- phase-5-architecture.md: one-paragraph note on referencing tomd
  primitive instead of rolling custom binary-format parsing (reuse
  over rewrite)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 19:45:20 +08:00
Parfii-bot
4e8542a0d5 Merge branch 'feat/compose-solution' into refactor/drop-restricted agents 2026-04-21 19:10:42 +08:00
Parfii-bot
4859e1cdf7 refactor: remove restricted-scope agents and blocks from public kit
Strip all patent-related tooling from the generic kit so it can ship
publicly under MIT without leaking sensitive IP. restricted-scope agents,
blocks, and skill conditionals live in the private PROJECT-E.

Deleted (5 files):
- _manifests/kei-patent-compliance.toml
- _manifests/kei-patent-researcher.toml
- _blocks/domain-sensitive IP-aware.md
- _assembler/tests/fixtures/_manifests/kei-patent-compliance.toml
- _assembler/tests/snapshots/kei-patent-compliance.snap

Cross-reference cleanup:
- 6 manifests: remove kei-patent-* handoffs and "sensitive IP" forbidden lines
- _blocks/deploy-local-only.md: drop sensitive IP rationale, keep ML weights /
  offensive / kernel / client-confidential banned-public triggers
- skills/research/SKILL.md: drop patent-angle-scanner + "Patent angles" section
- skills/new-agent/SKILL.md: drop Q5 (patent), renumber Q6→Q5 Q7→Q6
- README.md: drop 2 restricted agents rows, renumber wizard questions 5-7→5-6,
  update counts 34→33 blocks / 14→12 agents
- _assembler/tests/golden.rs: remove golden_patent_compliance test
- _assembler/tests/roundtrip.rs: swap kei-patent-compliance fixture to
  kei-cost-guardian for double-assembly determinism test
- _assembler/tests/fixtures/_manifests/kei-researcher.toml + snapshot:
  remove kei-patent-researcher handoff

Tests: 21 → 20 integration tests, all passing. Grep for "patent" in
main tree returns zero hits outside .claude/worktrees.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 19:07:02 +08:00
Parfii-bot
859003113a docs(readme): document /compose-solution meta-composer and feedback loop
Adds a Meta-composer section between Cross-tool bridges and License. The
section explains the one-paragraph intake, links to the 7-phase pipeline,
shows a hook-creation example that routes to /escalate-recurrence, and
emphasizes the Phase 6 block-augmentation feedback loop — the kit gets
smarter with every invocation, with before/after _blocks/ count reported
per session.
2026-04-21 18:22:21 +08:00
Parfii-bot
7d14181044 Merge branch 'feat/project-bridges' — 11 cross-tool bridges + install.sh --with-bridges + wizard Phase 8
# Conflicts:
#	install.sh
2026-04-21 17:15:44 +08:00
Parfii-bot
20b79d45a5 Merge branch 'refactor/kei-prefix-agents' — kei- prefix on 14 agents + wizard Phase 3.5 name confirm 2026-04-21 17:10:27 +08:00
Parfii-bot
a300956397 docs(readme): cross-tool bridges section
- New section between "Agents overview" and "License"
- 11-tool coverage table (Cursor legacy/MDC, Codex AGENTS.md,
  Copilot, Windsurf, Junie, Continue, Gemini/Antigravity,
  Aider, Replit)
- Three generation paths: --with-bridges / /new-agent Phase 8 /
  manual emit.sh invocation
- Link to _bridges/README.md for full template→output-path table
2026-04-21 14:48:31 +08:00
Parfii-bot
fc0763870f docs(readme): update agent table with kei- prefix
- Agents-overview table: 14 rows renamed to kei-<name>.
- "What you get" table examples: kei-<name> with trailing "...".
- Intro paragraph: note on kei-* namespace motivation (no collision
  with user's own same-named agents).

No code/behavior change — this is pure docs alignment with the manifest
rename in commit 3039ada.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 13:41:19 +08:00
Parfii-bot
76520e4a9e docs(readme): clarify block usage split + backup-on-reinstall disclaimer
Explains that 8 of 34 blocks are used by shipped manifests; the other 26
feed the /new-agent wizard. Adds a v0.1.1 disclaimer that re-running
install.sh backs up kit-owned directories and hook files to .bak-TIMESTAMP.
2026-04-21 03:36:18 +08:00
denis
0b901cf2f9 feat: KeiSeiKit v0.1.0 — initial public release
Generic Constructor-Pattern agent kit for Claude Code. Zero personal data,
fully English, MIT-licensed.

Contents:
- 34 reusable blocks (baseline, rules, stack/deploy/domain/api/scraper)
- 14 cross-project agent manifests (code/ml/infra/researcher/critic/...)
- 6 portable skills (/new-agent, /research, /test-gen, /debug-deep, /pr-review, /refactor)
- Rust assembler (single binary, ~500 KB)
- 3 hooks (auto-reassemble, pre-commit validate, no-hand-edit)
- install.sh (idempotent, cargo-builds on first run)
- MIT LICENSE

All 6 sanity greps pass: 0 Russian text, 0 specific project names,
0 incident numbers, 0 user paths, 0 hardcoded IPs, 0 API keys.

cargo check + assemble --validate: both pass on 14 manifests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 23:58:34 +08:00