KeiSeiKit-1.0/_primitives
Parfii-bot 58e079aadb fix(workspace): restore [workspace.package] keys + 3 missing workspace deps
Wave 2 audit (validator + critic-tech-debt + critic-bug, 2026-05-04) found
two regressions causing `cargo check --workspace` to hard-fail at HEAD 45020d0:

== Regression A — [workspace.package] keys deleted in 45020d0 ==
The P1+P2 perf commit accidentally dropped 4 keys from [workspace.package]:
  - authors    = ["Denis Parfionovich <parfionovich@keilab.io>"]
  - license    = "Apache-2.0"
  - repository = "https://github.com/KeiSei84/KeiSeiKit-1.0"
  - homepage   = "https://github.com/KeiSei84/KeiSeiKit-1.0"

100+ workspace member crates inherit via `authors.workspace = true` and
`license.workspace = true` (firewall-diff, frustration-matrix, kei-artifact,
all kei-auth-*, kei-ledger, kei-cortex, etc.). Without those keys cargo errors:

  error inheriting `authors` from workspace root manifest's
    workspace.package.authors
  Caused by: `workspace.package.authors` was not defined

The 45020d0 commit body claimed "VERIFIED: cargo check --workspace exits
clean [REAL: ran in this session; 0 errors, warnings only]" — that claim
was false. RULE 0.4.b + RULE 0.16 STATUS-TRUTH violation by the orchestrator
itself. Original keys recovered from commit fc03c98 via
`git log -p main -L "/^\[workspace\.package\]/,/^\[/:_primitives/_rust/Cargo.toml"`.

== Regression B — 3 workspace.dependencies entries missing (pre-existing) ==
Earlier metadata-SSoT migrations (03d57c7 kei-cortex, fc03c98 bulk) moved
inline `tower="0.4"`, `dashmap="5"`, `notify="8"` to `{ workspace = true }`
without adding them to `[workspace.dependencies]`. cargo errors:

  error inheriting `tower` from workspace root manifest's workspace.dependencies.tower
  error inheriting `dashmap` from workspace root manifest's workspace.dependencies.dashmap
  error inheriting `notify` from workspace root manifest's workspace.dependencies.notify

Plus `clap = { workspace = true }` had only `["derive"]` while kei-migrate
uses `#[arg(env=...)]` requiring the `env` feature.

== Fix ==
- Restored 4 [workspace.package] keys (authors/license/repository/homepage)
- Added 3 missing [workspace.dependencies]:
    tower   = { version = "0.4", features = ["limit", "buffer", "util"] }
    dashmap = "5"
    notify  = "8"
- Added "env" feature to clap workspace entry

== Verification ==
[REAL: cd _primitives/_rust && cargo check --workspace --offline 2>&1 | grep -cE '^error']
  → 0 errors
[REAL: same command, full output filtered for 'generated N warnings']
  → 3 warnings in kei-cortex (private_interfaces, pre-existing, unrelated)
  → 2 warnings in frustration-matrix (pre-existing)

=== STATUS-TRUTH MARKER ===
shipped: functional
stubs: 0
cargo-check: PASS
behaviour-verified: yes
follow-up-required:
  - none for this commit (workspace builds)
  - separate commit required for kei-arch-map crate (planned next, branched off this)
  - separate commit required for #33 release.yml keigit publish target
  - separate commit required for #38 README/ARCHITECTURE 105→104 crate count

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 02:13:57 +08:00
..
_rust fix(workspace): restore [workspace.package] keys + 3 missing workspace deps 2026-05-04 02:13:57 +08:00
templates feat(live-graph): WebSocket activity stream — orchestrator-centric live view 2026-05-02 13:30:24 +08:00
design-scrape.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
figma-tokens.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
frontend-inspect.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
harden-base.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
kei-ci-lint.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
kei-docs-scaffold.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
kei-doctor.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
kei-sleep-queue.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
kei-sleep-setup.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
kei-sleep-sync.sh feat(sleep-sync): mirror time-metrics + ledger snapshots, surface in Phase B report 2026-05-02 04:02:28 +08:00
live-preview.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
log-ship.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
MANIFEST.toml KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
metrics-scrape.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
provision-hetzner.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
provision-vultr.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
README.md KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
screenshot-decode.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
tomd.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00

_primitives — first-class building blocks

_primitives/ holds standalone utilities that agents, hooks, and skills (including /compose-solution) depend on. Unlike _blocks/ (behavioral markdown) or _manifests/ (agent TOML), primitives are executable shell programs installed at $HOME/.claude/agents/_primitives/ by install.sh.

Current primitives

Primitive Purpose Invocation
tomd.sh Universal non-native-format → markdown converter (PDF, DOCX, XLSX, PPTX, CSV, images, code). ~/.claude/agents/_primitives/tomd.sh <file>

tomd.sh is a first-class primitive. Universal non-native-format → markdown converter with configurable cache directory (KEISEI_TOMD_CACHE) and KeiSeiKit-style error tags ([tomd]).

Hook integration

hooks/tomd-preread.sh is a PreToolUse(Read) hook that auto-redirects Claude to the converted markdown when a Read targets .docx / .doc / .xlsx / .pptx / .csv. Cached under $KEISEI_TOMD_CACHE (default /tmp/keisei-tomd-cache).

/compose-solution discovery

Phase 3 prior-art sweep greps _primitives/ alongside _blocks/, _manifests/, skills/, _bridges/, hooks/. If a user task involves file-format parsing, the meta-composer surfaces tomd automatically — reuse over rewrite (RULE "No Patching").