Spec-driven development
Spec-driven development

Request を contract にし、verified code に変える。

CafeKit は重要な truth を chat の外に置きます。Assistant は contract を先に書き、approved task packet を実装し、evidence で prove して state を sync します。

01
Request

人が変更を依頼します。

02
Spec

C1/C2 scope、plan、flat tasks が durable files になります。

03
Develop

Assistant が approved task packet を 1 つ実装します。

04
Verify

Real commands と runtime proof で結果を確認します。

05
Review

別 pass で compliance と risk を確認します。

06
Sync

Evidence がある時だけ state を進めます。

Simple version#

Spec は chat memory ではなく durable contract です。New work は specs/<feature>/plan.md と flat task-NN-*.md に保存します。

CafeKit が feature に求める loop
1. Specify

Code 変更前に何を作るかを書きます。

2. Build narrow

Approved task boundary だけを実装します。

3. Prove

Commands を実行し exact evidence を記録します。

4. Sync state

Proof 後に task Status と inline Receipt を更新します。

Artifact questions#

specs/<feature>/ の中身
plan.md

Approved C1/C2 scope、task index、ownership、dependencies、completion boundary。

task-NN-*.md

Outcome、Scope、Acceptance、Verification Plan を持つ flat task。

inline Receipt

Exact command、exit、current Base/Head、non-empty current output。

ArtifactQuestion
plan.mdApproved outcome、scope、exclusions、acceptance、decisions、task map は何か?
task-NN-*.md今 executable な one outcome、owner、required exact proof は何か?
Final inline ## ReceiptTask pass を証明する current command と output は何か?

Working rule#

  1. Intent または architecture が未解決な間だけ brainstorm。
  2. Specs は C1 を開き、plan/tasks を作り、C2 findings を提示。
  3. Planning stop。New explicit develop invocation だけが work を開始。
  4. Develop は one unblocked task を実行し、test と code review が verify。
  5. Observed Status/proof だけを sync。C3 で user が completion を決定。
普通の prompting との違い
Ad-hoc prompting
Chat が source of truth
Scope が黙って変わる
Assistant が不足を推測する
Review は final diff だけを見る
CafeKit SDD
Repo files が source of truth
C1 scope で変更が explicit
不足は plan に戻す
Review は code と contract を比較する

Substantial、risk-elevated、multi-file、runtime、data、auth、package、handoff-sensitive work では full path を使います。Clear isolated one/two-file routine change は direct work が可能です。

Core workflow と Spec lifecycle を参照してください。