Workflow chính
Main workflow

Intent thành code qua contract đã review.

Khóa scope tại C1, review findings tại C2, implement từng flat task, tạo proof rồi để user đóng tại C3.

Main CafeKit workflow
01
/cf:specs

Specify

Create requirements, research, design, task packets, and validation gates before code starts.

02
Approve task packet

Lock scope

Use the accepted C1/C2 decisions, plan, and flat task as the implementation contract.

03
/cf:develop

Build

Implement one approved task at a time after task-aware inspection of real entrypoints.

04
/cf:test

Verify

Run exact commands, prove reachability, and reject fake green results such as zero-test passes.

05
/cf:code-review

Review

Check spec compliance, code quality, edge cases, security, and regression risk before closeout.

06
/cf:sync

Sync

Update task Status and its inline Receipt only after proof, or audit drift before continuing.

Main path#

/cf:brainstorm         # optional khi intent hoặc architecture chưa rõ
  -> /cf:specs         # C1 -> plan.md + flat tasks -> adversarial review -> C2
  -> dừng planning
  -> /cf:develop       # invocation mới; từng unblocked task
  -> /cf:test          # real proof nhỏ nhất nhưng đủ
  -> /cf:code-review   # correctness, security, regression, contract drift
  -> /cf:sync          # chỉ observed Status và inline Receipt
  -> C3                  # quyết định completion của user

Chat không phải source of truth. New work dùng specs/<feature>/plan.md và flat task-NN-*.md.

Contract và execution#

plan.md ghi C1 scope, exclusions, acceptance criteria, dependencies và C2 decisions. Mỗi task có một outcome, một Status:, ownership, dependencies, proof command và final inline ## Receipt.

Develop scout entrypoints và callers thật trước mutation. Runtime-facing work chưa xong nếu chưa reachable từ route, command, UI mount, worker, service hoặc API boundary thật.

Không âm thầm thay named technology hay runtime choice. Scope change phải quay lại plan và user decision.

Proof stack#

Contract

Plan, accepted decisions, and active task agree on scope.

Code

Runtime-facing work is wired into a real entrypoint or caller.

Evidence

The task records commands, outcomes, and runtime or artifact proof.

State

Task Status and inline Receipt are synchronized after verification.

Green command chưa đủ. Exact command liên quan acceptance phải chạy; zero tests và NO_TESTS không pass. Review finding chặn completion tới khi fix và reverify.

State ownership#

State moves only when proof exists
pending

Task is known but not active yet.

in_progress

Task has been claimed and is being implemented or verified.

blocked

A concrete blocker is recorded and must be cleared before continuing.

done

Completion criteria and evidence are satisfied with real proof.

Chỉ controller update task Status và canonical Receipt. Sync có thể reconcile observed state nhưng không được bịa execution, approval hay completion.

Alternate routes#

Tình huốngRoute
Cần câu trả lời có evidence/cf:ask
Cần scoped codebase discovery/cf:scout
Chưa biết root cause/cf:debug
Bug đã diagnose cần sửa/cf:fix
Existing system thiếu docs tin cậy/cf:docs --reconstruct <scope>
Technical decision còn uncertain/cf:research
Bounded numeric optimization rõ ràng/cf:loop

Claude Code dùng /cf:*; Codex CLI dùng native $cf-*. OpenCode command chỉ còn trong ghi chú lịch sử 0.16.