Runtime bundle
Runtime

CafeKit は assistant の operating system を入れる。

package は managed skills、agents、rules、scripts、hooks、statusline、runtime config、state synchronization を 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 は .claude/hooks/ の CommonJS hooks を使います。OpenCode は .opencode/plugins/ の TypeScript plugins を使います。Plugin と hook の対応は OpenCode platform を参照してください。

HookPurpose
privacy-block.cjs.env、keys、credentials、tokens など sensitive files に user approval を要求します。
inspect-block.cjs.gitnode_modules、build outputs、広すぎる glob scans を block します。
rules.cjsworkflow、skill routing、docs path、modularization reminders を inject します。
spec-state.cjsactive spec を見つけ、state sync tollgate を inject します。
docs-sync.cjsmissing/stale project docs を検出します。
state.cjssession state と modified-file summaries を保存します。
agent.cjssubagent に path、locale、rule context を渡します。
usage.cjsstatusline cache 用に Claude usage limits を fetch します。

Validators#

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

validators は hard backstop です。prompt instructions は drift しますが、scripts は drift しないようにします。

State model#

  • spec.json は phase、status、task_filestask_registry を保持します。
  • tasks/task-R*.md は context、steps、criteria、evidence を保持します。

2つの layer は一緒に動く必要があります。chat は source of truth ではありません。