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.
29 packaged workflows and domain capabilities
13 specialist agents for planning, code, QA, docs, git, and deploy
Privacy, scope, state, usage, docs sync, and spec-state gates
Runtime configuration, paths, locale, usage, and model hints
Claude Code hook wiring and statusline command
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.
| Hook | Purpose |
|---|---|
privacy-block.cjs | Requires user approval for sensitive files such as .env, keys, credentials, and tokens. |
inspect-block.cjs | Blocks heavy or unsafe scopes such as .git, node_modules, build outputs, and broad glob scans. |
rules.cjs | Injects concise workflow, skill routing, docs path, and modularization reminders. |
spec-state.cjs | Finds active specs and injects the state sync tollgate. |
docs-sync.cjs | Detects missing or stale project docs. |
state.cjs | Persists session state and modified-file summaries. |
agent.cjs | Gives subagents lightweight path, locale, and rule context. |
usage.cjs | Fetches 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.jsonstores phase, status,task_files, andtask_registry.tasks/task-R*.mdstores context, steps, criteria, and evidence.
Both layers must move together. Chat messages are not a source of truth.