Runtime bundle
Runtime

CafeKit installs an operating system for the assistant.

The package adds managed skills, agents, rules, scripts, hooks, statusline, runtime config, and state synchronization into the project.

.claude/ runtime bundle
skills/

29 packaged workflows and domain capabilities

agents/

13 specialist agents for planning, code, QA, docs, git, and deploy

hooks/

Privacy, scope, state, usage, docs sync, and spec-state gates

runtime.json

Runtime configuration, paths, locale, usage, and model hints

settings.json

Claude Code hook wiring and statusline command

status.cjs

Git, context, usage, task, and agent statusline

Hooks#

Claude Code uses CommonJS hooks under .claude/hooks/. OpenCode uses TypeScript plugins under .opencode/plugins/ — see OpenCode platform for the plugin-to-hook mapping.

HookPurpose
privacy-block.cjsRequires user approval for sensitive files such as .env, keys, credentials, and tokens.
inspect-block.cjsBlocks heavy or unsafe scopes such as .git, node_modules, build outputs, and broad glob scans.
rules.cjsInjects concise workflow, skill routing, docs path, and modularization reminders.
spec-state.cjsFinds active specs and injects the state sync tollgate.
docs-sync.cjsDetects missing or stale project docs.
state.cjsPersists session state and modified-file summaries.
agent.cjsGives subagents lightweight path, locale, and rule context.
usage.cjsFetches Claude usage limits for the statusline cache.

Validators#

The runtime includes deterministic scripts:

node .claude/scripts/validate-spec-output.cjs specs/<feature>
node .claude/scripts/validate-docs.cjs docs
node .claude/scripts/validate-docs-reconstruct.cjs docs/as-is/<scope>
node .claude/scripts/generate-skill-catalog.cjs --skills

Use validators as hard backstops. Prompt instructions can drift; scripts should not.

State model#

CafeKit stores feature state in both machine and human layers:

  • spec.json stores phase, status, task_files, and task_registry.
  • tasks/task-R*.md stores context, steps, criteria, and evidence.

Both layers must move together. Chat messages are not a source of truth.