Runtime bundle
Runtime

CafeKit cài một operating system cho assistant.

Package thêm skills, agents, rules, scripts, hooks, statusline, runtime config, và state synchronization vào project.

.claude/ runtime bundle
skills/

30 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 dùng CommonJS hooks trong .claude/hooks/. Codex CLI dùng project hooks trong .codex/hooks.json cùng rules và scripts dưới .codex/.

HookMục đích
privacy-block.cjsYêu cầu user approval cho file nhạy cảm như .env, keys, credentials, tokens.
inspect-block.cjsChặn scope nặng hoặc không an toàn như .git, node_modules, build outputs, glob quá rộng.
rules.cjsInject reminder về workflow, skill routing, docs path, modularization.
spec-state.cjsTìm active spec và inject state sync tollgate.
docs-sync.cjsDetect docs thiếu hoặc stale.
state.cjsPersist session state và modified-file summary.
agent.cjsCấp context nhẹ cho subagent.
usage.cjsFetch usage limits cho statusline cache.

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

Validator là hard backstop. Prompt có thể drift; script thì không nên.

State model#

  • plan.md lưu C1 scope, acceptance criteria, exclusions, C2 decisions và task map.
  • task-NN-*.md có một Status:, outcome, ownership, dependencies, proof command và final inline ## Receipt.

Controller chỉ sync state và proof đã quan sát. Chat không phải source of truth; legacy packets giữ adapter riêng.